/* ------------------------------------------------------------------
   Design tokens. Committed light theme: one accent, a 4px spacing
   scale, and a type scale with real hierarchy. Every margin and pad
   in this file resolves to a --s* step; no arbitrary pixel values.
------------------------------------------------------------------- */
:root {
  /* colour */
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f2f4f7;
  --surface-3: #e9edf3;
  --ink: #10131a;
  --ink-2: #3d4451;
  --muted: #6b7382;
  --line: #e4e8ee;
  --line-strong: #cdd4de;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef2ff;
  --accent-ink: #ffffff;
  --ok: #067647;
  --ok-soft: #ecfdf3;
  --warn: #b54708;
  --warn-soft: #fffaeb;
  --danger: #b42318;
  --danger-soft: #fef3f2;

  /* spacing — 4px base, nothing arbitrary */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 20px;
  --s6: 24px; --s7: 32px; --s8: 40px; --s9: 56px; --s10: 72px;

  /* type */
  --fs-display: clamp(1.75rem, 5vw, 2.5rem);
  --fs-h2: clamp(1.25rem, 3vw, 1.6rem);
  --fs-h3: 1.0625rem;
  --fs-body: 1rem;
  --fs-sm: .9375rem;
  --fs-xs: .8125rem;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(16, 19, 26, .05);
  --shadow-md: 0 4px 12px rgba(16, 19, 26, .07);
  --shadow-lg: 0 12px 32px rgba(16, 19, 26, .10);
  --maxw: 1080px;
  --measure: 68ch;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}



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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.015em; font-weight: 650; }
h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.75rem); }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: .75rem 1rem; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; min-width: 0; }

/* ------------------------------------------------------------- header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-weight: 700; color: var(--ink); text-decoration: none;
  font-size: 1.0625rem; letter-spacing: -.02em;
}
.brand-logo { width: 30px; height: 30px; flex: none; color: var(--accent); display: block; }
.brand-name { line-height: 1; }
.brand img { height: 30px; width: auto; display: block; }
.nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.nav a {
  color: var(--ink-2); text-decoration: none; font-size: var(--fs-sm); font-weight: 500;
  padding: var(--s2) var(--s3); border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; min-height: 44px;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: .45rem .6rem; color: var(--ink); cursor: pointer; }

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 12px 14px;
    box-shadow: var(--shadow-md);
  }
  .nav.open { display: flex; }
  .nav a { padding: .8rem .6rem; }
}

/* ---------------------------------------------------------- announcements */
.banner {
  padding: .7rem 0; font-size: .92rem; text-align: center;
  background: var(--accent-soft); color: var(--ink-2); border-bottom: 1px solid var(--line);
}
.banner.warn { background: var(--warn-soft); color: var(--warn); }

/* --------------------------------------------------------------- inbox */
/* ------------------------------------------------------------------
   The hero. This is the product: a visitor wants an address, a way to
   copy it, and confidence that mail will arrive. Everything here is
   sized so the address is readable and the copy button is thumb-sized
   on a 390px phone without scrolling.
------------------------------------------------------------------- */
.inbox-shell { padding: var(--s7) 0 var(--s2); }

.page-title {
  font-size: var(--fs-display);
  line-height: 1.15;
  font-weight: 750;
  margin: 0 0 var(--s2);
  letter-spacing: -.025em;
  max-width: 28ch;
}
.page-sub {
  margin: 0 0 var(--s6);
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.55;
  max-width: 52ch;
}

.address-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--s6);
}
.address-label {
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); font-weight: 700; margin-bottom: var(--s3);
}
.address-row { display: flex; gap: var(--s3); align-items: stretch; flex-wrap: wrap; }
.address-value {
  flex: 1 1 320px; min-width: 0;
  display: flex; align-items: center;
  font-family: var(--mono);
  font-size: clamp(1.0625rem, .8rem + 1.15vw, 1.4rem);
  font-weight: 600; letter-spacing: -.01em; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--s3) var(--s4);
  min-height: 56px;
  overflow-x: auto; white-space: nowrap; scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.address-value.loading { color: var(--muted); font-style: italic; font-family: var(--font); font-weight: 400; font-size: var(--fs-body); }
.address-actions { display: flex; gap: var(--s2); flex: 0 0 auto; flex-wrap: wrap; }
.address-actions .btn { min-height: 56px; }

/* One tap on a phone should copy, so the button owns the full width there.
   flex-basis must be reset or the address box stretches to fill the column. */
@media (max-width: 560px) {
  .address-row { flex-direction: column; align-items: stretch; }
  .address-value { flex: 0 0 auto; width: 100%; }
  .address-actions { width: 100%; }
  .address-actions .btn { flex: 1 1 auto; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .6rem 1.05rem;
  border-radius: var(--radius); border: 1px solid transparent;
  font: inherit; font-size: .935rem; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: background-color .14s ease, border-color .14s ease, color .14s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-2); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { min-height: 36px; padding: .35rem .7rem; font-size: .87rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

.meta-row {
  display: flex; gap: 10px 18px; flex-wrap: wrap; align-items: center;
  margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line);
  font-size: .875rem; color: var(--muted);
}
.meta-item { display: inline-flex; align-items: center; gap: .4rem; }
.meta-item strong { color: var(--ink-2); font-weight: 600; }

.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.dot.live { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.dot.reconnecting { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.dot.offline { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
@media (prefers-reduced-motion: no-preference) {
  .dot.live { animation: pulse 2.4s ease-in-out infinite; }
  @keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
}

.pill {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .18rem .55rem; border-radius: 999px;
  font-size: .78rem; font-weight: 600; letter-spacing: .01em;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.pill.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

.subnav { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 0; }

/* ------------------------------------------------------------ messages */
.panel {
  margin-top: var(--s5); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap;
  padding: var(--s4) var(--s6); border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.panel-head h2 { margin: 0; font-size: var(--fs-h3); font-weight: 650; }
.panel-head .spacer { margin-left: auto; }

.msg-list { list-style: none; margin: 0; padding: 0; }
.msg-item { border-bottom: 1px solid var(--line); }
.msg-item:last-child { border-bottom: 0; }
.msg-btn {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; align-items: start;
  max-width: 100%;
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 15px 18px; font: inherit; color: inherit; min-height: 56px;
}
.msg-btn:hover { background: var(--surface-2); }
.msg-unread-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: .5rem; background: transparent; }
.msg-item.unread .msg-unread-dot { background: var(--accent); }
.msg-item.unread .msg-subject { font-weight: 680; }
.msg-main { display: block; min-width: 0; max-width: 100%; overflow: hidden; }
.msg-from { display: block; max-width: 100%; font-size: .875rem; color: var(--ink-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-subject { display: block; max-width: 100%; font-size: .98rem; color: var(--ink); margin: 1px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-preview { display: block; max-width: 100%; font-size: .875rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-side { display: flex; max-width: 40vw; flex-direction: column; align-items: flex-end; gap: 5px; font-size: .8rem; color: var(--muted); white-space: nowrap; }

.empty-state { padding: 52px 24px; text-align: center; color: var(--muted); }
.empty-state .glyph {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-size: 1.5rem;
}
.empty-state h3 { color: var(--ink); margin-bottom: .35rem; }
.empty-state p { max-width: 42ch; margin: 0 auto; font-size: .94rem; }

/* -------------------------------------------------------------- reader */
.reader-head { padding: 18px; border-bottom: 1px solid var(--line); }
.reader-subject { font-size: 1.2rem; font-weight: 650; margin: 10px 0 8px; word-break: break-word; }
.reader-meta { font-size: .875rem; color: var(--muted); display: grid; gap: 3px; }
.reader-meta .addr { font-family: var(--mono); color: var(--ink-2); word-break: break-all; }
.reader-notice {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin: 0; padding: 11px 18px; background: var(--warn-soft); color: var(--warn);
  font-size: .875rem; border-bottom: 1px solid var(--line);
}
.reader-frame { width: 100%; border: 0; display: block; background: var(--surface); min-height: 320px; }
.reader-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--surface-2); }

.code-hit {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin: 0; padding: 12px 18px; background: var(--accent-soft);
  border-bottom: 1px solid var(--line); font-size: .9rem;
}
.code-hit code { font-family: var(--mono); font-size: 1.05rem; font-weight: 700; letter-spacing: .06em; color: var(--accent); }

.attachments { padding: 14px 18px; border-top: 1px solid var(--line); }
.attachment {
  display: flex; align-items: center; gap: 12px; padding: 9px 0;
  border-bottom: 1px solid var(--line); font-size: .9rem;
}
.attachment:last-child { border-bottom: 0; }
.attachment .name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment .size { color: var(--muted); font-size: .82rem; white-space: nowrap; }

/* -------------------------------------------------------------- dialog */
dialog {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 0; background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-lg); max-width: min(560px, calc(100vw - 32px)); width: 100%;
  max-height: min(88vh, 640px); overflow: hidden;
  display: flex; flex-direction: column;
}
dialog:not([open]) { display: none; }
.dialog-body { overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.dialog-foot { flex: 0 0 auto; }
dialog::backdrop { background: rgba(10, 13, 20, .5); }
.dialog-head { padding: 18px 20px 0; }
.dialog-head h2 { margin: 0 0 .3rem; font-size: 1.15rem; }
.dialog-body { padding: 12px 20px; }
.dialog-foot { padding: 14px 20px 18px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

.secret-box {
  font-family: var(--mono); font-size: 1.05rem; font-weight: 650; letter-spacing: .05em;
  background: var(--accent-soft); color: var(--accent);
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  padding: 14px; text-align: center; word-break: break-all; margin: 4px 0 12px;
}
.hint { font-size: .87rem; color: var(--muted); overflow-wrap: anywhere; }
#recovery-notice, #recovery-notice * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }

.field { margin-bottom: var(--s5); }
.field:last-of-type { margin-bottom: var(--s6); }
.field label {
  display: block; font-size: var(--fs-xs); font-weight: 600;
  margin-bottom: var(--s2); color: var(--ink-2); letter-spacing: .01em;
}
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: var(--s3) var(--s4);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-body);
  transition: border-color .14s ease, box-shadow .14s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field textarea { min-height: 132px; resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field .err { color: var(--danger); font-size: var(--fs-xs); margin-top: var(--s1); display: block; }

.alert { padding: 12px 14px; border-radius: var(--radius); font-size: .9rem; margin-bottom: 14px; }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }

/* ------------------------------------------------------------ recents */
.recent-list { list-style: none; margin: 0; padding: 0; }
.recent-item {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.recent-item:last-child { border-bottom: 0; }
.recent-addr { flex: 1 1 240px; min-width: 0; font-family: var(--mono); font-size: .9rem; word-break: break-all; }
.recent-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* -------------------------------------------------------------- content */
.content-section { padding: var(--s9) 0; }
.content-section + .content-section { border-top: 1px solid var(--line); }
.content-section > h2 { font-size: var(--fs-h2); letter-spacing: -.02em; margin: 0 0 var(--s4); }
.prose h2 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: .12em .35em; border-radius: 4px; }

.grid { display: grid; gap: var(--s4); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: var(--s6); box-shadow: var(--shadow-sm);
}
.card h3 { margin: 0 0 var(--s2); font-size: var(--fs-h3); letter-spacing: -.01em; }
.card p { margin: 0; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.6; }
.card .num {
  width: 30px; height: 30px; border-radius: var(--radius-sm);
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 700; font-size: var(--fs-xs);
  margin-bottom: var(--s3);
}

.faq-list {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden;
}
details.faq { border-bottom: 1px solid var(--line); }
details.faq:last-child { border-bottom: 0; }
details.faq summary {
  cursor: pointer; padding: var(--s4) var(--s5); font-weight: 600;
  list-style: none; display: flex; gap: var(--s3); align-items: center;
  min-height: 56px; font-size: var(--fs-sm); color: var(--ink);
}
details.faq summary:hover { background: var(--surface-2); }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: ""; margin-left: auto; flex: none;
  width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .16s ease;
}
details.faq[open] summary { background: var(--surface-2); }
details.faq[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
details.faq .answer {
  padding: 0 var(--s5) var(--s5); color: var(--ink-2);
  font-size: var(--fs-sm); line-height: 1.65; max-width: var(--measure);
}

.partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.partner {
  display: flex; flex-direction: column; gap: 8px; padding: 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  text-decoration: none; color: var(--ink);
}
.partner:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); color: var(--ink); }
.partner img { height: 28px; width: auto; max-width: 140px; object-fit: contain; align-self: flex-start; }
.partner .name { font-weight: 650; font-size: .95rem; }
.partner .desc { font-size: .86rem; color: var(--muted); }

.ad-slot { margin: 22px 0; text-align: center; }
.ad-slot a { display: inline-block; max-width: 100%; }
.ad-slot img { max-width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.ad-slot .label { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.ad-desktop { display: inline-block; }
.ad-mobile { display: none; }
@media (max-width: 700px) {
  .ad-desktop { display: none; }
  .ad-mobile { display: inline-block; }
}

/* -------------------------------------------------------------- footer */
.site-footer { margin-top: 56px; border-top: 1px solid var(--line); background: var(--surface); padding: 34px 0 40px; }
.footer-grid { display: flex; gap: 28px; flex-wrap: wrap; justify-content: space-between; }
.footer-links { display: flex; gap: 8px 20px; flex-wrap: wrap; }
.footer-links a { color: var(--ink-2); text-decoration: none; font-size: .9rem; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }
.footer-note { font-size: .85rem; color: var(--muted); max-width: 48ch; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.toast-region { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.toast {
  background: var(--ink); color: var(--bg); padding: .7rem 1.1rem; border-radius: 999px;
  font-size: .9rem; font-weight: 550; box-shadow: var(--shadow-lg);
}
@media (prefers-reduced-motion: no-preference) {
  .toast { animation: rise .18s ease-out; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

[hidden] { display: none !important; }


/* ------------------------------------------------------------------
   Layout utilities.

   These exist because the Content Security Policy is
   `style-src 'self' 'nonce-...'`, and a nonce authorises <style>
   ELEMENTS, not inline style ATTRIBUTES. Every style="..." in a
   template was therefore being discarded by the browser, which is
   what broke the Contact & Abuse form. Weakening the CSP to fix that
   would be the wrong trade on a site that renders untrusted email,
   so the styles live here instead.
------------------------------------------------------------------- */
.stack-sm  { margin-top: var(--s3); }
.stack     { margin-top: var(--s4); }
.stack-md  { margin-top: var(--s5); }
.stack-lg  { margin-top: var(--s6); }
.gap-below { margin-bottom: var(--s3); }
.gap-below-lg { margin-bottom: var(--s4); }

.col-narrow { max-width: 560px; margin-inline: auto; }
.col-mid    { max-width: 640px; margin-inline: auto; }
.col-wide   { max-width: 720px; margin-inline: auto; }

.panel-body { padding: var(--s6); }
.panel-body > :first-child { margin-top: 0; }

.btn-row { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s5); }
.text-xs { font-size: var(--fs-xs); }

/* Centred single-message pages: 404, error, interstitial. */
.state-page { text-align: center; padding: var(--s10) var(--s5); }
.state-page .prose { margin-inline: auto; }

/* ------------------------------------------------------------------ prose measure */
.prose { max-width: var(--measure); }
.prose p, .prose ul, .prose ol { line-height: 1.65; }
.prose > :first-child { margin-top: 0; }

/* ------------------------------------------------------------------ focus */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* The interstitial shows a destination URL: left-aligned, no code tracking. */
.secret-box-url { text-align: left; font-size: var(--fs-sm); letter-spacing: 0; }
/* A floor width stops the picker resizing as domain names change. */
.domain-select { min-width: 150px; }

/* ------------------------------------------------------------------
   Touch targets. Inline links inside prose stay inline — enlarging
   those would break the text flow — but every standalone navigational
   control gets a 44px hit area.
------------------------------------------------------------------- */
.brand { min-height: 44px; }
.nav-toggle { min-height: 44px; padding-inline: var(--s3); }
.footer-links a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding-inline: var(--s1);
}
.footer-note a { display: inline-flex; align-items: center; min-height: 44px; }


/* ------------------------------------------------------------------
   Editorial sections. A 68ch measure inside a 1080px container leaves
   a dead gap on the right that reads as an unfinished page. Pairing
   the heading with the text in two columns uses the width on purpose.
------------------------------------------------------------------- */
.section-split { display: grid; gap: var(--s5); }
.section-split > h2 { margin: 0; font-size: var(--fs-h2); letter-spacing: -.02em; }
@media (min-width: 900px) {
  .section-split { grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: var(--s8); align-items: start; }
  .section-split > h2 { position: sticky; top: var(--s8); }
}

/* The hero sits on its own ground so the card reads as the page's
   subject rather than one panel among several. */
.hero {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.hero .inbox-shell { padding-block: var(--s8) var(--s9); }

.trust-row {
  display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5);
  margin-top: var(--s5); color: var(--muted); font-size: var(--fs-xs);
}
.trust-row span { display: inline-flex; align-items: center; gap: var(--s2); }
.trust-row svg { width: 15px; height: 15px; flex: none; color: var(--ok); }

/* ------------------------------------------------------------------
   Components rendered by JavaScript. These carried style="" attributes
   that the CSP discarded, so they live here. The message frame's height
   is per-message, so script sets --frame-h; a custom property set from
   script is allowed, a parsed style attribute is not.
------------------------------------------------------------------- */
.reader-frame { height: var(--frame-h, 600px); }
.attachments-title { font-size: var(--fs-sm); margin: 0 0 var(--s2); }

.recovery-alert { margin: var(--s4) 0 0; }
.recovery-code { margin: var(--s3) 0 var(--s2); }
.recovery-link { margin-bottom: var(--s2); }
.recovery-actions { display: flex; gap: var(--s2); flex-wrap: wrap; }
/* These sit inside an alert, so they need the full touch target. */
.recovery-actions .btn { min-height: 44px; }

/* The subnav sits under the address and is a primary path on mobile,
   so its ghost buttons need a real hit area rather than link-sized. */
.subnav .btn-sm { min-height: 44px; }

/* The panel header's Refresh control is a real button, not a label. */
.panel-head .btn-sm { min-height: 40px; }
@media (pointer: coarse) { .panel-head .btn-sm { min-height: 44px; } }
