/* 1code Mail. The family's palette (rroom/docs/BRAND-1code.md §3, the same values as Docs and the Office Home), day
   and night, under Mail's own names: monochrome, emphasis by inversion (--invert-*), never colour, no gradient.
   Light is Mail's default; [data-theme="dark"] is the night. */
:root {
  /* the brand's tokens */
  --bg: #ffffff;
  --surface: #f6f6f7;
  --raise: #ececee;
  --raise-2: #e4e4e7;
  --ink: #0a0a0b;
  --brand-muted: #6b6f76;
  --faint: #a1a5ac;
  --line: rgba(0, 0, 0, 0.07);
  /* Mail's names for them */
  --sidebar: var(--bg);
  --panel: var(--bg);
  --raised: #ffffff;
  --text: var(--ink);
  --strong: var(--ink);
  --muted: var(--brand-muted);
  --dim: var(--brand-muted);
  --accent: var(--faint);
  --line-hover: rgba(0, 0, 0, 0.14);
  --hover: rgba(0, 0, 0, 0.05);
  --selected: var(--raise);
  --invert-bg: #0a0a0b;
  --invert-fg: #ffffff;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.16), 0 1px 3px rgba(0, 0, 0, 0.1);
  --radius: 14px;
  --wordmark: 700 21px/1 Inter, system-ui, sans-serif;
  /* the page, and what sits on it (cards, fields, read rows) */
  --page: var(--bg);
  --row-read: var(--surface);
  --card: var(--surface);
  --field: var(--raise);
  /* the app bar (as Docs') */
  --bar: var(--bg);
  --bar-muted: var(--brand-muted);
  --bar-line: var(--line);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #08090a;
  --surface: #101113;
  --raise: #17181b;
  --raise-2: #1e2024;
  --ink: #f7f8f8;
  --brand-muted: #8a8f98;
  --faint: #5d6168;
  --line: rgba(255, 255, 255, 0.07);
  --raised: #101113;
  --line-hover: rgba(255, 255, 255, 0.14);
  --hover: rgba(255, 255, 255, 0.06);
  --invert-bg: #f7f8f8;
  --invert-fg: #08090a;
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; }
body {
  background: var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 400 14px/1.5 Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--strong); }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }


/* Buttons are filled shapes, never outlined (rroom/docs/BRAND-1code.md §5); the main action is inverted. */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: var(--field); border-radius: 999px;
  padding: 8px 15px; font-size: 13px; font-weight: 500; white-space: nowrap; text-decoration: none; color: var(--text);
}
.btn:not(.primary):not(:disabled):hover { background: var(--raise-2); }
.btn.primary { background: var(--invert-bg); color: var(--invert-fg); font-weight: 600; }
.btn.primary:hover { opacity: 0.88; }
.btn:disabled { opacity: 0.5; cursor: default; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: transparent; color: var(--text);
}
.icon-btn:hover { background: var(--hover); }
.split { display: inline-flex; }
.split .btn.primary:first-child { border-radius: 999px 0 0 999px; padding-right: 12px; }
.split .btn.primary.caret { border-radius: 0 999px 999px 0; padding: 7px 9px; border-left: 1px solid rgba(127, 127, 127, 0.45); }

/* ---------- signed out / empty ---------- */
.center { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
/* The first moment, before the app has drawn anything: three quiet dots in the middle, no words. They fade in after
   a beat, so a fast load never flashes them. */
.boot { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; gap: 7px;
  animation: boot-in 0.2s ease 0.15s both; }
.boot span { width: 7px; height: 7px; border-radius: 50%; background: var(--text); opacity: 0.18; animation: dot 1.1s ease-in-out infinite; }
.boot span:nth-child(2) { animation-delay: 0.16s; }
.boot span:nth-child(3) { animation-delay: 0.32s; }
@keyframes dot { 0%, 70%, 100% { opacity: 0.18; } 35% { opacity: 0.75; } }
@keyframes boot-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .boot span { animation-duration: 2.4s; } }
.card {
  background: var(--card); border: 0; border-radius: var(--radius);
  padding: 40px 32px; width: 100%; max-width: 380px; text-align: center;
}
/* The lockup (same sizes as the 1code ID card and the 1code.email bar). The logo PNG has empty space round it: the
   divider and "Mail" lift 2px onto the letters' baseline, and the divider takes back 10px so it sits evenly. */
.lockup { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 22px; font-size: 15px; font-weight: 400; line-height: 1.55; color: #6b6f76; text-decoration: none; }
:root[data-theme="dark"] .lockup { color: #8a8f98; }
.ident { display: flex; align-items: center; gap: 24px; flex: none; color: var(--text); text-decoration: none; }
.ident img { width: 32px; height: 32px; display: block; }
.ident span { font-weight: 600; font-size: 13px; line-height: normal; white-space: nowrap; } /* normal, as Docs: the text sits at y 24 */
.lockup img { height: 36px; width: auto; }
.lockup .sep { width: 1px; height: 16px; margin-left: -10px; background: #a1a5ac; transform: translateY(-2px); }
:root[data-theme="dark"] .lockup .sep { background: #5d6168; }
.lockup span { transform: translateY(-2px); }
.lockup .logo-white { display: none; }
:root[data-theme="dark"] .lockup .logo-white { display: block; }
:root[data-theme="dark"] .lockup .logo-black { display: none; }
/* Terms · Privacy sit at the card's bottom edge, well clear of the button. */
.card.with-legal { display: flex; flex-direction: column; min-height: 280px; padding-bottom: 18px; }
.card.with-legal .legal-links { margin-top: auto; padding-top: 40px; }
.card .btn.primary { padding: 12px 22px; font-size: 14px; width: 100%; justify-content: center; }
.card p { color: var(--muted); margin: 0 0 20px; }
.card .note { margin: 16px 0 0; font-size: 13px; }
.card code { font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--dim); word-break: break-all; user-select: all; }

/* ---------- shell: top bar, sidebar, one main panel ---------- */
.shell { height: 100%; display: grid; grid-template-rows: 64px 1fr; grid-template-columns: minmax(0, 1fr); } /* never wider than the window */
/* The sidebar's width: 248 unless dragged (app.js sets --side-w on the page), 220–520 and never past 60% of the window. */
.shell { --side-col: clamp(220px, var(--side-w, 248px), min(520px, 60vw)); }
/* The bar's left end is the same pixels in every 1code app (rroom/docs/STANDARD-1code-header-and-theme.md §9, measured
   on Docs): padding 24, gap 16, so the family ☰ (app-menu.js makes and styles it; nothing here overrides it) is at
   x 16–52, Mail's icon at 62–94 and "Mail" from 118. Nothing spreads the items apart, at any width. */
.top { display: flex; align-items: center; gap: 16px; padding: 0 24px; background: var(--bar); box-shadow: inset 0 -1px 0 var(--bar-line); color: var(--ink); }
.top .ident { color: inherit; }
.top .tools { display: flex; align-items: center; gap: 16px; margin-left: auto; }
/* As Docs' right end: bare 34px round icons in the muted grey, 16 apart, then the family's bell and Account (app-menu.js). */
.top .tools .icon-btn { width: 34px; height: 34px; color: var(--bar-muted); }
.top .tools .icon-btn:hover { color: var(--ink); }
/* The bell and the person's circle on the family's --raise, as Docs' bar has them (stronger than the script's own rule). */
.top .tools .oca-acc .b { --oca-raise: var(--raise); }
/* 62 + 170 + the 16px gap = 248, the sidebar's width: the search starts where the list does, whatever the name's length.
   (It stays put when the sidebar is dragged wider: following it would push the bar's right end off a narrow window.) */
.top .ident { min-width: 170px; }
/* The way back (BRAND-1code.md; app-menu.js cameFrom), as Docs' "← Library": a quiet pill after the name. With it
   there the name drops its reserved width, so the search moves along by the difference. */
.top .came-back { flex: none; color: var(--muted); font-size: 13px; line-height: normal; padding: 6px 12px; border-radius: 999px; text-decoration: none; white-space: nowrap; }
.top .came-back:hover { color: var(--ink); background: var(--raise); }
.top .ident:has(+ .came-back) { min-width: 0; }
.fab-compose { display: none; border: 0; }
.search-wrap { position: relative; flex: 1; max-width: 720px; margin: 0 24px 0 0; }
.search {
  display: flex; align-items: center; gap: 4px;
  background: var(--raise); border-radius: 999px; padding: 0 6px; height: 46px; color: var(--dim);
}
.search .icon-btn { color: var(--dim); }
.adv {
  position: absolute; top: 52px; left: 0; right: 0; z-index: 25; background: var(--raised); border-radius: 12px;
  box-shadow: var(--shadow); padding: 18px 22px; display: flex; flex-direction: column; gap: 6px;
}
.adv-row { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 12px; min-height: 40px; }
.adv-row > span { color: var(--text); font-size: 14px; }
.adv-row input[type="text"] { border: 0; border-bottom: 1px solid var(--line-hover); border-radius: 0; padding: 8px 0; background-color: transparent; }
.adv-row input[type="text"]:focus { border-bottom-color: var(--strong); }
.adv-size { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: center; }
.adv-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--text); }
.adv-actions { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 4px 6px; }
.adv-actions .check { color: var(--text); font-size: 14px; }
.adv-actions select { width: auto; min-width: 180px; padding: 5px 30px 5px 10px; }
.adv-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.adv-foot .grow { flex: 1; }
.search:focus-within { background: var(--raised); box-shadow: var(--shadow); }
.search input { border: 0; background: transparent; padding: 0; height: 100%; flex: 1; color: var(--text); font-size: 15px; }
.search input:focus { border: 0; outline: none; }
.search input::-webkit-search-cancel-button { filter: grayscale(1); }
.panes { position: relative; display: grid; grid-template-columns: var(--side-col) minmax(0, 1fr); min-height: 0; }
/* The sidebar's edge, to drag wider or narrower (owner, 31 Oct): nothing to see until it's hovered, then a hairline on
   the edge. It sits mostly over the list's side so the sidebar's own scrollbar stays free. */
.side-resize {
  position: absolute; top: 0; bottom: 0; left: calc(var(--side-col) - 3px); width: 9px; z-index: 5;
  cursor: col-resize; touch-action: none; user-select: none; -webkit-user-select: none; outline: none;
}
.side-resize::after { content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; background: transparent; transition: background .15s; }
.side-resize:hover::after, .side-resizing .side-resize::after { background: var(--line-hover); }
.side-resize:focus-visible::after { background: var(--strong); } /* the app's focus colour for controls (.row, .att-open) */
/* While dragging: the col-resize cursor everywhere, no text selected, and a message's frame can't swallow the pointer. */
.side-resizing, .side-resizing * { cursor: col-resize !important; user-select: none !important; -webkit-user-select: none !important; }
.side-resizing iframe { pointer-events: none; }

.side { padding: 4px 10px 14px; overflow-y: auto; display: flex; flex-direction: column; background: var(--sidebar); }
.compose-btn { margin: 4px 4px 16px; padding: 14px 20px; font-size: 14px; border-radius: 16px; justify-content: flex-start; gap: 10px; align-self: flex-start; }
/* The mailbox dropdown (owner, 27 Oct): the one you're in, ▾; open, one main address per domain with its others tucked
   behind it. Bold only with unread mail, as the rows below it. */
.side .current-box .chev { display: grid; place-items: center; margin-left: auto; height: 1.5em; } /* on the first line */
.side .current-box .chev svg.i, .side .box-more svg.i { width: 15px; height: 15px; transition: transform .15s; }
.side .current-box .chev.open svg.i { transform: rotate(180deg); }
.side .box-list { margin-bottom: 8px; }
.side .box-main { display: flex; align-items: flex-start; gap: 2px; }
.side .box-main .folder { flex: 1; min-width: 0; }
/* margin: centred on a one-line row (35px), and on the first line of a wrapped one */
.side .box-more { appearance: none; border: 0; background: none; color: var(--muted); height: 30px; min-width: 30px; margin-top: 2.5px; padding: 0 6px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.side .box-more:hover { background: var(--hover); color: var(--ink); }
.side .box-more svg.i { transform: rotate(-90deg); }
.side .box-more.open svg.i { transform: rotate(0deg); }
.side .box-more .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--strong); }
/* Mailbox rows (owner, 31 Oct): the whole address, no numbers. Unread mail makes the row bold; the mailbox you're in has
   a tick for its icon (no fill: the current item's emphasis is inversion, BRAND-1code.md §3, which Inbox below already
   has). A long address wraps before the "@" (app.js puts a break chance there), each half breaking inside only if it's
   wider than the sidebar on its own; the icon and the chevrons stay on the first line. */
.side .folder.has-unread { font-weight: 600; color: var(--strong); }
.side .box-row { align-items: flex-start; }
.side .box-row > svg.i { margin-top: calc((1.5em - 18px) / 2); }
.side .addr-local, .side .addr-domain { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
.side .addr-domain { color: var(--muted); }
.side .folder.tucked { padding-left: 34px; }
.box { margin-bottom: 12px; }
.box-name { padding: 6px 12px; color: var(--dim); font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: none; border: 0; padding: 7px 12px; border-radius: 999px;
  color: var(--text); text-align: left; font-size: 14px;
}
.folder:hover { background: var(--hover); }
.folder.on { background: var(--invert-bg); color: var(--invert-fg); font-weight: 600; }
.folder .label { flex: 1; min-width: 0; }
.folder .i { width: 18px; height: 18px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 6px 4px 12px; font-weight: 600; color: var(--strong); font-size: 14px; }
.side-head .icon-btn { width: 30px; height: 30px; }
/* Between domains in the mailbox list */
.side-divider { height: 1px; background: var(--line-hover); margin: 6px 12px; }
.count { font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 600; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.storage { margin-top: auto; padding: 14px 12px 4px; color: var(--dim); font-size: 12px; }
.meter { height: 4px; border-radius: 2px; background: var(--line); margin-bottom: 6px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--strong); border-radius: 2px; }

.main {
  background: var(--page); min-height: 0; min-width: 0; box-shadow: inset 1px 0 0 var(--line);
  display: flex; flex-direction: column; overflow: hidden;
}

/* ---------- toolbar ---------- */
.toolbar {
  display: flex; align-items: center; gap: 6px; padding: 8px 16px; min-height: 52px;
  border-bottom: 1px solid var(--line); flex: none;
}
.toolbar .title { font-weight: 600; color: var(--strong); margin-left: 6px; }
.toolbar .grow { flex: 1; }
.toolbar .meta-text { color: var(--dim); font-size: 12px; }

/* ---------- list (one line per message, Gmail style) ---------- */
.list { overflow-y: auto; flex: 1; }
.list-note { padding: 10px 20px; color: var(--dim); font-size: 13px; border-bottom: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 20px 28px 200px 1fr auto; gap: 10px; align-items: center; cursor: pointer;
  width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line);
  padding: 6px 20px 6px 10px; min-height: 42px; color: var(--text);
}
.row:focus-visible { outline: 2px solid var(--strong); outline-offset: -2px; }
.row.selected { background: var(--selected) !important; }
.row.cursor { box-shadow: inset 3px 0 0 var(--strong); }
.row-check, .select-all { width: 16px; height: 16px; margin: 0 2px; accent-color: var(--strong); cursor: pointer; }
.star-slot { width: 20px; }
.star { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 0; background: none; border-radius: 50%; color: var(--accent); padding: 0; }
.star:hover { background: var(--hover); color: var(--strong); }
.star.on { color: var(--strong); }
.chip {
  display: inline-flex; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; line-height: 1.6;
  border-radius: 6px; padding: 0 6px; margin-right: 6px; background: var(--field); color: var(--text); vertical-align: 1px;
}
.chip .x { font-size: 12px; padding: 0 0 0 2px; }
.row:hover { background: var(--field); }
.row-from, .row-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-line .subj { color: var(--text); }
.row-line .snip { color: var(--dim); }
.row-time { color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; }
.row.unread { background: var(--page); }
.row.unread .row-from, .row.unread .subj, .row.unread .row-time { color: var(--strong); font-weight: 700; }
.row:not(.unread) { background: var(--row-read); }
.tag { font-size: 11px; font-weight: 600; border: 0; background: var(--field); border-radius: 6px; padding: 1px 7px; margin-right: 6px; color: var(--text); }
.tag.inv { background: var(--invert-bg); color: var(--invert-fg); }
.clip { width: 14px; height: 14px; }
.empty { padding: 56px 20px; color: var(--dim); text-align: center; }
.more { margin: 16px auto; display: flex; }

/* ---------- message ---------- */
.message { overflow-y: auto; flex: 1; padding: 20px 28px 40px; }
.subject-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 4px 0 18px; }
.subject-line .grow { flex: 1; }
.message h1 { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; color: var(--strong); margin: 0; line-height: 1.3; overflow-wrap: anywhere; }
.subject-line .chip { font-size: 12px; }
.sender { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--invert-bg); color: var(--invert-fg); font-weight: 600; font-size: 15px; text-transform: uppercase;
}
.sender-main { flex: 1; min-width: 0; }
.sender-line { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.sender-name { font-weight: 600; color: var(--strong); }
.sender-addr, .sender-to, .sender-date { color: var(--dim); font-size: 13px; overflow-wrap: anywhere; }
.sender-date { margin-left: auto; white-space: nowrap; }
/* Reply, Reply all, Forward under each message's recipients. */
.inv-note { color: var(--dim); font-size: 13px; margin-top: 8px; }
/* The message's details (Gmail's "to me ▾"): who sent it, to whom, when, and who mailed and signed it. */
.det-btn { appearance: none; border: 0; background: none; color: var(--dim); padding: 0 2px; margin-left: 2px; cursor: pointer; border-radius: 6px; display: inline-flex; vertical-align: middle; }
.det-btn:hover, .det-btn[aria-expanded="true"] { background: var(--hover); color: var(--text); }
.det-btn svg.i { width: 16px; height: 16px; }
.menu.details { min-width: 0; max-width: min(460px, calc(100vw - 16px)); padding: 14px 18px; }
.msg-details { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 13px; }
.msg-details dt { color: var(--dim); text-align: right; }
.msg-details dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.msg-details dd .muted { color: var(--dim); }
.msg-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.msg-acts .btn.small { padding: 5px 11px; font-size: 12px; gap: 5px; }
.msg-acts .btn.small svg.i { width: 15px; height: 15px; }
.warn { margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; background: var(--invert-bg); color: var(--invert-fg); font-size: 13px; font-weight: 500; }
.atts { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0 52px; }
.att {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--field); border-radius: 10px;
  padding: 8px 13px; font-size: 12px; text-decoration: none; color: var(--text); max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.att:hover { background: var(--raise-2); }
.att span { color: var(--dim); }
.att .as-link { font-weight: 600; color: var(--text); }
/* The name opens the file; the arrow downloads it (owner, 28 Oct). */
.att:has(.att-open) { padding: 0 6px 0 0; gap: 0; }
.att-open {
  display: inline-flex; align-items: center; gap: 6px; min-width: 0; border: 0; background: none; color: var(--text);
  font: inherit; padding: 8px 6px 8px 13px; cursor: pointer; border-radius: 10px 0 0 10px;
}
.att-open .att-name { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-open:focus-visible, .att-dl:focus-visible { outline: 2px solid var(--strong); outline-offset: -2px; }
.att-dl { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; color: var(--dim); cursor: pointer; padding: 0; flex: none; }
.att-dl:hover { background: var(--hover); color: var(--text); }
.att-dl .i { width: 15px; height: 15px; }
.att .x { margin-left: 2px; }
/* A picture, in Mail's own viewer over the page. */
.pic-view { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.86); display: grid; grid-template-rows: auto 1fr; place-items: center; }
.pic-view img { max-width: calc(100vw - 48px); max-height: calc(100vh - 88px); object-fit: contain; border-radius: 6px; }
.pic-bar { justify-self: stretch; display: flex; align-items: center; gap: 4px; padding: 10px 12px 10px 20px; color: #f7f8f8; }
.pic-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.pic-bar .icon-btn { color: #f7f8f8; }
/* A meeting invitation (owner, 27 Oct): the card above the email, as Gmail has it, in Mail's own greys. */
.invite { margin: 0 0 14px 52px; padding: 14px 18px 16px; border-radius: 14px; background: var(--raise); color: var(--text); }
.invite .inv-when { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.invite .inv-when svg.i { width: 16px; height: 16px; flex: none; }
.invite .inv-tag { margin-left: 4px; padding: 2px 8px; border-radius: 999px; background: var(--raise-2); color: var(--muted); font-size: 11px; font-weight: 600; }
.invite .inv-title { margin: 6px 0 8px; font-size: 18px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.invite.cancelled .inv-title { text-decoration: line-through; color: var(--muted); }
.invite .inv-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.invite .inv-row svg.i { width: 15px; height: 15px; flex: none; }
.invite .inv-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.invite .inv-acts .btn { gap: 6px; padding: 7px 14px; font-size: 13px; text-decoration: none; }
/* The card is --raise, which is the buttons' own fill: give them the page's colour so they read as buttons (owner, 27 Oct). */
.invite .inv-acts .btn:not(.primary) { background: var(--bg); }
.invite .inv-acts .btn:not(.primary):hover { background: var(--raise-2); }
/* The answer given, filled like the main button, hovered or not. */
.invite .inv-acts .btn.on:not(.primary), .invite .inv-acts .btn.on:not(.primary):hover { background: var(--invert-bg); color: var(--invert-fg); }
.invite .inv-ask { align-self: center; margin-right: 2px; font-size: 13px; color: var(--muted); }
.invite .inv-acts svg.i { width: 15px; height: 15px; }
.body pre a { color: inherit; text-decoration: underline; }
.body { margin-left: 52px; }
/* Mail HTML renders on white in both themes, as senders design it. */
.body iframe { display: block; width: 100%; height: 160px; border: 0; border-radius: 10px; background: #fff; }
:root[data-theme="dark"] .body iframe { border: 1px solid var(--line); }
.body pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.6 Inter, system-ui, sans-serif; color: var(--text); }
.reply-bar { display: flex; gap: 8px; margin: 24px 0 0 52px; flex-wrap: wrap; }
/* A company address can't write outside 1code (owner, 28 Oct): one muted line where Reply would be. */
.outside-note { color: var(--muted); font-size: 13px; }
.reply-note { margin: 10px 0 0 52px; }
.compose-outside { padding: 8px 0; border-bottom: 1px solid var(--line); }
.compose-outside:empty { padding: 0; border: 0; } /* stays in the page as a live region, taking no room */
.reply-bar [hidden], .msg-acts [hidden], .toolbar [data-reply][hidden], .outside-note[hidden] { display: none; }

/* ---------- compose (floating window for new mail, inline for replies) ---------- */
.compose-window {
  position: fixed; right: 24px; bottom: 0; z-index: 20; width: min(580px, calc(100vw - 32px));
  max-height: calc(100vh - 80px); display: flex; flex-direction: column;
  background: var(--raised); border-radius: 12px 12px 0 0; box-shadow: var(--shadow); overflow: hidden;
}
.compose-window.minimized .compose-body { display: none; }
.compose-head {
  display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 16px;
  background: var(--invert-bg); color: var(--invert-fg); font-size: 14px; font-weight: 600; cursor: default;
}
.compose-head .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compose-head .icon-btn { width: 30px; height: 30px; color: var(--invert-fg); }
.compose-head .icon-btn:hover { background: rgba(127, 127, 127, 0.25); }
.compose-body { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.compose-fields { padding: 0 16px; }
.cf { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); min-height: 40px; }
.cf > span { color: var(--dim); font-size: 13px; min-width: 42px; }
.cf input[type="text"], .cf select { border: 0; background-color: transparent; padding: 8px 0; border-radius: 0; flex: 1; }
.cf select { padding-right: 30px; }
/* From, when the domain has only one address to send from */
.cf > span.cf-static { color: var(--text); font-size: 14px; min-width: 0; }
/* No box around a compose field while typing: the caret is enough (owner, 29 Oct: "that border line is not needed"). */
.cf input[type="text"]:focus, .cf select:focus { border: 0; outline: none; }
.cf .link { margin-left: auto; }
.compose-text {
  border: 0; resize: none; padding: 12px 16px; min-height: 260px; flex: 1; background: transparent;
  font: 14px/1.6 Inter, system-ui, sans-serif; color: var(--text); border-radius: 0;
  /* The box is a small rich editor (public/editor.js): long addresses wrap, and it scrolls in the window. Ordinary
     white space, so a new line is a <br> (pre-wrap has the browser type a bare line feed, which an email ignores). */
  overflow-wrap: anywhere; overflow-y: auto; cursor: text;
}
/* No box or ring round it while typing (owner, 29 Oct: no borders in compose fields): the caret is enough. */
.compose-text:focus, .compose-text:focus-visible { outline: none; box-shadow: none; }
.compose-text a { color: var(--strong); text-decoration: underline; text-underline-offset: 2px; }
/* The link box (Text and Link, or Link alone) and the bubble on a link: popovers in the house style. */
.link-box, .link-bubble { position: fixed; z-index: 40; background: var(--raised); border-radius: 10px; box-shadow: var(--shadow); }
.link-box { width: min(320px, calc(100vw - 16px)); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.lb-row { display: flex; align-items: center; gap: 10px; }
.lb-row > span { color: var(--dim); font-size: 13px; min-width: 34px; }
.lb-row input[type="text"] { padding: 8px 11px; }
.lb-note { color: var(--text); font-size: 12px; }
.lb-foot { display: flex; justify-content: flex-end; gap: 6px; }
.link-box .btn.small { padding: 6px 13px; }
.link-bubble { display: flex; align-items: center; gap: 12px; padding: 7px 12px; font-size: 13px; max-width: min(420px, calc(100vw - 16px)); }
.link-bubble .lb-url { color: var(--strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.compose-files { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 8px; }
.compose-foot { display: flex; align-items: center; gap: 6px; padding: 10px 12px 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.compose-foot .grow { flex: 1; }
.compose-foot .status { color: var(--dim); font-size: 12px; align-self: center; }
.compose-err { margin: 8px 16px 0; }
.inline-compose { margin: 24px 0 0 52px; border: 0; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; background: var(--raised); }
.inline-compose .compose-text { min-height: 200px; }
.x { background: none; border: 0; color: var(--dim); padding: 0 0 0 4px; font-size: 14px; line-height: 1; }
.x:hover { color: var(--strong); }
.menu {
  position: absolute; z-index: 30; min-width: 260px; background: var(--raised); border-radius: 10px;
  box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column;
}
.menu button, .menu .menu-item { background: none; border: 0; text-align: left; padding: 9px 12px; border-radius: 8px; display: flex; justify-content: space-between; gap: 16px; color: var(--text); }
.menu button:hover { background: var(--hover); }
/* The main action keeps its inverted fill under the pointer (it was going blank: the menu's own hover painted over it). */
.menu .btn.primary, .menu .btn.primary:hover { background: var(--invert-bg); color: var(--invert-fg); justify-content: center; }
.menu .btn.primary:disabled { opacity: .4; }
.menu .sub { color: var(--dim); font-size: 12px; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.menu-check { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 8px; cursor: pointer; }
.menu-check:hover { background: var(--hover); }
.menu-check input { accent-color: var(--strong); }
.menu .menu-item input[type="text"] { padding: 6px 10px; }
.menu { max-height: 70vh; overflow-y: auto; }
.menu-wrap { position: relative; display: inline-flex; }

/* ---------- forms ---------- */
input[type="text"], input[type="number"], input[type="datetime-local"], select, textarea {
  font: inherit; color: var(--text); background-color: var(--field);
  border: 0; border-radius: 10px; padding: 10px 13px; width: 100%; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--faint); outline-offset: 0; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%);
  background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.link { background: none; border: 0; color: var(--dim); font-size: 13px; padding: 0; }
.link:hover { color: var(--strong); }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.radio { display: flex; align-items: flex-start; gap: 8px; padding: 4px 0; color: var(--text); }
.radio input, .check input { accent-color: var(--strong); }

/* ---------- pages: settings, reputation ---------- */
.page { overflow-y: auto; min-height: 0; flex: 1; padding: 20px 28px 48px; }
.page > * { max-width: 920px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h1 { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; color: var(--strong); margin: 0; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tab { background: none; border: 0; padding: 10px 14px; color: var(--dim); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.on { color: var(--strong); border-bottom-color: var(--strong); }
/* Settings' sections scroll sideways when they don't fit; Feedback (a link out, not a section) stays in view at the end. */
.tabs .tab-list { display: flex; gap: 4px; min-width: 0; overflow-x: auto; }
.tabs .feedback { flex: none; margin-left: auto; text-decoration: none; }
.tabs .feedback:hover { color: var(--strong); }
.lede { color: var(--muted); margin: 0 0 18px; }
.muted { color: var(--dim); font-size: 13px; }
.panel { background: var(--card); border: 0; border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; }
.panel .panel { margin: 12px 0; }
.panel-title { color: var(--strong); font-weight: 600; font-size: 14px; margin-bottom: 12px; }
.panel p.muted { margin: 0 0 12px; }
.setting { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.setting:last-child { border-bottom: 0; }
.setting > .k { font-weight: 600; color: var(--strong); font-size: 13px; }
.setting > .k .muted { display: block; font-weight: 400; margin-top: 4px; }
.setting > .v { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sig-list { display: flex; flex-direction: column; gap: 4px; }
.sig-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 13px; border: 0; background: var(--card); border-radius: 10px; text-align: left; color: var(--text); }
.sig-item.on { background: var(--invert-bg); color: var(--invert-fg); } /* the current one, by inversion (BRAND §3) */
.sig-editor { display: grid; grid-template-columns: 1fr; gap: 8px; }
.sig-editor textarea { min-height: 120px; font-family: Inter, system-ui, sans-serif; }
.defaults { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center; }
.defaults > span { color: var(--dim); font-size: 13px; }
.row-form { display: flex; flex-wrap: wrap; gap: 10px; }
.row-form > input, .row-form > select { flex: 1 1 180px; width: auto; }
.row-form .num-input { flex: 0 0 90px; }
.reveal { border-color: var(--strong); }
.secret { display: block; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--strong); word-break: break-all; user-select: all; margin-bottom: 12px; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }
.meta dt { color: var(--dim); }
.meta dd { margin: 0; overflow-wrap: anywhere; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; }
.table th { text-align: left; color: var(--dim); font-weight: 500; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .right { text-align: right; }
.table tr.revoked td { color: var(--dim); }

/* ---------- reputation ---------- */
.status { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; color: var(--muted); font-size: 13px; }
.pill { border-radius: 999px; padding: 5px 13px; font-weight: 600; font-size: 12px; border: 0; background: var(--field); color: var(--text); flex: none; }
.status.paused .pill { background: var(--invert-bg); color: var(--invert-fg); border-color: var(--invert-bg); }
.status.paused { color: var(--text); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--card); border: 0; border-radius: var(--radius); padding: 14px 16px; }
.stat-label { color: var(--dim); font-size: 12px; }
.stat-value { color: var(--strong); font-size: 22px; font-weight: 600; letter-spacing: -0.03em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.stat-sub { color: var(--dim); font-size: 12px; }
.chart { position: relative; height: 140px; margin-top: 26px; display: grid; grid-template-columns: repeat(14, 1fr); gap: 2px; align-items: end; padding-bottom: 20px; }
.bar-slot { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; outline: none; }
.bar { width: 60%; max-width: 22px; background: var(--strong); border-radius: 4px 4px 0 0; }
.bar-slot:hover .bar, .bar-slot:focus .bar { opacity: 0.75; }
.bar-label { position: absolute; bottom: -20px; font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.tip {
  display: none; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 2;
  background: var(--invert-bg); color: var(--invert-fg); font-size: 12px; font-weight: 500; padding: 6px 10px; border-radius: 8px; white-space: nowrap;
}
.bar-slot:hover .tip, .bar-slot:focus .tip { display: block; }
.bar-slot:first-child .tip { left: 0; transform: none; }
.bar-slot:last-child .tip { left: auto; right: 0; transform: none; }
.cap-line { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--accent); pointer-events: none; }
.cap-line span { position: absolute; right: 0; top: -18px; font-size: 11px; color: var(--dim); }
.log { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.log li { display: grid; grid-template-columns: 70px 80px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.log li:last-child { border-bottom: 0; }
.log-when { color: var(--dim); font-variant-numeric: tabular-nums; }
.log-kind { color: var(--strong); font-weight: 600; }

.toast {
  position: fixed; left: 24px; bottom: 24px; z-index: 40; display: flex; align-items: center; gap: 14px;
  background: var(--invert-bg); color: var(--invert-fg); font-weight: 500; font-size: 14px; padding: 12px 18px; border-radius: 8px; box-shadow: var(--shadow);
}
.toast button { background: none; border: 0; color: var(--invert-fg); font-weight: 700; padding: 0; text-decoration: underline; }
/* Send with Undo: its own bar, so other notes can't push it away; they sit just above it while it counts down. */
.hold-bar {
  position: fixed; left: 24px; bottom: 24px; z-index: 41; display: flex; align-items: center; gap: 14px;
  background: var(--invert-bg); color: var(--invert-fg); font-weight: 500; font-size: 14px; padding: 12px 18px; border-radius: 8px; box-shadow: var(--shadow);
}
.hold-bar .left { font-variant-numeric: tabular-nums; }
.hold-bar button { background: none; border: 0; color: var(--invert-fg); font-weight: 700; padding: 0; text-decoration: underline; cursor: pointer; }
body:has(.hold-bar) .toast { bottom: 80px; }
/* Waiting to go, at the top of Sent. */
.row.held { cursor: default; }
.row.held .row-time { display: flex; align-items: center; gap: 10px; }
.row.held .left { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }
.undo-time { display: flex; gap: 8px; align-items: center; }
.undo-time .undo-amount { width: 90px; }

@media (max-width: 1080px) {
  .row { grid-template-columns: 20px 28px 150px 1fr auto; }
}
/* Phone: the sidebar becomes a strip, rows stack, compose goes full screen. */
@media (max-width: 760px) {
  .top { padding: 0 16px; gap: 10px; } /* Docs' narrow bar */
  .search-wrap { margin: 0; }
  .search { height: 38px; padding: 0 4px; }
  .adv { position: fixed; top: 64px; left: 8px; right: 8px; max-height: calc(100vh - 80px); overflow-y: auto; }
  .adv-row { grid-template-columns: 1fr; gap: 0; }
  /* No logo on a phone (owner, 25 Oct; header standard §7): the bar is the menu button and search, and the cards go
     without the lockup too. On wider screens "1code | Mail" stays whole. */
  .lockup, .top .ident { display: none; }
  .top .came-back { padding: 6px 8px; } /* beside the ☰, the arrow alone (header standard §8: by the name on a phone) */
  .top .came-back .w { display: none; }
  .search-wrap { min-width: 0; margin-left: 0; }
  .search input { min-width: 0; font-size: 14px; }
  /* Gmail's phone layout: the sidebar's contents live in the ☰ (Mail's part, then the apps), the bar keeps ☰ and
     search only, and Compose floats bottom-right. */
  .panes { grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr; }
  /* …and Account stays at the right of the bar, as in Gmail's app: Sign out lives in it. */
  .side, .side-resize, .top .tools > :not(.account-slot) { display: none; }
  .fab-compose {
    display: flex; align-items: center; gap: 10px; position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 20; height: 56px; padding: 0 20px; border: 0; border-radius: 16px; font: inherit; font-size: 15px; font-weight: 600;
    background: var(--invert-bg); color: var(--invert-fg); cursor: pointer; /* inverted, no shadow (BRAND §10), as the app's */
  }
  .fab-compose svg { width: 20px; height: 20px; }
  .main { border-radius: 0; }
  .row { grid-template-columns: 20px 28px 1fr auto; gap: 2px 8px; padding: 10px 14px 10px 6px; }
  .row-line { grid-column: 3 / -1; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .row-time { grid-row: 1; grid-column: 4; }
  .message { padding: 14px 16px 32px; }
  .body, .atts, .invite, .reply-bar, .reply-note, .inline-compose { margin-left: 0; }
  .compose-window { right: 0; left: 0; bottom: 0; top: 0; width: 100%; max-height: none; border-radius: 0; }
  .page { padding: 16px; }
  .setting { grid-template-columns: 1fr; gap: 8px; }
  .log li { grid-template-columns: 56px 1fr; }
  .log li > span:last-child { grid-column: 1 / -1; }
  .table { display: block; overflow-x: auto; }
  .table th, .table td { white-space: nowrap; overflow-wrap: normal; }
}

/* ---------- conversations ---------- */
.one { padding: 4px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.one:last-of-type { border-bottom: 0; }
.one .sender-line .icon-btn { width: 30px; height: 30px; }
.collapsed {
  display: grid; grid-template-columns: 32px 180px 1fr auto; gap: 12px; align-items: center; width: 100%;
  background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 0; text-align: left; color: var(--text);
}
.collapsed:hover { background: var(--hover); }
.collapsed .snip { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar.small { width: 28px; height: 28px; font-size: 12px; }

/* ---------- address autocomplete ---------- */
.cf { position: relative; }
.ac {
  position: absolute; top: 100%; left: 40px; right: 0; z-index: 35; background: var(--raised); border-radius: 10px;
  box-shadow: var(--shadow); padding: 6px; max-height: 280px; overflow-y: auto;
}
.ac-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.ac-item.on, .ac-item:hover { background: var(--selected); }
.ac-name { color: var(--strong); font-weight: 500; }

/* ---------- keyboard shortcut sheet ---------- */
.help-back { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.35); display: grid; place-items: center; padding: 16px; }
.help { background: var(--raised); border-radius: 14px; box-shadow: var(--shadow); padding: 20px 24px; width: min(720px, 100%); max-height: 85vh; overflow-y: auto; }
.keys { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 8px 0 14px; }
.keys dd { margin: 0; color: var(--text); }
kbd { font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; border: 0; background: var(--field); border-radius: 6px; padding: 2px 8px; color: var(--strong); white-space: nowrap; }

/* ---------- vacation responder ---------- */
.vac-grid { display: grid; grid-template-columns: max-content 1fr; gap: 8px 12px; align-items: center; max-width: 560px; }
.vac-grid input[type="date"] { font: inherit; color: var(--text); background-color: var(--field); border: 0; border-radius: 10px; padding: 8px 11px; max-width: 220px; }
.vac-grid textarea { min-height: 110px; }
@media (max-width: 760px) {
  .collapsed { grid-template-columns: 28px 1fr auto; }
  .collapsed .snip { display: none; }
  .vac-grid { grid-template-columns: 1fr; }
}

/* ---------- import ---------- */
.meter.wide { height: 6px; margin: 6px 0 2px; max-width: 320px; }
.steps { margin: 8px 0 0; padding-left: 20px; color: var(--muted); font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
details summary { cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }

/* ---------- admin console ---------- */
.form-grid { display: grid; grid-template-columns: 150px 1fr; gap: 10px 14px; align-items: center; max-width: 640px; }
.form-grid > span { color: var(--dim); font-size: 13px; }
.addr-input { display: flex; align-items: center; gap: 6px; }
.addr-input input { flex: 1; min-width: 0; }
.addr-input select { width: auto; flex: none; }
.checks { display: flex; flex-direction: column; gap: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips .chip { font-size: 12px; padding: 2px 8px; }
.join .join-org { color: var(--dim); margin: 0 0 6px; }
.join .join-address { font-size: 20px; font-weight: 600; color: var(--strong); letter-spacing: -0.02em; margin-bottom: 14px; word-break: break-all; }
.join .btn { justify-content: center; }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; gap: 4px; } }
/* On a phone the bell steps aside (BRAND §7): the bar is the ☰, search and the person's circle. */
@media (max-width: 640px) { .top .tools .oca-acc .b.ic { display: none; } }

/* Terms · Privacy */
.legal-links { margin: 14px 0 0; font-size: 12px; color: var(--dim); text-align: center; }
.legal-links a { color: var(--dim); text-decoration: none; }
.legal-links a:hover { color: var(--text); text-decoration: underline; }
.side-legal { padding: 8px 16px 16px; text-align: left; }
/* Settings → Phone notifications: one row per mailbox. */
.notify-list { display: grid; gap: 8px; max-width: 520px; }
.notify-row { display: grid; grid-template-columns: 1fr 200px; gap: 12px; align-items: center; }
.btn.small { padding: 4px 10px; font-size: 12px; }
/* A reply's quoted original, folded as in Gmail: "•••" opens it below what you write. */
.quote-fold, .quote-open { padding: 0 16px 10px; }
.quote-dots { border: 0; background: var(--hover); color: var(--muted); border-radius: 8px; padding: 0 8px; font: inherit; font-size: 12px; letter-spacing: 2px; line-height: 18px; cursor: pointer; }
.quote-dots:hover { background: var(--selected); color: var(--text); }
.quote-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.quote-head { color: var(--muted); font-size: 13px; white-space: pre-wrap; margin-bottom: 6px; }
.quote-body.bq { border-left: 2px solid var(--line-hover); padding-left: 10px; }
.quote-body iframe { width: 100%; border: 0; border-radius: 8px; background: #fff; }
/* A new email while you read: a card bottom right, as Gmail's. */
.new-mail { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; align-items: center; gap: 12px; width: min(380px, calc(100vw - 32px)); padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--raised); color: var(--text); box-shadow: var(--shadow); }
.new-mail .avatar { flex: none; }
.new-mail-text { flex: 1; min-width: 0; font-size: 13px; }
.new-mail-who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.new-mail-subj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.new-mail-acts { display: flex; align-items: center; gap: 4px; }

/* ---------- our own date and time picker (owner, 27 Oct): the family's greys, the chosen day and time inverted ---------- */
.menu.picking { min-width: 0; }
.pk-title { justify-content: flex-start !important; align-items: center; gap: 8px !important; padding: 4px 6px !important; }
.picker { display: flex; gap: 12px; align-items: flex-start; padding: 4px 6px 2px; }
.pk-cal { width: 252px; }
.pk-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.pk-head b { font-size: 14px; font-weight: 600; }
.menu .pk-head .icon-btn, .menu .pk-title .icon-btn, .pk-head .icon-btn { width: 32px; height: 32px; padding: 0; justify-content: center; border-radius: 50%; }
.pk-week, .pk-days { display: grid; grid-template-columns: repeat(7, 36px); }
.pk-week span { text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); padding: 6px 0; }
.picker .pk-days button, .picker .pk-col button {
  appearance: none; border: 0; background: none; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; position: relative;
  display: grid; place-items: center; place-content: center; text-align: center; padding: 0; gap: 0; width: 36px; height: 36px; border-radius: 50%; font-variant-numeric: tabular-nums;
}
/* .menu button's space-between left the digit at the cell's left edge, so its fill looked shifted right (owner, 27 Oct). */
.picker .pk-days button:hover, .picker .pk-col button:hover { background: var(--field); }
.picker .pk-days button.out { color: var(--faint); }
.picker .pk-days button.today { font-weight: 700; }
.picker .pk-days button.today::after { content: ""; position: absolute; bottom: 5px; left: calc(50% - 2px); width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.picker .pk-days button.on, .picker .pk-col button.on, .picker .pk-days button.on:hover, .picker .pk-col button.on:hover { background: var(--invert-bg); color: var(--invert-fg); }
.picker .pk-days button:disabled { opacity: .3; cursor: default; background: none; }
.pk-time { display: flex; gap: 4px; }
.pk-col { position: relative; height: 290px; width: 54px; overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; gap: 2px; }
.pk-col::-webkit-scrollbar { display: none; }
.pk-col.short { height: auto; }
.picker .pk-col button { width: 52px; height: 34px; border-radius: 9px; flex: none; align-self: center; }
.pk-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 6px 4px; }
.pk-foot .muted { font-size: 13px; }
.date-field { display: grid; gap: 8px; justify-items: start; }
.date-field .picker { background: var(--raised); border-radius: 12px; box-shadow: var(--shadow); padding: 10px; }

/* Temporary "Sign in with email" on the signed-out card (owner, 3 Nov): full-width, reads as part of the sign-in. */
.card.with-legal > .btn.primary, .elogin .btn { width: 100%; box-sizing: border-box; justify-content: center; padding: 11px 16px; font-size: 14px; }
.elogin-wrap { margin-top: 14px; }
.elogin-wrap > a { display: inline-block; font-size: 13px; color: #6b6f76; text-decoration: none; cursor: pointer; }
.elogin-wrap > a:hover { text-decoration: underline; }
:root[data-theme="dark"] .elogin-wrap > a { color: #8a8f98; }
.elogin { display: grid; gap: 10px; margin-top: 12px; }
.elogin .input { width: 100%; box-sizing: border-box; padding: 12px 14px; font-size: 15px; border: 1px solid var(--line-hover); border-radius: 12px; background: var(--bg); color: var(--text); outline: none; text-align: center; }
.elogin .input::placeholder { color: #9aa0a6; }
.elogin .input:focus { border-color: var(--text); }
.elogin .note { font-size: 13px; color: #6b6f76; margin: 2px 0 0; line-height: 1.5; }
