/* Since I'm Gone: one stylesheet for the public site and the account pages.
   Layout: marketing pages are full-width bands with a 1120px column; account pages are a top bar + one working column (form + sticky envelope summary). */
:root {
  --bg: #EDF0F3;
  --surface: #FFFFFF;
  --sunk: #E2E7EC;
  --ink: #18202B;
  --muted: #5A6571;
  --line: #D3DAE0;
  --accent: #3B5A75;
  --accent-ink: #FFFFFF;
  --accent-soft: #DCE5EE;
  --seal: #8A2E4A;
  --seal-ink: #FFFFFF;
  --seal-soft: #F3E3E8;
  --ok: #2B7655;
  --warn: #9A6211;
  --f-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --f-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --r: 10px;
  --s--1: .86rem; --s0: 1rem; --s1: 1.25rem; --s2: 1.6rem; --s3: 2.2rem; --s4: clamp(2.5rem, 5.5vw, 4.1rem);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #10151B; --surface: #18202A; --sunk: #0C1116; --ink: #E6EBF0; --muted: #9AA6B2; --line: #2B3540;
  --accent: #93B4D2; --accent-ink: #0E1620; --accent-soft: #223142; --seal: #D46F8E; --seal-ink: #1A0E13; --seal-soft: #2E1A22;
  --ok: #6CC59B; --warn: #E2A84C; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #10151B; --surface: #18202A; --sunk: #0C1116; --ink: #E6EBF0; --muted: #9AA6B2; --line: #2B3540;
  --accent: #93B4D2; --accent-ink: #0E1620; --accent-soft: #223142; --seal: #D46F8E; --seal-ink: #1A0E13; --seal-soft: #2E1A22;
  --ok: #6CC59B; --warn: #E2A84C; color-scheme: dark; }

/* ---------- base ---------- */
* { box-sizing: border-box; }
/* The hidden attribute always wins over a component's display rule (e.g. .confirm). */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--f-body); }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 500; line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: var(--s4); } h2 { font-size: var(--s3); } h3 { font-size: var(--s1); } h4 { font-size: var(--s0); font-family: var(--f-body); font-weight: 600; letter-spacing: 0; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.mono { font-family: var(--f-mono); font-size: .8rem; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.eyebrow { font-size: .74rem; text-transform: uppercase; letter-spacing: .13em; color: var(--muted); font-weight: 600; }
.lede { font-size: var(--s1); color: var(--muted); max-width: 54ch; }
.stack { display: grid; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.skip-link { position: absolute; left: -999px; } .skip-link:focus { left: 16px; top: 8px; z-index: 50; background: var(--surface); padding: 8px 12px; }
.preview-note { background: var(--sunk); color: var(--muted); font-size: .8rem; }
.preview-note .wrap { padding-block: 6px; }

/* ---------- buttons, chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 10px 18px; border-radius: 8px; cursor: pointer; font-weight: 500; text-decoration: none; line-height: 1.2; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.seal { background: var(--seal); border-color: var(--seal); color: var(--seal-ink); }
.btn.ghost { background: none; border-color: transparent; }
.btn.lg { padding: 14px 24px; font-size: 1.05rem; }
.btn.sm { padding: 6px 12px; font-size: .88rem; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; background: var(--sunk); color: var(--ink); white-space: nowrap; }
.chip.ok { color: var(--ok); } .chip.warn { color: var(--warn); } .chip.seal { color: var(--seal); background: var(--seal-soft); } .chip.accent { color: var(--accent); background: var(--accent-soft); }

/* ---------- brand mark ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--f-display); font-style: italic; font-size: 1.45rem; letter-spacing: -.01em; white-space: nowrap; }
.mark { width: 26px; height: 26px; flex: none; }

/* ---------- public header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; gap: 20px; padding-block: 14px; }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--sunk); }
.site-nav .btn { margin-left: 8px; color: var(--accent-ink); }
.menu-btn { display: none; margin-left: auto; border: 1px solid var(--line); background: none; border-radius: 8px; padding: 7px 12px; cursor: pointer; }
@media (max-width: 780px) {
  .menu-btn { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px max(16px, env(safe-area-inset-left, 0px)) 16px; }
  .site-nav.open { display: flex; }
  .site-nav .btn { margin: 8px 0 0; }
}

/* ---------- bands ---------- */
.band { padding-block: clamp(56px, 8vw, 96px); }
.band.sunk { background: var(--surface); border-block: 1px solid var(--line); }
.band-head { display: grid; gap: 12px; margin-bottom: 40px; max-width: 680px; }
.band-head p { color: var(--muted); font-size: 1.08rem; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(40px, 7vw, 88px) clamp(48px, 7vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }
.hero h1 em { font-style: italic; color: var(--seal); }
.hero .lede { margin-top: 20px; }
.hero .row { margin-top: 28px; }
.hero .fine { margin-top: 14px; font-size: .88rem; color: var(--muted); }

/* the envelope illustration (CSS only) */
.scene { position: relative; max-width: 480px; width: 100%; margin-inline: auto; aspect-ratio: 1.1; }
.paper { position: absolute; left: 12%; right: 12%; top: 2%; height: 64%; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 7% 8%; font-family: var(--f-display); font-style: italic; font-size: clamp(.92rem, 1.6vw, 1.08rem); line-height: 1.6; color: var(--ink); transform: rotate(-3deg); box-shadow: 0 10px 30px -18px color-mix(in srgb, var(--ink) 50%, transparent); overflow: hidden; }
.paper p + p { margin-top: .6em; }
.env { position: absolute; left: 0; right: 0; bottom: 0; height: 58%; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; box-shadow: 0 20px 40px -24px color-mix(in srgb, var(--ink) 55%, transparent); }
.env::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top right, transparent 49.7%, var(--line) 50%, transparent 50.3%) left / 50% 100% no-repeat, linear-gradient(to top left, transparent 49.7%, var(--line) 50%, transparent 50.3%) right / 50% 100% no-repeat; }
.env .addr { position: absolute; left: 9%; bottom: 12%; font-family: var(--f-display); font-style: italic; font-size: 1.1rem; line-height: 1.3; }
.env .addr small { display: block; font: 500 .62rem/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-style: normal; }
.wax { width: 60px; height: 60px; border-radius: 50%; background: var(--seal); color: var(--seal-ink); display: grid; place-items: center; font-family: var(--f-display); font-style: italic; font-size: 1.4rem; box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--seal) 72%, #000), 0 3px 8px color-mix(in srgb, var(--seal) 35%, transparent); }
.env .wax { position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%); }
.postmark { width: 84px; height: 84px; border-radius: 50%; border: 1.5px solid var(--seal); color: var(--seal); display: grid; place-items: center; text-align: center; font: 500 .56rem/1.3 var(--f-mono); letter-spacing: .07em; text-transform: uppercase; transform: rotate(-12deg); background: color-mix(in srgb, var(--surface) 85%, transparent); }
.postmark.date { border-color: var(--accent); color: var(--accent); }
.env .postmark { position: absolute; right: 6%; top: 10%; }

/* ---------- two ways ---------- */
.ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 760px) { .ways { grid-template-columns: 1fr; } }
.way { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(22px, 3vw, 34px); display: grid; gap: 14px; align-content: start; grid-template-columns: minmax(0, 1fr) auto; }
.way > * { grid-column: 1; }
.way .postmark { grid-column: 2; grid-row: 1 / span 2; transform: rotate(8deg); width: 76px; height: 76px; }
.way h3 { font-size: var(--s2); }
.way ul { margin: 0; padding-left: 1.1em; color: var(--muted); display: grid; gap: 6px; }

/* ---------- message kinds ---------- */
.kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.kind { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: grid; gap: 10px; align-content: start; }
.kind blockquote { margin: 0; font-family: var(--f-display); font-style: italic; font-size: 1.12rem; line-height: 1.45; }

/* ---------- process ---------- */
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; counter-reset: s; }
@media (max-width: 900px) { .process { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .process { grid-template-columns: 1fr; } }
.process li { counter-increment: s; display: grid; gap: 8px; align-content: start; border-top: 1px solid var(--ink); padding-top: 16px; }
.process li::before { content: counter(s, decimal-leading-zero); font: 500 .8rem var(--f-mono); color: var(--seal); letter-spacing: .08em; }
.process h3 { font-size: 1.3rem; }
.process p { color: var(--muted); }

/* ---------- escalation timeline (shared with the safety plan page) ---------- */
.timeline { display: grid; }
.tl { display: grid; grid-template-columns: 92px 18px minmax(0, 1fr); gap: 14px; }
.tl .d { font: 500 .76rem/1.4 var(--f-mono); color: var(--muted); text-align: right; padding-top: 3px; font-variant-numeric: tabular-nums; }
.tl .bar { position: relative; }
.tl .bar::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.tl .bar::after { content: ""; position: absolute; left: 3px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.tl.stop .bar::after { border-color: var(--ok); }
.tl.end .bar::after { background: var(--seal); border-color: var(--seal); }
.tl.end .bar::before { bottom: calc(100% - 12px); }
.tl .t { padding-bottom: 18px; }
.tl .t b { font-weight: 600; }
.tl .t small { display: block; color: var(--muted); font-size: .9rem; }
.safeguard-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .safeguard-grid { grid-template-columns: 1fr; } }
.points { display: grid; gap: 20px; }
.points div { display: grid; gap: 4px; }
.points p { color: var(--muted); }

/* ---------- formats ---------- */
.formats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .formats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .formats { grid-template-columns: 1fr; } }
.format { border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: grid; gap: 8px; align-content: start; background: var(--bg); }
.format svg { width: 30px; height: 30px; color: var(--accent); }
.format p { color: var(--muted); font-size: .94rem; }

/* ---------- recipient preview strip ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.notice-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 32px 24px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.notice-card p { color: var(--muted); max-width: 40ch; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; max-width: 520px; } }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; display: grid; gap: 16px; align-content: start; }
.plan.featured { border-color: var(--seal); box-shadow: 0 0 0 1px var(--seal); }
.plan .price { font-family: var(--f-display); font-size: 2.6rem; line-height: 1; }
.plan .price small { font: 400 .95rem var(--f-body); color: var(--muted); }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plan li { padding-left: 22px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 10px; height: 6px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg) translateY(-3px); }
.plan .btn { justify-self: start; }
.addons { margin-top: 28px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.addons div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.addons b { font-weight: 600; }

/* ---------- faq ---------- */
.faq { display: grid; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-family: var(--f-display); font-size: 1.25rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--f-mono); color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { margin-top: 10px; color: var(--muted); max-width: 64ch; display: grid; gap: 10px; }

/* ---------- closing CTA, footer ---------- */
.cta { text-align: center; }
.cta .wrap { display: grid; gap: 18px; justify-items: center; }
.cta h2 { max-width: 20ch; }
.site-footer { border-top: 1px solid var(--line); padding-block: 40px; font-size: .92rem; color: var(--muted); }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); } .site-footer .about { grid-column: 1 / -1; } }
.site-footer h4 { color: var(--ink); margin-bottom: 8px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--muted); text-decoration: none; } .site-footer a:hover { color: var(--ink); }
.site-footer .about p { max-width: 36ch; margin-top: 10px; }

/* ---------- page header (inner public pages) ---------- */
.page-hero { padding-block: clamp(40px, 6vw, 72px) 8px; }
.page-hero .wrap { display: grid; gap: 14px; }

/* ---------- auth ---------- */
.auth { min-height: 100%; display: grid; place-items: center; padding-block: 48px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(24px, 4vw, 36px); display: grid; gap: 18px; }
.auth-card .brand { justify-self: center; }
.auth-card h1 { font-size: var(--s3); text-align: center; }
.auth-card .alt { text-align: center; font-size: .92rem; color: var(--muted); }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; font-size: .9rem; }
.field > span { font-weight: 600; }
.field small, .hint { color: var(--muted); font-size: .84rem; font-weight: 400; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 10px 12px; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.fields .full { grid-column: 1 / -1; }
.check { display: flex; gap: 12px; align-items: flex-start; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.check div { display: grid; gap: 2px; }
.check small { color: var(--muted); font-size: .86rem; }
.choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.choice { position: relative; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; background: var(--bg); cursor: pointer; display: grid; gap: 4px; align-content: start; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice b { font-family: var(--f-display); font-weight: 500; font-size: 1.12rem; }
.choice span { color: var(--muted); font-size: .86rem; }
.choice:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--surface); }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span { display: inline-block; border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: .92rem; }
.pill input:checked + span { border-color: var(--seal); color: var(--seal); background: var(--seal-soft); font-weight: 600; }
.pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- account area ---------- */
.app-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.app-header .wrap { display: flex; align-items: center; gap: 18px; padding-block: 12px; flex-wrap: wrap; }
.app-nav { display: flex; gap: 2px; flex-wrap: wrap; }
.app-nav a { color: var(--muted); text-decoration: none; padding: 7px 12px; border-radius: 8px; font-weight: 500; font-size: .95rem; }
.app-nav a[aria-current="page"] { color: var(--ink); background: var(--sunk); }
.app-header .me { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: .88rem; flex: none; }
@media (max-width: 640px) { .app-nav { order: 3; width: 100%; } .app-header .me .btn { padding: 6px 10px; } }
.app-main { padding-block: 32px 72px; display: grid; gap: 28px; }
.page-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 14px; }
.page-title h1 { font-size: var(--s3); }
.page-title p { color: var(--muted); margin-top: 6px; max-width: 60ch; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(18px, 2.4vw, 26px); }
.card > h2, .card-head h2 { font-size: 1.45rem; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.card-head p { color: var(--muted); font-size: .92rem; width: 100%; }

/* dashboard */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 22px; align-items: start; }
@media (max-width: 900px) { .dash { grid-template-columns: 1fr; } }
.status { display: grid; gap: 12px; }
.status .big { font-family: var(--f-display); font-size: 1.7rem; line-height: 1.2; }
.status-meter { height: 6px; border-radius: 999px; background: var(--sunk); overflow: hidden; }
.status-meter i { display: block; height: 100%; background: var(--ok); border-radius: inherit; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.tabs button { border: 0; background: none; padding: 10px 14px; cursor: pointer; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tabs .n { font-family: var(--f-mono); font-size: .75rem; color: var(--muted); margin-left: 4px; }
.msg-list { display: grid; }
.msg { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.msg:last-child { border-bottom: 0; }
.msg:hover .ttl { text-decoration: underline; text-underline-offset: 3px; }
.msg .ttl { font-family: var(--f-display); font-size: 1.18rem; line-height: 1.3; }
.msg .meta { color: var(--muted); font-size: .88rem; }
.stamp { width: 60px; height: 60px; border-radius: 50%; border: 1.5px dashed var(--seal); color: var(--seal); display: grid; place-items: center; text-align: center; font: 500 .53rem/1.25 var(--f-mono); letter-spacing: .05em; text-transform: uppercase; flex: none; }
.stamp.date { border-color: var(--accent); color: var(--accent); }
.stamp.draft { border-color: var(--muted); color: var(--muted); }
@media (max-width: 560px) { .msg { grid-template-columns: auto minmax(0, 1fr); } .msg .chip { grid-column: 2; justify-self: start; } }
.upnext { display: grid; gap: 12px; }
.upnext div { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: center; }
.cal { border: 1px solid var(--line); border-radius: 8px; text-align: center; overflow: hidden; background: var(--bg); }
.cal b { display: block; background: var(--accent); color: var(--accent-ink); font: 600 .62rem/1.8 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.cal span { display: block; font-family: var(--f-display); font-size: 1.4rem; line-height: 1.5; }

/* composer */
.composer { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
@media (max-width: 960px) { .composer { grid-template-columns: 1fr; } }
.form-sections { display: grid; gap: 18px; counter-reset: sec; }
.section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(18px, 2.6vw, 28px); display: grid; gap: 18px; scroll-margin-top: 16px; }
.section > header { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; counter-increment: sec; }
.section > header::before { content: counter(sec); grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--ink); display: grid; place-items: center; font: 500 .8rem var(--f-mono); }
.section > header h2 { font-size: 1.5rem; }
.section > header p { color: var(--muted); font-size: .94rem; }
.section[hidden] { display: none; }
textarea.letter-input { min-height: 320px; resize: vertical; font-family: var(--f-display); font-size: 1.15rem; line-height: 1.7; padding: 18px 20px; background: var(--surface); }
.counter { font: .78rem var(--f-mono); color: var(--muted); text-align: right; }
.attach { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.attach label { border: 1px dashed var(--line); border-radius: 8px; padding: 8px 14px; cursor: pointer; color: var(--muted); font-size: .9rem; }
.attach label:hover { border-color: var(--muted); color: var(--ink); }
.attach input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.picker { display: grid; gap: 8px; }
.pick { display: grid; grid-template-columns: auto 34px minmax(0, 1fr); gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; background: var(--bg); cursor: pointer; }
.pick input { width: 18px; height: 18px; accent-color: var(--accent); }
.pick:has(input:checked) { border-color: var(--accent); background: var(--surface); }
.pick .who { min-width: 0; }
.pick .who b { font-weight: 600; }
.pick .who div { font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.inset { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: grid; gap: 14px; }
.aside { position: sticky; top: 16px; display: grid; gap: 14px; }
@media (max-width: 960px) { .aside { position: static; } }
.mini-env { position: relative; aspect-ratio: 1.6; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.mini-env::before { content: ""; position: absolute; inset: 0 0 42% 0; background: linear-gradient(to bottom right, transparent 49.6%, var(--line) 50%, transparent 50.4%), linear-gradient(to bottom left, transparent 49.6%, var(--line) 50%, transparent 50.4%); }
.mini-env .wax { position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); width: 46px; height: 46px; font-size: 1.05rem; }
.mini-env .postmark { position: absolute; right: 6%; top: 8%; width: 70px; height: 70px; font-size: .5rem; }
.mini-env .addr { position: absolute; left: 8%; right: 8%; bottom: 9%; font-family: var(--f-display); font-style: italic; font-size: 1rem; line-height: 1.3; }
.mini-env .addr small { display: block; font: 500 .6rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-style: normal; }
.facts { display: grid; gap: 0; font-size: .9rem; margin: 0; }
.facts div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; }
.problems { display: grid; gap: 6px; font-size: .88rem; color: var(--warn); margin: 0; padding-left: 1.1em; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 10px; font-weight: 500; z-index: 40; max-width: calc(100% - 32px); }

/* people + safety */
.people { display: grid; }
.person { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.person:last-child { border-bottom: 0; }
.person .who b { font-weight: 600; }
.person .who .ways-to { font-size: .86rem; color: var(--muted); overflow-wrap: anywhere; }
.person .avatar { width: 40px; height: 40px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.channel-list { display: grid; gap: 10px; }
.channel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: var(--bg); }
.channel input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
.channel .who div { font-size: .85rem; color: var(--muted); }

/* public check-in + recipient pages */
.center-page { padding-block: clamp(40px, 8vw, 96px); }
.center-page .wrap { max-width: 640px; display: grid; gap: 22px; }
.confirm { text-align: center; display: grid; gap: 14px; justify-items: center; }
.tick { width: 64px; height: 64px; border-radius: 50%; background: color-mix(in srgb, var(--ok) 14%, var(--surface)); display: grid; place-items: center; color: var(--ok); }
.letter-page { padding: clamp(28px, 6vw, 60px) clamp(22px, 6vw, 60px); font-family: var(--f-display); font-size: 1.18rem; line-height: 1.78; display: grid; gap: 1em; }
.letter-page .sig { font-style: italic; }
.letter-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font: .78rem var(--f-mono); color: var(--muted); letter-spacing: .04em; border-top: 1px solid var(--line); padding-top: 14px; }
@media (prefers-reduced-motion: no-preference) { .reveal { animation: rise .6s ease-out; } @keyframes rise { from { transform: translateY(10px); opacity: .3; } } }

.site-footer .made-by { margin-top: 10px; font-size: .85rem; color: var(--muted); }
.site-footer .made-by a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Public preview (mainnet before launch): scripts/stage-site.sh adds this banner to each public page. */
.preview-banner { background: var(--seal); color: var(--seal-ink); text-align: center; font-size: .92rem; line-height: 1.4; padding: 9px max(16px, env(safe-area-inset-left, 0px)); }
.preview-banner b { font-weight: 600; }
