/* Warm, editorial look: cream page, ink type, one terracotta accent, dark pill buttons. */
:root {
  --bg: #f3ece6;
  --card: #fbf8f5;
  --ink: #1f1f1f;
  --ink2: #575451;
  --line: #e2d8cf;
  --accent: #c24e2a; /* the door */
  --light: #f4c46a; /* light from the room */
  --ok: #2f6b3a;
  --bad: #a93226;
  --radius: 24px;
  --head: "Stack Sans Headline", "Helvetica Neue", Arial, sans-serif;
  --text: "Stack Sans Text", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--text); }
a { color: var(--ink); text-underline-offset: 3px; }

.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 22px 24px; max-width: 1180px; margin: 0 auto; flex-wrap: wrap; }
.brand { display: flex; gap: 10px; align-items: center; font: 700 20px/1 var(--head); letter-spacing: -0.04em; text-decoration: none; }
.glyph { width: 18px; height: 26px; border-radius: 9px 9px 2px 2px; background: var(--accent); position: relative; }
.glyph::after { content: ""; position: absolute; right: 4px; top: 13px; width: 3px; height: 3px; border-radius: 50%; background: var(--bg); }
.top-right { display: flex; gap: 8px; align-items: center; }
.pill { border-radius: 999px; padding: 8px 14px; font-size: 14px; }
.pill.ghost { border: 1px solid var(--line); color: var(--ink2); }

.btn { font: 500 15px/1 var(--text); border-radius: 999px; padding: 13px 20px; min-height: 44px; cursor: pointer; border: 1px solid var(--ink); background: transparent; color: var(--ink); }
.btn.dark { background: var(--ink); color: var(--bg); }
.btn.dark:hover { background: #000; }
.btn:disabled { opacity: 0.55; cursor: default; }

.replay { max-width: 1180px; margin: 0 auto 8px; padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 14px; width: calc(100% - 48px); }
.replay a { color: var(--light); }

.hero { max-width: 1180px; margin: 0 auto; padding: 8px 24px 28px; display: grid; gap: 24px; grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.35fr 1fr; } }
.hero-text { display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 12px 0; }
.date-badge { align-self: flex-start; background: var(--ink); color: var(--bg); border-radius: 999px; padding: 7px 14px; font-size: 14px; }
h1.split { margin: 0; font: 700 clamp(48px, 7.4vw, 100px)/0.94 var(--head); letter-spacing: -0.055em; }
h1.split span { display: block; }
h1.split .a { color: var(--ink); }
h1.split .b { color: var(--accent); }
.lede { margin: 0; font-size: clamp(17px, 2vw, 20px); color: var(--ink2); max-width: 34em; }
.rule { margin: 0; font-size: 14px; color: var(--ink2); max-width: 46em; }

/* The door card: the leaf swings open as you show up (--open from 0 to 1). */
.door-card { background: var(--ink); color: var(--bg); border-radius: var(--radius); padding: 30px; display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: end; }
@media (max-width: 520px) { .door-card { grid-template-columns: 1fr; } }
.doorway { --open: 0; position: relative; width: 168px; height: 260px; border-radius: 84px 84px 6px 6px; background: var(--light); overflow: visible; perspective: 700px; box-shadow: 0 0 calc(var(--open) * 70px) rgba(244, 196, 106, 0.55); }
.room { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 22px; font: 700 15px/1 var(--head); color: var(--ink); letter-spacing: -0.02em; opacity: clamp(0, (var(--open) - 0.9) * 10, 1); }
.leaf { position: absolute; inset: 0; border-radius: 84px 84px 6px 6px; background: var(--accent); transform-origin: left center; transform: rotateY(calc(var(--open) * -68deg)); transition: transform 900ms cubic-bezier(.2,.7,.2,1); box-shadow: inset -10px 0 0 rgba(0,0,0,.12); }
.knob { position: absolute; right: 16px; top: 54%; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); }
#record .big { font: 700 34px/1 var(--head); letter-spacing: -0.04em; margin: 0 0 8px; }
#record p { margin: 0 0 6px; }
#record .soft, .door-card .soft { color: #c9c2bb; }
#record a { color: var(--light); }
.dots { display: flex; gap: 8px; margin: 2px 0 12px; }
.dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #6b6661; }
.dot.on { background: var(--accent); border-color: var(--accent); }

main { max-width: 1180px; margin: 0 auto; padding: 0 24px 24px; display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 900px) { main { grid-template-columns: 1fr 1fr; } .wide { grid-column: 1 / -1; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; min-width: 0; }
.kicker { font-size: 13px; color: var(--ink2); letter-spacing: 0.02em; }
.card h2 { margin: 6px 0 8px; font: 700 30px/1.05 var(--head); letter-spacing: -0.045em; }
.card h3 { margin: 14px 0 6px; font: 500 15px/1.2 var(--head); color: var(--ink2); letter-spacing: -0.01em; }
.muted { color: var(--ink2); }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.row > * { flex: 1 1 160px; min-width: 0; }
.row > .btn { flex: 0 0 auto; }
input, select { background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 12px 16px; font: 16px var(--text); min-height: 44px; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.status { min-height: 1.5em; margin: 12px 0 0; }
.status.ok { color: var(--ok); }
.status.bad { color: var(--bad); }
.bigcode { margin: 16px 0; text-align: center; font: 700 clamp(36px, 9vw, 72px)/1.1 var(--head); letter-spacing: 0.02em; color: var(--bg); background: var(--accent); border-radius: var(--radius); padding: 22px 8px; overflow-wrap: anywhere; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.badge { font-size: 13px; border-radius: 999px; padding: 3px 10px; border: 1px solid var(--line); white-space: nowrap; color: var(--ink2); }
.badge.proposed { background: var(--accent); border-color: var(--accent); color: #fff; }
.badge.voter { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.grid2 { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.session { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
footer { max-width: 1180px; margin: 0 auto; padding: 18px 24px 32px; color: var(--ink2); font-size: 14px; display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
