/* Ark Advent in the look of arkdepartment.ai (ticket 001, Max 30.11.2026): tokens from Keel, sizes from SortUI 2.0.
 * Class names stay as in the quiz look, so public/app.js and the preview pages render unchanged.
 * Fonts: Besley for H1 to H3, Host Grotesk for text, UI, numbers and code (Ark has no mono). Light mode only.
 * Mobile first; breakpoints at 768 and 1024px. */
@font-face { font-family: "Besley"; src: url("fonts/besley-latin-wght-normal.woff2") format("woff2"); font-weight: 400 900; font-display: swap; 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: "Besley"; src: url("fonts/besley-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 400 900; font-display: swap; 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: "Host Grotesk"; src: url("fonts/host-grotesk-latin-wght-normal.woff2") format("woff2"); font-weight: 300 800; font-display: swap; 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: "Host Grotesk"; src: url("fonts/host-grotesk-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 300 800; font-display: swap; 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; }

:root {
  color-scheme: light;
  /* Keel colours */
  --ink: #0a0a0a;
  --paper: #fcfcfc;
  --white: #ffffff;
  --mist: #f5f5f5;
  --sub: #6b6b6b;
  --line: rgb(10 10 10 / 10%);
  --line-strong: rgb(10 10 10 / 18%);
  --navy-deep: #19114b;
  --navy-light: #5791fa;
  --forest-deep: #15423a;
  --forest-light: #72d5e9;
  --plum-deep: #521631;
  --plum-light: #f591de;
  --chestnut-deep: #800500;
  --chestnut-light: #ff775c;
  /* Keel font roles */
  --font-heading: "Besley", Georgia, serif;
  --font-body: "Host Grotesk", system-ui, sans-serif;
  --heading-weight: 500;
  /* SortUI radii */
  --radius-md: 0.5rem;
  --radius-lg: 0.625rem;
  --radius-xl: 0.75rem;
  /* Page margin as on arkdepartment.ai (16, 40, 80px) */
  --page-x: 16px;
  --section-y: 64px;
}
@media (min-width: 640px) {
  :root { --page-x: 40px; }
}
@media (min-width: 1024px) {
  :root { --page-x: 80px; --section-y: 96px; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  background: var(--paper); color: var(--ink); font-family: var(--font-body);
  -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body { min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; }
ul, ol { list-style: none; }
a { color: inherit; }
h1, h2, h3, h4 { text-wrap: balance; font-weight: var(--heading-weight); }
h1, h2, h3 { font-family: var(--font-heading); }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.page-x { padding-left: var(--page-x); padding-right: var(--page-x); }
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
/* Was Geist Mono. Keel: numbers and technical values in Host Grotesk, with tabular figures. */
.mono { font-family: var(--font-body); font-size: 14px; line-height: 1.4; color: var(--sub); font-variant-numeric: tabular-nums; }
.sub { color: var(--sub); }
.small { font-size: 14px; line-height: 1.5; }
.lead { font-size: 17px; line-height: 1.6; max-width: 65ch; }
.display { font-family: var(--font-heading); font-weight: var(--heading-weight); letter-spacing: -0.02em; line-height: 1.05; }
.h2 { font: var(--heading-weight) clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem)/1.1 var(--font-heading); letter-spacing: -0.015em; }
.h3 { font: var(--heading-weight) 1.375rem/1.2 var(--font-heading); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.narrow { max-width: 640px; }
@media (min-width: 1024px) {
  .lead { font-size: 18px; }
}

/* Preview banner: outside the product */
.preview {
  background: repeating-linear-gradient(-45deg, var(--mist) 0 12px, var(--white) 12px 24px);
  border-bottom: 1px dashed var(--ink);
  padding: 8px var(--page-x);
  display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; font-size: 12px; line-height: 1.4;
}
.preview strong { font-weight: 500; background: var(--ink); color: var(--white); padding: 2px 6px; }
.preview nav { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.preview a[aria-current] { font-weight: 500; text-decoration: none; background: var(--white); padding: 0 4px; }

/* Top bar: Ark logo, the challenge's name, navigation on the right */
.top {
  width: 100%; max-width: 1440px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
  padding-top: 24px; padding-bottom: 24px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { display: block; height: 28px; width: auto; }
.wordmark { font-size: 15px; line-height: 20px; font-weight: 500; text-decoration: none; padding-left: 14px; border-left: 1px solid var(--line-strong); }
.top nav ul { display: flex; gap: 4px; font-size: 14px; font-weight: 500; }
.top nav a { display: inline-flex; align-items: center; height: 32px; padding: 0 10px; border-radius: var(--radius-md); text-decoration: none; transition: background-color 150ms ease; }
.top nav a:hover { background: var(--mist); }
.top nav a[aria-current] { background: var(--mist); }
@media (min-width: 1024px) {
  .top { padding-top: 32px; }
  .brand-logo { height: 32px; }
}

/* Buttons: the SortUI button, variants default (black) and outline, sizes xl and default */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0;
  height: 40px; padding: 0 14px; border-radius: var(--radius-lg); border: 0;
  outline: 1px solid transparent; outline-offset: -1px;
  font: 500 14px/1 var(--font-body); white-space: nowrap; text-decoration: none; cursor: pointer; user-select: none;
  background: var(--ink); color: var(--white);
  transition: background-color 150ms ease, color 150ms ease, outline-color 150ms ease;
}
.button:hover { background: rgb(10 10 10 / 88%); }
.button:active:not(:disabled) { transform: translateY(1px); }
.button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.button.secondary { background: var(--white); color: var(--ink); outline-color: var(--line-strong); }
.button.secondary:hover { background: var(--mist); }
.button.small-btn { height: 32px; padding: 0 10px; font-size: 13px; }
.button:disabled { cursor: not-allowed; opacity: 0.5; }
.button.primary-disabled:disabled { background: var(--mist); color: var(--sub); opacity: 1; outline-color: var(--line); }
.arrow::after { content: "\2192"; font-size: 1.1em; }

/* Fields: the SortUI input */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 500; font-size: 14px; }
.field input, .field textarea {
  font: 400 15px/1.4 var(--font-body); height: 40px; padding: 0 12px; width: 100%;
  border: 0; outline: 1px solid var(--line-strong); outline-offset: -1px; border-radius: var(--radius-lg);
  background: var(--white); color: var(--ink); font-variant-numeric: tabular-nums;
  transition: outline-color 150ms ease, box-shadow 150ms ease;
}
.field input:focus, .field textarea:focus { outline: 1px solid var(--ink); box-shadow: 0 0 0 3px rgb(10 10 10 / 8%); }
.field input:disabled { opacity: 1; }
.field .help { font-size: 13px; line-height: 1.4; color: var(--sub); }
.field textarea { height: auto; padding: 10px 12px; font-size: 14px; resize: vertical; }
.field input.is-error, .field textarea.is-error { outline-color: var(--chestnut-deep); box-shadow: 0 0 0 3px rgb(128 5 0 / 12%); }
.answer-row { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.answer-row .field { width: 100%; }
@media (min-width: 768px) {
  .answer-row { flex-direction: row; }
  .answer-row .field { flex: 1; }
  .answer-row .button { flex: none; margin-top: 26px; }
}

/* Hero: text left, the winter visual J-02 from Keel right (cut out, 4:5). On mobile the picture comes first. */
.hero { padding-top: 24px; padding-bottom: 56px; display: grid; gap: 32px; }
.hero-visual { justify-self: center; width: min(80%, 360px); aspect-ratio: 4 / 5; }
.hero-visual img { display: block; width: 100%; height: 100%; object-fit: contain; }
.hero-text { display: flex; flex-direction: column; gap: 24px; }
.headline { font: var(--heading-weight) clamp(2rem, 1.2rem + 3.2vw, 4rem)/1.08 var(--font-heading); letter-spacing: -0.02em; }
.hero-actions { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }

@media (min-width: 768px) {
  .hero { grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; padding-top: 48px; padding-bottom: 80px; }
  .hero-visual { order: 2; width: min(100%, 480px); }
}

/* Countdown on the waiting page */
.countdown { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.countdown > span { display: inline-flex; align-items: baseline; gap: 8px; }
.countdown [data-n] { font-variant-numeric: tabular-nums; }
.countdown [data-l] { font: 400 16px/1 var(--font-body); color: var(--sub); }

/* Doors: a grid of thin lines like the tiles on arkdepartment.ai. Today is the one tone tile (Navy). */
.doors-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.doors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; padding: 1px; background: var(--line); }
.doors > li { display: flex; }
.door {
  position: relative; flex: 1; aspect-ratio: 1; padding: 10px 12px;
  display: flex; flex-direction: column; justify-content: space-between;
  text-decoration: none; background: var(--paper); transition: background-color 150ms ease;
}
.door .n { font-size: clamp(1.5rem, 1rem + 2vw, 2.5rem); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.door .meta { font-size: 12px; line-height: 16px; color: var(--sub); }
.door.locked { color: var(--sub); }
.door.locked .n { opacity: 0.45; }
.door.open { background: var(--white); }
a.door:hover { background: var(--mist); }
.door.today { background: var(--navy-deep); color: var(--navy-light); }
.door.today .meta { color: var(--navy-light); }
a.door.today:hover { background: #241a63; }
.door.one { background: var(--white); }
.door.two { background: var(--mist); }
.stars { display: flex; gap: 3px; }
.star { width: 14px; height: 14px; display: block; }
.star.empty { opacity: 0.2; }
@media (min-width: 768px) {
  .doors { grid-template-columns: repeat(6, 1fr); }
  .door { padding: 16px 20px; }
  .door .meta { font-size: 14px; line-height: 20px; }
  .star { width: 18px; height: 18px; }
}
@media (min-width: 1024px) {
  .doors { grid-template-columns: repeat(8, 1fr); }
}

/* How it works: four steps in the same line grid */
.how { padding: var(--section-y) var(--page-x) 0; }
.how-title { margin-bottom: 40px; }
.steps { display: grid; gap: 1px; padding: 1px; background: var(--line); }
.step { padding: 24px 20px 28px; display: flex; flex-direction: column; gap: 8px; background: var(--paper); }
.step-icon { width: 56px; height: 56px; display: block; margin-bottom: 20px; }
.step .num { font-size: 14px; line-height: 20px; color: var(--sub); font-variant-numeric: tabular-nums; }
.step h3 { font: var(--heading-weight) 1.375rem/1.2 var(--font-heading); }
.step p { font-size: 16px; line-height: 1.55; color: var(--sub); }
@media (min-width: 768px) {
  .how-title { margin-bottom: 48px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step { padding: 28px 24px 36px; }
  .step-icon { width: 72px; height: 72px; margin-bottom: 40px; }
}
@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}

/* Colour classes of the quiz look, mapped to Keel (only preview and boards still use them) */
.c-orange { background: var(--chestnut-light); }
.c-blue { background: var(--navy-light); }
.c-green { background: var(--forest-light); }
.c-cream { background: var(--mist); }
.c-grey { background: var(--mist); }
.c-ink { background: var(--ink); color: var(--white); }

/* Footer: dark, as on arkdepartment.ai */
.footer {
  background: var(--ink); color: rgb(255 255 255 / 60%); padding: 48px var(--page-x);
  display: flex; flex-direction: column; gap: 20px; font-size: 14px; line-height: 20px; margin-top: var(--section-y);
}
.footer-brand { color: var(--white); }
.footer-brand a, .footer ul a { text-decoration: none; transition: color 150ms ease; }
.footer-brand a:hover, .footer ul a:hover { color: rgb(255 255 255 / 60%); }
.footer ul { display: flex; gap: 24px; color: var(--white); }
@media (min-width: 768px) {
  .footer { flex-direction: row; justify-content: space-between; align-items: center; padding-top: 56px; padding-bottom: 56px; }
}

/* Day page */
.back { font-size: 14px; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; height: 32px; color: var(--sub); }
.back:hover { color: var(--ink); }
.back::before { content: "\2190"; margin-right: 6px; }
.day-head { padding-top: 16px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 12px; }
.day-title { font: var(--heading-weight) clamp(2rem, 1.3rem + 2.6vw, 3.5rem)/1.08 var(--font-heading); letter-spacing: -0.02em; }
.case { font-size: 17px; line-height: 1.6; max-width: 65ch; }
.day-grid { display: grid; gap: 24px; padding-bottom: var(--section-y); }
.panel > .button, .stack > .button { align-self: flex-start; }
.panel { border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 20px; display: flex; flex-direction: column; gap: 16px; background: var(--white); }
.material { background: var(--mist); border-color: var(--mist); }
.material pre {
  font: 400 13px/1.6 var(--font-body); white-space: pre-wrap; background: var(--white); font-variant-numeric: tabular-nums;
  border-radius: var(--radius-lg); padding: 16px; border: 1px solid var(--line); overflow-wrap: anywhere;
}
.material ul a { font-size: 14px; text-decoration-line: underline; text-decoration-style: dashed; text-underline-offset: 4px; }
.material ul a:hover { text-decoration-style: solid; }
.part-label { font: 500 14px/20px var(--font-body); color: var(--sub); }
.part-q { font-size: 17px; line-height: 1.55; }
.part.locked { border-style: dashed; border-color: var(--line-strong); background: transparent; color: var(--sub); }
.part.locked h3 { color: var(--ink); font-size: 1.25rem; }
.lock { width: 20px; height: 20px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  font: 500 13px/1 var(--font-body); background: var(--forest-deep); color: var(--white); padding: 6px 10px; border-radius: var(--radius-md);
}
.badge .star { width: 12px; height: 12px; color: var(--forest-light); }
.part h3 { font: var(--heading-weight) 1.375rem/1.2 var(--font-heading); }
.parts { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 1024px) {
  .day-head { padding-top: 24px; padding-bottom: 48px; }
  .day-grid { grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
  .panel { padding: 28px; }
  .material pre { font-size: 14px; }
  .parts { gap: 24px; }
}

/* Answer result: green for right, red for wrong (Keel: status colours only with meaning) */
.result { border-radius: var(--radius-xl); padding: 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.result h4 { font: var(--heading-weight) 1.5rem/1.15 var(--font-heading); }
.result p { line-height: 1.5; }
.result.right { background: var(--forest-deep); color: var(--white); }
.result.right .big-star { color: var(--forest-light); }
.result.right .button { background: var(--white); color: var(--ink); }
.result.right .button:hover { background: var(--mist); }
.result.wrong { background: var(--chestnut-deep); color: var(--white); }
.result.wrong h4 { color: var(--chestnut-light); }
.result.format { background: var(--white); border: 1px dashed var(--ink); }
.big-star { width: 32px; height: 32px; }
@media (min-width: 1024px) {
  .result { padding: 28px; }
  .result h4 { font-size: 1.75rem; }
}

/* Your stars and the share card */
.progress-top { display: grid; gap: 24px; padding-bottom: 40px; }
.count { font: var(--heading-weight) clamp(2.5rem, 1.6rem + 3vw, 4.5rem)/1.05 var(--font-heading); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.note { background: var(--mist); border-radius: var(--radius-xl); padding: 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.share { display: grid; gap: 32px; align-items: center; }
.share-card {
  aspect-ratio: 1 / 1; width: min(100%, 420px); border-radius: var(--radius-xl); padding: 28px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--navy-deep); color: var(--white); border: 1px solid var(--line);
}
.share-card .card-name { font: var(--heading-weight) 22px/1 var(--font-heading); }
.share-card .card-line { font: var(--heading-weight) 40px/1.05 var(--font-heading); letter-spacing: -0.02em; }
.share-card .card-sub { font-size: 16px; line-height: 1.4; margin-top: 10px; }
.share-card .card-url { font-size: 13px; }
.share-card.c-orange { background: var(--plum-deep); }
.share-card.c-blue { background: var(--navy-deep); }
.share-card.c-ink { background: var(--ink); }
.card-stars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; max-width: 280px; }
.card-stars .star { width: 100%; height: auto; aspect-ratio: 1; }
@media (min-width: 1024px) {
  .progress-top { grid-template-columns: 1fr 1fr; align-items: end; gap: 64px; padding-bottom: 64px; }
  .share { grid-template-columns: 520px 1fr; gap: 80px; }
  .share-card { padding: 36px; }
}

/* Boards */
.board-grid { display: grid; gap: 24px; padding-bottom: var(--section-y); }
.board-grid .panel.c-cream { background: var(--mist); border-color: var(--mist); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font: 500 13px/1.2 var(--font-body); color: var(--sub); padding: 0 8px 10px; border-bottom: 1px solid var(--line-strong); }
.table td { padding: 12px 8px; border-bottom: 1px solid var(--line); }
.table td.num, .table th.num { text-align: right; }
.table tr.you td { background: var(--mist); font-weight: 500; }
.code { font: 500 40px/1 var(--font-body); letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.empty-block { border: 1px dashed var(--line-strong); border-radius: var(--radius-xl); padding: 24px; display: flex; flex-direction: column; gap: 8px; }
a.h3 { text-decoration-line: underline; text-decoration-style: dashed; text-decoration-thickness: 1px; text-underline-offset: 5px; }
a.h3:hover { text-decoration-style: solid; }
@media (min-width: 1024px) {
  .board-grid { grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }
  .code { font-size: 56px; }
}

/* Sign-in */
.inbox { width: 48px; height: 48px; }

/* Wordmark sheet and screen index (preview only) */
.name-band { padding: 40px var(--page-x); display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.name-band .display { font-size: 56px; }
@media (min-width: 1024px) {
  .name-band { flex-direction: row; justify-content: space-between; align-items: center; padding: 48px var(--page-x); }
  .name-band .display { font-size: 120px; }
}
.index-list { display: grid; gap: 1px; padding: 1px; background: var(--line); }
.index-list a { display: flex; gap: 16px; align-items: baseline; padding: 16px 20px; background: var(--paper); text-decoration: none; }
.index-list a:hover { background: var(--mist); }
.index-list .mono { min-width: 2.5em; }
@media (min-width: 1024px) {
  .index-list { grid-template-columns: 1fr 1fr; }
}

/* Legal pages */
.legal { max-width: 760px; padding-bottom: var(--section-y); }
.legal ul { list-style: disc; padding-left: 1.2em; gap: 8px; }
.legal p, .legal dd, .legal li { line-height: 1.6; }
.legal a { text-decoration-line: underline; text-decoration-style: dashed; text-underline-offset: 4px; }
.legal code { font: inherit; background: var(--mist); padding: 1px 4px; border-radius: 4px; }
.legal dt strong { font-weight: 500; }

img.share-card { padding: 0; height: auto; background: none; border: 0; }

/* ---------- Ticket 001, second draft (Max, 30.11.2026) ---------- */

/* Page above the footer: it scrolls away and reveals the footer, as on arkdepartment.ai. */
.page { flex: 1 0 auto; position: relative; z-index: 1; background: var(--paper); }

/* Footer of arkdepartment.ai: dark, links left, copyright and the clock in Graz right, the big ARK below. */
.site-footer { position: sticky; bottom: 0; z-index: 0; overflow: hidden; background: var(--ink); color: var(--white); }
@media (max-height: 620px) { .site-footer { position: static; } }
.footer-inner { max-width: 1440px; margin: 0 auto; padding-top: 64px; will-change: transform; }
/* Row 1: logo with tagline left, the clock right. Row 2: copyright and the legal links, muted until hover. */
.footer-columns { display: grid; gap: 40px; font-size: 14px; line-height: 20px; }
@media (min-width: 768px) { .footer-columns { grid-template-columns: 1fr auto; column-gap: 80px; } }
.site-footer .muted { color: #a1a1a1; }
.footer-mark { display: inline-block; }
.footer-mark img { display: block; height: 28px; width: auto; }
.footer-tagline { margin-top: 16px; }
.footer-clock { margin-top: 8px; }
.footer-legal { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; margin-top: 64px; font-size: 14px; line-height: 20px; }
.footer-legal ul { display: flex; gap: 24px; }
.link-footer { color: var(--white); text-decoration: none; transition: color 150ms ease; }
.link-footer:hover, .link-footer:focus-visible { color: #a1a1a1; }
.link-footer-subtle { color: #a1a1a1; text-decoration: none; transition: color 150ms ease; }
.link-footer-subtle:hover, .link-footer-subtle:focus-visible { color: var(--white); }
.site-footer :focus-visible { outline-color: var(--white); }
.clock { font-variant-numeric: tabular-nums; }
.clock .clock-slot { position: relative; display: inline-block; width: 1ch; height: 1lh; overflow: hidden; vertical-align: bottom; }
.clock .clock-slot .clock-glyph { position: absolute; inset: 0; text-align: center; }
.footer-logo { margin-top: 48px; aspect-ratio: 880 / 221; overflow: hidden; user-select: none; }
.footer-logo-svg {
  display: block; width: 100%; height: auto;
  -webkit-mask-image: linear-gradient(to bottom, rgb(0 0 0 / 0.5), rgb(0 0 0 / 0.04) 92%);
  mask-image: linear-gradient(to bottom, rgb(0 0 0 / 0.5), rgb(0 0 0 / 0.04) 92%);
}
.footer-logo .glyph { transform-box: fill-box; }
.footer-logo[data-armed] .glyph { opacity: 0; transform: translateY(35%); transition: none; }
.footer-logo[data-armed][data-in] .glyph {
  opacity: 1; transform: none;
  transition: transform 550ms cubic-bezier(0.2, 0.7, 0.2, 1), opacity 400ms ease-out;
  transition-delay: calc(var(--i) * 60ms);
}
@media (min-width: 1024px) { .footer-inner { padding-top: 80px; } }

/* Dashed link underline, part of the brand (Keel, layout) */
.link-dashed { text-decoration-line: underline; text-decoration-style: dashed; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.link-dashed:hover { text-decoration-style: solid; }

/* Calendar section with its heading, as on the website page */
.doors-section { padding-top: var(--section-y); scroll-margin-top: 24px; }
.section-head { display: grid; gap: 16px; margin-bottom: 40px; }
@media (min-width: 768px) {
  .section-head { grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; margin-bottom: 48px; }
}
.how { scroll-margin-top: 24px; }

/* FAQ on Mist, white boxes; opens and closes softly where the browser can animate to auto height */
.faq { background: var(--mist); margin-top: var(--section-y); }
.faq-inner { max-width: 1440px; margin: 0 auto; padding-top: 64px; padding-bottom: 64px; display: grid; gap: 32px; }
.faq-list { display: grid; gap: 8px; }
.faq-item { --faq-ease: cubic-bezier(0.22, 1, 0.36, 1); --faq-duration: 360ms; interpolate-size: allow-keywords; background: var(--white); border-radius: var(--radius-lg); }
.faq-item::details-content {
  block-size: 0; overflow: clip; opacity: 0;
  transition: block-size var(--faq-duration) var(--faq-ease), opacity 240ms ease, content-visibility var(--faq-duration) allow-discrete;
}
.faq-item[open]::details-content { block-size: auto; opacity: 1; }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; font-size: 17px; line-height: 1.4; font-weight: 500; cursor: pointer; list-style: none; border-radius: var(--radius-lg); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-chevron { flex-shrink: 0; color: var(--sub); transition: transform var(--faq-duration) var(--faq-ease); }
.faq-item[open] .faq-chevron { transform: rotate(180deg); }
.faq-item p { padding: 0 20px 24px; max-width: 65ch; font-size: 16px; line-height: 1.6; color: var(--sub); }
.faq-item a { color: var(--ink); }
@media (min-width: 768px) {
  .faq-inner { grid-template-columns: 1fr 1fr; gap: 48px; padding-top: 96px; padding-bottom: 96px; }
}
@media (prefers-reduced-motion: reduce) { .faq-chevron, .faq-item::details-content { transition: none; } }

/* Why Ark does this */
.why { display: grid; gap: 24px; padding-top: var(--section-y); padding-bottom: calc(var(--section-y) + 32px); }
.why-body { display: grid; justify-items: start; gap: 32px; }
@media (min-width: 768px) { .why { grid-template-columns: 1fr 1fr; gap: 48px; } }

/* Day page: today's door is a Navy band across the page, earlier doors stay light. A picture per day sits right. */
.day-head { padding: 0; display: block; }
.day-head-inner { display: grid; gap: 24px; padding-top: 16px; padding-bottom: 40px; }
.day-head-text { display: flex; flex-direction: column; gap: 12px; }
.day-visual { width: min(55%, 220px); aspect-ratio: 4 / 5; justify-self: start; }
.day-visual img { display: block; width: 100%; height: 100%; object-fit: contain; }
.day-head.is-today { background: var(--navy-deep); color: var(--white); box-shadow: 0 0 0 100vmax var(--navy-deep); clip-path: inset(0 -100vmax); margin-bottom: 40px; }
.day-head.is-today .day-head-inner { padding-top: 40px; padding-bottom: 48px; }
.day-head.is-today .mono { color: var(--navy-light); }
.day-head.is-today .case, .day-head.is-today .small { color: rgb(255 255 255 / 85%); }
.today-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--radius-md); background: var(--navy-light); color: var(--ink); font: 500 12px/1 var(--font-body); margin-right: 8px; vertical-align: 1px; }
@media (min-width: 768px) {
  .day-head-inner { grid-template-columns: 1fr auto; align-items: end; gap: 48px; }
  .day-visual { order: 2; width: 240px; }
}
@media (min-width: 1024px) {
  .day-head-inner { padding-top: 24px; padding-bottom: 56px; }
  .day-head.is-today .day-head-inner { padding-top: 56px; padding-bottom: 64px; }
  .day-visual { width: 280px; }
}

/* Today's day page: header, back link and day head form one Navy band; logo, links and text turn white (Max, 30.11.2026). */
body.day-is-today .page > .top,
body.day-is-today .back-row { background: var(--navy-deep); color: var(--white); box-shadow: 0 0 0 100vmax var(--navy-deep); clip-path: inset(0 -100vmax); }
body.day-is-today .brand-logo { filter: invert(1); }
body.day-is-today .wordmark { border-left-color: rgb(255 255 255 / 30%); }
body.day-is-today .top nav a:hover, body.day-is-today .top nav a[aria-current] { background: rgb(255 255 255 / 12%); }
body.day-is-today .back { color: rgb(255 255 255 / 80%); }
body.day-is-today .back:hover { color: var(--white); }
body.day-is-today .top :focus-visible, body.day-is-today .back-row :focus-visible, .day-head.is-today :focus-visible { outline-color: var(--white); }
body.day-is-today .day-head.is-today .day-head-inner { padding-top: 24px; }

/* ---------- The website's motion and feel (Max, 30.11.2026): same rules as arkdepartment.ai ---------- */

/* Anchor links glide to their section instead of jumping. */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Crossfade between pages, also to and from the website (native view transitions, no JavaScript). */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 320ms; animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* Headline as RevealHeadline on arkdepartment.ai (letter drop after jackandjill.ai, Max 30.11.2026): every letter
 * drops 0.1 em and fades in, 14 ms apart, 720 ms each. Only transform and opacity, so it runs on the compositor.
 * A coloured letter is a copy in the Ark tone with a copy in the text colour above it that fades in. */
.reveal-word { --to: var(--ink); display: inline-block; white-space: nowrap; color: var(--to); }
.reveal-subtle { --to: var(--sub); }
.day-head.is-today .reveal-word { --to: var(--white); }
.reveal-letter { display: inline-block; animation: reveal-drop 720ms linear var(--d) both; }
.reveal-magic { position: relative; color: transparent; animation-name: reveal-drop-magic; }
.reveal-magic::before, .reveal-magic::after { content: attr(data-c) / ""; position: absolute; inset: 0; pointer-events: none; }
.reveal-magic::before { color: var(--tone); opacity: 0; animation: reveal-tone-hold 720ms linear var(--d) both; }
.reveal-magic::after { color: var(--to); animation: reveal-tone-ink 720ms linear var(--d) both; }
@keyframes reveal-drop { from { opacity: 0; transform: translateY(-0.1em); animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); } }
/* Coloured letters land sooner (at 58 %), then the tone turns into the text colour. */
@keyframes reveal-drop-magic {
  0% { opacity: 0; transform: translateY(-0.1em); animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
  58%, 100% { opacity: 1; transform: none; }
}
@keyframes reveal-tone-hold { 0%, 99.9% { opacity: 1; } 100% { opacity: 0; } }
@keyframes reveal-tone-ink { 0%, 58% { opacity: 0; animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); } 100% { opacity: 1; } }

/* Copy appears with a slight lift after the headline, without blur (a filter does not run on the compositor).
 * Delay per element via --appear-delay. */
.appear { animation: appear-enter 1200ms cubic-bezier(0.16, 1, 0.3, 1) var(--appear-delay, 0ms) backwards; }
@keyframes appear-enter { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) {
  .reveal-letter, .reveal-magic::before, .reveal-magic::after, .appear { animation: none; }
}

/* Selection colour rotates through the light tones of the four pairs (app.js), text stays Ink, also on dark. */
:root { --selection-fg: #0a0a0a; }
:root, :root[data-selection="navy"] { --selection-bg: var(--navy-light); }
:root[data-selection="plum"] { --selection-bg: var(--plum-light); }
:root[data-selection="forest"] { --selection-bg: var(--forest-light); }
:root[data-selection="chestnut"] { --selection-bg: var(--chestnut-light); }
::selection { background: var(--selection-bg); color: var(--selection-fg); -webkit-text-fill-color: var(--selection-fg); }
:is(h1, h2, h3) { position: relative; isolation: isolate; }
:is(h1, h2, h3)::selection, :is(h1, h2, h3) *::selection { background: transparent; }
.selection-layer { position: absolute; inset: 0; z-index: -1; pointer-events: none; user-select: none; }
.selection-layer > span { position: absolute; background: var(--selection-bg); }

/* ---------- Round 4 (Max, 30.11.2026) ---------- */

/* Every page is at least as tall as the window, so the footer only shows after scrolling. */
.page { min-height: 100dvh; }


/* Your stars: text and buttons left, the card on a Keel visual right. */
.stars-layout { display: grid; gap: 40px; align-items: center; padding-top: 24px; padding-bottom: var(--section-y); }
.stars-text { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.card-stage {
  position: relative; display: grid; place-items: center; aspect-ratio: 5 / 4; overflow: hidden;
  border-radius: var(--radius-xl); perspective: 1100px;
  background: var(--navy-light) url("images/05-praesentation-e-21e669.webp") center / cover no-repeat;
}
.card-tilt {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
  position: relative; width: min(62%, 420px); border-radius: 14px;
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d;
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 30px 60px -20px rgb(10 10 10 / 45%), 0 12px 24px -12px rgb(10 10 10 / 35%);
}
.card-tilt.is-tilting { transition: transform 120ms linear; }
.card-tilt img.share-card { display: block; width: 100%; height: auto; border-radius: 14px; transform: none; }
/* Holographic sheen: a light spot follows the pointer, a thin band of the light tones runs across. */
.card-tilt::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; mix-blend-mode: soft-light;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgb(255 255 255 / 55%), transparent 45%),
    linear-gradient(115deg, transparent 25%, rgb(245 145 222 / 45%) 40%, rgb(114 213 233 / 45%) 50%, rgb(87 145 250 / 40%) 60%, transparent 75%);
  background-size: 100% 100%, 250% 250%;
  background-position: center, var(--mx) var(--my);
  opacity: 0.55; transition: opacity 300ms ease;
}
.card-tilt.is-tilting::after { opacity: 1; }
@media (min-width: 900px) {
  .stars-layout { grid-template-columns: 5fr 6fr; gap: 64px; padding-top: 48px; }
}
@media (prefers-reduced-motion: reduce) { .card-tilt { transition: none; } }

/* Boards: heading, then your boards left and create / join stacked right. */
.boards-head { display: flex; flex-direction: column; gap: 20px; max-width: 760px; padding-top: 24px; padding-bottom: 48px; }
.boards-layout { display: grid; gap: 40px; padding-bottom: calc(var(--section-y) + 32px); }
.boards-mine { display: flex; flex-direction: column; gap: 20px; }
.boards-side { display: flex; flex-direction: column; gap: 16px; }
.boards-side .panel { background: var(--mist); border-color: var(--mist); }
.board-cards { display: grid; gap: 1px; padding: 1px; background: var(--line); }
.board-card {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name arrow" "code arrow"; align-items: center; gap: 4px 16px;
  padding: 24px; background: var(--paper); text-decoration: none; transition: background-color 150ms ease;
}
.board-card:hover { background: var(--mist); }
.board-card-name { grid-area: name; font: var(--heading-weight) 1.5rem/1.2 var(--font-heading); }
.board-card-code { grid-area: code; font-size: 14px; color: var(--sub); font-variant-numeric: tabular-nums; }
.board-card-arrow { grid-area: arrow; font-size: 20px; transition: transform 150ms ease; }
.board-card:hover .board-card-arrow { transform: translateX(3px); }
.board-title { padding-top: 16px; padding-bottom: 40px; }
@media (min-width: 900px) {
  .boards-head { padding-top: 48px; padding-bottom: 64px; }
  .boards-layout { grid-template-columns: 3fr 2fr; gap: 48px; align-items: start; }
}

/* Board page (Max, 30.11.2026): no eyebrow; name, a line on where you stand, then standings left and invite right. */
.board-head { display: flex; flex-direction: column; gap: 20px; max-width: 820px; padding-top: 16px; padding-bottom: 48px; }
.board-head .field { max-width: 420px; }
.board-layout { display: grid; gap: 32px; padding-bottom: calc(var(--section-y) + 32px); }
.board-standings { display: flex; flex-direction: column; gap: 16px; }
.board-invite { background: var(--mist); border-color: var(--mist); align-items: flex-start; }
.board-invite .field { width: 100%; }
.invite-code { display: flex; flex-direction: column; gap: 6px; padding: 16px 0 8px; }
@media (min-width: 900px) {
  .board-head { padding-top: 24px; padding-bottom: 64px; }
  .board-layout { grid-template-columns: 3fr 2fr; gap: 48px; align-items: start; }
}

/* File names in the case text, written in backticks in the task file */
.case code { font: inherit; font-weight: 500; padding: 1px 6px; border-radius: 4px; background: var(--mist); }
.day-head.is-today .case code { background: rgb(255 255 255 / 12%); color: var(--white); }
