/* v12-sheet — «Лист записи»: a paper sign-up list on a cork board */
:root {
  --board: #7a5f41;
  --board-deep: #5e4832;
  --paper: #fbfaf6;
  --ink: #1c1b18;
  --ink-soft: #5a564d;
  --rule: #c9c3b6;
  --rule-strong: #8f887a;
  --accent: #1f4fa3;
  --accent-deep: #163c7d;
  --hl: #e8eefb;
  --clip: #2b2a27;
  --text: "Golos Text", system-ui, sans-serif;
  --display: "Tenor Sans", Georgia, serif;
  --measure: 66ch;
}
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--board);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.55;
}
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-deep); }
p { margin: 0 0 1rem; max-width: var(--measure); }
h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.15; margin: 0 0 0.6rem; }
h1 { font-size: 2.4rem; letter-spacing: -0.01em; text-wrap: balance; }
h2 { font-size: 1.55rem; }
.muted { color: var(--ink-soft); }

/* board + sheets */
.board { padding: 2.5rem 1rem 3rem; display: grid; gap: 1.5rem; justify-items: center; }
.sheet, .paper {
  position: relative;
  width: 100%;
  max-width: 56rem;
  background: var(--paper);
  border-radius: 3px;
  box-shadow: 0 10px 28px rgba(30, 20, 10, 0.35);
}
.sheet { padding-top: 2.75rem; margin-top: 1.25rem; }
.clip {
  position: absolute; top: -1.25rem; left: 50%; transform: translateX(-50%);
  width: 9rem; height: 2.25rem; background: var(--clip); border-radius: 0 0 8px 8px;
}
.clip::after {
  content: ""; position: absolute; left: 50%; top: 0.55rem; transform: translateX(-50%);
  width: 3.5rem; height: 0.4rem; border-radius: 0.2rem; background: #8e8b84;
}
.sheet-head { padding: 0.5rem 1rem 1.5rem; }
.lede { font-size: 1.2rem; line-height: 1.4; max-width: 34ch; }
.support { color: var(--ink-soft); max-width: 52ch; }

/* printed header fields */
.facts { margin: 1.25rem 0 1.5rem; max-width: 40rem; border-top: 1px solid var(--rule-strong); }
.facts div { display: grid; grid-template-columns: 5.5rem 1fr; gap: 0 0.75rem; padding: 0.45rem 0; border-bottom: 1px solid var(--rule); }
.facts dt { color: var(--ink-soft); font-size: 0.9rem; }
.facts dd { margin: 0; font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }

/* buttons */
.btn {
  display: inline-block; font: inherit; font-weight: 500; line-height: 1.3; cursor: pointer;
  padding: 0.85rem 1.4rem; border-radius: 4px; border: 1.5px solid var(--accent);
  text-decoration: none; transition: background-color 0.2s ease-out, color 0.2s ease-out, transform 0.2s ease-out;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.btn--primary:active { transform: translateY(1px); }
.btn--secondary { background: transparent; color: var(--accent); }
.btn--secondary:hover { background: var(--hl); color: var(--accent-deep); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn[data-loading]::after { content: "…"; }
.text-link { font-size: 0.95rem; }

/* the list */
.list-head { padding: 0 1rem; }
.list-head h2 { margin-top: 0.5rem; }
.preview-note { font-size: 0.85rem; color: var(--ink-soft); padding: 0.3rem 0.6rem; border: 1px dashed var(--rule-strong); border-radius: 3px; display: inline-block; }
.columns { display: none; }
.lines { list-style: none; margin: 0; padding: 0.5rem 0 0; border-top: 1.5px solid var(--rule-strong); }
.entry { position: relative; border-bottom: 1px solid var(--rule); }
.entry--empty { height: 2.75rem; }
.entry--desk { display: none; }
.num { position: absolute; left: 0; width: 2.75rem; text-align: center; color: var(--ink-soft); font-size: 0.9rem; top: 0.9rem; }
.entry--empty .num { top: 0.75rem; }
.entry--yours {
  background: linear-gradient(var(--hl), var(--hl)) no-repeat 0 0 / 100% 100%;
  animation: draw-in 900ms cubic-bezier(0.16, 1, 0.3, 1) 150ms both;
}
@keyframes draw-in { from { background-size: 40% 100%; } to { background-size: 100% 100%; } }
@media (prefers-reduced-motion: reduce) { .entry--yours { animation: none; } }
.entry--yours form, .entry--yours .done { padding: 0.9rem 1rem 1rem 2.75rem; }
.yours-tag { position: absolute; right: 1rem; top: 0.55rem; font-size: 0.8rem; color: var(--accent); }
.entry--yours .num { color: var(--accent); font-weight: 700; }

/* form rows as ruled lines */
.row { padding: 0.5rem 0 0.7rem; border-bottom: 1px solid var(--rule); }
.row:last-child { border-bottom: 0; }
.row > label, legend, .field label { display: block; font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 0.3rem; padding: 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
input[type="text"], input[type="email"], input[type="tel"] {
  width: 100%; max-width: 32rem; font: inherit; color: var(--ink); background: transparent;
  border: 0; border-bottom: 1.5px solid var(--rule-strong); border-radius: 0; padding: 0.35rem 0.1rem;
  caret-color: var(--accent);
}
input::placeholder { color: #6d685e; }
input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1.5px 0 var(--accent); }
.choice, .tick { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0.2rem 1.25rem 0.2rem 0; cursor: pointer; }
input[type="radio"], input[type="checkbox"] { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); margin: 0; }
.field { margin-top: 0.6rem; }
.consent { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.95rem; }
.consent input { margin-top: 0.25rem; flex: none; }
.row--submit { padding-top: 0.9rem; }
.row--submit .btn { margin-bottom: 0.75rem; }
.micro { font-size: 0.85rem; color: var(--ink-soft); margin: 0; }
.honest { padding: 1rem 1rem 1.5rem; color: var(--ink-soft); font-size: 0.95rem; }

/* line 1 filled in */
.done { background: var(--hl); }
.done-title { font-family: var(--display); font-size: 1.3rem; margin-bottom: 0.4rem; }
.done p { margin-bottom: 0.5rem; }

/* pinned sheets */
.paper { padding: 1.5rem 1rem 1.75rem; }
.concepts, .faq { margin: 1rem 0 0; border-top: 1px solid var(--rule-strong); }
.concepts div, .faq div { padding: 0.65rem 0; border-bottom: 1px solid var(--rule); }
.concepts dt, .faq dt { font-weight: 500; }
.concepts dd, .faq dd { margin: 0.1rem 0 0; color: var(--ink-soft); }
.steps { padding-left: 1.4rem; margin: 0 0 1rem; max-width: var(--measure); }
.steps li { padding: 0.3rem 0 0.3rem 0.25rem; border-bottom: 1px solid var(--rule); }
.people { display: grid; gap: 1.25rem; }
.photo {
  display: grid; place-items: center; aspect-ratio: 4 / 5; max-width: 14rem; width: 100%;
  border: 1px dashed var(--rule-strong); color: var(--ink-soft); font-size: 0.9rem; padding: 1rem;
}
.name { font-weight: 700; margin-bottom: 0.4rem; }

/* countdown */
.paper--count { text-align: center; }
.count-label { margin-bottom: 0.5rem; }
.count-before { font-family: var(--display); font-size: 1.9rem; line-height: 1.3; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.2rem 0.55rem; max-width: none; margin-bottom: 0.4rem; }
.count-before .n { font-variant-numeric: tabular-nums; }
.count-before .w { font-family: var(--text); font-size: 1rem; color: var(--ink-soft); align-self: baseline; }
.count-live, .count-ended { font-family: var(--display); font-size: 1.6rem; line-height: 1.3; display: none; max-width: none; }
.count-date { color: var(--ink-soft); margin: 0; max-width: none; }
[data-countdown][data-state="live"] .count-before, [data-countdown][data-state="ended"] .count-before { display: none; }
[data-countdown][data-state="live"] .count-live, [data-countdown][data-state="ended"] .count-ended { display: block; }

.paper--foot { font-size: 0.95rem; }
.paper--foot p { margin-bottom: 0.4rem; }

/* wider screens: the sheet gets its columns */
@media (min-width: 48rem) {
  .board { padding: 3.5rem 2rem 4rem; }
  .sheet-head, .list-head, .honest, .paper { padding-left: 2.5rem; padding-right: 2.5rem; }
  h1 { font-size: 3.4rem; }
  .entry--desk { display: block; }
  .columns {
    display: grid; grid-template-columns: 2.75rem 1fr 1.2fr 10rem; gap: 0 1rem;
    padding: 0.4rem 1rem 0.4rem 0; font-size: 0.85rem; color: var(--ink-soft); border-top: 1.5px solid var(--rule-strong);
  }
  .columns span:first-child { text-align: center; }
  .lines { border-top: 1px solid var(--rule); }
  .entry--yours form {
    display: grid; grid-template-columns: 1fr 1.2fr 10rem; gap: 0 1rem; align-items: start;
    padding: 1.1rem 1rem 1rem 2.75rem;
  }
  .row { border-bottom: 0; padding: 0.25rem 0; }
  .row--more, .row--consent, .row--submit { grid-column: 1 / -1; border-top: 1px solid var(--rule); padding-top: 0.8rem; }
  .row--city .tick { display: flex; margin: 0.2rem 0; }
  .yours-tag { top: 0.4rem; }
  .people { grid-template-columns: 14rem 1fr; align-items: start; }
}
@media (min-width: 64rem) {
  .board { padding: 4rem 3rem 5rem; }
  .sheet-head { padding-top: 1.25rem; }
}
