/* The game's "Shelter issue" look (STYLE_GUIDE.md, client/ui/ui_style.gd): warm soot plate,
   bone text, hazard yellow for focus and selection, stencil red for stamps and danger, and manila
   paper with ink for the one thing a sleeper holds: the Pair Tag, which is the sign-up form. */
:root {
	--soot: #1c1a17;
	--soot-deep: #151310;
	--plate: #26231f;
	--seam: #3a362f;
	--bone: #e6dfd0;
	--bone-dim: #a8a090;
	--hazard: #e8b923;
	--red: #c8402f;
	--paper: #d9c69a;
	--paper-edge: #b29c68;
	--ink: #2a2318;
	--display: "Big Shoulders Stencil Display", Impact, sans-serif;
	--body: "Barlow Semi Condensed", "Arial Narrow", sans-serif;
	--gutter: clamp(16px, 4vw, 56px);
	--measure: 36em;
	color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
	margin: 0;
	background:
		radial-gradient(circle at 50% 50%, rgba(255,255,255,.05) 1.2px, transparent 1.6px) 0 0 / 28px 28px,
		var(--soot);
	color: var(--bone);
	font: 500 1.0625rem/1.55 var(--body);
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--display); font-weight: 900; line-height: .95; margin: 0; letter-spacing: .01em; }
p { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--hazard); color: var(--ink); padding: 8px 12px; z-index: 9; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--hazard); outline-offset: 3px; }

/* Header */
.top {
	position: sticky; top: 0; z-index: 5;
	display: flex; align-items: center; gap: clamp(16px, 3vw, 40px);
	padding: 12px var(--gutter);
	border-bottom: 1px solid var(--seam);
	background: rgba(21,19,16,.92);
	backdrop-filter: blur(8px);
}
.wordmark { font: 900 1.75rem/1 var(--display); letter-spacing: .05em; text-decoration: none; }
.top nav { display: flex; gap: clamp(14px, 2.4vw, 28px); margin-left: auto; }
.top .btn-small { flex: none; }

/* Buttons: hazard yellow is the one call to action, ghost for the second choice */
.btn {
	display: inline-flex; align-items: center; justify-content: center; min-height: 52px;
	padding: 12px 26px 10px; text-decoration: none;
	font: 700 1.45rem/1 var(--display); letter-spacing: .05em;
	background: var(--hazard); color: var(--ink);
	box-shadow: inset 0 -3px 0 rgba(0,0,0,.25);
}
.btn:hover { background: #f5c939; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--bone); box-shadow: inset 0 0 0 2px var(--bone-dim); }
.btn-ghost:hover { background: rgba(230,223,208,.08); box-shadow: inset 0 0 0 2px var(--bone); }
.btn-small { min-height: 40px; padding: 8px 16px 6px; font-size: 1.15rem; }
.top nav a { text-decoration: none; color: var(--bone-dim); font-weight: 600; padding: 4px 0; border-bottom: 2px solid transparent; }
.top nav a:hover { color: var(--bone); border-bottom-color: var(--seam); }

/* The door */
.door {
	position: relative; isolation: isolate;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
	gap: clamp(40px, 6vw, 96px);
	max-width: 1240px; margin: 0 auto;
	padding: clamp(40px, 7vw, 96px) var(--gutter) clamp(56px, 8vw, 120px);
	align-items: start;
}
/* The wasteland behind the headline, fading into the soot before the tag */
.door-bg {
	position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; object-position: 60% 60%;
	-webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
	mask-image: linear-gradient(180deg, #000 55%, transparent);
	opacity: .5;
}
.door::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(90deg, var(--soot) 8%, rgba(28,26,23,.55) 55%, rgba(28,26,23,.2));
}
@media (min-width: 1240px) { .door { max-width: none; padding-left: calc((100vw - 1240px) / 2 + var(--gutter)); padding-right: calc((100vw - 1240px) / 2 + var(--gutter)); } }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.meta { margin-top: 12px; color: var(--bone-dim); font-size: .95rem; }
.where { display: block; color: var(--bone-dim); font: 600 1.0625rem/1.4 var(--body); letter-spacing: 0; margin-bottom: 18px; }
h1 .big { display: block; font-size: clamp(3.2rem, 8vw, 7rem); line-height: .88; max-width: 8.5em; }
.hazard {
	width: 132px; height: 10px; margin: 32px 0;
	background: repeating-linear-gradient(-45deg, var(--hazard) 0 8px, transparent 8px 16px);
}
.lede { max-width: var(--measure); font-size: 1.2rem; text-shadow: 0 1px 12px var(--soot); }
.facts {
	list-style: none; margin: 36px 0 0; padding: 0;
	display: grid; grid-template-columns: repeat(2, minmax(0, 15em)); gap: 0 32px;
	color: var(--bone-dim);
}
.facts li { padding: 10px 0; border-top: 1px solid var(--seam); }
.facts strong { display: inline-block; min-width: 4.2em; color: var(--bone); font: 700 1.25rem/1 var(--display); letter-spacing: .03em; }

/* The Pair Tag on its ball chain */
.hanger { position: relative; padding-top: 72px; }
.chain {
	position: absolute; top: 0; left: 50%; width: 8px; height: 88px; margin-left: -4px;
	background: radial-gradient(circle, #8f887a 2.6px, transparent 3px) 0 0 / 8px 9px;
}
.tag {
	position: relative;
	background:
		radial-gradient(ellipse at 30% 20%, rgba(255,250,230,.25), transparent 60%),
		repeating-linear-gradient(0deg, rgba(42,35,24,.035) 0 2px, transparent 2px 6px),
		var(--paper);
	color: var(--ink);
	padding: 64px clamp(20px, 3vw, 36px) 32px;
	clip-path: polygon(16% 0, 84% 0, 100% 6%, 100% 100%, 0 100%, 0 6%);
	box-shadow: inset 0 0 0 1px var(--paper-edge), inset 0 -40px 60px -40px rgba(90,70,30,.35);
	transform-origin: 50% 0;
	transform: rotate(-1.4deg);
	animation: swing 1.6s cubic-bezier(.3,.6,.4,1) both;
	display: flex; flex-direction: column;
}
@keyframes swing {
	0% { transform: rotate(9deg); }
	30% { transform: rotate(-6deg); }
	55% { transform: rotate(3deg); }
	78% { transform: rotate(-2.4deg); }
	100% { transform: rotate(-1.4deg); }
}
.eyelet {
	position: absolute; top: 18px; left: 50%; width: 24px; height: 24px; margin-left: -12px;
	border-radius: 50%; background: var(--soot);
	box-shadow: 0 0 0 4px #9b8f73, 0 0 0 5px var(--paper-edge);
}
.tag h2 { font-size: 2.6rem; text-align: center; }
.tag-sub { text-align: center; margin: 6px 0 12px; font-size: .95rem; color: #5a4d36; }
.field { margin: 14px 0 0; padding: 0; border: 0; display: flex; flex-direction: column; }
.field label, .field legend { font-weight: 600; padding: 0; }
.opt { font-weight: 400; color: #5a4d36; }
.tag input[type=text], .tag input[type=email], .tag select {
	width: 100%; margin-top: 2px; padding: 6px 2px;
	font: 500 1.15rem var(--body); color: var(--ink);
	background: transparent; border: 0; border-bottom: 2px solid var(--ink); border-radius: 0;
}
.tag select { appearance: none; cursor: pointer;
	background: linear-gradient(45deg, transparent 50%, var(--ink) 50%) right 8px center / 8px 8px no-repeat; }
.tag input::placeholder { color: rgba(42,35,24,.4); }
.tag [aria-invalid=true] { border-bottom-color: var(--red); background: rgba(200,64,47,.08); }
.hint { font-size: .85rem; color: #5f5139; margin-top: 4px; }
.stamps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.stamp { cursor: pointer; position: relative; }
.stamp input { position: absolute; opacity: 0; }
.stamp span {
	display: block; text-align: center; padding: 11px 0 9px;
	font: 700 1.6rem/1 var(--display); letter-spacing: .08em;
	border: 2px dashed rgba(42,35,24,.5); color: #5f5139;
	transition: transform .14s, color .14s, border-color .14s;
}
.stamp:hover span { color: rgba(42,35,24,.75); }
.stamp input:checked + span { border: 3px double var(--red); color: var(--red); transform: rotate(-4deg); }
.stamp input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 22px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--ink); flex: none; }
.trap { position: absolute; left: -9999px; }
.tag button {
	margin-top: 24px; padding: 15px 14px 13px; cursor: pointer;
	font: 700 1.6rem/1 var(--display); letter-spacing: .05em;
	background: var(--ink); color: var(--paper); border: 0;
}
.tag button:hover { background: #000; }
.tag button:disabled { opacity: .6; cursor: progress; }
.tag :focus-visible { outline-color: var(--ink); }
.status:empty { min-height: 0; margin: 0; }
.status { min-height: 1.5em; margin-top: 12px; color: #8a2415; font-weight: 600; }

.tag-done { animation: none; gap: 12px; padding-bottom: 96px; }
.tag-done h2 { margin-bottom: 4px; }
.intake {
	position: absolute; bottom: 28px; right: 28px;
	font: 900 1.3rem/1 var(--display); letter-spacing: .12em; color: var(--red);
	border: 3px solid var(--red); padding: 6px 10px 4px; transform: rotate(12deg);
	opacity: .85; animation: slam .35s cubic-bezier(.2,1.6,.4,1) both;
}
@keyframes slam { from { transform: rotate(12deg) scale(2.4); opacity: 0; } }
.code {
	text-align: center; font: 900 clamp(2rem, 6vw, 2.8rem)/1 var(--display); letter-spacing: .1em;
	padding: 16px 0 12px; border: 3px solid var(--ink); user-select: all;
}
.tag .copy { margin-top: 0; font-size: 1.2rem; padding: 10px; background: transparent; color: var(--ink); border: 2px solid var(--ink); }
.tag .copy:hover { background: rgba(42,35,24,.08); }
.done-wave { text-align: center; font-weight: 600; }

/* Bands below the door: heading on the left, content on the right */
.band {
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 24px clamp(32px, 5vw, 80px);
	max-width: 1240px; margin: 0 auto; padding: clamp(48px, 6vw, 80px) var(--gutter);
	border-top: 1px solid var(--seam);
}
.band > h2 { font-size: clamp(2.2rem, 4vw, 3.2rem); }
.band > :not(h2) { grid-column: 2; }
.world-lead { max-width: var(--measure); font-size: 1.2rem; margin-bottom: 28px; }
.shot { margin: 0 0 28px; }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 7; object-fit: cover; box-shadow: inset 0 0 0 1px var(--seam); background: var(--plate); }
.shot figcaption { margin-top: 8px; color: var(--bone-dim); font-size: .9rem; }
.ledger { margin: 0; display: grid; gap: 0; }
.ledger div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--seam); max-width: 46em; }
.ledger dt { font: 700 1.3rem/1.2 var(--display); letter-spacing: .03em; }
.ledger dd { margin: 0; color: var(--bone-dim); }

/* Download */
.dl { display: grid; gap: 14px; max-width: 46em; }
.dl-main {
	display: grid; gap: 4px; padding: 22px 26px 20px; text-decoration: none;
	background: var(--hazard); color: var(--ink);
	box-shadow: inset 0 -4px 0 rgba(0,0,0,.25);
}
.dl-main:hover { background: #f5c939; }
.dl-name { font: 900 clamp(1.8rem, 4vw, 2.4rem)/1 var(--display); letter-spacing: .03em; }
.dl-file { font-weight: 600; }
.dl-help, .dl-alt { color: var(--bone-dim); }
.dl-help strong { color: var(--bone); }
.dl a:not(.dl-main) { color: var(--bone); text-underline-offset: 3px; }

.table-wrap { overflow-x: auto; }
.waves { border-collapse: collapse; width: 100%; min-width: 520px; background: var(--plate); box-shadow: inset 0 0 0 1px var(--seam); }
.waves th, .waves td { text-align: left; vertical-align: top; padding: 14px 18px; border-bottom: 1px solid var(--seam); }
.waves thead th { font: 900 1.9rem/1 var(--display); padding-top: 18px; }
.waves tbody th { font-weight: 600; color: var(--bone-dim); width: 9.5em; }
.waves tbody tr:last-child > * { border-bottom: 0; }
.aside { margin-top: 16px; color: var(--bone-dim); }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 0; }
.steps li { counter-increment: step; padding: 0 20px 0 0; border-left: 1px solid var(--seam); padding-left: 18px; }
.steps li::before { content: counter(step); display: block; font: 900 3.6rem/1 var(--display); color: var(--hazard); opacity: .85; margin-bottom: 10px; }
.steps h3 { font-size: 1.45rem; margin-bottom: 8px; }
.steps p { color: var(--bone-dim); }

.split > div:first-child { grid-column: 1 / span 1; }
.split { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.split > div { grid-column: auto !important; }
.split h2 { font-size: clamp(2.2rem, 4vw, 3.2rem); margin-bottom: 24px; }
.split .ledger div { grid-template-columns: 7rem minmax(0, 1fr); }
.promise { background: var(--plate); padding: 28px; box-shadow: inset 4px 0 0 var(--red), inset 0 0 0 1px var(--seam); align-self: start; }
.promise h2 { font-size: 2rem; margin-bottom: 14px; }
.promise p { color: var(--bone-dim); }

.faq { max-width: 46em; }
.faq details { border-top: 1px solid var(--seam); }
.faq details:last-child { border-bottom: 1px solid var(--seam); }
.faq summary { cursor: pointer; padding: 14px 32px 14px 0; font-weight: 600; font-size: 1.1rem; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 8px; font: 900 1.6rem/1 var(--display); color: var(--bone-dim); transition: transform .15s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 18px; color: var(--bone-dim); max-width: var(--measure); }

.foot { max-width: 1240px; margin: 0 auto; padding: 32px var(--gutter) 56px; border-top: 1px solid var(--seam); color: var(--bone-dim); font-size: .92rem; display: grid; gap: 10px; }
.foot p { max-width: 60em; }
.foot strong { color: var(--bone); }

@media (max-width: 900px) {
	.door { grid-template-columns: 1fr; }
	.hanger { max-width: 460px; width: 100%; margin: 0 auto; }
	.band, .split { grid-template-columns: 1fr; }
	.band > :not(h2) { grid-column: 1; }
	.steps { grid-template-columns: 1fr; row-gap: 28px; }
	.door-bg { -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent 70%); mask-image: linear-gradient(180deg, #000 20%, transparent 70%); }
	.door::before { background: linear-gradient(180deg, rgba(28,26,23,.4), var(--soot) 70%); }
}
@media (max-width: 520px) {
	.facts { grid-template-columns: 1fr; }
	.steps { grid-template-columns: 1fr; }
	.ledger div, .split .ledger div { grid-template-columns: 1fr; gap: 2px; }
	.tag { transform: none; animation: none; }
	html { scroll-padding-top: 120px; }
	.top { flex-wrap: wrap; row-gap: 8px; }
	.top nav { order: 3; width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; gap: 20px; }
	.top nav a { white-space: nowrap; }
	.top .btn-small { margin-left: auto; }
	.actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.tag, .intake { animation: none; }
	.stamp span, .faq summary::after { transition: none; }
}

/* Header sign-in link */
.signin { color: var(--bone); font-weight: 600; text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; flex: none; }
.signin:hover { border-bottom-color: var(--hazard); }
@media (max-width: 520px) { .top .signin { margin-left: auto; } .top .signin + .btn-small { margin-left: 0; } }

/* Account page: one plate in the middle of the soot */
.acct { max-width: 560px; margin: 0 auto; padding: clamp(32px, 7vw, 80px) var(--gutter) 64px; min-height: 62vh; }
.acct-loading { color: var(--bone-dim); }
.acct-card { background: var(--plate); box-shadow: inset 0 0 0 1px var(--seam); padding: clamp(24px, 5vw, 40px); }
.acct-card h1 { font-size: clamp(2.2rem, 6vw, 3rem); margin-bottom: 20px; }
.acct-card h1:focus { outline: none; }
.acct-card form { display: grid; gap: 16px; }
.acct-card form > p:first-child { color: var(--bone-dim); }
.acct-tabs { display: flex; gap: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--seam); }
.acct-tabs button {
	background: none; border: 0; padding: 8px 0 10px; margin-bottom: -1px; cursor: pointer;
	font: 600 1.15rem var(--body); color: var(--bone-dim); border-bottom: 3px solid transparent;
}
.acct-tabs [aria-selected=true] { color: var(--bone); border-bottom-color: var(--hazard); }
.acct-field { display: grid; gap: 6px; }
.acct-field label { font-weight: 600; }
.acct-field input {
	width: 100%; padding: 12px 14px; font: 500 1.1rem var(--body); color: var(--bone);
	background: var(--soot-deep); border: 1px solid var(--seam); border-radius: 0;
}
.acct-field input:focus-visible { outline: 3px solid var(--hazard); outline-offset: 0; border-color: transparent; }
.acct-field [aria-invalid=true] { border-color: var(--red); }
.acct-hint { font-size: .92rem; color: var(--bone-dim); }
.acct-card .btn { width: 100%; border: 0; cursor: pointer; }
.acct-card .btn:disabled { opacity: .6; cursor: progress; }
.acct-link { justify-self: start; background: none; border: 0; padding: 0; color: var(--bone); font: 500 1rem var(--body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.acct-status { color: #ff8a73; font-weight: 600; }
.acct-status:empty { display: none; }
.acct-kicker { color: var(--bone-dim); margin-bottom: 6px; }
.acct-me h1 { margin-bottom: 8px; word-break: break-word; }
.acct-tag { color: var(--bone-dim); }
.acct-share { color: var(--bone-dim); margin-bottom: 20px; }
.acct-warn { padding: 12px 14px; margin-bottom: 20px; background: rgba(232,185,35,.1); box-shadow: inset 3px 0 0 var(--hazard); }
.acct-me .ledger div { grid-template-columns: 6rem minmax(0, 1fr); }
.acct-more { margin: 24px 0 16px; border-top: 1px solid var(--seam); }
.acct-more summary { cursor: pointer; padding: 14px 0; font-weight: 600; }
.acct-more form { padding-bottom: 8px; }
.acct-h2 { font-size: 1.9rem; margin: 28px 0 10px; }
.acct-chars { display: grid; gap: 16px; }
.acct-char { background: var(--soot-deep); box-shadow: inset 0 0 0 1px var(--seam); padding: 18px 20px 6px; }
.acct-char header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.acct-char h3 { font-size: 1.6rem; }
.acct-level { font: 700 1.2rem/1 var(--display); color: var(--hazard); white-space: nowrap; }
.acct-title { color: var(--bone-dim); font-style: italic; margin-top: 4px; }
.acct-char .ledger { margin-top: 10px; }
.acct-char .ledger div { grid-template-columns: 6rem minmax(0, 1fr); }

/* Account page, wider screens: the profile and characters side by side */
@media (min-width: 900px) {
	.acct:has(#me:not([hidden])) { max-width: 1040px; }
	.acct-me { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 0 40px; align-items: start; }
	.acct-me > * { grid-column: 1; }
	.acct-me > .acct-h2, .acct-me > #me-none, .acct-me > .acct-chars { grid-column: 2; }
	.acct-me > .acct-h2 { grid-row: 1; margin-top: 0; }
	.acct-me > #me-none { grid-row: 2; }
	.acct-me > .acct-chars { grid-row: 2 / span 8; }
}
.acct-char { border-left: 3px solid var(--hazard); }
.acct-card .btn-ghost { margin-top: 8px; }
@media (prefers-reduced-motion: no-preference) {
	.acct-card { animation: plate-in .25s ease-out both; }
	@keyframes plate-in { from { opacity: 0; transform: translateY(6px); } }
}

/* Fonts served from scorvane.net (SIL Open Font License; see credits.html), so no visitor data goes to a font host */
@font-face { font-family: "Big Shoulders Stencil Display"; src: url("fonts/BigShouldersStencil-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("fonts/BarlowSemiCondensed-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("fonts/BarlowSemiCondensed-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("fonts/BarlowSemiCondensed-SemiBold.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }

/* Footer: policy links and business details on every page */
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 6px; }
.foot-links a { color: var(--bone); text-underline-offset: 3px; }
.foot a { color: var(--bone); }

/* Legal pages: one readable column */
.legal { max-width: 46rem; margin: 0 auto; padding: clamp(32px, 6vw, 72px) var(--gutter) 56px; }
.legal h1 { font-size: clamp(2.6rem, 7vw, 4rem); margin-bottom: 8px; }
.legal-updated { color: var(--bone-dim); margin-bottom: 28px; }
.legal h2 { font-size: clamp(1.7rem, 4vw, 2.1rem); margin: 36px 0 12px; }
.legal h3 { font-size: 1.35rem; margin: 22px 0 8px; }
.legal p, .legal li { line-height: 1.6; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 1.2em; display: grid; gap: 8px; }
.legal a { color: var(--bone); text-underline-offset: 3px; }
.legal-table { min-width: 560px; }
.legal-form { margin-top: 20px; padding: 18px; background: var(--plate); box-shadow: inset 0 0 0 1px var(--seam); display: grid; gap: 10px; }
.legal-form label { font-weight: 600; }
.legal-row { display: flex; flex-wrap: wrap; gap: 10px; }
.legal-row input { flex: 1 1 220px; padding: 10px 12px; font: 500 1.05rem var(--body); color: var(--bone); background: var(--soot-deep); border: 1px solid var(--seam); }
.legal-row input:focus-visible { outline: 3px solid var(--hazard); outline-offset: 0; }
.legal-row .btn { border: 0; cursor: pointer; }

/* The cookie notice: informs, never blocks the page */
.cookie-note {
	position: fixed; z-index: 20; left: 16px; right: 16px; bottom: 16px; margin: 0 auto; max-width: 720px;
	display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 18px;
	background: var(--plate); box-shadow: inset 0 0 0 1px var(--seam), 0 10px 30px rgba(0,0,0,.45);
}
.cookie-note p { flex: 1 1 300px; }
.cookie-note a { color: var(--bone); text-underline-offset: 3px; }
.cookie-note .btn { border: 0; cursor: pointer; }
.tag .check a { color: var(--ink); }

.acct-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.acct-check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--hazard); flex: none; }
.acct-check a { color: var(--bone); text-underline-offset: 3px; }
.acct-danger summary { color: #ff8a73; }
.btn-danger { background: #b23a26; color: #fff; }
.btn-danger:hover { background: #c9442e; }

.dl-needs { margin: 6px 0 4px; }
.steps { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 46em; }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.steps a, .meta a { color: var(--bone); text-underline-offset: 3px; }

.legal-lede { font-size: 1.2rem; color: var(--bone-dim); max-width: 38em; }
.meta a, .acct-warn a { color: var(--bone); text-underline-offset: 3px; }
.acct-warn p + .acct-link { margin-top: 8px; }
#me-tester a { color: var(--bone); text-underline-offset: 3px; }

/* Releases: a timeline of stencilled version numbers, newest first */
.rels { list-style: none; margin: 32px 0 0; padding: 0; }
.rel { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 0 28px; position: relative; padding-bottom: 40px; }
.rel::before { content: ""; position: absolute; left: calc(9.5rem + 13px); top: 10px; bottom: 0; width: 2px; background: var(--seam); }
.rel:last-child::before { bottom: 40px; }
.rel-body { position: relative; padding-left: 24px; }
.rel-body::before { content: ""; position: absolute; left: -20px; top: 12px; width: 12px; height: 12px; background: var(--soot); box-shadow: 0 0 0 2px var(--bone-dim); transform: rotate(45deg); }
.rel:first-child .rel-body::before { background: var(--hazard); box-shadow: 0 0 0 2px var(--hazard); }
.rel-head { text-align: right; }
.rel-ver { font: 900 clamp(2.4rem, 6vw, 3.4rem)/.9 var(--display); letter-spacing: .02em; }
.rel:not(:first-child) .rel-ver { color: var(--bone-dim); }
.rel-date { color: var(--bone-dim); margin-top: 6px; }
.rel-latest { display: inline-block; margin-top: 8px; padding: 3px 8px 1px; font: 700 1rem/1.2 var(--display); letter-spacing: .06em; color: var(--ink); background: var(--hazard); }
.legal .rel-sum { font-size: clamp(1.5rem, 3.6vw, 1.9rem); margin: 4px 0 10px; line-height: 1.05; }
.legal .rel h3 { font: 600 1rem/1.4 var(--body); color: var(--bone-dim); margin: 14px 0 6px; }
.rel ul { gap: 6px; }
.rel-get { margin-top: 18px; }
@media (max-width: 620px) {
	.rel { grid-template-columns: 1fr; padding-bottom: 32px; }
	.rel::before, .rel-body::before { display: none; }
	.rel-head { text-align: left; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
	.rel-body { padding-left: 0; border-left: 2px solid var(--seam); padding-left: 16px; }
	.rel:first-child .rel-body { border-left-color: var(--hazard); }
}

/* Admin desk: wide, dense, readable */
.desk { max-width: 1240px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) var(--gutter) 64px; min-height: 70vh; }
.desk-gate { max-width: 560px; margin: 0 auto; }
.desk-secret { font: 700 1.6rem/1.3 var(--display); letter-spacing: .12em; padding: 12px 14px; background: var(--soot-deep); box-shadow: inset 0 0 0 1px var(--seam); margin: 10px 0; word-break: break-all; }
.desk-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 12px; }
.desk-head h1 { font-size: clamp(2.2rem, 5vw, 3rem); }
.desk-who { color: var(--bone-dim); flex: 1; }
.desk-role { display: inline-block; margin-left: 6px; padding: 2px 8px 0; font: 700 .95rem/1.4 var(--display); letter-spacing: .05em; color: var(--ink); background: var(--hazard); }
.desk-head .btn { border: 0; cursor: pointer; }
.desk-tabs { flex-wrap: wrap; row-gap: 4px; }
.desk-pane { padding-top: 6px; }
.desk-search { display: flex; gap: 10px; margin-bottom: 16px; max-width: 560px; }
.desk-search input, .desk-act input, .desk-act select {
	flex: 1; min-width: 0; padding: 10px 12px; font: 500 1.05rem var(--body); color: var(--bone);
	background: var(--soot-deep); border: 1px solid var(--seam); border-radius: 0;
}
.desk-search input:focus-visible, .desk-act :is(input, select):focus-visible { outline: 3px solid var(--hazard); outline-offset: 0; }
.desk-search .btn, .desk-act .btn, .desk-actions .btn { border: 0; cursor: pointer; }
.desk-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.desk-split:has(.desk-card:not([hidden])) { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); }
.desk-table { width: 100%; border-collapse: collapse; background: var(--plate); box-shadow: inset 0 0 0 1px var(--seam); font-size: .98rem; }
.desk-table th, .desk-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--seam); }
.desk-table thead th { color: var(--bone-dim); font-weight: 600; font-size: .9rem; }
.desk-table tbody tr[tabindex] { cursor: pointer; }
.desk-table tbody tr[tabindex]:hover, .desk-table tbody tr[tabindex]:focus-visible { background: rgba(232,185,35,.08); outline: none; box-shadow: inset 3px 0 0 var(--hazard); }
.desk-sub { display: block; color: var(--bone-dim); font-size: .88rem; }
.desk-flags { color: #ff8a73; }
.desk-empty { color: var(--bone-dim); text-align: center; padding: 22px; }
.desk-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.desk-card { background: var(--plate); box-shadow: inset 0 0 0 1px var(--seam), inset 3px 0 0 var(--hazard); padding: 18px 20px; position: sticky; top: 90px; }
.desk-card h2 { font-size: 1.9rem; margin-bottom: 8px; word-break: break-word; }
.desk-card .ledger div { grid-template-columns: 6.5rem minmax(0, 1fr); padding: 8px 0; }
.desk-act { display: grid; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--seam); }
.desk-act h3 { font: 600 1rem var(--body); color: var(--bone-dim); }
.desk-act label { font-weight: 600; font-size: .92rem; }
.desk-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { background: transparent; color: var(--bone-dim); border: 1px solid var(--seam); padding: 6px 14px; font: 600 1rem var(--body); cursor: pointer; }
.chip[aria-pressed=true] { color: var(--ink); background: var(--hazard); border-color: var(--hazard); }
.desk-audit { list-style: none; margin: 0; padding: 0; max-width: 60em; }
.desk-audit li { display: grid; grid-template-columns: 9rem 10rem minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--seam); }
.desk-audit time { color: var(--bone-dim); }
.desk-verdict { font: 700 clamp(1.5rem, 3.6vw, 2rem)/1.1 var(--display); margin: 8px 0 18px; }
.desk-verdict.is-warn, .desk-gauge.is-warn .desk-num { color: #ff8a73; }
.desk-gauges { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.desk-gauge { background: var(--plate); box-shadow: inset 0 0 0 1px var(--seam); padding: 14px 16px 10px; }
.desk-gauge h3 { font: 600 .95rem var(--body); color: var(--bone-dim); }
.desk-num { font: 900 2.2rem/1.1 var(--display); margin: 2px 0 6px; }
.desk-spark { width: 100%; height: 48px; display: block; }
.desk-spark polyline { fill: none; stroke: var(--hazard); stroke-width: 2; vector-effect: non-scaling-stroke; }
.desk-gauge.is-warn .desk-spark polyline { stroke: #ff8a73; }
.desk-status { margin-top: 14px; }
.desk-gate a:not(.btn) { color: var(--bone); }
.signin-admin { color: var(--hazard); font-weight: 600; text-decoration: none; flex: none; }
@media (max-width: 900px) {
	.desk-split:has(.desk-card:not([hidden])) { grid-template-columns: 1fr; }
	.desk-card { position: static; }
	.desk-audit li { grid-template-columns: 1fr; gap: 2px; }
}

.desk-grace { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 14px; }
.desk-grace p { flex: 1 1 320px; }
.desk-grace .btn { border: 0; cursor: pointer; }

.desk-realms { display: grid; gap: 18px; }
.desk-realm { background: var(--plate); box-shadow: inset 0 0 0 1px var(--seam), inset 3px 0 0 #6fbf73; padding: 16px 18px; }
.desk-realm.is-off { box-shadow: inset 0 0 0 1px var(--seam), inset 3px 0 0 #ff8a73; }
.desk-realm header { margin-bottom: 10px; }
.desk-realm h2 { font-size: 1.8rem; }
.desk-realm .desk-table { background: var(--soot-deep); }
.desk-order { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }
.desk-order h3 { grid-column: 1 / -1; }
.desk-order label { grid-row: auto; }

.desk-stats { margin-bottom: 14px; }
.desk-trend .desk-spark { height: 90px; }
.desk-tool { max-width: 760px; margin-top: 0; margin-bottom: 18px; padding: 16px 18px; background: var(--plate); box-shadow: inset 0 0 0 1px var(--seam); border-top: 0; }
.desk-tool .desk-table { background: var(--soot-deep); }
