/* ───────────── Fonts ───────────── */
/* Same setup as entire.io: Aeonik SemiBold for display text (the same webfont file entire.io serves),
   the system font for body copy, JetBrains Mono for code. Only add font files Entire is licensed to serve on the web. */
@font-face { font-family: "Aeonik"; src: url("../fonts/aeonik-semibold.woff2") format("woff2"); font-weight: 500 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/JetBrainsMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/JetBrainsMono-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ───────────── Tokens (sampled from the background art) ───────────── */
:root {
  --bg: #0e1023;
  --bg-raised: #151935;
  --panel: rgba(24, 28, 58, 0.66);
  --panel-solid: #181c3a;
  --line: rgba(170, 180, 255, 0.13);
  --line-strong: rgba(170, 180, 255, 0.26);
  --text: #eceaf6;
  --muted: #a9acd0;
  --dim: #7b80a8;
  --peach: #f5c89e;
  --peach-deep: #ea9a72;
  --sky: #9ccff0;
  --lavender: #b7b9f2;
  --code-bg: rgba(8, 10, 26, 0.72);
  --radius: 14px;
  --radius-sm: 9px;
  --display: "Aeonik", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
  color-scheme: dark;
}

/* ───────────── Base ───────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--peach); text-decoration: underline; text-decoration-color: rgba(245, 200, 158, 0.35); text-underline-offset: 3px; transition: color .15s, text-decoration-color .15s; }
a:hover { text-decoration-color: currentColor; }
a .i { width: .9em; height: .9em; vertical-align: -1px; margin-left: 2px; }
code, pre, kbd { font-family: var(--mono); }
:not(pre) > code {
  font-size: .84em;
  padding: .12em .4em;
  border-radius: 6px;
  background: rgba(156, 207, 240, 0.09);
  border: 1px solid rgba(156, 207, 240, 0.14);
  color: #d7ecfa;
  overflow-wrap: anywhere;
}
h1, h2, h3, h4, .btn, .avatar, .picker-list strong, .people strong { font-family: var(--display); }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--peach); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(245, 200, 158, 0.35); }

.i { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* The artwork, fixed behind the whole page and dimmed as you scroll past the hero */
.backdrop {
  position: fixed; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(14,16,35,0) 0%, rgba(14,16,35,.55) 45%, rgba(14,16,35,.93) 80%),
    url("../img/background.jpg") 42% 30% / cover no-repeat,
    var(--bg);
}
.backdrop::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(14, 16, 35, var(--dim-amount, 0));
  transition: background .2s linear;
}
@media (max-width: 720px) {
  .backdrop { background-image: linear-gradient(180deg, rgba(14,16,35,0) 0%, rgba(14,16,35,.55) 45%, rgba(14,16,35,.93) 80%), url("../img/background-sm.jpg"); }
}

/* ───────────── Announcement ───────────── */
.announcement {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px var(--gutter);
  font-family: var(--mono); font-size: 13px; letter-spacing: .01em;
  color: #1b1830; background: linear-gradient(90deg, var(--peach), #f7d9bb 50%, var(--sky));
  text-align: center;
}
.pulse { width: 8px; height: 8px; align-self: center; border-radius: 50%; background: #1b1830; flex: none; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* ───────────── Hero ───────────── */
.hero { position: relative; min-height: min(92vh, 860px); display: flex; align-items: flex-end; padding: 28px var(--gutter) clamp(48px, 9vh, 96px); }
.hero-inner { width: 100%; max-width: var(--max); margin: 0 auto; }
.brand {
  position: absolute; top: 28px;
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
}
.brand .logo { height: 22px; width: auto; }

.eyebrow {
  display: inline-block; margin: 0 0 18px; padding: 6px 12px;
  font-family: var(--mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--peach);
  border: 1px solid rgba(245, 200, 158, .32); border-radius: 999px;
  background: rgba(14, 16, 35, .4); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hero h1 {
  font-size: clamp(48px, 9.5vw, 116px); font-weight: 600; letter-spacing: -0.035em; line-height: .95;
  text-shadow: 0 2px 40px rgba(14, 16, 35, .5);
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #fff4e6 0%, var(--peach) 35%, var(--sky) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { max-width: 34em; margin: 22px 0 0; font-size: clamp(18px, 2vw, 21px); color: #d6d6ec; }

.meta { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 22px 0 0; color: var(--muted); font-size: 15px; }
.meta li { display: inline-flex; align-items: center; gap: 7px; }
.meta a { color: inherit; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 20px; border-radius: 999px;
  font-weight: 500; font-size: 16px; text-decoration: none; line-height: 1;
  transition: transform .15s, background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #1a1730; background: var(--peach); box-shadow: 0 8px 30px -8px rgba(245, 200, 158, .55); }
.btn-primary:hover { background: #f8d5b2; }
.btn-sm { padding: 10px 16px; font-size: 15px; margin-top: 6px; }
.btn-ghost { color: var(--text); background: rgba(24, 28, 58, .45); border: 1px solid var(--line-strong); }
.btn-ghost:hover { border-color: rgba(245, 200, 158, .55); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ───────────── Layout ───────────── */
.layout {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 64px;
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 56px;
}
main { min-width: 0; }

.toc { position: sticky; top: 28px; align-self: start; padding-top: 6px; }
.toc-title { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--dim); margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a {
  display: block; padding: 6px 0 6px 16px; margin-left: -1px;
  font-size: 14.5px; color: var(--muted); text-decoration: none;
  border-left: 1px solid transparent; transition: color .15s, border-color .15s;
}
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--peach); border-left-color: var(--peach); }

@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc {
    position: sticky; top: 0; z-index: 10;
    margin: 0 calc(var(--gutter) * -1) 8px; padding: 10px var(--gutter);
    background: rgba(14, 16, 35, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
  }
  .toc-title { display: none; }
  .toc ol { display: flex; gap: 6px; border: 0; overflow-x: auto; scrollbar-width: none; }
  .toc ol::-webkit-scrollbar { display: none; }
  .toc a { white-space: nowrap; padding: 6px 12px; margin: 0; border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; }
  .toc a.active { border-color: rgba(245, 200, 158, .5); background: rgba(245, 200, 158, .08); }
  html { scroll-padding-top: 70px; }
}

/* ───────────── Sections ───────────── */
.section { padding: 56px 0 8px; }
.section + .section { border-top: 1px solid var(--line); margin-top: 48px; }
.section-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 26px; }
.num { font-family: var(--mono); font-size: 14px; color: var(--peach); letter-spacing: .04em; }
.num .i { width: 18px; height: 18px; vertical-align: -3px; }
.section-head h2 { font-size: clamp(30px, 4vw, 42px); letter-spacing: -0.025em; }
.tag { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--sky); border: 1px solid rgba(156, 207, 240, .35); padding: 3px 9px; border-radius: 999px; align-self: center; }
.section-lede { color: var(--muted); font-size: 18px; margin: -10px 0 28px; max-width: 40em; }

.prose { max-width: 42em; }
.prose p, .prose li { color: #d3d4ea; }
.prose strong { color: var(--text); font-weight: 600; }
.prose ol, .prose ul { padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--dim); font-family: var(--mono); font-size: .85em; }
.intro p:first-child { font-size: clamp(19px, 2.1vw, 22px); line-height: 1.55; color: var(--text); }

/* Cards */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.card h3 { font-size: 21px; margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card .card-label {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px !important;
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted);
}
.card .card-label .i { color: var(--peach); }

/* Event */
.event-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.prize { background: linear-gradient(150deg, rgba(245, 200, 158, .16), rgba(24, 28, 58, .66) 55%); border-color: rgba(245, 200, 158, .28); }
.reward { font-family: var(--mono); color: var(--peach); font-size: 15px; }
.prize p, .deadline p, .help dd { color: #d3d4ea; font-size: 15.5px; }
.help dl { margin: 0; display: grid; gap: 12px; }
.help dt { font-size: 13px; color: var(--dim); }
.help dd { margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.timeline li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; font-size: 15.5px; }
.timeline time { font-family: var(--mono); font-size: 13px; color: var(--peach); padding-top: 2px; }
.timeline em { display: block; font-style: normal; color: var(--dim); font-size: 14px; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.people li { display: flex; gap: 12px; align-items: center; }
.people strong { display: block; font-weight: 500; }
.people em { display: block; font-style: normal; color: var(--dim); font-size: 14px; }
.people a, .people code { font-size: 14px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-weight: 600; color: #1a1730; background: linear-gradient(135deg, var(--peach), var(--sky));
}
.notes { margin-top: 16px; max-width: none; }
.notes > :last-child { margin-bottom: 0; }

/* Picker (home page) */
.picker { padding-top: 56px; }
.picker h2 { font-size: 24px; }
.picker-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.picker-list a {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px;
  padding: 16px 18px; border-radius: var(--radius); text-decoration: none; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); transition: border-color .15s, transform .15s;
}
.picker-list a:hover { border-color: rgba(245, 200, 158, .5); transform: translateY(-2px); }
.picker-list strong { font-weight: 500; }
.picker-list span { grid-column: 1; font-size: 14px; color: var(--dim); }
.picker-list .i { grid-row: 1 / span 2; grid-column: 2; color: var(--peach); }

/* Features */
.features { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.feature { grid-column: span 2; position: relative; padding: 24px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); overflow: hidden; }
.feature:nth-child(4), .feature:nth-child(5) { grid-column: span 3; }
.feature::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(245, 200, 158, .5), transparent); opacity: 0; transition: opacity .2s; }
.feature:hover::before { opacity: 1; }
.feature-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; margin-bottom: 18px; color: var(--peach); background: rgba(245, 200, 158, .1); border: 1px solid rgba(245, 200, 158, .2); }
.feature-icon .i { width: 22px; height: 22px; }
.feature h3 { font-size: 20px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 15.5px; margin: 0; }
@media (max-width: 860px) {
  .features { grid-template-columns: 1fr 1fr; }
  .feature, .feature:nth-child(4), .feature:nth-child(5) { grid-column: span 1; }
  .feature:last-child:nth-child(odd) { grid-column: span 2; }
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  .feature, .feature:last-child:nth-child(odd) { grid-column: auto; }
}

/* Ideas */
.ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; counter-reset: idea; }
.idea { display: flex; flex-direction: column; padding: 22px; border-radius: var(--radius); background: rgba(24, 28, 58, .5); border: 1px solid var(--line); transition: border-color .15s, background .15s; }
.idea:hover { border-color: var(--line-strong); background: rgba(24, 28, 58, .72); }
.idea-num { font-family: var(--mono); font-size: 12.5px; color: var(--dim); margin-bottom: 14px; }
.idea h3 { font-size: 18.5px; margin-bottom: 8px; }
.idea p { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
.idea-other { border-style: dashed; border-color: rgba(245, 200, 158, .35); background: transparent; justify-content: center; }
.idea-other .idea-num { color: var(--peach); }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; max-width: 46em; }
.steps > li { position: relative; padding: 0 0 34px 52px; counter-increment: step; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--mono); font-size: 14px; color: var(--peach);
  background: var(--bg-raised); border: 1px solid rgba(245, 200, 158, .4);
}
.steps > li:not(:last-child)::after { content: ""; position: absolute; left: 16px; top: 36px; bottom: 6px; width: 1px; background: linear-gradient(var(--line-strong), transparent); }
.steps h3 { font-size: 20px; margin-bottom: 10px; }
.steps p { color: #d3d4ea; }
.next { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); margin: 0; }

.callout {
  margin: 4px 0 18px; padding: 12px 16px; font-size: 15px; color: var(--muted);
  border-radius: var(--radius-sm); background: rgba(156, 207, 240, .06); border: 1px solid rgba(156, 207, 240, .16);
}
.section-note { max-width: 42em; margin-bottom: 28px; }
.section-note > :last-child { margin-bottom: 0; }

/* Code blocks */
.code { margin: 6px 0 18px; border-radius: 12px; overflow: hidden; background: var(--code-bg); border: 1px solid var(--line); }
.code-bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 16px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; color: var(--dim); letter-spacing: .06em; text-transform: uppercase; }
.copy {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 7px; cursor: pointer;
  font: 500 12px var(--mono); color: var(--muted); background: transparent; border: 1px solid transparent; text-transform: none; letter-spacing: 0;
  transition: color .15s, background .15s, border-color .15s;
}
.copy:hover { color: var(--text); background: rgba(255, 255, 255, .06); border-color: var(--line); }
.copy.copied { color: #a8e6b8; }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-size: 14px; line-height: 1.7; color: #e6e7f5; tab-size: 2; }
.code .c { color: var(--dim); font-style: italic; }
.code .cmd { color: var(--peach); }
.code .flag { color: var(--sky); }
.code .str { color: #c5e8b7; }

/* Continuous memory */
.subsection { max-width: 46em; margin-bottom: 36px; }
.subsection p { color: #d3d4ea; }
.sub-title { display: flex; align-items: center; gap: 12px; font-size: 23px; margin-bottom: 16px; }
.sub-title span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; font: 500 13px var(--mono); color: #1a1730; background: linear-gradient(135deg, var(--peach), var(--sky)); }
.subsection h4 { font-size: 17px; margin: 30px 0 10px; color: var(--text); }
q { color: var(--text); }
q::before, q::after { color: var(--peach); }
.disclosure { margin: 8px 0 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(24, 28, 58, .4); }
.disclosure summary { cursor: pointer; padding: 12px 16px; font-weight: 500; list-style: none; display: flex; align-items: center; gap: 10px; }
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::before { content: "+"; font-family: var(--mono); color: var(--peach); width: 14px; }
.disclosure[open] summary::before { content: "–"; }
.disclosure > :not(summary) { margin-left: 16px; margin-right: 16px; }
.disclosure > :last-child { margin-bottom: 16px; }

/* Submission */
.submit-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: start; margin-bottom: 20px; }
.submit-grid .prose h3 { font-size: 20px; margin: 4px 0 12px; }
@media (max-width: 860px) { .submit-grid { grid-template-columns: 1fr; } }
.checklist { list-style: none; margin: 0 0 8px; padding: 0; }
.checklist li + li { border-top: 1px solid var(--line); }
.checklist label { display: flex; gap: 12px; padding: 11px 0; cursor: pointer; font-size: 15.5px; color: #d3d4ea; }
.checklist input { position: absolute; opacity: 0; pointer-events: none; }
.box { width: 20px; height: 20px; flex: none; margin-top: 2px; border-radius: 6px; border: 1.5px solid var(--line-strong); display: grid; place-items: center; transition: background .15s, border-color .15s; }
.box .i { width: 14px; height: 14px; stroke-width: 2.6; color: #1a1730; opacity: 0; transition: opacity .15s; }
.checklist input:checked + .box { background: var(--peach); border-color: var(--peach); }
.checklist input:checked + .box .i { opacity: 1; }
.checklist input:checked ~ span { color: var(--dim); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .25); }
.checklist input:checked ~ span strong { color: var(--dim); }
.checklist input:focus-visible + .box { outline: 2px solid var(--peach); outline-offset: 2px; }
.checklist strong { font-weight: 500; color: var(--text); }
.crumbs { font-family: var(--mono); font-size: .86em; color: var(--sky); }


/* Resources */
.resources { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.resources a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 100%;
  padding: 15px 18px; border-radius: var(--radius-sm); text-decoration: none; color: var(--text);
  background: rgba(24, 28, 58, .5); border: 1px solid var(--line); transition: border-color .15s, background .15s;
}
.resources a:hover { border-color: rgba(245, 200, 158, .45); background: rgba(24, 28, 58, .8); }
.resources .i { color: var(--peach); }


@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .backdrop, .toc, .copy, .announcement { display: none !important; }
  body { background: #fff; color: #111; }
  .hero { min-height: 0; padding-top: 80px; }
  .card, .feature, .idea, .code { background: none !important; border-color: #ccc; }
}
