/* Decades - shared base. Every colour and face comes from the tokens
   each decade page sets on :root; nothing here names a hex or a font.
   Layout is the studio's .container / .row / .col shape (no CSS Grid
   for page layout), mobile first. Type floor 16px. Sentence case. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* The hidden attribute always wins. Any class that sets display (.check
   is flex, .btn is inline-flex) would otherwise override the browser's
   own [hidden] rule at equal specificity, and a hidden control stays
   on screen. Found on roughly80poems first, then here (2026-10-07). */
[hidden] { display: none !important; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--tx);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.6;
}

/* Links: coloured and underlined, plain `a` at normal specificity. Only
   .btn and .stretched-link drop the underline. */
a { color: var(--primary); text-decoration: underline; text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 0.15em; }

/* One global focus rule, one global reduced-motion rule. Every animation
   and transition on the site, including each decade's own in
   decades.css, is cancelled by this one rule. */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Motion. Short transitions on the things you press; slow, decorative
   loops that each decade picks from (decades.css), never on text people
   are reading, and nothing that moves content. */
.btn, .card, .tv-play, .pager a { transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, background-color 0.15s ease, color 0.15s ease; }
@keyframes drift-x { from { -webkit-mask-position: 0 0; mask-position: 0 0; } to { -webkit-mask-position: 80px 0; mask-position: 80px 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes flicker { 0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; } 20%, 24%, 55% { opacity: 0.55; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes jitter { 0%, 100% { transform: translateY(0); } 25% { transform: translateY(3px); } 50% { transform: translateY(-2px); } 75% { transform: translateY(4px); } }
@keyframes morph { 0%, 100% { border-radius: 45% 55% 60% 40% / 50% 40% 60% 50%; } 50% { border-radius: 60% 40% 45% 55% / 40% 60% 50% 50%; } }
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }

/* Layout */
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding-inline: 1rem; }
.row { display: flex; flex-wrap: wrap; margin-inline: -0.75rem; }
.col { padding-inline: 0.75rem; width: 100%; min-width: 0; }
@media (min-width: 768px) {
	.col-md-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
	.col-md-6 { flex: 0 0 50%; max-width: 50%; }
	.col-md-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
}
.section { padding-block: 2.5rem; }
@media (max-width: 480px) { .section { padding-block: 1.5rem; } }

/* Headings */
h1, h2, h3 { font-family: var(--font-display); font-weight: var(--display-weight, 400); line-height: 1.15; text-wrap: balance; margin: 0 0 0.5em; letter-spacing: var(--display-tracking, 0); }
h1 { font-size: clamp(2.5rem, 2rem + 3vw, 4.5rem); }
h2 { font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem); margin-top: 1.5em; }
h3 { font-size: 1.35rem; margin-top: 1.4em; }
h4 { font-size: 1.1rem; margin: 1.2em 0 0.4em; }
p, ul, ol { margin: 0 0 1.1em; max-width: 68ch; }
.lede { font-size: 1.25rem; max-width: 60ch; }
.muted { color: var(--tx-2); }
.kicker { font-family: var(--font-utility); color: var(--tx-2); margin: 0 0 0.5rem; }

/* Skip link */
.skip-link { position: absolute; top: -100%; left: 1rem; z-index: 10; background: var(--bg); color: var(--tx); padding: 0.6rem 1rem; border: 2px solid var(--primary); }
.skip-link:focus { top: 0.5rem; }

/* Header and the decade nav */
.site-header { border-bottom: var(--rule-width, 1px) solid var(--ui); padding-block: 1rem; }
.site-header .container { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1rem 2rem; }
.site-name { font-family: var(--font-display); font-size: 1.5rem; text-decoration: none; color: var(--tx); }
.decade-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.decade-nav a { color: var(--tx); min-height: 24px; display: inline-flex; align-items: center; }
.decade-nav a[aria-current] { color: var(--primary); font-weight: 700; text-decoration: none; }

/* Page nav (within the design page) */
.page-nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; padding: 0; margin: 0 0 1rem; list-style: none; }

/* Buttons - pills or square by token; 24px minimum target */
.btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 44px; padding: 0.55rem 1.25rem;
	font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
	border-radius: var(--radius-btn);
	border: 2px solid var(--primary); background: transparent; color: var(--primary);
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn:hover { filter: brightness(0.92); }
.btn-group { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

/* Cards, panels, tags */
.card { position: relative; border: var(--rule-width, 1px) solid var(--ui); border-radius: var(--radius); background: var(--bg); padding: 1.25rem; height: 100%; box-shadow: var(--shadow, none); }
.card h3 { margin-top: 0; font-size: 1.25rem; }
.card p { margin-bottom: 0; }
.stretched-link { text-decoration: none; color: var(--tx); }
.stretched-link::after { content: ""; position: absolute; inset: 0; }
.card:hover h3 a, .card:focus-within h3 a { text-decoration: underline; color: var(--primary); }
.card-row { row-gap: 1.5rem; }
.panel { border: var(--rule-width, 1px) solid var(--ui); border-radius: var(--radius); background: var(--bg-2); padding: 1.25rem; }
.panel > :last-child { margin-bottom: 0; }
.tag { display: inline-block; font-family: var(--font-utility); font-size: 1rem; padding: 0.15rem 0.7rem; border-radius: var(--radius-btn); background: var(--bg-2); color: var(--tx); border: 1px solid var(--ui); }

blockquote { margin: 1.5rem 0; padding: 1rem 1.25rem; border-left: 6px solid var(--accent); background: var(--bg-2); border-radius: 0 var(--radius) var(--radius) 0; max-width: 68ch; }
blockquote p { margin-bottom: 0.5em; }
blockquote cite { font-style: normal; color: var(--tx-2); }
blockquote cite::before { content: "\2014  "; }

/* Tables */
.table-wrap { overflow-x: auto; margin-bottom: 1.5rem; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--ui); vertical-align: top; }
th { font-family: var(--font-utility); font-weight: 700; }
.swatch { display: inline-block; width: 2.25rem; height: 2.25rem; border-radius: var(--radius-btn); border: 1px solid var(--ui); vertical-align: middle; margin-right: 0.5rem; }
code { font-family: var(--font-utility); font-size: 1rem; background: var(--bg-2); padding: 0.05em 0.35em; border-radius: 4px; }

/* Disclosure */
details { border: var(--rule-width, 1px) solid var(--ui); border-radius: var(--radius); padding: 0.75rem 1.25rem; margin-bottom: 1rem; background: var(--bg); }
summary { cursor: pointer; font-weight: 700; min-height: 24px; }
details[open] summary { margin-bottom: 0.5rem; }

/* Forms - labels above, hints below, errors by the field */
.field { margin-bottom: 1.25rem; max-width: 36rem; }
.field label, .field legend { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.hint { display: block; color: var(--tx-2); margin-bottom: 0.4rem; }
.field input[type="text"], .field input[type="email"], .field select, .field textarea {
	display: block; width: 100%; font: inherit; padding: 0.6rem 0.75rem;
	border: 2px solid var(--ui-strong); border-radius: var(--radius-btn); background: var(--bg); color: var(--tx);
}
.field-error input { border-color: var(--danger); }
.error-text { color: var(--danger); font-weight: 700; display: block; margin-top: 0.3rem; }
.check { display: flex; align-items: flex-start; gap: 0.6rem; font-weight: 400; }
.check input { width: 1.5rem; height: 1.5rem; margin: 0.1rem 0 0; flex: none; accent-color: var(--primary); }
.error-summary { border: 3px solid var(--danger); padding: 1rem 1.25rem; margin-bottom: 1.5rem; border-radius: var(--radius); max-width: 36rem; }
.error-summary h3 { margin-top: 0; }
.error-summary ul { margin-bottom: 0; }

/* Type specimen */
.specimen { border-top: 1px solid var(--ui); padding-block: 1rem; }
.specimen-display { font-family: var(--font-display); font-size: clamp(2.5rem, 2rem + 4vw, 5rem); line-height: 1.05; margin: 0 0 0.5rem; letter-spacing: var(--display-tracking, 0); font-weight: var(--display-weight, 400); }
.specimen-body { font-size: 1.25rem; max-width: 60ch; }
.specimen-utility { font-family: var(--font-utility); }
.scale { list-style: none; padding: 0; margin: 0; }
.scale li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1rem; padding-block: 0.5rem; border-bottom: 1px solid var(--ui); }
.scale .size { font-family: var(--font-utility); color: var(--tx-2); min-width: 7rem; }

/* Article (the decade's own Wikipedia text) */
.article h2 { margin-top: 2em; }
.article h2:first-child { margin-top: 0; }
.article-meta { color: var(--tx-2); }

/* Television. The same markup every decade: a cabinet holding a
   screen (ident text plus a play link) and a column of controls, then
   a stand. decades.css sets the --tv-* tokens and any extra trim per
   decade; nothing here knows which decade it is. The translucent
   black and white here are glass, shadow and highlight, not colour. */
.tv { margin: 1.5rem 0 2rem; max-width: 40rem; }
.tv-cabinet {
	position: relative;
	display: flex; gap: 4%; align-items: stretch;
	padding: var(--tv-bezel, 5%);
	background: var(--tv-cabinet, var(--bg-2));
	border-radius: var(--tv-radius, 1rem);
	box-shadow: var(--tv-shadow, none);
}
.tv-screen {
	position: relative; flex: 1 1 auto; min-width: 0;
	aspect-ratio: var(--tv-aspect, 4 / 3);
	background: var(--tv-screen, var(--tx));
	border-radius: var(--tv-screen-radius, 6% / 8%);
	overflow: hidden;
	box-shadow: var(--tv-screen-shadow, inset 0 0 0 2px rgba(0, 0, 0, 0.6));
}
.tv-screen::before { content: ""; position: absolute; inset: 0; background: var(--tv-glass, none); pointer-events: none; z-index: 2; }
.tv-screen::after { content: ""; position: absolute; inset: 0; background: var(--tv-scanlines, none); pointer-events: none; z-index: 2; }
.tv-ident {
	position: absolute; inset: 0; z-index: 1;
	display: flex; flex-direction: column; justify-content: flex-end; gap: 0.25rem;
	padding: 6% 7%;
	color: var(--tv-ident-tx, var(--bg));
	background: var(--tv-ident-bg, none);
	font-family: var(--tv-ident-font, var(--font-display));
}
.tv-ident-title { font-size: clamp(1.1rem, 0.8rem + 1.6vw, 1.75rem); line-height: 1.1; font-weight: var(--display-weight, 400); text-wrap: balance; letter-spacing: var(--display-tracking, 0); }
.tv-ident-sub { font-family: var(--font-utility); font-size: 1rem; }
.tv-play {
	position: absolute; left: 50%; top: 42%; z-index: 3;
	transform: translate(-50%, -50%);
	display: inline-flex; align-items: center; gap: 0.6rem;
	min-height: 44px; padding: 0.55rem 1.1rem 0.55rem 0.9rem;
	font-weight: 700; text-decoration: none; white-space: nowrap;
	border-radius: var(--radius-btn);
	background: var(--tv-play-bg, var(--accent));
	color: var(--tv-play-tx, var(--accent-ink));
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
.tv-play::before { content: ""; width: 0; height: 0; border-style: solid; border-width: 0.5rem 0 0.5rem 0.85rem; border-color: transparent transparent transparent currentColor; }
.tv-play:hover, .tv-play:focus-visible { transform: translate(-50%, -50%) scale(1.05); }
.tv-controls {
	flex: 0 0 var(--tv-controls-width, 13%);
	display: var(--tv-controls-display, flex);
	flex-direction: column; justify-content: center; align-items: center; gap: 10%;
}
.tv-knob {
	width: 70%; aspect-ratio: 1; position: relative;
	border-radius: var(--tv-knob-radius, 50%);
	background: var(--tv-knob, var(--ui));
	box-shadow: var(--tv-knob-shadow, inset 0 -2px 4px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.4));
}
.tv-knob::after { content: ""; position: absolute; left: 50%; top: 10%; width: 8%; height: 34%; transform: translateX(-50%); background: rgba(0, 0, 0, 0.55); border-radius: 2px; }
.tv-grille { width: 80%; flex: 1 1 auto; max-height: 40%; border-radius: 4px; background: var(--tv-grille, repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.35) 0 2px, transparent 2px 6px)); }
.tv-stand {
	display: var(--tv-stand-display, block);
	width: var(--tv-stand-width, 30%);
	height: var(--tv-stand-height, 1rem);
	margin: 0 auto;
	background: var(--tv-stand, var(--tv-cabinet, var(--bg-2)));
	border-radius: 0 0 0.5rem 0.5rem;
	clip-path: var(--tv-stand-clip, none);
}
.tv figcaption { color: var(--tx-2); margin-top: 0.75rem; }

/* Three-colour line. Three spans, one per token (primary, accent,
   decor); each decade decides the shape with a mask (a wave, a
   zigzag, a swoosh, dashes) and the offsets. With no mask set, the
   three sit side by side as flat bars, which is the neutral look. */
.rule3 { position: relative; display: block; height: var(--rule-height, 0.6rem); margin: 0 0 1.5rem; }
.rule3 span {
	position: absolute; top: 0; left: 0; height: var(--rule-span-height, 100%); width: 100%;
	-webkit-mask-image: var(--rule-mask, none); mask-image: var(--rule-mask, none);
	-webkit-mask-size: var(--rule-mask-size, auto); mask-size: var(--rule-mask-size, auto);
	-webkit-mask-repeat: var(--rule-mask-repeat, repeat-x); mask-repeat: var(--rule-mask-repeat, repeat-x);
	border-radius: var(--rule-radius, 0);
}
.rule3 span:nth-child(1) { background: var(--primary); }
.rule3 span:nth-child(2) { background: var(--accent); transform: translate(var(--rule-shift-2, 0, 0)); }
.rule3 span:nth-child(3) { background: var(--decor); transform: translate(var(--rule-shift-3, 0, 0)); }
/* Neutral default: flat bars side by side. */
.rule3 span { width: var(--rule-span-width, 32%); }
.rule3 span:nth-child(2) { left: var(--rule-left-2, 34%); }
.rule3 span:nth-child(3) { left: var(--rule-left-3, 68%); }

/* Decorative shapes. Three spans behind a hero, kept to the right and
   the corners so they never sit under the text column. Each decade
   gives them their shape, colour and place; a page with no decade
   shows none. Quieter on a phone, where the text takes the width. */
.hero { position: relative; overflow: hidden; }
.hero > .container { position: relative; z-index: 1; }
/* The opening's heading and lede stop short of the shapes on the right,
   so a long title wraps instead of running across them. */
@media (min-width: 768px) { .hero h1, .hero .lede, .hero .song-artist { max-width: 60%; } }
/* Anchored to the container's width, not the viewport, so "right: 6rem"
   means the same place on every screen; the hero clips the overflow.
   The text column is at most 68ch, so the right third stays free. */
.deco { position: absolute; top: 0; bottom: 0; left: 50%; width: min(100%, 1100px); transform: translateX(-50%); pointer-events: none; z-index: 0; }
.deco span { position: absolute; display: none; }
[data-decade] .deco span { display: block; }
@media (max-width: 767px) { .deco { opacity: 0.4; } }
.deco-demo { position: relative; height: 18rem; overflow: hidden; border: var(--rule-width, 1px) solid var(--ui); border-radius: var(--radius); margin-bottom: 1.5rem; }

/* Footer */
.site-footer { border-top: var(--rule-width, 1px) solid var(--ui); padding-block: 3rem; margin-top: 2rem; color: var(--tx-2); }
.site-footer p { max-width: none; }
