/* THESIS: A job pad Wilson thumbs through on his phone, not a survey wall.
   OWN-WORLD: NCR green sheet, punch holes, carbon ink, one red received-stamp.
   STORY: He answers in short bursts, can skip, send lands on Gerhard's VPS.
   FIRST VIEWPORT: Full-bleed pad, job name, one sentence, Start.
   FORM: Quote-book / NCR pad. Evening kitchen or ute cab, indoor light. */

:root {
  --paper: #cfdcc8;
  --sheet: #eef3e8;
  --ink: #141e18;
  --muted: #334338;
  --rule: #8fa392;
  --stamp: #8c1818;
  --stamp-fill: #7a1414;
  --cream: #f4f1ea;
  --choice: #dce6d6;
  --focus: #141e18;
  --ok: #1e4d32;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.45 system-ui, "Segoe UI", sans-serif;
}

body {
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}

.clipboard {
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr);
  min-height: 100dvh;
  max-width: 42rem;
  margin: 0 auto;
  background: var(--sheet);
  box-shadow: 4px 6px 0 rgba(20, 30, 24, 0.18);
}

.holes {
  background:
    radial-gradient(circle, var(--paper) 0.36rem, transparent 0.38rem);
  background-size: 100% 2.75rem;
  background-repeat: repeat-y;
  background-position: center 1.15rem;
  border-right: 1px dashed var(--rule);
}

.sheet {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.15rem 1.15rem 1.4rem 1rem;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.job {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
}

.meter {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}

.rule {
  height: 1px;
  background: var(--rule);
  margin: 0.85rem 0 1.15rem;
}

#stage {
  flex: 1;
  padding-bottom: 4.75rem;
}

.cover h1 {
  margin: 0.15rem 0 0.7rem;
  font-size: 2.15rem;
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 750;
  max-width: 12ch;
}

.lede, .note, .hint, .status {
  margin: 0 0 0.85rem;
  color: var(--muted);
}

.lede { font-size: 1.05rem; color: var(--ink); }

.section-title {
  margin: 0 0 0.35rem;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.field {
  margin: 1.35rem 0 0;
}

.field label,
.field .q {
  display: block;
  font-weight: 650;
  margin-bottom: 0.4rem;
}

.num {
  color: var(--muted);
  font-weight: 550;
  padding-right: 0.35rem;
}

.hint {
  margin: -0.15rem 0 0.45rem;
  font-size: 0.9rem;
}

input[type="text"],
textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  font: inherit;
  padding: 0.55rem 0.1rem;
  border-radius: 0;
}

textarea {
  min-height: 5.5rem;
  resize: vertical;
  border: 1px solid var(--rule);
  padding: 0.65rem 0.7rem;
  background: #f7faf4;
}

input::placeholder,
textarea::placeholder {
  color: #4a5d4f;
  opacity: 1;
}

input:focus,
textarea:focus,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.choices {
  display: grid;
  gap: 0.5rem;
}

.choices button {
  text-align: left;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  background: var(--choice);
  border: 1px solid transparent;
  padding: 0.85rem 0.9rem;
  min-height: 3rem;
  cursor: pointer;
}

.choices button[aria-checked="true"] {
  background: var(--ink);
  color: var(--cream);
}

.ticks {
  display: grid;
  gap: 0.35rem;
}

.ticks label {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: 0.65rem;
  align-items: start;
  font-weight: 500;
  padding: 0.55rem 0.15rem;
  cursor: pointer;
}

.ticks input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.15rem 0 0;
  accent-color: var(--ink);
}

.other-label {
  display: block;
  font-weight: 650;
  margin-top: 0.85rem;
}

.other-line {
  margin-top: 0.35rem;
}

.nav {
  display: flex;
  gap: 0.65rem;
  margin-top: 1.6rem;
  position: sticky;
  bottom: 0;
  padding-top: 0.7rem;
  background: linear-gradient(var(--sheet) 70%, var(--sheet));
}

.stamp,
.ghost,
.start {
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  min-height: 3rem;
  padding: 0.7rem 1.05rem;
}

.start,
.stamp {
  background: var(--stamp);
  color: var(--cream);
  border: 2px solid var(--stamp);
}

.start:hover,
.stamp:hover {
  background: var(--stamp-fill);
  border-color: var(--stamp-fill);
}

.start:disabled,
.stamp:disabled {
  opacity: 0.55;
  cursor: wait;
}

.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.ghost:hover { background: var(--choice); }

.start { margin-top: 1.15rem; }

.actions {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.1rem;
}

.done h1 {
  margin: 0 0 0.6rem;
  font-size: 1.9rem;
  letter-spacing: -0.02em;
}

.status.ok { color: var(--ok); font-weight: 650; }
.status.err { color: var(--stamp); font-weight: 650; }

.hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

@media (min-width: 720px) {
  body { padding: 1.5rem 1rem 2rem; }
  .clipboard { min-height: calc(100dvh - 3.5rem); }
  .sheet { padding: 1.6rem 1.8rem 1.8rem 1.3rem; }
  .cover h1 { font-size: 2.6rem; }
}

@media (max-width: 639px) {
  .cover h1 { font-size: 1.85rem; }
}
