/* Archivida */
:root {
  --ground: #F8F6EF; --surface: #FFFFFF; --ink: #1B2B24; --ink-2: #2B3A33; --muted: #4D5A52; --line: #E3E1D6; --line-2: #BFC4B6;
  --accent: #24453A; --accent-ink: #183028; --accent-soft: #E6EDE6; --accent-on: #FFFFFF; --on-accent-muted: #CFDCCF;
  --gold: #A88038; --amber: #7E5E22; --amber-soft: #F6EEDC; --amber-line: #E5D6B5; --paper: #FFFDF7;
  --danger: #A12C2C; --danger-soft: #FBE9E7; --chip: #EFEEE6;
  --radius: 14px; --radius-lg: 18px; --shadow: 0 1px 2px rgba(27,43,36,.05);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --hand: 'Caveat', cursive;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.55; }
a { color: var(--accent); }
a:hover { color: var(--accent-ink); }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 4vw, 42px); }
h2 { font-family: var(--display); font-weight: 700; font-size: 22px; }
h3 { font-size: 18px; font-weight: 600; line-height: 1.3; }
p { margin: 0; }
.icon { flex-shrink: 0; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid #7FA48E; outline-offset: 2px; }

/* Header */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1200px; margin: 0 auto; padding: 10px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 600; font-size: 26px; text-decoration: none; letter-spacing: -.01em; line-height: 1; }
.brand img { width: 40px; height: 40px; border-radius: 8px; }
.brand .w1 { color: #1B3A2E; } .brand .w2 { color: var(--gold); }
.nav { display: flex; flex-wrap: wrap; gap: 2px; }
.nav a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px; text-decoration: none; font-weight: 500; color: #3E4A43; }
.nav a:hover { background: var(--chip); color: var(--ink); }
.nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.top-tools { display: flex; align-items: center; gap: 8px; }
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; color: var(--ink); }
.bell:hover { background: var(--chip); }
.bell .dot { position: absolute; top: 6px; right: 5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--amber); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; border-radius: 50%; display: block; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: 52px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; min-width: 210px; z-index: 20; box-shadow: 0 8px 24px rgba(30,42,38,.12); }
.menu-panel a, .menu-panel button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); background: none; border: 0; font: inherit; cursor: pointer; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--chip); }

/* Layout */
.wrap { max-width: 1200px; margin: 0 auto; padding: 36px 24px 72px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 40px 24px 72px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 28px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row-between { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.cols { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.main-col { flex: 999 1 560px; min-width: 0; }
.side-col { flex: 1 1 300px; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; }
.page-head p { color: var(--muted); font-size: 17px; margin-top: 6px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }
.center { text-align: center; }
.mt { margin-top: 16px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); }
.card-tight { padding: 18px 20px; border-radius: var(--radius); }
.card h2 + p, .card h3 + p { margin-top: 4px; }
.card-accent { background: var(--accent); color: var(--accent-on); border: 0; }
.card-accent .eyebrow { color: var(--on-accent-muted); }
.card-accent p { color: #E4F0EC; }
.card-accent a:not(.btn) { color: #fff; }
.card-paper { background: var(--paper); border-color: var(--amber-line); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.eyebrow-amber { color: var(--amber); }
.divider { border: 0; border-top: 1px solid #EAE8DF; margin: 4px 0; }
.empty { padding: 28px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--muted); color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn-light { background: #fff; color: var(--accent); border-color: #fff; }
.btn-light:hover { color: var(--accent-ink); background: #F2F5EF; }
.btn-ghost-light { background: transparent; color: #fff; border-color: var(--on-accent-muted); }
.btn-ghost-light:hover { color: #fff; background: rgba(255,255,255,.08); }
.btn-text { border: 0; background: none; padding: 0 8px; color: var(--accent); }
.btn-text:hover { text-decoration: underline; color: var(--accent-ink); }
.btn-danger { color: var(--danger); border-color: #E3B7B2; }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-block { width: 100%; }
.btn-lg { min-height: 52px; font-size: 16px; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 9px; }
.linklike { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }

/* Chips & badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--chip); color: #3E4A43; white-space: nowrap; }
.badge-teal { background: var(--accent-soft); color: var(--accent); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-green { background: #E2F0E4; color: #22562E; }
.badge-red { background: var(--danger-soft); color: var(--danger); }
.chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; }
.chip small { color: var(--muted); font-size: 13px; }
.pill { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 14px; }
.pill.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* Avatars & people */
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 600; flex-shrink: 0; object-fit: cover; line-height: 1; }
.person-row { display: flex; align-items: center; gap: 12px; }
.person-row .meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.person-row .name { font-weight: 600; }
.person-row .sub { font-size: 14px; color: var(--muted); }
.person-link, .mention { color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 4px; }
.mention { background: var(--accent-soft); border-radius: 6px; padding: 0 4px; }

/* Forms */
label { font-weight: 600; font-size: 15px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field .hint { font-weight: 400; font-size: 14px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=search], input[type=url], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; font: inherit; font-size: 16px; color: var(--ink); background: #fff;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
textarea.tall { min-height: 260px; font-size: 17px; }
input.title-input { font-family: var(--display); font-weight: 700; font-size: 28px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 4px 0; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 3px solid rgba(36,69,58,.18); outline-offset: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.choice-card { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 2px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; font-weight: 400; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card strong { font-weight: 600; font-size: 16px; }
.choice-card span { font-size: 14px; color: var(--muted); }
.choice-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice-card:has(input:focus-visible) { outline: 3px solid #7FA48E; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; font-size: 15px; margin-bottom: 8px; padding: 0; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Flash */
.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-weight: 500; }
.flash-ok { background: var(--accent-soft); color: var(--accent); }
.flash-error { background: var(--danger-soft); color: var(--danger); }
.flash-info { background: var(--amber-soft); color: var(--amber); }

/* Entries */
.entry { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.entry-body { font-size: 17px; line-height: 1.75; color: var(--ink-2); display: flex; flex-direction: column; gap: 14px; overflow-wrap: anywhere; }
.entry-body.lg { font-size: 18px; line-height: 1.8; }
.entry-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid #EAE8DF; padding-top: 10px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.media-photo img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; display: block; background: var(--line); }
.media-single .media-photo img { aspect-ratio: auto; max-height: 520px; object-fit: contain; }
.media-audio { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--accent-soft); color: var(--accent); border-radius: 12px; }
.media-audio audio { flex: 1; min-width: 0; height: 40px; }
.media-video { width: 100%; max-height: 480px; border-radius: 12px; background: #000; }
.transcript summary { cursor: pointer; font-size: 14px; color: var(--muted); }
.side-story { background: var(--paper); border: 1px solid var(--amber-line); }
.quote { font-size: 16px; line-height: 1.6; }
.hand { font-family: var(--hand); font-size: 26px; line-height: 1.3; color: var(--ink-2); }

/* Progress */
.bar { height: 8px; border-radius: 4px; background: #E7E6DD; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.steps { display: flex; gap: 6px; }
.steps span { width: 40px; height: 6px; border-radius: 3px; background: #CFD3C6; }
.steps span.on { background: var(--accent); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; border-left: 3px solid #CFD3C6; display: flex; flex-direction: column; gap: 16px; }
.timeline li { position: relative; }
.timeline li::before { content: ''; position: absolute; left: -38px; top: 22px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid var(--ground); }
.timeline .year-mark { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--muted); margin-top: 8px; }
.timeline li.year::before { display: none; }

/* Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }

/* Tables (admin) */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid #EAE8DF; vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: #FBFAF5; }
tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Admin */
.admin-shell { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.admin-nav { flex: 1 1 200px; max-width: 240px; display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.admin-nav a { padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 500; }
.admin-nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.admin-main { flex: 999 1 600px; min-width: 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat b { display: block; font-family: var(--display); font-size: 30px; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 14px; }
.count-pill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* Landing */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); }
.hero-inner { max-width: 1200px; margin: 0 auto; padding: 64px 24px; display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.04; letter-spacing: -.02em; }
.hero .lead { font-size: 20px; color: var(--muted); max-width: 560px; margin-top: 16px; }
.hero-logo { flex: 1 1 320px; max-width: 440px; display: flex; flex-direction: column; gap: 16px; }
.hero-logo img { width: 100%; height: auto; border-radius: 24px; display: block; }
.letter-demo { flex: 1 1 340px; background: var(--paper); border: 1px solid var(--amber-line); border-radius: 20px; padding: 28px; transform: rotate(-1deg); }
.feature h3 { margin-bottom: 6px; }
.footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 24px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; color: var(--muted); font-size: 14px; }
.footer a { color: var(--muted); }

/* Recorder */
.recorder { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.recorder .rec-status { font-size: 14px; color: var(--muted); }
.recorder.recording .rec-btn { background: var(--danger); border-color: var(--danger); color: #fff; }
.recorder audio { height: 40px; max-width: 100%; }

/* Mention autocomplete */
.mention-box { position: relative; }
.mention-menu { position: absolute; z-index: 30; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; width: 340px; max-width: calc(100vw - 48px); box-shadow: 0 10px 28px rgba(30,42,38,.14); }
.mention-menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 10px; border: 0; border-radius: 9px; background: none; font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.mention-menu button.active, .mention-menu button:hover { background: var(--accent-soft); }
.mention-menu .sub { font-size: 13px; color: var(--muted); display: block; }

@media (max-width: 640px) {
  .wrap, .wrap-narrow { padding: 24px 16px 56px; }
  .topbar-inner { padding: 8px 16px; }
  .card { padding: 18px; }
  .entry { padding: 18px; }
  .nav a { padding: 0 10px; }
  .hero-inner { padding: 40px 16px; }
}
@media print { .topbar, .footer, .no-print { display: none !important; } body { background: #fff; } }

/* Photo picker (photos sent to you) */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pick { position: relative; display: block; cursor: pointer; border-radius: 12px; overflow: hidden; outline: 3px solid transparent; outline-offset: -3px; transition: outline-color .15s, opacity .15s; }
.pick img, .pick video { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--line); }
.pick input { position: absolute; top: 10px; left: 10px; width: 22px; height: 22px; accent-color: var(--accent); z-index: 1; }
.pick:has(input:checked) { outline-color: var(--accent); }
.pick:has(input:not(:checked)) img, .pick:has(input:not(:checked)) video { opacity: .55; }
.pick-dl { position: absolute; right: 8px; bottom: 8px; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--ink); display: flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 700; }

/* Story preview cards: photo thumbnail beside the text when there is one */
.story-prev { display: flex; gap: 16px; align-items: flex-start; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.story-prev:hover { border-color: var(--accent); }
.story-text { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; min-width: 0; }
.story-text strong { font-size: 17px; }
.story-text .quote.small { font-size: 15px; color: var(--ink-2); }
.story-side { flex: none; align-self: center; }
.story-cover { position: relative; flex: none; width: 132px; height: 132px; border-radius: 12px; overflow: hidden; background: var(--line); }
.story-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.story-prev:hover .story-cover img { transform: scale(1.04); }
.story-count { position: absolute; right: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 999px; background: rgba(27,43,36,.78); color: #fff; font-size: 12px; font-weight: 600; }
@media (max-width: 560px) { .story-cover { width: 88px; height: 88px; } .story-prev { gap: 12px; } }

/* Ads */
.ad { --ad-color: var(--accent); display: block; position: relative; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
a.ad:hover { border-color: var(--ad-color); }
.ad-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ad-text { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.ad-headline { font-family: var(--display); font-size: 19px; line-height: 1.25; color: var(--ink); }
.ad-body { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.ad-cta { align-self: flex-start; margin-top: 4px; padding: 8px 14px; border-radius: 10px; background: var(--ad-color); color: #fff; font-size: 14px; font-weight: 600; }
.ad-img img { display: block; width: 100%; aspect-ratio: 1200/630; object-fit: cover; }
.ad-house:not(.has-img) { border-left: 5px solid var(--ad-color); }
.ad-feed.ad-house.has-img { display: flex; }
.ad-feed.ad-house.has-img .ad-img { flex: 0 0 38%; }
.ad-feed.ad-house.has-img .ad-img img { height: 100%; aspect-ratio: auto; }
.ad-code { padding: 12px 14px 14px; }
.ad-code-inner { margin-top: 6px; overflow: hidden; }
@media (max-width: 560px) { .ad-feed.ad-house.has-img { display: block; } }

/* Home profile card */
.me-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 0 20px 18px; margin-top: 62px; text-align: center; }
.me-photo { position: relative; display: block; width: 128px; height: 128px; margin: -64px auto 0; border-radius: 50%; border: 5px solid var(--surface); box-shadow: 0 6px 18px rgba(27,43,36,.18); background: var(--surface); text-decoration: none; }
.me-photo .avatar { width: 118px !important; height: 118px !important; font-size: 40px !important; }
.me-photo-add { position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; }
.me-name { font-family: var(--display); font-size: 23px; font-weight: 700; margin-top: 10px; line-height: 1.2; }
.me-sub { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.me-sub a, .me-all { color: var(--accent); font-weight: 600; text-decoration: none; }
.me-actions { display: flex; gap: 8px; align-items: center; margin-top: 14px; }
.me-actions .btn-primary { flex: 1; justify-content: center; }
.me-icon { position: relative; width: 44px; height: 44px; border-radius: 12px !important; border: 1px solid var(--line-2); display: inline-flex !important; align-items: center; justify-content: center; color: var(--ink); background: var(--surface); cursor: pointer; flex: none; }
.me-icon:hover { background: var(--chip); }
.me-icon .dot, .top-avatar .dot { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--amber); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid var(--surface); }
.top-avatar { position: relative; }
.me-menu .menu-panel { text-align: left; }
.me-progress { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); text-align: left; }
.me-progress .row-between { font-size: 14px; }
.seg { display: flex; gap: 3px; margin-top: 8px; }
.seg span { height: 8px; border-radius: 4px; background: #E7E6DD; overflow: hidden; position: relative; }
.seg span i { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 4px; }
.me-chapters > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 13.5px; cursor: pointer; }
.me-chapters > summary::-webkit-details-marker { display: none; }
.me-chapters[open] .me-all { color: var(--muted); }
.me-phone { display: none; }
@media (max-width: 940px) { .me-phone { display: block; } .me-desktop { display: none; } }

/* Family tree */
.tree-wrap { margin-bottom: 28px; padding: 18px 0 8px; }
.tree-head { padding: 0 20px 6px; }
.tree-key i { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--line-2); vertical-align: middle; margin: 0 3px 0 8px; }
.tree-key i.k-dash { border-top-style: dashed; }
.tree-scroll { overflow-x: auto; padding: 8px 0 12px; }
.tree { position: relative; min-width: max-content; padding: 0 28px; margin: 0 auto; }
.tree-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.tree-row { position: relative; display: flex; justify-content: center; gap: 26px; padding: 30px 0 4px; }
.tree-row-name { position: absolute; left: 0; top: 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tree-node { position: relative; z-index: 1; width: 128px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 9px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); text-align: center; transition: border-color .15s, transform .15s; }
.tree-node:hover { border-color: var(--accent); transform: translateY(-2px); }
.tree-node.is-root { border: 2px solid var(--accent); box-shadow: 0 4px 14px rgba(36,69,58,.15); }
.tree-node.is-gone { background: var(--paper, #FBF8EF); }
.tree-node.is-gone .avatar { filter: grayscale(.5); }
.tn-name { font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.tn-sub { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 3px; flex-wrap: wrap; justify-content: center; }
@media (max-width: 640px) { .tree-node { width: 108px; } .tree-row { gap: 10px; } }

/* Wishes forms */
.wish-rows { display: flex; flex-direction: column; gap: 6px; }
.wish-row { display: grid; grid-template-columns: 1.4fr 1fr 40px; gap: 6px; align-items: center; }
.row-remove { width: 40px; height: 40px; border: 0; background: none; color: var(--muted); font-size: 22px; line-height: 1; border-radius: 10px; cursor: pointer; }
.row-remove:hover { background: var(--chip); color: var(--danger); }
.add-row { align-self: flex-start; margin-top: 8px; }
.field .label { font-weight: 600; font-size: 15px; }
.sticky-save { position: sticky; bottom: 0; background: var(--ground); padding: 12px 0; z-index: 5; }

/* Printable documents */
.doc-wrap { max-width: 820px; margin: 0 auto; padding: 28px 20px 80px; position: relative; }
.doc { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 56px 64px 64px; font-family: Georgia, 'Times New Roman', serif; color: #1a1a1a; position: relative; z-index: 1; box-shadow: 0 4px 24px rgba(27,43,36,.06); }
.doc-disclaimer { border: 1.5px solid #7E5E22; background: #FBF6EA; padding: 12px 14px; font-family: Inter, Arial, sans-serif; font-size: 12.5px; line-height: 1.5; margin-bottom: 26px; }
.doc-flag { border-left: 4px solid #8A2E2E; background: #FBEFEF; padding: 8px 12px; font-family: Inter, Arial, sans-serif; font-size: 13px; margin-bottom: 12px; }
.doc-title { font-family: Georgia, serif; text-align: center; font-size: 30px; letter-spacing: .04em; text-transform: uppercase; font-weight: 700; margin: 8px 0 4px; }
.doc-of { text-align: center; font-size: 18px; font-style: italic; margin: 0; }
.doc-meta { text-align: center; font-size: 12.5px; color: #555; margin: 6px 0 26px; font-family: Inter, Arial, sans-serif; }
.doc-section { margin: 22px 0; page-break-inside: avoid; }
.doc-section h2 { font-family: Georgia, serif; font-size: 18px; border-bottom: 1px solid #ccc; padding-bottom: 4px; margin-bottom: 10px; }
.doc-num { color: #7E5E22; }
.doc-item { margin: 8px 0 12px; }
.doc-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #666; font-family: Inter, Arial, sans-serif; }
.doc-val { font-size: 16px; line-height: 1.55; }
.doc-table { border-collapse: collapse; width: 100%; } .doc-table td { border-bottom: 1px solid #e3e3e3; padding: 6px 8px 6px 0; vertical-align: top; }
.doc-sigs { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; margin-top: 34px; font-size: 12px; color: #555; font-family: Inter, Arial, sans-serif; }
.doc-line { display: block; border-bottom: 1px solid #333; height: 28px; margin-bottom: 4px; }
.doc-footer { margin-top: 18px; font-size: 11px; color: #666; text-align: center; font-family: Inter, Arial, sans-serif; }
.doc-watermark { display: none; }
@media print {
  @page { margin: 18mm 16mm 22mm; }
  .doc-wrap { padding: 0; max-width: none; }
  .doc { border: 0; box-shadow: none; padding: 0; background: transparent; }
  .doc-footer { display: none; }
  .doc-watermark { display: block; position: fixed; top: 44%; left: 0; right: 0; text-align: center; white-space: nowrap; transform: rotate(-30deg); font: 700 58px Georgia, serif; color: rgba(126,94,34,.09); letter-spacing: .08em; z-index: -1; }
  main { padding: 0; }
}
@media (max-width: 640px) { .doc { padding: 28px 20px 36px; } .doc-title { font-size: 23px; } .wish-row { grid-template-columns: 1fr 40px; } .wish-row input:first-child { grid-column: 1; } .wish-row input:nth-child(2) { grid-column: 1; } .wish-row .row-remove { grid-column: 2; grid-row: 1 / span 2; } .wish-row { padding-bottom: 8px; border-bottom: 1px solid var(--line); } }

/* Attorney */
.attorney-card { display: flex; gap: 16px; align-items: flex-start; cursor: pointer; }
.attorney-card input[type=radio] { margin-top: 6px; }
.attorney-photo { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; flex: none; font-size: 26px; }
.msg { background: var(--chip); border-radius: 12px; padding: 8px 12px; font-size: 14.5px; max-width: 92%; }
.msg-me { background: var(--accent-soft); margin-left: auto; }
.stat-grid .card { display: flex; flex-direction: column; gap: 4px; } .stat-grid strong { font-size: 26px; font-family: var(--display); }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }

/* Public predictions */
.pred-card { display: flex; flex-direction: column; gap: 10px; }
.pred-text { font-family: var(--display); font-size: 21px; font-weight: 600; line-height: 1.35; margin: 0; }
.pred-text a { color: var(--ink); text-decoration: none; } .pred-text a:hover { color: var(--accent); }
.pred-card.is-sealed { background: var(--paper, #FBF8EF); }
.share-edit > summary { cursor: pointer; list-style: none; } .share-edit > summary::-webkit-details-marker { display: none; }
.share-later { padding-left: 12px; border-left: 3px solid var(--line); margin-top: 8px; }

/* "Find it" media search and chips */
.media-picker { display: flex; flex-direction: column; gap: 6px; }
.mp-box { position: relative; }
.mp-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; list-style: none; margin: 0; padding: 6px; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 10px 28px rgba(27,43,36,.16); max-height: 360px; overflow-y: auto; color: var(--ink); }
.mp-list li { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.mp-list li.on, .mp-list li[data-i]:hover { background: var(--chip); }
.mp-list li img, .mp-list .mc-ph { width: 38px; height: 54px; object-fit: cover; border-radius: 4px; background: var(--line); flex: none; }
.mp-list li strong { display: block; font-size: 15px; } .mp-list li small { color: var(--muted); font-size: 13px; }
.mp-list .mp-msg { color: var(--muted); font-size: 14px; cursor: default; }
.media-chip { display: inline-flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; max-width: 100%; align-self: flex-start; }
a.media-chip:hover { border-color: var(--accent); }
.media-chip img, .media-chip .mc-ph { width: 48px; height: 68px; object-fit: cover; border-radius: 6px; background: var(--line); flex: none; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.media-chip.type-song img, .media-chip.type-song .mc-ph { height: 48px; }
.mc-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .mc-text strong { font-size: 16px; line-height: 1.25; } .mc-text > span { font-size: 13px; color: var(--muted); }
.mc-text .mc-src { font-size: 11px; }
.mp-clear { border: 0; background: none; font-size: 20px; color: var(--muted); cursor: pointer; margin-left: 4px; }
.ctx-chip { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 10px; }
.entry-card .media-chip, .entry .media-chip { margin: 6px 0 2px; }
.media-chips, .mp-chosen { display: flex; flex-wrap: wrap; gap: 8px; }
.mp-chosen:empty { display: none; }
.mp-list li.mp-typed .mc-ph { width: 38px; height: 38px; font-size: 20px; font-weight: 700; color: var(--accent); display: flex; align-items: center; justify-content: center; }
.mp-input:disabled { background: var(--chip); }
.mp-star { border: 0; background: none; padding: 2px; cursor: pointer; color: var(--line-2); flex: none; line-height: 0; }
.mp-star svg { fill: none; stroke: currentColor; stroke-width: 2; }
.mp-star:hover { color: var(--gold, #A88038); }
.mp-star.on { color: var(--gold, #A88038); } .mp-star.on svg { fill: currentColor; }
.media-chip.is-fav { border-color: var(--gold, #A88038); box-shadow: 0 0 0 1px var(--gold, #A88038) inset; }
.mc-fav { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--amber); }
.mc-fav svg { fill: currentColor; }

/* Email preferences */
.pref-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.pref-row input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.pref-row.is-locked { cursor: default; background: var(--chip); }
.pref-master { padding: 6px 0; }

/* ---------- The Archivist ---------- */
.arch-av { border-radius: 50%; object-fit: cover; flex: none; display: block; background: var(--amber-soft); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.arch-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--amber-line); background: var(--amber-soft); border-radius: 999px; padding: 4px 14px 4px 4px; font-size: 14px; font-weight: 600; color: var(--amber); text-decoration: none; position: relative; white-space: nowrap; }
.arch-pill:hover, .arch-pill.on { border-color: var(--gold); }
.arch-dot { width: 9px; height: 9px; border-radius: 50%; background: #B5842F; display: inline-block; box-shadow: 0 0 0 2px var(--amber-soft); }
@media (max-width: 760px) { .arch-pill { padding: 3px; } .arch-pill-label { display: none; } .arch-dot { position: absolute; top: 0; right: 0; } }
.arch-note { position: relative; display: flex; gap: 14px; align-items: flex-start; background: var(--amber-soft); border: 1px solid var(--amber-line); border-radius: 16px; padding: 16px 44px 16px 18px; }
.arch-note p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.arch-who { display: block; font-size: 13px; font-weight: 600; color: var(--amber); margin-bottom: 4px; }
.arch-acts { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 10px; font-size: 14px; }
.arch-acts a { color: var(--accent); font-weight: 600; }
.arch-acts .muted-link { color: var(--muted); font-weight: 500; }
.arch-acts form { margin: 0; }
.arch-x-form { position: absolute; top: 8px; right: 8px; margin: 0; }
.arch-x { background: none; border: 0; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.arch-x:hover { background: rgba(0,0,0,.05); }
.flash-archivist { display: flex; gap: 12px; align-items: center; background: var(--amber-soft); border: 1px solid var(--amber-line); color: var(--ink-2); font-weight: 400; }
.flash-archivist strong { display: block; font-size: 13px; color: var(--amber); }
.arch-say { display: flex; gap: 12px; align-items: center; }
.arch-say p { margin: 0; font-size: 16.5px; line-height: 1.5; color: var(--ink-2); }
.arch-say-lg { align-items: center; gap: 18px; }
/* introduction */
.arch-welcome { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: 0 10px 30px rgba(27,43,36,.08); }
.arch-hero { position: relative; height: 340px; background-size: cover; background-position: center 22%; }
.arch-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,26,22,.82) 0%, rgba(20,26,22,.55) 38%, rgba(20,26,22,0) 70%); }
.arch-hero-text { position: absolute; z-index: 1; left: 44px; top: 50%; transform: translateY(-50%); color: #fff; max-width: 440px; }
.arch-hero-text small { display: block; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #E5D6B5; margin-bottom: 10px; }
.arch-hero-text h1 { font-size: 46px; line-height: 1.05; margin: 0; color: #fff; }
.arch-hero-text .rule { width: 90px; height: 2px; background: var(--gold); margin: 16px 0; }
.arch-hero-text p { margin: 0; color: #EDE9DD; font-size: 16px; line-height: 1.6; }
.arch-letter { max-width: 660px; margin: -48px auto 0; position: relative; z-index: 2; background: var(--paper); border: 1px solid var(--amber-line); border-radius: 6px; padding: 34px 40px 30px; box-shadow: 0 12px 30px rgba(27,43,36,.14); font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.arch-letter p { margin: 0 0 14px; }
.arch-sig { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.arch-sig .arch-av { border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.arch-sig .hand { font-family: var(--hand); font-size: 30px; line-height: 1; color: var(--accent); }
.arch-honest { display: flex; gap: 10px; align-items: flex-start; background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.5; margin-top: 20px; color: var(--ink-2); }
.arch-honest svg { flex: none; margin-top: 2px; color: var(--accent); }
.arch-welcome-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; padding: 26px 20px 34px; }
@media (max-width: 700px) {
  .arch-hero { height: 300px; background-position: 68% 20%; }
  .arch-hero::after { background: linear-gradient(180deg, rgba(20,26,22,.35) 0%, rgba(20,26,22,.85) 75%); }
  .arch-hero-text { left: 22px; right: 22px; top: auto; bottom: 64px; transform: none; }
  .arch-hero-text h1 { font-size: 36px; }
  .arch-letter { margin: -36px 12px 0; padding: 24px 22px; }
}
/* filed card, follow-ups */
.cat-card { background: #FFFDF4; border: 1px solid var(--amber-line); border-radius: 4px; padding: 10px 14px 12px; background-image: repeating-linear-gradient(transparent 0 25px, #EFE4C9 25px 26px); background-position: 0 33px; font-size: 13.5px; color: var(--ink-2); }
.cat-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0 12px; align-items: baseline; min-height: 23px; }
.cat-no { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--amber); }
.cat-date { color: var(--muted); font-size: 12.5px; }
.cat-line { font-family: var(--hand); font-size: 21px; line-height: 26px; color: var(--accent); }
.cat-also, .cat-also a { color: var(--amber); }
.arch-fu { border-left: 3px solid var(--amber-line); padding: 2px 0 2px 16px; display: flex; flex-direction: column; gap: 8px; }
.arch-fu-q { display: flex; gap: 10px; align-items: center; font-family: var(--display); font-style: italic; font-size: 17px; color: var(--ink); }
.arch-ask { position: relative; display: flex; gap: 12px; align-items: flex-start; border-top: 1px dashed var(--line-2); padding: 16px 36px 0 0; }
.arch-ask p { margin: 0; line-height: 1.5; }
.arch-ask .arch-x-form { top: 10px; right: 0; }
.arch-ask-form > summary { list-style: none; display: inline-flex; }
.arch-ask-form > summary::-webkit-details-marker { display: none; }
.arch-ask-form[open] > summary { display: none; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; }
.faq p { margin: 10px 0 0; color: var(--ink-2); line-height: 1.6; }

/* ---------- Front page ---------- */
html { scroll-behavior: smooth; }
.lp [id] { scroll-margin-top: 16px; }
.lp-nav a { min-height: 40px; font-size: 15px; }
@media (max-width: 960px) { .lp-nav { display: none; } }
.lp-wrap { max-width: 1200px; margin: 0 auto; padding: 56px 24px; }
.lp h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.12; }
.lp h3 { font-size: 17px; font-family: var(--font); font-weight: 600; }
.lp-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--amber); margin: 0 0 10px; display: flex; align-items: center; gap: 6px; }
.lp-eyebrow-dark { color: var(--ink-2); }
.lp-icon { width: 60px; height: 60px; border-radius: 50%; background: var(--amber-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.lp-icon-sm { width: 34px; height: 34px; }
/* hero */
.lp-hero { position: relative; min-height: 520px; display: flex; align-items: center; overflow: hidden; background: linear-gradient(180deg, #F7F1E4, var(--ground)); border-bottom: 1px solid var(--line); }
.lp-hero-photo { position: absolute; inset: 0 0 0 38%; background-size: cover; background-position: 40% 30%; }
.lp-hero-photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #F7F1E4 0%, rgba(247,241,228,.75) 14%, rgba(247,241,228,0) 38%); }
.lp-note { position: absolute; right: 4%; top: 9%; max-width: 210px; margin: 0; font-family: var(--hand); font-size: 30px; line-height: 1.15; color: var(--ink-2); transform: rotate(-6deg); text-shadow: 0 0 18px rgba(255,248,232,.9), 0 0 4px rgba(255,248,232,.9); }
.lp-note svg { vertical-align: -3px; }
.lp-hero-text { position: relative; z-index: 1; max-width: 1200px; width: 100%; margin: 0 auto; padding: 56px 24px; }
.lp-hero-text > * { max-width: 540px; }
.lp-hero-text h1 { font-size: clamp(40px, 5.6vw, 66px); line-height: 1.02; letter-spacing: -.01em; margin-bottom: 18px; }
.lp-swash { position: relative; white-space: nowrap; }
.lp-swash::after { content: ""; position: absolute; left: 2%; right: 4%; bottom: -6px; height: 10px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'%3E%3Cpath d='M2 7 C 50 2, 120 1, 198 5' fill='none' stroke='%23A88038' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%; }
.lp-lead { font-size: 18.5px; line-height: 1.6; color: var(--ink-2); margin: 0 0 24px; }
.lp-join { display: flex; flex-wrap: wrap; gap: 10px; max-width: 520px; margin-bottom: 10px; }
.lp-join input { flex: 1 1 230px; min-height: 52px; }
.lp .btn svg { margin-left: 2px; }
@media (max-width: 860px) {
  .lp-hero { display: block; min-height: 0; }
  .lp-hero-photo { position: relative; inset: auto; height: 300px; background-position: 45% 35%; }
  .lp-hero-photo::before { background: linear-gradient(180deg, rgba(247,241,228,0) 60%, #F7F1E4 100%); }
  .lp-note { font-size: 24px; top: 8%; right: 4%; max-width: 160px; }
}
@media (max-width: 560px) {
  .lp-note { display: none; }
  .lp-hero-text { padding: 8px 16px 40px; }
}
/* features */
.lp-features { max-width: 1200px; margin: 0 auto; padding: 44px 24px 48px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px; text-align: center; }
.lp-feature { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lp-feature p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.lp-feature a { white-space: nowrap; font-size: 14px; font-weight: 600; color: var(--accent); display: inline-flex; gap: 4px; align-items: center; }
@media (max-width: 960px) { .lp-features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .lp-features { grid-template-columns: 1fr; text-align: left; } .lp-feature { display: grid; grid-template-columns: 60px 1fr; column-gap: 14px; align-items: start; } .lp-feature .lp-icon { grid-row: span 3; } }
/* letter + tree */
.lp-band-light { background: #F3EEE2; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lp-two { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.lp-letter { margin: 0; background: var(--paper); border: 1px solid var(--amber-line); border-radius: 6px; padding: 26px 28px; box-shadow: 0 10px 28px rgba(27,43,36,.10); transform: rotate(-1.2deg); }
.lp-letter .hand { font-size: 27px; line-height: 1.35; margin: 4px 0 12px; }
.lp-tree { display: flex; gap: 24px; align-items: center; }
.lp-tree .btn { align-self: flex-start; }
.lp-tree img { width: 246px; height: auto; flex: none; }
@media (max-width: 960px) { .lp-two { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .lp-tree { flex-direction: column; align-items: flex-start; } .lp-tree img { width: 200px; align-self: center; } }
/* archivist */
.lp-archivist { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 4fr) minmax(0, 4fr); gap: 36px; align-items: center; }
.lp-arch-intro p { line-height: 1.6; }
.lp-honest { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--accent); background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; }
.lp-honest svg { flex: none; margin-top: 2px; }
.lp-arch-figure { display: flex; flex-direction: column; align-items: center; gap: 16px; position: relative; }
.lp-arch-photo { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; border: 6px solid #fff; box-shadow: 0 10px 30px rgba(27,43,36,.18); }
.lp-bubble { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; font-family: var(--display); font-style: italic; font-size: 16.5px; line-height: 1.4; color: var(--ink); box-shadow: var(--shadow); max-width: 300px; text-align: center; }
.lp-bubble::before { content: ""; position: absolute; top: -8px; left: 50%; width: 14px; height: 14px; background: #fff; border-left: 1px solid var(--line); border-top: 1px solid var(--line); transform: translateX(-50%) rotate(45deg); }
.lp-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14.5px; }
.lp-checks li { display: flex; gap: 8px; align-items: center; }
.lp-checks svg { background: var(--accent); color: #fff; border-radius: 50%; padding: 3px; width: 20px; height: 20px; flex: none; }
.lp-examples { display: flex; flex-direction: column; gap: 4px; }
.lp-example { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
@media (max-width: 1000px) { .lp-archivist { grid-template-columns: 1fr 1fr; } .lp-arch-intro { grid-column: 1 / -1; } }
@media (max-width: 640px) { .lp-archivist { grid-template-columns: 1fr; } }
/* how */
.lp-how { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 36px; align-items: center; border-top: 1px solid var(--line); }
.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lp-step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px 20px 22px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lp-step p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.lp-step-n { position: absolute; top: -14px; left: 18px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
@media (max-width: 960px) { .lp-how { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .lp-steps { grid-template-columns: 1fr; gap: 24px; } }
/* privacy band */
.lp-privacy { background-size: cover; background-position: center; color: #fff; }
.lp-privacy-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 36px; align-items: center; padding-top: 52px; padding-bottom: 52px; }
.lp-privacy .lp-eyebrow { color: #E5C88A; }
.lp-privacy h2 { color: #fff; }
.lp-privacy ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.lp-privacy li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; color: #E7E3D8; }
.lp-privacy li svg { color: #E5C88A; flex: none; }
.lp-privacy li strong { display: block; color: #fff; margin-bottom: 2px; }
@media (max-width: 960px) { .lp-privacy-in { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .lp-privacy ul { grid-template-columns: 1fr; } }
/* faq + final */
.lp-faq { max-width: 860px; display: flex; flex-direction: column; gap: 12px; }
.lp-faq h2 { margin-bottom: 8px; }
.lp-final { position: relative; overflow: hidden; text-align: center; padding: 64px 24px 72px; border-top: 1px solid var(--line); background: #F7F3EA; }
.lp-final > * { position: relative; z-index: 1; }
.lp-final .lp-eyebrow { justify-content: center; }
.lp-final h2 { margin-bottom: 8px; }
.lp-final-cta { display: flex; justify-content: center; margin-top: 20px; }
.lp-final-cta .lp-join { justify-content: center; }
.lp-leaf { position: absolute !important; z-index: 0 !important; bottom: 0; }
.lp-leaf-l { left: 0; }
.lp-leaf-r { right: 0; }
@media (max-width: 700px) { .lp-leaf { width: 90px; height: auto; opacity: .5; } }
/* Moment photos and the inline add form */
.moment-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-width: 520px; }
.moment-photos .media-photo { position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--chip); }
.moment-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.moment-photos .more { position: absolute; inset: 0; background: rgba(20,26,22,.55); color: #fff; font-weight: 700; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.moment-inline { animation: arch-in .2s ease-out; }
@keyframes arch-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
[hidden] { display: none !important; }
/* Request an invite */
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.lp-request { display: flex; flex-direction: column; gap: 12px; max-width: 560px; margin-bottom: 10px; }
.lp-request-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.lp-request-how { grid-column: 1 / -1; }
.lp-request .field label { font-size: 14px; }
.lp-request .btn { align-self: flex-start; }
.lp-invite-note { display: flex; gap: 8px; align-items: flex-start; font-size: 14.5px; color: var(--ink-2); background: var(--amber-soft); border: 1px solid var(--amber-line); border-radius: 10px; padding: 10px 12px; max-width: 560px; margin: 0 0 14px; }
.lp-invite-note svg { flex: none; margin-top: 2px; color: var(--amber); }
.lp-final .lp-request { margin: 0 auto; text-align: left; }
.lp-final .lp-request .btn { align-self: center; }
@media (max-width: 560px) { .lp-request-fields { grid-template-columns: 1fr; } .lp-request .btn { align-self: stretch; justify-content: center; } }
/* Phones: logo and your tools share the top row, the page links go underneath,
   and the menu opens under the header across the screen instead of off the edge. */
.topbar-inner { position: relative; }
.menu-panel { max-width: calc(100vw - 24px); }
@media (max-width: 900px) {
  .topbar-inner > .brand { order: 1; }
  .topbar-inner > .top-tools { order: 2; margin-left: auto; }
  .topbar-inner > .nav { order: 3; width: 100%; }
  .top-tools .menu { position: static; }
  .top-tools .menu-panel { left: 12px; right: 12px; top: calc(100% - 4px); min-width: 0; max-height: calc(100vh - 120px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
}
@media (max-width: 420px) { .brand { font-size: 22px; } .brand img { width: 34px; height: 34px; } }
/* Phones: the Admin menu becomes one swipeable row instead of a full screen of links */
@media (max-width: 760px) {
  .admin-shell { gap: 18px; }
  .admin-nav { flex: 1 1 100%; max-width: none; flex-direction: row; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 6px; gap: 4px; }
  .admin-nav::-webkit-scrollbar { display: none; }
  .admin-nav a { white-space: nowrap; flex: none; padding: 8px 12px; font-size: 15px; }
}
/* Edit buttons on your own story cards */
.story-prev-wrap { position: relative; }
.story-prev-wrap > .story-prev { padding-right: 76px; }
.story-edit { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; text-decoration: none; }
.story-edit:hover { border-color: var(--accent); }
.moment-photo-pick { display: flex; flex-direction: column; gap: 4px; }
.comment .share-edit summary, .arch-fu .share-edit summary { list-style: none; cursor: pointer; }
