  :root {
    --bg: #f3efe6;
    --ink: #1f1a14;
    --card: #fffcf7;
    --muted: #4a433a;
    --line: #d9d0c3;
    --input: #cfc4b4;
    --green: #234237;
    --green-ink: #f4f7f5;
    --accent: #e7efe9;
    --banner: #efe6d4;
    --banner-line: #d9cbb6;
    --danger: #8a2e1b;
    --danger-bg: #f8ebe6;
    --radius: 0.85rem;
    color-scheme: light;
  }
  * { box-sizing: border-box; }
  html { color-scheme: light; }
  body {
    margin: 0;
    min-height: 100dvh;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1.125rem;
    line-height: 1.5;
  }
  a { color: var(--green); }
  .wrap {
    width: 100%;
    max-width: 36rem;
    margin: 0 auto;
    padding: max(0.75rem, env(safe-area-inset-top)) 1rem max(1.25rem, env(safe-area-inset-bottom));
  }
  .top {
    display: flex;
    align-items: center;
    min-height: 3rem;
    padding-top: 0.25rem;
  }
  .brand {
    color: var(--green);
    font-size: 1.125rem;
    font-weight: 700;
    text-decoration: none;
  }
  h1 {
    margin: 0.5rem 0 0;
    font-size: 2.25rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
  }
  h2 { margin: 0; font-size: 1.5rem; }
  .sub { margin: 0.25rem 0 0; color: var(--muted); }
  .lede { margin: 0.75rem 0 0; color: var(--muted); }
  .banner, .card, .letter, .empty, .status, .error {
    border-radius: 1rem;
  }
  .banner {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--banner);
    border: 1px solid var(--banner-line);
  }
  .banner p, .lede, .hint { margin: 0.25rem 0 0; }
  .stack { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 2rem; }
  .section { display: flex; flex-direction: column; gap: 0.75rem; }
  .actions { display: flex; flex-direction: column; }
  .card {
    display: block;
    padding: 1rem;
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: 0 1px 2px rgba(31, 26, 20, 0.06);
    color: inherit;
    text-decoration: none;
  }
  .card:active { background: #e7e0d4; }
  .card-top, .row {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
  }
  .card-top { justify-content: space-between; }
  .name { margin: 0; font-size: 1.5rem; line-height: 1.2; }
  .id, .quiet { color: var(--muted); }
  .id { white-space: nowrap; flex: none; }
  .when { margin: 0.5rem 0 0; }
  .meta { margin: 0.35rem 0 0; color: var(--muted); }
  .summary { margin: 0.5rem 0 0; }
  dl { margin: 0.75rem 0 0; }
  .row + .row { margin-top: 0.25rem; }
  dt { color: var(--muted); }
  dd { margin: 0; }
  dd.filled { font-weight: 700; }
  .empty {
    margin: 0;
    padding: 1.25rem 1rem;
    border: 1px dashed var(--line);
    color: var(--muted);
  }
  .tag {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.01em;
  }
  .tag-message {
    background: var(--banner);
    color: var(--ink);
    border: 1px solid var(--banner-line);
  }
  .tag-first {
    background: var(--accent);
    color: var(--green);
    border: 1px solid #c5d6cc;
  }
  .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3.5rem;
    margin-top: 1.25rem;
    padding: 0.75rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.85rem;
    background: var(--green);
    color: var(--green-ink);
    font: inherit;
    font-size: 1.125rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
  }
  .btn.outline {
    background: var(--bg);
    color: var(--ink);
    border-color: var(--line);
  }
  .btn + .btn { margin-top: 0.75rem; }
  .back {
    display: inline-flex;
    align-items: center;
    min-height: 3rem;
    color: var(--green);
    font-weight: 700;
    text-decoration: none;
  }
  form { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 1.5rem; }
  label, legend { font-weight: 700; }
  .field { display: flex; flex-direction: column; gap: 0.5rem; }
  .pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1rem;
  }
  @media (max-width: 28rem) {
    .pair { grid-template-columns: 1fr; }
  }
  input, select, textarea {
    width: 100%;
    min-height: 3.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--input);
    border-radius: 0.85rem;
    background: var(--card);
    color: var(--ink);
    font: inherit;
    font-size: 1.125rem;
  }
  textarea { min-height: 8rem; resize: vertical; }
  input:focus, select:focus, textarea:focus, .btn:focus-visible, .card:focus-visible, .brand:focus-visible, .back:focus-visible {
    outline: 3px solid var(--green);
    outline-offset: 2px;
  }
  fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 0.5rem; }
  .choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .choices.stack-choices { grid-template-columns: 1fr; }
  .choices.three { grid-template-columns: 1fr 1fr; }
  .choices.three .choice:last-child { grid-column: 1 / -1; }
  @media (min-width: 30rem) {
    .choices.three { grid-template-columns: 1fr 1fr 1fr; }
    .choices.three .choice:last-child { grid-column: auto; }
  }
  .choice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--line);
    border-radius: 0.85rem;
    background: var(--card);
    font-weight: 400;
  }
  .choice input { width: 1.5rem; height: 1.5rem; min-height: 0; accent-color: var(--green); }
  .choice:has(input:checked) { border-color: var(--green); background: var(--accent); }
  .status { padding: 0.75rem 1rem; background: var(--accent); font-weight: 700; }
  .error { padding: 0.75rem 1rem; background: var(--danger-bg); color: var(--danger); }
  .letter {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--card);
    border: 1px solid var(--line);
  }
  pre {
    margin: 1rem 0 0;
    white-space: pre-wrap;
    font: inherit;
    line-height: 1.45;
  }
  .kicker { margin: 0.5rem 0 0; font-size: 1rem; font-weight: 700; color: var(--muted); }
  .reset {
    margin-top: 2rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 1rem;
    text-decoration: underline;
    cursor: pointer;
  }
  [hidden] { display: none !important; }

/* ---- obituary intake additions ---- */
h1, h2, h3, .brand-name { font-family: Georgia, "Iowan Old Style", "Times New Roman", serif; }
h1 { font-weight: 600; }
h3 { margin: 1rem 0 0.25rem; font-size: 1.125rem; }
.top { justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 0.6rem; margin-bottom: 0.25rem; }
.brand { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 1.25rem; font-weight: 700; }
.brand-place { font-size: 0.8125rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.staff-chip { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green); background: var(--accent); border: 1px solid #c5d6cc; border-radius: 999px; padding: 0.15rem 0.6rem; }
.foot { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; text-align: center; }
.wrap { padding-bottom: 5rem; }
.field { margin-top: 1rem; }
.hint { color: var(--muted); font-size: 0.975rem; margin: 0; }
.section { margin-top: 2rem; }
.formsec { margin-top: 1.75rem; padding: 1.1rem 1rem 1.25rem; background: var(--card); border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 1px 2px rgba(31,26,20,0.05); }
.formsec h2 { display: flex; align-items: center; gap: 0.6rem; }
.num { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--green); color: var(--green-ink); font: 700 1rem -apple-system, sans-serif; }
.formsec > .hint { margin-top: 0.4rem; }
.btn { display: block; width: 100%; margin-top: 0.75rem; padding: 0.95rem 1rem; border-radius: 0.85rem; border: 1px solid var(--green); background: var(--green); color: var(--green-ink); font: 700 1.0625rem -apple-system, BlinkMacSystemFont, sans-serif; text-align: center; text-decoration: none; cursor: pointer; }
.btn.outline { background: transparent; color: var(--green); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.actions { display: flex; flex-direction: column; }
.actions.two { flex-direction: row; gap: 0.6rem; }
.actions.two .btn[hidden] { display: none; }
.actions form { display: block; }
.finish .btn:first-of-type { margin-top: 1rem; }
.back { display: inline-block; margin: 0.75rem 0 0; color: var(--green); font-weight: 600; text-decoration: none; }
.example { margin: 1rem 0 0; padding: 0.75rem 1rem; border-radius: 0.85rem; background: #fff3c9; border: 2px dashed #c79a10; color: #4a3800; font-size: 0.975rem; }
.tag-example { background: #fff3c9; border: 1px dashed #c79a10; color: #4a3800; }
.tag-submitted { background: var(--accent); color: var(--green); border: 1px solid #c5d6cc; }
.tag-waiting { background: var(--banner); color: var(--ink); border: 1px solid var(--banner-line); }
.tag-progress { background: #e5eef7; color: #1d3a57; border: 1px solid #c3d4e4; }
.tag-expired { background: var(--danger-bg); color: var(--danger); border: 1px solid #e3c4ba; }
.status { margin: 1rem 0 0; padding: 0.75rem 1rem; background: var(--accent); border: 1px solid #c5d6cc; color: var(--green); }
.card.hot { border-color: var(--green); border-width: 2px; margin-top: 0.6rem; }
.alertbox { margin-top: 1.5rem; padding: 0.9rem 1rem 1rem; border-radius: 1rem; background: #fdf3dc; border: 1px solid #e3cf9b; }
.newbox { padding: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 1rem; }
.dangerbox { padding: 1rem; border: 1px solid #e3c4ba; border-radius: 1rem; background: var(--danger-bg); }
.linkbox { padding: 1rem; background: var(--card); border: 1px solid var(--green); border-radius: 1rem; }
.linkfield { margin-top: 0.6rem; font-size: 0.95rem; font-family: ui-monospace, Menlo, monospace; }
.logline { margin: 0.6rem 0 0; font-size: 1rem; }
.answers h3 { border-bottom: 1px solid var(--line); padding-bottom: 0.25rem; }
.answers dt { font-weight: 700; margin-top: 0.6rem; }
.answers dd { margin: 0.1rem 0 0; }
.file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.filebtn { display: block; margin-top: 0.4rem; padding: 0.95rem 1rem; text-align: center; border-radius: 0.85rem; border: 2px dashed var(--green); color: var(--green); font-weight: 700; background: var(--accent); cursor: pointer; }
.filebtn.alt { background: transparent; }
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 1rem; }
.photo { margin: 0; padding: 0.5rem; background: #fff; border: 1px solid var(--line); border-radius: 0.85rem; font-size: 0.9rem; overflow-wrap: anywhere; }
.photo img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 0.55rem; background: #eee; }
.photo figcaption { margin-top: 0.4rem; line-height: 1.3; }
.smallbtn { display: block; width: 100%; margin-top: 0.4rem; padding: 0.5rem; border: 1px solid var(--green); border-radius: 0.6rem; background: transparent; color: var(--green); font: 600 0.95rem -apple-system, sans-serif; text-align: center; text-decoration: none; cursor: pointer; }
.smallbtn.rm { border-color: var(--danger); color: var(--danger); }
.savebar { position: fixed; left: 0; right: 0; bottom: 0; padding: 0.6rem 1rem max(0.6rem, env(safe-area-inset-bottom)); background: rgba(255,252,247,0.96); border-top: 1px solid var(--line); text-align: center; z-index: 5; }
.savestate { margin: 0.5rem 0 0; font-size: 0.975rem; color: var(--muted); }
.savebar .savestate { margin: 0; }
.savestate.ok { color: var(--green); font-weight: 600; }
.savestate.bad { color: var(--danger); font-weight: 600; }
.thanks { margin-top: 1.5rem; padding: 1.25rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 1rem; }
label { font-weight: 600; }
.field .hint { margin-top: -0.25rem; }
@media (min-width: 40rem) { .photos { grid-template-columns: repeat(3, 1fr); } }
