/* The Open Challenge. Same tokens as the basic site (src/page.html): near-black, fog, teal, Outfit.
   Challenge IDs are real data, so they use JetBrains Mono. No shadows, no black borders. */
:root {
  --black: #080A0C; --fog: #E0E7EB; --teal: #1AE6D5; --teal-ink: #03211E;
  --muted: rgba(224, 231, 235, .7); --hair: rgba(224, 231, 235, .14); --hair-2: rgba(224, 231, 235, .3);
  --field: #0E1316; --warn: #F2B8A2; --ok: #7FE3A8;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(1rem, 4vw, 3rem); --wide: 80rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; background: var(--black); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--black); color: var(--fog); font-family: "Outfit", "Helvetica Neue", Arial, sans-serif; font-size: 1.125rem; line-height: 1.6; }
a { color: var(--teal); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; padding: .75rem 1rem; background: var(--teal); color: var(--teal-ink); z-index: 30; }
.skip:focus { left: 1rem; top: 1rem; }
.wrap { max-width: var(--wide); margin-inline: auto; padding-inline: var(--gutter); }
p { max-width: 64ch; margin: 0 0 1rem; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.fine { color: var(--muted); font-size: 1rem; }
.cid { font-family: var(--mono); font-size: .95rem; color: var(--fog); letter-spacing: 0; }
.draft-banner { margin: 0; max-width: none; padding: .6rem var(--gutter); background: #F2B8A2; color: #2A1008; font-weight: 500; text-align: center; }

/* Top bar */
.bar { position: sticky; top: 0; z-index: 10; background: rgba(8, 10, 12, .84); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--hair); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px; }
.bar-name { color: var(--fog); text-decoration: none; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.bar nav { display: flex; align-items: center; gap: .25rem 1.5rem; }
.bar nav .nav-ac { color: var(--teal); font-weight: 500; }
.bar nav a { color: rgba(224, 231, 235, .85); text-decoration: none; padding: .6rem 0; font-size: 1rem; white-space: nowrap; }
.bar nav a:hover { color: #fff; }
.bar nav a[aria-current] { color: #fff; border-bottom: 2px solid var(--teal); }
.bar nav .btn { min-height: 38px; padding: 0 1.1rem; font-size: .95rem; color: var(--teal-ink); border-bottom: 0; }
.bar nav .btn:hover { color: var(--teal-ink); }
@media (max-width: 40rem) { .bar nav .nav-extra { display: none; } .bar nav { gap: .9rem; } .bar nav a { font-size: .95rem; } .bar nav .btn { padding: 0 .85rem; font-size: .9rem; } }
@media (max-width: 56rem) { .bar nav .nav-x { display: none; } }
@media (max-width: 30rem) { .bar-name .nm-x { display: none; } .bar .wrap { gap: .5rem; } .bar nav { gap: .7rem; } }
@media (max-width: 30rem) { .bar { position: static; } .bar .wrap { flex-wrap: wrap; row-gap: .15rem; padding-block: .4rem; } .bar nav { flex-wrap: wrap; width: 100%; gap: .1rem .9rem; } .bar nav a { padding: .45rem 0; } .bar nav .btn { margin-left: auto; } }
@media (max-width: 24rem) { .bar-name { font-size: .95rem; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 1.5rem; border-radius: 980px; font: inherit; font-weight: 500; font-size: 1.05rem; text-decoration: none; cursor: pointer; border: 1.5px solid transparent; text-align: center; }
.btn-main { background: var(--teal); color: var(--teal-ink); }
.btn-main:hover { background: #5CF0E3; color: var(--teal-ink); }
.btn-line { border-color: var(--hair-2); color: var(--fog); background: transparent; }
.btn-line:hover { border-color: var(--teal); color: #fff; }
.btn-big { min-height: 54px; padding: 0 2rem; font-size: 1.15rem; }
button.btn[disabled] { opacity: .6; cursor: progress; }

/* Hero */
.hero { padding-block: clamp(3.5rem, 9vw, 7rem) clamp(2rem, 5vw, 3.5rem); }
.eyebrow { color: var(--teal); font-size: 1.1rem; font-weight: 500; margin-bottom: 1.25rem; }
.hero h1 { font-size: clamp(3.1rem, 10.5vw, 9rem); line-height: .93; letter-spacing: -.05em; font-weight: 650; max-width: 11ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.hero-copy { columns: 2 22rem; column-gap: clamp(2rem, 5vw, 4rem); margin-bottom: 2.25rem; max-width: 62rem; }
.hero-copy p { break-inside: avoid; color: var(--fog); font-size: 1.2rem; line-height: 1.5; }
.hero-copy p:nth-child(3) { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem 1rem; max-width: none; }
.stats { display: flex; flex-wrap: wrap; gap: 1.25rem clamp(1.5rem, 4vw, 3.5rem); margin: clamp(2.5rem, 6vw, 4rem) 0 0; padding: 1.25rem 0 0; border-top: 1px solid var(--hair); }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dt { color: var(--muted); font-size: 1rem; }
.stats dd { margin: 0; font-size: 2rem; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }

/* How it works: a real sequence */
.how { padding-block: clamp(2.5rem, 6vw, 4.5rem); border-top: 1px solid var(--hair); }
.how h2, .builds h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1.75rem; }
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem clamp(1.25rem, 3vw, 2.5rem); margin: 0 0 1.5rem; padding: 0; list-style: none; }
.steps li { counter-increment: s; border-top: 2px solid var(--teal); padding-top: 1rem; }
.steps li::before { content: counter(s); font-family: var(--mono); color: var(--muted); font-size: .95rem; display: block; margin-bottom: .6rem; }
.steps h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.steps p { color: var(--muted); margin: 0; font-size: 1.05rem; }
@media (max-width: 62rem) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 34rem) { .steps { grid-template-columns: 1fr; } }

/* Directory */
.builds { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5rem); border-top: 1px solid var(--hair); }
.builds-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 2rem; margin-bottom: 1rem; }
.builds-head h2 { margin-bottom: .5rem; }
.builds-head p { margin: 0 0 .5rem; max-width: 46ch; }
.tools { display: grid; grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)); gap: .75rem 1rem; align-items: end; padding: 1.25rem 0; border-block: 1px solid var(--hair); margin-bottom: 0; }
.tools[hidden] { display: none; }
.tools .f { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.tools label { font-size: .95rem; color: var(--muted); }
.count { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 1rem; min-height: 1.5rem; max-width: none; }
@media (max-width: 62rem) { .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tools .f-search { grid-column: 1 / -1; } }
@media (max-width: 30rem) { .tools { grid-template-columns: 1fr; } }
input, select, textarea { width: 100%; font: inherit; font-size: 1.05rem; color: var(--fog); background: var(--field); border: 1px solid var(--hair-2); border-radius: 8px; padding: .7rem .85rem; min-height: 48px; }
input[type="search"] { -webkit-appearance: none; appearance: none; }
textarea { resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: rgba(224, 231, 235, .5); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--teal); outline-offset: 1px; border-color: var(--teal); }
select option { background: #12171A; color: var(--fog); }
input[type="radio"] { width: 1.3rem; min-height: 0; height: 1.3rem; accent-color: var(--teal); flex: none; margin-top: .2rem; }
input[type="file"] { padding: .55rem; }

.entry { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.25rem, 3vw, 3rem); padding-block: clamp(1.75rem, 4vw, 3rem); border-bottom: 1px solid var(--hair); align-items: start; }
.entry:not(.has-shot) { grid-template-columns: 1fr; }
.entry[hidden] { display: none; }
.shot { display: block; background: #12171A; border: 1px solid var(--hair); border-radius: 8px; overflow: hidden; }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.entry-top { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: .6rem; max-width: none; }
.entry h3 { font-size: clamp(1.9rem, 4vw, 2.9rem); letter-spacing: -.035em; margin-bottom: 1rem; }
.entry h3 a { color: var(--fog); text-decoration: none; }
.entry h3 a:hover { color: var(--teal); }
.entry .problem span, .entry .solution span { display: block; color: var(--muted); font-size: .95rem; }
.entry .problem, .entry .solution { margin-bottom: 1rem; }
.entry .note { color: var(--muted); border-left: 2px solid var(--hair-2); padding-left: .9rem; font-size: 1.05rem; }
.meta { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin: 1.25rem 0; padding: 0; }
.meta div { min-width: 0; }
.meta dt { color: var(--muted); font-size: .9rem; }
.meta dd { margin: 0; font-size: 1.02rem; }
.entry-links { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; align-items: center; max-width: none; margin: 0; }
.entry-links a { font-weight: 500; }
.quiet { color: var(--muted); font-size: 1rem; }
@media (max-width: 52rem) { .entry { grid-template-columns: 1fr; } }
.empty { padding: 3rem 0; }
.empty[hidden] { display: none; }
.more { color: var(--muted); padding-top: 1.75rem; font-size: 1rem; margin: 0; }

/* Status chips: restrained, a word and a dot */
.chip { display: inline-flex; align-items: center; gap: .5rem; font-size: .95rem; line-height: 1; padding: .4rem .8rem; border: 1px solid var(--hair-2); border-radius: 980px; color: var(--fog); white-space: nowrap; }
.chip::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; border: 1.5px solid var(--muted); }
.chip.s-researching, .chip.s-designing, .chip.s-building, .chip.s-testing, .chip.s-iterating { border-color: rgba(26, 230, 213, .5); }
.chip.s-researching::before, .chip.s-designing::before, .chip.s-building::before, .chip.s-testing::before, .chip.s-iterating::before { background: var(--teal); border-color: var(--teal); }
.chip.s-prototype-delivered::before, .chip.s-completed::before { background: var(--fog); border-color: var(--fog); }
.chip.s-archived { color: var(--muted); }

/* Challenge page */
.crumbs { padding-top: 1.5rem; color: var(--muted); font-size: 1rem; }
.crumbs a { color: var(--muted); }
.c-hero { padding-block: clamp(1.5rem, 4vw, 3rem) clamp(2rem, 5vw, 3.5rem); }
.c-hero h1 { font-size: clamp(2.8rem, 9vw, 7rem); line-height: .95; letter-spacing: -.05em; font-weight: 650; margin-bottom: 1.5rem; overflow-wrap: anywhere; }
.c-lede { font-size: clamp(1.2rem, 2.2vw, 1.5rem); line-height: 1.45; max-width: 44rem; }
.c-hero .note { color: var(--muted); border-left: 2px solid var(--teal); padding-left: 1rem; max-width: 44rem; }
.c-grid { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); padding-bottom: 3rem; align-items: start; }
.rail { position: sticky; top: 5rem; border-top: 1px solid var(--hair); padding-top: 1.25rem; }
.facts { flex-direction: column; gap: .9rem; margin-top: 0; }
.rail nav ul { list-style: none; margin: 1.5rem 0 0; padding: 1.25rem 0 0; border-top: 1px solid var(--hair); display: grid; gap: .25rem; }
.rail nav a { color: var(--muted); text-decoration: none; display: block; padding: .3rem 0; font-size: 1rem; }
.rail nav a:hover { color: var(--teal); }
@media (max-width: 60rem) { .c-grid { grid-template-columns: 1fr; } .rail { position: static; } .rail nav { display: none; } .facts { flex-direction: row; } }
.c-main { max-width: 46rem; min-width: 0; }
.sec { padding-block: clamp(2rem, 5vw, 3.25rem); border-top: 1px solid var(--hair); }
.sec:first-child { border-top: 0; padding-top: 0; }
.sec > h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); margin-bottom: 1.25rem; }
.sub { margin-top: 1.5rem; }
.sub h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: 0; margin-bottom: .4rem; color: var(--fog); }
.sub p:last-child, .sub ul { margin-bottom: 0; }
.sec ul { padding-left: 1.25rem; margin: 0 0 1rem; }
.sec li { margin-bottom: .4rem; max-width: 62ch; }
.lede p { font-size: 1.3rem; line-height: 1.45; }
blockquote { margin: 0 0 1rem; padding: .25rem 0 .25rem 1.25rem; border-left: 2px solid var(--teal); font-size: 1.25rem; }
blockquote footer { color: var(--muted); font-size: 1rem; }
.media { display: grid; gap: 1.5rem; margin: 1.5rem 0; }
.media figure { margin: 0; }
.media img, .timeline img { display: block; width: 100%; height: auto; border: 1px solid var(--hair); border-radius: 8px; background: #12171A; }
.media figcaption { color: var(--muted); font-size: 1rem; margin-top: .5rem; }
.how-d { border-top: 1px solid var(--hair); }
.how-d:last-of-type { border-bottom: 1px solid var(--hair); }
.how-d summary { cursor: pointer; padding: 1rem 2rem 1rem 0; font-weight: 500; font-size: 1.15rem; list-style: none; position: relative; min-height: 48px; }
.how-d summary::-webkit-details-marker { display: none; }
.how-d summary::after { content: "+"; position: absolute; right: .25rem; top: .85rem; font-size: 1.5rem; line-height: 1; color: var(--teal); font-weight: 400; }
.how-d[open] summary::after { content: "\2212"; }
.d-body { padding: 0 0 1rem; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--hair-2); }
.timeline li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; padding: 0 0 2rem 1.5rem; position: relative; margin: 0; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: .55rem; width: 9px; height: 9px; border-radius: 50%; background: var(--black); border: 2px solid var(--teal); }
.when { font-family: var(--mono); font-size: .9rem; color: var(--muted); padding-top: .25rem; }
.timeline h3 { font-size: 1.2rem; letter-spacing: -.01em; margin-bottom: .4rem; }
.timeline img { margin: .75rem 0; }
@media (max-width: 34rem) { .timeline li { grid-template-columns: 1fr; gap: .25rem; } }
.outcomes { list-style: none; padding: 0 !important; }
.outcomes li { display: flex; gap: .9rem; align-items: baseline; padding: .75rem 0; border-top: 1px solid var(--hair); margin: 0; }
.vf { flex: none; font-size: .85rem; padding: .2rem .6rem; border-radius: 980px; border: 1px solid var(--hair-2); color: var(--muted); }
.vf.yes { color: var(--ok); border-color: rgba(127, 227, 168, .45); }
.acts { display: flex; flex-wrap: wrap; gap: .75rem 1rem; margin-bottom: 1.25rem; }
.access-note { padding: .9rem 1.1rem; border: 1px solid var(--hair-2); border-radius: 8px; }
.access-note[hidden] { display: none; }

/* Closing call to action */
.close { text-align: left; padding-block: clamp(3.5rem, 9vw, 7rem); border-top: 1px solid var(--hair); }
.close h2 { font-size: clamp(2.4rem, 7vw, 5rem); letter-spacing: -.04em; line-height: 1; max-width: 14ch; margin-bottom: 1.25rem; }
.close p { color: var(--muted); font-size: 1.2rem; margin-bottom: 1.75rem; }

/* Forms */
.submit { padding-block: clamp(1.5rem, 4vw, 3rem) clamp(3rem, 7vw, 5rem); max-width: 52rem; }
.submit h1 { font-size: clamp(2.4rem, 7vw, 4.5rem); letter-spacing: -.045em; line-height: 1; margin-bottom: 1rem; }
.form { display: grid; gap: 1.5rem; margin-top: 2rem; }
.field label, fieldset legend { display: block; font-weight: 500; font-size: 1.1rem; margin-bottom: .35rem; }
.field .opt { color: var(--muted); font-weight: 400; }
.hint { color: var(--muted); font-size: 1rem; margin: 0 0 .5rem; }
.field.big textarea { font-size: 1.15rem; }
.field.bad input, .field.bad textarea { border-color: var(--warn); }
.err { color: var(--warn); font-size: 1rem; margin: .4rem 0 0; min-height: 0; max-width: none; }
.err:empty { display: none; }
.form-err { font-weight: 500; }
fieldset.perm { border: 1px solid var(--hair-2); border-radius: 10px; padding: 1.25rem 1.25rem 1rem; margin: 0; min-width: 0; }
fieldset.perm legend { padding: 0 .5rem; }
.radio { display: flex; gap: .75rem; align-items: flex-start; padding: .55rem 0; cursor: pointer; }
.more-d { border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); padding: .25rem 0; }
.more-d > summary { cursor: pointer; font-weight: 500; font-size: 1.1rem; padding: .9rem 0; min-height: 48px; color: var(--teal); }
.more-d[open] > summary { margin-bottom: .5rem; }
.more-d .field { margin-bottom: 1.25rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
@media (max-width: 36rem) { .grid2 { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 1rem 1.25rem; border: 1px solid var(--warn); border-radius: 8px; max-width: none; }
.notice[hidden] { display: none; }
.req { margin: 1rem 0; }
.req > summary { list-style: none; width: fit-content; }
.req > summary::-webkit-details-marker { display: none; }
.req[open] > summary { margin-bottom: 1rem; }
.req .form { margin-top: 0; max-width: 34rem; }
.plain { padding-left: 1.25rem; margin: 1.5rem 0 2rem; max-width: 46rem; }
.plain li { margin-bottom: .75rem; }

footer { border-top: 1px solid var(--hair); padding-block: 2rem 3rem; color: var(--muted); font-size: 1rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; }
footer p { margin: 0; }
