/*
 * Bill Sharing Panda — styles, version 3: consumer.
 *
 * Aimed at the company the product keeps: Octopus, Monzo, Bulb. What those
 * actually share is confidence rather than decoration — one saturated brand
 * colour used without apology, chunky rounded cards instead of hairlines, type
 * a size bigger than feels safe, money set bold rather than in a ledger mono,
 * and a layout built for a thumb first.
 *
 * On a phone the tabs become a fixed bottom bar and every dialog becomes a
 * bottom sheet, because that is where the hands are.
 */

:root {
    --paper: #fbf7f3;
    --surface: #ffffff;
    --sunken: #f4ede6;
    --ink: #1b1620;
    --ink-soft: #574e5f;
    --grey: #8b8092;
    --rule: #ece3da;
    --rule-strong: #dcd0c4;
    --accent: #1e51e0;
    --accent-bright: #2f6bff;
    --accent-ink: #163fae;
    --accent-soft: #e9eeff;
    --on-accent: #ffffff;
    --good: #0d9668;
    --good-soft: #dff5ec;
    --rust: #d9453a;
    --rust-soft: #fdeae8;
    --shadow: 0 2px 4px rgba(27, 22, 32, .04), 0 12px 28px -14px rgba(27, 22, 32, .16);
    --shadow-lift: 0 4px 10px rgba(27, 22, 32, .06), 0 20px 44px -20px rgba(27, 22, 32, .26);

    --radius: 18px;
    --radius-sm: 12px;
    --pill: 999px;

    --sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --display: "Manrope", ui-sans-serif, system-ui, sans-serif;
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --paper: #14101a;
      --surface: #1e1826;
      --sunken: #292131;
      --ink: #f6f1ec;
      --ink-soft: #c3b8c6;
      --grey: #988c9d;
      --rule: #2e2637;
      --rule-strong: #443a4e;
      --accent: #8fabff;
      --accent-bright: #5c85ff;
      --accent-ink: #b9caff;
      --accent-soft: #1e2647;
      --on-accent: #0a0f22;
      --good: #4cc79b;
      --good-soft: #17301f;
      --rust: #f08076;
      --rust-soft: #331a1c;
      --shadow: 0 2px 4px rgba(0, 0, 0, .4), 0 12px 28px -14px rgba(0, 0, 0, .7);
      --shadow-lift: 0 4px 10px rgba(0, 0, 0, .5), 0 20px 44px -20px rgba(0, 0, 0, .9);
    }
  }

  :root[data-theme="dark"] {
    --paper: #14101a;
    --surface: #1e1826;
    --sunken: #292131;
    --ink: #f6f1ec;
    --ink-soft: #c3b8c6;
    --grey: #988c9d;
    --rule: #2e2637;
    --rule-strong: #443a4e;
    --accent: #8fabff;
    --accent-bright: #5c85ff;
    --accent-ink: #b9caff;
    --accent-soft: #1e2647;
    --on-accent: #0a0f22;
    --good: #4cc79b;
    --good-soft: #17301f;
    --rust: #f08076;
    --rust-soft: #331a1c;
    --shadow: 0 2px 4px rgba(0, 0, 0, .4), 0 12px 28px -14px rgba(0, 0, 0, .7);
    --shadow-lift: 0 4px 10px rgba(0, 0, 0, .5), 0 20px 44px -20px rgba(0, 0, 0, .9);
  }

  * { box-sizing: border-box; }

  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: -.005em;
    -webkit-font-smoothing: antialiased;
  }

  .wrap {
    width: 100%;
    max-width: 1080px;
    margin-inline: auto;
    padding-inline: 20px;
  }

  /* ---------- masthead ---------- */

  .masthead {
    border-bottom: 1px solid var(--rule);
    background: var(--surface);
  }

  .masthead-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    padding-block: 16px;
  }

  .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: inherit;
  }

  .brand svg { display: block; flex: none; }

  .brand-name {
    font-family: var(--display);
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -.03em;
    line-height: 1.1;
  }

  /* ---------- house bar ---------- */

  .house-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }

  .house-bar select {
    font: inherit; font-size: 13.5px; font-weight: 500; color: var(--ink);
    background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius-sm);
    padding: 6px 10px; max-width: 220px;
  }
  .house-bar select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

  .house-period {
    font-family: var(--mono); font-size: 11px; color: var(--grey); letter-spacing: .02em;
    white-space: nowrap;
  }

  .house-tag {
    font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase;
    padding: 2px 6px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent);
    white-space: nowrap;
  }

  /* ---------- empty states ---------- */

  .blank {
    border: 1px dashed var(--rule-strong); border-radius: var(--radius); background: var(--surface);
    padding: 34px 28px; text-align: center; display: grid; gap: 12px; justify-items: center;
  }
  .blank h3 {
    margin: 0; font-family: var(--display); font-size: 23px; font-weight: 600; letter-spacing: -.015em;
  }
  .blank p { margin: 0; color: var(--ink-soft); font-size: 14.5px; max-width: 46ch; }
  .blank .blank-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }

  /* ---------- paying ---------- */

  .pay-banner {
    display: flex; gap: 9px; align-items: flex-start;
    background: var(--accent-soft); color: var(--accent-ink);
    border-radius: var(--radius-sm); padding: 10px 13px; font-size: 12.5px; line-height: 1.45;
  }
  .pay-banner b { font-weight: 600; }

  .pay-sheet { border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--paper); }
  .pay-line {
    display: flex; justify-content: space-between; gap: 16px;
    padding: 11px 14px; border-bottom: 1px solid var(--rule); font-size: 14px;
  }
  .pay-line:last-child { border-bottom: 0; }
  .pay-line dt { margin: 0; color: var(--grey); }
  .pay-line dd { margin: 0; font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
  .pay-line.is-amount dd { font-size: 17px; font-weight: 500; }

  .bank-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); }
  .bank {
    appearance: none; font: inherit; font-size: 13.5px; text-align: left; display: flex;
    align-items: center; gap: 9px; cursor: pointer;
    border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink);
    border-radius: var(--radius-sm); padding: 11px 12px;
  }
  .bank:hover { border-color: var(--accent); }
  .bank i {
    flex: none; width: 22px; height: 22px; border-radius: var(--radius); display: grid; place-items: center;
    background: var(--sunken); color: var(--ink-soft); font-family: var(--mono);
    font-size: 10px; font-style: normal; font-weight: 500;
  }

  .pay-progress { display: grid; gap: 14px; justify-items: center; padding: 22px 0 8px; text-align: center; }
  .pay-progress p { margin: 0; font-size: 14.5px; color: var(--ink-soft); max-width: 40ch; }
  .pay-progress strong { color: var(--ink); }

  .spinner {
    width: 34px; height: 34px; border-radius: 50%;
    border: 3px solid var(--rule); border-top-color: var(--accent);
    animation: spin .9s linear infinite;
  }
  @keyframes spin { to { transform: rotate(360deg); } }
  @media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

  .pay-done { display: grid; gap: 12px; justify-items: center; text-align: center; padding: 14px 0 4px; }
  .pay-tick {
    width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
    background: var(--good-soft); color: var(--good); font-size: 24px; line-height: 1;
  }
  .pay-done h3 {
    margin: 0; font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -.02em;
  }
  .pay-done p { margin: 0; color: var(--ink-soft); font-size: 14px; }
  .pay-ref { font-family: var(--mono); font-size: 11.5px; color: var(--grey); }

  .transfer.is-yours { border-left-color: var(--accent); background: var(--accent-soft); }
  .transfer.is-theirs { opacity: .82; border-left-color: var(--rule-strong); }
  .transfer-wait { font-family: var(--mono); font-size: 11.5px; color: var(--grey); }
  .linky {
    appearance: none; border: 0; background: none; padding: 0; font: inherit; font-size: 12.5px;
    color: var(--grey); text-decoration: underline; cursor: pointer;
  }
  .linky:hover { color: var(--ink); }

  /* ---------- person switcher ---------- */

  .switcher { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

  .switcher-label { font-size: 13px; font-weight: 500; color: var(--grey); }

  .faces { display: flex; gap: 4px; }

  .face {
    --face-h: 200;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--rule-strong);
    background: hsl(var(--face-h) 34% 92%);
    color: hsl(var(--face-h) 46% 24%);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    transition: transform .12s ease, box-shadow .12s ease;
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .face {
      background: hsl(var(--face-h) 28% 22%);
      color: hsl(var(--face-h) 52% 82%);
    }
  }

  :root[data-theme="dark"] .face {
    background: hsl(var(--face-h) 28% 22%);
    color: hsl(var(--face-h) 52% 82%);
  }

  .face:hover { transform: translateY(-1px); }
  .face[aria-pressed="true"] {
    border-color: var(--ink);
    box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--ink);
  }
  .face.is-gone { opacity: .5; }

  /* ---------- tabs ---------- */

  .tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--rule);
    background: var(--surface);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }

  .tabs-inner { display: flex; gap: 4px; padding-block: 12px; }

  .tab {
    appearance: none;
    border: 0;
    background: none;
    color: var(--grey);
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 700;
    padding: 10px 18px;
    margin-right: 6px;
    border-radius: var(--pill);
    cursor: pointer;
    white-space: nowrap;
  }
  .tab:hover { color: var(--ink); background: var(--sunken); }
  .tab[aria-selected="true"] { color: var(--on-accent); background: var(--accent); }

  /* ---------- layout ---------- */

  main { padding-block: 32px 96px; }

  .section + .section { margin-top: 44px; }

  .section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
  }

  h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 0; color: var(--ink); }

  .section-note {
    font-size: 13px;
    color: var(--grey);
    margin: 0;
    max-width: 62ch;
  }

  /* ---------- your position ---------- */

  .position {
    background: var(--surface);
    border: 0;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    padding: 26px 26px 24px;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: start;
  }

  .position-kicker {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--grey);
    margin: 0 0 6px;
  }

  .position-figure {
    font-family: var(--display);
    font-size: clamp(44px, 9vw, 68px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    margin: 0;
  }
  .position-figure.owes { color: var(--rust); }
  .position-figure.owed { color: var(--good); }
  .position-figure.level { color: var(--ink); }

  .position-line {
    margin: 10px 0 0;
    font-size: 14px;
    color: var(--ink-soft);
    max-width: 38ch;
  }

  .ledger { display: grid; gap: 0; }

  .ledger-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--rule);
    font-size: 14px;
  }
  .ledger-row:first-child { border-top: 1px solid var(--rule); }
  .ledger-row dt { color: var(--ink-soft); margin: 0; }
  .ledger-row dd { margin: 0; font-family: var(--mono); font-variant-numeric: tabular-nums; }
  .ledger-row.is-total { font-weight: 600; border-bottom: 0; }
  .ledger-row.is-total dt { color: var(--ink); }

  /* ---------- timeline ---------- */

  .timeline {
    background: var(--surface);
    border: 0;
    box-shadow: var(--shadow);
    border-radius: var(--radius-sm);
    padding: 20px 22px 16px;
    overflow-x: auto;
  }

  .tl-grid {
    display: grid;
    grid-template-columns: 148px minmax(320px, 1fr) 62px;
    gap: 0 14px;
    align-items: center;
    min-width: 540px;
  }

  .tl-months {
    display: flex;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--grey);
    border-bottom: 1px solid var(--rule);
    padding-bottom: 5px;
    margin-bottom: 10px;
  }
  .tl-month { border-left: 1px solid var(--rule); padding-left: 6px; }
  .tl-month:first-child { border-left: 0; padding-left: 0; }

  .tl-name {
    font-size: 13.5px;
    font-weight: 500;
    padding-block: 7px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .tl-name small {
    display: block;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 400;
    color: var(--grey);
    letter-spacing: .02em;
  }

  .tl-track {
    position: relative;
    height: 26px;
    border-radius: var(--radius-sm);
  }

  .tl-rule {
    position: absolute;
    top: -4px;
    bottom: -4px;
    width: 1px;
    background: var(--rule);
    z-index: 2;
  }

  .tl-track::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--sunken);
    border-radius: var(--radius-sm);
    z-index: 0;
  }

  .tl-bar {
    position: absolute;
    top: 50%;
    height: 16px;
    transform: translateY(-50%);
    z-index: 1;
    border-radius: var(--radius-sm);
    background: hsl(var(--face-h) 42% 62%);
    display: flex;
    align-items: center;
    padding-inline: 7px;
    font-family: var(--mono);
    font-size: 10px;
    color: #10130f;
    white-space: nowrap;
    overflow: hidden;
  }

  .tl-bar.opens-before { border-start-start-radius: 0; border-end-start-radius: 0; }
  .tl-bar.runs-after { border-start-end-radius: 0; border-end-end-radius: 0; }

  .tl-nights {
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--ink-soft);
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .tl-occupancy { height: 44px; }

  /* The track paints a background through an absolutely positioned ::before,
     which sits above non-positioned children. Lift the chart over it. */
  .tl-occupancy svg {
    display: block; width: 100%; height: 100%; overflow: visible;
    position: relative; z-index: 1;
  }

  .tl-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--rule);
    font-size: 12.5px;
    color: var(--grey);
  }
  .tl-legend b { color: var(--ink); font-weight: 500; }

  /* ---------- tables ---------- */

  .table-scroll { overflow-x: auto; }

  table.sheet {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 520px;
  }

  table.sheet th {
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--grey);
    padding: 0 12px 8px 0;
    border-bottom: 1px solid var(--rule-strong);
    white-space: nowrap;
  }

  table.sheet td {
    padding: 11px 12px 11px 0;
    border-bottom: 1px solid var(--rule);
    vertical-align: baseline;
  }

  table.sheet th.num, table.sheet td.num {
    text-align: right;
    padding-right: 0;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  table.sheet tr:last-child td { border-bottom: 0; }

  tr.total-row td {
    border-top: 1px solid var(--rule-strong);
    border-bottom: 0;
    font-weight: 600;
    padding-top: 12px;
  }

  .who { display: flex; align-items: center; gap: 9px; }

  .pip {
    --face-h: 200;
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: hsl(var(--face-h) 40% 66%);
    color: #10130f;
    font-family: var(--mono);
    font-size: 9.5px;
    font-weight: 500;
  }

  .muted { color: var(--grey); }
  .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
  .tag {
    display: inline-block;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: var(--sunken);
    color: var(--grey);
    white-space: nowrap;
  }
  .tag.left { background: var(--rust-soft); color: var(--rust); }
  .tag.new { background: var(--good-soft); color: var(--good); }

  /* ---------- bills ---------- */

  .bill-list { display: grid; gap: 12px; }

  .bill {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding-inline: 20px;
    transition: box-shadow .14s ease;
  }
  .bill:hover { box-shadow: var(--shadow-lift); }

  .bill-head { display: flex; align-items: center; gap: 12px; }
  .bill-head .row-edit { flex: none; opacity: 0; transition: opacity .12s ease; }
  .bill-head:hover .row-edit, .bill-head:focus-within .row-edit { opacity: 1; }
  @media (hover: none) { .bill-head .row-edit { opacity: 1; } }

  .bill-summary {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    width: 100%;
    background: none;
    border: 0;
    padding: 20px 0;
    text-align: left;
    color: inherit;
    font: inherit;
    cursor: pointer;
  }
  .bill-summary:hover .bill-label { color: var(--accent); }

  .glyph {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    background: var(--sunken);
    color: var(--ink-soft);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
  }

  .bill-label { font-weight: 500; }
  .bill-sub {
    display: block;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--grey);
    letter-spacing: .01em;
  }

  .bill-amount {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: right;
    font-size: 15px;
  }
  .bill-amount small {
    display: block;
    font-size: 10.5px;
    color: var(--grey);
    letter-spacing: .02em;
  }

  .bill-detail { padding: 18px 0 22px; border-top: 1px solid var(--rule); }

  .method-note {
    font-size: 13px;
    color: var(--ink-soft);
    margin: 0 0 14px;
    max-width: 66ch;
  }
  .method-note code {
    font-family: var(--mono);
    font-size: 12px;
    background: var(--sunken);
    padding: 1px 5px;
    border-radius: var(--radius-sm);
  }

  /* ---------- settle ---------- */

  .balance-row {
    display: grid;
    grid-template-columns: 150px minmax(120px, 1fr) 96px;
    align-items: center;
    gap: 14px;
    padding: 9px 0;
    border-bottom: 1px solid var(--rule);
  }

  .balance-bar {
    position: relative;
    height: 16px;
    background: var(--sunken);
    border-radius: var(--radius-sm);
  }
  .balance-bar::after {
    content: "";
    position: absolute;
    top: -3px;
    bottom: -3px;
    left: 50%;
    width: 1px;
    background: var(--rule-strong);
  }
  .balance-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    border-radius: var(--radius-sm);
  }
  .balance-fill.neg { background: var(--rust); }
  .balance-fill.pos { background: var(--good); }

  .balance-num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
  .balance-num.neg { color: var(--rust); }
  .balance-num.pos { color: var(--good); }

  .transfers { display: grid; gap: 10px; margin-top: 4px; }

  .transfer {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    background: var(--surface);
    box-shadow: var(--shadow);
    border: 0;
    border-left: 5px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
  }

  .transfer-text { flex: 1 1 240px; font-size: 14.5px; }
  .transfer-text b { font-weight: 600; }
  .transfer-amount {
    font-weight: 700;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
  }

  .btn {
    appearance: none;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--rule-strong);
    background: var(--surface);
    color: var(--ink);
    border-radius: var(--pill);
    padding: 12px 24px;
    font-weight: 700;
    min-height: 46px;
    cursor: pointer;
    white-space: nowrap;
  }
  .btn:hover { border-color: var(--ink); }
  .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
  .btn.primary:hover { filter: brightness(1.08); }

  .empty {
    padding: 28px 0;
    color: var(--grey);
    font-size: 14px;
  }

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

  footer.foot {
    border-top: 1px solid var(--rule);
    background: var(--surface);
    padding-block: 22px 28px;
    font-size: 12.5px;
    color: var(--grey);
  }
  footer.foot a { color: var(--accent); }
  .foot-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

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

  /* The dialog takes focus on open so that no value inside it wears a ring
     that makes it look like a field. */
  dialog:focus, dialog:focus-visible { outline: none; }


  /* ---------- editing ---------- */

  .section-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

  .row-edit {
    appearance: none; font: inherit; font-size: 12px; font-weight: 500;
    border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink-soft);
    border-radius: var(--pill); padding: 8px 16px; min-height: 38px; font-weight: 600;
    cursor: pointer; white-space: nowrap;
  }
  .row-edit:hover { border-color: var(--ink); color: var(--ink); }

  .row-actions { display: inline-flex; gap: 6px; justify-content: flex-end; }
  .row-edit.strong { color: var(--accent); border-color: var(--accent-soft); background: var(--accent-soft); }
  .row-edit.strong:hover { border-color: var(--accent); color: var(--accent); }

  .quick-picks { display: flex; gap: 8px; flex-wrap: wrap; }
  .pick {
    appearance: none; font: inherit; font-size: 13px; text-align: left;
    border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink);
    border-radius: var(--radius-sm); padding: 7px 12px; cursor: pointer; line-height: 1.3;
  }
  .pick:hover { border-color: var(--accent); }
  .pick small {
    display: block; font-family: var(--mono); font-size: 10.5px; color: var(--grey); letter-spacing: .02em;
  }

  dialog.editor {
    padding: 0; border: 1px solid var(--rule-strong); border-radius: var(--radius);
    background: var(--surface); color: var(--ink);
    width: min(580px, calc(100vw - 32px)); max-height: min(88vh, 900px);
    box-shadow: 0 24px 64px -24px rgba(0, 0, 0, .45);
  }
  dialog.editor::backdrop { background: rgba(14, 18, 15, .5); }

  .editor-form { display: flex; flex-direction: column; max-height: inherit; }

  .editor-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
    padding: 18px 22px 14px; border-bottom: 1px solid var(--rule);
  }
  .editor-head h3 {
    margin: 0; font-family: var(--display); font-size: 21px; font-weight: 600; letter-spacing: -.015em;
  }
  .editor-head p {
    margin: 4px 0 0; font-family: var(--mono); font-size: 11px; color: var(--grey); letter-spacing: .02em;
  }

  .editor-body { padding: 18px 22px 22px; overflow-y: auto; display: grid; gap: 16px; }

  .field { display: grid; gap: 5px; }
  .field > label, .fieldset > legend {
    font-family: var(--mono); font-size: 10px; text-transform: uppercase;
    letter-spacing: .09em; color: var(--grey); padding: 0;
  }

  .field input[type="text"], .field input[type="number"], .field input[type="date"], .field select {
    font: inherit; font-size: 14.5px; color: var(--ink); background: var(--paper);
    border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); padding: 8px 10px; width: 100%;
  }
  .field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
  .field .hint { font-size: 12px; color: var(--grey); }
  .field .bad { font-size: 12px; color: var(--rust); }
  .field.is-bad input, .field.is-bad select { border-color: var(--rust); }

  .field-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }

  .money-input { position: relative; }
  .money-input span {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    font-family: var(--mono); font-size: 14px; color: var(--grey); pointer-events: none;
  }
  .money-input input { padding-left: 24px !important; font-family: var(--mono); }

  .fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 7px; }

  .choice { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; cursor: pointer; }
  .choice input { margin: 3px 0 0; flex: none; accent-color: var(--accent); }
  .choice span small { display: block; font-size: 12px; color: var(--grey); }

  .check-grid { display: grid; gap: 7px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

  .custom-list { display: grid; gap: 8px; }
  .custom-line { display: grid; grid-template-columns: minmax(0, 1fr) 120px; align-items: center; gap: 10px; }
  .custom-line span { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .consequence {
    border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--paper); padding: 14px 16px;
  }
  .consequence h4 {
    margin: 0 0 10px; font-family: var(--mono); font-size: 10px; text-transform: uppercase;
    letter-spacing: .09em; color: var(--grey); font-weight: 400;
  }
  .consequence p { margin: 0; font-size: 13px; color: var(--ink-soft); }
  .consequence table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
  .consequence td { padding: 5px 0; border-bottom: 1px solid var(--rule); }
  .consequence tr:last-child td { border-bottom: 0; }
  .consequence td.num {
    text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap;
  }
  .consequence .up { color: var(--rust); }
  .consequence .down { color: var(--good); }

  .editor-foot {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 14px 22px 18px; border-top: 1px solid var(--rule); background: var(--paper);
  }
  .editor-foot .spacer { margin-left: auto; }

  .btn.danger { border-color: var(--rust); color: var(--rust); background: none; }
  .btn.danger:hover { background: var(--rust-soft); }
  .btn[disabled] { opacity: .5; cursor: not-allowed; }

  .editor-message {
    flex-basis: 100%; font-size: 13px; color: var(--rust); margin: 0;
  }
  .editor-message.is-asking { color: var(--ink-soft); font-weight: 500; }

  @media (max-width: 520px) {
    .field-row { grid-template-columns: 1fr; }
    .editor-head, .editor-body, .editor-foot { padding-inline: 16px; }
  }


  /* ---------- first run ---------- */

  .opening {
    max-width: 560px; margin-inline: auto; padding-block: 8vh 10vh;
    display: grid; gap: 18px; justify-items: center; text-align: center;
  }
  .opening-mark { width: 62px; height: 47px; }
  .opening h1 {
    margin: 0; font-family: var(--display); font-size: clamp(36px, 7vw, 50px);
    font-weight: 800; letter-spacing: -.035em; line-height: 1.02;
  }
  .opening-line { margin: 0; color: var(--ink-soft); font-size: 15.5px; max-width: 44ch; }
  .opening-alts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
  .opening-foot {
    margin: 10px 0 0; font-size: 12.5px; color: var(--grey); line-height: 1.9;
  }
  .opening-foot .mono { font-size: 12px; color: var(--ink-soft); }

  /* ---------- drop zone ---------- */

  .drop {
    width: 100%; display: grid; gap: 4px; justify-items: center; cursor: pointer;
    border: 2px dashed var(--rule-strong); border-radius: var(--radius);
    background: var(--surface); padding: 34px 20px; text-align: center;
    transition: border-color .12s ease, background .12s ease;
  }
  .drop:hover, .drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
  .drop.is-busy { opacity: .7; pointer-events: none; }
  .drop-main { font-size: 19px; font-weight: 700; }
  .drop-sub { font-size: 13px; color: var(--grey); }
  .drop-busy { font-family: var(--mono); font-size: 12px; color: var(--accent); }
  .drop.is-compact { padding: 18px 16px; margin-top: 18px; }
  .drop.is-compact .drop-main { font-size: 14px; }
  .drop.is-compact .drop-sub { font-size: 12px; }

  /* ---------- nudge ---------- */

  .nudge {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    border: 1px solid var(--rule); border-left: 3px solid var(--accent);
    background: var(--surface); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 16px;
    font-size: 14.5px;
  }
  .nudge span { flex: 1 1 220px; }

  /* ---------- standing figure in the bar ---------- */

  .standing {
    appearance: none; border: 0; background: var(--surface); box-shadow: var(--shadow);
    border-radius: var(--pill); padding: 10px 18px; cursor: pointer; font: inherit;
    display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap;
  }
  .standing span { font-size: 12px; color: var(--grey); }
  .standing b { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 17px; }
  .standing:hover { border-color: var(--ink); }
  .standing.owes b { color: var(--rust); }
  .standing.owed b { color: var(--good); }
  .standing.is-spare { visibility: hidden; pointer-events: none; }

  /* ---------- quick names ---------- */

  .name-list { display: grid; gap: 8px; }
  .name-input {
    font: inherit; font-size: 15px; color: var(--ink); background: var(--paper);
    border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); padding: 9px 11px; width: 100%;
  }
  .name-input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

  .paste-area {
    font-family: var(--mono); font-size: 12.5px; line-height: 1.55; width: 100%;
    color: var(--ink); background: var(--paper); border: 1px solid var(--rule-strong);
    border-radius: var(--radius-sm); padding: 10px 12px; resize: vertical;
  }
  .paste-area:focus { outline: 2px solid var(--accent); outline-offset: -1px; }



  /* ---------- reviewing a read bill ---------- */

  dialog.editor:has(.review-body) { width: min(820px, calc(100vw - 32px)); }

  .review-grid {
    display: grid; gap: 22px;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    align-items: start;
  }

  .review-facts { margin: 0; display: grid; gap: 0; }

  .rev-row {
    display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px;
    align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--rule);
  }
  /* No rule above the first row: it boxed the value in and made it read as an
     open input, which is the one thing these are not. */
  .rev-row:last-child { border-bottom: 0; }
  .rev-row dt { margin: 0; font-size: 14px; font-weight: 500; color: var(--grey); padding-top: 3px; }
  .rev-row dd { margin: 0; min-width: 0; }
  .rev-row.is-editing { align-items: center; }

  .rev-value {
    appearance: none; border: 0; background: none; padding: 3px 6px; margin-left: -6px;
    font: inherit; font-size: 15px; color: var(--ink); text-align: left; cursor: pointer;
    border-radius: var(--radius-sm); width: 100%; word-break: break-word;
  }
  .rev-value:hover { background: var(--accent-soft); }
  .rev-value strong { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; }
  .rev-empty { color: var(--rust); font-style: normal; }

  .rev-row input, .rev-row select {
    font: inherit; font-size: 14.5px; color: var(--ink); background: var(--paper);
    border: 1px solid var(--accent); border-radius: var(--radius-sm); padding: 6px 9px; width: 100%;
  }
  .rev-row .money-input input { padding-left: 24px; font-family: var(--mono); }
  .date-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .rev-done { margin-top: 7px; padding: 4px 12px; font-size: 12px; }



  .bill-shot {
    appearance: none; padding: 0; cursor: zoom-in; display: block; width: 100%;
    border: 1px solid var(--rule-strong); border-radius: var(--radius); overflow: hidden;
    background: var(--sunken); position: relative;
  }
  .bill-shot img {
    display: block; width: 100%; height: auto; max-height: 420px;
    object-fit: cover; object-position: top;
  }
  .bill-shot.is-text pre {
    margin: 0; padding: 12px 14px; max-height: 420px; overflow: hidden; text-align: left;
    font-family: var(--mono); font-size: 10.5px; line-height: 1.5; color: var(--ink-soft);
    white-space: pre-wrap; word-break: break-word;
  }
  .bill-shot-hint {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 10px 7px;
    font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
    color: #f4f8f5; background: linear-gradient(transparent, rgba(11, 20, 14, .72));
  }
  .bill-shot:hover { border-color: var(--accent); }
  .no-shot { margin: 0; font-size: 13px; color: var(--grey); }

  dialog.lightbox {
    padding: 0; border: 0; border-radius: var(--radius); background: var(--surface);
    width: min(940px, calc(100vw - 32px)); max-height: 92vh; overflow: auto; position: relative;
  }
  dialog.lightbox::backdrop { background: rgba(8, 12, 9, .78); }
  dialog.lightbox img { display: block; width: 100%; height: auto; }
  .lightbox-text {
    margin: 0; padding: 22px; font-family: var(--mono); font-size: 12px; line-height: 1.6;
    white-space: pre-wrap; word-break: break-word; color: var(--ink);
  }
  .lightbox-close {
    position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%;
    border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink);
    font-size: 18px; line-height: 1; cursor: pointer;
  }
  .lightbox-close:hover { border-color: var(--ink); }

  /* ---------- the roster ---------- */

  .roster { list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 6px; }
  .roster li {
    display: flex; align-items: center; gap: 10px;
    border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--paper); padding: 8px 10px;
  }
  .roster-name {
    flex: 1; font: inherit; font-size: 14.5px; text-align: left; color: var(--ink);
    appearance: none; border: 0; background: none; cursor: pointer;
    padding: 3px 6px; margin-left: -6px; border-radius: var(--radius-sm);
  }
  .roster-name:hover { background: var(--accent-soft); }
  .roster-input { flex: 1; }

  .payer-name { margin-top: 6px; }
  .roster-you {
    font-family: var(--mono); font-size: 9.5px; letter-spacing: .07em; text-transform: uppercase;
    color: var(--grey); border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); padding: 1px 4px;
  }
  .roster-x {
    appearance: none; border: 0; background: none; color: var(--grey); font-size: 17px;
    line-height: 1; cursor: pointer; padding: 2px 5px; border-radius: var(--radius-sm);
  }
  .roster-x:hover { color: var(--rust); background: var(--rust-soft); }

  .adder { display: flex; gap: 8px; align-items: stretch; }
  .adder .name-input { flex: 1; }

  .shot-link {
    appearance: none; border: 0; background: none; padding: 0; font: inherit; font-size: 12.5px;
    color: var(--accent); text-decoration: underline; cursor: pointer;
  }

  @media (max-width: 680px) {
    .review-grid { grid-template-columns: minmax(0, 1fr); }
    .bill-shot img, .bill-shot.is-text pre { max-height: 260px; }
  }

  @media (max-width: 720px) {
    .position { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .balance-row { grid-template-columns: 110px minmax(80px, 1fr) 84px; gap: 10px; }
    .bill-detail { padding-left: 16px; margin-left: 6px; }
  }

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

/* ---------- on a phone ---------- */

@media (max-width: 720px) {
  .wrap { padding-inline: 16px; }

  /* Tabs become a bottom bar: that is where the thumb already is. */
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -6px 20px -12px rgba(27, 22, 32, .3);
  }
  .tabs-inner { width: 100%; padding-block: 8px; gap: 4px; }
  .tab { flex: 1; margin-right: 0; text-align: center; padding: 12px 6px; font-size: 14px; }
  main { padding-bottom: 108px; }

  /* Dialogs become bottom sheets. */
  dialog.editor {
    width: 100%; max-width: none; max-height: 92vh;
    margin: 0; position: fixed; inset: auto 0 0 0;
    border: 0; border-radius: 24px 24px 0 0;
  }
  dialog.editor:has(.review-body) { width: 100%; }
  .editor-form { max-height: 92vh; }
  .editor-head { padding: 22px 20px 16px; }
  .editor-body { padding: 18px 20px 24px; }
  .editor-foot {
    position: sticky; bottom: 0;
    padding: 14px 20px calc(16px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -6px 18px -14px rgba(27, 22, 32, .4);
  }
  .editor-foot .btn { flex: 1 1 auto; text-align: center; }
  .editor-foot .spacer { display: none; }

  dialog.lightbox { width: 100%; max-width: none; border-radius: 20px 20px 0 0; margin: auto 0 0; }

  /* Everything tappable gets a real target. */
  .row-edit, .linky, .pick, .bank { min-height: 44px; }
  .linky { padding: 10px 0; }
  .face { width: 44px; height: 44px; font-size: 13px; }

  .masthead-inner { gap: 12px 16px; padding-block: 14px; }
  .brand-name { font-size: 18px; }
  /* The balance leads: it is the one number anyone opens this for. */
  .house-bar { width: 100%; margin-left: 0; order: 2; }
  .standing { flex: 1; justify-content: space-between; padding: 14px 20px; }
  .standing span { font-size: 14px; }
  .standing b { font-size: 24px; }
  .switcher { width: 100%; order: 3; }
  .faces { flex: 1; }

  .bill { padding-inline: 16px; }
  .bill-summary { grid-template-columns: 34px minmax(0, 1fr); gap: 12px; }
  .bill-amount { grid-column: 2; text-align: left; margin-top: 4px; }
  .bill-amount small { display: inline; margin-left: 8px; }

  .transfer { padding: 16px; }
  .transfer .btn { width: 100%; }

  .opening { padding-block: 5vh 8vh; }
  .review-grid { gap: 18px; }
}

/* ---------- the dashboard ---------- */

.home { display: grid; gap: 14px; }

.hero, .jump {
  appearance: none; font: inherit; text-align: left; cursor: pointer; width: 100%;
  border: 1px solid var(--rule); background: var(--surface); color: var(--ink);
  border-radius: var(--radius, 4px); box-shadow: var(--shadow);
  padding: 22px 24px; display: grid; gap: 4px;
  transition: box-shadow .14s ease, border-color .14s ease;
}
.hero:hover, .jump:hover { border-color: var(--rule-strong); box-shadow: var(--shadow-lift, var(--shadow)); }

.hero { grid-template-columns: minmax(0, 1fr) auto; align-items: center; row-gap: 2px; }
.hero-label { grid-column: 1; font-size: 15px; color: var(--grey); }
.hero-figure {
  grid-column: 1; font-family: var(--display); font-size: clamp(38px, 9vw, 54px);
  font-weight: 800; line-height: 1.05; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.hero .chev { grid-column: 2; grid-row: 1 / span 2; }
.hero.owes .hero-figure { color: var(--rust); }
.hero.owed .hero-figure { color: var(--good); }

.chev { font-size: 30px; line-height: 1; color: var(--grey); }

.jump-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.jump-title { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }

.mates-row { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; }
.mate { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; }
.mate.is-gone { opacity: .45; }

.mini-list { display: grid; gap: 0; margin-top: 6px; }
.mini {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 15px;
}
.mini:last-child { border-bottom: 0; }
.mini-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-amount { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

.jump-foot { margin-top: 8px; font-size: 13px; color: var(--grey); }

@media (max-width: 720px) {
  .hero, .jump { padding: 18px 18px; }
  .tab { font-size: 12.5px; padding: 12px 2px; }
}

.add-tile {
  aspect-ratio: 1; width: 100%; max-width: 190px; cursor: pointer;
  display: grid; align-content: center; justify-items: center; gap: 6px; text-align: center;
  border: 2px dashed var(--rule-strong); border-radius: var(--radius, 4px);
  background: var(--surface); color: var(--ink);
  transition: border-color .12s ease, background .12s ease, color .12s ease;
}
.add-tile:hover, .add-tile.is-over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.add-tile.is-busy { opacity: .7; pointer-events: none; }
.add-plus { font-size: 40px; line-height: 1; font-weight: 300; color: var(--grey); }
.add-tile:hover .add-plus, .add-tile.is-over .add-plus { color: var(--accent); }
.add-text { font-size: 15px; font-weight: 600; }

@media (min-width: 760px) {
  .home { grid-template-columns: minmax(0, 1fr) 190px; align-items: start; }
  .home > .hero { grid-column: 1; }
  .home > .add-tile { grid-column: 2; grid-row: 1; max-width: none; }
  .home > .jump, .home > .nudge { grid-column: 1 / -1; }
}

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

.site-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  margin-top: 56px; padding: 18px 0 4px;
  border-top: 1px solid var(--rule);
  font-size: 12.5px; color: var(--grey);
}

/* ---------- the front door ---------- */

.lander { max-width: 940px; margin-inline: auto; padding-block: 24px 60px; }

.lander-top { display: flex; align-items: center; margin-bottom: 48px; }
/* ---------- the share link, which is the whole account system ---------- */

.copy-link {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 14px; cursor: pointer; text-align: left;
  background: var(--sunken); border: 1px solid var(--rule);
  border-radius: var(--radius-sm); color: inherit; font: inherit;
  transition: border-color .12s ease, background .12s ease;
}
.copy-link:hover { border-color: var(--rule-strong); }
.copy-url {
  flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.copy-icon { flex: none; display: flex; color: var(--grey); }
.copy-icon svg { width: 20px; height: 20px; }
.copy-link.is-copied { border-color: var(--good); background: var(--good-soft); }
.copy-link.is-copied .copy-icon { color: var(--good); }

/* ---------- which housemate are you ---------- */

.whoami { max-width: 460px; margin: 0 auto; padding-top: 6vh; }
.whoami-list { display: grid; gap: 10px; }
.whoami-pick {
  appearance: none; font: inherit; text-align: left; cursor: pointer; width: 100%;
  border: 1px solid var(--rule); background: var(--surface); color: var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 18px; display: flex; align-items: center; gap: 14px;
  transition: box-shadow .14s ease, border-color .14s ease;
}
.whoami-pick:hover { border-color: var(--rule-strong); box-shadow: var(--shadow-lift, var(--shadow)); }
.whoami-pick .face { pointer-events: none; }
.whoami-name {
  flex: 1; min-width: 0; font-size: 17px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.whoami-new { margin-top: 16px; }

.lander-start .btn.primary { display: block; width: fit-content; margin: 14px auto 0; }

/* flex: none matters more than the height here — as a flex child it was being
   shrunk horizontally while the height held, which is what squashed it. */
.brand-logo { height: 34px; width: auto; flex: none; }

/* The lockup is navy on white, so on a dark ground it stops reading. The
   themed mark takes over there, in the masthead and on the landing page
   alike. */
.brand-mark { display: none; align-items: center; gap: 10px; }
.brand-mark svg { width: 38px; height: 30px; flex: none; }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .brand-logo { display: none; }
    :root:not([data-theme="light"]) .brand-mark { display: flex; }
  }

  :root[data-theme="dark"] .brand-logo { display: none; }
  :root[data-theme="dark"] .brand-mark { display: flex; }

.lander-hero {
  display: grid; gap: 32px 48px; align-items: center; margin-bottom: 44px;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr);
}
.lander-hero h1 {
  margin: 0 0 18px; font-family: var(--display); font-weight: 800;
  font-size: clamp(32px, 5.2vw, 50px); line-height: 1.05; letter-spacing: -.03em;
  max-width: 20ch; text-wrap: balance;
}
.lander-hero h1 em { font-style: italic; color: var(--accent); }
.lander-hero .standfirst { margin: 0; font-size: 17px; line-height: 1.55; color: var(--ink-soft); max-width: 52ch; }
.lander-hero .eyebrow {
  margin: 0 0 16px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent);
}
.lander-shot {
  display: block; width: 100%; height: auto; border-radius: var(--radius, 4px);
  background: #efddcb; box-shadow: var(--shadow);
}

.lander-start {
  background: var(--surface); border-radius: var(--radius, 4px); box-shadow: var(--shadow);
  padding: 32px; margin-bottom: 56px; display: grid; gap: 16px; justify-items: center;
}
.lander-start h2 { margin: 0; }
.lander-start .drop { max-width: 560px; }

.lander-how { display: grid; gap: 30px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-bottom: 56px; }
.lander-how .step h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.lander-how .step p { margin: 0; font-size: 15px; color: var(--ink-soft); }

.lander-worked { margin-bottom: 56px; }
.lander-worked .lede { margin: 10px 0 22px; font-size: 16px; color: var(--ink-soft); max-width: 60ch; }

.worked { background: var(--surface); border-radius: var(--radius, 4px); box-shadow: var(--shadow); overflow: hidden; }
.worked-head {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 1px solid var(--rule); background: var(--sunken);
  font-family: var(--mono); font-size: 12px;
}
.worked-head b { font-family: var(--sans); font-size: 15px; font-weight: 700; }
.worked .table-scroll { padding: 6px 20px; }
.worked .over { color: var(--rust); }
.worked .under { color: var(--good); }
.worked-foot { margin: 0; padding: 14px 20px 18px; font-size: 14px; color: var(--ink-soft); }

.lander-close h2 { margin-bottom: 14px; }
.lander-close p { font-size: 16px; color: var(--ink-soft); max-width: 58ch; }
.lander-honest {
  border-left: 3px solid var(--rule-strong); padding-left: 16px;
  font-size: 14.5px; color: var(--grey);
}

@media (max-width: 720px) {
  .lander-hero { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .lander-hero h1 { font-size: clamp(26px, 7.4vw, 34px); max-width: none; }
  .lander-shot { max-width: 230px; }
  .lander-start { padding: 22px 18px; }
  .lander-top { margin-bottom: 32px; }
}
