/* ==========================================================================
   macacos.com.uy — site layer
   Same identity as the macacocafé phpBB style
   (tools/punbb-to-phpbb/styles/macacos/theme/macacos.css): black site band
   with the dotted m, charcoal bars, white cards on light grey, monochrome,
   system type, light and dark following the OS. Keep tokens in sync.
   ========================================================================== */

:root {
	color-scheme: light dark;

	--mc-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--mc-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

	--mc-page: #efefef;
	--mc-surface: #ffffff;
	--mc-surface-2: #f6f6f6;
	--mc-surface-3: #ebebeb;
	--mc-line: #e3e3e3;
	--mc-line-strong: #c9c9c9;
	--mc-ink: #1b1b1b;
	--mc-ink-2: #444444;
	--mc-ink-3: #6b6b6b;
	--mc-bar: #2a2a2a;
	--mc-bar-ink: #ffffff;
	--mc-bar-ink-2: #b8b8b8;
	--mc-invert: #1b1b1b;
	--mc-invert-ink: #ffffff;
	--mc-danger: #b3122e;
	--mc-ring: rgba(27, 27, 27, 0.18);

	--mc-r: 12px;
	--mc-r-sm: 8px;
	--mc-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 6px 20px -8px rgba(0, 0, 0, 0.08);
	--mc-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark palette. It applies when the OS asks for dark, unless the visitor
   forced light with the header toggle (html[data-theme="light"]), and when
   they forced dark (html[data-theme="dark"]). Keep both copies in sync, and
   in sync with the forum style (styles/macacos/theme/macacos.css). */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--mc-page: #0e0e0e;
		--mc-surface: #181818;
		--mc-surface-2: #1f1f1f;
		--mc-surface-3: #2a2a2a;
		--mc-line: #2b2b2b;
		--mc-line-strong: #3d3d3d;
		--mc-ink: #ededed;
		--mc-ink-2: #c4c4c4;
		--mc-ink-3: #9a9a9a;
		--mc-bar: #262626;
		--mc-bar-ink-2: #a8a8a8;
		--mc-invert: #ededed;
		--mc-invert-ink: #111111;
		--mc-danger: #ff6b7f;
		--mc-ring: rgba(237, 237, 237, 0.22);
		--mc-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
	}
}

:root[data-theme="dark"] {
	--mc-page: #0e0e0e;
	--mc-surface: #181818;
	--mc-surface-2: #1f1f1f;
	--mc-surface-3: #2a2a2a;
	--mc-line: #2b2b2b;
	--mc-line-strong: #3d3d3d;
	--mc-ink: #ededed;
	--mc-ink-2: #c4c4c4;
	--mc-ink-3: #9a9a9a;
	--mc-bar: #262626;
	--mc-bar-ink-2: #a8a8a8;
	--mc-invert: #ededed;
	--mc-invert-ink: #111111;
	--mc-danger: #ff6b7f;
	--mc-ring: rgba(237, 237, 237, 0.22);
	--mc-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* A forced theme also drives form controls and scrollbars. */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*, *::before, *::after {
	box-sizing: border-box;
}

html {
	background-color: var(--mc-page);
	scrollbar-color: var(--mc-line-strong) var(--mc-page);
	accent-color: var(--mc-ink);
	-webkit-text-size-adjust: 100%;
}

body {
	background-color: var(--mc-page);
	color: var(--mc-ink);
	font-family: var(--mc-font);
	font-size: 15px;
	line-height: 1.55;
	margin: 0;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

::selection {
	background: var(--mc-ink);
	color: var(--mc-page);
}

a {
	color: var(--mc-ink);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
	outline: 2px solid var(--mc-ink);
	outline-offset: 2px;
	border-radius: 4px;
}

h1, h2, h3 {
	color: var(--mc-ink);
	letter-spacing: -0.01em;
	line-height: 1.2;
	text-wrap: balance;
}

img {
	height: auto;
	max-width: 100%;
}

code {
	font-family: var(--mc-mono);
	font-size: 0.92em;
}

.sr-only {
	border: 0;
	clip: rect(0 0 0 0);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.wrap {
	margin: 0 auto;
	max-width: 1180px;
	padding: 0 24px 32px;
}

/* --------------------------------------------------------------------------
   Site header: the black macacos band with the dotted m (same as the forum)
   -------------------------------------------------------------------------- */

.mc-site {
	background: linear-gradient(180deg, #000 0%, #000 55%, #161616 100%);
	border-bottom: 1px solid #262626;
	color: #fff;
}

.mc-site__inner {
	align-items: center;
	display: flex;
	gap: 28px;
	margin: 0 auto;
	max-width: 1180px;
	min-height: 64px;
	padding: 0 24px;
}

.mc-site__logo {
	color: #fff;
	display: inline-flex;
	flex: none;
	margin-left: -6px;
	padding: 6px;
}

.mc-site__logo svg {
	display: block;
	fill: currentColor;
	height: 30px;
	width: 30px;
}

.mc-site__logo circle {
	transform-box: fill-box;
	transform-origin: center;
}

.mc-site__logo:hover circle,
.mc-site__logo:focus-visible circle {
	animation: mc-dot 900ms var(--mc-ease) calc(var(--i) * 55ms) both;
}

@keyframes mc-dot {
	0%   { opacity: 1; transform: scale(1); }
	35%  { opacity: 0.25; transform: scale(0.55); }
	100% { opacity: 1; transform: scale(1); }
}

.mc-site__nav {
	display: flex;
	font-size: 14px;
	font-weight: 600;
	gap: 4px;
	letter-spacing: -0.005em;
	overflow-x: auto;
	scrollbar-width: none;
}

.mc-site__nav::-webkit-scrollbar { display: none; }

.mc-site__nav a {
	border-radius: 999px;
	color: #9b9b9b;
	padding: 6px 12px;
	text-decoration: none;
	transition: color 200ms var(--mc-ease), background-color 200ms var(--mc-ease);
	white-space: nowrap;
}

.mc-site__nav a:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
}

.mc-site__nav a[aria-current="page"] {
	color: #fff;
}

.mc-site__nav a:focus-visible,
.mc-site__logo:focus-visible {
	outline-color: #fff;
}

/* Light/dark toggle at the end of the band: moon in light, sun in dark.
   Same as the forum's (styles/macacos/theme/macacos.css). */
.mc-theme {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: 999px;
	color: #9b9b9b;
	cursor: pointer;
	display: inline-flex;
	flex: none;
	height: 36px;
	justify-content: center;
	margin-left: auto;
	margin-right: -8px;
	padding: 0;
	transition: color 200ms var(--mc-ease), background-color 200ms var(--mc-ease);
	width: 36px;
}

.mc-theme[hidden] {
	display: none;
}

.mc-theme:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
}

.mc-theme:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.mc-theme svg {
	fill: none;
	height: 18px;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
	width: 18px;
}

.mc-theme__sun,
.mc-theme[aria-pressed="true"] .mc-theme__moon {
	display: none;
}

.mc-theme[aria-pressed="true"] .mc-theme__sun {
	display: block;
}

/* --------------------------------------------------------------------------
   Page header: same rhythm as the forum's board header
   -------------------------------------------------------------------------- */

.mc-hero {
	align-items: flex-end;
	display: flex;
	gap: 24px;
	justify-content: space-between;
	padding: 36px 0 22px;
}

.mc-hero h1 {
	font-size: clamp(30px, 4vw, 42px);
	font-weight: 750;
	letter-spacing: -0.035em;
	line-height: 1;
	margin: 0 0 8px;
}

.mc-hero p {
	color: var(--mc-ink-3);
	font-size: 15px;
	margin: 0;
	max-width: 60ch;
}

/* --------------------------------------------------------------------------
   Cards and the charcoal bar
   -------------------------------------------------------------------------- */

.mc-card {
	background: var(--mc-surface);
	border: 1px solid var(--mc-line);
	border-radius: var(--mc-r);
	box-shadow: var(--mc-shadow);
	margin: 0 0 18px;
	overflow: hidden;
}

.mc-card__bar {
	align-items: center;
	background: var(--mc-bar);
	color: var(--mc-bar-ink);
	display: flex;
	gap: 12px;
	justify-content: space-between;
	min-height: 44px;
	padding: 0 18px;
}

.mc-card__bar h2 {
	color: var(--mc-bar-ink);
	font-size: 15px;
	font-weight: 650;
	margin: 0;
}

.mc-card__bar span {
	color: var(--mc-bar-ink-2);
	font-size: 12px;
	font-weight: 500;
}

.mc-card__body {
	padding: 18px 20px;
}

.mc-card__tools {
	border-bottom: 1px solid var(--mc-line);
	padding-bottom: 14px;
	padding-top: 14px;
}

.mc-card__body > :first-child { margin-top: 0; }
.mc-card__body > :last-child { margin-bottom: 0; }

.mc-card h3 {
	font-size: 14px;
	font-weight: 650;
	margin: 0 0 6px;
}

.mc-card p {
	color: var(--mc-ink-2);
	font-size: 14px;
	margin: 0 0 12px;
}

.mc-muted {
	color: var(--mc-ink-3);
}

/* Buttons */
.mc-btn {
	align-items: center;
	background: var(--mc-invert);
	border: 1px solid var(--mc-invert);
	border-radius: 999px;
	color: var(--mc-invert-ink);
	display: inline-flex;
	font-size: 13px;
	font-weight: 600;
	gap: 6px;
	line-height: 1;
	padding: 9px 16px;
	text-decoration: none;
	transition: opacity 160ms var(--mc-ease);
}

.mc-btn:hover {
	color: var(--mc-invert-ink);
	opacity: 0.85;
}

.mc-btn--ghost {
	background: transparent;
	border-color: var(--mc-line-strong);
	color: var(--mc-ink);
}

.mc-btn--ghost:hover {
	background: var(--mc-surface-2);
	border-color: var(--mc-ink-3);
	color: var(--mc-ink);
	opacity: 1;
}

.mc-btn svg {
	fill: currentColor;
	height: 14px;
	width: 14px;
}

/* Small pill tags */
.mc-tag {
	background: var(--mc-surface-3);
	border-radius: 999px;
	color: var(--mc-ink-2);
	display: inline-block;
	font-size: 11px;
	font-weight: 650;
	letter-spacing: 0.02em;
	line-height: 1;
	padding: 5px 9px;
	white-space: nowrap;
}

.mc-tag--solid {
	background: var(--mc-invert);
	color: var(--mc-invert-ink);
}

/* --------------------------------------------------------------------------
   Two-column layout (home)
   -------------------------------------------------------------------------- */

.mc-layout {
	align-items: start;
	display: grid;
	gap: 24px;
	grid-template-columns: minmax(0, 1fr) 300px;
}

.mc-layout > .mc-card,
.mc-layout > main > :last-child {
	margin-bottom: 0;
}

.mc-aside .mc-card {
	margin-bottom: 14px;
}

/* --------------------------------------------------------------------------
   Home: news list (rows like the forum's topic list)
   -------------------------------------------------------------------------- */

.mc-news {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mc-news__item {
	border-top: 1px solid var(--mc-line);
	padding: 16px 20px;
	transition: background-color 160ms var(--mc-ease);
}

.mc-news__item:first-child {
	border-top: 0;
}

.mc-news__item:hover {
	background: var(--mc-surface-2);
}

.mc-news__item h3 {
	font-size: 16px;
	font-weight: 650;
	margin: 0 0 4px;
}

.mc-news__item h3 a {
	text-decoration: none;
}

.mc-news__item h3 a:hover {
	text-decoration: underline;
}

.mc-news__meta {
	color: var(--mc-ink-3);
	font-size: 12px;
	margin: 0 0 6px;
}

.mc-news__item p {
	color: var(--mc-ink-2);
	font-size: 14px;
	margin: 0;
}

.mc-empty {
	color: var(--mc-ink-3);
	font-size: 14px;
	margin: 0;
	padding: 28px 20px;
	text-align: center;
}

/* Home: sidebar bits */
.mc-card--dark {
	background: #000;
	background: linear-gradient(160deg, #000 0%, #000 55%, #1c1c1c 100%);
	border-color: #262626;
	color: #fff;
}

.mc-card--dark h3 {
	color: #fff;
	font-size: 18px;
	font-weight: 750;
	letter-spacing: -0.02em;
}

.mc-card--dark p {
	color: #b8b8b8;
}

.mc-card--dark .mc-promo svg {
	display: block;
	fill: #fff;
	height: 44px;
	margin: 4px 0 14px;
	width: 44px;
}

.mc-card--dark .mc-btn {
	background: #fff;
	border-color: #fff;
	color: #111;
}

.mc-card--dark .mc-btn:focus-visible {
	outline-color: #fff;
}

.mc-promo {
	display: block;
	text-decoration: none;
}

.mc-promo img {
	border-radius: var(--mc-r-sm);
	display: block;
	margin: 0 0 12px;
	width: 100%;
}

.mc-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.mc-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mc-list li {
	border-top: 1px solid var(--mc-line);
	font-size: 14px;
	padding: 8px 0;
}

.mc-list li:first-child {
	border-top: 0;
	padding-top: 0;
}

.mc-list li:last-child {
	padding-bottom: 0;
}

.mc-list a {
	text-decoration: none;
}

.mc-list a:hover {
	text-decoration: underline;
}

.mc-comic {
	display: inline-block;
}

.mc-comic img {
	border-radius: 6px;
	display: block;
}

.mc-fb {
	min-height: 0;
	overflow: hidden;
}

/* --------------------------------------------------------------------------
   Prose pages (¿macacos?)
   -------------------------------------------------------------------------- */

.mc-lead {
	align-items: center;
	display: flex;
	gap: 22px;
}

.mc-lead svg {
	fill: var(--mc-ink);
	flex: none;
	height: 54px;
	width: 54px;
}

.mc-lead p {
	color: var(--mc-ink);
	font-size: 18px;
	font-weight: 500;
	letter-spacing: -0.01em;
	line-height: 1.45;
	margin: 0;
}

.mc-prose h2 {
	font-size: 17px;
	font-weight: 650;
	margin: 0 0 6px;
}

.mc-prose p {
	color: var(--mc-ink-2);
	font-size: 15px;
	margin: 0 0 12px;
	max-width: 68ch;
}

.mc-prose section + section {
	border-top: 1px solid var(--mc-line);
	margin-top: 18px;
	padding-top: 18px;
}

.mc-note {
	background: var(--mc-surface-2);
	border: 1px dashed var(--mc-line-strong);
	border-radius: var(--mc-r);
	color: var(--mc-ink-3);
	font-size: 13px;
	line-height: 1.55;
	margin: 0 0 18px;
	padding: 14px 18px;
}

/* --------------------------------------------------------------------------
   macacopolice
   -------------------------------------------------------------------------- */

.mc-search {
	display: flex;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
}

.mc-search input {
	background: var(--mc-surface);
	border: 1px solid var(--mc-line-strong);
	border-radius: 999px;
	color: var(--mc-ink);
	flex: 1 1 260px;
	font: inherit;
	font-size: 14px;
	height: 40px;
	padding: 0 16px;
	transition: border-color 160ms var(--mc-ease), box-shadow 160ms var(--mc-ease);
}

.mc-search input:hover {
	border-color: var(--mc-ink-3);
}

.mc-search input:focus {
	border-color: var(--mc-ink);
	box-shadow: 0 0 0 3px var(--mc-ring);
	outline: none;
}

.mc-search input::placeholder {
	color: var(--mc-ink-3);
	opacity: 1;
}

.mc-search output {
	color: var(--mc-ink-3);
	font-size: 13px;
	white-space: nowrap;
}

.mc-reports {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Year navigation: filter chips under the search */
.mc-years {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 12px;
}

.mc-years[hidden] {
	display: none;
}

.mc-years button {
	align-items: baseline;
	background: transparent;
	border: 1px solid var(--mc-line-strong);
	border-radius: 999px;
	color: var(--mc-ink-2);
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-size: 13px;
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	gap: 5px;
	line-height: 1;
	padding: 7px 11px;
	transition: background-color 160ms var(--mc-ease), border-color 160ms var(--mc-ease), color 160ms var(--mc-ease);
}

.mc-years button small {
	color: var(--mc-ink-3);
	font-size: 11px;
	font-weight: 500;
}

.mc-years button:hover {
	background: var(--mc-surface-2);
	border-color: var(--mc-ink-3);
	color: var(--mc-ink);
}

.mc-years button[aria-pressed="true"] {
	background: var(--mc-invert);
	border-color: var(--mc-invert);
	color: var(--mc-invert-ink);
}

.mc-years button[aria-pressed="true"] small {
	color: inherit;
	opacity: 0.7;
}

/* Year group heading inside the list */
.mc-year {
	align-items: baseline;
	background: var(--mc-surface-2);
	border-top: 1px solid var(--mc-line);
	display: flex;
	gap: 10px;
	padding: 10px 20px;
}

.mc-year:first-child {
	border-top: 0;
}

.mc-year[hidden] {
	display: none;
}

.mc-year h3 {
	font-size: 15px;
	font-variant-numeric: tabular-nums;
	font-weight: 750;
	letter-spacing: -0.01em;
	margin: 0;
}

.mc-year span {
	color: var(--mc-ink-3);
	font-size: 12px;
}

.mc-year + .mc-report {
	border-top-color: var(--mc-line);
}

.mc-report {
	border-top: 1px solid var(--mc-line);
	padding: 16px 20px 18px;
}

.mc-report:first-child {
	border-top: 0;
}

.mc-report[hidden] {
	display: none;
}

.mc-report__head {
	align-items: baseline;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 10px;
	margin: 0 0 10px;
}

.mc-report__head h3 {
	font-size: 16px;
	font-weight: 650;
	margin: 0;
}

.mc-report__head time {
	color: var(--mc-ink-3);
	font-size: 12px;
	margin-left: auto;
	white-space: nowrap;
}

.mc-report__tags {
	display: inline-flex;
	gap: 6px;
}

.mc-specs {
	display: grid;
	gap: 4px 16px;
	grid-template-columns: 170px minmax(0, 1fr);
	margin: 0 0 12px;
}

.mc-specs dt {
	color: var(--mc-ink-3);
	font-size: 13px;
}

.mc-specs dd {
	color: var(--mc-ink);
	font-size: 14px;
	margin: 0;
	overflow-wrap: anywhere;
}

.mc-specs code {
	font-size: 13px;
	letter-spacing: 0.02em;
}

.mc-report .mc-btn {
	font-size: 12px;
	padding: 7px 13px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.mc-footer {
	border-top: 1px solid var(--mc-line);
	color: var(--mc-ink-3);
	font-size: 13px;
	margin-top: 28px;
	padding: 16px 0 8px;
	text-align: center;
}

.mc-footer nav {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
	justify-content: center;
	margin: 0 0 12px;
}

.mc-footer a {
	color: var(--mc-ink-3);
	text-decoration: none;
}

.mc-footer a:hover {
	color: var(--mc-ink);
	text-decoration: underline;
}

.mc-footer p {
	font-size: 12px;
	margin: 0 0 4px;
}

.mc-footer .mc-credit a {
	color: var(--mc-ink-2);
	font-weight: 600;
}

/* --------------------------------------------------------------------------
   Small screens
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
	.mc-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.mc-aside {
		display: grid;
		gap: 14px;
		grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	}

	.mc-aside .mc-card {
		margin: 0;
	}
}

@media (max-width: 700px) {
	.wrap {
		padding: 0 12px 24px;
	}

	.mc-site__inner {
		gap: 10px;
		min-height: 54px;
		padding: 0 12px;
	}

	.mc-site__logo svg {
		height: 26px;
		width: 26px;
	}

	.mc-site__nav {
		font-size: 13px;
		gap: 0;
		-webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
		mask-image: linear-gradient(90deg, #000 85%, transparent);
		padding-right: 16px;
	}

	.mc-site__nav a {
		padding: 6px 9px;
	}

	.mc-hero {
		display: block;
		padding: 22px 0 14px;
	}

	.mc-hero p {
		font-size: 14px;
	}

	.mc-news__item,
	.mc-report {
		padding-left: 16px;
		padding-right: 16px;
	}

	.mc-card__body {
		padding: 16px;
	}

	.mc-lead {
		align-items: flex-start;
		gap: 14px;
	}

	.mc-lead svg {
		height: 40px;
		width: 40px;
	}

	.mc-lead p {
		font-size: 16px;
	}

	.mc-specs {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
	}

	.mc-specs dd {
		margin-bottom: 6px;
	}

	.mc-report__head time {
		margin-left: 0;
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation: none !important;
		transition: none !important;
	}
}

/* macacopolice year chips: one scrollable row on phones */
@media (max-width: 700px) {
	.mc-years {
		flex-wrap: nowrap;
		margin-left: -16px;
		margin-right: -16px;
		overflow-x: auto;
		padding: 0 16px 2px;
		scroll-padding: 0 16px;
		scrollbar-width: none;
	}

	.mc-years::-webkit-scrollbar { display: none; }

	.mc-years button {
		flex: none;
	}

	.mc-year {
		padding-left: 16px;
		padding-right: 16px;
	}
}
