@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600&family=Hanken+Grotesk:wght@400;500;600;700&display=swap');

/* The hidden attribute always wins. Lint checks this line exists. */
[hidden] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }

/* The website's look (21 Sep 2026): plum, sage, soft coral, warm off-white.
   Every colour in the app comes from this block. */
:root {
  --plum: #4a2f4f;
  --plum-2: #6b4a70;
  --plum-soft: #efe6ef;
  --sage: #6f8f6b;
  --sage-deep: #4f6d4c;
  --sage-soft: #e7eee4;
  --coral: #d9826b;
  --coral-soft: #f8e3dc;
  --coral-text: #a24f3a;
  --part-bg: #fdf0da;
  --part-text: #8a5f0e;
  --paper: #fbf8f4;
  --paper-2: #f4eee7;
  --card: #ffffff;
  --ink: #2a2230;
  --body: #4c4452;
  /* The design's #7c7280 reads at 4.33:1 on paper and under 4 on the soft
     tints, below the 4.5:1 floor. This is the same grey, darkened just enough
     to pass on every background the app uses (lowest 4.52, on coral-soft). */
  --muted: #6e6572;
  --line: #e7dfd6;
  --line-2: #f0ebe4;
  --shadow: 0 1px 2px rgba(42,34,48,.05), 0 8px 28px rgba(42,34,48,.07);
  --radius: 18px;
  --radius-sm: 12px;
  --nav-h: 64px;
  --side-w: 248px;
  --head-font: 'Fraunces', Georgia, serif;
  --body-font: 'Hanken Grotesk', system-ui, sans-serif;
}

html, body { margin: 0; background: var(--paper); color: var(--body); font-family: var(--body-font); font-size: 16px; -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; }
a { color: var(--plum); }
a:hover { color: var(--plum-2); }
h1, h2, h3 { font-family: var(--head-font); font-weight: 600; color: var(--ink); letter-spacing: -0.01em; margin: 0; }
h1 { font-size: 28px; line-height: 1.15; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
p { line-height: 1.5; margin: 0; }
strong, b { color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--plum); outline-offset: 2px; }

/* ── Layout (phone first) ───────────────────────────────────────────────── */
.app { max-width: 720px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.app > .body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--plum); color: #fff;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
  display: flex; align-items: center; gap: 12px;
}
.topbar h1, .topbar h2, .topbar strong, .topbar b { color: #fff; }
.brand { font-family: var(--head-font); font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.brand b { color: #f3d9cf; font-weight: 600; }
.topbar .spacer { flex: 1; }
.topbar .case-chip { font-size: 12px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45vw; }
.icon-btn { background: none; border: 0; color: inherit; padding: 6px; border-radius: 10px; cursor: pointer; line-height: 0; min-width: 36px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; }
.topbar .icon-btn:focus-visible { outline-color: #fff; }
.main { flex: 1; padding: 20px 16px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.main.bare { padding-bottom: 32px; }

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: #fff; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottomnav .inner { max-width: 720px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); height: var(--nav-h); }
.bottomnav a { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; }
.bottomnav a[aria-current="page"] { color: var(--plum); }
.bottomnav a[aria-current="page"] svg { color: var(--plum); }
.bottomnav svg { width: 22px; height: 22px; }

/* Desktop parts are drawn only on a wide screen (app.js); these keep them
   out of the way if a window is narrowed before the redraw. */
.side, .deskhead { display: none; }

/* ── Type helpers ───────────────────────────────────────────────────────── */
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sage-deep); }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.lead { font-size: 17px; color: var(--body); }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.tight { gap: 6px; }
.grow { flex: 1; min-width: 0; }
.mono { font-variant-numeric: tabular-nums; }

/* ── Cards and lists ────────────────────────────────────────────────────── */
.card { background: var(--card); border: 0; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card.soft { background: var(--paper-2); box-shadow: none; }
.card.accent { border-left: 4px solid var(--plum); }
.card.today { background: var(--sage-soft); box-shadow: none; border-left: 0; }
.card.today .eyebrow { color: var(--sage-deep); }
.card h2 + p, .card h3 + p { margin-top: 4px; }
.list { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.list > .item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line-2); text-decoration: none; color: var(--body); background: none; width: 100%; text-align: left; border-left: 0; border-right: 0; border-bottom: 0; cursor: pointer; min-height: 52px; }
.list > .item:first-child { border-top: 0; }
.list > a.item:hover, .list > button.item:hover { background: var(--paper); }
.list > .item .title { font-weight: 600; color: var(--ink); }
.list > .item .sub { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.list > .item svg { color: var(--muted); }
.list > .empty { padding: 18px 16px; color: var(--muted); font-size: 14px; }
.card .list { box-shadow: none; border: 1px solid var(--line-2); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--card); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 4px; min-height: 92px; box-shadow: var(--shadow); }
.tile .k { font-size: 13px; color: var(--muted); font-weight: 600; }
.tile .v { font-family: var(--head-font); font-size: 24px; font-weight: 600; color: var(--ink); font-variant-numeric: normal; }
.tile.warn .v { color: var(--coral-text); }
.tile.locked { opacity: .55; }

/* ── Pills and chips ────────────────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--paper-2); color: var(--body); white-space: nowrap; }
.pill.green { background: var(--sage-soft); color: var(--sage-deep); }
.pill.red { background: var(--coral-soft); color: var(--coral-text); }
.pill.amber { background: var(--part-bg); color: var(--part-text); }
.pill.plum, .pill.orange { background: var(--plum-soft); color: var(--plum); }
.pill.ink { background: var(--plum); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.chip { display: inline-block; background: var(--plum-soft); color: var(--plum); border-radius: 999px; padding: 2px 10px; font-size: 12.5px; font-weight: 600; }
.quote { border-left: 3px solid var(--coral); padding: 2px 0 2px 12px; color: var(--ink); font-weight: 600; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
label.field .hint { font-weight: 400; color: var(--muted); font-size: 13px; }
input[type=text], input[type=email], input[type=number], input[type=date], input[type=datetime-local], input[type=time], input[inputmode], select, textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 16px; font-weight: 400; color: var(--ink);
}
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--plum); outline-offset: 0; border-color: transparent; }
/* Run 03, item 4: typed money and dates. */
input.money { font-variant-numeric: tabular-nums; }
.date-field { display: flex; align-items: center; gap: 6px; position: relative; }
.date-field input[type=text] { flex: 1; }
.date-field .icon-btn { border: 1px solid var(--line); border-radius: 12px; padding: 11px; background: #fff; color: var(--plum); }
.datetime-field { display: grid; grid-template-columns: 1fr 120px; gap: 8px; align-items: center; }
@media (max-width: 380px) { .datetime-field { grid-template-columns: 1fr; } }
.picker-shadow { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
/* Run 03, item 1: the "To confirm" count. Ink on coral: white on coral is 2.85:1. */
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--coral); color: var(--ink); font-size: 13px; font-weight: 700; font-family: var(--body-font, inherit); }
.nav-badge { position: absolute; top: 4px; margin-left: 14px; min-width: 18px; height: 18px; font-size: 11px; padding: 0 5px; }
.proposal .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.code-input { font-size: 28px !important; letter-spacing: 10px; text-align: center; font-variant-numeric: tabular-nums; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.45; padding: 12px 0; border-top: 1px solid var(--line); }
.check:first-child { border-top: 0; }
.check input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--plum); flex-shrink: 0; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--paper-2); border-radius: 999px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: none; padding: 9px 6px; border-radius: 999px; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--muted); min-height: 40px; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--plum); box-shadow: 0 1px 2px rgba(42,34,48,.12); }
.form-error { background: var(--coral-soft); color: var(--coral-text); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.form-ok { background: var(--sage-soft); color: var(--sage-deep); border-radius: 12px; padding: 10px 12px; font-size: 14px; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 600; font-size: 16px; cursor: pointer; text-decoration: none; background: var(--plum); color: #fff; min-height: 48px; transition: background .15s ease; }
.btn:hover { background: var(--plum-2); color: #fff; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.orange { background: var(--plum); }
.btn.orange:hover { background: var(--plum-2); }
.btn.ghost { background: #fff; color: var(--plum); border: 1.5px solid #d8cdd9; }
.btn.ghost:hover { background: var(--plum-soft); color: var(--plum); }
.btn.danger { background: var(--coral-text); }
.btn.danger:hover { background: #8c4231; }
.btn.small { padding: 8px 16px; min-height: 44px; font-size: 14.5px; }
.btn.block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--plum); text-decoration: underline; cursor: pointer; font-weight: 600; }
.linkbtn:hover { color: var(--plum-2); }

/* ── Plans ──────────────────────────────────────────────────────────────── */
.plans { display: grid; gap: 10px; }
.plan { text-align: left; background: #fff; border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.plan[aria-pressed="true"] { border-color: var(--plum); background: var(--plum-soft); }
.plan .price { font-family: var(--head-font); font-weight: 600; font-size: 20px; color: var(--ink); }
.plan .price small { font-family: var(--body-font); font-weight: 500; font-size: 13px; color: var(--muted); }

/* ── Sheet (modal): from the bottom on a phone, a centred dialog wider up ── */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(42,34,48,.45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--paper); width: 100%; max-width: 720px; max-height: 92dvh; overflow: auto; border-radius: 20px 20px 0 0; padding: 18px 16px calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); align-self: center; }
@media (min-width: 760px) { .sheet-backdrop { align-items: center; padding: 24px; } .sheet { border-radius: 20px; max-width: 600px; padding: 22px 24px 26px; box-shadow: 0 24px 60px rgba(42,34,48,.25); } .sheet .grab { display: none; } }

/* ── Toast ──────────────────────────────────────────────────────────────── */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 60; max-width: calc(100vw - 32px); box-shadow: 0 6px 20px rgba(42,34,48,.25); }

/* ── Legal pages ────────────────────────────────────────────────────────── */
.legal { max-width: 720px; margin: 0 auto; padding: 24px 18px 60px; line-height: 1.6; }
.legal h1 { margin: 16px 0 6px; }
.legal h2 { margin: 28px 0 8px; }
.legal p, .legal li { margin: 8px 0; }
.legal table { border-collapse: collapse; width: 100%; font-size: 14px; }
.legal th, .legal td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.legal .table-wrap { overflow-x: auto; }
.confirm { background: var(--part-bg); color: var(--part-text); padding: 1px 4px; border-radius: 4px; font-weight: 600; }

/* ── Hero (signed out) ──────────────────────────────────────────────────── */
.hero { background: var(--plum); color: #fff; padding: calc(env(safe-area-inset-top, 0px) + 28px) 20px 28px; }
.hero .inner { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.hero h1, .hero h2, .hero b, .hero strong { color: #fff; }
.hero h1 { font-size: 32px; }
.hero p { color: #eadfe9; }
.hero a { color: #fff; }
.hero .btn { background: #fff; color: var(--plum); }
.hero .btn:hover { background: var(--plum-soft); color: var(--plum); }
.hero .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; font-size: 13px; color: var(--muted); padding: 8px 0 0; }
.footer-links a { color: var(--muted); }

.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.spinner.dark { border-color: rgba(74,47,79,.2); border-top-color: var(--plum); }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; justify-content: center; padding: 60px 0; }

/* ── Calendar: the website's day grid ───────────────────────────────────── */
.cal-wrap { overflow-x: auto; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(40px, 1fr)); gap: 5px; }
.cal-head { font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; padding: 2px 0; }
.cal-cell { position: relative; border: 0; border-radius: 10px; background: var(--paper-2); color: var(--ink); min-height: 46px; padding: 6px; text-align: left; cursor: pointer; font-weight: 600; font-size: 13px; }
.cal.week .cal-cell { min-height: 72px; }
.cal-cell.mine { background: var(--sage-soft); }
.cal-cell.theirs { background: var(--coral-soft); }
.cal-cell.swap { outline: 2px dashed var(--sage); outline-offset: -2px; }
.cal-cell.out { opacity: .45; }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--plum); font-weight: 700; }
.cal-cell .has { position: absolute; right: 6px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--sage-deep); }
.cal-cell .ents { display: none; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--paper-2); }
.dot.mine, .dot.a { background: var(--sage-soft); box-shadow: inset 0 0 0 1px var(--sage); }
.dot.theirs, .dot.b { background: var(--coral-soft); box-shadow: inset 0 0 0 1px var(--coral); }
.dot.swap { background: var(--sage-soft); outline: 2px dashed var(--sage); outline-offset: -2px; }
details summary { cursor: pointer; font-weight: 600; color: var(--ink); }

/* ── The Record ─────────────────────────────────────────────────────────── */
.qa { display: flex; flex-direction: column; gap: 6px; }
.qa .q, .qa .a { max-width: 88%; padding: 10px 14px; border-radius: 16px; line-height: 1.45; font-size: 15px; }
.qa .q { align-self: flex-end; background: var(--plum); color: #fff; border-bottom-right-radius: 4px; }
.qa .a { align-self: flex-start; background: #fff; box-shadow: var(--shadow); border-bottom-left-radius: 4px; color: var(--ink); }
.qa .a.advice { border-left: 4px solid var(--part-text); }
.qa .a.failed { background: var(--coral-soft); box-shadow: none; }
.qa .meta { font-size: 11.5px; opacity: .8; margin-top: 4px; }
.answer { margin: 0; }
.cite { display: inline-block; font-size: 12px; font-weight: 600; background: var(--plum-soft); color: var(--plum); border: 0; border-radius: 6px; padding: 1px 6px; margin: 0 2px; text-decoration: none; cursor: pointer; font-family: inherit; }
.composer { display: flex; gap: 8px; align-items: flex-end; position: sticky; bottom: calc(var(--nav-h) + 8px + env(safe-area-inset-bottom, 0px)); background: var(--paper); padding-top: 8px; }
.composer textarea { min-height: 48px; max-height: 160px; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ── Thread: the website's bubbles ──────────────────────────────────────── */
.thread { display: flex; flex-direction: column; gap: 6px; min-height: 30vh; flex: 1; }
.msg { display: flex; }
.msg.mine { justify-content: flex-end; }
.msg .bubble { max-width: 82%; padding: 10px 13px 7px; border-radius: 14px; line-height: 1.45; font-size: 15px; }
.msg.mine .bubble { background: var(--plum); color: #fff; border-bottom-right-radius: 4px; }
.msg.theirs .bubble { background: var(--paper-2); color: var(--ink); border-bottom-left-radius: 4px; }
.msg .text { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .meta { display: flex; gap: 6px; justify-content: flex-end; align-items: center; font-size: 11.5px; opacity: .85; margin-top: 3px; }
.ticks { font-weight: 700; letter-spacing: -2px; }
.ticks.read { color: #cfe3cb; }
.msg.theirs .ticks.read { color: var(--sage-deep); }
.thumb { display: inline-flex; align-items: center; gap: 4px; border: 0; border-radius: 8px; background: rgba(255,255,255,.2); color: inherit; padding: 6px 10px; margin-bottom: 4px; cursor: pointer; font: inherit; font-size: 13px; }
.msg.theirs .thumb { background: #fff; }
.composer.chat { align-items: center; }
.icon-btn.dark { color: var(--plum); }
.staged { background: var(--paper-2); border-radius: 12px; padding: 8px 12px; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.lightbox-img { width: 100%; height: auto; border-radius: 8px; }
.req-row .pill.green { background: var(--sage-deep); color: #fff; }

/* ── Panels used on the desktop screens ─────────────────────────────────── */
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.panel-head h2 { font-size: 19px; }
.panel-head a, .panel-head .linkbtn { margin-left: auto; font-size: 14px; font-weight: 600; }
.lines { display: flex; flex-direction: column; }
.lines .li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 14.5px; color: var(--ink); }
.lines .li:first-child { border-top: 0; }
.lines .li > span:first-child { min-width: 0; }
.lines .li > span:last-child { color: var(--muted); text-align: right; min-width: 0; }
.months { width: 100%; border-collapse: collapse; font-size: 14px; }
.months td { padding: 9px 8px 9px 0; border-bottom: 1px solid var(--line-2); color: var(--ink); vertical-align: middle; }
.months tr:last-child td { border-bottom: 0; }
.months td.r { text-align: right; padding-right: 0; }
.months td.m { color: var(--muted); }
.months tr.pay { cursor: pointer; }
.months tr.pay:hover td { background: var(--paper); }
.seal { width: 44px; height: 44px; border-radius: 50%; background: var(--sage-soft); color: var(--sage-deep); display: grid; place-items: center; flex-shrink: 0; }
.today-band { display: flex; align-items: center; gap: 16px; }
.today-band .when { margin-left: auto; text-align: right; }
.today-band .when b { font-family: var(--head-font); font-size: 18px; font-weight: 600; }
.legend { display: flex; gap: 8px 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ── Desktop: a left sidebar from 1024 pixels ───────────────────────────── */
@media (min-width: 1024px) {
  .app.desk { max-width: none; margin: 0; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); align-items: start; }
  .app.desk .topbar, .app.desk .bottomnav { display: none; }
  .app.desk .side {
    display: flex; flex-direction: column; gap: 2px;
    position: sticky; top: 0; height: 100dvh; overflow-y: auto;
    background: #fff; border-right: 1px solid var(--line); padding: 22px 16px 16px;
  }
  .side .brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 19px; padding: 0 8px 18px; text-decoration: none; }
  .side .logo { width: 34px; height: 34px; border-radius: 10px; background: var(--plum); display: grid; place-items: center; flex-shrink: 0; }
  .side .case-box { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin: 0 0 14px; }
  .side .case-box .eyebrow { color: var(--muted); font-size: 11px; }
  .side .case-box b { display: block; font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }
  .side .case-box .small { color: var(--muted); font-size: 12.5px; }
  .side .nav { display: flex; align-items: center; gap: 12px; padding: 9px 12px; min-height: 44px; border-radius: 12px; color: var(--body); text-decoration: none; font-weight: 500; font-size: 15px; }
  .side .nav:hover { background: var(--paper-2); color: var(--ink); }
  .side .nav[aria-current="page"] { background: var(--plum-soft); color: var(--plum); font-weight: 600; }
  .side .nav svg { flex-shrink: 0; }
  .side .nav .badge { margin-left: auto; min-width: 22px; height: 20px; font-size: 11.5px; }
  .side .navh { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 16px 12px 6px; font-weight: 700; margin: 0; font-family: var(--body-font); }
  .side .who { margin-top: auto; padding: 14px 12px 4px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); display: flex; gap: 10px; align-items: center; }
  .side .who b { display: block; color: var(--ink); font-size: 14px; }
  .side .av { width: 32px; height: 32px; border-radius: 50%; background: var(--sage-soft); color: var(--sage-deep); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }

  .app.desk .deskhead { display: flex; align-items: flex-end; gap: 16px; padding: 28px 36px 0; max-width: 1180px; width: 100%; }
  .deskhead .titles { min-width: 0; }
  .deskhead h1 { font-size: 34px; margin-top: 4px; }
  .deskhead .back { margin-bottom: 6px; color: var(--plum); border: 1.5px solid #d8cdd9; background: #fff; border-radius: 999px; min-width: 44px; min-height: 44px; }
  .deskhead .tools { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: 0 1 560px; justify-content: flex-end; }
  .deskhead .tools .btn { width: auto; flex-shrink: 0; }
  .ask-box { flex: 1; display: flex; align-items: center; gap: 10px; background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 0 8px 0 16px; min-height: 46px; max-width: 420px; color: var(--muted); }
  .ask-box:focus-within { border-color: var(--plum); }
  .ask-box input { border: 0; outline: 0; padding: 10px 0; font-size: 14.5px; flex: 1; background: transparent; min-width: 0; }
  .ask-box input:focus { outline: 0; }

  .app.desk .main { padding: 22px 36px 48px; max-width: 1180px; width: 100%; gap: 20px; }
  .app.desk .main .page-head, .app.desk .main .phone-only { display: none; }
  .app.desk .toast { bottom: 24px; left: calc(50% + var(--side-w) / 2); }
  .app.desk .composer { bottom: 0; padding-bottom: 12px; }
  .app.desk .desk-col .thread { min-height: 0; flex: 0 0 auto; }

  .desk-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .desk-tiles .tile { padding: 18px 20px; }
  .desk-tiles .tile .v { font-size: 28px; }
  .desk-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .desk-grid.side-320 { grid-template-columns: minmax(0, 1fr) 320px; }
  .desk-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
  .card.today { padding: 18px 22px; }
  .card.today h2 { font-size: 22px; }

  /* The full month on the Log calendar, with each day's entries written in. */
  .cal.month.full { gap: 8px; }
  .cal.month.full .cal-head { text-align: left; padding: 0 4px 4px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
  .cal.month.full .cal-cell { min-height: 104px; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
  .cal.month.full .cal-cell .has { display: none; }
  .cal.month.full .cal-cell .ents { display: flex; flex-direction: column; gap: 3px; font-weight: 500; font-size: 12px; line-height: 1.3; color: var(--ink); }
  .cal.month.full .cal-cell .ents span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .cal.month.full .cal-cell .ents .more { color: var(--muted); }
  .cal-wrap.full { overflow: visible; }
}
