/* HeartBank® identity pages — one stylesheet for login.333.eco, sign.333.eco and origin.333.eco. Ported from the drawings on
   demo.333.eco (board.css): same tokens, same components; made responsive (the boards are drawn at 390 px) and set to follow
   the person's own light/dark setting, which the footer toggle (Auto / Light / Dark, theme.js) may override. The three services
   each ship an IDENTICAL copy (a test in each repo pins the hash). */
:root{
  --bg:#fcfbfe; --surface:#f4f1fb; --surface-2:#ebe7f5; --line:rgba(20,16,30,.12); --line-strong:rgba(20,16,30,.28);
  --ink:#16141c; --ink-dim:#5b5766; --ink-faint:#6e6a79;
  --accent:#0f52ba; --accent-ink:#fff; --danger:#b3261e;
  --wash:color-mix(in oklab,var(--accent) 9%,transparent); --edge:color-mix(in oklab,var(--accent) 30%,transparent);
  --font-text:"IBM Plex Sans",ui-sans-serif,system-ui,sans-serif; --font-mono:"IBM Plex Mono",ui-monospace,Menlo,monospace;
  --font-khmer:"Noto Sans Khmer","Khmer Sangam MN",sans-serif; --r:16px; --r-pill:999px; color-scheme:light;
  /* THE TYPE SCALE, every estate site (founder 2026-11-20): 12 footer + fine print · 14 secondary, labels, pills · 16 body, fields,
     buttons · 20 section + card titles · 28 / 40 page titles below / at 1024 px (a step, never a fluid size). No size outside it. */
  --fs-12:12px; --fs-14:14px; --fs-16:16px; --fs-20:20px; --fs-28:28px; --fs-40:40px; --fs-title:var(--fs-28);
}
@media (prefers-color-scheme:dark){:root:not([data-theme=light]){
  --bg:#0a0a0f; --surface:#17171d; --surface-2:#1f1f27; --line:rgba(255,255,255,.08); --line-strong:rgba(255,255,255,.18);
  --ink:#f5f5f7; --ink-dim:#9b9ba5; --ink-faint:#888893;
  --accent:color-mix(in oklab,#0f52ba 55%,#fff); --accent-ink:#0a0a0f; --danger:#ff8a80; color-scheme:dark;
}}
:root[data-theme=dark]{
  --bg:#0a0a0f; --surface:#17171d; --surface-2:#1f1f27; --line:rgba(255,255,255,.08); --line-strong:rgba(255,255,255,.18);
  --ink:#f5f5f7; --ink-dim:#9b9ba5; --ink-faint:#888893;
  --accent:color-mix(in oklab,#0f52ba 55%,#fff); --accent-ink:#0a0a0f; --danger:#ff8a80; color-scheme:dark;
}
/* The beat's two numbers, copied from brand.333.eco/css/tokens.css (motion.css does not define them; an html rule, not :root). */
html{--beat-duration:1.5s;--beat-delay:0s}
*{box-sizing:border-box}[hidden]{display:none!important}[data-theme-js] .seg[data-theme-ui][hidden]{display:inline-flex!important}
html,body{margin:0;background:var(--bg)}
body{color:var(--ink);font:var(--fs-16)/1.5 var(--font-text);-webkit-font-smoothing:antialiased}
html[lang=km] body{font-family:var(--font-khmer),var(--font-text);line-height:1.7}
a{color:var(--accent)}
.app{max-width:44rem;margin:0 auto;padding:0 20px 28px;min-height:100vh;display:flex;flex-direction:column}
header{display:flex;align-items:center;justify-content:space-between;padding:18px 0 10px}
.wordmark{font-weight:600;font-size:var(--fs-20);white-space:nowrap;letter-spacing:-.01em;
  --emblem-cap:.68em;--emblem-size:calc(var(--emblem-cap)*1.1);--emblem-box:calc(var(--emblem-size)/.7534)}
.wordmark svg{width:var(--emblem-box);height:var(--emblem-box);color:var(--accent);vertical-align:baseline;
  margin-top:calc(var(--emblem-box)*-.09312);margin-bottom:calc(var(--emblem-box)*-.15333);
  margin-left:calc(var(--emblem-box)*-.15343 + 1px);margin-right:calc(var(--emblem-box)*-.09312 - 1px)}
.wordmark sup{font-size:.55em;font-weight:500;vertical-align:.62em;margin-left:.06em;line-height:0}
.seg{display:inline-flex;border:1px solid var(--line-strong);border-radius:var(--r-pill);padding:2px;font-size:var(--fs-12)}
.seg>span,.seg>a,.seg>button{padding:3px 10px;border-radius:var(--r-pill);color:var(--ink-dim);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer}
.seg .on,.seg button[aria-pressed=true]{background:var(--ink);color:var(--bg)}
main{flex:1}
h1{font-size:var(--fs-title);line-height:1.2;margin:14px 0 6px;letter-spacing:-.015em}
h3{font-size:var(--fs-16)}/* a sub-heading: 16, bold — a bare h3 fell to the browser's 18.72 px, off the scale (developers /log-in, 2026-11-20) */
h2{font-size:var(--fs-20);margin:18px 0 6px}
.lede{color:var(--ink-dim);margin:0 0 18px}
.card{border:1px solid var(--line);border-radius:var(--r);background:var(--surface);padding:16px;margin:0 0 12px}
.card h2{font-size:var(--fs-20);margin:0 0 6px}.card p{margin:0;color:var(--ink-dim);font-size:var(--fs-14)}
.note{border-left:3px solid var(--accent);background:var(--wash);border-radius:0 12px 12px 0;padding:12px 14px;font-size:var(--fs-14);margin:0 0 12px}
.btn{display:block;width:100%;border:0;border-radius:14px;padding:15px;font:600 var(--fs-16) var(--font-text);text-align:center;text-decoration:none;
  background:var(--accent);color:var(--accent-ink);margin:8px 0 0;cursor:pointer}
html[lang=km] .btn{font-family:var(--font-khmer),var(--font-text)}
.btn.ghost{background:transparent;color:var(--ink);border:1px solid var(--line-strong)}
.btn svg{vertical-align:-3px;margin-right:6px}
label{display:block;font-size:var(--fs-14);color:var(--ink-dim);margin-top:12px}
.field{display:block;width:100%;border:1px solid var(--line-strong);border-radius:12px;padding:12px 14px;background:var(--bg);color:var(--ink);font:var(--fs-16) var(--font-text);margin-top:6px}
/* /build Default 19 §no-zoom-fields (founder 2026-11-19): every text field at least 16px, so an iPhone never zooms when one is tapped; a field with no size of its own gets 16px (zero specificity, so a larger component wins); a rule that sets a field's size sets 16px or more. */
:where(input:not([type=checkbox],[type=radio],[type=range],[type=file]),textarea,select){font-size:var(--fs-16)}
.field:focus-visible,.btn:focus-visible,a:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
/* The code field (founder 2026-11-28: "make the code field more beautiful; perhaps show digit placeholders?"): ONE input (autofill,
   paste and screen readers see one field), six soft cells drawn behind it, a faint 0 in each until a digit fills it. Monospace digits
   advance 1ch + 1ch of letter-spacing, so each lands on a 2ch cell: the cells start at .5ch, the text at 1ch, and the field is 13ch
   wide, so the sixth digit's trailing space never scrolls it. Login's pages cap it at six digits (maxlength). */
.otp{font:600 var(--fs-28)/1.2 var(--font-mono);letter-spacing:1ch;text-align:left;width:calc(13ch + 4px);max-width:100%;padding:12px 0 12px 1ch;
  caret-color:var(--accent);background:repeating-linear-gradient(90deg,transparent 0 3px,var(--surface-2) 3px calc(2ch - 3px),transparent calc(2ch - 3px) 2ch) .5ch 50%/12ch calc(100% - 12px) no-repeat var(--bg)}
.otp::placeholder{color:var(--ink-faint);opacity:.45}
.more{display:block;margin:2px 0 0;padding:12px 0;text-align:center;font-weight:600;font-size:var(--fs-14)}
.fine{color:var(--ink-dim);font-size:var(--fs-14);margin:10px 0 0}
.row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-top:1px solid var(--line)}.row:first-of-type{border-top:0}
.row .t{font-size:var(--fs-14);font-weight:600}.row .s{font-size:var(--fs-14);color:var(--ink-dim)}
.list{margin:0 0 8px;padding:0;list-style:none}
footer{border-top:1px solid var(--line);padding-top:14px;margin-top:24px;color:var(--ink-faint);font-size:var(--fs-12);text-align:center}
footer p{margin:0 0 10px}
.foot-row{display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;color:var(--ink-dim);font-size:var(--fs-12)}
.foot-row p{margin:0}.foot-row a{color:inherit}
.sm{font-size:.6em;vertical-align:.6em;line-height:0;margin-left:.04em}
/* For a shell whose language the page script picks (origin.333.eco): both languages are rendered, the html lang shows one. */
html[lang=km] .l-en,html:not([lang=km]) .l-km{display:none!important}
.btn.small{display:inline-block;width:auto;margin:0;padding:8px 12px;font-size:var(--fs-14)}
.acts{display:flex;gap:8px;flex:none}
.tag{font-size:var(--fs-12);color:var(--ink-dim);border:1px solid var(--line-strong);border-radius:var(--r-pill);padding:1px 8px;margin-left:6px;font-weight:500}
.wordmark-link{text-decoration:none;color:inherit}
.head-end{display:inline-flex;align-items:center;gap:8px;flex:none}
.head-btn{padding:4px 11px;font-size:var(--fs-12);border-radius:var(--r-pill);white-space:nowrap}
/* An app's own header (B-Origin): the wordmark, the app's name in the true center, the controls. On a phone the name takes its own row, aligned left. */
header.has-name{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px}
header.has-name .head-end{justify-self:end}
.app-name{font-weight:650;font-size:var(--fs-16);color:var(--ink);white-space:nowrap;text-decoration:none;text-align:center}
@media (max-width:560px){header.has-name{grid-template-columns:auto auto;row-gap:6px}header.has-name .app-name{grid-row:2;grid-column:1/-1;justify-self:start;text-align:left}}
/* A662 (founder 2026-11-19: "small pill and switch if mobile", then "on desktop, the pill and the switch don't match"): the header's
   Log in / Log out pill and its language switch are ONE height in English and Khmer alike (Khmer's taller line made them 47 and 32):
   34px on a wider screen, 28px on a phone. */
header .btn.head-btn{display:inline-flex;align-items:center;height:34px;padding:0 14px;font-size:var(--fs-14);line-height:1}header .seg{height:34px;padding:2px;align-items:stretch;font-size:var(--fs-14)}header .seg>span,header .seg>a,header .seg>button{display:inline-flex;align-items:center;padding:0 11px;line-height:1}
@media (max-width:560px){header .btn.head-btn{height:28px;padding:0 11px;font-size:var(--fs-12)}header .seg{height:28px;padding:1px;font-size:var(--fs-12)}header .seg>span,header .seg>a,header .seg>button{padding:0 9px}}
.nav{display:flex;gap:2px;margin:2px 0 10px;border-bottom:1px solid var(--line);overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.nav::-webkit-scrollbar{display:none}
.nav{scroll-snap-type:x mandatory;padding-right:48px;-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 48px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 48px),transparent)}.nav a{scroll-snap-align:start}
/* The › (theme.js adds it; founder 2026-11-20): pinned to the strip's right end, carrying the fade; with it the strip's own fade and end padding are off. */
.nav.has-more{padding-right:0;-webkit-mask-image:none;mask-image:none}
.nav-more{position:sticky;right:0;flex:none;display:flex;align-items:center;justify-content:flex-end;width:48px;margin-left:auto;padding-right:2px;font:600 var(--fs-20)/1 var(--font-text);color:var(--ink-dim);background:linear-gradient(to right,transparent,var(--bg) 55%);cursor:pointer;user-select:none;-webkit-user-select:none}
.nav-more:hover{color:var(--ink)}
/* The app's name: in the header from 561 px up; on a phone (≤ 560 px) it is the strip's first item instead (founder 2026-11-20). One string, rendered
   in both places by each site's server, so it is there from the first paint; CSS shows exactly one. */
.nav .nav-name{display:none;color:var(--ink);font-weight:650}
@media (max-width:560px){header.has-name .app-name{display:none}.nav .nav-name{display:block}
  /* the name IS the way home on a phone: the Home tab right after it (a root address) is dropped there, and the name carries Home's
     current-page underline (reconciled 2026-11-20 at the founder's "Reconcile the three questions for me"; correctable) */
  .nav .nav-name+a[href$="/"]{display:none}.nav .nav-name:has(+a[href$="/"][aria-current=page]){color:var(--ink);border-bottom-color:var(--accent)}}
@media (min-width:1024px){:root{--fs-title:var(--fs-40)}
  .app:has(>.nav){max-width:62rem;display:grid;grid-template-columns:12.5rem minmax(0,1fr);grid-template-rows:auto 1fr auto;grid-template-areas:"head head" "nav main" "foot foot";column-gap:40px}
  .app:has(>.nav)>header{grid-area:head}.app:has(>.nav)>header.has-name{grid-template-columns:12.5rem minmax(0,1fr) auto;column-gap:40px}.app:has(>.nav)>header.has-name .app-name{justify-self:start;text-align:left}.app:has(>.nav)>main{grid-area:main;min-width:0}.app:has(>.nav)>footer{grid-area:foot}
  .app:has(>.nav)>.nav{grid-area:nav;flex-direction:column;align-self:start;position:sticky;top:20px;gap:2px;margin:12px 0 0;padding:0;border-bottom:0;overflow:visible;scroll-snap-type:none;-webkit-mask-image:none;mask-image:none}
  .app:has(>.nav)>.nav .nav-more{display:none}.app:has(>.nav)>.nav a{white-space:normal;border-bottom:0;margin:0;border-left:2px solid transparent;border-radius:0 10px 10px 0;padding:9px 12px}
  .app:has(>.nav)>.nav a[aria-current=page]{border-left-color:var(--accent);background:var(--wash)}.app:has(>.nav)>.nav a:hover{color:var(--ink)}}
.nav a{padding:8px 11px;font-size:var(--fs-14);font-weight:600;color:var(--ink-dim);text-decoration:none;border-bottom:2px solid transparent;margin-bottom:-1px;white-space:nowrap}
.nav a[aria-current=page]{color:var(--ink);border-bottom-color:var(--accent)}
.hero{text-align:center;padding:18px 0 6px}
.cta-grid{display:grid;gap:12px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}   /* read aloud, never drawn: a clipped 1px box, never off-screen (2026-11-20) — the wordmark's name "HeartBank®" rides in it */
.mark{font-weight:600}
.btn[aria-disabled=true],.btn:disabled{opacity:.6;pointer-events:none}
/* The heartbeat, verbatim from brand.333.eco/css/motion.css (two unequal beats, then rest: the morphology is the signature).
   On the wordmark's emblem only (chrome), never beside a person's name. */
@keyframes heartbeat{0%,100%{transform:scale(1)}14%{transform:scale(1.3)}28%{transform:scale(1)}42%{transform:scale(1.3)}70%{transform:scale(1)}}
.beating{animation:heartbeat var(--beat-duration) var(--beat-delay) infinite;transform-origin:center}
@media (prefers-reduced-motion:reduce){.beating{animation:none}}
/* "Working": three bouncing dots (/build Default 12); still under reduced motion. */
.bdots{display:inline-flex;gap:4px;align-items:center;height:1em;vertical-align:middle;margin-right:6px}
.bdots i{width:6px;height:6px;border-radius:50%;background:currentColor;animation:bdot 1s infinite ease-in-out}
.bdots i:nth-child(2){animation-delay:.15s}.bdots i:nth-child(3){animation-delay:.3s}
@keyframes bdot{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-5px)}}
@media (prefers-reduced-motion:reduce){.bdots i{animation:none}}
/* A way out that appears only if a page that moves on by itself is still here after a few seconds. */
.later{opacity:0;animation:later 0s 4s forwards}
@keyframes later{to{opacity:1}}
@media (prefers-reduced-motion:reduce){.later{animation:none;opacity:1}}
/* A page title with one action at its right (Log-in Methods → Add Method). */
.titlerow{display:flex;align-items:center;justify-content:space-between;gap:12px}
.titlerow h1{margin:0}
/* A full-width action at the foot of a page (Log-in Methods ⇄ Add Method). */
.btn.wide{display:block;width:100%;box-sizing:border-box;text-align:center;margin-top:20px}
/* Every status update is a temporary toast (public/toast.js, /build Default 15): one at the foot of the page, gone by itself. */
.toast{position:fixed;left:50%;bottom:24px;z-index:40;translate:-50% 12px;opacity:0;pointer-events:none;transition:opacity .2s,translate .2s;
  background:var(--surface);border:1px solid var(--line-strong);border-radius:22px;padding:10px 18px;font-size:var(--fs-14);box-shadow:0 8px 24px rgba(0,0,0,.18);
  width:max-content;max-width:min(28rem,calc(100vw - 32px));text-align:center;color:var(--ink)}
.toast.on{opacity:1;translate:-50% 0;pointer-events:auto}
@media (prefers-reduced-motion:reduce){.toast{transition:none}}
/* ⭐ A TABLE OF 2+ COLUMNS IS A STACK OF CARDS ON A PHONE (founder 2026-11-20: tables squeezed words mid-word under 600 px). Each row a
   card, each cell its label then its value; the header row is read aloud, never drawn. Opt-in by data: a page stamps `data-label` on
   the cells of a 2+ column table (and the table roles, which display:block would drop); a table without labels is untouched. */
@media (max-width:600px){
table:has(td[data-label]),table:has(td[data-label])>tbody,table:has(td[data-label]) tr,table:has(td[data-label]) td,table:has(td[data-label])>tbody th{display:block;width:auto}
table:has(td[data-label])>thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
table:has(td[data-label]) tr{padding:12px 0;border-bottom:1px solid var(--line)}
table:has(td[data-label]) tr:last-child{border-bottom:0}
table:has(td[data-label]) td,table:has(td[data-label])>tbody th{padding:3px 0;border:0;text-align:left}
table:has(td[data-label]) [data-label]::before{content:attr(data-label);display:block;font-size:var(--fs-12);font-weight:500;color:var(--ink-dim);margin-bottom:2px}
}
