/* Layout concept: left-aligned, one job per screen; accent follows the liturgical season. */
:root {
  --f-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --f-body: 'Atkinson Hyperlegible', 'Segoe UI', system-ui, sans-serif;
  /* season accents: light and dark pair, overridden per season */
  --acc-l: #1F6B47; --acc-d: #84D4A9;
  --soft-l: #DCEBE1; --soft-d: #1E3A2B;
  --onacc-l: #FFFFFF; --onacc-d: #0B1A12;
  /* neutrals, light */
  --bg: #F1F5F0; --surface: #FFFFFF; --surface-2: #E6EDE6;
  --ink: #16231C; --ink-2: #44554B; --line: #C9D5CB; --line-strong: #76887D;
  --focus: #0B57D0; --danger: #A12B2B; --warn-bg: #FBF0D6; --warn-ink: #5E4300;
  --side-k: #1F6F78; --side-d: #A5541F;
  --good: #1F6B47; --pin-home: #1F6B47; --pin-home-ink: #FFFFFF;   /* "good" news (paid, is owed, saved) and the home pin: a fixed green, so it never looks like --danger in any palette */
  --accent: var(--acc-l); --accent-soft: var(--soft-l); --on-accent: var(--onacc-l);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(22, 35, 28, .08), 0 6px 20px rgba(22, 35, 28, .06);
}
:root[data-season="advent"] { --acc-l: #5B3A8C; --acc-d: #C9ADF2; --soft-l: #E8E0F2; --soft-d: #33254D; --onacc-d: #170D29; }
:root[data-season="christmas"] { --acc-l: #7A5800; --acc-d: #EBC96B; --soft-l: #F4EBCB; --soft-d: #3F3414; --onacc-d: #231A00; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1612; --surface: #16211B; --surface-2: #1E2B24; --ink: #E7EEE8; --ink-2: #A8B8AD;
    --line: #2D3D33; --line-strong: #62776A; --focus: #8AB4F8; --danger: #F08A8A; --warn-bg: #3A2F10; --warn-ink: #F3DDA0;
    --side-k: #6CC3CC; --side-d: #E69C66;
    --good: #84D4A9; --pin-home: #84D4A9; --pin-home-ink: #0B1A12;
    --accent: var(--acc-d); --accent-soft: var(--soft-d); --on-accent: var(--onacc-d); color-scheme: dark;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .3);
  }
}
:root[data-theme="dark"] {
  --bg: #0E1612; --surface: #16211B; --surface-2: #1E2B24; --ink: #E7EEE8; --ink-2: #A8B8AD;
  --line: #2D3D33; --line-strong: #62776A; --focus: #8AB4F8; --danger: #F08A8A; --warn-bg: #3A2F10; --warn-ink: #F3DDA0;
  --side-k: #6CC3CC; --side-d: #E69C66;
  --good: #84D4A9; --pin-home: #84D4A9; --pin-home-ink: #0B1A12;
  --accent: var(--acc-d); --accent-soft: var(--soft-d); --on-accent: var(--onacc-d); color-scheme: dark;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; }   /* 18px at the browser's usual 16px; a larger browser or phone setting grows it */
html.is-app, html.is-app body { height: 100%; overflow: hidden; }
html.is-app #root { height: 100%; }   /* standalone pages need this; the claude.ai frame used to size it */
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 1rem; line-height: 1.55;   /* 1rem: the 18/21/24 px text size reaches every line (an old 14px body rule at the top of the file kept plain text at 14px whatever the setting) */
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
html.is-app body { padding-left: 0; padding-right: 0; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 6.4vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.55rem, 4vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); }
:root { --muted: var(--ink-2); }   /* several screens use --muted; it follows the theme like .muted */
.muted { color: var(--ink-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a.sr:focus { position: fixed; top: .6rem; left: .6rem; width: auto; height: auto; overflow: visible; clip: auto; z-index: 1000; background: var(--surface, #fff); color: var(--ink); padding: .7rem 1.1rem; border-radius: 10px; box-shadow: 0 4px 18px rgba(0,0,0,.25); }
.navlinks a { display: inline-flex; align-items: center; min-height: 44px; padding-block: .2rem; }
.faith h3 a, .pubpage h3 a, .section h3 a { display: inline-flex; align-items: center; min-height: 44px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3.1rem; padding: .6rem 1.3rem;
  border: 2px solid var(--accent); border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font: 700 1rem/1.2 var(--f-body); cursor: pointer; text-decoration: none; text-align: center;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.quiet { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn.sm { min-height: 2.75rem; padding: .35rem 1rem; font-size: .95rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* test banner */
.testbar { background: var(--warn-bg); color: var(--warn-ink); font-size: .9rem; padding: .45rem 1rem; text-align: left; }
.testbar b { font-weight: 700; }

/* public site */
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; }
.topbar { display: flex; align-items: center; gap: 1rem; padding-block: 1rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; min-height: 44px; gap: .6rem; font: 700 1.35rem var(--f-display); color: var(--ink); text-decoration: none; }
.brand svg { width: 2rem; height: 2rem; color: var(--accent); }
.brand-name { display: inline-flex; flex-direction: column; line-height: 1.02; }
.brand-name small { font: 700 .5em/1.2 var(--f-body, inherit); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.topnav { display: flex; gap: .25rem 1.25rem; margin-left: auto; align-items: center; flex-wrap: wrap; }
.topnav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 700; padding: .5rem .25rem; min-height: 44px; display: inline-flex; align-items: center; }
.topnav a:not(.btn):hover { color: var(--accent); text-decoration: underline; }
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 2.5rem; align-items: center; padding-block: 2.5rem 3.5rem; }
.hero .lede { font-size: 1.2rem; color: var(--ink-2); margin-top: 1.1rem; max-width: 34rem; }
.hero .cta { display: flex; flex-wrap: wrap; gap: .75rem 1rem; margin-top: 1.6rem; align-items: center; }
.assure { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin-top: 1.2rem; font-size: .95rem; color: var(--ink-2); list-style: none; padding: 0; }
.assure li::before, .assure span::before { content: ''; display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--accent); margin-right: .45rem; }
.phone { justify-self: center; width: min(100%, 360px); aspect-ratio: 9 / 15; border: 3px solid var(--ink); border-radius: 34px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.phone-head { padding: .7rem 1rem; font: 700 1rem var(--f-display); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.phone-head small { font: 400 .8rem var(--f-body); color: var(--ink-2); }
.phone .tree-host { flex: 1; min-height: 0; position: relative; }
.phone-foot { display: flex; justify-content: space-around; padding: .55rem; border-top: 1px solid var(--line); font-size: .72rem; color: var(--ink-2); }
.phone-foot b { color: var(--accent); }
.section { padding-block: 3.5rem; border-top: 1px solid var(--line); }
.section > .eyebrow { margin-bottom: .6rem; }
.section h2 { max-width: 30rem; }
.promise-list { display: grid; gap: 1.25rem; margin-top: 2rem; grid-template-columns: repeat(3, 1fr); }
.promise-list li { list-style: none; padding-top: 1rem; border-top: 3px solid var(--accent); }
.promise-list { padding: 0; margin-bottom: 0; }
.promise-list h3 { margin-bottom: .4rem; }
.steps { display: grid; gap: 1.5rem; margin-top: 2rem; grid-template-columns: repeat(3, 1fr); counter-reset: s; padding: 0; }
.steps li { list-style: none; counter-increment: s; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--accent-soft); color: var(--ink); font: 700 1.1rem var(--f-display); margin-bottom: .7rem; }
.faith { display: grid; gap: 1rem 2rem; grid-template-columns: repeat(2, 1fr); margin-top: 2rem; }
.faith div { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.faith h3 { font-size: 1.1rem; margin-bottom: .25rem; }
.plans { display: grid; gap: 1.25rem; grid-template-columns: repeat(2, 1fr); margin-top: 2rem; max-width: 46rem; }
.plan { border: 2px solid var(--line-strong); border-radius: var(--radius); padding: 1.4rem; background: var(--surface); }
.plan.pro { border-color: var(--accent); }
.plan .price { font: 700 2rem var(--f-display); margin: .4rem 0 .8rem; }
.plan .price small { font: 400 .95rem var(--f-body); color: var(--ink-2); }
.plan ul { padding-left: 1.1rem; margin: 0; display: grid; gap: .35rem; }
.shopstrip { display: grid; gap: 2rem; grid-template-columns: 1fr 1fr; align-items: start; margin-top: 1.5rem; }
.goods { display: grid; gap: .75rem; grid-template-columns: 1fr 1fr; padding: 0; margin: 0; }
.goods li { list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .9rem; font-size: .95rem; }
.goods b { display: block; font-family: var(--f-display); margin-bottom: .15rem; }
.footer { padding-block: 2rem 3rem; border-top: 1px solid var(--line); font-size: .92rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }

/* auth screens */
.auth { max-width: 30rem; margin: 0 auto; padding-block: 2rem 4rem; }
.auth h1 { font-size: clamp(1.9rem, 6vw, 2.6rem); margin: 1.2rem 0 .8rem; }
.field { display: grid; gap: .4rem; margin: 1.2rem 0; }
.field label { font-weight: 700; }
input[type="text"], input[type="email"], textarea, select {
  font: 1rem var(--f-body); color: var(--ink); background: var(--surface); border: 2px solid var(--line-strong); border-radius: 12px; padding: .8rem 1rem; min-height: 3.1rem; width: 100%;
}
textarea { min-height: 8rem; resize: vertical; }
.note { background: var(--surface-2); border-radius: 12px; padding: .9rem 1rem; font-size: .95rem; color: var(--ink-2); }
.memseg { margin-top: .5rem; max-width: 22rem; }
.memrow { align-items: start; }

@media (max-width: 860px) {
  .hero, .shopstrip { grid-template-columns: 1fr; }
  .promise-list, .steps, .faith, .plans { grid-template-columns: 1fr; }
  .topnav { margin-left: 0; width: 100%; }
}
@media (max-width: 600px) {
  /* phones: the section links are on this same page, so keep just Log in and Sign up beside the name */
  .topnav a:not(.btn) { display: none; }
  .topnav { width: auto; margin-left: auto; gap: .5rem; }
}
@media (max-width: 480px) { .goods { grid-template-columns: 1fr; } }

.msg { min-height: 1.4rem; font-size: .95rem; margin: 0; }
.msg .bad { color: var(--danger); font-weight: 700; }
.msg .good { color: var(--good); font-weight: 700; }
.linkbtn { background: none; border: 0; padding: 0 .2rem; min-height: 2.75rem; color: var(--accent); font: 700 1rem var(--f-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }

/* ---------- app shell ---------- */
.app { height: 100%; display: flex; flex-direction: column; background: var(--bg); }
.app-head { display: flex; align-items: center; gap: 13px; padding: 10px max(16px, env(safe-area-inset-left, 0px)) 10px max(16px, env(safe-area-inset-right, 0px)); border-bottom: 1px solid var(--line); background: var(--surface); order: 0; }
.app-head .brand { font-size: 1.2rem; min-height: 44px; min-width: 0; }
.app-head .brand-name { white-space: nowrap; }
@media (max-width: 374px) { .app-head { gap: 8px; padding-left: 12px; padding-right: 12px; } .app-head .findbtn .ft { display: none; } .app-head .findbtn { padding: 0 11px; } }
.app-head .brand svg { width: 1.7rem; height: 1.7rem; }
.season { margin-left: auto; font-size: .82rem; font-weight: 700; background: var(--accent-soft); color: var(--ink); padding: .3rem .8rem; border-radius: 999px; }
.me { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 2px solid var(--accent); background: var(--surface); color: var(--ink); font: 700 .95rem var(--f-display); cursor: pointer; }
.screen { flex: 1; min-height: 0; overflow-y: auto; order: 2; -webkit-overflow-scrolling: touch; }
.tabs { order: 3; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.tab { text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; min-height: 4.3rem; border: 0; background: transparent; color: var(--ink-2); font: 700 .82rem var(--f-body); cursor: pointer; border-top: 4px solid transparent; }
.tab svg { width: 1.6rem; height: 1.6rem; }
.tab[aria-current="page"] { color: var(--accent); border-top-color: var(--accent); }
.page { max-width: 46rem; margin: 0 auto; padding: 1.2rem max(1rem, env(safe-area-inset-left, 0px)) 2.5rem; display: grid; gap: 1.8rem; }
.page h1 { font-size: 1.9rem; }
.sec h2 { font-size: 1.3rem; margin-bottom: .6rem; }
.hrow { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.hrow h2 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.help { width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 700 .95rem var(--f-body); cursor: pointer; flex: none; }
.tip { background: var(--ink); color: var(--bg); padding: .7rem .9rem; border-radius: 12px; font-size: .95rem; margin: 0 0 .8rem; }
@media (min-width: 900px) {
  .tabs { order: 1; display: flex; justify-content: flex-start; gap: .25rem; padding: 0 1rem; border-top: 0; border-bottom: 1px solid var(--line); }
  .tab { flex-direction: row; min-height: 3.4rem; padding: 0 1.2rem; gap: .5rem; border-top: 0; border-bottom: 4px solid transparent; font-size: 1rem; }
  .tab[aria-current="page"] { border-bottom-color: var(--accent); }
}

/* lists */
.attn { background: var(--accent-soft); border-radius: var(--radius); padding: 1.1rem 1.2rem; display: grid; gap: .6rem; }
.attn h2 { font-size: 1.25rem; margin: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 3.6rem 1fr auto; gap: .9rem; align-items: center; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.row.plain { grid-template-columns: 1fr auto; }
.row .t { font-weight: 700; }
.row .s { color: var(--ink-2); font-size: .95rem; }
.datebox { text-align: center; line-height: 1; font-family: var(--f-display); }
.datebox small { display: block; font: 700 .72rem var(--f-body); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin-bottom: .2rem; }
.datebox b { font-size: 1.7rem; }
.chip { display: inline-block; font-size: .78rem; font-weight: 700; padding: .1rem .6rem; border-radius: 999px; border: 1.5px solid var(--line-strong); color: var(--ink-2); vertical-align: middle; margin-left: .35rem; }
.chip.feast { border-color: var(--accent); color: var(--accent); }
.seg { display: flex; border: 2px solid var(--line-strong); border-radius: 999px; overflow: hidden; background: var(--surface); }
.seg button { flex: 1; min-height: 2.8rem; border: 0; background: transparent; color: var(--ink); font: 700 1rem var(--f-body); cursor: pointer; padding: 0 .8rem; }
.seg button[aria-pressed="true"], .seg button.on { background: var(--accent); color: var(--on-accent); }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .8rem; }
.pill { min-height: 2.6rem; padding: 0 1rem; border-radius: 999px; border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 700 .92rem var(--f-body); cursor: pointer; }
.pill[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* meal train and food slots */
.slot { display: grid; grid-template-columns: 4.2rem 1fr auto; gap: .8rem; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.slot .claimform { grid-column: 1 / -1; display: grid; gap: .6rem; padding-bottom: .4rem; }
.slot .btns { display: flex; gap: .5rem; flex-wrap: wrap; }
.open-tag { font-weight: 700; color: var(--accent); }
.facts { display: grid; gap: .3rem; background: var(--surface-2); border-radius: 12px; padding: .9rem 1rem; font-size: .95rem; margin: .6rem 0 1rem; }
.prayer { display: grid; grid-template-columns: 1fr auto; gap: .8rem; align-items: center; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.feed li { padding: .7rem 0; border-bottom: 1px solid var(--line); }

/* memories */
.story h3 { margin-bottom: .2rem; }
.story .body { margin-top: .6rem; display: grid; gap: .6rem; max-width: 38rem; }
.photo { aspect-ratio: 16 / 9; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-2); font-size: .9rem; margin-top: .7rem; border: 1px dashed var(--line-strong); }
.recipe { border: 2px solid var(--line-strong); border-radius: var(--radius); padding: 1.1rem; background: var(--surface); display: grid; gap: .8rem; }
.scan { border-radius: 10px; padding: .8rem 1rem; background: repeating-linear-gradient(to bottom, var(--surface-2) 0 1.7rem, var(--line) 1.7rem calc(1.7rem + 1px)); font-size: .98rem; line-height: 1.7rem; }
.scan .src { font-size: .78rem; color: var(--ink-2); }
.btnrow { display: flex; flex-wrap: wrap; gap: .6rem; }
.btnrow + .btnrow { margin-top: .8rem; }   /* two rows of buttons never touch (Plan a gathering: "Add more details" sat on "Plan it") */

/* menu */
.setting { display: grid; grid-template-columns: 1fr auto; gap: .8rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.setting .s { color: var(--ink-2); font-size: .93rem; }
.switch { appearance: none; -webkit-appearance: none; width: 4.2rem; height: 2.5rem; border-radius: 999px; background: var(--line-strong); position: relative; cursor: pointer; border: 0; transition: background .15s; flex: none; }
.switch::after { content: ''; position: absolute; top: .22rem; left: .22rem; width: 2.06rem; height: 2.06rem; border-radius: 50%; background: var(--surface); transition: transform .15s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(1.7rem); }
.codebox { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.code { font: 700 1.3rem ui-monospace, Menlo, Consolas, monospace; letter-spacing: .06em; background: var(--surface-2); padding: .5rem .9rem; border-radius: 10px; }
.strangers { border: 2px dashed var(--line-strong); border-radius: 12px; padding: .9rem 1rem; margin-top: .6rem; }
.danger { color: var(--danger); border-color: var(--danger); }

/* ---------- tree screen ---------- */
.treescreen { flex: 1; min-height: 0; display: flex; flex-direction: column; order: 2; position: relative; }
.treebar { display: flex; flex-wrap: wrap; gap: .5rem; padding: .6rem max(.8rem, env(safe-area-inset-left, 0px)); background: var(--surface); border-bottom: 1px solid var(--line); align-items: center; }
.treebar select { flex: 1 1 100%; min-height: 2.8rem; padding: .4rem .8rem; }
.treebar .btn { flex: 1 1 auto; padding-inline: .5rem; font-size: .85rem; min-height: 2.75rem; white-space: nowrap; }
@media (min-width: 700px) { .treebar select { flex: 1 1 14rem; } }
.canvas { position: relative; flex: 1; min-height: 0; background: var(--bg); overflow: hidden; }
.tree-host { position: absolute; inset: 0; }
.tree-svg { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.tree-svg.grab { cursor: grabbing; }
.tree-svg:focus-visible { outline-offset: -4px; }
.hint { position: absolute; top: .7rem; left: .7rem; background: var(--ink); color: var(--bg); font-size: .85rem; padding: .35rem .8rem; border-radius: 999px; pointer-events: none; transition: opacity .4s; }
.hint.gone { opacity: 0; }
.zoomctl { position: absolute; right: .8rem; bottom: .8rem; display: grid; gap: .5rem; }
.zoomctl button { width: 3.3rem; height: 3.3rem; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 700 1.6rem/1 var(--f-body); cursor: pointer; box-shadow: var(--shadow); }
.minimap { position: absolute; left: .8rem; bottom: .8rem; width: 9.5rem; height: 6.4rem; background: var(--surface); border: 2px solid var(--line-strong); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); touch-action: none; }
.mini-svg { width: 100%; height: 100%; display: block; }
.mini-p { fill: var(--line-strong); stroke: none; }
.mini-p.ph { fill: var(--line); }
.mini-view { fill: var(--accent); fill-opacity: .12; stroke: var(--accent); stroke-width: 14; }
.legend { position: absolute; left: .8rem; bottom: 7.6rem; display: flex; gap: .8rem; font-size: .78rem; color: var(--ink); background: var(--surface); padding: .2rem .6rem; border-radius: 999px; border: 1px solid var(--line); }
.legend i { display: inline-block; width: .7rem; height: .7rem; border-radius: 3px; margin-right: .3rem; vertical-align: -1px; }

/* tree drawing */
.edge { stroke: var(--line-strong); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.edge.union { stroke: var(--ink-2); stroke-width: 5.5; }
.edge.union.divorced { stroke-dasharray: 9 8; stroke-width: 4.5; }
.edge.step { stroke: var(--ink-2); stroke-dasharray: 4 8; stroke-width: 4.5; }
.edge.placeholder { stroke-dasharray: 3 7; }
.ring { fill: var(--bg); stroke: var(--ink-2); stroke-width: 4; }
.ring.divorced { stroke-dasharray: 3 3; }
.edge-label { fill: var(--ink-2); font: 400 13px var(--f-body); }
.bridge rect { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2; }
.bridge text { fill: var(--ink); font: 700 13px var(--f-body); }
.person { cursor: pointer; outline: none; }
.person .card { fill: var(--surface); stroke: var(--line-strong); stroke-width: 2; }
.person:hover .card { stroke: var(--accent); }
.person:focus-visible .card { stroke: var(--focus); stroke-width: 4; }
.person.sel .card { stroke: var(--accent); stroke-width: 4; }
.person.gone .card { fill: var(--surface-2); }
.person.ph .card { stroke-dasharray: 6 6; fill: transparent; }
.stripe.K { fill: var(--side-k); } .stripe.D { fill: var(--side-d); }
.avatar { fill: var(--accent-soft); stroke: none; }
.person.ph .t-name { font-size: 15px; }
.person.ph .avatar { fill: transparent; stroke: var(--line-strong); stroke-width: 2; stroke-dasharray: 3 4; }
.ini { fill: var(--ink); font: 700 15px var(--f-display); }
.t-name { fill: var(--ink); font: 700 18px var(--f-display); }
.t-years { fill: var(--ink-2); font: 400 14px var(--f-body); }
.t-tags { fill: var(--ink-2); font: 700 11.5px var(--f-body); letter-spacing: .02em; }
.cross path { stroke: var(--ink-2); stroke-width: 2.4; stroke-linecap: round; fill: none; }
.tree-svg[data-detail="1"] .d2, .tree-svg[data-detail="1"] .d3, .tree-svg[data-detail="2"] .d3 { display: none; }

/* sheet: bottom on phones, side panel on wide screens */
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 62%; overflow-y: auto; background: var(--surface); border-top-left-radius: 22px; border-top-right-radius: 22px; box-shadow: 0 -6px 30px rgba(0, 0, 0, .22); padding: 1.1rem 1.2rem 1.6rem; z-index: 6; transform: translateY(105%); visibility: hidden; transition: transform .25s, visibility .25s; }
.sheet.open { transform: none; visibility: visible; }
.sheet .close { position: absolute; top: .6rem; right: .7rem; }
.sheet > h2 { font-size: 1.6rem; }
.sheet > .eyebrow, .sheet > h2 { padding-right: 6.5rem; }
.sheet dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: .9rem 0; }
.sheet dt { color: var(--ink-2); }
.sheet dd { margin: 0; }
.sheet ul.sacs { margin: .3rem 0 .9rem; padding-left: 1.1rem; }
@media (min-width: 900px) {
  .sheet { left: auto; top: 0; width: 25rem; max-height: none; border-radius: 0; transform: translateX(105%); box-shadow: -6px 0 30px rgba(0, 0, 0, .18); }
}
.answer { font: 700 1.45rem/1.25 var(--f-display); margin: 1rem 0 .4rem; }
.relgrid { display: grid; gap: .9rem; margin-top: 1rem; }

/* dialog + toast */
.modal { position: fixed; inset: 0; background: rgba(8, 14, 10, .6); display: grid; place-items: center; padding: 1rem; z-index: 50; }
.dialog { background: var(--surface); border-radius: 18px; padding: 1.4rem; max-width: 34rem; width: 100%; max-height: 90%; overflow-y: auto; display: grid; gap: .9rem; }
.dialog ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .4rem; }
.toast { position: fixed; left: 50%; bottom: 6rem; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: .75rem 1.2rem; border-radius: 999px; font-weight: 700; z-index: 60; max-width: calc(100% - 2rem); text-align: center; }
@media (min-width: 900px) { .toast { bottom: 2rem; } }
@media (prefers-reduced-motion: reduce) { .sheet, .switch, .switch::after, .hint { transition: none; } }

.row > div, .slot > div { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) {
  .row { grid-template-columns: 3.6rem 1fr; }
  .row > .chip { grid-column: 2; justify-self: start; margin-left: 0; }
  .slot:not([style]) { grid-template-columns: 3.6rem 1fr; }
  .slot:not([style]) > .btn { grid-column: 2; justify-self: start; }
}

/* app chrome keeps fixed pixel sizes so enlarged text never crowds out the tree */
.app .testbar { font-size: min(.78rem, 16px); padding: .35rem 1rem; line-height: 1.35; }
.app-head .brand { font-size: min(1.1rem, 20px); }   /* capped: at Larger text the name ran into the season dot */
.app-head .brand svg { width: 26px; height: 26px; }
.season { font-size: min(.72rem, 15px); white-space: nowrap; }
.me { width: 44px; height: 44px; font-size: min(.83rem, 17px); flex: none; }
.tab { font-size: min(.78rem, 14px); min-height: 66px; }   /* capped: at Larger text "Calendar" and "Memories" ran together on a phone */
.tab svg { width: 26px; height: 26px; }
.treebar { gap: 8px; padding-block: 8px; }
.treebar select { min-height: 44px; font-size: .9rem; padding: 4px 12px; }
.treebar .btn { min-height: 44px; font-size: .83rem; padding-inline: 8px; }
.minimap { width: 150px; height: 100px; }
.zoomctl button { width: 52px; height: 52px; font-size: 1.45rem; }
.legend { font-size: .72rem; bottom: 120px; }
.hint { font-size: .78rem; }
@media (min-width: 900px) { .tab { font-size: .9rem; min-height: 54px; } }

.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr)); gap: 2px; background: var(--line-strong); border-radius: 18px; }
.seg button { background: var(--surface); }
.seg button[aria-pressed="true"], .seg button.on { background: var(--accent); }

.seg { gap: 0; background: var(--surface); overflow: hidden; }
.seg button { box-shadow: inset 0 0 0 1px var(--line-strong); }
.seg button[aria-pressed="true"], .seg button.on { box-shadow: none; }

/* ---------- smoothness: instant feedback, short ease-out motion ---------- */
html { scroll-behavior: smooth; }
html.is-app { scroll-behavior: auto; }
a, button, select, input, textarea, label { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.btn { transition: background-color .12s, filter .12s, transform .08s; }
.btn:active, .pill:active, .seg button:active, .help:active, .zoomctl button:active { transform: scale(.97); }
.tab { transition: color .15s, border-color .15s, background-color .12s; }
.tab:active { background: var(--accent-soft); }
.pill, .seg button { transition: background-color .12s, color .12s, transform .08s; }
.screen.enter { animation: rise .2s cubic-bezier(.2, .8, .2, 1); }
.treescreen.enter { animation: fade .18s ease-out; }
.tip:not([hidden]) { animation: fade .16s ease-out; }
.slot.flash { animation: flash 1.1s ease-out; }
.modal { animation: fade .16s ease-out; }
.dialog { animation: pop .2s cubic-bezier(.2, .8, .2, 1); }
.sheet { transition: transform .24s cubic-bezier(.2, .8, .2, 1), visibility .24s; }
.toast { opacity: 0; transform: translate(-50%, 8px); pointer-events: none; transition: opacity .18s ease-out, transform .18s ease-out; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.phone .tree-host { opacity: 0; transition: opacity .25s ease-out; }
.phone .tree-host.ready { opacity: 1; }
.section { content-visibility: auto; contain-intrinsic-size: auto 520px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes flash { 0% { background: var(--accent-soft); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- accessibility polish ---------- */
.screen { scroll-padding-block: 1rem 6rem; }
.help { width: 44px; height: 44px; }
.toast { display: flex; align-items: center; gap: .9rem; border-radius: 16px; text-align: left; }
.toast.has-action.show { pointer-events: auto; }
.toast-undo { background: transparent; border: 2px solid currentColor; color: inherit; border-radius: 999px; min-height: 44px; padding: 0 1rem; font: 700 1rem var(--f-body); cursor: pointer; }
.empty { padding: 1rem 0; display: grid; gap: .6rem; justify-items: start; list-style: none; color: var(--ink-2); }
.sheet .linkbtn { min-height: 2.5rem; }
@media (forced-colors: active) {
  .btn, .pill, .seg button, .tab, .help, .zoomctl button { border: 2px solid ButtonText; }
  .person .card { stroke: CanvasText; } .edge, .ring { stroke: CanvasText; }
}
.sheet { transition: transform .24s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .24s; }
.sheet.open { transition: transform .24s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
/* toast: size to content, centered without translateX so it never squeezes into half the width */
.toast { left: 0; right: 0; margin-inline: auto; width: max-content; max-width: calc(100% - 32px); transform: translateY(8px); }
.toast.show { transform: translateY(0); }
.toast .toast-undo { flex: none; }

/* ---------- compare two people: the line on the tree ---------- */
.route-halo { stroke: var(--surface); stroke-width: 16px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.route-line { stroke: var(--accent); stroke-width: 7px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tree-svg.routing .person:not(.onroute) { opacity: .38; }
.tree-svg.routing .edges { opacity: .4; }
.person.onroute .card { stroke: var(--accent); stroke-width: 4; }
.person.onroute.end .card { fill: var(--accent-soft); }
.badge rect { fill: var(--accent); }
.badge text { fill: var(--on-accent); font: 700 13px var(--f-body); }
.mini-p.route { fill: var(--accent); }
.cmpbar { position: absolute; top: 8px; left: 8px; right: 8px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--ink); color: var(--bg); padding: 6px 8px 6px 14px; border-radius: 16px; font-size: .83rem; font-weight: 700; box-shadow: var(--shadow); }
.cmpbar:focus-visible { outline-offset: 2px; }
.cmpbar > span { flex: 1 1 11rem; padding-block: 4px; }
.cmpbar .warn { color: var(--bg); text-decoration: underline wavy; text-underline-offset: 4px; }
.cmpbar .btn { font-size: .83rem; }
.canvas.picking .tree-svg { cursor: crosshair; }
.canvas.picking .person:hover .card { stroke: var(--accent); stroke-width: 5; }
.btn.quiet[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.routenote { margin-top: .5rem; display: flex; gap: .6rem; align-items: baseline; font-size: .95rem; }
.routenote .swatch { flex: none; width: 1.6rem; height: 6px; border-radius: 3px; background: var(--accent); transform: translateY(-3px); }
.sheet details.stepsbox { margin-top: .8rem; border-top: 1px solid var(--line); padding-top: .2rem; }
.sheet details.stepsbox > summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.hops { margin: .2rem 0 .4rem; padding-left: 1.3rem; display: grid; gap: .35rem; }
.hops li::marker { color: var(--accent); font-weight: 700; }

/* ---------- Family words ---------- */
.words { max-width: 46rem; }
.words-tools { display: grid; gap: .7rem; }
.seg.seg3 { grid-template-columns: repeat(3, 1fr); }
#gm-frame { display: block; width: 100%; height: min(60vh, 26rem); border: 2px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
.gmlist { list-style: none; padding: 0; }
.words-tools .filters { margin: 0; }
input[type="search"] { font: 1rem var(--f-body); color: var(--ink); background: var(--surface); border: 2px solid var(--line-strong); border-radius: 12px; padding: .8rem 1rem; min-height: 3.1rem; width: 100%; }
.wsec { display: grid; gap: 0; }
.wsec > h2 { font-size: 1.3rem; margin: 1.2rem 0 .2rem; }
.word { padding: 1rem 0; border-bottom: 1px solid var(--line); display: grid; gap: .45rem; justify-items: start; }
.word[hidden], .wsec[hidden], .empty[hidden] { display: none; }
.word h3 { font-size: 1.2rem; }
.word .eg { background: var(--accent-soft); color: var(--ink); border-radius: 10px; padding: .55rem .8rem; font-size: .96rem; }
.word.rule { background: var(--surface); border: 2px solid var(--line-strong); border-radius: var(--radius); padding: 1rem 1.1rem; margin-top: .6rem; border-bottom-width: 2px; }

/* ---------- color schemes ---------- */
.pals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .7rem; }
.pal { display: grid; gap: .25rem; justify-items: start; text-align: left; padding: .8rem .9rem; border-radius: 14px; border: 2px solid var(--line-strong); background: var(--bg); color: var(--ink); font: 400 .9rem/1.3 var(--f-body); cursor: pointer; min-height: 44px; }
.pal:active { transform: scale(.98); }
.pal[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent); }
.pal-dots { display: flex; gap: 6px; }
.pal-dots i { width: 1.4rem; height: 1.4rem; border-radius: 50%; display: block; border: 1px solid var(--line-strong); }
.pal-dots .d1 { background: var(--accent); border-color: var(--accent); }
.pal-dots .d2 { background: var(--accent-soft); }
.pal-dots .d3 { background: var(--ink); border-color: var(--ink); }
.pal-name { font: 700 1.05rem var(--f-display); }
.pal-blurb { color: var(--ink-2); }
.pal-state { font-weight: 700; color: var(--accent); font-size: .9rem; min-height: 1.2em; }
@media (forced-colors: active) { .pal[aria-pressed="true"] { outline: 3px solid Highlight; } .route-line { stroke: Highlight; } .route-halo { stroke: Canvas; } }

/* ---------- style4: screens added for the full rough copy ---------- */
.intest { display: grid; gap: .3rem; background: var(--accent-soft); border-radius: 12px; padding: .8rem 1rem; font-size: .92rem; color: var(--ink); }
.page > div > h1 { margin-top: .2rem; }
.req { font-weight: 400; color: var(--ink-2); font-size: .85rem; }
.linklist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.linkrow { display: grid; grid-template-columns: 1fr auto; column-gap: .8rem; align-items: center; padding: .85rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); min-height: 3.2rem; }
.linkrow .lr-t { font-weight: 700; grid-column: 1; }
.linkrow .lr-s { grid-column: 1; color: var(--ink-2); font-size: .93rem; }
.linkrow .lr-go { grid-column: 2; grid-row: 1 / span 2; font-size: 1.6rem; color: var(--accent); }
.linkrow:hover .lr-t { text-decoration: underline; }
.helptop { margin-left: auto; font-size: min(1.1rem, 22px); }
.helptop + .me { margin-left: 0; }
.banner { display: grid; gap: .6rem; background: var(--accent-soft); border-radius: var(--radius); padding: 1rem; }
.quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
.qbtn { display: grid; gap: .15rem; align-content: start; padding: .9rem 1rem; border: 2px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; min-height: 4.6rem; }
.qbtn b { font-family: var(--f-display); }
.qbtn span { font-size: .88rem; color: var(--ink-2); }
.qbtn:hover { border-color: var(--accent); }
.sponsor { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 1rem; display: grid; gap: .4rem; }
.sponsor p { margin: 0; }
.codecard { border: 2px solid var(--ink); border-radius: 12px; padding: 1.1rem; background: var(--surface); display: grid; gap: .6rem; }
.codecard .cc-h { font: 700 1.3rem var(--f-display); }
.codecard p, .codecard ol { margin: 0; }
.codecard ol { padding-left: 1.3rem; display: grid; gap: .3rem; }
.codecard .s { font-size: .88rem; color: var(--ink-2); }
.qr { width: 9rem; height: 9rem; color: var(--ink); background: var(--surface); border: 2px solid var(--ink); border-radius: 8px; padding: .3rem; }
.linkbox { display: grid; gap: .6rem; }
.linkbox p { margin: 0; }
.match { display: grid; gap: .7rem; grid-template-columns: 1fr; margin-top: .7rem; }
.match > div { border: 2px solid var(--line-strong); border-radius: 12px; padding: .8rem 1rem; }
.hist.reverted { opacity: .55; }
.hist.reverted .t { text-decoration: line-through; }
.digest { border: 2px solid var(--line-strong); border-radius: 12px; padding: .8rem 1rem; }
.digest ul { margin: 0 0 .5rem; padding-left: 1.2rem; display: grid; gap: .3rem; }
.faq { border-bottom: 1px solid var(--line); padding: .3rem 0; }
.faq summary { cursor: pointer; font-weight: 700; min-height: 2.75rem; display: flex; align-items: center; }
.faq p { margin: .2rem 0 .7rem; }
.tourart { background: var(--accent-soft); border-radius: 14px; padding: .6rem; }
.tourart svg { width: 100%; height: auto; max-height: 8rem; display: block; }
.tourart .n { fill: var(--surface); stroke: var(--accent); stroke-width: 3; }
.tourart .l { stroke: var(--accent); stroke-width: 3; fill: none; stroke-linecap: round; }
.tourart .t { fill: var(--ink); font: 700 14px var(--f-body); }
.tourart .t.big { font-size: 40px; fill: var(--accent); }
.dots { display: flex; gap: .4rem; justify-content: center; }
.dots i { width: .6rem; height: .6rem; border-radius: 50%; background: var(--line-strong); }
.dots i.on { background: var(--accent); }
.warnbox { background: var(--warn-bg); color: var(--warn-ink); border-radius: 12px; padding: .9rem 1rem; margin: .6rem 0; }
.warnbox a, .warnbox .btn.quiet { color: var(--ink); }
.wsteps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; padding: 0; margin: 0; }
.wsteps li { border-bottom: 4px solid var(--line-strong); padding: .4rem 0; font-size: .88rem; color: var(--ink-2); }
.wsteps li[aria-current] { border-color: var(--accent); color: var(--ink); font-weight: 700; }
.wsteps li.done { border-color: var(--accent); }
.wsteps b { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--surface-2); margin-right: .2rem; }
.minitree { display: grid; gap: .3rem; justify-items: center; background: var(--surface-2); border-radius: 12px; padding: 1rem; }
.mt-row { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }
.mt-n { border: 2px solid var(--line-strong); background: var(--surface); border-radius: 10px; padding: .45rem .8rem; font-weight: 700; }
.mt-n.ph { border-style: dashed; color: var(--ink-2); font-weight: 400; }
.mt-n.me { border-color: var(--accent); }
.mt-line { width: 2px; height: 1.2rem; background: var(--line-strong); }
.mapbox { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); border-radius: 14px; overflow: hidden; margin: .8rem 0 .4rem; }
.mapbox svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mapbox polygon { fill: var(--surface); stroke: var(--line-strong); stroke-width: 2; }
.pin { position: absolute; transform: translate(-50%, -50%); min-width: 2.75rem; min-height: 2.75rem; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 2px solid var(--pin-home-ink); background: var(--pin-home); color: var(--pin-home-ink); font-size: 1.1rem; cursor: pointer; display: grid; place-items: center; padding: 0; box-shadow: var(--shadow); }
.pin.grave { background: var(--ink); color: var(--surface); margin: 31px 0 0 33px; }
.pin.gather { background: var(--side-d); color: var(--bg); margin: 31px 0 0 -33px; }
.pin.on { outline: 3px solid var(--focus); outline-offset: 2px; }
.mapsel { min-height: 3rem; padding: .6rem .2rem; }
.memorial { border: 2px solid var(--line-strong); border-radius: var(--radius); padding: 1.2rem; background: var(--surface); display: grid; gap: .7rem; }
.memorial h2 { margin: 0; }
.memorial dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .1rem 1rem; }
.memorial dd { margin-bottom: .4rem; overflow-wrap: anywhere; }
@media (min-width: 640px) { .memorial dl { grid-template-columns: auto 1fr; } }
.memorial dt { font-weight: 700; }
.memorial dd { margin: 0; }
.prayerq { margin: 0; padding: .8rem 1rem; border-left: 4px solid var(--accent); background: var(--surface-2); border-radius: 0 10px 10px 0; font-style: italic; }
.inlineform { border-top: 1px solid var(--line); margin-top: .6rem; padding-top: .3rem; }
.hanswer { background: var(--surface-2); border-radius: 12px; padding: .9rem 1rem; margin-top: .8rem; display: grid; gap: .5rem; }
.hanswer p { margin: 0; }
.platewrap { max-width: 24rem; border-radius: 14px; }
.platewrap svg { width: 100%; height: auto; display: block; }
.cnt { font-weight: 400; font-size: .85rem; color: var(--ink-2); float: right; }
.cnt .warn { color: var(--danger); font-weight: 700; }
.proof { border: 2px solid var(--line-strong); border-radius: 12px; padding: .8rem 1rem; display: grid; gap: .6rem; }
.proof .pl { display: grid; gap: .1rem; }
.proof .pl b { font-size: 1.25rem; overflow-wrap: anywhere; }
.sentbox { display: grid; gap: .8rem; grid-template-columns: 1fr; }
.sentbox > div { border: 2px solid var(--line-strong); border-radius: 12px; padding: .8rem 1rem; }
.sentbox ul { margin: .3rem 0 0; padding-left: 1.2rem; display: grid; gap: .25rem; }
.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.cardprev { border: 2px solid var(--ink); border-radius: 12px; padding: 1.4rem 1rem; text-align: center; max-width: 22rem; background: var(--surface); display: grid; gap: .5rem; }
.cardprev .cp-i { font-size: 2.2rem; color: var(--accent); }
.cardprev p { margin: 0; }
.cardprev .cp-s { font-weight: 700; }
.cardprev.holly { background: var(--accent-soft); }
.cardprev.plain { border-style: double; border-width: 5px; }
.sheetprev { border: 2px dashed var(--line-strong); border-radius: 12px; padding: .8rem 1rem; margin: .6rem 0; }
.meter { height: 1.1rem; border-radius: 999px; background: var(--surface-2); border: 2px solid var(--line-strong); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); }
.tiers { display: grid; gap: .8rem; grid-template-columns: 1fr; }
.tier { border: 2px solid var(--line-strong); border-radius: var(--radius); padding: 1rem; display: grid; gap: .5rem; align-content: start; background: var(--surface); }
.tier.cur { border-color: var(--accent); }
.tier h3 { margin: 0; }
.tier ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .25rem; }
.tier .price { font: 700 1.6rem var(--f-display); margin: 0; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.stats > div { background: var(--surface-2); border-radius: 12px; padding: .7rem .9rem; display: grid; }
.stats b { font: 700 1.6rem var(--f-display); }
.stats span { font-size: .88rem; color: var(--ink-2); }
.calc { display: grid; grid-template-columns: 1fr; gap: .6rem; margin: .8rem 0; }
.cl { display: grid; gap: .25rem; font-weight: 700; font-size: .92rem; }
.cl input, .numin { min-height: 2.75rem; border: 2px solid var(--line-strong); border-radius: 10px; padding: 0 .7rem; background: var(--surface); color: var(--ink); font: 400 1rem var(--f-body); width: 100%; }
.numin { width: 5.5rem; }
.result { display: grid; gap: .3rem; background: var(--surface-2); border-radius: 12px; padding: .8rem 1rem; }
.result > div { display: flex; justify-content: space-between; gap: 1rem; }
.result .net { border-top: 2px solid var(--line-strong); padding-top: .4rem; font-size: 1.15rem; }
.result .net.neg b { color: var(--danger); }
.hidden-story { border: 2px dashed var(--line-strong); border-radius: 12px; padding: .8rem 1rem; }
.field input, .field select, .field textarea { max-width: 100%; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); }
@media (min-width: 640px) { .tiers { grid-template-columns: 1fr 1fr; } .match { grid-template-columns: 1fr 1fr; } .sentbox { grid-template-columns: 1fr 1fr; } .calc { grid-template-columns: 1fr 1fr; } .stats { grid-template-columns: repeat(4, 1fr); } .quick { grid-template-columns: repeat(4, 1fr); } }

input[type="number"], input[type="date"], input[type="time"], input[type="tel"], input[type="url"] { font: 1rem var(--f-body); color: var(--ink); background: var(--surface); border: 2px solid var(--line-strong); border-radius: 12px; padding: .8rem 1rem; min-height: 3.1rem; width: 100%; }
.seg:not(.seg3) { display: flex; flex-wrap: wrap; }
.seg:not(.seg3) button { flex: 1 1 6.2rem; }
@media (max-width: 460px) { .season { font-size: 0; width: min(1rem, 20px); height: min(1rem, 20px); padding: 0; margin-left: 0; background: var(--accent); flex: none; } }
.pin { box-sizing: border-box; }

/* peek on the public page */
.phone-wrap { display: grid; gap: .7rem; justify-items: center; }
.peek-body { flex: 1; min-height: 0; position: relative; display: flex; }
.phone .peek-body .tree-host { flex: 1; }
.phone-foot { padding: 0; gap: 0; }
.phone-foot button { flex: 1; min-height: 2.9rem; background: none; border: 0; font: 400 .78rem var(--f-body); color: var(--ink-2); cursor: pointer; padding: 0 .2rem; }
.phone-foot button[aria-pressed="true"] { color: var(--accent); font-weight: 700; box-shadow: inset 0 3px 0 var(--accent); }
.peek-pane { flex: 1; overflow: auto; padding: .8rem; display: grid; gap: .6rem; align-content: start; }
.peek-card { display: grid; gap: .15rem; border: 1px solid var(--line); border-radius: 12px; padding: .65rem .8rem; background: var(--surface); font-size: .9rem; }
.peek-card span { color: var(--ink-2); font-size: .82rem; }
.peek-card p { margin: .2rem 0 0; font-size: .85rem; }
.peek-list { list-style: none; margin: 0; padding: 0; }
.peek-list li { display: grid; grid-template-columns: 3rem 1fr; gap: .6rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.peek-list li div { display: grid; }
.peek-list li span { color: var(--ink-2); font-size: .78rem; }
.peek-list .datebox { transform: scale(.85); transform-origin: left center; }
.peek-cap { margin: 0; text-align: center; color: var(--ink-2); font-size: .95rem; min-height: 2.6rem; max-width: 22rem; }
.phone .tree-host.ready .tree-svg { touch-action: none; }

/* ---- navigation: Find button, Menu hub, Find a page overlay ---- */
.findbtn { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 16px 0 12px; border: 2px solid var(--accent); border-radius: 999px; background: var(--surface); color: var(--ink); font: 700 min(.83rem, 17px) var(--f-body, inherit); cursor: pointer; flex: none; }   /* the header keeps its size at any text size, like the tabs */
.findbtn svg { width: 20px; height: 20px; }
.findbtn:hover { background: var(--accent-soft); }
.helptop { margin-left: 0; }
@media (max-width: 460px) { .findbtn { margin-left: auto; } }
.findbig { display: flex; align-items: center; gap: .9rem; width: 100%; text-align: left; padding: 1rem 1.1rem; border: 2px solid var(--accent); border-radius: var(--radius); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; min-height: 44px; }
.findbig svg { width: 28px; height: 28px; flex: none; color: var(--accent); }
.findbig span { display: grid; gap: .1rem; }
.findbig small { color: var(--ink-2); font-size: .9rem; }
.findbig:hover { background: var(--accent-soft); }
button.linkrow { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); font: inherit; text-align: left; cursor: pointer; }
.linkrow[aria-current="page"] .lr-t::after { content: " (you are here)"; font-weight: 400; color: var(--ink-2); }
.areas .linkrow { padding: 1rem 0; }
.areas .lr-t { font-family: var(--f-display); font-size: 1.15rem; }
.findbox { max-width: 38rem; }
.findbox .fp-group h3 { margin: .6rem 0 .1rem; font-size: 1rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.findbox input[type=search] { font-size: 1rem; }
.fp-group[hidden], #fp-list li[hidden], #fp-none[hidden] { display: none; }

/* generated by palettes.py */
[data-palette="meadow"]{--bg:#F1F5F0;--surface:#FFFFFF;--surface-2:#E6EDE6;--ink:#16231C;--ink-2:#44554B;--line:#C9D5CB;--line-strong:#76887D;--accent:#1F6B47;--accent-soft:#DCEBE1;--on-accent:#FFFFFF;--side-k:#1F6F78;--side-d:#A5541F;--focus:#0B57D0;--danger:#A12B2B;--warn-bg:#FBF0D6;--warn-ink:#5E4300;color-scheme:light}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"])[data-palette="meadow"],:root:not([data-theme="light"]) [data-palette="meadow"]{--bg:#0E1612;--surface:#16211B;--surface-2:#1E2B24;--ink:#E7EEE8;--ink-2:#A8B8AD;--line:#2D3D33;--line-strong:#62776A;--accent:#84D4A9;--accent-soft:#1E3A2B;--on-accent:#0B1A12;--side-k:#6CC3CC;--side-d:#E69C66;--focus:#8AB4F8;--danger:#F08A8A;--warn-bg:#3A2F10;--warn-ink:#F3DDA0;color-scheme:dark}}
:root[data-theme="dark"][data-palette="meadow"],:root[data-theme="dark"] [data-palette="meadow"]{--bg:#0E1612;--surface:#16211B;--surface-2:#1E2B24;--ink:#E7EEE8;--ink-2:#A8B8AD;--line:#2D3D33;--line-strong:#62776A;--accent:#84D4A9;--accent-soft:#1E3A2B;--on-accent:#0B1A12;--side-k:#6CC3CC;--side-d:#E69C66;--focus:#8AB4F8;--danger:#F08A8A;--warn-bg:#3A2F10;--warn-ink:#F3DDA0;color-scheme:dark}
[data-palette="parchment"]{--bg:#F5EEDF;--surface:#FFFBF2;--surface-2:#EBE2CF;--ink:#2A2118;--ink-2:#5A4B3A;--line:#E0D5BD;--line-strong:#85735B;--accent:#8A4B1E;--accent-soft:#F0DFC6;--on-accent:#FFFFFF;--side-k:#1F6F78;--side-d:#A5541F;--focus:#0B57D0;--danger:#A12B2B;--warn-bg:#FBF0D6;--warn-ink:#5E4300;color-scheme:light}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"])[data-palette="parchment"],:root:not([data-theme="light"]) [data-palette="parchment"]{--bg:#1A1510;--surface:#241D16;--surface-2:#2E261D;--ink:#F0E8DA;--ink-2:#BDAE98;--line:#3A3024;--line-strong:#7F705C;--accent:#E3B27A;--accent-soft:#3E2F1E;--on-accent:#1F1408;--side-k:#6CC3CC;--side-d:#E69C66;--focus:#8AB4F8;--danger:#F08A8A;--warn-bg:#3A2F10;--warn-ink:#F3DDA0;color-scheme:dark}}
:root[data-theme="dark"][data-palette="parchment"],:root[data-theme="dark"] [data-palette="parchment"]{--bg:#1A1510;--surface:#241D16;--surface-2:#2E261D;--ink:#F0E8DA;--ink-2:#BDAE98;--line:#3A3024;--line-strong:#7F705C;--accent:#E3B27A;--accent-soft:#3E2F1E;--on-accent:#1F1408;--side-k:#6CC3CC;--side-d:#E69C66;--focus:#8AB4F8;--danger:#F08A8A;--warn-bg:#3A2F10;--warn-ink:#F3DDA0;color-scheme:dark}
[data-palette="harbor"]{--bg:#EEF3F8;--surface:#FFFFFF;--surface-2:#E1EAF3;--ink:#14202E;--ink-2:#43566B;--line:#C5D2E0;--line-strong:#6F8399;--accent:#1F4E8C;--accent-soft:#DCE7F5;--on-accent:#FFFFFF;--side-k:#1F6F78;--side-d:#A5541F;--focus:#0B57D0;--danger:#A12B2B;--warn-bg:#FBF0D6;--warn-ink:#5E4300;color-scheme:light}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"])[data-palette="harbor"],:root:not([data-theme="light"]) [data-palette="harbor"]{--bg:#0D141C;--surface:#141E2A;--surface-2:#1B2735;--ink:#E6EDF5;--ink-2:#A6B5C6;--line:#27374A;--line-strong:#5D738A;--accent:#8DB7EE;--accent-soft:#1F3550;--on-accent:#08131F;--side-k:#6CC3CC;--side-d:#E69C66;--focus:#8AB4F8;--danger:#F08A8A;--warn-bg:#3A2F10;--warn-ink:#F3DDA0;color-scheme:dark}}
:root[data-theme="dark"][data-palette="harbor"],:root[data-theme="dark"] [data-palette="harbor"]{--bg:#0D141C;--surface:#141E2A;--surface-2:#1B2735;--ink:#E6EDF5;--ink-2:#A6B5C6;--line:#27374A;--line-strong:#5D738A;--accent:#8DB7EE;--accent-soft:#1F3550;--on-accent:#08131F;--side-k:#6CC3CC;--side-d:#E69C66;--focus:#8AB4F8;--danger:#F08A8A;--warn-bg:#3A2F10;--warn-ink:#F3DDA0;color-scheme:dark}
[data-palette="rose"]{--bg:#F8F0F1;--surface:#FFFFFF;--surface-2:#F0E2E4;--ink:#2A1A1D;--ink-2:#5E4549;--line:#E5D0D3;--line-strong:#8F7176;--accent:#9B2F4A;--accent-soft:#F6DDE3;--on-accent:#FFFFFF;--side-k:#1F6F78;--side-d:#A5541F;--focus:#0B57D0;--danger:#A12B2B;--warn-bg:#FBF0D6;--warn-ink:#5E4300;color-scheme:light}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"])[data-palette="rose"],:root:not([data-theme="light"]) [data-palette="rose"]{--bg:#1A1013;--surface:#24171B;--surface-2:#2F1F24;--ink:#F3E8EA;--ink-2:#BFA6AB;--line:#3E2A30;--line-strong:#84676E;--accent:#F0A3B5;--accent-soft:#4A2430;--on-accent:#2A0A14;--side-k:#6CC3CC;--side-d:#E69C66;--focus:#8AB4F8;--danger:#F08A8A;--warn-bg:#3A2F10;--warn-ink:#F3DDA0;color-scheme:dark}}
:root[data-theme="dark"][data-palette="rose"],:root[data-theme="dark"] [data-palette="rose"]{--bg:#1A1013;--surface:#24171B;--surface-2:#2F1F24;--ink:#F3E8EA;--ink-2:#BFA6AB;--line:#3E2A30;--line-strong:#84676E;--accent:#F0A3B5;--accent-soft:#4A2430;--on-accent:#2A0A14;--side-k:#6CC3CC;--side-d:#E69C66;--focus:#8AB4F8;--danger:#F08A8A;--warn-bg:#3A2F10;--warn-ink:#F3DDA0;color-scheme:dark}
[data-palette="stone"]{--bg:#F2F2F0;--surface:#FFFFFF;--surface-2:#E6E6E3;--ink:#1D1F1E;--ink-2:#4D5250;--line:#D3D5D1;--line-strong:#7B807D;--accent:#2F5F63;--accent-soft:#DDE9EA;--on-accent:#FFFFFF;--side-k:#1F6F78;--side-d:#A5541F;--focus:#0B57D0;--danger:#A12B2B;--warn-bg:#FBF0D6;--warn-ink:#5E4300;color-scheme:light}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"])[data-palette="stone"],:root:not([data-theme="light"]) [data-palette="stone"]{--bg:#121413;--surface:#1A1D1C;--surface-2:#232726;--ink:#ECEFED;--ink-2:#AEB4B1;--line:#2F3433;--line-strong:#6B7273;--accent:#8FCBD0;--accent-soft:#1F3A3C;--on-accent:#07181A;--side-k:#6CC3CC;--side-d:#E69C66;--focus:#8AB4F8;--danger:#F08A8A;--warn-bg:#3A2F10;--warn-ink:#F3DDA0;color-scheme:dark}}
:root[data-theme="dark"][data-palette="stone"],:root[data-theme="dark"] [data-palette="stone"]{--bg:#121413;--surface:#1A1D1C;--surface-2:#232726;--ink:#ECEFED;--ink-2:#AEB4B1;--line:#2F3433;--line-strong:#6B7273;--accent:#8FCBD0;--accent-soft:#1F3A3C;--on-accent:#07181A;--side-k:#6CC3CC;--side-d:#E69C66;--focus:#8AB4F8;--danger:#F08A8A;--warn-bg:#3A2F10;--warn-ink:#F3DDA0;color-scheme:dark}
[data-palette="bold"]{--bg:#FFFFFF;--surface:#FFFFFF;--surface-2:#F0F0F0;--ink:#000000;--ink-2:#2B2B2B;--line:#BDBDBD;--line-strong:#595959;--accent:#0A3D8F;--accent-soft:#E3ECFA;--on-accent:#FFFFFF;--side-k:#005F69;--side-d:#9A4300;--focus:#0B57D0;--danger:#A00000;--warn-bg:#FFF3CC;--warn-ink:#4A3500;color-scheme:light}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"])[data-palette="bold"],:root:not([data-theme="light"]) [data-palette="bold"]{--bg:#000000;--surface:#0B0B0B;--surface-2:#1A1A1A;--ink:#FFFFFF;--ink-2:#DADADA;--line:#3A3A3A;--line-strong:#A8A8A8;--accent:#9CC4FF;--accent-soft:#14284A;--on-accent:#000000;--side-k:#6CC3CC;--side-d:#FFAA66;--focus:#9CC4FF;--danger:#FF9C9C;--warn-bg:#3A2F10;--warn-ink:#FFE9A8;color-scheme:dark}}
:root[data-theme="dark"][data-palette="bold"],:root[data-theme="dark"] [data-palette="bold"]{--bg:#000000;--surface:#0B0B0B;--surface-2:#1A1A1A;--ink:#FFFFFF;--ink-2:#DADADA;--line:#3A3A3A;--line-strong:#A8A8A8;--accent:#9CC4FF;--accent-soft:#14284A;--on-accent:#000000;--side-k:#6CC3CC;--side-d:#FFAA66;--focus:#9CC4FF;--danger:#FF9C9C;--warn-bg:#3A2F10;--warn-ink:#FFE9A8;color-scheme:dark}
:root[data-season="advent"][data-palette]{--accent:#5B3A8C;--accent-soft:#E8E0F2;--on-accent:#FFFFFF}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"])[data-season="advent"][data-palette]{--accent:#C9ADF2;--accent-soft:#33254D;--on-accent:#170D29}}
:root[data-theme="dark"][data-season="advent"][data-palette]{--accent:#C9ADF2;--accent-soft:#33254D;--on-accent:#170D29}
:root[data-season="christmas"][data-palette]{--accent:#7A5800;--accent-soft:#F4EBCB;--on-accent:#FFFFFF}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"])[data-season="christmas"][data-palette]{--accent:#EBC96B;--accent-soft:#3F3414;--on-accent:#231A00}}
:root[data-theme="dark"][data-season="christmas"][data-palette]{--accent:#EBC96B;--accent-soft:#3F3414;--on-accent:#231A00}
/* Color vision (Look and reading): the colors that carry meaning (good / needs fixing, the two family sides, map pins), chosen so they stay
   apart for each kind of color vision (checked by tests/colorvision.mjs, Machado 2009 simulation, CIEDE2000). Light, then dark. */
:root[data-vision="redgreen"][data-palette]{--good:#0B5CAD;--danger:#A13F00;--side-k:#0B5CAD;--side-d:#B35900;--pin-home:#0B5CAD;--pin-home-ink:#FFFFFF}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"])[data-vision="redgreen"][data-palette]{--good:#8CC4FF;--danger:#FFA066;--side-k:#8CC4FF;--side-d:#F0A050;--pin-home:#8CC4FF;--pin-home-ink:#08131F}}
:root[data-theme="dark"][data-vision="redgreen"][data-palette]{--good:#8CC4FF;--danger:#FFA066;--side-k:#8CC4FF;--side-d:#F0A050;--pin-home:#8CC4FF;--pin-home-ink:#08131F}
:root[data-vision="blueyellow"][data-palette]{--good:#11695A;--danger:#B0213C;--side-k:#11695A;--side-d:#B0213C;--pin-home:#11695A;--pin-home-ink:#FFFFFF}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"])[data-vision="blueyellow"][data-palette]{--good:#6FD6C2;--danger:#FF8FA3;--side-k:#6FD6C2;--side-d:#FF8FA3;--pin-home:#6FD6C2;--pin-home-ink:#06201B}}
:root[data-theme="dark"][data-vision="blueyellow"][data-palette]{--good:#6FD6C2;--danger:#FF8FA3;--side-k:#6FD6C2;--side-d:#FF8FA3;--pin-home:#6FD6C2;--pin-home-ink:#06201B}
:root[data-vision="gray"][data-palette]{--good:#0D2B52;--danger:#B3261E;--side-k:#14243A;--side-d:#B87128;--pin-home:#46576D;--pin-home-ink:#FFFFFF}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"])[data-vision="gray"][data-palette]{--good:#E4F0FF;--danger:#F07A6E;--side-k:#E4F0FF;--side-d:#9A6633;--pin-home:#92A5BC;--pin-home-ink:#0B0B0B}}
:root[data-theme="dark"][data-vision="gray"][data-palette]{--good:#E4F0FF;--danger:#F07A6E;--side-k:#E4F0FF;--side-d:#9A6633;--pin-home:#92A5BC;--pin-home-ink:#0B0B0B}

/* ---- Make it yours: favorites, presets, and the easier-to-see options ---- */
.headtop, .titlerow { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.titlerow h1 { margin: 0; }
.favbtn { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 .9rem; border: 2px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font: 700 .95rem var(--f-body, inherit); cursor: pointer; }
.favbtn span { color: var(--accent); font-size: 1.15em; }
.favbtn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.presets { display: grid; grid-template-columns: 1fr; gap: .7rem; }
@media (min-width: 640px) { .presets { grid-template-columns: repeat(3, 1fr); } }
.preset { display: grid; gap: .25rem; justify-items: start; text-align: left; padding: .8rem .9rem; border-radius: 14px; border: 2px solid var(--line-strong); background: var(--bg); color: var(--ink); font: 400 .95rem/1.3 var(--f-body); cursor: pointer; min-height: 44px; }
.preset[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent); }
.favrow { grid-template-columns: 1fr; gap: .5rem; }
.favrow .btns { display: flex; flex-wrap: wrap; gap: .5rem; }
.favrow .btn[disabled] { opacity: .45; cursor: not-allowed; }
/* options that change how everything looks */
:root[data-motion="reduce"] *, :root[data-motion="reduce"] *::before, :root[data-motion="reduce"] *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
:root[data-contrast="high"][data-palette][data-palette] { --ink-2: var(--ink); --line-strong: var(--ink); --line: var(--ink); }   /* strong enough to win over the dark palettes too */
:root[data-contrast="high"] :focus-visible { outline-width: 4px; }
:root[data-bold="1"] body { font-weight: 700; }
/* Font (Look and reading). The family tree's cards keep the standard font: their names are fitted to the card. */
:root[data-font="dyslexic"] { --f-body: 'OpenDyslexic', 'Atkinson Hyperlegible', 'Segoe UI', system-ui, sans-serif; --f-display: 'OpenDyslexic', 'Atkinson Hyperlegible', 'Segoe UI', system-ui, sans-serif; }
:root[data-font="system"] { --f-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; --f-display: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
:root[data-font] .tree-svg text, :root[data-font] .tourart text { font-family: 'Atkinson Hyperlegible', 'Segoe UI', system-ui, sans-serif; letter-spacing: normal; word-spacing: normal; }
.choice.f-std .ch-t, .choice.f-std .ch-s { font-family: 'Atkinson Hyperlegible', 'Segoe UI', system-ui, sans-serif; }
.choice.f-dys .ch-t, .choice.f-dys .ch-s { font-family: 'OpenDyslexic', 'Atkinson Hyperlegible', system-ui, sans-serif; }
.choice.f-sys .ch-t, .choice.f-sys .ch-s { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
/* Spacing (Look and reading). Controls take the page's spacing too (browsers reset it on buttons and fields). */
:root[data-line="roomy"] body { line-height: 1.85; }
:root[data-line="extra"] body { line-height: 2.2; }
:root[data-line="extra"] .page p + p { margin-top: .5em; }
:root[data-letter="wide"] body { letter-spacing: .06em; }
:root[data-word="wide"] body { word-spacing: .2em; }
:root[data-letter="wide"] :is(h1, h2, h3) { letter-spacing: .03em; }
:is(:root[data-letter="wide"], :root[data-word="wide"]) :is(button, input, select, textarea) { letter-spacing: inherit; word-spacing: inherit; }
.app-head, .tabs, .tab, .exbar { letter-spacing: normal; word-spacing: normal; overflow-wrap: normal; }   /* the header and tabs keep their fixed size and font, like the text size */
:root[data-font] .tab, :root[data-font] .exbar, :root[data-font] .exbar-acts a, :root[data-font] .app-head .brand-name small, :root[data-font] .app-head .findbtn, :root[data-font] .app-head .season, :root[data-font] .app-head .me { font-family: 'Atkinson Hyperlegible', 'Segoe UI', system-ui, sans-serif; }
:root[data-font] .app-head .brand { font-family: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif; }
/* very large text, a wide font or wide spacing: a long word in a heading wraps inside the page instead of running off it */
h1, h2, h3 { overflow-wrap: break-word; }
.titlerow h1, .headtop > .linkbtn, .hrow h2 { min-width: 0; }
body { overflow-wrap: break-word; }
/* past Larger, or with the wide font or wide spacing, a long word may break anywhere rather than push the page sideways */
:root:is([data-big="1"], [data-font="dyslexic"], [data-letter="wide"], [data-word="wide"]) body { overflow-wrap: anywhere; }
:where(:root:is([data-big="1"], [data-font="dyslexic"], [data-letter="wide"], [data-word="wide"])) :where(body *) { min-width: 0; }
:root:is([data-big="1"], [data-font="dyslexic"], [data-letter="wide"], [data-word="wide"]) :is(h1, h2, h3, .plantag) { overflow-wrap: anywhere; white-space: normal; }
:root:is([data-big="1"], [data-font="dyslexic"], [data-letter="wide"], [data-word="wide"]) .xrow { flex-wrap: wrap; }
:root:is([data-big="1"], [data-font="dyslexic"], [data-letter="wide"], [data-word="wide"]) .xr-amt { flex: 1 1 auto; align-items: flex-start; text-align: left; }   /* no box insists on its widest word */
input[type="date"], input[type="time"], input[type="number"], input[type="search"], input[type="tel"], input[type="url"] { max-width: 100%; }
.brand { font-size: min(1.35rem, 26px); }   /* the name in the public pages' top bar keeps its size, like the app's header */
.page h1 { font-size: min(1.9rem, 1.35rem + 3vw); }
/* Underline all links: every link, not only those in sentences (buttons that look like buttons and the tabs stay as they are) */
:root[data-links="1"] a:not(.btn):not(.tab):not(.brand):not(.linkrow):not(.qbtn) { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
:root[data-links="1"] a.linkrow .lr-t, :root[data-links="1"] a.qbtn b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
:root[data-links="1"] .linkbtn { text-decoration-thickness: 2px; }
/* Never color alone (WCAG 1.4.1): a mark, a word or a pattern goes with every color that means something, for everyone */
.msg .bad::before { content: '!' / ''; display: inline-grid; place-items: center; width: 1.3em; height: 1.3em; margin-right: .35em; border-radius: 50%; background: var(--danger); color: var(--surface); font: 700 .85em/1 var(--f-body); vertical-align: .08em; letter-spacing: 0; }
.msg .good::before { content: '✓' / ''; margin-right: .3em; }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"], .field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-width: 3px; border-color: var(--danger); box-shadow: inset 6px 0 0 var(--danger); }
.cnt .warn::before { content: '! ' / ''; }
.xbv.pos::before { content: '↑ ' / ''; } .xbv.neg::before { content: '↓ ' / ''; }
.switch::after { display: grid; place-items: center; font: 700 1.15rem/1 var(--f-body); color: var(--accent); content: ''; }
.switch:checked::after { content: '✓' / ''; }
.dots i { transition: width .15s; } .dots i.on { width: 1.6rem; border-radius: 999px; }
.wsteps li.done b { font-size: 0; } .wsteps li.done b::before { content: '✓' / ''; font-size: .9rem; }
.legend i.dash, .cvside.d { background: repeating-linear-gradient(to bottom, var(--side-d) 0 4px, transparent 4px 7px); }
.legend i.solid, .cvside.k { background: var(--side-k); }
/* choices (font, spacing, color vision) */
.lk-why { margin-bottom: .6rem; }
.acclist { list-style: none; margin: 0; padding: 0; }
.acclist li { display: grid; gap: .15rem; justify-items: start; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.acclist li > span { color: var(--ink-2); }
.lk-h3 { font: 700 1rem/1.3 var(--f-body); margin: .9rem 0 .4rem; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); gap: .5rem; }
.choices.long { grid-template-columns: minmax(0, 1fr); }
.choice { display: grid; grid-template-columns: 1.3em minmax(0, 1fr); column-gap: .45rem; align-items: start; align-content: start; text-align: left; min-height: 48px; padding: .6rem .8rem; border: 2px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--ink); font: 400 1rem/1.35 var(--f-body); cursor: pointer; }
.choice[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); }
.ch-mark { grid-row: 1 / span 2; font-weight: 700; color: var(--ink); }
.ch-t { font-weight: 700; overflow-wrap: anywhere; } .ch-s { grid-column: 2; font-size: .9rem; color: var(--ink-2); overflow-wrap: anywhere; }
.choice[aria-pressed="true"] .ch-s { color: var(--ink); }
.cvdemo { list-style: none; margin: .8rem 0 0; padding: .4rem .9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); display: grid; }
.cvdemo li { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .7rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.cvdemo li:last-child { border-bottom: 0; }
.cvdemo .msg { min-height: 0; font-size: 1rem; }
.cvside { display: inline-block; width: 10px; height: 1.6rem; border-radius: 2px; flex: none; }
.cvpins { display: inline-flex; gap: .35rem; }
.cvpins i { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; font-style: normal; font-size: 1rem; background: var(--pin-home); color: var(--pin-home-ink); }
.cvpins i.grave { background: var(--ink); color: var(--surface); } .cvpins i.gather { background: var(--side-d); color: var(--bg); }
/* text size slider (Look and reading, Menu) */
.tsz { display: grid; gap: .55rem; }
.tsz-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .2rem .8rem; }
.tsz-top label { font-weight: 700; }
.tsz-val { font-weight: 700; color: var(--ink); }
.tsz-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: .5rem; }
.tsz-a { font: 700 16px/44px var(--f-body); color: var(--ink-2); } .tsz-a.big { font-size: 28px; }
.tsz-track { min-width: 0; }
.tsz-range { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 44px; margin: 0; padding: 0; background: transparent; cursor: pointer; }
.tsz-range::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: var(--line-strong); }
.tsz-range::-moz-range-track { height: 8px; border-radius: 999px; background: var(--line-strong); }
.tsz-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 32px; height: 32px; margin-top: -12px; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--accent); }
.tsz-range::-moz-range-thumb { box-sizing: border-box; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--accent); }
.tsz-range:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.tsz-ticks { position: relative; height: calc(min(.8rem, 15px) + 10px); font: 700 min(.8rem, 15px)/1 var(--f-body); color: var(--ink-2); letter-spacing: 0; word-spacing: 0; }
.tsz-ticks span { position: absolute; top: 0; left: calc(16px + (100% - 32px) * var(--at)); transform: translateX(-50%); padding-top: 8px; }
.tsz-ticks span::before { content: ''; position: absolute; top: 0; left: calc(50% - 1px); width: 2px; height: 6px; background: var(--ink-2); }
.tsz-prev { border: 2px dashed var(--line-strong); border-radius: 12px; padding: .7rem .9rem; background: var(--surface); overflow-wrap: anywhere; }
@media (forced-colors: active) { .tsz-range { appearance: auto; -webkit-appearance: auto; } }
/* Windows contrast themes (forced colors): the system's colors, but every chosen, pressed or "on" state still shows */
@media (forced-colors: active) {
  :focus-visible { outline: 3px solid Highlight !important; }
  .seg button[aria-pressed="true"], .pill[aria-pressed="true"], .choice[aria-pressed="true"], .pal[aria-pressed="true"], .preset[aria-pressed="true"], .xcat[aria-pressed="true"], .tab[aria-current="page"] { forced-color-adjust: none; background: Highlight; color: HighlightText; border-color: Highlight; }
  .choice[aria-pressed="true"] .ch-s, .choice[aria-pressed="true"] .ch-mark { color: HighlightText; }
  .switch { forced-color-adjust: none; background: Canvas; border: 2px solid ButtonText; }
  .switch::after { background: ButtonText; color: Canvas; }
  .switch:checked { background: Highlight; border-color: Highlight; }
  .switch:checked::after { background: HighlightText; color: Highlight; }
  .msg .bad::before { forced-color-adjust: none; background: CanvasText; color: Canvas; }
  .stripe, .cvside, .legend i, .dots i, .cvpins i, .pin { forced-color-adjust: none; }
  .tsz-ticks span::before { background: CanvasText; }
}
/* the phone or computer asks for more contrast: the same as the Higher contrast switch */
@media (prefers-contrast: more) {
  :root[data-palette][data-palette][data-palette] { --ink-2: var(--ink); --line-strong: var(--ink); --line: var(--ink); }
  :focus-visible { outline-width: 4px; }
}
.quick { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); }
.qbtn { min-width: 0; overflow-wrap: anywhere; }

/* ---- invitations and gatherings ---- */
.invite { border: 4px double var(--accent); border-radius: var(--radius); padding: 1.2rem; text-align: center; background: var(--surface); display: grid; gap: .4rem; }
.invite h3 { margin: 0; font-family: var(--f-display); font-size: 1.6rem; overflow-wrap: anywhere; }
.inv-head { margin: 0; text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: var(--accent); }
.inv-when { margin: 0 0 .4rem; font-weight: 700; }
.invite dl { text-align: left; margin: .4rem 0; display: grid; gap: .1rem; }
.invite dt { font-weight: 700; margin-top: .5rem; }
.invite dd { margin: 0; overflow-wrap: anywhere; }
.inv-qr { display: grid; justify-items: center; gap: .5rem; margin-top: .4rem; }
.qrbox svg.qr { width: 9.5rem; height: 9.5rem; }
.invwrap { display: grid; gap: .7rem; border-top: 1px solid var(--line); padding-top: .8rem; margin: .8rem 0; }
.nodress { color: var(--ink); background: var(--warn-bg); border-radius: 8px; padding: .3rem .5rem; }
.facts > div { overflow-wrap: anywhere; }
/* long option text must never widen the page */
.page > *, .field, .recipe, .sec { min-width: 0; }
select { max-width: 100%; text-overflow: ellipsis; }
.recipe, .facts, .invite, .invwrap { grid-template-columns: minmax(0, 1fr); }
.inv-qr { grid-template-columns: minmax(0, 1fr); }
.inv-qr > div { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.inv-qr .code { white-space: normal; overflow-wrap: anywhere; word-break: break-all; font-size: .95rem; }

/* ---------- recipes ---------- */
.rcard { border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: .3rem; align-items: center; }
.rcard .rfav { position: static; }   /* the heart sits beside the card, never over it */
.rcard-btn { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; gap: .9rem; align-items: center; width: 100%; min-height: 5.2rem; padding: .75rem 0; background: none; border: 0; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.rcard-btn:hover .rc-t { text-decoration: underline; }
.rcard-btn .lr-go { font-size: 1.6rem; color: var(--accent); }
.rthumb { width: 4.5rem; height: 4.5rem; border-radius: 12px; object-fit: cover; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.rthumb.ph svg { width: 2.3rem; height: 2.3rem; }
.rc-text { display: grid; gap: .1rem; min-width: 0; }
.rc-t { font-weight: 700; font-size: 1.08rem; overflow-wrap: anywhere; }
.rc-s { color: var(--ink-2); font-size: .93rem; overflow-wrap: anywhere; }
.rby { margin: 0; }
.rhero { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--accent-soft); }
.rhero img { display: block; width: 100%; aspect-ratio: 4 / 3; max-height: 22rem; object-fit: cover; }
.rhero.ph { display: grid; justify-items: center; gap: .3rem; padding: 1.2rem; text-align: center; }
.rhero.ph .rthumb { background: transparent; }
.rthumbs { display: flex; gap: .5rem; margin-top: .5rem; }
.rthumbs button { width: 4rem; height: 4rem; padding: 0; border: 2px solid var(--line-strong); border-radius: 10px; overflow: hidden; background: none; cursor: pointer; }
.rthumbs button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.rthumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); gap: .6rem; margin: 0; }
.rfacts > div { background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: .55rem .7rem; }
.rfacts dt { font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.rfl { border: 3px solid var(--ink); border-radius: 14px; padding: .7rem .9rem; margin: .8rem 0; background: var(--surface); }
.rfl h2 { margin: 0 0 .3rem; font-size: 1.5rem; border-bottom: 8px solid var(--ink); padding-bottom: .2rem; }
.rfl ul { list-style: none; margin: 0; padding: 0; }
.rfl li { display: flex; justify-content: space-between; gap: .8rem; padding: .35rem 0; border-bottom: 1px solid var(--line-strong); }
.rfl li b { text-align: right; overflow-wrap: anywhere; }
.rfl p { margin: .5rem 0 0; }
.rfacts dd { margin: 0; font-weight: 700; font-size: 1.05rem; overflow-wrap: anywhere; }
.jump { gap: .2rem 1rem; }
.rstory { font-size: 1.05rem; line-height: 1.55; border-left: 4px solid var(--accent); padding-left: .9rem; margin: .4rem 0; }
.rscale { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: .8rem; display: grid; gap: .6rem; }
.rs-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.rs-l { font-weight: 700; }
.rs-out { min-width: 5.5rem; text-align: center; font-weight: 700; font-size: 1.15rem; flex: 1 1 5rem; overflow-wrap: anywhere; }
.rstep { width: 3rem; height: 3rem; flex: none; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 700 1.5rem/1 var(--f-body); cursor: pointer; display: grid; place-items: center; padding: 0; }
.rstep:disabled { opacity: .45; cursor: not-allowed; }
.rstep:active { transform: scale(.94); }
.rs-mult { display: flex; flex-wrap: wrap; gap: .5rem; }
.rsys { display: grid; gap: .3rem; margin: 1rem 0 .4rem; }
.rpart { font-size: 1.02rem; margin: 1rem 0 .1rem; color: var(--ink-2); }
.ckrows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ck-row label { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .8rem; align-items: start; padding: .75rem 0; min-height: 3.2rem; border-bottom: 1px solid var(--line); cursor: pointer; }
.ck-row input { width: 1.6rem; height: 1.6rem; margin: .05rem 0 0; accent-color: var(--accent); }
.ck-row.done .ck-text { text-decoration: line-through; color: var(--ink-2); }
.ck-text { overflow-wrap: anywhere; }
.amt { font-weight: 700; }
.inote { color: var(--ink-2); }
.rsteps { list-style: none; margin: 0; padding: 0; counter-reset: rs; border-top: 1px solid var(--line); }
.rsteps li { counter-increment: rs; display: grid; grid-template-columns: 2.1rem minmax(0, 1fr); gap: .2rem .8rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.rsteps li::before { content: counter(rs); grid-row: 1 / span 2; width: 2rem; height: 2rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 700; font-size: .95rem; }
.rsteps li > p { margin: 0; grid-column: 2; font-size: 1.05rem; line-height: 1.5; overflow-wrap: anywhere; }
.rsteps li[aria-current="step"] > p { font-weight: 700; }
.rsteps .uses { grid-column: 2; display: flex; flex-wrap: wrap; gap: .3rem .4rem; align-items: center; }
.chip.use { margin-left: 0; font-weight: 400; font-size: .88rem; border-radius: 10px; white-space: normal; border-color: var(--line-strong); }
.chip.use .amt { font-weight: 700; }
.chip.use .inote { color: inherit; }
/* editor */
.rgrid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .8rem; }
.rgrid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); gap: .8rem; margin-top: .8rem; }
.phlist { list-style: none; margin: .6rem 0; padding: 0; display: grid; gap: .8rem; }
.phitem { display: grid; grid-template-columns: minmax(0, 30%) minmax(0, 1fr); gap: .8rem; align-items: center; }
.phitem img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; display: block; }
.phtools { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.phtools .chip { margin: 0; }
.filebtn { position: relative; cursor: pointer; }
.filebtn:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.swlist { list-style: none; margin: .4rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.swrow { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--danger); }
.sw-bg { position: absolute; top: 0; right: 0; bottom: 0; width: 96px; display: grid; }
.sw-del { background: var(--danger); color: var(--bg); border: 0; font: 700 1rem var(--f-body); cursor: pointer; }
.swrow:not(.open):not(.dragging) .sw-del { visibility: hidden; }
.sw-fg { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .3rem; background: var(--bg); touch-action: pan-y; transition: transform .18s ease; }
.swrow.open .sw-fg { transform: translateX(-96px); }
.swrow.dragging .sw-fg { transition: none; }
.ing-main { display: grid; gap: .1rem; min-height: 3.4rem; padding: .6rem .2rem; background: none; border: 0; color: var(--ink); font: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; user-select: none; -webkit-user-select: none; }
.ing-main:hover .ing-t { text-decoration: underline; }
.ing-p { font-size: .85rem; color: var(--ink-2); }
.ing-x { min-height: 2.75rem; padding: 0 .6rem; background: none; border: 0; color: var(--danger); font: 700 .95rem var(--f-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.rpick { background: var(--surface); border: 2px solid var(--line-strong); border-radius: var(--radius); padding: 1rem; margin-top: .8rem; }
.rpick h3 { font-size: 1.25rem; margin: 0 0 .2rem; overflow-wrap: anywhere; }
.pickgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr)); gap: .45rem; }
.pickgrid li.wide { grid-column: 1 / -1; }
.pickgrid .empty { grid-column: 1 / -1; }
.pickbtn { display: grid; gap: .05rem; width: 100%; height: 100%; min-height: 3.2rem; text-align: left; background: var(--bg); border: 1.5px solid var(--line-strong); border-radius: 10px; padding: .5rem .75rem; color: var(--ink); font: inherit; cursor: pointer; }
.pickbtn:hover { border-color: var(--accent); }
.pickbtn.new { border-style: dashed; border-color: var(--accent); }
.pk-n { font-weight: 700; overflow-wrap: anywhere; }
.pk-s { font-size: .84rem; color: var(--ink-2); }
.stepper { display: flex; gap: .6rem; align-items: center; }
.qtyin { width: 7rem; min-width: 0; min-height: 3rem; text-align: center; border: 2px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); font: 700 1.3rem var(--f-body); }
.quickq { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.quickq .pill { min-width: 2.75rem; padding: 0 .7rem; }
.edsteps { list-style: none; margin: 0 0 .8rem; padding: 0; }
.edstep { padding: 0 0 .8rem; border-bottom: 1px solid var(--line); margin-bottom: .6rem; }
.edstep textarea { min-height: 5.5rem; }
.edtools .btn { flex: 1 1 auto; }
/* cooking */
.cprog { height: .6rem; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.cprog span { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.cstep { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.cstep-n { font-size: 1rem; color: var(--ink-2); margin: 0 0 .4rem; font-family: var(--f-body); }
.cstep-t { font-size: 1.45rem; line-height: 1.45; margin: 0; overflow-wrap: anywhere; }
.cuses { margin-top: 1rem; background: var(--accent-soft); border-radius: 12px; padding: .8rem 1rem; }
.cuses ul { margin: .3rem 0 0; padding-left: 1.2rem; font-size: 1.1rem; }
.ctimes { display: grid; gap: .5rem; margin-top: 1rem; }
.cnav { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: .6rem; }
.cnav .btn { min-height: 3.6rem; font-size: 1.1rem; justify-content: center; }
.trow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.tleft { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.trow.done { background: var(--warn-bg); color: var(--warn-ink); padding: .7rem; border-radius: 12px; border-bottom: 0; margin-bottom: .4rem; }
.trow.done .s { color: inherit; }
.cing summary { min-height: 3rem; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .sw-fg, .cprog span { transition: none; } .rstep:active { transform: none; } }
@media (forced-colors: active) { .rstep, .pickbtn, .qtyin { border: 2px solid ButtonText; } .swrow { border: 1px solid CanvasText; } }

/* print pages */
.pr-prev { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr)); gap: .9rem; align-items: start; }
.pr-prev figure { margin: 0; min-width: 0; }
.pr-prev figcaption { font-size: .82rem; color: var(--ink-2); margin-top: .3rem; overflow-wrap: anywhere; }
.pr-thumb { display: block; width: 100%; padding: 0; border: 2px solid var(--line-strong); border-radius: 6px; background: #fff; cursor: zoom-in; overflow: hidden; }
.pr-thumb:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.pr-thumb canvas { display: block; width: 100%; height: auto; }
.pr-big { max-width: 100%; overflow: auto; margin: .6rem 0; }
.pr-big canvas { display: block; max-width: 100%; height: auto; border: 1px solid var(--line-strong); background: #fff; }

/* shared costs */
.xhero { background: var(--accent-soft); border: 2px solid var(--line-strong); border-radius: var(--radius); padding: 1rem 1.1rem; }
.xh-t { font-size: 1.5rem; margin: 0 0 .2rem; line-height: 1.25; }
.xh-t b { font-weight: 800; }
.xlist > li { border-bottom: 1px solid var(--line); }
.xlist > li:last-child { border-bottom: 0; }
.xsug { padding: .8rem 0; }
.xs-t { display: flex; justify-content: space-between; gap: .8rem; align-items: baseline; font-size: 1.05rem; flex-wrap: wrap; }
.xamt { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.xsug .btnrow { margin-top: .5rem; }
.xsug p.s { margin: .4rem 0 0; }
.xbal { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .7rem 0; flex-wrap: wrap; }
.xbal > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.xbv { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.xbv.pos { color: var(--good); }
.xbv.neg { color: var(--danger); }
.xrow { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; width: 100%; text-align: left; background: transparent; border: 0; padding: .8rem 0; color: var(--ink); font: inherit; cursor: pointer; }
.xrow:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.xr-main { display: flex; flex-direction: column; gap: .1rem; min-width: 0; overflow-wrap: anywhere; }
.xr-main .s, .xr-amt .s { color: var(--ink-2); font-size: .9rem; }
.xr-amt { display: flex; flex-direction: column; align-items: flex-end; text-align: right; flex: none; font-variant-numeric: tabular-nums; }
.xbars { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.xb-l { display: flex; justify-content: space-between; gap: .6rem; font-variant-numeric: tabular-nums; }
.xb-bar { height: .7rem; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: .25rem; border: 1px solid var(--line); }
.xb-bar span { display: block; height: 100%; background: var(--accent); }
.xamt-in { box-sizing: border-box; max-width: 100%; min-width: 0; display: flex; align-items: center; gap: .4rem; border: 2px solid var(--line-strong); border-radius: 10px; background: var(--surface); padding: 0 .7rem; min-height: 2.9rem; }
.xamt-in:focus-within { outline: 3px solid var(--focus); outline-offset: 1px; }
.xamt-in input { border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; width: 0; min-width: 0; flex: 1 1 0; padding: .5rem 0; box-shadow: none; }
.xamt-in.xbig { min-height: 3.4rem; font-size: 1.6rem; font-weight: 700; }
.xcats { display: flex; flex-wrap: wrap; gap: .45rem; }
.xcat { min-height: 2.6rem; padding: 0 .9rem; border: 2px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font: 700 .95rem var(--f-body); cursor: pointer; }
.xcat[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.xsplit { border: 0; padding: 0; margin: 1rem 0; min-width: 0; }
.xsplit legend { font-weight: 800; padding: 0; margin-bottom: .5rem; }
.xsplit .seg { flex-wrap: wrap; border-radius: 14px; }
.xsplit .seg button { min-width: 6.5rem; }
.xp { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .55rem 0; flex-wrap: wrap; }
.xp label, .xp > b { min-width: 0; overflow-wrap: anywhere; }
.xp .xamt-in { width: min(100%, 11rem); }
.xstep { display: flex; align-items: center; gap: .5rem; }
.xs-n { min-width: 2.2rem; text-align: center; font-weight: 800; font-size: 1.15rem; }
.xprev { margin-top: .8rem; padding: .7rem .9rem; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--surface); }
.xprev p { margin: 0; }
.xprev-l { list-style: none; margin: .3rem 0 0; padding: 0; display: grid; gap: .2rem; font-variant-numeric: tabular-nums; }
.xprev-l li { display: flex; justify-content: space-between; gap: .8rem; }
.xrcs { list-style: none; margin: 0 0 .6rem; padding: 0; display: flex; flex-wrap: wrap; gap: .8rem; }
.xrc { display: flex; align-items: center; gap: .6rem; }
.xrc-img { padding: 0; border: 2px solid var(--line-strong); border-radius: 8px; background: #fff; cursor: zoom-in; overflow: hidden; line-height: 0; }
.xrc-img img { width: 72px; height: 72px; object-fit: cover; }
.xrc-img:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.xaddrow { display: flex; gap: .5rem; align-items: stretch; flex-wrap: wrap; }
.xaddrow input { flex: 1; min-width: 0; }
.xadd { margin-top: 1rem; }

.xtrust { background: var(--surface); border: 2px solid var(--accent); border-radius: var(--radius); padding: .8rem 1rem; }
.xtrust p { margin: 0; }

/* gathering items: radio choices, spots taken, notes */
.ei-set { border: 0; padding: 0; margin: 0 0 .6rem; min-width: 0; }
.ei-set legend { font-weight: 700; padding: 0; margin-bottom: .4rem; }
.ei-opt { display: flex; gap: .7rem; align-items: flex-start; padding: .65rem .7rem; border: 2px solid var(--line-strong); border-radius: 14px; margin-bottom: .45rem; background: var(--surface); cursor: pointer; }
.ei-opt input { width: 1.4rem; height: 1.4rem; margin: .1rem 0 0; flex: none; accent-color: var(--accent); }
.ei-opt > span { display: block; min-width: 0; overflow-wrap: anywhere; }
.ei-opt .s { display: block; }
.ei-opt:has(input:checked) { border-color: var(--accent); }
.ei-opt:has(input:focus-visible) { outline: 3px solid var(--focus, var(--accent)); outline-offset: 2px; }
.ei-new { padding: .2rem 0 0; }
.fwho { list-style: none; margin: .2rem 0 0; padding: 0; }
.fwho li { overflow-wrap: anywhere; padding: .1rem 0; }
.fnote { overflow-wrap: anywhere; white-space: normal; }
.slot.multi > div:first-child { min-width: 0; }

/* recipe author section */
.engrave { margin-top: .8rem; display: grid; gap: .5rem; justify-items: start; }
.engrave p { margin: 0; }
.rauthor ul { list-style: none; margin: .4rem 0 .8rem; padding: .6rem .8rem; border: 2px solid var(--line-strong); border-radius: 14px; background: var(--surface); }
.rauthor li { padding: .25rem 0; overflow-wrap: anywhere; }
.rau-l { color: var(--muted, inherit); margin-right: .2rem; }

/* profile */
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); font: 700 1.4rem var(--f-head, var(--f-body)); flex: none; }
.profhead { display: flex; gap: .9rem; align-items: center; }
.profhead > div { min-width: 0; overflow-wrap: anywhere; }
.profilecard { display: flex !important; gap: .8rem; align-items: center; margin-bottom: .8rem; }
.profilecard > span:nth-child(2) { display: block; min-width: 0; flex: 1; }
.profilecard .lr-t, .profilecard .lr-s { display: block; }

/* comments */
.cmlist .cm { display: block; padding: .6rem 0; border-bottom: 1px solid var(--line, #ddd); overflow-wrap: anywhere; }
.cmtext { margin-top: .15rem; }

/* public site */
.pubpage { padding-block: 1rem 3rem; max-width: 46rem; }
.pubpage h1 { margin: 1rem 0 .4rem; }
.pubpage .sec { margin-top: 1.6rem; }
.faqs details { border-bottom: 1px solid var(--line); padding-block: 1rem; }
.faqs details:first-child { border-top: 1px solid var(--line); margin-top: 1.5rem; }
.faqs summary { cursor: pointer; font-weight: 700; min-height: 2.75rem; display: flex; align-items: center; }
.faqs details p { color: var(--ink-2); margin-top: .4rem; max-width: 40rem; }
.ctaband { text-align: center; }
.ctaband .cta { justify-content: center; margin-top: 1.2rem; }
.footer a.pill { text-decoration: none; display: inline-flex; align-items: center; }

/* photos */
.phgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.5rem), 1fr)); gap: .6rem; margin-top: .8rem; }
.phthumb { padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: var(--line); cursor: pointer; min-height: 44px; }
.phthumb.on { border-color: var(--accent); }
.phthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phstrip { display: flex; gap: .5rem; flex-wrap: wrap; margin: .5rem 0; }
.phthumb.sm { width: 4.5rem; height: 4.5rem; aspect-ratio: auto; }
.phview img { max-width: 100%; max-height: 70vh; border-radius: 12px; display: block; margin: .6rem 0; }
.evphotos { margin-top: 1.2rem; }
.meter { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-top: .6rem; }
.meter progress, #ss-prog { max-width: 16rem; width: 100%; }

/* holiday cards */
.cdprev { display: flex; gap: 1rem; flex-wrap: wrap; } .cdprev > div { flex: 1 1 14rem; min-width: 0; } .cdprev canvas { width: 100%; max-width: 31.5rem; height: auto; aspect-ratio: 7 / 5; border: 1px solid var(--line); border-radius: 8px; display: block; }
.cdrow { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .7rem; padding: .6rem 0; border-top: 1px solid var(--line); list-style: none; } .cdrow[hidden] { display: none; }
.cdrow .linkbtn { grid-column: 2 / -1; justify-self: start; }
.cdrow > div { min-width: 0; overflow-wrap: anywhere; }   /* a long name wraps instead of pushing the button off a 320 px screen at Larger text */
.cdav { width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--accent-soft); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.cdtog { min-width: min(5.5rem, 100%); } .cdtog[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.cdchipbox { border: 1px solid var(--line); border-radius: 12px; padding: .7rem; margin-bottom: .8rem; }
.cdchips { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: .5rem 0 0; } .cdchips li { display: inline-flex; align-items: center; gap: .3rem; background: var(--accent-soft); border-radius: 999px; padding: .15rem .2rem .15rem .8rem; }
.chipx { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--ink); cursor: pointer; font-size: 1rem; border-radius: 50%; }
button[data-act="cd-tpl"][aria-pressed="true"], button[data-act="cd-photo"][aria-pressed="true"] { outline: 3px solid var(--accent); }

/* family list */
.tlgroup { border: 1px solid var(--line); border-radius: 12px; margin: .6rem 0; padding: .2rem .8rem; } .tlgroup[hidden] { display: none; }
.tlgroup > summary { cursor: pointer; padding: .7rem 0; min-height: 44px; font-size: 1.05rem; }
.tlsub { font-size: .95rem; margin: .8rem 0 .2rem; color: var(--muted, #555); }
.tllist { margin: 0; padding: 0; } .tlrow { list-style: none; border-top: 1px solid var(--line); } .tlrow[hidden] { display: none; }
.tlbtn { display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: center; width: 100%; background: transparent; border: 0; padding: .55rem 0; min-height: 56px; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.tlt { display: flex; flex-direction: column; min-width: 0; } .tlt .s { overflow-wrap: anywhere; }

.phthumb { position: relative; } .phlock { position: absolute; right: 4px; bottom: 4px; background: rgba(0,0,0,.65); color: #fff; border-radius: 999px; padding: 0 .35rem; font-size: .8rem; }
.phpriv { border: 1px solid var(--line); border-radius: 12px; padding: .8rem; margin: .8rem 0; } .phpriv h3 { margin: 0 0 .3rem; font-size: 1.05rem; }

/* tell a story */
.tellrow { display: grid; grid-template-columns: 1fr; gap: .7rem; margin: .6rem 0; } @media (min-width: 700px) { .tellrow { grid-template-columns: repeat(3, 1fr); } }
.tellbig { display: flex; flex-direction: column; gap: .2rem; text-align: left; min-height: 72px; padding: .9rem 1rem; border: 2px solid var(--line); border-radius: 14px; background: var(--card, #fff); color: inherit; cursor: pointer; font: inherit; }
.tellbig b { font-size: 1.25rem; } .tellbig span { font-size: 1rem; color: var(--muted, #555); } .tellbig[aria-pressed="true"] { border-color: var(--accent); outline: 2px solid var(--accent); }
.tellta { font-size: 1.15rem; line-height: 1.5; width: 100%; } .tip-big { font-size: 1.15rem; font-weight: 700; }
.recdot { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; background: #c0392b; } .tellclock { font-size: 1.2rem; }
.btn.big { min-height: 56px; font-size: 1.2rem; padding: .7rem 1.4rem; } .storyimg { max-width: 100%; max-height: 14rem; border-radius: 10px; margin: .3rem .3rem 0 0; }

/* flow pictures, charges, referral */
.flow { list-style: none; margin: .8rem 0; padding: 0; display: flex; flex-direction: column; align-items: stretch; gap: .3rem; }
.flowstep { display: grid; grid-template-columns: 3.4rem 1fr; column-gap: .8rem; align-items: center; padding: .4rem 0; }
.flowstep b { font-size: 1.15rem; } .flowstep > span:last-child { grid-column: 2; color: var(--muted, #555); }
.flowc { grid-row: 1 / span 2; width: 3.4rem; height: 3.4rem; border-radius: 50%; border: 3px solid var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.4rem; }
.flowarrow { display: flex; justify-content: flex-start; padding-left: .9rem; color: var(--accent); } .flowarrow svg { transform: rotate(90deg); width: 32px; height: 20px; }
@media (min-width: 760px) { .flow { flex-direction: row; align-items: flex-start; } .flowstep { display: flex; flex-direction: column; align-items: center; text-align: center; flex: 1; gap: .3rem; } .flowc { grid-row: auto; } .flowarrow { align-self: center; padding: 0; } .flowarrow svg { transform: none; width: 40px; height: 24px; } }
.chargegrid > div { display: grid; grid-template-columns: 1fr auto; gap: .8rem; padding: .6rem 0; border-bottom: 1px solid var(--line); } .chargehead { font-weight: 700; } .chargegrid span:last-child { text-align: right; }
.whylist { padding-left: 1.2rem; display: grid; gap: .5rem; } .reflink input { width: 100%; font-size: 1rem; }

.cmp > div { grid-template-columns: 1fr auto; } .cmpme { background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 8px; padding-left: .5rem; padding-right: .5rem; } .cdchiptot { font-weight: 700; }

.tpadd { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); gap: .6rem; } .tpadd .btn { white-space: normal; min-width: 0; }
.tpline a, .tpline .linkbtn { display: inline-flex; align-items: center; min-height: 44px; }
.pvlist { display: grid; gap: .9rem; padding: 0; list-style: none; }
.pvcard { border: 2px solid var(--line); border-radius: 1rem; padding: .8rem 1rem; }
.pvstep { display: grid; gap: .3rem; margin-bottom: .6rem; }
.pv-tag { font-size: 1.05rem; }
.tplist { list-style: none; padding: 0; display: grid; gap: .8rem; } .tpcard { border: 2px solid var(--line); border-radius: 14px; padding: .9rem 1rem; background: var(--card, #fff); }
.tphead { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; } .tpkind { font-weight: 700; color: var(--accent); } .tpname { margin: .2rem 0; font-size: 1.25rem; } .tpline { margin: .2rem 0; overflow-wrap: anywhere; } .tpcost { margin: .4rem 0; }

/* the Add button, and a filled icon for the page you are on */
.fab { position: fixed; right: 1rem; bottom: calc(5.6rem + env(safe-area-inset-bottom, 0px)); z-index: 20; display: inline-flex; align-items: center; gap: .5rem; min-height: 56px; padding: 0 1.3rem 0 1.1rem; border: 0; border-radius: 28px; background: var(--accent); color: var(--on-accent, #fff); font: inherit; font-size: min(1.15rem, 22px); font-weight: 800; letter-spacing: normal; line-height: 1.2; box-shadow: 0 4px 14px rgba(0,0,0,.28); cursor: pointer; }
.fab[hidden] { display: none; } .fab svg { width: 1.5rem; height: 1.5rem; } .fab:active { transform: scale(.97); }
.app.hasfab .screen { padding-bottom: 7rem; }
@media (min-width: 900px) { .fab { bottom: 1.5rem; right: 1.5rem; } .app.hasfab .screen { padding-bottom: 6rem; } }
.tab[aria-current="page"] svg { fill: var(--accent-soft); }
@media (prefers-reduced-motion: reduce) { .fab:active { transform: none; } }
/* Round buttons: one shared look for the main actions (Add, Share, Back, Save, Cancel, plus and minus).
   Round, an icon AND a short word (never the icon alone), 52 px or more, the same focus ring as everything else.
   Pressed or current is shown by a filled shape and a check mark, not by color alone. Sizes follow the text size; colors follow the color modes. */
.rbtn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 52px; padding: .5rem 1.2rem; border-radius: 999px; font-weight: 700; line-height: 1.2; }
.rbtn svg { width: 1.35rem; height: 1.35rem; flex: none; }
.btn.rbtn.sm { min-height: 52px; font-size: 1rem; padding: .5rem 1.2rem; }
.rbtn[aria-pressed="true"]::after { content: "\2713"; font-weight: 800; }
.rbtn.pick { width: 100%; justify-content: flex-start; text-align: left; }
.rbtn.pick[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.rbtns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); gap: .6rem; margin: .8rem 0; }
.rbtns.one { grid-template-columns: minmax(0, 1fr); }
.reqcard { border: 2px solid var(--accent); border-radius: 1rem; padding: 1rem; margin: 1rem 0; background: var(--surface); }
.reqcard h3 { margin: 0 0 .3rem; font-size: 1.25rem; }
.reqcard .rbtns { margin-bottom: 0; }
.howtiles { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.howtile { border: 2px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); padding: 1rem 1.1rem; display: grid; gap: .6rem; align-content: start; min-width: 0; }
.howtile h2 { display: flex; gap: .6rem; align-items: center; font-size: 1.3rem; line-height: 1.2; }
.howtile p { line-height: 1.5; overflow-wrap: anywhere; }
.hownum { display: inline-grid; place-items: center; flex: none; min-width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 800; border: 2px solid transparent; }
.howpic { width: 6rem; height: 5rem; color: var(--accent); }
.fambar { height: .6rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-strong); overflow: hidden; margin: .3rem 0 .8rem; }
.fambar i { display: block; height: 100%; background: var(--accent); }
.tlstat { display: block; color: var(--ink-2); }
@media (forced-colors: active) { .hownum { border-color: CanvasText; } .fambar i { background: Highlight; } }
.tab { border-radius: 18px; }
.tab[aria-current="page"] { background: var(--accent-soft); }
.zoomctl button { display: grid; justify-items: center; align-content: center; gap: 0; width: 56px; height: 56px; font-size: 1.3rem; padding: 0; }
.app.hasfab .zoomctl { bottom: calc(56px + 2.4rem); }   /* the round + sits in the corner, so the zoom buttons ride above it */
.zoomctl button small { font: 700 .62rem/1 var(--f-body); letter-spacing: normal; }
.treebar .btn.rbtn { min-height: 52px; font-size: .88rem; padding-inline: 12px; gap: .35rem; }
.treebar .btn.rbtn svg { width: 1.2rem; height: 1.2rem; }
.row .rbtn { max-width: 100%; padding: .4rem .9rem; margin-top: .3rem; }
.row .rbtn span, .headtop .rbtn span { min-width: 0; overflow-wrap: anywhere; }
.headtop > .rbtn { min-width: 0; text-align: left; flex: 0 1 auto; }
.wcs-people { display: grid; gap: .4rem; margin: .4rem 0 .8rem; }
.wcs-people label { display: flex; align-items: center; gap: .6rem; min-height: 44px; padding: .2rem .6rem; border: 2px solid var(--line-strong); border-radius: 999px; cursor: pointer; }
.wcs-people input { width: 1.4rem; height: 1.4rem; flex: none; }
.wcs-people input:checked + span { font-weight: 800; }
@media (forced-colors: active) { .rbtn { border: 2px solid ButtonText; } }

.rcard { position: relative; } .rcard .rcard-btn { padding-right: 3.6rem; }
.rfav { position: absolute; right: .4rem; top: .4rem; min-width: 48px; min-height: 48px; border: 0; background: transparent; font-size: 1.7rem; line-height: 1; color: var(--accent); cursor: pointer; border-radius: 12px; }
.rfav[aria-pressed="true"] { color: #c0392b; } .rfav.big { position: static; font-size: 1.1rem; font-weight: 700; border: 2px solid var(--line); padding: 0 1rem; min-height: 48px; }
.tree-host .edges, .tree-host .routeg { pointer-events: none; }
.legend, .legend * { pointer-events: none; }

/* generation labels on the tree */
.genrail { position: absolute; left: 0; top: 0; width: 0; height: 100%; pointer-events: none; z-index: 1; }
.genrail span { position: absolute; left: .6rem; top: 0; white-space: nowrap; font-size: .78rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--muted, #5b6b62); background: color-mix(in srgb, var(--bg) 85%, transparent); padding: .1rem .5rem; border-radius: 999px; }
.hint { max-width: calc(100% - 1.4rem); white-space: normal; }
/* phones: the tree tools sit in one row you can slide, so the tree gets the screen */
@media (max-width: 699px) {
  .treebar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .treebar::-webkit-scrollbar { display: none; }
  .treebar select { flex: 0 0 10.5rem; }
  .treebar .btn { flex: 0 0 auto; }
}
.tree-host ~ .hint, .canvas .hint, .canvas .minimap, .canvas .legend { z-index: 2; }

/* same person, entered twice */
.sametable { width: 100%; border-collapse: collapse; }
.sametable th, .sametable td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.sametable thead th { font-size: .9rem; }
.samepick { display: flex; gap: .5rem; align-items: flex-start; min-height: 2.75rem; cursor: pointer; }
.samepick input { width: 1.4rem; height: 1.4rem; margin-top: .1rem; flex: none; }
.tablewrap { overflow-x: auto; }
.codebig { font: 700 1.6rem/1.2 ui-monospace, Menlo, monospace; letter-spacing: .08em; margin: .4rem 0 .6rem; word-break: break-all; }
.ctaband h2 { margin-left: auto; margin-right: auto; }
.ctaband .cta { gap: .8rem; flex-wrap: wrap; }
#s-all h3 a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
/* on computers the sample tree sits in a wider, tablet-shaped frame so the whole family fits */
@media (min-width: 1000px) { .hero { grid-template-columns: 1fr 1fr; } .phone { width: min(100%, 540px); aspect-ratio: 4 / 3.7; border-radius: 26px; } }
/* the color key sits top-right, clear of the minimap and the people in the bottom row */
.canvas .legend { top: .7rem; right: .8rem; left: auto; bottom: auto; }
@media (max-width: 699px) { .canvas .minimap { display: none; } .canvas .legend { top: auto; bottom: .8rem; left: .8rem; right: auto; } }
/* a real family has no sample color sides: no key, and a calm green edge on every box */
html.is-real .canvas .legend { display: none; }
.person rect.stripe[class="stripe "] { fill: var(--accent); }

/* ---------- Polish pass: calmer headings, tidier controls, warmer Home and Menu ---------- */
/* a page title takes keyboard focus when a page opens (so screen readers announce it) but needs no box drawn round it */
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus, h1:focus-visible, .page > div > h1:focus { outline: none; }
/* every text box looks the same, even ones written without a type */
input:not([type]), input[type="password"] { font: 1rem var(--f-body); color: var(--ink); background: var(--surface); border: 2px solid var(--line-strong); border-radius: 12px; padding: .8rem 1rem; min-height: 3.1rem; width: 100%; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus, textarea:focus, select:focus { border-color: var(--accent); outline: 3px solid var(--focus); outline-offset: 2px; }
::placeholder { color: var(--ink-2); opacity: .75; }
progress { width: 100%; height: .9rem; accent-color: var(--accent); }
/* the favorite star: one round button beside the title instead of a wide one above it */
.favbtn { width: 44px; min-width: 44px; padding: 0; justify-content: center; border-color: var(--line); }
.favbtn span[aria-hidden] { font-size: min(1.35rem, 24px); line-height: 1; }
.favbtn .favtxt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.headtop { flex-wrap: nowrap; }
.headtop .linkbtn, .page > div > a.linkbtn:first-child { min-width: 0; overflow-wrap: anywhere; display: inline-flex; align-items: center; }   /* every "Back to" link is a 44px target */
/* "what works in this test" folds away until asked for */
details.intest { padding: 0; background: var(--accent-soft); border-radius: 12px; }
details.intest > summary { cursor: pointer; padding: .7rem 1rem; font-weight: 700; min-height: 2.75rem; display: flex; align-items: center; gap: .5rem; list-style: none; }
details.intest > summary::-webkit-details-marker { display: none; }
details.intest > summary::before { content: '+'; font-weight: 700; width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 2px solid var(--accent); color: var(--accent); display: inline-grid; place-items: center; line-height: 1; flex: none; }
details.intest[open] > summary::before { content: '–'; }
details.intest > div { display: grid; gap: .3rem; padding: 0 1rem .9rem; font-size: .92rem; }
/* the Memorial tag is a tag, not a card */
.chip.memorial { display: inline-block; padding: .1rem .6rem; border: 1.5px solid var(--line-strong); border-radius: 999px; background: none; gap: 0; }
/* Home: six things you can do, each with a picture */
.quick.six { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .quick.six { grid-template-columns: repeat(3, 1fr); } }
.qbtn.pic { grid-template-columns: auto 1fr; align-items: center; column-gap: .7rem; min-height: 4.4rem; padding: .8rem .9rem; border-color: var(--line); box-shadow: var(--shadow); transition: transform .12s ease, border-color .12s ease; }
.qbtn.pic:hover, .qbtn.pic:focus-visible { border-color: var(--accent); transform: translateY(-1px); }
.qbtn.pic .qi { grid-row: span 2; width: 2.6rem; height: 2.6rem; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.qbtn.pic .qi svg { width: 1.45rem; height: 1.45rem; }
@media (max-width: 639px) { /* phones: icon above the words, so short labels don't wrap into four lines */
  .qbtn.pic { grid-template-columns: 1fr; align-items: start; row-gap: .35rem; }
  .qbtn.pic .qi { grid-row: auto; }
}
.qbtn.pic b { align-self: end; line-height: 1.2; }
.qbtn.pic span:not(.qi) { align-self: start; line-height: 1.25; }
@media (max-width: 380px) { .qbtn.pic { grid-template-columns: 1fr; } .qbtn.pic .qi { grid-row: auto; } }
/* the next gathering, front and centre */
.nextup { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; display: grid; gap: .6rem; }
.nextup .nu-top { display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: center; }
.nextup h2 { margin: 0; font-size: 1.25rem; }
.nextup .nu-count { display: flex; gap: .4rem; flex-wrap: wrap; }
.nextup .nu-count span { background: var(--surface-2); border-radius: 999px; padding: .15rem .7rem; font-size: .88rem; font-weight: 700; }
/* people get a coloured circle with their initial */
.av { width: 2.4rem; height: 2.4rem; border-radius: 50%; display: inline-grid; place-items: center; font: 700 1rem var(--f-display); color: #fff; flex: none; }
.feed li { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: center; }
.feed li .ft { min-width: 0; }
.feed li .fw { display: block; font-size: .85rem; color: var(--ink-2); }
/* Menu: each area has a picture */
.areas .linkrow { grid-template-columns: auto 1fr auto; column-gap: .9rem; align-items: center; }
.areas .linkrow .ai { grid-row: span 2; width: 2.8rem; height: 2.8rem; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.areas .linkrow .ai svg { width: 1.5rem; height: 1.5rem; }
.areas .linkrow .lr-t, .areas .linkrow .lr-s { grid-column: 2; }
.areas .linkrow .lr-go { grid-column: 3; grid-row: 1 / span 2; }
/* Memories: stories first, with a clear pair of buttons on top */
.memadd { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.memadd .qbtn.pic { min-height: 4rem; }
@media (max-width: 380px) { .memadd { grid-template-columns: 1fr; } }
.story { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.story + .story { margin-top: .9rem; }
/* photo strip on Home */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 6.2rem; gap: .5rem; overflow-x: auto; padding-bottom: .3rem; scrollbar-width: thin; }
.strip img, .strip .ph { width: 6.2rem; height: 6.2rem; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); display: block; }
/* gentle arrival of each page; off for people who ask for less motion */
/* buttons feel pressed */
.btn:active, .qbtn:active, .tab:active { transform: scale(.98); }

/* Christmas card list */
.clbtns { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.clbtns .cdtog { min-width: min(6.5rem, 100%); }
.clrow { grid-template-columns: auto 1fr; } .clrow > .clbtns, .clrow > .btn { grid-column: 2; justify-self: start; }
.clrow .clmore { grid-column: 1 / -1; } .clrow .clmore summary { cursor: pointer; font-size: .95rem; color: var(--muted); min-height: 44px; display: flex; align-items: center; }
.clrow.off { opacity: .75; } .clnote-show { font-style: italic; }
.clsum { margin: .8rem 0 .4rem; } .clbar { width: 100%; height: .9rem; accent-color: var(--accent); margin-bottom: .8rem; }
@media (min-width: 700px) { .clrow { grid-template-columns: auto 1fr auto; } .clrow > .clbtns, .clrow > .btn { grid-column: 3; justify-self: end; } }

.realorder{display:grid;gap:.4rem;justify-items:start}.realorder .btn{text-decoration:none}
/* ---------- the example family (/example/): banner, things to try, tour, Family plan tags, drawn pictures ---------- */
.exbar { background: var(--accent-soft); color: var(--ink); border-bottom: 2px solid var(--accent); padding: .45rem max(1rem, env(safe-area-inset-left, 0px)) .5rem max(1rem, env(safe-area-inset-right, 0px)); display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; font-size: min(1rem, 19px); }
.exbar p { margin: 0; line-height: 1.35; flex: 1 1 16rem; }
.exbar-acts { display: flex; flex-wrap: wrap; gap: .3rem .45rem; }
.exbar-acts a { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .15rem .8rem; border-radius: 999px; border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 700 min(.92rem, 17px)/1.2 var(--f-body); text-decoration: none; }
.exbar-acts a:hover { border-color: var(--accent); }
.exbar-acts .exbar-main { border-color: var(--accent); color: var(--accent); }
.exbar-n { font-weight: 400; color: var(--ink-2); white-space: nowrap; }
@media (max-width: 699px) {
  .exbar { padding-top: .35rem; padding-bottom: .4rem; }
  .exbar p { flex-basis: 100%; font-size: min(.95rem, 17px); }
  .exbar-acts { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .exbar-acts a { justify-content: center; text-align: center; padding: .15rem .5rem; font-size: min(.86rem, 16px); }
  .exbar-n { display: none; }
  .exbar.folded .exbar-acts { display: none; }
}
.exwelcome { background: var(--surface); border: 2px solid var(--accent); border-radius: var(--radius); padding: 1.3rem 1.2rem; display: grid; gap: .7rem; box-shadow: var(--shadow); }
.exwelcome h1 { font-size: clamp(1.7rem, 5.5vw, 2.4rem); }
.extry-g { margin: 1.3rem 0 .4rem; font-size: 1.05rem; }
.extry { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.extry-row { position: relative; display: grid; grid-template-columns: 2rem 1fr; gap: .15rem .8rem; align-items: start; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; min-height: 44px; }
.extry-row:hover { border-color: var(--accent); }
.extry-box { grid-row: span 2; width: 1.7rem; height: 1.7rem; border-radius: 8px; border: 2px solid var(--line-strong); display: grid; place-items: center; font-weight: 700; color: var(--on-accent); margin-top: .1rem; }
.extry-row.done .extry-box { background: var(--accent); border-color: var(--accent); }
.extry-t { font-weight: 700; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.extry-s { color: var(--ink-2); font-size: .95rem; }
.extour { order: -1; background: var(--surface); border-bottom: 3px solid var(--accent); box-shadow: var(--shadow); padding: .7rem max(1rem, env(safe-area-inset-left, 0px)) .8rem; }
.extour-in { max-width: 46rem; margin: 0 auto; display: grid; gap: .35rem; }
.extour h2 { font-size: 1.3rem; }
.extour h2:focus { outline: none; }
.extour h2:focus-visible { outline: 3px solid var(--focus); }
.extour .btnrow { margin-top: .3rem; }
html.ex-touring .fab { display: none; }
@media (max-width: 699px) {   /* on a phone the tour is a slim bar: the banner and the drag hint step aside until it ends */
  html.ex-touring .exbar, html.ex-touring .canvas .hint { display: none; }
  .extour { padding-top: .4rem; padding-bottom: .45rem; }
  .extour-in { gap: .15rem; }
  .extour h2 { font-size: min(1.1rem, 19px); }
  .extour .eyebrow { font-size: min(.75rem, 14px); }
  .extour p:not(.eyebrow) { font-size: min(.92rem, 16px); line-height: 1.35; }
  .extour .btnrow { margin-top: .1rem; gap: .4rem; }
}
.plantag { display: inline-block; font: 700 .78rem/1.3 var(--f-body); letter-spacing: .02em; padding: .1rem .55rem; border-radius: 999px; border: 1.5px solid var(--accent); color: var(--accent); background: var(--surface); vertical-align: middle; white-space: nowrap; }
.plannote { margin-top: .5rem; }
.plannote .plantag { margin-right: .35rem; }
.incl { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); margin-top: 1.2rem; }
.incl-col { border: 2px solid var(--line-strong); border-radius: var(--radius); padding: 1.2rem; background: var(--surface); display: grid; gap: .5rem; align-content: start; }
.incl-col.pro { border-color: var(--accent); }
.incl-col h2 { font-size: 1.35rem; }
.incl-price { font: 700 1.5rem var(--f-display); }
.incl-col ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .3rem; }
.evreplies { margin-top: .9rem; display: grid; gap: .25rem; }
.evreplies h3 { font-size: 1.05rem; }
.storyart { margin: .8rem 0; }
.artpic { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 12px; }
.storyart .artpic { max-width: 30rem; }
/* front page: the example family's tiles, and small helpers */
.sec-lede { max-width: 44rem; margin-top: 1rem; font-size: 1.08rem; }
.hero-note { margin-top: 1rem; max-width: 34rem; }
.extiles { list-style: none; padding: 0; margin: 1.8rem 0 1.4rem; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); }
.extile { display: grid; gap: .3rem; height: 100%; align-content: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .7rem 1rem; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.extile:hover { border-color: var(--accent); }
.extile-pic { border-radius: 10px; margin-bottom: .45rem; aspect-ratio: 16 / 9; }
.extiles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
@media (max-width: 600px) {
  .extile { grid-template-columns: 6.2rem 1fr; grid-template-rows: auto 1fr; gap: .15rem .8rem; padding: .6rem; align-items: start; }
  .extile-pic { grid-row: span 2; aspect-ratio: 1 / 1; margin: 0; }
  .extile-t { font-size: 1.05rem; padding: 0; }
  .extile-s { padding: 0; }
}
.extile-t { font: 700 1.12rem/1.2 var(--f-display); color: var(--accent); text-decoration: underline; text-underline-offset: 3px; padding-inline: .2rem; }
.extile-s { color: var(--ink-2); font-size: .95rem; padding-inline: .2rem; }
.arrowlink { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.arrowlink::after { content: ' \2192'; white-space: pre; }
.steps.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1060px) { .steps.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .steps.four { grid-template-columns: 1fr; } }
.plan-note { font-size: .92rem; color: var(--ink-2); margin: -.3rem 0 .8rem; }
