:root {
  --paper: #F2F5F7;
  --surface: #FFFFFF;
  --ink: #15232E;
  --ink-soft: #566673;
  --sonar: #0E7C7B;
  --sonar-tint: #D8ECEA;
  --amber: #E39A2D;
  --coral: #D6493F;
  --line: #D5DDE2;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Public Sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink);
       font: 400 16px/1.55 var(--body); }
a { color: var(--sonar); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 28px 24px 80px; }

.top { display: flex; justify-content: space-between; align-items: baseline;
       gap: 16px; flex-wrap: wrap; }
.mark { font: 700 22px/1 var(--display); letter-spacing: -0.01em; }
.who { color: var(--ink-soft); font-size: 14px; }
.who a { margin-left: 14px; }

.lede { margin: 56px 0 10px; max-width: 24ch;
        font: 700 clamp(34px, 5.2vw, 60px)/1.04 var(--display);
        letter-spacing: -0.025em; }
.sub { margin: 0 0 40px; max-width: 60ch; color: var(--ink-soft); font-size: 18px; }
h2 { margin: 52px 0 6px; font: 500 22px/1.2 var(--display); letter-spacing: -0.01em; }
.hint { margin: 0 0 18px; max-width: 64ch; color: var(--ink-soft); font-size: 14px; }
.hint.spaced { margin-top: 18px; }

.btn { display: inline-block; background: var(--ink); color: #fff; border: 0;
       border-radius: 999px; padding: 11px 22px; text-decoration: none;
       font: 500 15px/1.2 var(--body); cursor: pointer; }
.btn:hover { background: var(--sonar); }
.btn:focus-visible { outline: 3px solid var(--sonar); outline-offset: 3px; }
.btn[disabled] { opacity: .65; cursor: progress; }

.notice { margin: 28px 0 0; padding: 12px 16px; max-width: 64ch; font-size: 15px;
          background: #FBE9E7; border-left: 4px solid var(--coral);
          border-radius: 0 10px 10px 0; }

.now { --c: var(--coral); }
.soon { --c: var(--amber); }
.later { --c: var(--sonar); }

/* The 30-day ruler */
.ruler-scroll { overflow-x: auto; padding-bottom: 8px; }
.ruler { position: relative; min-width: 760px;
         height: calc(var(--lanes) * 56px + 100px); }
.band { position: absolute; left: 0; top: 0; bottom: 30px;
        width: calc(7 / 30 * 100%); background: var(--sonar-tint);
        border-radius: 12px 12px 0 0; transform-origin: left center;
        animation: sweep .9s cubic-bezier(.2, .7, .2, 1) both; }
.axis { position: absolute; left: 0; right: 0; bottom: 30px; height: 2px;
        background: var(--ink); }
.tick { position: absolute; bottom: 22px; width: 1px; height: 8px;
        background: var(--ink); }
.tick.major { bottom: 16px; height: 14px; }
.tick-label { position: absolute; bottom: 0; transform: translateX(-50%);
              font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.tick-label.first { transform: none; }

.pin { position: absolute; bottom: 30px; width: 0; height: 0; }
.stem { position: absolute; left: -1px; bottom: 0; width: 2px; z-index: 1;
        height: calc(20px + var(--lane) * 56px); background: var(--c); }
.dot { position: absolute; left: -6px; bottom: -6px; width: 12px; height: 12px;
       z-index: 3; border-radius: 50%; background: var(--c);
       border: 2px solid var(--paper); }
.tag { position: absolute; left: -1px; z-index: 2; width: max-content;
       max-width: 160px; bottom: calc(20px + var(--lane) * 56px);
       padding: 5px 10px; background: var(--surface);
       border: 1px solid var(--line); border-radius: 8px;
       font-size: 13px; line-height: 1.25; }
.tag b { display: block; font: 500 15px/1.2 var(--display); overflow: hidden;
         text-overflow: ellipsis; white-space: nowrap; }
.tag span { color: var(--ink-soft); }
.pin.flip .tag { left: auto; right: -1px; text-align: right; }

@keyframes sweep { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .band { animation: none; } }

/* This week */
.week { list-style: none; margin: 0; padding: 0; }
.week li { display: grid; grid-template-columns: 64px 1fr auto; gap: 18px;
           align-items: center; margin-bottom: 10px; padding: 16px 20px 16px 18px;
           background: var(--surface); border-left: 5px solid var(--c);
           border-radius: 0 14px 14px 0; }
.day { display: flex; flex-direction: column; line-height: 1; }
.day span { font-size: 13px; color: var(--ink-soft); }
.day b { margin-top: 4px; font: 700 32px/1 var(--display); }
.name { font: 500 19px/1.2 var(--display); }
.meta { margin-top: 4px; color: var(--ink-soft); font-size: 14px; }
.amt { text-align: right; font: 500 20px/1.2 var(--display); }
.amt small { display: block; margin-top: 4px; font: 400 13px/1.2 var(--body);
             color: var(--ink-soft); }

/* Everything else */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { padding: 0 14px 10px 0; text-align: left; font-weight: 500;
     font-size: 14px; color: var(--ink-soft); }
td { padding: 14px 14px 14px 0; border-top: 1px solid var(--line); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

.scan { margin: 4px 0 0; }

/* Inbox progress and sender list */
.bar-track { height: 10px; max-width: 520px; background: var(--sonar-tint);
             border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--sonar); border-radius: 999px;
            transition: width .6s ease; }

            /* Review screen */
.notice.ok { background: var(--sonar-tint); border-left-color: var(--sonar); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.chip { min-height: 44px; padding: 0 18px; border-radius: 999px;
        border: 1px solid #8A99A5; background: transparent; color: var(--ink);
        font: 500 15px/1 var(--body); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip:focus-visible, .link-btn:focus-visible, .row input:focus-visible
  { outline: 3px solid var(--sonar); outline-offset: 2px; }

.review { overflow-x: auto; }
.review-inner { min-width: 900px; }
.cols { display: grid; gap: 12px; align-items: center;
        grid-template-columns: 44px minmax(0, 1.6fr) 100px 232px 70px 110px 84px; }
.head { padding: 0 14px 8px; color: var(--ink-soft); font-size: 14px; }
.row-wrap { margin-bottom: 6px; }
.row { min-height: 64px; padding: 8px 14px; background: var(--surface); border-radius: 12px; }
.row.rec { background: #E0F0EE; }
.check { display: flex; align-items: center; justify-content: center;
         width: 44px; height: 44px; cursor: pointer; }
.row input[type="checkbox"] { width: 22px; height: 22px; margin: 0; accent-color: var(--sonar); }
.who-col { min-width: 0; }
.sender-name { font: 500 18px/1.2 var(--display); }
.row.rec .sender-name { font-weight: 700; }
.sender-subj { color: var(--ink-soft); font-size: 14px; overflow: hidden;
               text-overflow: ellipsis; white-space: nowrap; }
.billed { color: var(--ink-soft); }
.row.rec .billed { color: #0A5F5E; font-weight: 600; }
.strip { display: flex; align-items: flex-end; gap: 3px; height: 22px; }
.slot { width: 6px; height: 5px; border-radius: 2px; background: #B7C6CB; }
.slot.on { height: 22px; background: #7A8A96; }
.row.rec .slot.on { background: var(--sonar); }
.count { text-align: right; font-variant-numeric: tabular-nums; }
.last { color: var(--ink-soft); font-size: 14px; }
.link-btn { min-height: 44px; background: transparent; border: 0; color: #0A5F5E;
            font: 500 14px/1 var(--body); text-decoration: underline; cursor: pointer; }

.preview { margin: 6px 0 10px 70px; max-width: 760px; padding: 16px 20px;
           background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.preview h3 { margin: 0 0 10px; font: 500 18px/1.2 var(--display); }
.preview dl { display: grid; grid-template-columns: 70px minmax(0, 1fr);
              gap: 6px 14px; margin: 0; font-size: 14px; }
.preview dt { color: var(--ink-soft); }
.preview dd { margin: 0; overflow-wrap: anywhere; }
.preview .fine { margin: 12px 0 0; color: var(--ink-soft); font-size: 13px; }

.savebar { position: sticky; bottom: 16px; margin-top: 24px; display: flex;
           justify-content: space-between; align-items: center; gap: 16px;
           flex-wrap: wrap; padding: 12px 12px 12px 24px; background: var(--ink);
           color: #fff; border-radius: 18px; }
.savebar .btn { background: #fff; color: var(--ink); }
.savebar .btn:hover { background: var(--sonar-tint); }
/* Manage subscriptions and buttons */
.btn.ghost { background: transparent; color: #fff; border: 1px solid #8FA1AE; }
.btn.ghost:hover { background: rgba(255, 255, 255, .12); }
.btn.danger { background: var(--coral); }
.btn.danger:hover { background: #B83A31; }
.btn.small { padding: 10px 16px; font-size: 14px; min-height: 44px; }
.btn.outline { background: transparent; color: var(--ink); border: 1px solid #8A99A5; }
.btn.outline:hover { background: var(--sonar-tint); color: var(--ink); }
.savebar-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.savebar .btn[disabled] { opacity: .6; cursor: default; }
.inline { display: inline; margin: 0; }
.manage { list-style: none; margin: 0; padding: 0; }
.manage li { margin-bottom: 10px; padding: 16px 20px; background: var(--surface); border-radius: 14px; }
.manage li.off { background: transparent; border: 1px dashed #8A99A5; }
.manage .line { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.manage .name { font: 500 19px/1.2 var(--display); }
.manage .facts, .manage .status { color: var(--ink-soft); font-size: 14px; }
.manage .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.manage summary { min-height: 44px; display: inline-flex; align-items: center;
                  color: #0A5F5E; font-weight: 500; cursor: pointer; }
.manage form.edit { display: grid; gap: 12px; align-items: end; margin: 6px 0 4px;
                    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.manage label { display: grid; gap: 4px; font-size: 14px; color: var(--ink-soft); }
.manage input, .manage select { min-height: 44px; padding: 0 12px; background: #fff;
                                color: var(--ink); border: 1px solid #8A99A5;
                                border-radius: 10px; font: 400 16px var(--body); }
.top { align-items: center; }
.mark { color: var(--ink); text-decoration: none; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
         border-radius: 999px; color: var(--ink); text-decoration: none;
         font: 500 15px/1 var(--body); }
.nav a:hover { background: var(--sonar-tint); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.alert-switch { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 0 0 28px; }