/* Fonts are served from this site (public/fonts), so no visitor data goes to a font CDN. */
/* Aeonik and Aeonik Fono (CoType Foundry) are licensed to LanceDB: don't copy them elsewhere. */
@font-face { font-family: Aeonik; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/aeonik-regular.woff2) format("woff2"); }
@font-face { font-family: Aeonik; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/aeonik-medium.woff2) format("woff2"); }
@font-face { font-family: "Aeonik Fono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/aeonikfono-regular.woff2) format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Paper Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url(/fonts/paper-mono.woff2) format("woff2"); }

/* 12 Days of LanceDB — styled after lancedb.com (see BRAND.md for where each value comes from).
   lancedb.com is dark-only, so this site is too. */
:root {
  /* surfaces (warm near-blacks) */
  --bg: #0e0d0d;            /* --reskin--background--deep */
  --bg-dot: #030303;        /* --reskin--pattern--dot */
  --bg-raised: #111010;     /* --reskin--background--primary */
  --panel: #171513;         /* --dark--800 */
  --panel-2: #1e1b19;       /* --dark--700 */
  --surface: #22201e;       /* --reskin--background--surface (secondary button) */
  --line: #302a25;          /* --dark--600 */
  --line-strong: #595553;   /* --reskin--border--primary */
  /* text */
  --text: #f4ebe8;          /* --offwhite */
  --text-soft: #e9e5dd;     /* --reskin--text--soft */
  --body: #adaba7;          /* --reskin--text--secondary */
  --muted: #938d8a;         /* body copy colour on lancedb.com */
  --faint: #4c443f;         /* --dark--500 */
  /* accents */
  --accent: #ff734a;        /* --orange--400: primary CTA */
  --accent-hover: #ff8967;  /* --orange--300 */
  --accent-ink: #171513;    /* text on orange buttons */
  --lavender: #e9c9e7;      /* --reskin--accent--lavender: text links */
  --lavender-2: #e7d2f6;    /* --lavende--400: gradient start */
  --pink: #edbacc;          /* --reskin--accent--pink */
  --grad: linear-gradient(90deg, var(--lavender-2), var(--accent));
  --good: #8fd9a8;
  --bad: #ff7a7a;
  --code-bg: #171513;
  /* type: lancedb.com's Aeonik (text) and Aeonik Fono (display), self-hosted. Inter fills in characters
     Aeonik lacks; Paper Mono (SIL OFL 1.1) stays for code, where columns must line up. */
  --sans: Aeonik, Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Aeonik Fono", "Paper Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --mono: "Paper Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 4px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--bg); }
body {
  min-height: 100vh; display: flex; flex-direction: column;
  background-color: var(--bg);
  background-image: radial-gradient(circle, var(--bg-dot) 1.4px, transparent 1.8px);
  background-size: 14px 14px;
  color: var(--body);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
main { flex: 1 0 auto; width: 100%; }
a { color: var(--lavender); text-decoration: underline; text-decoration-color: rgba(233, 201, 231, 0.4); text-underline-offset: 3px; }
a:hover { color: var(--text); text-decoration-color: currentColor; }
b, strong { color: var(--text); font-weight: 500; }
:focus-visible { outline: 2px solid var(--lavender); outline-offset: 2px; border-radius: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: rgba(255, 115, 74, 0.35); color: var(--text); }

/* ---------- header ---------- */
.top {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px;
  padding: 12px 24px; min-height: 64px;
  background: rgba(14, 13, 13, 0.88); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 2; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
  color: var(--text); text-decoration: none; font: 500 20px/1.2 var(--sans); letter-spacing: -0.01em;
}
.brand:hover { color: var(--text); }
.brand .logo { display: none; }
.brand .logo-img { height: 28px; width: auto; display: block; }
.brand .mark { font-weight: 500; }
.brand .sep { color: var(--faint); font-weight: 400; }
.brand .event { font-weight: 400; color: var(--text-soft); }
.brand .yr { font: 400 15px var(--display); color: var(--muted); }
.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-size: 15px; }
.top nav a { color: var(--text); text-decoration: none; }
.top nav a:hover { color: var(--lavender); }
.top nav form { margin: 0; }
.who { color: var(--muted); }
.top nav a.who { color: var(--muted); }
.top nav a.who:hover { color: var(--text); }
.tally { font: 500 14px var(--display); color: var(--accent); white-space: nowrap; }
.top nav a.btn { color: var(--accent-ink); }
button.link {
  background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
  color: var(--lavender); text-decoration: underline; text-decoration-color: rgba(233, 201, 231, 0.4); text-underline-offset: 3px;
}
button.link:hover { color: var(--text); text-decoration-color: currentColor; }
.top nav button.link { color: var(--muted); text-decoration: none; }
.top nav button.link:hover { color: var(--text); }

main { max-width: 880px; margin: 0 auto; padding: 48px 24px 72px; }
footer {
  text-align: center; color: var(--muted); font-size: 14px; padding: 28px 24px;
  border-top: 1px solid var(--line); background: var(--bg);
}

/* ---------- type ---------- */
h1, h2, h3 { color: var(--text); font-family: var(--display); font-weight: 400; }
h1 { font-size: 44px; line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 16px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kicker {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
  margin: 0 0 20px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  font: 400 12px/1.4 var(--display); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em;
}
.kicker .warn { color: var(--accent); font-weight: 500; }
.kicker .warn::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent); vertical-align: 1px;
}
.hero { margin-bottom: 40px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; }
.hero-mark { width: 240px; height: auto; display: block; }
.panel-mark { width: 104px; height: auto; display: block; margin: 0 0 16px; }
.hero h1 { font-size: 56px; max-width: 20ch; text-wrap: balance; }
.hero p:last-child { font-size: 18px; color: var(--body); max-width: 56ch; margin: 0; }

/* ---------- calendar ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.bay {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 132px;
  padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  color: var(--text); text-decoration: none; transition: border-color .15s, background-color .15s, transform .15s;
}
a.bay:hover { border-color: var(--accent); background: var(--panel-2); color: var(--text); transform: translateY(-2px); }
.bay .num { font: 400 34px/1 var(--display); letter-spacing: -0.02em; color: var(--text); }
.bay .name { font-size: 15px; line-height: 1.35; color: var(--text-soft); }
.bay.done { border-color: rgba(255, 115, 74, 0.55); }
.bay.done .num { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bay.locked { background: rgba(23, 21, 19, 0.5); border-style: dashed; }
.bay.locked .num { color: var(--faint); }
.bay.locked .name { color: var(--muted); font: 400 12px var(--display); text-transform: uppercase; letter-spacing: 0.06em; }
.leds { position: absolute; top: 16px; right: 16px; display: flex; gap: 6px; }
.leds i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); border: 1px solid var(--line-strong); }
.leds i.on { background: var(--accent); border-color: var(--accent-hover); box-shadow: 0 0 10px rgba(255, 115, 74, 0.8); }
.bay.locked .leds i { background: transparent; border-color: var(--line); }

/* ---------- puzzle pages ---------- */
.crumb { font: 400 14px var(--display); margin: 0 0 20px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--text); }
.puzzle { color: var(--body); }
.puzzle h1 { font-size: 32px; margin-bottom: 24px; }
.puzzle h2 { font-size: 24px; letter-spacing: -0.01em; margin: 40px 0 16px; }
.puzzle p, .puzzle li { max-width: 72ch; }
.puzzle hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
/* FOREMAN-9 notes and other callouts */
.puzzle blockquote {
  position: relative; margin: 24px 0; padding: 14px 18px 14px 20px; max-width: 72ch;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text-soft);
}
.puzzle blockquote::before {
  content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 3px;
  background: linear-gradient(180deg, var(--lavender-2), var(--accent)); border-radius: var(--radius) 0 0 var(--radius);
}
.puzzle blockquote p { margin: 0; }
.puzzle blockquote em:first-child { display: block; margin-bottom: 4px; font: normal 400 12px var(--display); color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
code { font: 0.9em var(--mono); color: var(--text-soft); background: var(--panel-2); border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px; }
pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; overflow-x: auto; line-height: 1.5; }
pre code { background: none; border: 0; padding: 0; font-size: 14px; color: var(--text-soft); }
table { border-collapse: collapse; margin: 20px 0; font-size: 14px; display: block; max-width: 100%; overflow-x: auto; }
th, td { border-bottom: 1px solid var(--line); padding: 8px 14px 8px 0; text-align: left; vertical-align: top; }
th { font: 400 12px var(--display); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; border-bottom-color: var(--line-strong); }
.solved { color: var(--good); }
.solved code { color: var(--text); }

/* ---------- panels, forms, buttons ---------- */
.panel { margin-top: 40px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.panel h1 { font-size: 32px; }
.panel h2 { font: 400 12px var(--display); margin: 0 0 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.panel h2 + p { margin-top: 0; }
.panel h2:not(:first-child) { margin-top: 28px; }
.panel.narrow { max-width: 480px; margin: 24px auto; }
details summary { cursor: pointer; color: var(--lavender); font-size: 15px; }

.btn {
  display: inline-block; background: var(--accent); color: var(--accent-ink); border: 2px solid var(--accent); border-radius: var(--radius);
  padding: 9px 18px; font: 500 14px/1.3 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn:focus-visible { outline-color: var(--text); }
.btn[disabled] { background: var(--surface); border-color: var(--surface); color: var(--muted); cursor: not-allowed; }
.panel p .btn { margin-left: 8px; }
.answer { display: flex; gap: 10px; flex-wrap: wrap; }
.answer input, .stack input[type=text], .stack input:not([type]) {
  min-width: 0; background: var(--bg-raised); color: var(--text); border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: 10px 12px; font: 15px var(--mono);
}
.answer input { flex: 1 1 220px; }
.stack input[type=text], .stack input:not([type]) { flex: none; width: 100%; }
.answer input::placeholder, .stack input::placeholder { color: var(--muted); }
.answer input:focus, .stack input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(255, 115, 74, 0.25); }
.answer input[disabled] { opacity: 0.6; }

.flash { margin-top: 24px; padding: 12px 16px; border-radius: var(--radius); border: 1px solid; color: var(--text-soft); }
.flash.good { border-color: var(--good); background: rgba(143, 217, 168, 0.08); }
.flash.bad { border-color: var(--bad); background: rgba(255, 122, 122, 0.08); }
.flash.early { margin: 0 0 24px; border-color: var(--line-strong); background: var(--panel); }

/* sign-in, settings, leaderboards */
.muted { color: var(--muted); font-size: 14px; }
.providers { display: flex; flex-wrap: wrap; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.boards { list-style: none; padding: 0; margin: 16px 0; }
.boards li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.boards li a { color: var(--text); }
.standings { display: table; width: 100%; font-family: var(--mono); }
.standings td, .standings th { text-align: center; padding-right: 10px; padding-left: 10px; }
.standings td.name, .standings th.name { text-align: left; min-width: 10em; max-width: 18em; font-family: var(--sans); color: var(--text); overflow-wrap: anywhere; }
.standings td.act { font-family: var(--sans); }
.standings th abbr { text-decoration: none; cursor: help; white-space: nowrap; }
.standings .pip { display: inline-block; width: 7px; height: 13px; margin: 0 1px; vertical-align: -1px; border: 1px solid currentColor; border-radius: 1px; }
.standings .pip.on { background: currentColor; }
.standings tr.me td { background: rgba(255, 115, 74, 0.08); }
.standings td.s2 { color: var(--accent); }
.standings td.s1 { color: var(--pink); }
.standings td.s0 { color: var(--line-strong); }
form button.link + .muted { margin-left: 6px; }

/* ---------- phone ---------- */
@media (max-width: 600px) {
  main { padding: 28px 16px 48px; }
  .top { padding: 10px 16px; }
  .top { position: static; min-height: 0; }
  .brand { font-size: 17px; gap: 8px; }
  .brand .logo-img { height: 24px; }
  .brand .event { font-size: inherit; }
  .top nav { gap: 4px 14px; font-size: 14px; }
  .top nav .btn { padding: 5px 12px; }
  h1, .hero h1 { font-size: 34px; }
  .puzzle h1, .panel h1 { font-size: 26px; }
  .hero p:last-child { font-size: 16px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .hero-mark { width: 132px; order: -1; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .bay { min-height: 112px; padding: 14px; }
  .bay .num { font-size: 28px; }
  .leds { top: 14px; right: 14px; }
  .panel { padding: 18px; }
  .panel p .btn { display: table; margin: 10px 0 0; }
  .panel.narrow { margin-top: 8px; }
}
/* ---------- seasonal layer ----------
   Winter, not any one holiday: workshop string lights, light snow, frost on finished tiles.
   Everything hangs off body.holiday, so removing that class in layout() turns it all off. */
.holiday main, .holiday footer { position: relative; z-index: 1; }
/* snow: two slow layers of off-white specks behind the content */
.holiday::before, .holiday::after {
  content: ""; position: fixed; inset: -400px 0 0; z-index: 0; pointer-events: none;
}
.holiday::before {
  background-image:
    radial-gradient(circle at 30px 40px, rgba(244, 235, 232, 0.35) 1px, transparent 1.6px),
    radial-gradient(circle at 150px 120px, rgba(244, 235, 232, 0.25) 1px, transparent 1.6px),
    radial-gradient(circle at 90px 180px, rgba(233, 201, 231, 0.3) 1px, transparent 1.6px);
  background-size: 200px 200px;
  animation: snow-a 40s linear infinite;
}
.holiday::after {
  background-image:
    radial-gradient(circle at 60px 90px, rgba(244, 235, 232, 0.4) 1.5px, transparent 2.2px),
    radial-gradient(circle at 250px 300px, rgba(244, 235, 232, 0.3) 1.5px, transparent 2.2px);
  background-size: 400px 400px;
  animation: snow-b 55s linear infinite;
}
@keyframes snow-a { to { background-position: 40px 400px; } }
@keyframes snow-b { to { background-position: -40px 400px; } }
/* string lights under the header, in brand colours */
.holiday .top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 12px; pointer-events: none;
  background:
    radial-gradient(circle at 14px 7px, var(--accent) 3px, transparent 3.5px) 0 0 / 112px 12px repeat-x,
    radial-gradient(circle at 42px 7px, var(--lavender) 3px, transparent 3.5px) 0 0 / 112px 12px repeat-x,
    radial-gradient(circle at 70px 7px, var(--text) 3px, transparent 3.5px) 0 0 / 112px 12px repeat-x,
    radial-gradient(circle at 98px 7px, var(--pink) 3px, transparent 3.5px) 0 0 / 112px 12px repeat-x;
  filter: drop-shadow(0 0 4px rgba(255, 115, 74, 0.55));
  animation: twinkle 3.2s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.55; } to { opacity: 1; } }
/* frost on finished tiles */
.holiday .bay.done {
  background:
    linear-gradient(180deg, rgba(244, 235, 232, 0.10), transparent 22px),
    var(--panel);
  border-top-color: rgba(244, 235, 232, 0.55);
}
.holiday a.bay.done:hover { background: linear-gradient(180deg, rgba(244, 235, 232, 0.12), transparent 22px), var(--panel-2); }
.greeting { display: block; margin-top: 4px; color: var(--text-soft); font: 400 13px var(--display); letter-spacing: 0.04em; }
.greeting::before, .greeting::after { content: "✻"; color: var(--lavender); margin: 0 8px; }

@media (prefers-reduced-motion: reduce) {
  .holiday::before, .holiday::after, .holiday .top::after { animation: none; }
  * { transition: none !important; }
  a.bay:hover { transform: none; }
}

/* Land answer feedback below the sticky header after a submit redirect */
#result, #level-2, #level-2-result { scroll-margin-top: 96px; }

/* inline action forms on leaderboard rows */
form.inline { display: inline; margin: 0; }
.standings td.act { white-space: nowrap; text-align: right; width: 99%; }

/* sign-up / settings form */
.profile { gap: 8px; }
.profile label { margin-top: 6px; }
.profile input[type=email], .profile input[type=url], .profile input:not([type]), .answer input[type=email] {
  width: 100%; background: var(--code-bg, #0b0b0b); color: var(--text); border: 1px solid var(--line, #2a2a2a);
  border-radius: var(--radius, 6px); padding: 9px 12px; font: inherit;
}
.profile .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.profile .pair > div { display: flex; flex-direction: column; gap: 6px; }
.profile details { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.profile details[open] > *:not(summary) { display: block; margin-top: 6px; }
.small { font-size: 13px; }
.btn.danger { background: transparent; color: #ff8f8f; border: 1px solid #ff8f8f; }
.policy h1 { margin-bottom: 4px; }
@media (max-width: 600px) { .profile .pair { grid-template-columns: 1fr; } }

/* ---------- dataset viewer (/day/N/data, see viewer.mjs) ---------- */
/* 1px border + 1px more padding = same size and text line as .btn (2px border) */
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-strong); padding: 10px 19px; }
.panel .actions { align-items: center; }
.btn.ghost:hover { background: var(--panel-2); border-color: var(--accent); color: var(--text); }
span.btn.ghost[aria-disabled="true"] { color: var(--faint); border-color: var(--line); cursor: default; }
span.btn.ghost[aria-disabled="true"]:hover { background: transparent; }
.panel .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.panel .actions .btn { margin: 0; }
/* The dataset viewer gets a wider page so a day's columns fit without sideways scrolling. */
main:has(> .viewer) { max-width: 1280px; }
.viewer h1 { font-size: 32px; margin-bottom: 8px; }
.viewer > .muted { margin: 0 0 20px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); color: var(--text-soft); text-decoration: none; font: 400 14px var(--mono);
}
.tab:hover { border-color: var(--line-strong); color: var(--text); }
.tab.on { border-color: var(--accent); color: var(--text); background: var(--panel-2); }
.tab .count { color: var(--muted); font-size: 12px; }
.schema { margin: 4px 0 16px; }
.schema summary { font-size: 14px; }
.schema table { margin: 10px 0 0; }
.schema td.type { font: 13px var(--mono); color: var(--muted); }
.grid-wrap {
  overflow: auto; max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
}
.grid-wrap:focus-visible { outline-offset: 2px; }
table.data { display: table; margin: 0; width: 100%; font-size: 13px; }
table.data th, table.data td { padding: 7px 12px; white-space: nowrap; vertical-align: middle; }
table.data th { position: sticky; top: 0; background: var(--panel-2); text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text-soft); }
table.data td { font-family: var(--mono); color: var(--text-soft); }
table.data td.scalar { max-width: 36ch; overflow: hidden; text-overflow: ellipsis; }
table.data tbody tr:hover td { background: rgba(255, 255, 255, 0.025); }
table.data .rownum { color: var(--faint); text-align: right; width: 1%; }
.null { color: var(--faint); font-style: italic; }
.bytes { color: var(--muted); }
.chips { display: inline-flex; gap: 4px; flex-wrap: nowrap; }
.chip { padding: 1px 7px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 12px; color: var(--text-soft); background: var(--panel-2); }
.chip.more { color: var(--muted); border-style: dashed; }
table.data td.image { padding-top: 4px; padding-bottom: 4px; line-height: 0; }
.thumb { display: inline-block; vertical-align: middle; line-height: 0; border-radius: 3px; }
.thumb img { display: block; height: 40px; width: auto; max-width: 80px; object-fit: cover; border: 1px solid var(--line); border-radius: 3px; background: var(--bg); }
.thumb:hover img { border-color: var(--accent); }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.pager .where { font: 13px var(--mono); color: var(--muted); }
.lightbox { padding: 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel); color: var(--text); max-width: calc(100vw - 32px); }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.75); }
.lightbox form { display: flex; justify-content: flex-end; margin: 0 0 10px; }
.lightbox img { display: block; width: min(512px, calc(100vw - 64px)); max-height: 75vh; height: auto; object-fit: contain; }
/* tiny frames (Day 2's 64x48 wrist camera) are scaled up with crisp pixels */
.lightbox img.tiny { image-rendering: pixelated; }
@media (max-width: 600px) {
  .viewer h1 { font-size: 26px; }
  .pager .where { order: -1; width: 100%; }
}
/* example tables embedded in the puzzle text (puzzle.md `<!-- example-data: TABLE -->`) */
/* Wide examples can spill past the 880px text column (centered, up to 1280px) instead of scrolling;
   narrow ones keep the column's width. */
.example-data {
  margin: 20px 0 24px; position: relative; left: 50%; transform: translateX(-50%);
  width: max-content; min-width: 100%; max-width: min(1232px, calc(100vw - 64px));
}
.example-data figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.example-data figcaption code { font-size: 12px; }

/* Cluster-hosted dataset: database + table, then the connect snippet */
.conn { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0; }
.conn dt { font: 400 12px/1.9 var(--display); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.conn dd { margin: 0; overflow-wrap: anywhere; }
