/* Das Parivaar: design tokens and components. No build step.
 *
 * The look: a marigold ground with indigo ink, set in the Anek type family, which was drawn as one
 * design across the ten Indian scripts the site speaks plus Latin. Marigold and indigo are fixed
 * brand colours; everything else goes through the semantic tokens so light and dark both work.
 * Indian scripts need more line height than Latin: see the html:not([lang="en"]) rules. */

:root {
  /* brand */
  --genda: #F5A300;        /* marigold: hero ground, highlights */
  --genda-deep: #B87400;   /* marigold dark enough for large text on white */
  --neel: #1B1F5E;         /* indigo ink: text on marigold, primary actions */
  --kumkum: #C8102E;       /* vermilion: the status dot, errors */
  --tulsi: #1E6B4A;        /* green: success, verified */

  /* semantic */
  --bg: #FFFFFF;
  --surface: #F3F4FB;
  --ink: #14173F;
  --muted: #555A80;
  --line: #D9DCEA;
  --accent: var(--genda-deep);
  --action: var(--neel);
  --on-action: #FFFFFF;

  --font: "Anek Latin", "Anek Devanagari", "Anek Kannada", "Anek Telugu", "Anek Tamil", "Anek Malayalam",
          "Anek Gujarati", "Anek Gurmukhi", "Anek Bangla", "Anek Odia", system-ui, "Noto Sans", sans-serif;
  --wrap: 68rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: .5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1130;
    --surface: #171A45;
    --ink: #F1EFE4;
    --muted: #A9AED1;
    --line: #2C3070;
    --accent: var(--genda);
    --action: var(--genda);
    --on-action: var(--neel);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--font);
}
html:not([lang="en"]) body { line-height: 1.75; }

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img, svg { max-width: 100%; }

h1 {
  font-weight: 800;
  font-stretch: 80%;
  font-size: clamp(2.6rem, 8.5vw, 5.25rem);
  line-height: .98;
  letter-spacing: -.012em;
  text-wrap: balance;
}
h2 {
  font-weight: 700;
  font-stretch: 88%;
  font-size: clamp(1.7rem, 4.2vw, 2.5rem);
  line-height: 1.1;
  text-wrap: balance;
}
h3 { font-weight: 700; font-size: 1.3rem; line-height: 1.25; }
html:not([lang="en"]) h1 { font-size: clamp(2.1rem, 6.6vw, 4rem); line-height: 1.28; letter-spacing: 0; font-stretch: 88%; }
html:not([lang="en"]) h2 { line-height: 1.4; }
html:not([lang="en"]) h3 { line-height: 1.5; }

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Translated text waits for its language file so non-English readers never see a flash of English (i18n.js). */
html.i18n-wait [data-i18n] { visibility: hidden; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; padding: .5rem 1.15rem;
  border: 2px solid transparent; border-radius: var(--radius);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--action); color: var(--on-action); }
.btn-primary:hover { filter: brightness(1.12); }
button.link {
  background: none; border: 0; padding: .35rem 0; min-height: 2.75rem;
  font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .25em;
}
button.link:hover { text-decoration-color: currentColor; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); min-height: 4.25rem; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; }
.brand-word { font-weight: 800; font-stretch: 84%; font-size: 1.4rem; line-height: 1; letter-spacing: -.005em; }
/* The lotus logo: five stacked images. The centre stays still; each row of petals turns slowly, neighbours in
 * opposite directions. Slow on purpose: it should be noticed after a while, not pull the eye from the page. */
/* The wordmark: "parivara" in four old scripts that take turns (Brahmi, Kharosthi, Sharada, Devanagari).
 * The four words are stacked in one grid cell, so the space is as wide as the widest and nothing shifts;
 * each fades in for a few seconds in its turn. Their fonts have one weight, so no bold: a faked bold smears. */
.brand-scripts {
  display: inline-grid; align-items: center; justify-items: start;
  font-weight: 400; font-stretch: 100%; font-synthesis: none; letter-spacing: 0; line-height: 1.3;
}
.brand-scripts > span { grid-area: 1 / 1; opacity: 0; white-space: nowrap; }
.script-brahmi { font-family: "Noto Sans Brahmi", var(--font); font-size: 1.6rem; }
.script-kharosthi { font-family: "Noto Sans Kharoshthi", var(--font); font-size: 1.7rem; }
.script-sharada { font-family: "Noto Sans Sharada", var(--font); font-size: 1.75rem; }
.script-devanagari { font-family: "Noto Sans Devanagari", var(--font); font-size: 1.6rem; }
.admin-side .brand-scripts { font-size: .85em; }
.admin-side .brand-scripts > span { font-size: 1.4rem; }
@media (prefers-reduced-motion: no-preference) {
  .brand-scripts > span { animation: script-turn 20s infinite; }
  .brand-scripts > span:nth-child(2) { animation-delay: 5s; }
  .brand-scripts > span:nth-child(3) { animation-delay: 10s; }
  .brand-scripts > span:nth-child(4) { animation-delay: 15s; }
  /* one word's turn: fade in, hold, fade out, then wait while the other three have theirs */
  @keyframes script-turn { 0% { opacity: 0; } 4% { opacity: 1; } 24% { opacity: 1; } 28% { opacity: 0; } 100% { opacity: 0; } }
}
/* without motion, show the one most people can read */
@media (prefers-reduced-motion: reduce) { .brand-scripts > .script-devanagari { opacity: 1; } }
.brand-mark { position: relative; flex: none; display: block; width: 3.025rem; height: 3.025rem; }
.brand-mark img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
@media (prefers-reduced-motion: no-preference) {
  .lotus-ring1 { animation: lotus-turn 56s linear infinite; }
  .lotus-ring2 { animation: lotus-turn 72s linear infinite reverse; }
  .lotus-ring3 { animation: lotus-turn 90s linear infinite; }
  .lotus-ring4 { animation: lotus-turn 120s linear infinite reverse; }
  @keyframes lotus-turn { to { transform: rotate(1turn); } }
}

.lang-pick {
  position: relative; display: inline-flex; align-items: center; gap: .4rem;
  min-height: 2.75rem; padding-left: .8rem;
  border: 1.5px solid currentColor; border-radius: 999px;
}
.lang-pick select {
  appearance: none; -webkit-appearance: none;
  background: transparent; border: 0; border-radius: 999px;
  min-height: 2.6rem; padding: 0 2rem 0 .1rem; margin: 0;
  font: inherit; font-weight: 600; color: inherit; cursor: pointer;
}
.lang-pick select option { color: #14173F; background: #FFFFFF; }
.lang-pick::after {
  content: ""; position: absolute; right: .95rem; top: 50%;
  width: .5rem; height: .5rem; margin-top: -.42rem;
  border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg);
  pointer-events: none;
}

/* The home page opens on marigold in both colour schemes, so its header sits on marigold too. */
.page-home .site-header {
  background: var(--genda); color: var(--neel); border-bottom: 0;
  --action: var(--neel);
}

/* ---------- home: hero ---------- */
/* the 1px overlap hides the hairline some screens draw between two blocks of the same colour */
.hero { background: var(--genda); color: var(--neel); --action: var(--neel); margin-top: -1px; position: relative; overflow: hidden; isolation: isolate; }
/* Behind the banner, one shade off the marigold: the land of Akhand Bharat, whole, with the Shakti Peethas as
 * faint vermilion dots (web/assets/bharat.svg, built by brand/tools/build_svg.py). It is meant to be found
 * by a careful eye, not noticed at a glance: keep it this quiet, and never let the map be cropped.
 * To give the map room to spread, the home banner starts at the very top of the page (the header floats
 * over it) and, on wide screens, fills the first screen. */
.hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: .75rem var(--gutter);
  background: url("/assets/bharat.svg?v=1db0fca-20261123133048") no-repeat center / contain;
}
.page-home .site-header { position: absolute; inset: 0 0 auto 0; z-index: 2; background: transparent; }
.page-home .hero { padding-top: 4.25rem; margin-top: 0; }
@media (min-width: 60rem) {
  .page-home .hero { min-height: 100vh; min-height: 100svh; display: grid; align-items: center; }
}
@media (max-width: 59.99rem) {
  .hero::before { background-position: center 88%; }
}
.hero-grid {
  display: grid; gap: clamp(2.25rem, 6vw, 4rem);
  padding-block: clamp(1.75rem, 6vw, 4.5rem) clamp(2.75rem, 7vw, 5.5rem);
}
@media (min-width: 60rem) {
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: start; }
}
.lede { margin-top: 1.4rem; font-size: 1.25rem; line-height: 1.45; max-width: 34em; font-weight: 500; }
html:not([lang="en"]) .lede { font-size: 1.15rem; line-height: 1.75; }
.status { margin-top: 1.6rem; display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.125rem; }
.status .dot { flex: none; width: .7rem; height: .7rem; border-radius: 50%; background: var(--kumkum); box-shadow: 0 0 0 3px rgba(27, 31, 94, .16); }

/* The wall: the word for "family" in each language. It is the language chooser and the page's signature. */
.wall-title { font-size: 1.0625rem; font-weight: 700; font-stretch: 100%; line-height: 1.5; margin-bottom: .6rem; }
.wall-words { display: flex; flex-wrap: wrap; gap: .3rem .35rem; margin-inline: -.65rem; }
.word {
  display: inline-flex; flex-direction: column; align-items: flex-start;
  padding: .35rem .65rem .45rem; min-height: 2.75rem;
  background: transparent; color: inherit; border: 0; border-radius: .55rem;
  font: inherit; text-align: left; cursor: pointer;
}
/* Language names and wall words are set at 112.5% width, which nothing else on the site uses. Pages preload
 * a tiny subset of each script's font at exactly that width (the font link in each page head), so these
 * few words show in the right typeface without downloading ten full fonts. Because the width is reserved,
 * the subset never mixes into running text once a language's full font has loaded. */
.word-big { font-weight: 700; font-stretch: 112.5%; font-size: clamp(1.75rem, 6vw, 2.5rem); line-height: 1.3; }
.word[lang="en"] .word-big { font-stretch: 84%; font-weight: 800; }
.word-name { font-size: .875rem; font-weight: 500; font-stretch: 112.5%; line-height: 1.4; opacity: .82; }
.word:hover { background: rgba(27, 31, 94, .1); }
.word[aria-pressed="true"] { background: var(--neel); color: var(--genda); }
.word[aria-pressed="true"] .word-name { opacity: 1; color: #FFFFFF; }

/* The one piece of motion on the page: the wall settles into place as it loads. */
@media (prefers-reduced-motion: no-preference) {
  .word { animation: settle .5s cubic-bezier(.2, .7, .2, 1) backwards; }
  .word:nth-child(2) { animation-delay: 40ms; } .word:nth-child(3) { animation-delay: 80ms; }
  .word:nth-child(4) { animation-delay: 120ms; } .word:nth-child(5) { animation-delay: 160ms; }
  .word:nth-child(6) { animation-delay: 200ms; } .word:nth-child(7) { animation-delay: 240ms; }
  .word:nth-child(8) { animation-delay: 280ms; } .word:nth-child(9) { animation-delay: 320ms; }
  .word:nth-child(10) { animation-delay: 360ms; } .word:nth-child(11) { animation-delay: 400ms; }
  /* starts faint, not invisible: if a browser never runs the animation the words can still be read */
  @keyframes settle { from { opacity: .3; transform: translateY(.5rem); } }
}

/* ---------- home: bands ---------- */
.band { padding-block: clamp(3rem, 8vw, 5.5rem); }
.band-tint { background: var(--surface); }
.band h2 { max-width: 18em; }

.deeds { margin-top: clamp(1.75rem, 4vw, 2.75rem); display: grid; gap: 2.25rem clamp(2rem, 6vw, 4.5rem); }
@media (min-width: 46rem) { .deeds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.deeds h3 { display: flex; align-items: baseline; gap: .6rem; }
.deeds h3::before { content: ""; flex: none; width: .6rem; height: .6rem; border-radius: 50%; background: var(--genda); transform: translateY(-.08em); }
.deeds p { margin-top: .45rem; padding-left: 1.2rem; color: var(--muted); max-width: 32em; }

/* Joining is a real sequence, so these are numbered. */
.steps { margin-top: clamp(1.75rem, 4vw, 2.75rem); display: grid; gap: 1.75rem clamp(1.5rem, 4vw, 3rem); counter-reset: step; }
@media (min-width: 46rem) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.steps li { counter-increment: step; font-size: 1.2rem; font-weight: 600; line-height: 1.4; max-width: 16em; }
html:not([lang="en"]) .steps li { line-height: 1.65; font-size: 1.125rem; }
.steps li::before {
  content: counter(step); display: block;
  font-weight: 800; font-stretch: 75%; font-size: 3.75rem; line-height: 1; color: var(--accent); margin-bottom: .5rem;
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--neel); color: #FFFFFF; padding-block: clamp(2.25rem, 6vw, 3.5rem);
  --action: var(--genda);
}
.footer-grid { display: grid; gap: 1.75rem; }
@media (min-width: 46rem) { .footer-grid { grid-template-columns: auto 1fr; column-gap: 4rem; align-items: start; } .rights { grid-column: 1 / -1; } }
.site-footer h2 { font-size: 1rem; font-weight: 700; font-stretch: 100%; line-height: 1.5; color: var(--genda); }
.lang-list { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin-top: .25rem; }
.lang-list button { font-weight: 500; font-stretch: 112.5%; }
.lang-list button[aria-pressed="true"] { color: var(--genda); text-decoration-color: currentColor; font-weight: 700; }
.rights { font-size: .9375rem; opacity: .8; }

/* ---------- simple message pages (404, locked) ---------- */
.notice { padding-block: clamp(3rem, 12vw, 7rem); }
.notice h1 { font-size: clamp(2.1rem, 6vw, 3.5rem); line-height: 1.05; max-width: 14em; }
html:not([lang="en"]) .notice h1 { line-height: 1.35; }
.notice p { margin-top: 1rem; color: var(--muted); max-width: 32em; }
.notice .btn { margin-top: 1.75rem; }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); display: grid; gap: .5rem; width: min(92vw, 28rem); z-index: 50; }
.toast { background: var(--ink); color: var(--bg); padding: .8rem 1rem; border-radius: var(--radius); font-weight: 600; }
.toast-error { background: var(--kumkum); color: #FFFFFF; }

/* ---------- admin console ---------- */
.admin { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }
@media (min-width: 52rem) { .admin { grid-template-columns: 15rem minmax(0, 1fr); grid-template-rows: none; } }
.admin-side {
  background: var(--neel); color: #FFFFFF; padding: 1.1rem 1rem;
  --action: var(--genda);
}
.admin-side .brand-word { font-size: 1.2rem; }
.admin-tag { margin-top: -.35rem; font-size: .875rem; opacity: .75; padding-left: 3.625rem; }
.admin-nav { margin-top: 1.25rem; display: flex; gap: .25rem; overflow-x: auto; }
@media (min-width: 52rem) { .admin-nav { flex-direction: column; overflow: visible; } }
.admin-nav a {
  display: block; padding: .55rem .75rem; border-radius: .4rem; white-space: nowrap;
  color: inherit; text-decoration: none; font-weight: 600;
}
.admin-nav a:hover { background: rgba(255, 255, 255, .1); }
.admin-nav a[aria-current="page"] { background: var(--genda); color: var(--neel); }
.admin-main { padding: clamp(1.25rem, 4vw, 2.5rem); min-width: 0; }
.admin-main h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.1; font-stretch: 88%; letter-spacing: 0; }
.admin-main .notice { padding-block: 2.5rem; }
.facts { margin-top: 1.5rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1.25rem 2rem; }
.facts dt { font-size: .9375rem; color: var(--muted); }
.facts dd { margin: 0; font-size: 1.3rem; font-weight: 700; }
.table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 1rem; }
.table th, .table td { text-align: left; padding: .55rem .75rem .55rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-weight: 700; color: var(--muted); font-size: .9375rem; }
.admin-main h2 { font-size: 1.3rem; font-stretch: 100%; margin-top: 2.5rem; }
[hidden] { display: none !important; }

/* =====================================================================================
   Phase 1: header tools, forms, the member's account page, legal pages, admin tables
   ===================================================================================== */

:root { --danger: #B00D27; --ok: #1E6B4A; }
@media (prefers-color-scheme: dark) { :root { --danger: #FF8FA0; --ok: #7FD4AE; } }

/* marigold grounds keep indigo buttons with white text in both colour schemes */
.hero, .page-home .site-header { --on-action: #FFFFFF; }

.header-tools { display: flex; align-items: center; gap: .9rem; }
.header-link { font-weight: 700; text-decoration: none; white-space: nowrap; padding: .6rem .1rem; text-underline-offset: .25em; }
.header-link:hover { text-decoration: underline; }
/* On a phone the language control shrinks to its globe; the full list still opens on tap. */
@media (max-width: 30rem) {
  .lang-pick { padding: 0 1.6rem 0 .65rem; min-width: 3.4rem; }
  .lang-pick select { position: absolute; inset: 0; width: 100%; opacity: 0; padding: 0; }
  .lang-pick::after { right: .7rem; }
}

.narrow { max-width: 34rem; }
.page-head { padding-block: clamp(2rem, 6vw, 3.5rem) .5rem; }
.h-page { font-size: clamp(2rem, 6vw, 3rem); line-height: 1.05; letter-spacing: -.005em; }
html:not([lang="en"]) .h-page { font-size: clamp(1.8rem, 5.4vw, 2.6rem); line-height: 1.35; }
.page-pad { padding-bottom: clamp(3rem, 8vw, 5rem); }
.lead { margin-top: .75rem; color: var(--muted); max-width: 32em; }

/* ---------- forms ---------- */
.form { display: grid; gap: 1.15rem; margin-top: 1.5rem; justify-items: start; }
.form > * { width: 100%; }
.form > .btn, .form > div > .btn { width: auto; }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 700; }
.hint { color: var(--muted); font-size: .9375rem; }
.input {
  width: 100%; min-height: 3rem; padding: .55rem .8rem;
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--muted); border-radius: var(--radius);
}
.input:focus-visible { outline: 3px solid var(--action); outline-offset: 1px; border-color: var(--action); }
.input-code { font-size: 1.7rem; font-weight: 700; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; max-width: 16rem; }
.check { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start; cursor: pointer; }
.check + .check { margin-top: .6rem; }
.check input { width: 1.4rem; height: 1.4rem; margin: .12rem 0 0; accent-color: var(--action); }
.form-error { color: var(--danger); font-weight: 600; }
.form-note { margin-top: 1.25rem; background: var(--surface); border-left: 4px solid var(--genda); padding: .8rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; }
.links { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; align-items: center; margin-top: .75rem; }
.text-link { color: inherit; text-underline-offset: .25em; }
.btn[disabled], button.link[disabled] { opacity: .55; cursor: not-allowed; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--muted); }
.btn-quiet:hover { background: var(--surface); }
.btn-danger { background: transparent; color: var(--danger); border-color: currentColor; }
.btn-small { min-height: 2.3rem; padding: .25rem .8rem; font-size: .9375rem; }
.badge { display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .875rem; font-weight: 700; background: var(--surface); }
.badge-ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.badge-warn { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }

/* ---------- the member's account page ---------- */
.stack { display: grid; gap: 2rem; padding-block: 1.25rem clamp(3rem, 8vw, 5rem); }
.panel { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.panel h2 { font-size: 1.4rem; font-stretch: 100%; line-height: 1.25; }
html:not([lang="en"]) .panel h2 { line-height: 1.5; }
.panel > p, .panel > div > p { margin-top: .5rem; }
.panel .muted { max-width: 34em; }
.kv { display: flex; flex-wrap: wrap; gap: .4rem .75rem; align-items: center; font-weight: 600; overflow-wrap: anywhere; }
.btn-hero { margin-top: 1.6rem; min-height: 3.25rem; padding-inline: 1.5rem; font-size: 1.125rem; }

/* ---------- legal pages ---------- */
.prose { max-width: 42rem; padding-block: clamp(2rem, 6vw, 3.5rem) clamp(3rem, 8vw, 5rem); }
.prose h1 { font-size: clamp(2rem, 5.5vw, 3rem); line-height: 1.08; }
.prose h2 { font-size: 1.35rem; font-stretch: 100%; line-height: 1.3; margin-top: 2.25rem; }
.prose p, .prose ul { margin-top: .8rem; }
.prose ul { list-style: disc; padding-left: 1.3rem; }
.prose li + li { margin-top: .35rem; }
.prose a { text-underline-offset: .2em; }
.rights { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.rights a { text-underline-offset: .25em; }

/* ---------- admin console additions ---------- */
.admin-toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.25rem; }
.admin-main .input { min-height: 2.6rem; }
.admin-main .input-inline { max-width: 22rem; }
.admin-main select.input { width: auto; padding-right: 2rem; }
.table-wrap { overflow-x: auto; }
.table td .btn { white-space: nowrap; }
.table .mono, .mono { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.key-group h2 { margin-top: 2.5rem; }
.key-row { display: grid; gap: .6rem 2rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 60rem) { .key-row { grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); } }
.key-row h3 { font-size: 1.0625rem; }
.key-row .hint { margin-top: .2rem; }
.key-edit { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.key-edit .input { flex: 1 1 14rem; max-width: 26rem; }
.key-state { font-weight: 600; margin-bottom: .5rem; overflow-wrap: anywhere; }
.key-result { margin-top: .5rem; font-weight: 600; }
.is-ok { color: var(--ok); }
.is-bad { color: var(--danger); }

/* =====================================================================================
   Phase 2: wallet, checkout, invoice
   ===================================================================================== */
.money { font-size: clamp(2.2rem, 8vw, 3rem); font-weight: 800; font-stretch: 84%; line-height: 1.1; font-variant-numeric: tabular-nums; margin-top: .35rem; }
.money-small { font-size: 1.6rem; }
.choices { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .6rem; }
.choice {
  min-height: 3rem; padding: .5rem 1.1rem; border-radius: var(--radius); cursor: pointer;
  font: inherit; font-weight: 700; color: var(--ink); background: var(--bg); border: 1.5px solid var(--muted);
  text-align: left; font-variant-numeric: tabular-nums;
}
.choice small { display: block; font-weight: 500; color: var(--muted); font-size: .875rem; }
.choice:hover { background: var(--surface); }
.choice[aria-pressed="true"] { background: var(--action); color: var(--on-action); border-color: var(--action); }
.choice[aria-pressed="true"] small { color: inherit; opacity: .85; }
select.input { appearance: auto; }
.sums { display: grid; gap: .35rem; margin: 0; padding: .9rem 1rem; background: var(--surface); border-radius: var(--radius); font-variant-numeric: tabular-nums; }
.sums > div { display: flex; justify-content: space-between; gap: 1rem; }
.sums dd { margin: 0; font-weight: 600; }
.sums-total { border-top: 1px solid var(--line); padding-top: .45rem; margin-top: .2rem; font-weight: 800; font-size: 1.15rem; }
.sums-total dd { font-weight: 800; }
.lines { display: grid; margin-top: .5rem; }
.lines li { display: grid; grid-template-columns: 1fr auto; gap: .15rem 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.lines .line-what { font-weight: 600; }
.lines .line-when { grid-column: 1; color: var(--muted); font-size: .9375rem; }
.lines .line-amount { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lines .plus { color: var(--ok); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }

.invoice-page { max-width: 50rem; padding-block: 1.5rem clamp(3rem, 8vw, 5rem); }
.invoice { margin-top: 1.25rem; padding: clamp(1.25rem, 4vw, 2.5rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.invoice h1 { font-size: 2rem; line-height: 1.1; letter-spacing: 0; }
.invoice h2 { font-size: 1rem; font-stretch: 100%; color: var(--muted); }
.invoice-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.25rem; }
.invoice-meta { margin: 0; display: grid; gap: .2rem; }
.invoice-meta > div { display: flex; gap: .75rem; justify-content: space-between; }
.invoice-meta dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.invoice-parties { display: grid; gap: 1.25rem; margin-block: 1.75rem 1rem; }
@media (min-width: 40rem) { .invoice-parties { grid-template-columns: 1fr 1fr; } }
.invoice-parties p { margin-top: .3rem; white-space: pre-line; overflow-wrap: anywhere; }
.invoice .table tfoot td, .invoice .total-row td { font-weight: 800; border-bottom: 0; }
@media print {
  .site-header, .site-footer, .no-print, .toasts { display: none !important; }
  body { background: #fff; color: #000; }
  .invoice { border: 0; padding: 0; }
}

/* =====================================================================================
   Phase 3: member navigation, profiles, the guided questions, the directory, connections
   ===================================================================================== */
.app-nav { border-bottom: 1px solid var(--line); }
.app-nav-row { display: flex; gap: 1.5rem; overflow-x: auto; scrollbar-width: none; }
.app-nav-row::-webkit-scrollbar { display: none; }
.app-nav a {
  flex: none; padding: .8rem 0 .6rem; font-weight: 700; text-decoration: none; white-space: nowrap;
  color: var(--muted); border-bottom: 3px solid transparent;
}
.app-nav a:hover { color: var(--ink); }
.app-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--genda); }

.mid { max-width: 46rem; }
.panel-first { border-top: 0; padding-top: 0; }
.textarea { min-height: 7rem; resize: vertical; line-height: inherit; }
.input-short { max-width: 8rem; }
.field-gap { margin-top: 1.5rem; }
.bullets { list-style: disc; padding-left: 1.3rem; margin-top: .4rem; }
.h-section { font-size: 1.4rem; font-stretch: 100%; line-height: 1.25; }
.callout { background: var(--surface); border-left: 4px solid var(--genda); border-radius: 0 var(--radius) var(--radius) 0; padding: 1.25rem 1.25rem 1.4rem; }
.callout h2 { font-size: 1.4rem; font-stretch: 100%; line-height: 1.25; }
html:not([lang="en"]) .callout h2 { line-height: 1.5; }
.callout p { margin-top: .6rem; max-width: 34em; }
.callout .btn { margin-top: .4rem; }

/* skills and other short labels */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.chip {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 2.25rem; padding: .2rem .85rem;
  border-radius: 999px; background: var(--surface); font-weight: 600; font-size: 1rem; line-height: 1.3;
}
.chip small { font-weight: 500; color: var(--muted); font-size: .8125rem; }
.chip-x {
  width: 1.7rem; height: 1.7rem; margin-right: -.5rem; border: 0; border-radius: 50%; cursor: pointer;
  background: transparent; color: var(--muted); font: inherit; font-size: 1.25rem; line-height: 1;
}
.chip-x:hover { background: var(--line); color: var(--ink); }
button.chip { font: inherit; font-weight: 600; font-size: 1rem; color: var(--ink); cursor: pointer; background: var(--bg); border: 1.5px dashed var(--muted); }
button.chip:hover { border-style: solid; background: var(--surface); }
.chip-add::before { content: "+"; font-weight: 800; color: var(--accent); }
.chips-head { font-size: 1rem; font-weight: 700; color: var(--muted); margin-top: 1.25rem; }
.own-skill { margin-top: 1.75rem; }
button.link.link-shown { text-decoration-color: currentColor; }
.earlier { margin-bottom: 1.25rem; }
.own-skill summary, .earlier summary, .finder-more summary { cursor: pointer; font-weight: 700; text-decoration: underline; text-underline-offset: .25em; }

/* resume lines */
.entries { display: grid; margin-top: .5rem; }
.entry { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.entry-kind { font-size: .875rem; font-weight: 700; color: var(--accent); }
.entry h3 { font-size: 1.125rem; line-height: 1.35; }
html:not([lang="en"]) .entry h3 { line-height: 1.6; }
.entry p + p { margin-top: .2rem; }
.entry .links { margin-top: .5rem; }

/* the guided questions */
.question { font-size: clamp(1.35rem, 4.4vw, 1.75rem); font-weight: 700; font-stretch: 92%; line-height: 1.3; text-wrap: pretty; margin-top: .4rem; }
.question:not(:lang(en)) { line-height: 1.6; }
.rec { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.rec-state { font-weight: 600; }
.rec.is-recording .rec-state::before {
  content: ""; display: inline-block; width: .7rem; height: .7rem; margin-right: .5rem; border-radius: 50%;
  background: var(--kumkum); animation: rec-pulse 1.2s ease-in-out infinite;
}
@keyframes rec-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .rec.is-recording .rec-state::before { animation: none; } }
.turns { display: grid; gap: 1rem; margin: .9rem 0 1.75rem; padding-left: 1rem; border-left: 3px solid var(--line); }
.turn-q { font-weight: 700; }
.draft { margin-top: 1rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); }
.draft > p { margin-top: .7rem; }

/* the directory and connections */
.finder { display: grid; gap: 1rem; margin-top: 1.25rem; }
.finder-row { display: flex; gap: .5rem; }
.finder-row .input { flex: 1; min-width: 0; }
.finder-filters { display: grid; gap: 1rem; margin-top: 1rem; }
@media (min-width: 40rem) { .finder-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.results-note { margin-top: 1.5rem; }
.people { display: grid; margin-top: 1rem; }
.person-card { padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
/* inside a panel the next panel's own rule closes the list */
.panel .people > :last-child, .panel .entries > :last-child { border-bottom: 0; }
.person-name { font-size: 1.3rem; font-stretch: 100%; line-height: 1.3; }
html:not([lang="en"]) .person-name { line-height: 1.55; }
.person-name a { text-decoration: none; }
.person-name a:hover { text-decoration: underline; text-underline-offset: .2em; }
.person-name .badge { vertical-align: middle; }
.person-line { margin-top: .15rem; }
.person-open { margin-top: .6rem; font-size: .9375rem; font-weight: 700; color: var(--ok); }
.person-note { margin-top: .6rem; padding: .6rem .9rem; background: var(--surface); border-radius: var(--radius); overflow-wrap: anywhere; }
.person-card .links { margin-top: .75rem; gap: .6rem; }

/* one member's profile */
.person-headline { font-size: clamp(1.2rem, 3.6vw, 1.45rem); font-weight: 600; line-height: 1.35; margin-top: .6rem; }
.person-headline:not(:lang(en)) { line-height: 1.6; }
.person > .muted, .person > .kv { margin-top: .5rem; }
.person-about { display: grid; gap: .9rem; margin-top: 1.25rem; max-width: 36em; }
.person .panel { margin-top: 2rem; }
.contact { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin: .9rem 0 0; }
.contact dt { color: var(--muted); }
.contact dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.notice-inline { padding-block: 2rem 4rem; }

/* admin: skills waiting for a decision */
.admin-main .pending-name { min-width: 12rem; }
.admin-main select.pending-stream { max-width: 15rem; }

/* =====================================================================================
   Phase 3, part two: beginning the questions from a resume, and the printable resume
   ===================================================================================== */
.field-label { font-weight: 700; }
.filepick { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; }
.filepick input:focus-visible + .btn { outline: 3px solid var(--action); outline-offset: 2px; }
.filepick-name { font-weight: 600; overflow-wrap: anywhere; }
.note-top { margin: 0 0 1.25rem; }
.notes { display: grid; gap: .8rem; margin: .9rem 0 1.75rem; padding-left: 1rem; border-left: 3px solid var(--line); }
.notes p { white-space: pre-line; overflow-wrap: anywhere; }

.resume-page { max-width: 52rem; padding-bottom: clamp(3rem, 8vw, 5rem); }
.resume-tools { display: grid; gap: 1.25rem; margin-block: 1.25rem 2rem; }
.resume-tools .links { margin-top: 0; }
/* The sheet is paper: white with indigo ink in light and dark alike, because that is how it prints.
 * Nothing on it depends on a background colour, which printers leave out. */
.sheet {
  --sheet-ink: #14173F; --sheet-muted: #555A80; --sheet-line: #D9DCEA;
  background: #FFFFFF; color: var(--sheet-ink);
  border: 1px solid var(--sheet-line); border-radius: 2px;
  box-shadow: 0 1px 2px rgb(20 23 63 / .06), 0 14px 34px -14px rgb(20 23 63 / .28);
  padding: clamp(1.25rem, 6vw, 3.5rem);
  font-size: 1rem; line-height: 1.5; overflow-wrap: anywhere;
}
.sheet:not(:lang(en)) { line-height: 1.7; }
.sheet-head { padding-bottom: 1.25rem; border-bottom: 3px solid var(--genda); }
.sheet .sheet-name { font-size: clamp(2rem, 7.5vw, 2.75rem); font-weight: 800; font-stretch: 84%; line-height: 1.08; letter-spacing: -.005em; }
.sheet:not(:lang(en)) .sheet-name { line-height: 1.3; }
.sheet-headline { font-size: clamp(1.1rem, 3.6vw, 1.3rem); font-weight: 600; line-height: 1.35; margin-top: .5rem; max-width: 34em; }
.sheet:not(:lang(en)) .sheet-headline { line-height: 1.6; }
.sheet-facts { margin-top: .5rem; color: var(--sheet-muted); }
.sheet-contact { display: flex; flex-wrap: wrap; gap: .1rem 1.25rem; margin-top: .5rem; font-weight: 600; }
.sheet-verified { color: var(--tulsi); }
.sheet-verified::before { content: "\2713\00a0"; }
.sheet-row { display: grid; gap: .35rem; padding-block: 1.1rem; border-bottom: 1px solid var(--sheet-line); }
.sheet .sheet-row h2 { font-size: .9375rem; font-weight: 800; font-stretch: 100%; line-height: 1.5; letter-spacing: 0; color: var(--sheet-ink); }
.sheet:not(:lang(en)) .sheet-row h2 { line-height: 1.7; }
.sheet-body { display: grid; gap: .7rem; max-width: 38em; }
.sheet .sheet-item h3 { font-size: 1.0625rem; font-weight: 700; line-height: 1.4; }
.sheet-where { color: var(--sheet-muted); }
.sheet-item p + p { margin-top: .2rem; }
.sheet-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem 1.5rem; margin-top: 1.25rem; font-size: .875rem; color: var(--sheet-muted); }
@media (min-width: 40rem) { .sheet-row { grid-template-columns: 9.5rem 1fr; gap: 1.5rem; } }
@media print {
  .app-nav { display: none !important; }
  .resume-page { max-width: none; padding: 0; }
  .sheet { page: resume; border: 0; border-radius: 0; box-shadow: none; padding: 0; font-size: 10.5pt; }
  .sheet-row { grid-template-columns: 34mm 1fr; gap: 6mm; padding-block: 4.5mm; }
  .sheet-row h2 { break-after: avoid; }
  .sheet-head, .sheet-item { break-inside: avoid; }
}
@page resume { size: A4; margin: 16mm 18mm; }
