  @import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500;1,600;1,700&display=swap');

  :root {
    --bg: #F7F4EF;
    --surface: #FFFFFF;
    --surface-2: #e2d5bd;
    --ink: #241d15;
    --ink-soft: #6f6353;
    --ink-faint: #9c8f7c;
    --accent: #bc4f2c;
    --accent-ink: #ffffff;
    --accent-soft: #e9d3bf;
    --line: #d9cbae;
    --good: #5c7a52;
    --shadow: 0 1px 0 rgba(36, 29, 21, 0.05);
    --radius-s: 8px;
    --radius-m: 8px;
    --radius-l: 16px;
    color-scheme: light only; /* light mode only, even when the phone is set to night mode */
  }

  * { box-sizing: border-box; }

  input[type="number"]::-webkit-outer-spin-button,
  input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
  }

  html, body { background: var(--bg); }

  body {
    margin: 0;
    padding: 0 20px 96px;
    font-family: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
    color: var(--ink);
    background:
      radial-gradient(1100px circle at 0% 100%, rgba(245, 233, 168, 0.8) 0%, rgba(245, 233, 168, 0) 70%),
      radial-gradient(1100px circle at 100% 0%, rgba(15, 76, 92, 0.20) 0%, rgba(15, 76, 92, 0) 70%),
      #F7F4EF;
    background-attachment: fixed, fixed, fixed;
    -webkit-font-smoothing: antialiased;
  }

  h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; text-wrap: balance; margin: 0; }

  .wrap { max-width: 720px; margin: 0 auto; }

  /* ---------- header ---------- */

  header.page {
    padding-top: 56px;
    padding-bottom: 28px;
  }


  h1.title { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(38px, 7vw, 56px); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; color: #2C2C28; }
  .title-accent { font-style: italic; color: #2C2C28; position: relative; display: inline-block; }
  .title-accent::after { content: ""; position: absolute; left: 0; bottom: -0.1em; width: 100%; height: 0.25em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M1 6 C 20 2, 45 9, 70 5 S 95 4, 99 5' fill='none' stroke='%23A8BFD0' stroke-width='3' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }

  p.dek {
    font-size: 16px;
    color: #2C2C28;
    max-width: 100%;
    line-height: 1.5;
    margin-top: 14px;
  }

  .intro-note {
    margin-top: 24px;
    background: var(--surface);
    border-radius: var(--radius-m);
    padding: 20px 22px;
    font-size: 15px;
    line-height: 1.6;
    color: #2C2C28;
    box-shadow: 0 2px 6px rgba(36, 29, 21, 0.06);
  }

  .intro-note strong { color: var(--ink); font-weight: 400; }

  /* ---------- checklist code ---------- */

  .code-card {
    margin-top: 18px;
    background: var(--surface);
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 2px 6px rgba(36, 29, 21, 0.06);
  }
  .code-card-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    cursor: pointer;
    list-style: none;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    -webkit-tap-highlight-color: transparent;
  }
  .code-card-summary::-webkit-details-marker { display: none; }
  .code-card-summary::marker { content: ''; }
  .code-card-summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 16px; }
  .code-chevron { flex: none; color: #0F4C5C; transition: transform 0.2s ease; }
  .code-card[open] .code-chevron { transform: rotate(180deg); }
  .code-card-body { padding: 0 20px 18px; }
  @media (prefers-reduced-motion: reduce) { .code-chevron { transition: none; } }
  .code-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
  }
  .code-value {
    font-family: 'DM Sans', sans-serif;
    font-size: 19px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--ink);
    margin-top: 2px;
  }
  .copy-btn {
    border: 1px solid #0F4C5C;
    background: transparent;
    color: #0F4C5C;
    font-family: 'DM Sans', sans-serif;
    font-size: 12.5px;
    padding: 6px 10px;
    border-radius: var(--radius-s);
    cursor: pointer;
    flex: none;
  }
  .copy-btn:hover { border-color: #7E93A0; color: #7E93A0; }
  .code-card-hint {
    margin: 10px 0 0;
    font-size: 16px;
    color: #2C2C28;
    line-height: 1.5;
  }
  .code-toggle {
    margin-top: 12px;
    border: none;
    background: transparent;
    color: #2C2C28;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
  }
  .code-entry { margin-top: 14px; }
  .code-entry-row { display: flex; gap: 8px; flex-wrap: wrap; }
  .code-entry-row input {
    flex: 1 1 220px;
    border: 1.5px solid #D8CFC0;
    background: #FFFFFF;
    border-radius: var(--radius-s);
    padding: 9px 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--ink);
    outline: none;
  }
  .code-entry-row input:focus { border-color: #D9A53F; }
  .code-entry-row input:focus-visible { outline: none; }
  .code-entry-row button {
    border: none;
    background: #0F4C5C;
    color: #FFFFFF;
    font-family: 'DM Sans', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    padding: 9px 16px;
    border-radius: var(--radius-s);
    cursor: pointer;
    flex: none;
  }
  .code-entry-row button:hover { opacity: 0.92; }
  .code-entry-status { margin-top: 8px; font-size: 13px; color: var(--ink-soft); min-height: 1em; }
  .code-entry-status.error { color: var(--accent); }

  /* ---------- running total bar ---------- */

  .totalbar-slot { margin: 28px 0; }
  /* Fallback (no JS): plain sticky. With JS the slot gets .js-fixed and the bar is placed by script. */
  .totalbar {
    position: -webkit-sticky;
    position: sticky;
    top: 12px;
    z-index: 5;
    margin: 0;
    box-sizing: border-box;
    background: #C9A227;
    color: #241d15;
    border-radius: var(--radius-l);
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
    box-shadow: 0 8px 24px -12px rgba(0,0,0,0.35);
  }
  .totalbar > div:first-child { min-width: 0; flex: 1 1 auto; }
  .totalbar-slot { position: relative; }
  /* With JS: the bar rides with the page inside its slot, and only goes fixed once it has stuck. */
  .totalbar-slot.js-fixed .totalbar { position: absolute; top: 0; left: 0; right: 0; }
  .totalbar-slot.js-fixed.is-stuck .totalbar { position: fixed; right: auto; }

  /* Phones: label on the first line, the total on the second */
  @media (max-width: 600px) {
    .totalbar { flex-direction: column; align-items: flex-start; gap: 4px; }
    .totalbar > div:first-child { flex: none; width: 100%; }
  }


  .totalbar .label {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #241d15;
  }

  .totalbar .num {
    flex: none;
    white-space: nowrap;
    font-family: 'DM Sans', sans-serif;
    font-size: 30px;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    color: #241d15;
  }

  /* One line always, so the bar's height never changes when this text swaps */
  .totalbar .sub { font-size: 13px; color: #241d15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .totalbar .label { white-space: nowrap; }

  /* ---------- section cards ---------- */

  section.habit {
    background: var(--surface);
    border-radius: var(--radius-l);
    padding: 26px 24px 24px;
    margin-bottom: 18px;
    box-shadow: 0 2px 6px rgba(36, 29, 21, 0.06);
  }

  .habit-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #D8CFC0;
  }

  .habit-num {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #2C3E45;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
  }

  h2.habit-title { font-size: 22px; font-weight: 500; margin-top: 4px; color: #2C2C28; }

  .habit-tag {
    font-size: 11px;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
  }

  p.habit-prompt {
    color: #2C2C28;
    font-size: 16px;
    line-height: 1.6;
    margin: 10px 0 16px;
    max-width: 100%;
  }

  p.habit-prompt strong { color: var(--ink); font-weight: 700; }

  .calc-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    background: #F7F2E9;
    border-radius: var(--radius-m);
    padding: 14px;
  }

  @media (max-width: 480px) {
    .calc-row { grid-template-columns: 1fr; }
  }

  .field { display: flex; flex-direction: column; gap: 6px; }

  .field label {
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-faint);
    font-weight: 600;
  }

  .money-input {
    display: flex;
    align-items: center;
    border: 1.5px solid #D8CFC0;
    border-radius: var(--radius-s);
    background: #FFFFFF;
    padding: 9px 12px;
  }

  .money-input:focus-within { border-color: #D9A53F; }

  .money-input .cur { color: var(--ink-faint); font-size: 16px; margin-right: 3px; }

  .money-input input {
    border: none;
    background: transparent;
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
    width: 100%;
    outline: none;
  }

  .money-input input::placeholder { color: var(--ink-faint); font-weight: 400; }
  .money-input input:focus-visible { outline: none; }

  .computed { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; padding-bottom: 4px; border-bottom: 1.5px solid transparent; }
  .computed.yearly { color: #C08552; }

  .habit-insight {
    margin-top: 14px;
    padding-left: 14px;
    border-left: 3px solid #F5E9A8;
    font-size: 13.5px;
    font-style: italic;
    color: var(--ink-soft);
    line-height: 1.55;
  }

  /* ---------- subscriptions (single list, keep/cancel toggle per row) ---------- */

  .sub-rows { display: flex; flex-direction: column; gap: 16px; }

  .sub-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background: #FFFFFF;
    border: 1.5px solid #D8CFC0;
    border-radius: var(--radius-s);
    padding: 6px 8px;
    row-gap: 8px;
  }

  .sub-row:focus-within { border-color: #D9A53F; }

  .sub-row .f-name {
    border: none;
    background: transparent;
    font-family: 'DM Sans', sans-serif;
    color: var(--ink);
    font-size: 13.5px;
    outline: none;
    flex: 1 1 120px;
    min-width: 100px;
    padding: 4px 0;
  }
  .sub-row .f-name::placeholder { color: var(--ink-faint); }

  .sub-row-cost {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    gap: 2px;
    flex: none;
  }
  .sub-row-cost .cur { color: var(--ink-faint); font-size: 13px; }
  .sub-row-cost .f-cost {
    border: none;
    background: transparent;
    font-family: 'DM Sans', sans-serif;
    color: var(--ink);
    font-size: 13.5px;
    font-variant-numeric: tabular-nums;
    outline: none;
    width: 72px;
    text-align: right;
    padding: 0;
  }

  .sub-row .f-billing {
    border: none;
    background: transparent;
    font-family: 'DM Sans', sans-serif;
    color: var(--ink-faint);
    font-size: 12px;
    outline: none;
    padding: 4px 2px 4px 6px;
    flex: none;
  }

  .keep-cancel-toggle { display: flex; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; flex: none; margin: 0 0 2px; }
  .sub-item { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
  .sub-item .sub-row { align-self: stretch; }
  .keep-cancel-toggle button {
    border: none;
    background: transparent;
    padding: 6px 11px;
    font-size: 11.5px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    cursor: pointer;
    color: var(--ink-soft);
  }
  .keep-cancel-toggle button.active.is-keep { background: var(--good); color: #fff; }
  .keep-cancel-toggle button.active.is-cancel { background: var(--accent); color: #fff; }

  /* ---------- habit item rows (cards 01–04) ---------- */

  .item-list { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }

  .item-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    background: #FFFFFF;
    border: 1.5px solid #D8CFC0;
    border-radius: var(--radius-s);
    padding: 6px 8px;
  }

  .item-row:focus-within { border-color: #D9A53F; }

  .item-row input[type="text"] {
    border: none;
    background: transparent;
    font-family: 'DM Sans', sans-serif;
    color: var(--ink);
    font-size: 13.5px;
    outline: none;
    width: 100%;
    padding: 4px 0;
  }
  .item-row input::placeholder { color: var(--ink-faint); }

  .item-row-cost {
    display: flex;
    align-items: center;
    padding: 4px 6px 4px 8px;
    gap: 2px;
  }
  .item-row-cost .cur { color: var(--ink-faint); font-size: 13px; }
  .item-row-cost input[type="number"] {
    border: none;
    background: transparent;
    font-family: 'DM Sans', sans-serif;
    color: var(--ink);
    font-size: 13.5px;
    font-variant-numeric: tabular-nums;
    outline: none;
    width: 82px;
    text-align: right;
  }

  .item-row-label {
    font-size: 11px;
    color: var(--ink-faint);
    padding: 0 8px 0 4px;
    white-space: nowrap;
  }
  .add-item-row {
    display: inline-block;
    margin-top: 8px;
    border: 1px solid #0F4C5C;
    background: transparent;
    color: #0F4C5C;
    font-family: 'DM Sans', sans-serif;
    font-size: 12.5px;
    border-radius: var(--radius-s);
    padding: 6px 10px;
    cursor: pointer;
  }
  .add-item-row:hover { border-color: #7E93A0; color: #7E93A0; }

  .habit-totals {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  @media (max-width: 480px) { .habit-totals { grid-template-columns: 1fr; } }

  .row-del {
    border: none;
    background: transparent;
    color: var(--ink-faint);
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    padding: 2px 4px;
  }
  .row-del:hover { color: var(--accent); }

  .add-row {
    margin-top: 8px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink-soft);
    font-family: 'DM Sans', sans-serif;
    font-size: 12.5px;
    border-radius: var(--radius-s);
    padding: 6px 10px;
    cursor: pointer;
    align-self: flex-start;
  }
  .add-row:hover { border-color: #7E93A0; color: #7E93A0; }

  .sub-totals {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  @media (max-width: 480px) { .sub-totals { grid-template-columns: 1fr; } }

  .stat-tile {
    background: var(--bg);
    border-radius: var(--radius-m);
    padding: 12px 14px;
  }
  .habit-totals .stat-tile, .sub-totals .stat-tile { background: #F7F4EF; border: 1px solid #D8CFC0; }
  .stat-tile .label { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
  .stat-tile .val { font-family: 'DM Sans', sans-serif; font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; margin-top: 3px; }
  .stat-tile.accent .val { color: var(--accent); }
  .habit-totals .stat-tile.accent .val, .sub-totals .stat-tile.accent .val { color: #0F4C5C; }
  .habit-totals .stat-tile:not(.accent) .val, .sub-totals .stat-tile:not(.accent) .val { color: #2C2018; }

  /* ---------- summary ---------- */

  section.summary {
    background: var(--surface);
    color: var(--ink);
    border-radius: var(--radius-l);
    padding: 28px 24px;
    margin: 28px 0 18px;
    box-shadow: 0 2px 6px rgba(36, 29, 21, 0.06);
  }

  section.summary h2 { font-size: 24px; font-weight: 500; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
  section.summary p.dek2 { font-size: 16px; opacity: 0.72; line-height: 1.55; max-width: 100%; }

  /* ---------- think-about card ---------- */
  section.think-card {
    background: #2C3E45;
    color: #ffffff;
    border-radius: var(--radius-l);
    padding: 28px 24px;
    margin: 0 0 18px;
    box-shadow: 0 2px 6px rgba(36, 29, 21, 0.06);
  }
  section.think-card h2 { font-size: 24px; font-weight: 500; color: #A8BFD0; margin: 0 0 14px; }
  section.think-card ol { margin: 0; padding-left: 22px; }
  section.think-card li { font-size: 16px; line-height: 1.55; color: #ffffff; padding: 4px 0 4px 4px; }
  section.think-card .think-close { margin-top: 22px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.2); }
  section.think-card .think-close h3 { font-size: 24px; font-weight: 500; color: #A8BFD0; margin: 0 0 10px; }
  section.think-card .think-close p { font-size: 16px; line-height: 1.55; color: #ffffff; margin: 0 0 12px; }
  section.think-card .think-close p:last-child { margin-bottom: 0; }

  .summary-list { margin-top: 20px; display: flex; flex-direction: column; }
  .summary-line {
    display: flex;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14.5px;
  }
  .summary-line .v { font-variant-numeric: tabular-nums; font-weight: 600; }
  .summary-line.total { border-bottom: none; padding-top: 16px; font-size: 19px; font-family: 'DM Sans', sans-serif; }
  .summary-line.total .v { color: #0F4C5C; font-size: 26px; }


  .pct {
    display: inline-block;
    margin-left: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    background: #0F4C5C;
    padding: 2px 9px;
    border-radius: 999px;
    line-height: 1.4;
    vertical-align: middle;
    letter-spacing: 0.03em;
  }

  .reflect { margin: 24px 0; display: flex; flex-direction: column; }
  .reflect-prompt { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .reflect-prompt:last-child { border-bottom: none; padding-bottom: 0; }
  .reflect-prompt .q { font-size: 15px; font-weight: 600; color: var(--ink); }
  .reflect-prompt .hint { font-size: 14px; font-style: italic; color: var(--ink-soft); margin-top: 6px; }

  /* ---------- footer ---------- */

  footer.page {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
  }

  /* Hidden on purpose: saving still runs and still updates this text, it just isn't shown. */
  .save-state { font-size: 12.5px; color: var(--ink-faint); display: none; align-items: center; gap: 6px; }
  .save-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--good); }

  .delete-checklist-link {
    background: none;
    border: none;
    padding: 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 12.5px;
    color: var(--ink-faint);
    text-decoration: underline;
    cursor: pointer;
  }
  .delete-checklist-link:hover { color: #7E93A0; }

  .reset-btn {
    display: block;
    margin-top: 24px;
    margin-bottom: 18px;
    margin-left: auto;
    border: 1px solid #0F4C5C;
    background: transparent;
    color: #0F4C5C;
    font-family: 'DM Sans', sans-serif;
    font-size: 12.5px;
    padding: 7px 14px;
    border-radius: var(--radius-s);
    cursor: pointer;
  }
  .reset-btn:hover { border-color: #7E93A0; color: #7E93A0; }


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

  @media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
  }

  /* ---------- splash ---------- */

  .splash {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }
  .splash[hidden] { display: none; }

  /* ---------- confirm modal ---------- */

  .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(36, 29, 21, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 50;
  }
  .modal-overlay[hidden] { display: none; }

  .modal-card {
    background: var(--surface);
    color: var(--ink);
    border-radius: var(--radius-l);
    padding: 28px 24px;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 20px 50px -12px rgba(0,0,0,0.45);
  }

  .modal-message { font-size: 16px; line-height: 1.5; margin: 0 0 22px; }

  .modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

  .modal-btn-cancel {
    border: 1.5px solid #0F4C5C;
    background: transparent;
    color: #0F4C5C;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 18px;
    border-radius: var(--radius-s);
    cursor: pointer;
  }
  .modal-btn-cancel:hover { opacity: 0.8; }

  .modal-btn-confirm {
    border: 1.5px solid #0F4C5C;
    background: #0F4C5C;
    color: #FFFFFF;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 18px;
    border-radius: var(--radius-s);
    cursor: pointer;
  }
  .modal-btn-confirm:hover { opacity: 0.92; }

  .splash-card {
    max-width: 440px;
    width: 100%;
    background: var(--surface);
    border-radius: 16px;
    padding: 36px 30px;
    text-align: left;
    box-shadow: 0 2px 6px rgba(36, 29, 21, 0.06);
  }
  .splash-title { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(30px, 6vw, 38px); font-weight: 600; margin-top: 6px; line-height: 1.3; color: #2C2C28; }
  .splash-dek { font-size: 16px; color: #2C2C28; line-height: 1.55; margin: 12px 0 26px; }
  .splash-primary-btn {
    display: block;
    width: 100%;
    border: none;
    background: #0F4C5C;
    color: #FFFFFF;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 700;
    padding: 13px 20px;
    border-radius: var(--radius-s);
    cursor: pointer;
  }
  .splash-primary-btn:hover { opacity: 0.92; }
  .splash-primary-btn:disabled { opacity: 0.6; cursor: default; }
  .splash-status { margin-top: 10px; font-size: 13px; color: #B05A38; min-height: 1em; }
  .splash .code-toggle { margin-top: 18px; }
  .splash .code-entry { margin-top: 14px; text-align: left; }
  .splash-footnote {
    max-width: 440px;
    width: 100%;
    margin-top: 48px;
    padding: 0 30px;
    text-align: left;
  }
  .splash-footnote summary {
    list-style: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #2C2C28;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    padding: 4px 0;
  }
  .splash-footnote summary::-webkit-details-marker { display: none; }
  .splash-footnote summary::after {
    content: '\203A';
    display: inline-block;
    font-size: 18px;
    color: #2C2C28;
    transition: transform 0.2s ease;
  }
  .splash-footnote[open] summary::after { transform: rotate(90deg); }
  .splash-footnote-body { overflow: hidden; }
  .splash-footnote p {
    margin-top: 8px;
    padding-bottom: 2px;
    font-size: 14px;
    color: #2C2C28;
    opacity: 0.85;
    line-height: 1.5;
  }

/* iOS Safari zooms the page when a focused field has a font-size under 16px.
   Keep every field at 16px on small screens so focus never triggers zoom. */
@media (max-width: 768px) {
  input, textarea, select { font-size: 16px !important; }
}

/* social links, centered at the bottom of the checklist */
.social-links { display: flex; justify-content: flex-start; gap: 20px; margin: 0; }
.social-links a { display: inline-flex; line-height: 0; transition: opacity .15s; }
.social-links a:hover { opacity: .65; }
.social-links img { width: 24px; height: 24px; display: block; }

/* handle above the page title */
.handle { font-size: 16px; font-weight: 700; line-height: 1.4; color: #2C2C28; margin: 0 0 8px; }

/* legal footer at the bottom of the checklist */
.page-legal { max-width: 560px; margin: 28px auto 32px; padding: 0 16px; text-align: center; }
.page-legal > p { font-size: 12.5px; line-height: 1.5; color: #2C2C28; opacity: 0.7; margin: 0 0 8px; }
.page-legal .page-legal-privacy { margin: 0 auto; padding: 0; max-width: 440px; }
.page-legal .page-legal-privacy summary { justify-content: center; font-size: 13px; }
.page-legal .page-legal-privacy p { text-align: left; font-size: 13px; }

/* header row: handle on the left, "Close Checklist" on the right */
.header-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.header-top .handle { margin: 0; }
.close-checklist-btn {
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 600; line-height: 1;
  color: #2C2C28; background: transparent; border: 1px solid #0F4C5C; border-radius: var(--radius-s);
  padding: 8px 14px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s;
}
.close-checklist-btn:hover { background: #0F4C5C; border-color: #0F4C5C; color: #ffffff; }
.close-checklist-btn:focus-visible { outline: 2px solid #0F4C5C; outline-offset: 2px; }

/* bullet list in the intro, matching p.dek */
ul.dek-list { list-style: disc; margin: 8px 0 0; padding-left: 22px; font-size: 16px; line-height: 1.5; color: #2C2C28; }
ul.dek-list li { margin-top: 6px; padding-left: 2px; }

  /* ---------- v5: sign-up, get-started, lost code ---------- */
  .signup-form { text-align: left; margin-top: 8px; }
  .signup-form label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); margin: 14px 0 6px; }
  .signup-form input {
    width: 100%;
    border: 1.5px solid #D8CFC0;
    background: #FFFFFF;
    border-radius: var(--radius-s);
    padding: 11px 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px; /* 16px stops iPhone zooming in on focus */
    color: var(--ink);
    outline: none;
  }
  .signup-form input:focus { border-color: #D9A53F; }
  .signup-form .splash-primary-btn { width: 100%; margin-top: 20px; }
  .signup-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
  .form-fine { font-size: 13px; color: var(--ink-soft); line-height: 1.5; margin: 12px 0 0; }
  .form-fine a { color: #0F4C5C; }
  .form-msg { border-radius: var(--radius-s); padding: 12px 14px; font-size: 14.5px; line-height: 1.5; background: #EEF4EA; color: #2F4A2A; text-align: left; margin: 4px 0 8px; }
  .form-msg.error { background: #FBEDE7; color: #8A3A1E; }
  .form-msg[hidden], .signup-form[hidden] { display: none; }
  .start-steps { text-align: left; margin: 18px 0 22px; padding-left: 22px; font-size: 15.5px; line-height: 1.55; color: #2C2C28; }
  .start-steps li { margin-bottom: 10px; }
  .lost-code { margin-top: 16px; text-align: left; }
  .lost-code-toggle { list-style: none; display: inline; font-size: 13.5px; color: #0F4C5C; text-decoration: underline; cursor: pointer; }
  .lost-code-toggle::-webkit-details-marker { display: none; }
  .lost-code .form-fine { margin-top: 8px; }
  .signup-form .cf-turnstile { margin-top: 18px; }
  .signup-form .cf-turnstile + .splash-primary-btn { margin-top: 12px; }

/* Checklist footer: Privacy Notice on the left (like the code screen), social icons centered below */
footer.page { position: relative; }
footer.page .footer-privacy { margin: 0; padding: 0 130px 0 0; max-width: none; width: 100%; flex: 1 1 100%; }
footer.page .footer-privacy[open] { padding-right: 0; }
footer.page .delete-checklist-link { position: absolute; top: 7px; right: 0; } /* stays put when the Privacy Notice opens */
footer.page .footer-privacy p { font-size: 13px; max-width: 560px; }
/* Social icons to the left of @britt.on.life in the checklist header */
.header-brand { display: flex; align-items: center; gap: 14px; }
.header-brand .social-links { gap: 12px; }
.header-brand .handle { margin: 0; }

/* Phones: the Cloudflare check box needs at least 300px inside the card, so the card
   gets more of the screen width on narrow phones (keeps 300px+ down to a 360px-wide phone). */
@media (max-width: 420px) {
  .splash { padding-left: 0; padding-right: 0; }
  .splash-card { padding-left: 22px; padding-right: 22px; }
}
@media (max-width: 400px) {
  .splash-card { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 370px) {
  .splash { margin-left: -8px; margin-right: -8px; }
}
