/* The Daily Deduction — accessibility-first styling.
   Base type is 20px and scales with the A / A+ / A++ toggle (html[data-size]).
   No timers, no animations that move content, generous tap targets (>=56px). */
:root {
  /* The Curzon Study — The Daily Deduction's own identity (Sam's pick, Oct 22, 2026;
     Design Chief round-two direction 1 with Muse's verified corrections:
     dark accent lightened from #3B724D (button labels computed 3.24:1, failed AA)
     to #6C957A (5.45:1). Supersedes the Country-House Library, which Sam found feminine. */
  --ink: #1A231B;
  --paper: #F5EFEB;
  --card: #ECE3DB;
  --accent: #1B4228;       /* deep bottle green */
  --accent-ink: #F5EFEB;
  --gold: #B08438;         /* unlacquered brass (rules) */
  --gold-text: #6E4F18;    /* deep bronze for text/borders */
  --muted: #525852;        /* warm grey-green */
  --line: #D4C7BA;
  --soft: #E3D8CC;
  --good: #1F5933;         /* success green */
}
html { font-size: 20px; }
html[data-size="2"] { font-size: 23px; }
html[data-size="3"] { font-size: 26px; }
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, "Iowan Old Style", serif;
  line-height: 1.55;
}
.visually-hidden { position: absolute; left: -9999px; }
.masthead { background: var(--card); border-bottom: 3px double var(--gold); }
.masthead-inner {
  max-width: 44rem; margin: 0 auto; padding: 1rem 1.25rem 0.5rem;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap;
}
.brand { font-family: Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif; font-size: 1.45rem; font-weight: 600; margin: 0; text-transform: uppercase; letter-spacing: 0.1em; }
.brand-block { display: flex; gap: 0.8rem; align-items: center; }
.brand-mark { width: 3.4rem; height: 3.4rem; flex: none; border-radius: 50%; border: 2px solid var(--line); background: var(--soft); object-fit: cover; }
.tagline { margin: 0.15rem 0 0; font-style: italic; color: var(--muted); }
.text-size { display: flex; gap: 0.4rem; }
.text-size button {
  font: inherit; min-width: 3rem; min-height: 3rem; padding: 0.3rem 0.6rem;
  border: 2px solid var(--accent); border-radius: 0.5rem; background: var(--card);
  color: var(--accent); cursor: pointer; font-weight: bold;
}
.text-size button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.status-strip {
  max-width: 44rem; margin: 0 auto; padding: 0 1.25rem 0.9rem;
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; color: var(--muted); font-size: 0.95rem;
}
.streak-line, .rank-line { font-weight: bold; color: var(--accent); }
main { max-width: 44rem; margin: 0 auto; padding: 1.25rem; }
.case-card, .email-card, .archive-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 0.75rem;
  padding: 1.4rem 1.5rem; margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(60, 45, 20, 0.08);
}
.case-kicker { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; color: var(--gold-text); font-weight: bold; margin: 0 0 0.3rem; }
h1 { font-size: 1.65rem; margin: 0 0 0.8rem; line-height: 1.25; }
h2 { font-size: 1.25rem; margin: 1.2rem 0 0.5rem; }
h3 { font-size: 1.1rem; margin: 1rem 0 0.4rem; }
.intro { margin: 0 0 1rem; }
.incident { background: var(--soft); border-left: 5px solid var(--gold-text); padding: 0.8rem 1rem; border-radius: 0.4rem; }
.incident h2 { margin-top: 0; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.05em; }
.incident p { margin: 0; }
.suspect { border-top: 1px solid var(--line); padding: 0.9rem 0 0.4rem; }
.suspect h3 { margin: 0 0 0.3rem; }
.suspect .role { font-weight: normal; font-style: italic; color: var(--muted); font-size: 0.95rem; }
.suspect blockquote { margin: 0.3rem 0 0.7rem 0; padding-left: 1rem; border-left: 3px solid var(--line); }
.accuse-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-top: 0.8rem; }
.accuse-buttons button, .primary-button {
  font: inherit; font-weight: bold; min-height: 3.5rem; padding: 0.7rem 1rem;
  border-radius: 0.6rem; border: 2px solid var(--accent); cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
}
.accuse-buttons button:disabled { opacity: 0.45; cursor: default; }
.accuse-buttons button.wrong { background: var(--soft); color: var(--muted); border-color: var(--line); text-decoration: line-through; opacity: 0.85; }
.accuse-buttons button.right { background: var(--good); border-color: var(--good); }
.feedback { min-height: 1.6em; font-weight: bold; margin: 0.8rem 0 0; }
.quiet-button {
  font: inherit; background: none; border: none; color: var(--accent);
  text-decoration: underline; cursor: pointer; padding: 0.5rem 0; margin-top: 0.4rem;
}
.reveal { border-top: 3px double var(--gold); margin-top: 1.2rem; padding-top: 0.6rem; }
.reveal ul, .reveal ol { padding-left: 1.4rem; }
.reveal li { margin-bottom: 0.4rem; }
.share-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.share-row .primary-button { background: var(--card); color: var(--accent); }
.share-status { color: var(--good); font-weight: bold; }
.tomorrow { font-style: italic; color: var(--muted); }
.email-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.email-row input {
  font: inherit; flex: 1 1 16rem; min-height: 3.5rem; padding: 0.6rem 0.8rem;
  border: 2px solid var(--line); border-radius: 0.6rem; background: var(--card); color: var(--ink);
}
.email-card label { font-weight: bold; display: block; margin-bottom: 0.4rem; }
.email-status { margin: 0.6rem 0 0; font-weight: bold; }
.archive-list { list-style: none; padding: 0; margin: 0; }
.archive-list li { padding: 0.45rem 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; }
.archive-list a { color: var(--accent); font-weight: bold; }
.archive-list .done { color: var(--good); font-weight: bold; }
footer { max-width: 44rem; margin: 0 auto; padding: 0 1.25rem 2rem; color: var(--muted); font-size: 0.9rem; }
@media (max-width: 34rem) { .accuse-buttons { grid-template-columns: 1fr; } }

/* Visible focus for keyboard / switch users (added Oct 19, 2026). */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* The Iron Law line under the accuse hint. */
.accuse-rule {
  background: var(--soft); border-left: 5px solid var(--gold-text);
  padding: 0.7rem 1rem; border-radius: 0.4rem; margin: 0.9rem 0 0;
}

/* Post-solve email prompt inside the reveal. */
.reveal-email {
  background: var(--soft); border-radius: 0.6rem;
  padding: 1rem 1.1rem; margin-top: 1.1rem;
}
.reveal-email p { margin: 0 0 0.7rem; }

/* Soft dark mode (Oct 19, 2026; house rule: never pure black on pure white). */
@media (prefers-color-scheme: dark) {
  /* Curzon Study after dark — deep green-black. Accent #6C957A as corrected above. */
  :root {
    --ink: #EDE5DC;
    --paper: #121714;
    --card: #19201C;
    --accent: #6C957A;
    --accent-ink: #0E1611;
    --gold: #C99B4B;
    --gold-text: #D9AD5E;
    --muted: #A1ACA3;
    --line: #2B3830;
    --soft: #222D26;
    --good: #4EA36B;
  }
  .case-card, .email-card, .archive-card { box-shadow: none; }
}
