/* The First Clues, digital edition. Colors, fonts and base styles copied from
   the Clue Spotter's public/styles.css (2026-10-29), which copies the Pattern
   Decoder's. Copied, not shared: changing one never changes the others.
   One light theme on purpose: the page should look like the printed card. */
:root {
  color-scheme: light;
  --navy: #1E3A5F;
  --soft: #DCEAFC;
  --accent: #5B8DEF;
  --label: #3B6FD6;
  --gold: #C9A24A;
  --gold-light: #E3C77E;
  --muted: #5A6172;
  --rule: #9AA3B0;
  --care-fill: #FBF6EA;
  --care-label: #8A6A1F;
  --paper: #FFFFFF;
  --ground: #F4F7FB;
  --line-soft: #D5DCE6;

  --display: "EB Garamond", Garamond, "Times New Roman", serif;
  --body: "Poppins", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Liberation Mono", ui-monospace, Menlo, Consolas, monospace;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: 2.375rem;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--navy);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow-wrap: anywhere;
}

.page {
  max-width: 44rem;
  margin: 0 auto;
  padding-block: 2rem 2rem;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: grid;
  gap: 1.75rem;
}

h1, h2, h3, p, ul, ol { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 500; text-wrap: balance; line-height: 1.15; }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-0); font-weight: 500; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
a { color: var(--label); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
[hidden] { display: none !important; }

/* ---------- masthead */
.masthead { display: grid; gap: 0.75rem; }
.kicker, .label, .footer {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--step--1);
}
.kicker { color: var(--label); }
h1 { font-size: var(--step-3); }
h1::after, .card-title::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 3px;
  margin-top: 0.6rem;
  background: var(--gold);
}
.clue-row { list-style: none; margin: 0.25rem 0 0; padding: 0; display: flex; gap: 0.4rem; }
.clue-row li {
  width: 2rem; height: 2rem; display: grid; place-items: center;
  border: 1.5px solid var(--accent); border-radius: 3px;
  font-family: var(--display); font-size: var(--step-1); background: var(--paper);
}
.intro { font-size: var(--step-1); }

/* ---------- cards */
main { display: grid; gap: 1.5rem; }
.card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 4vw, 2rem);
  display: grid;
  gap: 1.1rem;
  min-width: 0;
}
.label { color: var(--label); }
.card-head { display: flex; gap: 1rem; align-items: center; }
.letter {
  flex: none; width: 3.25rem; height: 3.25rem; display: grid; place-items: center;
  border: 1.5px solid var(--accent); border-radius: 3px;
  font-family: var(--display); font-size: 2.1rem; line-height: 1;
}
.card-head h2 { font-size: 1.9rem; }
.verb { font-weight: 500; margin-top: 0.15rem; }
.block { display: grid; gap: 0.35rem; }
.lead { font-weight: 500; font-size: var(--step-1); line-height: 1.45; }
.example { font-family: var(--display); font-style: italic; font-size: var(--step-1); line-height: 1.4; }

.glance { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.glance li { display: flex; gap: 0.9rem; align-items: flex-start; }
.glance .letter { width: 2.6rem; height: 2.6rem; font-size: 1.6rem; }
.glance strong { display: block; font-weight: 500; }

/* System Tool box: outlined (the low-ink look Sav chose for print) */
.tool {
  background: var(--soft);
  border: 1.5px solid var(--navy);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  display: grid;
  gap: 0.6rem;
}
.tool-label { font-family: var(--mono); font-weight: 700; font-size: var(--step--1); }
.tool-questions { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; font-weight: 500; }
.tool-questions li::before { content: "›\00a0\00a0"; color: var(--navy); }

.care-inline {
  background: var(--care-fill);
  border: 1.5px solid var(--gold);
  border-radius: 4px;
  padding: 0.7rem 0.9rem;
  font-size: 0.9375rem;
  display: grid;
  gap: 0.2rem;
}
.care-inline .label { color: var(--care-label); font-weight: 700; }

.quote {
  border-left: 3px solid var(--gold);
  padding: 0.25rem 0 0.25rem 1.1rem;
  font-family: var(--display);
  font-style: italic;
  font-size: var(--step-1);
  line-height: 1.45;
}

.questions {
  background: var(--soft);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 0;
  list-style: none;
  display: grid;
  gap: 0.2rem;
  font-family: var(--display);
  font-size: 1.3rem;
}
.strong { font-weight: 500; }

.minutes { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.minutes li { display: grid; gap: 0.5rem; }
.minute-head { font-weight: 500; }
.lines p + p { margin-top: 0.15rem; }
.loop { font-weight: 500; }
.final { font-family: var(--display); font-style: italic; font-size: var(--step-1); line-height: 1.5; }
.next { display: grid; gap: 1rem; }
.next-item { display: grid; gap: 0.4rem; }

.btn {
  font: inherit; font-weight: 500; border-radius: 4px; cursor: pointer;
  min-height: 44px; padding: 0.7rem 1.25rem; border: 1.5px solid var(--navy);
  justify-self: start; text-decoration: none; display: inline-flex; align-items: center;
  background: var(--paper); color: var(--navy);
}
.btn:hover { background: var(--soft); color: var(--navy); }

/* ---------- footer */
.footer-block { display: grid; gap: 1rem; }
.care {
  background: var(--care-fill);
  border: 1.5px solid var(--gold);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
}
.footer-guide { text-align: center; }
.footer-guide a { display: inline-block; min-height: 44px; padding-block: 0.6rem; }
.disclaimer { color: var(--muted); font-size: 0.9375rem; text-align: center; }
.footer { color: var(--muted); text-align: center; border-top: 1px solid var(--line-soft); padding-top: 1.25rem; display: grid; gap: 0.3rem; }

/* Text links inside the page: 44 px tall touch target. */
main a:not(.btn):not(.next-item p a) { display: inline-block; min-height: 44px; padding-block: 0.6rem; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* Busy-day block inside the closing card: set apart as its own panel. */
.busy-day { background: var(--ground); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: clamp(1rem, 3.5vw, 1.5rem); gap: 0.9rem; }
.busy-day h2 { font-size: 1.35rem; }

/* ================= walkthrough and 24-hour page (copied from the Clue Spotter where marked) */
html:not(.js) .js-only { display: none !important; }
.js .step { display: none; }
.js .step.is-current { display: grid; }
[tabindex="-1"]:focus { outline: none; }

/* warnings (Spotter) */
.warnings { display: grid; gap: 1px; background: var(--gold); }
.warn {
  margin: 0; background: var(--care-fill); color: var(--navy); font-weight: 500; text-align: center;
  padding-block: 0.7rem;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* form (Spotter) */
.field { display: grid; gap: 0.35rem; min-width: 0; }
.field label, .field-label { font-weight: 500; }
.field label.lead { font-size: var(--step-1); line-height: 1.45; }
.hint { color: var(--muted); font-size: 0.9375rem; font-weight: 400; }
.field-foot { display: flex; }
.count { color: var(--muted); margin-left: auto; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: var(--step--1); }
textarea {
  width: 100%; min-height: 4.5rem; resize: vertical; font: inherit; color: var(--navy);
  background: var(--paper); border: 1px solid var(--rule); border-radius: 4px;
  padding: 0.7rem 0.8rem; line-height: 1.5;
}
textarea:focus { border-color: var(--accent); outline: 2px solid var(--soft); outline-offset: 0; }
textarea[disabled] { background: var(--ground); }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  font: inherit; font-size: 0.9375rem; color: var(--navy); background: var(--paper);
  border: 1.5px solid var(--rule); border-radius: 999px; min-height: 44px; min-width: 44px;
  padding: 0.4rem 1.1rem; cursor: pointer;
}
.chip:hover:not([disabled]) { border-color: var(--navy); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--paper); }
.chip[disabled] { cursor: default; opacity: 0.6; }

/* buttons (Spotter) */
.btn-primary { background: var(--navy); color: var(--paper); border-color: var(--navy); }
.btn-primary:hover { background: #16304F; color: var(--paper); }
.btn-secondary { background: var(--paper); color: var(--navy); border-color: var(--navy); }
.btn-danger { background: #B3412E; color: var(--paper); border-color: #B3412E; }
.btn-danger:hover { background: #8E2F1F; color: var(--paper); }
.btn-quiet {
  font: inherit; background: none; color: var(--label); border: 0; cursor: pointer;
  min-height: 44px; min-width: 44px; padding: 0.35rem 0;
  text-decoration: underline; text-underline-offset: 3px;
}
.btn-quiet:hover { color: var(--navy); }
.btn-quiet.danger { color: #8E2F1F; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; }
.step-nav { justify-content: space-between; border-top: 1px solid var(--line-soft); padding-top: 1rem; }
.slot { display: grid; gap: 0.6rem; }
.slot:empty { display: none; }
.notice { background: var(--soft); border-left: 3px solid var(--accent); padding: 0.6rem 0.8rem; border-radius: 0 4px 4px 0; }
.notice-warn { background: var(--care-fill); border-left-color: var(--gold); }
.copy-box { font-size: 0.9375rem; min-height: 8rem; white-space: pre-wrap; }
.confirm { border: 1.5px solid var(--gold); background: var(--care-fill); border-radius: var(--radius); padding: 1rem; display: grid; gap: 0.75rem; }
.privacy { font-size: var(--step--1); color: var(--muted); border-top: 1px solid var(--line-soft); padding-top: 1rem; }

/* walkthrough extras */
.more, .examples { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.3rem; }
.example .examples { font-family: var(--display); font-style: italic; }
.avatar-note { color: var(--muted); font-size: 0.9375rem; }

/* 24-hour pauses and the day side by side */
.pauses { display: grid; gap: 1rem; }
.pause { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 1rem; display: grid; gap: 0.9rem; background: var(--paper); }
.pause h3 { font-family: var(--display); font-size: var(--step-2); font-weight: 500; }
.pause textarea { min-height: 3.2rem; }
.review { display: grid; gap: 0.75rem; border-top: 1px solid var(--line-soft); padding-top: 1rem; }
.review h3 { font-family: var(--display); font-size: var(--step-2); font-weight: 500; }
.review-grid { display: grid; gap: 0.75rem; grid-template-columns: 1fr; }
.review-col { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 0.75rem 0.9rem; background: var(--ground); min-width: 0; }
.review-col h4 { margin: 0 0 0.3rem; font-weight: 500; }
.review-col dl { margin: 0; display: grid; gap: 0.1rem; }
.review-col dt { color: var(--muted); font-size: var(--step--1); margin-top: 0.35rem; }
.review-col dd { margin: 0; }
@media (min-width: 40rem) { .review-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
h1.card-title, .day h1 { font-size: var(--step-3); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.privacy-page { border-top: 0; padding-top: 0; text-align: center; }
.sheet-links { display: grid; gap: 0.1rem; }
.sheet-links a { display: inline-block; min-height: 44px; padding-block: 0.6rem; font-weight: 500; }
.sheet-links .quiet { font-size: 0.9375rem; }
.sheet-links .quiet a { font-weight: 400; color: var(--muted); }
.back-home a { display: inline-block; min-height: 44px; padding-block: 0.6rem; font-size: 0.9375rem; text-decoration: none; }
.back-home a:hover { text-decoration: underline; }
.next-item p a { display: inline; padding-block: 0.65rem; }   /* inline link inside a sentence: padding gives a 44 px touch area without breaking the line */

/* Paragraph flow and bullet lists (Sav's layout for easier reading, 2026-10-30) */
.flow { display: grid; gap: 0.75rem; }
.flow.intro { gap: 0.85rem; }
.bullets { margin: 0; padding-left: 1.3rem; display: grid; gap: 0.3rem; }
.bullets li::marker { color: var(--gold); }
