/* Layout: a single-column "shipping manifest" — grouped link rows with port-code tags, sticky search and section chips */
:root {
  --bg: #eef2f5;
  --surface: #ffffff;
  --ink: #0f1d2b;
  --muted: #5b6b7a;
  --line: #d5dde4;
  --accent: #c8102e;
  --accent-soft: #fbe7ea;
  --harbour: #17344f;
  --chip: #e2e9ef;
  --beam: #e8a400;
  --octo: #f050f8;
  --octo-ink: #100030;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b141d; --surface: #13202c; --ink: #e7eef4; --muted: #93a4b4;
    --line: #22344a; --accent: #ff4d5e; --accent-soft: #3a1820; --harbour: #8fb7da; --chip: #1c2d3d; --beam: #ffd34d;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b141d; --surface: #13202c; --ink: #e7eef4; --muted: #93a4b4;
  --line: #22344a; --accent: #ff4d5e; --accent-soft: #3a1820; --harbour: #8fb7da; --chip: #1c2d3d; --beam: #ffd34d;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5; }
.wrap { max-width: 640px; margin: 0 auto; padding-inline: 16px; padding-block: 28px 48px; }

header { display: grid; gap: 10px; padding-block-end: 18px; }
.eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 9vw, 3.4rem); line-height: .95; margin: 0; letter-spacing: .01em; text-transform: uppercase; text-wrap: balance; }
.lede { margin: 0; color: var(--muted); max-width: 52ch; }

.toolbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); padding-block: 10px; display: grid; gap: 10px; border-bottom: 1px solid var(--line); }
.search { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.search:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chips a { flex: none; font-family: var(--font-mono); font-size: 12px; text-decoration: none; color: var(--ink); background: var(--chip); border-radius: 999px; padding: 5px 11px; }
.chips a:hover, .chips a:focus-visible { background: var(--harbour); color: var(--bg); outline: none; }

section { padding-block-start: 26px; scroll-margin-top: 110px; }
section h2 { display: flex; align-items: baseline; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.45rem; text-transform: uppercase; letter-spacing: .03em; margin: 0 0 4px; color: var(--harbour); }
section h2 .count { font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: .05em; }
section > p { margin: 0 0 10px; color: var(--muted); font-size: 13.5px; }

ul.links { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
ul.links li + li { border-top: 1px solid var(--line); }
ul.links a { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; color: inherit; text-decoration: none; }
ul.links a:hover { background: var(--chip); }
ul.links a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.code { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: var(--harbour); border: 1px solid var(--line); border-radius: 4px; text-align: center; padding: 3px 0; }
.txt { min-width: 0; }
.txt strong { display: block; font-weight: 600; }
.txt span { display: block; color: var(--muted); font-size: 13px; }
.host { font-family: var(--font-mono); font-size: 11px; color: var(--muted); white-space: nowrap; }
.arrow { color: var(--accent); }
@media (max-width: 460px) { .host-name { display: none; } }

.guide { padding-block: 4px 22px; display: grid; gap: 10px; }
.guide-title { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; line-height: 1.05; text-wrap: balance; text-transform: uppercase; letter-spacing: .03em; margin: 0; color: var(--harbour); }
.guide-lede { margin: 0; color: var(--muted); font-size: 13.5px; }
.voyage { list-style: none; margin: 4px 0 6px; padding: 0 0 0 18px; border-left: 2px dashed var(--harbour); display: grid; gap: 12px; }
.voyage li { position: relative; display: grid; gap: 1px; }
.voyage li::before { content: ""; position: absolute; left: -25px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--harbour); }
.voyage li:last-child::before { background: var(--accent); border-color: var(--accent); }
.stop { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--harbour); }
.what { font-size: 14px; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
summary { cursor: pointer; font-weight: 600; padding: 12px 14px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--font-mono); color: var(--accent); }
details[open] summary::after { content: "–"; }
summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 10px; }
.det { padding: 0 14px 14px; display: grid; gap: 10px; font-size: 14px; max-width: 65ch; }
.det p, .det ul { margin: 0; }
.det ul { padding-left: 18px; display: grid; gap: 6px; }
.det a { color: var(--accent); }
.route { border-collapse: collapse; width: 100%; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.route th, .route td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.route th { font-family: var(--font-mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.route td:last-child, .route th:last-child { text-align: right; white-space: nowrap; }
#legends { margin-top: 26px; scroll-margin-top: 110px; }
#guide, #faqs { scroll-margin-top: 110px; }
.legend { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 8px; }
.legend p { margin: 0; font-size: 14px; }
.legend details { border: 0; border-top: 1px solid var(--line); border-radius: 0; margin-inline: -14px; margin-bottom: -14px; }
.legend-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.handle { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: .02em; }
.status { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--chip); padding: 2px 8px; border-radius: 999px; }
.status.on { color: var(--accent); background: var(--accent-soft); }
.legend-link { color: var(--accent); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.legend-link:hover { text-decoration: underline; }
.sub { font-family: var(--font-mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 16px 0 8px; }
.routine { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.routine li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; font-size: 14px; }
.routine .tick { width: 16px; height: 16px; margin-top: 3px; border: 2px solid var(--harbour); border-radius: 4px; }
.routine a { color: var(--accent); }
.fun { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 8px; }
.fun a { height: 100%; display: grid; align-content: start; gap: 3px; padding: 11px 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: inherit; text-decoration: none; }
.fun a:hover { border-color: var(--harbour); }
.fun a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.fun strong { font-weight: 600; }
.fun span { color: var(--muted); font-size: 13px; }
.fun .tag { justify-self: start; margin-top: 4px; font-style: normal; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--harbour); background: var(--chip); padding: 2px 7px; border-radius: 999px; }
.fun .tag.ev { color: var(--accent); background: var(--accent-soft); }
.empty { display: none; padding: 30px 0; color: var(--muted); text-align: center; }

.contact { margin-top: 30px; display: grid; gap: 8px; padding: 16px; border: 1px dashed var(--line); border-radius: 10px; }
.contact h2 { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; font-size: 1.2rem; margin: 0; color: var(--harbour); }
.contact p { margin: 0; color: var(--muted); font-size: 13.5px; }
.mailrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mail { font-family: var(--font-mono); font-size: 13px; user-select: all; background: var(--chip); padding: 6px 10px; border-radius: 6px; overflow-wrap: anywhere; }
button { font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: #fff; background: var(--accent); border: 0; border-radius: 6px; padding: 7px 14px; }
button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.fb { display: grid; gap: 12px; margin-top: 4px; }
.field { display: grid; gap: 4px; }
.field label { font-size: 13px; font-weight: 600; }
.opt { font-weight: 400; color: var(--muted); font-size: 12px; }
.fb input, .fb select, .fb textarea { width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
.fb textarea { resize: vertical; min-height: 90px; }
.fb input:focus, .fb select:focus, .fb textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions button { padding: 10px 16px; font-size: 14px; }
button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.err { margin: 0; color: var(--accent); font-size: 13px; font-weight: 600; }
.hint { margin: 0; font-size: 12.5px; color: var(--muted); }
.contact { scroll-margin-top: 110px; }
footer { margin-top: 28px; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* New-visitor banner and guide page */
.newhere { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; align-items: center; background: var(--harbour); color: var(--bg); border-radius: 10px; padding: 14px 16px; text-decoration: none; }
.newhere strong { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; line-height: 1.1; text-transform: uppercase; letter-spacing: .03em; }
.newhere span { grid-column: 1; font-size: 13.5px; opacity: .9; }
.newhere .go { grid-column: 2; grid-row: 1 / span 2; font-family: var(--font-mono); font-size: 13px; white-space: nowrap; }
.newhere:hover .go { text-decoration: underline; }
.newhere:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chips a.chip-guide { background: var(--accent-soft); color: var(--accent); }
.back { font-family: var(--font-mono); font-size: 12px; color: var(--accent); text-decoration: none; justify-self: start; }
.back:hover { text-decoration: underline; }
.cta { margin-top: 26px; display: grid; gap: 8px; justify-items: start; padding: 16px; border: 1px dashed var(--line); border-radius: 10px; }
.cta p { margin: 0; color: var(--muted); font-size: 14px; }
.btn { display: inline-block; font-weight: 600; font-size: 14px; color: #fff; background: var(--accent); border-radius: 6px; padding: 10px 16px; text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Share and Add to Home Screen */
.actbar { display: flex; flex-wrap: wrap; gap: 8px; }
.act { flex: 1 1 0; min-width: max-content; justify-content: center; display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 9px 12px; cursor: pointer; }
.act svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.act:hover { border-color: var(--harbour); }
.act:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.howto { margin: 0; font-size: 13.5px; background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; }
.howto kbd { font-family: var(--font-mono); font-size: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.ios-share { display: inline-block; width: 15px; height: 15px; vertical-align: -2px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v12M7 8l5-5 5 5M5 13v6a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v12M7 8l5-5 5 5M5 13v6a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }

/* Click counts */
.hits { font-family: var(--font-mono); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hits:not(:empty) { margin-right: 6px; }
.host .hits:not(:empty) + .arrow { margin-left: 0; }
.fun .hits:empty { display: none; }
.fun .hits { justify-self: start; margin-top: 2px; }
@media (max-width: 460px) { .host { display: inline-flex; align-items: baseline; } }

/* Loading, popular row, feedback states */
.loading { color: var(--muted); padding: 26px 0; margin: 0; }
.popular { padding-block-start: 18px; }
.popular.searching { display: none; }
.popular .sub { margin-top: 0; }
.pop-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; counter-reset: pop; }
.pop-list li { flex: none; counter-increment: pop; }
.pop-list a { display: grid; gap: 2px; min-width: 150px; max-width: 220px; padding: 10px 12px 10px 34px; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: inherit; text-decoration: none; }
.pop-list a::before { content: counter(pop); position: absolute; left: 12px; top: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; line-height: 1; color: var(--accent); }
.pop-list a:hover { border-color: var(--harbour); }
.pop-list a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pop-list strong { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop-n { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.btn-ghost { display: inline-flex; align-items: center; font-size: 14px; font-weight: 600; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 10px 16px; text-decoration: none; }
.btn-ghost:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
button:disabled { opacity: .6; cursor: progress; }
.ok { margin: 0; color: var(--harbour); font-weight: 600; font-size: 14px; }

/* Admin access */
.admin-link { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); text-decoration: none; font-family: var(--font-mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; }
.admin-link:hover { color: var(--ink); border-color: var(--harbour); }
.admin-link svg, .admin-pill svg { width: 13px; height: 13px; flex: none; }
.admin-link:focus-visible, .admin-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { position: relative; }
.admin-pill { position: absolute; top: 20px; right: 72px; z-index: 6; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--bg); background: var(--harbour); text-decoration: none; border-radius: 999px; padding: 7px 13px; }

/* Collapsible card lists */
details.fold { background: transparent; border: 0; border-radius: 0; margin-top: 16px; }
details.fold > summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-weight: 600; }
details.fold > summary::after { content: "Show"; margin-left: auto; font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--accent); }
details.fold[open] > summary::after { content: "Hide"; }
details.fold > summary:hover { border-color: var(--harbour); }
.fold-n { font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--muted); background: var(--chip); border-radius: 999px; padding: 2px 8px; }
details.fold[open] > ul.fun { margin-top: 8px; }

/* Collapsible main sections */
section.fsec { padding-block-start: 10px; }
section.fsec:first-child { padding-block-start: 18px; }
h2.fsec-head { margin: 0; display: block; }
.fsec-btn { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; font: inherit; font-size: 1.3rem; line-height: 1.1; text-transform: inherit; letter-spacing: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; cursor: pointer; }
.fsec-btn:hover { border-color: var(--harbour); }
.fsec-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fsec-title { min-width: 0; flex: 1; }
.fsec-btn .count { white-space: nowrap; text-transform: none; }
.fsec-btn .chev { flex: none; align-self: center; width: 9px; height: 9px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s ease; }
.fsec.open .fsec-btn { border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; }
.fsec.open .fsec-btn .chev { transform: rotate(-135deg) translate(-2px, -2px); }
.fsec-body { padding-block: 10px 6px; }
.fsec-body > p { margin: 0 0 10px; color: var(--muted); font-size: 13.5px; }
#legends.fsec .fsec-btn { font-size: 1.3rem; }
#legends.fsec .fsec-body { display: grid; gap: 10px; }
#legends.fsec .fsec-body[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .fsec-btn .chev { transition: none; } }

/* Feedback folds like the other sections */
.contact.fsec { display: block; border: 0; padding: 0; margin-top: 10px; }
.contact.fsec h2.fsec-head { margin: 0; }
.contact.fsec .fsec-body { display: grid; gap: 8px; padding-block: 12px 4px; }
.contact.fsec .fsec-body[hidden] { display: none; }

/* Section heading icons */
.sec-icon { width: 20px; height: 20px; color: var(--accent); vertical-align: -3px; margin-right: 8px; flex: none; }

/* Light/dark toggle: a headlight that switches on for dark mode */
.theme-toggle { position: absolute; top: 16px; right: 16px; z-index: 7; width: 46px; height: 40px; padding: 0; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; color: var(--muted); }
.theme-toggle svg { width: 32px; height: 24px; overflow: visible; }
.theme-toggle .lamp { fill: none; stroke: currentColor; transition: fill .2s ease, stroke .2s ease; }
.theme-toggle .beams { stroke: currentColor; opacity: .35; transition: opacity .2s ease, stroke .2s ease; }
.theme-toggle.on { color: var(--beam); border-color: var(--beam); box-shadow: 0 0 0 3px color-mix(in srgb, var(--beam) 18%, transparent); }
.theme-toggle.on .lamp { fill: var(--beam); stroke: var(--beam); }
.theme-toggle.on .beams { opacity: 1; filter: drop-shadow(0 0 3px var(--beam)); }
.theme-toggle:hover { border-color: var(--harbour); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
header > .eyebrow, header > h1 { padding-right: 58px; }
@media (prefers-reduced-motion: reduce) { .theme-toggle .lamp, .theme-toggle .beams { transition: none; } }

/* Wait Club mood ticker */
.mood { margin-block: 14px 4px; }
.mood-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mood-label { display: grid; place-items: center; padding: 0 10px; font-family: var(--font-mono); font-size: 10px; line-height: 1.25; letter-spacing: .08em; text-transform: uppercase; text-align: center; color: var(--bg); background: var(--accent); }
.mood-viewport { overflow: hidden; position: relative; cursor: pointer; mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent); }
.mood-track { display: flex; width: max-content; white-space: nowrap; padding: 11px 0; font-size: 14px; }
.mood-track.run { animation: mood-scroll var(--mood-dur, 30s) linear infinite; }
.mood-track.paused { animation-play-state: paused; }
.mood-viewport:hover .mood-track { animation-play-state: paused; }
@keyframes mood-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.mood-run { display: inline-flex; }
.mood-item { display: inline-flex; align-items: baseline; gap: 6px; padding: 0 22px 0 14px; position: relative; }
.mood-item::after { content: ""; position: absolute; right: 0; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: var(--line); transform: translateY(-50%); }
.mood-emoji { font-size: 16px; }
.mood-item em { font-style: normal; font-weight: 600; color: var(--harbour); }
.mood-text { color: var(--ink); }
.mood-ago { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.mood-empty { padding: 0 14px; color: var(--muted); white-space: normal; }
.mood-add { border-radius: 0; padding: 0 14px; font-size: 13px; white-space: nowrap; }
.mood-form { margin-top: 8px; display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.mood-intro { margin: 0; font-size: 14px; color: var(--muted); }
.mood-form .field input { width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
.mood-form .field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.mood-form .field label { font-size: 13px; font-weight: 600; }
.mood-pick { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.mood-pick legend { font-size: 13px; font-weight: 600; padding: 0; margin-bottom: 6px; }
.mood-options { display: flex; flex-wrap: wrap; gap: 6px; }
.mood-opt input { position: absolute; opacity: 0; pointer-events: none; }
.mood-opt span { display: inline-block; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-size: 14px; cursor: pointer; }
.mood-opt input:checked + span { background: var(--harbour); color: var(--bg); border-color: var(--harbour); }
.mood-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.mood-form .actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) {
  .mood-track.run { animation: none; }
  .mood-viewport { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .mood-run[aria-hidden="true"] { display: none; }
}

/* Top bar: Edit links (admins), Not ordered yet?, headlight toggle */
.topbar { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: -10px; margin-bottom: 8px; flex-wrap: wrap; }
.topbar .admin-pill, .topbar .theme-toggle { position: static; }
.topbar ~ header > .eyebrow, .topbar ~ header > h1 { padding-right: 0; }
.order-btn { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.order-btn svg { width: 18px; height: 18px; flex: none; }
.order-btn:hover { filter: brightness(1.08); }
.order-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.topbar .admin-pill { height: 40px; padding: 0 13px; }

/* "Need juice?" Octopus Energy referral button, in Octopus's logo colour */
.juice-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--octo); color: var(--octo-ink); font-size: 13.5px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.juice-btn svg { width: 16px; height: 16px; flex: none; }
.juice-btn:hover { filter: brightness(1.06); }
.juice-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 420px) {
  .topbar { gap: 6px; }
  .order-btn, .juice-btn { padding: 0 11px; font-size: 13px; gap: 5px; }
  .order-btn svg { display: none; }
  .topbar .theme-toggle { width: 42px; }
}

/* Site stats */
.stats { margin-top: 26px; }
.stats .sub { margin: 0 0 8px; }
.stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 0; }
.stat.third { grid-column: span 2; }
.stat.half { grid-column: span 3; }
@media (max-width: 420px) { .stat-n { font-size: 1.55rem; } .stat { padding: 9px 10px; } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; min-width: 0; }
.stat dt { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stat dd { margin: 0; display: grid; gap: 1px; }
.stat-n { font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; line-height: 1; color: var(--harbour); font-variant-numeric: tabular-nums; }
.stat-when { font-size: 12px; color: var(--muted); }

/* Tesla news ticker across the top */
.news { display: flex; align-items: stretch; background: var(--harbour); color: var(--bg); font-size: 13px; padding-top: env(safe-area-inset-top, 0px); margin-top: calc(-1 * env(safe-area-inset-top, 0px)); }
.news-label { flex: none; display: grid; place-items: center; padding: 0 12px; background: var(--accent); color: #fff; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.news-viewport { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent); mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent); }
.news-track { display: flex; width: max-content; white-space: nowrap; }
.news-track.run { animation: news-scroll var(--news-dur, 40s) linear infinite; }
.news-viewport:hover .news-track, .news-viewport:focus-within .news-track { animation-play-state: paused; }
@keyframes news-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.news-run { display: inline-flex; }
.news-item { display: inline-flex; align-items: baseline; gap: 8px; padding: 9px 26px 9px 14px; color: inherit; text-decoration: none; position: relative; }
.news-item::after { content: ""; position: absolute; right: 10px; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .4; transform: translateY(-50%); }
.news-item:hover { text-decoration: underline; }
.news-item:focus-visible { outline: 2px solid var(--bg); outline-offset: -3px; }
.news-src { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; opacity: .75; }
.news-ago { font-family: var(--font-mono); font-size: 10.5px; opacity: .7; }
@media (prefers-reduced-motion: reduce) {
  .news-track.run { animation: none; }
  .news-viewport { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .news-run[aria-hidden="true"] { display: none; }
}

/* Do you like the new site? */
.vote { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 14px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.vote-q { font-weight: 600; font-size: 14px; }
.vote-btns { display: flex; gap: 8px; margin-left: auto; }
.vote-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 16px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; }
.vote-btn:hover { border-color: var(--harbour); }
.vote-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vote-n { font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.vote-btn.pop { animation: vote-pop .3s ease; }
@keyframes vote-pop { 50% { transform: scale(1.15); } }
.vote-thanks { flex-basis: 100%; font-size: 12.5px; color: var(--muted); }
.vote-thanks:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .vote-btn.pop { animation: none; } }
.vote-thanks a { color: var(--accent); font-weight: 600; }

/* Pull-out ship positions */
.ships-tab { position: fixed; right: 0; top: 46%; z-index: 40; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: 10px 0 0 10px; background: var(--harbour); color: var(--bg); font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; box-shadow: -2px 2px 10px rgba(0,0,0,.18); }
.ships-tab svg { width: 20px; height: 20px; }
.ships-tab span { writing-mode: vertical-rl; transform: rotate(180deg); }
.ships-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ships-scrim { position: fixed; inset: 0; z-index: 44; background: rgba(5, 12, 20, .45); }
.ships-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 45; width: min(560px, 94vw); display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line); box-shadow: -8px 0 30px rgba(0,0,0,.25); transform: translateX(105%); visibility: hidden; transition: transform .25s ease, visibility 0s .25s; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.ships-drawer.open { transform: none; visibility: visible; transition: transform .25s ease; }
.ships-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ships-head strong { display: block; font-family: var(--font-display); font-size: 1.2rem; text-transform: uppercase; letter-spacing: .03em; color: var(--harbour); }
.ships-head span { font-size: 12px; color: var(--muted); }
.ships-actions { display: flex; align-items: center; gap: 8px; }
.ships-actions a { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
.ships-actions button { background: var(--chip); color: var(--ink); border-radius: 999px; width: 34px; height: 34px; padding: 0; font-size: 14px; }
.ships-body { flex: 1; min-height: 0; display: flex; }
.ships-body iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.ships-msg { margin: auto; color: var(--muted); }
.ships-fallback { margin: auto; padding: 20px; display: grid; gap: 12px; justify-items: center; text-align: center; max-width: 34ch; }
.ships-fallback p { margin: 0; color: var(--muted); }
html.drawer-open, html.drawer-open body { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .ships-drawer, .ships-drawer.open { transition: none; } }
