* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; }
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent); }

.proto { position: sticky; top: 0; z-index: 5; background: var(--ink); color: var(--bg); padding: 10px 16px; }
.proto-inner { max-width: 1080px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-size: .875rem; }
.proto strong { font-family: var(--font-display); letter-spacing: .08em; text-transform: uppercase; font-size: .75rem; }
.proto label { display: flex; align-items: center; gap: 10px; flex: 1 1 260px; min-width: 0; }
.proto input[type="range"] { flex: 1; min-width: 0; accent-color: var(--accent); }
.proto-note-wrap { background: var(--ink); color: var(--bg); padding: 0 16px 12px; }
.proto-note-wrap[hidden] { display: none; }
.proto-note { max-width: 1080px; margin: 0 auto; font-size: .8125rem; line-height: 1.45; }
.proto output { font-variant-numeric: tabular-nums; min-width: 12ch; }
.proto .btn-quiet { color: var(--bg); border-color: currentColor; }

.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 16px; padding-block: 40px 56px; }

.head { display: grid; gap: 28px; margin-bottom: 40px; }
@media (min-width: 900px) { .head { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: end; gap: 56px; } }
.head > * { min-width: 0; }
h1 { overflow-wrap: break-word; hyphens: auto; }
.brand { font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.brand b { color: var(--ink); font-weight: 600; }
.logo { display: block; width: auto; max-width: min(260px, 70%); object-fit: contain; object-position: left center; margin: 0 0 16px; }
.brand-sub::before { content: " · "; }
h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.1rem, 6.4vw, 3.9rem); line-height: 1.02; letter-spacing: -.02em; margin: 0 0 18px; text-wrap: balance; }
h1 em { font-style: normal; color: var(--accent); }
.lead { max-width: 52ch; color: var(--muted); margin: 0; }
.head.single { grid-template-columns: 1fr; }
.points { margin: 18px 0 0; padding-left: 1.2em; max-width: 52ch; color: var(--muted); }
.points li { margin-bottom: 6px; }

.signup { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; min-width: 0; }
.signup h2 { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.2; margin: 0 0 6px; }
.signup > p { margin: 0 0 14px; color: var(--muted); font-size: .9375rem; }
#brevo-slot { min-width: 0; overflow-x: auto; }
#brevo-slot form { display: grid; gap: 10px; }
#brevo-slot input[type="text"], #brevo-slot input[type="email"] { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-field, 8px); background: var(--field, #fff); color: #1a1a1a; }
#brevo-slot input::placeholder { color: #6b6b6b; }
#brevo-slot label { display: flex; gap: 8px; align-items: flex-start; font-size: .8125rem; line-height: 1.45; color: var(--muted); }
#brevo-slot label input[type="checkbox"] { margin-top: 3px; flex: none; accent-color: var(--accent-fill); }
#brevo-slot button[type="submit"] { justify-self: start; background: var(--accent-fill); color: var(--accent-ink); border: 0; border-radius: var(--radius-btn, 8px); padding: 11px 18px; font-weight: 600; cursor: pointer; }
.signup-fallback { margin: 0; padding: 12px; border: 1px dashed var(--muted); border-radius: 8px; font-size: .875rem; color: var(--muted); }

.btn { display: inline-block; background: var(--accent-fill); color: var(--accent-ink); border: 0; border-radius: 8px; padding: 11px 18px; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn-quiet { background: transparent; color: var(--ink); border: 1px solid var(--line); padding: 7px 12px; font-size: .8125rem; font-weight: 500; }

.status { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-bottom: 14px; font-size: .875rem; color: var(--muted); }
.status span[role="status"] { color: var(--ink); font-weight: 500; }

.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.door { position: relative; width: 100%; aspect-ratio: 1 / 1.12; display: flex; flex-direction: column; justify-content: space-between; text-align: left; padding: 14px 14px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; --star: var(--accent); }
.door::before { content: ""; position: absolute; inset: 6px; border: 1px solid currentColor; border-radius: 8px; opacity: .2; pointer-events: none; }
.door .num { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.9rem, 7vw, 2.7rem); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.door .meta { font-size: .75rem; line-height: 1.3; }
.door .star { position: absolute; top: 12px; right: 12px; width: 16px; height: 16px; color: var(--star); }
.door[data-state="open"] { background: var(--spruce); border-color: var(--spruce); color: var(--spruce-ink); --star: var(--spruce-ink); }
.door[data-state="open"] .meta { font-weight: 600; }
.door[data-state="seen"] { background: var(--bg); border-color: var(--spruce); color: var(--ink); }
.door[data-state="seen"] .meta { color: var(--muted); }
.door[data-highlight="1"][data-state="locked"] { border-color: var(--accent); }
.door:hover[data-state="open"] { filter: brightness(1.1); }
@media (prefers-reduced-motion: no-preference) {
  .door.shake { animation: shake .35s; }
  @keyframes shake { 20% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 80% { transform: translateX(-2px); } }
}

.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 18px 0 0; font-size: .8125rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend svg { width: 14px; height: 14px; color: var(--accent); }

.foot { margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .8125rem; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; }
.foot a { color: var(--muted); }
#foot-links a + a { margin-left: 16px; }

dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 26px 24px 24px; }
dialog::backdrop { background: rgba(8, 18, 13, .62); }
.dlg-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tag { display: inline-block; font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--spruce); color: var(--spruce-ink); }
.tag.hl { background: var(--accent-fill); color: var(--accent-ink); }
.dlg-date { font-size: .8125rem; color: var(--muted); margin-left: 10px; }
.dlg-close { background: transparent; border: 1px solid var(--line); border-radius: 8px; width: 36px; height: 36px; cursor: pointer; line-height: 1; font-size: 1.1rem; }
dialog h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 5vw, 2rem); line-height: 1.1; letter-spacing: -.01em; margin: 0 0 14px; text-wrap: balance; }
dialog p { margin: 0 0 12px; }
dialog ol { margin: 0 0 12px; padding-left: 1.3em; }
dialog ol li { margin-bottom: 6px; }
.codebox { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 14px; padding: 10px 12px; border: 1.5px dashed var(--accent); border-radius: 10px; }
.codebox code { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: .08em; }
.codebox small { flex: 1 1 100%; color: var(--muted); }
.video-ph { aspect-ratio: 16 / 9; max-width: 100%; border-radius: 10px; background: var(--spruce); color: var(--spruce-ink); display: grid; place-items: center; align-content: center; gap: 6px; margin-bottom: 14px; text-align: center; padding: 12px; font-size: .875rem; }
.video-ph svg { width: 44px; height: 44px; }
.dlg-note { margin: 12px 0 0; font-size: .8125rem; color: var(--muted); }
.example-flag { font-size: .8125rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; margin-top: 14px; }

.bonus { max-width: 640px; }
.bonus h1 { font-size: clamp(2rem, 6vw, 3rem); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.actions .btn-quiet { padding: 11px 18px; font-size: 1rem; font-weight: 600; }
