/* shared/look.css — tokens and the two families the three looks are built from.
 *
 * <html data-look="sheet|curve|mix" data-family="sheet|curve"> is set by shared/look.js.
 *   sheet = Look A, YeshivaSync "Navy Sheet" + Geist (research/handoff-yeshivasuite-design.md)
 *   curve = Look B, Beis Rivkah curved hero + Poppins (research/handoff-beis-rivkah-scheduler-design.md)
 *   mix   = curve for bochur, shliach and the landing page; sheet for mashpia, yeshiva, admin
 * Identity hue #4A7C9E, ramp from design/palette.json. 700 or darker for small text.
 *
 * Class vocabulary (same markup in both families; only the CSS differs):
 *   page shell   .hd .hd-in .hd-row .hd-text .hd-eyebrow .hd-title .hd-count .hd-sum .hd-actions .hd-below
 *                .hd-prog  · .sheet (.wide .narrow) .handle
 *   survey shell .sv-stage .sv .svh .svtop .svback .svstep .svout .svt .svs .svprog .curve .svscroll .svwrap .svfoot
 *   groups       .label (.n .note) · .panel · .row .row-t .row-s .row-end · .list (selection rows) .hero-card
 *   buttons      .pill-primary .pill-quiet (on the header) · .btn .btn2 .btn-text .icon-btn · .big (survey)
 *   chips        .chip (.good .warn .bad .id .mute) · .dot-warn
 *   form (form.js) .q .q-head .q-label .q-req .q-help .q-count .q-private .q-problem .inp .seg .opts .opt
 *                .tiers .scale .stepper .rk-*  ·  .flag .save  ·  .toast .modal
 */
@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700;800&family=Poppins:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;
  /* identity ramp (#4A7C9E) */
  --id-50: #f0f8fe; --id-100: #e0effb; --id-200: #c5dff2; --id-300: #a0c7e2; --id-400: #79a8c9;
  --id-500: #5a8daf; --id-600: #4a7c9e; --id-700: #31607f; --id-800: #1e4761; --id-900: #0f3146;
  --good: #36884d; --good-t: #e3f2e7; --warn: #d0901e; --warn-ink: #7e5a14; --warn-t: #fbf0dc;
  --bad: #c13c36; --bad-t: #fcebea;
}
html:not([data-family]) body { visibility: hidden; }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { -webkit-font-smoothing: antialiased; text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
img, svg { display: block; }
.ic { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; }
.num, .q-count, .hd-count { font-variant-numeric: tabular-nums; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ================================================================
   SHEET  (Look A · Navy Sheet · Geist)
   ================================================================ */
[data-family="sheet"] {
  --f: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --canvas: #edf1f4; --well: #e1e8ed; --line: #dce4ea; --strong: #c6d1d9; --hair: rgba(198, 209, 217, .75);
  --ink: #1b2630; --soft: #56636e; --faint: #8995a0;
  --ods: rgba(255, 255, 255, .74); --odf: rgba(255, 255, 255, .56);
  --base: var(--id-600); --deep: var(--id-700); --navy: var(--id-800); --hero: #3d6d8f;
  --tint: #eaf3fa; --idsoft: #d3e5f2;
}
[data-family="sheet"] body {
  background: var(--canvas); color: var(--ink); font-family: var(--f); font-size: 15px; line-height: 1.5;
  font-feature-settings: "ss01" on, "cv11" on;
}
[data-family="sheet"] :focus-visible { outline: 2px solid var(--base); outline-offset: 2px; }

/* header: the navy band, a pull-out on desktop */
[data-family="sheet"] .hd {
  position: relative; overflow: hidden; background: var(--navy); color: #fff;
  margin-left: var(--pull); border-bottom-left-radius: 56px;
  box-shadow: inset 18px -18px 30px -18px rgba(8, 12, 24, .55);
}
[data-family="sheet"] .hd::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,.10), transparent 45%, rgba(0,0,0,.25)); pointer-events: none; }
[data-family="sheet"] .hd::after { content: ""; position: absolute; width: 288px; height: 288px; border-radius: 50%; background: rgba(255,255,255,.06); right: -70px; top: -100px; pointer-events: none; }
[data-family="sheet"] .hd { --pull: clamp(0px, 4vw, 64px); }
[data-family="sheet"] .hd-in { position: relative; z-index: 1; max-width: calc(var(--w, 880px) + 64px + var(--pull)); margin: 0 auto; padding: 28px calc(32px + var(--pull)) 30px 32px; }
[data-family="sheet"] .hd-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
[data-family="sheet"] .hd-text { min-width: 0; flex: 1 1 300px; }
[data-family="sheet"] .hd-eyebrow { font-size: 12.5px; font-weight: 500; color: var(--ods); }
[data-family="sheet"] .hd-title { display: flex; align-items: center; gap: 10px; margin: 6px 0 4px; font-size: 32px; line-height: 1.1; font-weight: 800; letter-spacing: -.025em; overflow-wrap: anywhere; }
[data-family="sheet"] .hd-count { font-size: 13px; font-weight: 700; background: rgba(8,12,24,.45); border-radius: 999px; min-width: 28px; height: 28px; padding: 0 9px; display: inline-grid; place-items: center; letter-spacing: 0; flex: none; }
[data-family="sheet"] .hd-sum { margin: 0; font-size: 13.5px; color: var(--ods); }
[data-family="sheet"] .hd-sum b { color: #fff; font-weight: 600; }
[data-family="sheet"] .hd-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
[data-family="sheet"] .hd-below { margin-top: 16px; }
[data-family="sheet"] .hd-prog { display: flex; gap: 4px; margin-top: 16px; max-width: 520px; }
[data-family="sheet"] .hd-prog .bar { flex: 1; height: 6px; border-radius: 999px; background: rgba(255,255,255,.18); overflow: hidden; }
[data-family="sheet"] .hd-prog .bar i { display: block; height: 100%; background: #fff; border-radius: 999px; }
[data-family="sheet"] .hd .curve { display: none; }
[data-family="sheet"] .pill-primary {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; border: 0; border-radius: 999px; background: #fff; color: var(--deep);
  padding: 0 16px; font-size: 14px; font-weight: 700; box-shadow: 0 6px 16px rgba(8,12,24,.35); white-space: nowrap; text-decoration: none;
}
[data-family="sheet"] .pill-primary[aria-disabled="true"] { opacity: .6; box-shadow: none; }
[data-family="sheet"] .pill-quiet {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; border: 0; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff;
  padding: 0 14px; font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none;
}
[data-family="sheet"] .pill-quiet:hover { background: rgba(255,255,255,.18); }
[data-family="sheet"] .pill-state { display: inline-flex; align-items: center; height: 30px; border-radius: 999px; background: var(--idsoft); color: var(--deep); padding: 0 12px; font-size: 12.5px; font-weight: 700; }

/* content column */
[data-family="sheet"] .sheet { max-width: calc(var(--w, 880px) + 64px); margin: 0 auto; padding: 4px 32px 96px; position: relative; }
[data-family="sheet"] .sheet.wide { --w: 1080px; }
[data-family="sheet"] .handle { display: none; }

/* section label */
[data-family="sheet"] .label { display: flex; align-items: center; gap: 12px; margin: 28px 0 10px; }
[data-family="sheet"] .label .l { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-family="sheet"] .label::after { content: ""; flex: 1; border-top: 1px solid var(--strong); opacity: .7; order: 2; }
[data-family="sheet"] .label .note { order: 3; font-size: 12px; color: var(--soft); white-space: nowrap; }

/* panel of rows on one tinted ground */
[data-family="sheet"] .panel { background: var(--well); border-radius: 16px; overflow: hidden; }
[data-family="sheet"] .panel.pad { padding: 16px; }
[data-family="sheet"] .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border: 0; border-top: 1px solid var(--hair); width: 100%; text-align: left; background: transparent; color: inherit; text-decoration: none; min-height: 56px; }
[data-family="sheet"] .row:first-child { border-top: 0; }
[data-family="sheet"] .row.av { grid-template-columns: 36px minmax(0, 1fr) auto; }
[data-family="sheet"] .row.num { grid-template-columns: 28px minmax(0, 1fr) auto; }
[data-family="sheet"] button.row:hover, [data-family="sheet"] a.row:hover { background: rgba(255,255,255,.45); }
[data-family="sheet"] .row.cur { background: color-mix(in srgb, var(--base) 16%, var(--well)); }
[data-family="sheet"] .row-t { display: block; font-size: 15px; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-family="sheet"] .row-t small { font-size: 12.5px; font-weight: 500; color: var(--soft); margin-left: 6px; }
[data-family="sheet"] .row-s { display: block; font-size: 12.5px; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-family="sheet"] .row-s b { color: var(--ink); font-weight: 600; }
[data-family="sheet"] .row.wrap .row-t, [data-family="sheet"] .row.wrap .row-s { white-space: normal; }
[data-family="sheet"] .row-end { display: flex; gap: 6px; align-items: center; }
[data-family="sheet"] .avc { width: 36px; height: 36px; border-radius: 50%; background: var(--idsoft); color: var(--deep); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
[data-family="sheet"] .rk-n { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.75); color: var(--deep); display: grid; place-items: center; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
[data-family="sheet"] .empty { padding: 16px 14px; color: var(--soft); font-size: 14px; }

/* hero card: solid identity, answers the page's one question */
[data-family="sheet"] .hero-card { margin-top: 26px; background: var(--hero); color: #fff; border-radius: 18px; padding: 18px 20px 14px; box-shadow: 0 14px 30px -18px var(--hero); }
[data-family="sheet"] .hero-card .hc-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
[data-family="sheet"] .hero-card h2 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.015em; }
[data-family="sheet"] .hero-card .hc-note { font-size: 12.5px; font-weight: 600; color: var(--ods); }
[data-family="sheet"] .hero-card .hc-big { margin: 4px 0 2px; font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
[data-family="sheet"] .hero-card p { margin: 0; color: var(--ods); font-size: 14px; }
[data-family="sheet"] .hero-card .hc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.16); }
[data-family="sheet"] .hero-card .hc-row:first-of-type { margin-top: 8px; }
[data-family="sheet"] .hero-card .hc-row .row-t { font-size: 14.5px; }
[data-family="sheet"] .hero-card .hc-row .row-s { color: var(--ods); }
[data-family="sheet"] .hero-card .hc-btn { display: inline-flex; align-items: center; gap: 4px; height: 34px; border: 0; border-radius: 999px; background: #fff; color: var(--deep); padding: 0 14px; font-size: 13.5px; font-weight: 700; white-space: nowrap; text-decoration: none; }
[data-family="sheet"] .hero-card .hc-more { border: 0; background: none; color: #fff; font-weight: 700; font-size: 13px; padding: 6px 0 2px; display: inline-flex; gap: 4px; align-items: center; }

/* buttons */
[data-family="sheet"] .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; border: 0; border-radius: 999px; background: var(--base); color: #fff; padding: 0 20px; font-size: 14.5px; font-weight: 700; white-space: nowrap; text-decoration: none; }
[data-family="sheet"] .btn:hover { background: var(--deep); }
[data-family="sheet"] .btn[aria-disabled="true"], [data-family="sheet"] .btn:disabled { opacity: .45; }
[data-family="sheet"] .btn2 { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; border: 0; border-radius: 999px; background: var(--well); color: var(--deep); padding: 0 18px; font-size: 14px; font-weight: 700; white-space: nowrap; text-decoration: none; }
[data-family="sheet"] .btn2:hover { background: var(--idsoft); }
[data-family="sheet"] .btn2:disabled { opacity: .45; }
[data-family="sheet"] .btn-text { border: 0; background: none; color: var(--deep); font-weight: 600; font-size: 13.5px; padding: 6px 4px; display: inline-flex; gap: 6px; align-items: center; text-decoration: none; }
[data-family="sheet"] .icon-btn { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--soft); display: grid; place-items: center; }
[data-family="sheet"] .icon-btn:hover { background: rgba(255,255,255,.7); color: var(--deep); }
[data-family="sheet"] .icon-btn:disabled { opacity: .3; background: transparent; }

/* chips */
[data-family="sheet"] .chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 3px 9px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
[data-family="sheet"] .chip.good { background: var(--good-t); color: #2c6e3f; }
[data-family="sheet"] .chip.warn { background: var(--warn-t); color: var(--warn-ink); }
[data-family="sheet"] .chip.bad { background: var(--bad-t); color: var(--bad); }
[data-family="sheet"] .chip.id { background: var(--tint); color: var(--deep); }
[data-family="sheet"] .chip.mute { background: rgba(255,255,255,.6); color: var(--soft); }
[data-family="sheet"] .dot-warn { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); display: inline-block; flex: none; }

/* ---- form pieces (sheet) ---- */
[data-family="sheet"] .form { display: flex; flex-direction: column; gap: 0; }
[data-family="sheet"] .q { padding: 16px; border-top: 1px solid var(--hair); }
[data-family="sheet"] .q:first-child { border-top: 0; }
[data-family="sheet"] .q.bad { background: color-mix(in srgb, var(--bad) 6%, var(--well)); }
[data-family="sheet"] .q-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
[data-family="sheet"] .q-label { font-size: 15px; font-weight: 700; line-height: 1.35; }
[data-family="sheet"] .q-req { font-size: 11.5px; font-weight: 600; color: var(--soft); white-space: nowrap; }
[data-family="sheet"] .q-help { font-size: 12.5px; color: var(--soft); margin: -4px 0 10px; }
[data-family="sheet"] .q-count { font-size: 13.5px; font-weight: 700; color: var(--deep); white-space: nowrap; }
[data-family="sheet"] .q-count.ok { color: #2c6e3f; }
[data-family="sheet"] .q-private { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--deep); font-weight: 600; margin: 0 0 10px; }
[data-family="sheet"] .q-problem { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--bad); }
[data-family="sheet"] .inp { width: 100%; height: 46px; border: 0; border-radius: 14px; background: #fff; padding: 0 14px; font-size: 16px; color: var(--ink); }
[data-family="sheet"] .inp:focus { outline: 2px solid rgba(74,124,158,.45); }
[data-family="sheet"] textarea.inp { height: auto; min-height: 92px; padding: 12px 14px; resize: vertical; line-height: 1.45; display: block; }
[data-family="sheet"] .q.bad .inp { outline: 2px solid color-mix(in srgb, var(--bad) 55%, transparent); }
[data-family="sheet"] .inp-count { font-size: 11.5px; font-weight: 600; color: var(--soft); text-align: right; margin-top: 4px; }
[data-family="sheet"] .seg { display: inline-flex; gap: 4px; background: #fff; border-radius: 999px; padding: 4px; flex-wrap: wrap; max-width: 100%; }
[data-family="sheet"] .seg button { border: 0; background: transparent; border-radius: 999px; min-height: 40px; padding: 0 16px; font-size: 14px; font-weight: 600; color: var(--soft); }
[data-family="sheet"] .seg button:hover { color: var(--deep); }
[data-family="sheet"] .seg button[aria-pressed="true"] { background: var(--base); color: #fff; }
[data-family="sheet"] .seg.fill { display: flex; }
[data-family="sheet"] .seg.fill button { flex: 1; }
[data-family="sheet"] .opts { display: flex; flex-direction: column; background: #fff; border-radius: 14px; overflow: hidden; }
[data-family="sheet"] .opt { display: grid; grid-template-columns: minmax(0, 1fr) 26px; gap: 12px; align-items: center; width: 100%; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; padding: 12px 14px; min-height: 50px; font-size: 15px; font-weight: 600; }
[data-family="sheet"] .opt:first-child { border-top: 0; }
[data-family="sheet"] .opt .mk { width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--strong); display: grid; place-items: center; color: #fff; }
[data-family="sheet"] .opt.radio .mk { border-radius: 50%; }
[data-family="sheet"] .opt[aria-pressed="true"] { background: var(--base); color: #fff; }
[data-family="sheet"] .opt[aria-pressed="true"] .mk { background: #fff; border-color: #fff; color: var(--deep); }
[data-family="sheet"] .tiers { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 6px; background: #fff; border-radius: 16px; padding: 6px; }
[data-family="sheet"] .tiers button { border: 0; border-radius: 12px; background: var(--canvas); min-height: 46px; font-size: 16px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
[data-family="sheet"] .tiers button.sign { min-height: 38px; font-size: 14px; font-weight: 600; color: var(--soft); background: transparent; }
[data-family="sheet"] .tiers button:hover { background: var(--tint); }
[data-family="sheet"] .tiers button[aria-pressed="true"] { background: var(--base); color: #fff; }
[data-family="sheet"] .scale-ends { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--soft); margin-top: 6px; padding: 0 6px; }
[data-family="sheet"] .stepper { display: inline-flex; align-items: center; gap: 4px; background: #fff; border-radius: 999px; padding: 4px; }
[data-family="sheet"] .stepper button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--canvas); font-size: 20px; font-weight: 600; color: var(--deep); }
[data-family="sheet"] .stepper input { width: 64px; height: 40px; border: 0; text-align: center; font-size: 17px; font-weight: 700; background: transparent; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
[data-family="sheet"] .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ranked list (sheet) */
[data-family="sheet"] .rk-bar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 8px 0; background: var(--rk-bg, var(--well)); }
[data-family="sheet"] .rk-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 46px; background: #fff; border-radius: 999px; padding: 0 6px 0 14px; color: var(--soft); }
[data-family="sheet"] .rk-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--ink); }
[data-family="sheet"] .rk-search input::-webkit-search-cancel-button { display: none; }
[data-family="sheet"] .rk-clear { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--canvas); color: var(--soft); display: grid; place-items: center; }
[data-family="sheet"] .rk-sub { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 14px 2px 8px; }
[data-family="sheet"] .rk-sub .l { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
[data-family="sheet"] .rk-sub .n { font-size: 12.5px; color: var(--soft); }
[data-family="sheet"] .rk-list, [data-family="sheet"] .rk-res { list-style: none; margin: 0; padding: 0; background: #fff; border-radius: 14px; overflow: hidden; }
[data-family="sheet"] .rk-item { display: grid; grid-template-columns: 28px 30px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 6px 8px 4px; border-top: 1px solid var(--line); background: #fff; min-height: 58px; }
[data-family="sheet"] .rk-item:first-child { border-top: 0; }
[data-family="sheet"] .rk-list[style*="--cut"] { position: relative; padding-top: 30px; }
[data-family="sheet"] .rk-list[style*="--cut"]::before, [data-family="sheet"] .rk-item.rk-cut::after { position: absolute; left: 14px; height: 30px; display: flex; align-items: center; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
[data-family="sheet"] .rk-list[style*="--cut"]::before { content: var(--cut); top: 0; color: var(--deep); }
[data-family="sheet"] .rk-item.rk-cut { position: relative; margin-bottom: 30px; }
[data-family="sheet"] .rk-item.rk-cut::after { content: "The rest"; top: 100%; margin-top: 0; color: var(--soft); }
[data-family="sheet"] .rk-item.rk-rest .rk-n { background: var(--idsoft); color: var(--deep); }
[data-family="sheet"] .rk-item.drag { box-shadow: 0 14px 30px rgba(16,42,58,.28); position: relative; z-index: 5; border-radius: 12px; }
[data-family="sheet"] .rk-grip { width: 28px; height: 40px; display: grid; place-items: center; color: var(--faint); touch-action: none; cursor: grab; border: 0; background: none; padding: 0; }
[data-family="sheet"] .rk-item .rk-n { background: var(--base); color: #fff; }
[data-family="sheet"] .rk-pick { display: grid; grid-template-columns: minmax(0, 1fr) 30px; gap: 12px; align-items: center; width: 100%; border: 0; border-top: 1px solid var(--line); background: #fff; text-align: left; padding: 10px 14px; min-height: 58px; }
[data-family="sheet"] .rk-pick:first-child { border-top: 0; }
[data-family="sheet"] .rk-pick .rk-n { background: var(--canvas); color: var(--deep); }
[data-family="sheet"] .rk-pick[aria-pressed="true"] { background: var(--base); color: #fff; }
[data-family="sheet"] .rk-pick[aria-pressed="true"] .row-s { color: var(--ods); }
[data-family="sheet"] .rk-pick[aria-pressed="true"] .rk-n { background: #fff; color: var(--deep); }
[data-family="sheet"] .rk-pick.full { opacity: .45; }
[data-family="sheet"] .rk-hint { padding: 14px; font-size: 14px; color: var(--soft); background: #fff; border-radius: 14px; }
[data-family="sheet"] .rk-more { padding: 10px 14px; font-size: 13px; color: var(--soft); border-top: 1px solid var(--line); background: #fff; }

/* survey shell, sheet style (the kiosk) */
[data-family="sheet"] .sv-stage { min-height: 100vh; min-height: 100dvh; display: flex; justify-content: center; align-items: flex-start; background: linear-gradient(135deg, #e2eaf0, #eef2f5); padding: 28px 16px; }
[data-family="sheet"] .sv { width: 100%; max-width: 560px; display: flex; flex-direction: column; height: min(900px, calc(100dvh - 56px)); min-height: 600px; border-radius: 28px; overflow: hidden; background: var(--canvas); box-shadow: 0 24px 60px -30px rgba(15,35,50,.45), 0 2px 8px rgba(15,35,50,.06); }
[data-family="sheet"] .svh { position: relative; overflow: hidden; background: var(--navy); color: #fff; padding: 18px 22px 46px; flex: none; }
[data-family="sheet"] .svh::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,.10), transparent 45%, rgba(0,0,0,.25)); }
[data-family="sheet"] .svh::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.06); right: -60px; top: -90px; }
[data-family="sheet"] .svh > * { position: relative; z-index: 1; }
[data-family="sheet"] .svtop { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 36px; }
[data-family="sheet"] .svback, [data-family="sheet"] .svout { display: inline-flex; align-items: center; gap: 6px; height: 36px; border: 0; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; padding: 0 14px; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
[data-family="sheet"] .svback { padding: 0 14px 0 10px; }
[data-family="sheet"] .svstep { font-size: 12.5px; font-weight: 500; color: var(--ods); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-family="sheet"] .svprog { display: flex; gap: 4px; margin: 16px 0 14px; }
[data-family="sheet"] .svprog i { flex: 1; height: 4px; border-radius: 999px; background: rgba(255,255,255,.22); }
[data-family="sheet"] .svprog i.on { background: #fff; }
[data-family="sheet"] .svh .curve { display: none; }
[data-family="sheet"] .svt { margin: 0; font-size: 26px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
[data-family="sheet"] .svs { margin: 6px 0 0; font-size: 14px; color: var(--ods); }
[data-family="sheet"] .svscroll { flex: 1; overflow-y: auto; margin-top: -22px; background: var(--canvas); border-radius: 28px 28px 0 0; position: relative; z-index: 2; scrollbar-width: thin; scrollbar-gutter: stable; }
[data-family="sheet"] .svscroll::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 999px; background: var(--strong); margin: 12px auto 4px; }
[data-family="sheet"] .svwrap { padding: 8px 16px 20px; display: flex; flex-direction: column; gap: 10px; --rk-bg: var(--canvas); }
[data-family="sheet"] .svfoot { flex: none; padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--canvas); border-top: 1px solid var(--line); }
[data-family="sheet"] .big { width: 100%; height: 54px; border: 0; border-radius: 999px; background: var(--base); color: #fff; font-size: 16px; font-weight: 700; box-shadow: 0 10px 24px -12px var(--base); }
[data-family="sheet"] .big[aria-disabled="true"] { opacity: .4; box-shadow: none; }
[data-family="sheet"] .svwrap .q { padding: 0; border: 0; background: transparent; }
[data-family="sheet"] .svwrap .q.bad { background: transparent; }
[data-family="sheet"] .svwrap .opts, [data-family="sheet"] .svwrap .seg, [data-family="sheet"] .svwrap .tiers, [data-family="sheet"] .svwrap .stepper, [data-family="sheet"] .svwrap .rk-list, [data-family="sheet"] .svwrap .rk-res, [data-family="sheet"] .svwrap .rk-hint { background: var(--well); }
[data-family="sheet"] .svwrap .rk-item, [data-family="sheet"] .svwrap .rk-pick, [data-family="sheet"] .svwrap .rk-more { background: transparent; border-color: var(--hair); }
[data-family="sheet"] .svwrap .rk-pick[aria-pressed="true"] { background: var(--base); }
[data-family="sheet"] .svwrap .rk-item.drag { background: #fff; }
[data-family="sheet"] .svwrap .opt { border-color: var(--hair); }
[data-family="sheet"] .svwrap .inp { background: #fff; }
[data-family="sheet"] .svwrap .rk-search { background: #fff; }
[data-family="sheet"] .svwrap .tiers button { background: rgba(255,255,255,.7); }
[data-family="sheet"] .svwrap .tiers button.sign { background: transparent; }
[data-family="sheet"] .svwrap .tiers button[aria-pressed="true"] { background: var(--base); }
[data-family="sheet"] .svwrap .stepper button { background: #fff; }
[data-family="sheet"] .svwrap .panel { background: var(--well); }
[data-family="sheet"] .code { display: block; width: 100%; height: 62px; border: 0; border-radius: 16px; background: #fff; text-align: center; font-size: 26px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
[data-family="sheet"] .code::placeholder { color: #b9c5cd; }
[data-family="sheet"] .code:focus { outline: 2px solid var(--base); }
[data-family="sheet"] .lede { font-size: 14px; color: var(--soft); text-align: center; margin: 6px auto 8px; max-width: 42ch; }
[data-family="sheet"] .intro-note { font-size: 15px; font-weight: 500; line-height: 1.5; color: var(--ink); margin: 2px 4px 16px; text-wrap: pretty; }
[data-family="sheet"] .flag { font-size: 13.5px; font-weight: 600; color: var(--bad); min-height: 0; text-align: center; }
[data-family="sheet"] .save { font-size: 12.5px; color: var(--soft); text-align: center; }
[data-family="sheet"] .save.ok { color: #2c6e3f; }
[data-family="sheet"] .rv, [data-family="sheet"] .steps { background: var(--well); border-radius: 16px; overflow: hidden; }
[data-family="sheet"] .steps .rk-n { background: var(--base); color: #fff; }
[data-family="sheet"] .review-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; border: 0; border-top: 1px solid var(--hair); background: transparent; text-align: left; padding: 12px 14px; min-height: 60px; }
[data-family="sheet"] .review-row:first-child { border-top: 0; }
[data-family="sheet"] .review-row:hover { background: rgba(255,255,255,.45); }
[data-family="sheet"] .review-row .row-s { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
[data-family="sheet"] .review-row.bad { background: color-mix(in srgb, var(--bad) 7%, var(--well)); }
[data-family="sheet"] .review-row.bad .row-s.err { color: var(--bad); font-weight: 600; }

/* toast + modal (sheet) */
[data-family="sheet"] .toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 90; background: var(--ink); color: #fff; border-radius: 14px; padding: 11px 16px; font-size: 13.5px; box-shadow: 0 14px 34px -12px rgba(8,12,24,.5); width: max-content; max-width: calc(100% - 32px); }
[data-family="sheet"] .toast.bad { background: var(--bad); }
[data-family="sheet"] .scrim { position: fixed; inset: 0; background: rgba(10,20,30,.42); z-index: 80; display: grid; place-items: center; padding: 16px; }
[data-family="sheet"] .modal { width: min(420px, 100%); background: var(--canvas); border-radius: 22px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(8,12,24,.5); }
[data-family="sheet"] .modal-h { position: relative; overflow: hidden; background: var(--navy); color: #fff; padding: 20px 20px 22px; }
[data-family="sheet"] .modal-h::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.06); right: -50px; top: -70px; }
[data-family="sheet"] .modal-h h3 { margin: 0 0 4px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; position: relative; }
[data-family="sheet"] .modal-h p { margin: 0; font-size: 14px; color: var(--ods); position: relative; }
[data-family="sheet"] .modal-f { padding: 16px; display: flex; gap: 10px; }
[data-family="sheet"] .modal-f .btn, [data-family="sheet"] .modal-f .btn2 { flex: 1; height: 48px; }

/* sheet: phone */
@media (max-width: 640px) {
  [data-family="sheet"] .hd { margin-left: 0; border-radius: 0; padding-bottom: 22px; }
  [data-family="sheet"] .hd-in { padding: 20px 16px 24px; }
  [data-family="sheet"] .hd-title { font-size: 28px; }
  [data-family="sheet"] .sheet { margin-top: -22px; background: var(--canvas); border-radius: 28px 28px 0 0; padding: 0 16px 96px; }
  [data-family="sheet"] .handle { display: block; width: 40px; height: 4px; border-radius: 999px; background: var(--strong); margin: 0 auto; position: relative; top: 12px; }
  [data-family="sheet"] .sheet > .handle + * { margin-top: 26px; }
  [data-family="sheet"] .label .note { display: none; }
  [data-family="sheet"] .sv-stage { padding: 0; background: var(--canvas); }
  [data-family="sheet"] .sv { border-radius: 0; height: auto; min-height: 100vh; min-height: 100dvh; box-shadow: none; }
  [data-family="sheet"] .svscroll { overflow: visible; flex: 1; }
  [data-family="sheet"] .svfoot { position: sticky; bottom: 0; z-index: 4; }
  [data-family="sheet"] .svt { font-size: 24px; }
}

/* ================================================================
   CURVE  (Look B · Beis Rivkah · Poppins)
   ================================================================ */
[data-family="curve"] {
  --f: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --g1: #7baacb; --g2: #3f7096; --deep: #2c5878; --soft: #e3eef5; --softline: #c3d9e8;
  --page: #eef3f6; --card: #fff; --field: #f1f5f8; --ink: #16262f; --ink2: #44555e; --muted: #5f6e76; --faint: #a0acb3; --line: #e3e8ea;
  --sh: 0 1px 3px rgba(22,38,47,.05), 0 10px 24px -16px rgba(22,38,47,.3);
  --lift: 0 2px 6px rgba(22,38,47,.06), 0 16px 30px -18px rgba(22,38,47,.38);
}
[data-family="curve"] body { background: var(--page); color: var(--ink); font-family: var(--f); font-size: 15px; line-height: 1.5; }
[data-family="curve"] :focus-visible { outline: 2px solid #efa24b; outline-offset: 2px; }

/* header: the curved gradient hero, centred */
[data-family="curve"] .hd { position: relative; background: linear-gradient(180deg, var(--g1), var(--g2)); color: #fff; border-radius: 0 0 50% 50% / 0 0 34px 34px; padding: 16px 16px 52px; text-align: center; }
[data-family="curve"] .hd.has-prog { border-radius: 0; padding-bottom: 0; }
[data-family="curve"] .hd-in { max-width: var(--w, 720px); margin: 0 auto; }
[data-family="curve"] .hd-row { display: flex; flex-direction: column; align-items: center; gap: 10px; }
[data-family="curve"] .hd-text { min-width: 0; max-width: 100%; }
[data-family="curve"] .hd-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; opacity: .95; }
[data-family="curve"] .hd-title { margin: 6px 0 2px; font-size: 22px; font-weight: 700; letter-spacing: -.01em; line-height: 1.22; text-wrap: balance; display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
[data-family="curve"] .hd-count { font-size: 12.5px; font-weight: 600; background: rgba(255,255,255,.22); border-radius: 999px; min-width: 26px; height: 26px; padding: 0 8px; display: inline-grid; place-items: center; }
[data-family="curve"] .hd-sum { margin: 0 auto; font-size: 13.5px; opacity: .95; max-width: 52ch; }
[data-family="curve"] .hd-sum b { font-weight: 600; }
[data-family="curve"] .hd-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
[data-family="curve"] .hd-below { margin-top: 12px; display: flex; justify-content: center; }
[data-family="curve"] .hd-prog { display: none; }
[data-family="curve"] .hd .curve { display: block; width: calc(100% + 32px); height: 34px; margin: 14px -16px -1px; }
[data-family="curve"] .pill-primary { display: inline-flex; align-items: center; gap: 6px; height: 36px; border: 0; border-radius: 999px; background: #fff; color: var(--deep); padding: 0 16px; font-size: 13.5px; font-weight: 600; white-space: nowrap; text-decoration: none; }
[data-family="curve"] .pill-primary[aria-disabled="true"] { opacity: .65; }
[data-family="curve"] .pill-quiet { display: inline-flex; align-items: center; gap: 6px; height: 34px; border: 0; border-radius: 999px; background: rgba(255,255,255,.2); color: #fff; padding: 0 13px; font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none; }
[data-family="curve"] .pill-state { display: inline-flex; align-items: center; height: 30px; border-radius: 999px; background: rgba(255,255,255,.2); color: #fff; padding: 0 12px; font-size: 12.5px; font-weight: 600; }

[data-family="curve"] .sheet { max-width: calc(var(--w, 720px) + 32px); margin: -30px auto 0; padding: 0 16px 80px; display: flex; flex-direction: column; gap: 14px; position: relative; }
[data-family="curve"] .hd.has-prog + .sheet { margin-top: 8px; }
[data-family="curve"] .sheet.wide { --w: 1080px; }
[data-family="curve"] .handle { display: none; }

[data-family="curve"] .label { display: flex; align-items: baseline; gap: 8px; margin: 8px 4px -4px; }
[data-family="curve"] .label .l { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
[data-family="curve"] .label .note { margin-left: auto; font-size: 12.5px; color: var(--muted); }

[data-family="curve"] .panel { background: var(--card); border-radius: 20px; box-shadow: var(--sh); padding: 6px 20px; }
[data-family="curve"] .panel.pad { padding: 18px 20px; }
[data-family="curve"] .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border: 0; border-top: 1px solid var(--line); width: 100%; text-align: left; background: transparent; color: inherit; text-decoration: none; min-height: 56px; }
[data-family="curve"] .row:first-child { border-top: 0; }
[data-family="curve"] .row.av { grid-template-columns: 40px minmax(0, 1fr) auto; }
[data-family="curve"] .row.num { grid-template-columns: 29px minmax(0, 1fr) auto; }
[data-family="curve"] button.row:hover, [data-family="curve"] a.row:hover { background: var(--field); margin: 0 -10px; padding-left: 10px; padding-right: 10px; width: calc(100% + 20px); border-radius: 12px; }
[data-family="curve"] .row.cur { background: var(--soft); margin: 0 -10px; padding-left: 10px; padding-right: 10px; width: calc(100% + 20px); border-radius: 12px; }
[data-family="curve"] .row-t { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-family="curve"] .row-t small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 6px; }
[data-family="curve"] .row-s { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-family="curve"] .row-s b { color: var(--ink); font-weight: 600; }
[data-family="curve"] .row.wrap .row-t, [data-family="curve"] .row.wrap .row-s { white-space: normal; }
[data-family="curve"] .row-end { display: flex; gap: 4px; align-items: center; }
[data-family="curve"] .avc { width: 40px; height: 40px; border-radius: 50%; background: var(--soft); color: var(--deep); display: grid; place-items: center; font-size: 13px; font-weight: 600; }
[data-family="curve"] .rk-n { width: 29px; height: 29px; border-radius: 50%; background: var(--field); color: var(--muted); display: grid; place-items: center; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
[data-family="curve"] .empty { padding: 12px 2px; color: var(--muted); font-size: 14px; }

[data-family="curve"] .hero-card { background: var(--soft); border-radius: 20px; padding: 18px 20px; }
[data-family="curve"] .hero-card .hc-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
[data-family="curve"] .hero-card h2 { margin: 0; font-size: 17px; font-weight: 600; color: var(--ink); }
[data-family="curve"] .hero-card .hc-note { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--deep); }
[data-family="curve"] .hero-card .hc-big { margin: 4px 0 2px; font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1.25; }
[data-family="curve"] .hero-card p { margin: 0; color: var(--ink2); font-size: 14px; }
[data-family="curve"] .hero-card .hc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; background: #fff; border-radius: 14px; padding: 10px 14px; box-shadow: var(--sh); margin-top: 8px; }
[data-family="curve"] .hero-card .hc-row:first-of-type { margin-top: 12px; }
[data-family="curve"] .hero-card .hc-btn { display: inline-flex; align-items: center; height: 36px; border: 1.5px solid var(--deep); border-radius: 12px; background: #fff; color: var(--deep); padding: 0 14px; font-size: 13.5px; font-weight: 600; white-space: nowrap; text-decoration: none; }
[data-family="curve"] .hero-card .hc-more { border: 0; background: none; color: var(--deep); font-weight: 600; font-size: 13.5px; padding: 10px 0 0; display: inline-flex; gap: 4px; align-items: center; }
[data-family="curve"] .hero-card.result { background: linear-gradient(135deg, var(--g1), var(--deep)); color: #fff; text-align: center; box-shadow: 0 12px 26px -14px var(--deep); padding: 22px 20px; }
[data-family="curve"] .hero-card.result .hc-note { color: #fff; opacity: .92; }
[data-family="curve"] .hero-card.result .hc-big, [data-family="curve"] .hero-card.result h2 { color: #fff; }
[data-family="curve"] .hero-card.result p { color: rgba(255,255,255,.92); }

[data-family="curve"] .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; border: 0; border-radius: 14px; background: linear-gradient(135deg, var(--g1), var(--deep)); color: #fff; padding: 0 20px; font-size: 14.5px; font-weight: 600; box-shadow: 0 10px 22px -12px var(--deep); white-space: nowrap; text-decoration: none; }
[data-family="curve"] .btn[aria-disabled="true"], [data-family="curve"] .btn:disabled { opacity: .36; box-shadow: none; }
[data-family="curve"] .btn2 { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; border: 1.5px solid var(--deep); border-radius: 14px; background: #fff; color: var(--deep); padding: 0 16px; font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none; }
[data-family="curve"] .btn2:hover { background: var(--soft); }
[data-family="curve"] .btn2:disabled { opacity: .4; }
[data-family="curve"] .btn-text { border: 0; background: none; color: var(--deep); font-weight: 600; font-size: 13.5px; padding: 6px 4px; display: inline-flex; gap: 6px; align-items: center; text-decoration: none; }
[data-family="curve"] .icon-btn { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: grid; place-items: center; }
[data-family="curve"] .icon-btn:hover { background: var(--field); color: var(--deep); }
[data-family="curve"] .icon-btn:disabled { opacity: .3; background: transparent; }

[data-family="curve"] .chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
[data-family="curve"] .chip.good { background: #e8f6ef; color: #1f7a52; }
[data-family="curve"] .chip.warn { background: #fdf4e8; color: #8a5a16; }
[data-family="curve"] .chip.bad { background: #fceeeb; color: #c0402d; }
[data-family="curve"] .chip.id { background: var(--soft); color: var(--deep); }
[data-family="curve"] .chip.mute { background: var(--field); color: var(--muted); }
[data-family="curve"] .dot-warn { width: 8px; height: 8px; border-radius: 50%; background: #efa24b; display: inline-block; flex: none; }

/* ---- form pieces (curve) ---- */
[data-family="curve"] .form { display: flex; flex-direction: column; gap: 14px; }
[data-family="curve"] .form > .q { background: var(--card); border-radius: 20px; box-shadow: var(--sh); padding: 18px 20px; }
[data-family="curve"] .q.bad { box-shadow: 0 0 0 2px #c0402d, var(--sh); }
[data-family="curve"] .q-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
[data-family="curve"] .q-label { font-size: 16px; font-weight: 600; line-height: 1.35; }
[data-family="curve"] .q-req { font-size: 11.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
[data-family="curve"] .q-help { font-size: 13.5px; color: var(--muted); margin: -4px 0 12px; }
[data-family="curve"] .q-count { font-size: 14px; font-weight: 700; color: var(--deep); white-space: nowrap; }
[data-family="curve"] .q-count.ok { color: #1f7a52; }
[data-family="curve"] .q-private { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--deep); font-weight: 600; margin: 0 0 10px; }
[data-family="curve"] .q-problem { margin-top: 8px; font-size: 13.5px; font-weight: 600; color: #c0402d; }
[data-family="curve"] .inp { width: 100%; height: 48px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; padding: 0 14px; font-size: 16px; color: var(--ink); }
[data-family="curve"] .inp:focus { outline: none; border-color: var(--g2); box-shadow: 0 0 0 4px rgba(63,112,150,.12); }
[data-family="curve"] textarea.inp { height: auto; min-height: 96px; padding: 11px 14px; resize: vertical; line-height: 1.45; display: block; }
[data-family="curve"] .q.bad .inp { border-color: #c0402d; }
[data-family="curve"] .inp-count { font-size: 12px; color: var(--muted); text-align: right; margin-top: 4px; }
[data-family="curve"] .seg { display: inline-flex; background: var(--field); border-radius: 12px; padding: 3px; flex-wrap: wrap; max-width: 100%; }
[data-family="curve"] .seg button { border: 0; background: transparent; border-radius: 9px; min-height: 42px; padding: 0 16px; font-size: 14px; font-weight: 600; color: var(--muted); }
[data-family="curve"] .seg button[aria-pressed="true"] { background: #fff; color: var(--deep); box-shadow: 0 1px 3px rgba(22,38,47,.14); }
[data-family="curve"] .seg.fill { display: flex; }
[data-family="curve"] .seg.fill button { flex: 1; }
[data-family="curve"] .opts { display: flex; flex-direction: column; gap: 8px; }
[data-family="curve"] .opt { display: grid; grid-template-columns: minmax(0, 1fr) 32px; gap: 12px; align-items: center; width: 100%; text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 12px 15px; min-height: 56px; font-size: 15px; font-weight: 600; transition: transform .08s; }
[data-family="curve"] .opt:active { transform: scale(.988); }
[data-family="curve"] .opt .mk { width: 32px; height: 32px; border-radius: 50%; background: var(--field); display: grid; place-items: center; color: #fff; }
[data-family="curve"] .opt[aria-pressed="true"] { border-color: var(--deep); }
[data-family="curve"] .opt[aria-pressed="true"] .mk { background: var(--deep); }
[data-family="curve"] .tiers { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 8px; }
[data-family="curve"] .tiers button { border: 2px solid var(--line); border-radius: 14px; background: #fff; min-height: 50px; font-size: 17px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
[data-family="curve"] .tiers button.sign { min-height: 40px; font-size: 14px; font-weight: 600; color: var(--muted); }
[data-family="curve"] .tiers button[aria-pressed="true"] { border-color: var(--deep); background: var(--deep); color: #fff; }
[data-family="curve"] .scale-ends { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); margin-top: 6px; padding: 0 4px; }
[data-family="curve"] .stepper { display: inline-flex; align-items: center; gap: 8px; }
[data-family="curve"] .stepper button { width: 44px; height: 44px; border: 1.5px solid var(--deep); border-radius: 12px; background: #fff; color: var(--deep); font-size: 20px; font-weight: 600; }
[data-family="curve"] .stepper input { width: 72px; height: 44px; border: 1.5px solid var(--line); border-radius: 12px; text-align: center; font-size: 17px; font-weight: 600; background: #fff; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
[data-family="curve"] .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ranked list (curve) */
[data-family="curve"] .rk-bar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 8px 0; background: var(--rk-bg, #fff); }
[data-family="curve"] .rk-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 50px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 0 6px 0 14px; color: var(--muted); }
[data-family="curve"] .rk-search:focus-within { border-color: var(--g2); box-shadow: 0 0 0 4px rgba(63,112,150,.12); }
[data-family="curve"] .rk-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--ink); }
[data-family="curve"] .rk-search input::-webkit-search-cancel-button { display: none; }
[data-family="curve"] .rk-clear { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--field); color: var(--muted); display: grid; place-items: center; }
[data-family="curve"] .rk-sub { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 12px 4px 6px; }
[data-family="curve"] .rk-sub .l { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
[data-family="curve"] .rk-sub .n { font-size: 12.5px; color: var(--muted); }
[data-family="curve"] .rk-list, [data-family="curve"] .rk-res { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
[data-family="curve"] .rk-item { display: grid; grid-template-columns: 26px 32px minmax(0, 1fr) auto; gap: 8px; align-items: center; background: #fff; border: 2px solid var(--deep); border-radius: 16px; padding: 7px 6px 7px 4px; min-height: 60px; }
[data-family="curve"] .rk-item.drag { box-shadow: 0 14px 30px rgba(16,42,58,.28); position: relative; z-index: 5; }
[data-family="curve"] .rk-list[style*="--cut"] { position: relative; padding-top: 30px; }
[data-family="curve"] .rk-list[style*="--cut"]::before, [data-family="curve"] .rk-item.rk-cut::after { position: absolute; left: 14px; height: 30px; display: flex; align-items: center; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
[data-family="curve"] .rk-list[style*="--cut"]::before { content: var(--cut); top: 0; color: var(--deep); }
[data-family="curve"] .rk-item.rk-cut { position: relative; margin-bottom: 30px; }
[data-family="curve"] .rk-item.rk-cut::after { content: "The rest"; top: 100%; margin-top: 2px; color: var(--muted); }
[data-family="curve"] .rk-item.rk-rest .rk-n { background: var(--field); color: var(--deep); }
[data-family="curve"] .rk-grip { width: 26px; height: 40px; display: grid; place-items: center; color: var(--faint); touch-action: none; cursor: grab; border: 0; background: none; padding: 0; }
[data-family="curve"] .rk-item .rk-n { width: 32px; height: 32px; background: var(--deep); color: #fff; font-size: 14px; }
[data-family="curve"] .rk-pick { display: grid; grid-template-columns: minmax(0, 1fr) 32px; gap: 12px; align-items: center; width: 100%; text-align: left; background: #fff; border: 2px solid transparent; border-radius: 16px; padding: 11px 15px; min-height: 60px; box-shadow: var(--sh); transition: transform .08s; }
[data-family="curve"] .rk-pick:active { transform: scale(.988); }
[data-family="curve"] .rk-pick .rk-n { width: 32px; height: 32px; color: #fff; font-size: 14px; }
[data-family="curve"] .rk-pick[aria-pressed="true"] { border-color: var(--deep); }
[data-family="curve"] .rk-pick[aria-pressed="true"] .rk-n { background: var(--deep); }
[data-family="curve"] .rk-pick.full { opacity: .38; }
[data-family="curve"] .rk-hint { padding: 12px 4px; font-size: 14px; color: var(--muted); text-align: center; }
[data-family="curve"] .rk-more { padding: 6px 4px; font-size: 13px; color: var(--muted); text-align: center; }
[data-family="curve"] .form > .q .rk-item, [data-family="curve"] .form > .q .rk-pick { box-shadow: none; border-color: var(--line); }
[data-family="curve"] .form > .q .rk-item { border-color: var(--softline); }
[data-family="curve"] .form > .q .rk-pick[aria-pressed="true"] { border-color: var(--deep); }

/* survey shell (curve): the Beis Rivkah anatomy */
[data-family="curve"] .sv-stage { min-height: 100vh; min-height: 100dvh; display: flex; justify-content: center; align-items: flex-start; padding: 28px 16px; background: linear-gradient(135deg, #e3ecf1, #eef3f6); }
[data-family="curve"] .sv { width: 100%; max-width: 520px; height: min(880px, calc(100dvh - 56px)); min-height: 600px; background: var(--page); border-radius: 26px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 24px 60px -30px rgba(22,38,47,.45), 0 2px 8px rgba(22,38,47,.06); }
[data-family="curve"] .svh { position: relative; background: linear-gradient(180deg, var(--g1), var(--g2)); color: #fff; text-align: center; padding: 14px 22px 0; flex: none; }
[data-family="curve"] .svtop { display: grid; grid-template-columns: 76px minmax(0, 1fr) 76px; align-items: center; min-height: 36px; }
[data-family="curve"] .svtop > :first-child { justify-self: start; }
[data-family="curve"] .svtop > :last-child { justify-self: end; }
[data-family="curve"] .svback { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.2); color: #fff; display: grid; place-items: center; padding: 0; }
[data-family="curve"] .svback span { display: none; }
[data-family="curve"] .svout { height: 30px; border: 0; border-radius: 999px; background: rgba(255,255,255,.2); color: #fff; padding: 0 12px; font-size: 12px; font-weight: 600; white-space: nowrap; }
[data-family="curve"] .svstep { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; font-variant-numeric: tabular-nums; opacity: .95; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-family="curve"] .svt { margin: 8px auto 4px; font-size: 21px; font-weight: 700; line-height: 1.22; max-width: 24ch; text-wrap: balance; }
[data-family="curve"] .svs { margin: 0 auto; font-size: 13.5px; opacity: .92; max-width: 42ch; }
[data-family="curve"] .svprog { display: none; }
[data-family="curve"] .svh .curve { display: block; width: calc(100% + 44px); height: 32px; margin: 14px -22px -1px; }
[data-family="curve"] .svscroll { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-gutter: stable; }
[data-family="curve"] .svwrap { padding: 6px 20px 16px; display: flex; flex-direction: column; gap: 8px; --rk-bg: var(--page); }
[data-family="curve"] .svfoot { padding: 8px 20px calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; background: var(--page); }
[data-family="curve"] .big { width: 100%; height: 54px; border: 0; border-radius: 16px; color: #fff; font-size: 15.5px; font-weight: 600; background: linear-gradient(135deg, var(--g1), var(--deep)); box-shadow: 0 10px 22px -12px var(--deep); }
[data-family="curve"] .big[aria-disabled="true"] { opacity: .36; box-shadow: none; }
[data-family="curve"] .svwrap .q, [data-family="curve"] .svwrap .form > .q { padding: 0; background: transparent; box-shadow: none; border-radius: 0; }
[data-family="curve"] .svwrap .q.bad { box-shadow: none; }
[data-family="curve"] .svwrap .seg { background: #fff; box-shadow: var(--sh); }
[data-family="curve"] .svwrap .seg button[aria-pressed="true"] { background: var(--deep); color: #fff; }
[data-family="curve"] .svwrap .opt { border-color: transparent; box-shadow: var(--sh); }
[data-family="curve"] .svwrap .opt[aria-pressed="true"] { border-color: var(--deep); }
[data-family="curve"] .svwrap .inp { border-color: transparent; box-shadow: var(--sh); }
[data-family="curve"] .svwrap .inp:focus { border-color: var(--g2); }
[data-family="curve"] .svwrap .rk-search { border-color: transparent; box-shadow: var(--sh); }
[data-family="curve"] .svwrap .tiers button { border-color: transparent; box-shadow: var(--sh); }
[data-family="curve"] .svwrap .tiers button.sign { box-shadow: none; background: transparent; border-color: transparent; }
[data-family="curve"] .svwrap .tiers button[aria-pressed="true"] { border-color: var(--deep); background: var(--deep); }
[data-family="curve"] .svwrap .panel { padding: 4px 16px; }
[data-family="curve"] .code { display: block; width: 100%; height: 58px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; text-align: center; font-size: 22px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
[data-family="curve"] .code:focus { outline: none; border-color: var(--g2); box-shadow: 0 0 0 4px rgba(63,112,150,.15); }
[data-family="curve"] .code::placeholder { color: #b5c1c9; letter-spacing: .08em; }
[data-family="curve"] .lede { font-size: 14px; color: var(--muted); text-align: center; max-width: 44ch; margin: 4px auto 6px; }
[data-family="curve"] .intro-note { font-size: 15px; font-weight: 500; line-height: 1.5; color: var(--ink); margin: 2px 4px 16px; text-wrap: pretty; }
[data-family="curve"] .flag { font-size: 13.5px; font-weight: 600; color: #c0402d; text-align: center; }
[data-family="curve"] .save { font-size: 12.5px; color: var(--muted); text-align: center; }
[data-family="curve"] .save.ok { color: #1f7a52; }
[data-family="curve"] .review-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; text-align: left; background: #fff; border: 2px solid transparent; border-radius: 16px; padding: 12px 15px; box-shadow: var(--sh); min-height: 62px; }
[data-family="curve"] .review-row .row-s { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
[data-family="curve"] .review-row.bad { border-color: #c0402d; background: #fceeeb; }
[data-family="curve"] .review-row.bad .row-s.err { color: #c0402d; font-weight: 600; }
[data-family="curve"] .rv { display: flex; flex-direction: column; gap: 8px; }
[data-family="curve"] .steps { display: flex; flex-direction: column; gap: 8px; }
[data-family="curve"] .steps .row { background: #fff; border-radius: 16px; box-shadow: var(--sh); padding: 12px 15px; border: 0; }
[data-family="curve"] .steps .rk-n { background: var(--deep); color: #fff; }

[data-family="curve"] .toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 90; background: var(--ink); color: #fff; border-radius: 999px; padding: 10px 18px; font-size: 13.5px; box-shadow: 0 14px 30px rgba(16,42,58,.28); width: max-content; max-width: calc(100% - 32px); }
[data-family="curve"] .toast.bad { background: #c0402d; }
[data-family="curve"] .scrim { position: fixed; inset: 0; background: rgba(14,30,40,.4); z-index: 80; display: grid; place-items: center; padding: 16px; }
[data-family="curve"] .modal { width: min(420px, 100%); background: var(--page); border-radius: 22px; overflow: hidden; box-shadow: 0 24px 60px -30px rgba(22,38,47,.6); }
[data-family="curve"] .modal-h { background: linear-gradient(180deg, var(--g1), var(--g2)); color: #fff; text-align: center; padding: 20px 20px 34px; border-radius: 0 0 50% 50% / 0 0 24px 24px; }
[data-family="curve"] .modal-h h3 { margin: 0 0 4px; font-size: 21px; font-weight: 700; }
[data-family="curve"] .modal-h p { margin: 0; font-size: 13.5px; opacity: .92; }
[data-family="curve"] .modal-f { padding: 16px; display: flex; gap: 10px; }
[data-family="curve"] .modal-f .btn, [data-family="curve"] .modal-f .btn2 { flex: 1; height: 50px; border-radius: 16px; }

@media (max-width: 640px) {
  [data-family="curve"] .hd-title { font-size: 21px; }
  [data-family="curve"] .sv-stage { padding: 0; background: var(--page); }
  [data-family="curve"] .sv { border-radius: 0; height: auto; min-height: 100vh; min-height: 100dvh; box-shadow: none; }
  [data-family="curve"] .svscroll { overflow: visible; }
  [data-family="curve"] .svfoot { position: sticky; bottom: 0; z-index: 4; }
  [data-family="curve"] .panel { padding: 4px 16px; }
  [data-family="curve"] .panel.pad, [data-family="curve"] .form > .q { padding: 16px; }
}

/* ================================================================
   shared layout helpers (both families)
   ================================================================ */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 24px; align-items: start; }
.split > .side { position: sticky; top: 16px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.navbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.navbar .mid { text-align: center; font-size: 13px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foot-bar { position: sticky; bottom: 0; z-index: 20; padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px)); }
[data-family="sheet"] .foot-bar { background: linear-gradient(transparent, var(--canvas) 24%); }
[data-family="curve"] .foot-bar { background: linear-gradient(transparent, var(--page) 24%); }
.foot-bar .inner { display: flex; gap: 10px; align-items: center; }
.foot-bar .inner > .btn { flex: 1; }
.foot-note { font-size: 12.5px; text-align: center; margin-top: 6px; }
[data-family="sheet"] .foot-note { color: var(--soft); }
[data-family="curve"] .foot-note { color: var(--muted); }
.foot-note.ok { color: #2c6e3f; }
.mob-only, .narrow-only { display: none !important; }
@media (max-width: 900px) {
  .narrow-only { display: inline-flex !important; }
  .split { grid-template-columns: 1fr; }
  .split > .side { position: static; }
}
@media (max-width: 640px) {
  .mob-only { display: inline-flex !important; }
  .desk-only { display: none !important; }
}

/* config form on an office page (shared/formpage.js) */
[data-family="curve"] .fp-form { background: transparent; box-shadow: none; padding: 0; }
[data-family="curve"] .mform .panel .form > .q + .q { margin-top: 0; }

/* ranked rows: names may take two lines rather than vanish into "Mendel Gu…" */
.rk-item .row-t, .rk-pick .row-t { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (max-width: 640px) {
  .rk-item { gap: 6px !important; }
  .rk-item .icon-btn { width: 34px; height: 40px; border-radius: 10px; }
  [data-family="curve"] .rk-item { grid-template-columns: 22px 30px minmax(0, 1fr) auto; }
  [data-family="sheet"] .rk-item { grid-template-columns: 24px 28px minmax(0, 1fr) auto; }
  .rk-grip { width: 22px !important; }
}
/* curve: the first section label would sit on the hero's overlap, so the cards start right under the curve */
[data-family="curve"] .sheet > .handle + .label { display: none; }

/* ================================================================
   Nov 15: a schedule's rows, browsing the bochurim, yeshivos by tier
   ================================================================ */
/* schedule (form.js RENDER.schedule): a short time, a line, then up / down / off */
.sch { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sch-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.sch-row .inp { height: 44px; }
.sch-t { font-variant-numeric: tabular-nums; }
.sch-acts { display: flex; }
.sch-acts .icon-btn:disabled { opacity: .3; }
.sch-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.sch-add { padding-left: 0 !important; }
.sch-add:disabled { opacity: .4; }
.sch-n { font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
[data-family="sheet"] .sch-n { color: var(--soft); }
[data-family="curve"] .sch-n { color: var(--muted); }
[data-family="sheet"] .sch-acts .icon-btn:hover { background: #fff; }
@media (max-width: 640px) {
  /* a phone: the line gets the room; up and down stack in one column beside the x */
  .sch-row { grid-template-columns: 62px minmax(0, 1fr) auto; gap: 6px; }
  .sch-row .inp { padding: 0 10px; }
  .sch-acts { display: grid; grid-template-columns: 30px 32px; grid-template-rows: 22px 22px; }
  .sch-acts .icon-btn { width: 30px; height: 22px; border-radius: 8px; }
  .sch-acts .icon-btn svg { width: 16px; height: 16px; }
  .sch-acts [data-rm] { grid-column: 2; grid-row: 1 / 3; width: 32px; height: 44px; }
}

/* browsing the bochurim (rank_people): order and grouping, then group headers inside the list */
.rk-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 8px; }
.rk-tools .seg button { min-height: 36px; padding: 0 14px; font-variant-numeric: tabular-nums; }
.rk-gsel { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; min-width: 0; }
.rk-gsel select {
  appearance: none; -webkit-appearance: none; height: 40px; border-radius: 999px; padding: 0 32px 0 14px; font: inherit; font-size: 14px; font-weight: 600; min-width: 0; max-width: 100%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2331607F' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 13px center;
}
[data-family="sheet"] .rk-gsel { color: var(--soft); }
[data-family="sheet"] .rk-gsel select { border: 0; color: var(--deep); }
[data-family="curve"] .rk-gsel { color: var(--muted); }
[data-family="curve"] .rk-gsel select { border: 1.5px solid var(--line); border-radius: 12px; color: var(--deep); }
.rk-grp { display: grid; grid-template-columns: minmax(0, 1fr) auto 22px; gap: 10px; align-items: center; width: 100%; border: 0; text-align: left; padding: 10px 14px; min-height: 44px; }
.rk-grp-t { font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-grp-n { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rk-grp-i { display: grid; place-items: center; }
[data-family="sheet"] .rk-grp { background: var(--canvas); border-top: 1px solid var(--line); color: var(--soft); }
[data-family="sheet"] .rk-grp:first-child { border-top: 0; }
[data-family="sheet"] .rk-grp .rk-grp-n { color: var(--deep); }
[data-family="sheet"] .svwrap .rk-grp { background: color-mix(in srgb, var(--strong) 35%, var(--well)); border-color: var(--hair); }
[data-family="curve"] .rk-grp { background: transparent; color: var(--muted); padding: 10px 4px 2px; min-height: 36px; }
[data-family="curve"] .rk-grp .rk-grp-n { color: var(--deep); }
.rk-morebtn { display: block; width: 100%; border: 0; cursor: pointer; font-weight: 600; }
[data-family="sheet"] .rk-morebtn { background: transparent; color: var(--deep); margin-top: 4px; }
[data-family="curve"] .rk-morebtn { background: transparent; color: var(--deep); }

/* "Yeshivos in B+" under the mashpia's tier chips (only when the admin allows it) */
.ty { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ty-d { border-radius: 14px; overflow: hidden; }
.ty-d summary { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; gap: 10px; align-items: center; padding: 10px 14px; min-height: 44px; cursor: pointer; font-size: 14px; font-weight: 600; }
.ty-d summary::-webkit-details-marker { display: none; }
.ty-d summary svg { transition: transform .15s; }
.ty-d[open] summary svg { transform: rotate(180deg); }
.ty-n { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ty-l { list-style: none; margin: 0; padding: 0 0 6px; }
.ty-l li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 8px 14px; }
.ty-l .row-s { text-align: right; }
.ty-empty, .ty-none { font-size: 13px; padding: 4px 14px 10px; }
.ty-none { padding: 8px 2px 0; }
[data-family="sheet"] .ty-d { background: #fff; }
[data-family="sheet"] .ty-d summary { color: var(--deep); }
[data-family="sheet"] .ty-n { color: var(--soft); }
[data-family="sheet"] .ty-l li { border-top: 1px solid var(--line); }
[data-family="sheet"] .ty-empty, [data-family="sheet"] .ty-none { color: var(--soft); }
[data-family="curve"] .ty-d { background: var(--field); }
[data-family="curve"] .ty-d summary { color: var(--deep); }
[data-family="curve"] .ty-n { color: var(--muted); }
[data-family="curve"] .ty-l li { border-top: 1px solid var(--line); }
[data-family="curve"] .ty-empty, [data-family="curve"] .ty-none { color: var(--muted); }

/* ================================================================
   Nov 16 (A): sections and pairs on a single-page form, compact toggles,
   dropdowns with "Add another", and the table kind (rows of small cells)
   ================================================================ */
/* sections (createForm layout:'page'): a heading per run of the same step */
.fp-paged { display: flex; flex-direction: column; }
.fsec[hidden] { display: none; }
.fsec-h { margin: 0; }
.q-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.q-pair.one { grid-template-columns: minmax(0, 1fr); }
/* sheet: the house section label (uppercase, a hairline after it), then the rows on one well */
[data-family="sheet"] .fp-paged { gap: 0; }
[data-family="sheet"] .fsec-h { display: flex; align-items: center; gap: 12px; margin: 28px 0 10px; }
[data-family="sheet"] .fsec:first-child .fsec-h { margin-top: 22px; }
[data-family="sheet"] .fsec-h .l { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); white-space: nowrap; }
[data-family="sheet"] .fsec-h::after { content: ""; flex: 1; border-top: 1px solid var(--strong); opacity: .7; }
[data-family="sheet"] .fsec-b { background: var(--well); border-radius: 16px; overflow: hidden; }
[data-family="sheet"] .fsec-b > .q:first-child, [data-family="sheet"] .fsec-b > .q-pair:first-child { border-top: 0; }
[data-family="sheet"] .q-pair { border-top: 1px solid var(--hair); }
[data-family="sheet"] .fsec-b > .q-pair:first-child { border-top: 0; }
[data-family="sheet"] .q-pair > .q { border-top: 0; }
/* curve: one white card per section, the heading inside it, the questions as plain blocks */
[data-family="curve"] .fp-paged { gap: 14px; }
[data-family="curve"] .fsec { background: var(--card); border-radius: 20px; box-shadow: var(--sh); padding: 18px 20px 6px; }
[data-family="curve"] .fsec-h { font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.3; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
[data-family="curve"] .fsec .q { padding: 12px 0 14px; }
[data-family="curve"] .fsec .q.bad { box-shadow: none; }
[data-family="curve"] .q-pair { column-gap: 16px; }
[data-family="curve"] .fsec .q-label { font-size: 14.5px; font-weight: 600; }
@media (max-width: 640px) {
  .q-pair { grid-template-columns: minmax(0, 1fr); }
  [data-family="sheet"] .q-pair > .q + .q { border-top: 1px solid var(--hair); }
  [data-family="curve"] .fsec { padding: 16px 16px 4px; }
}

/* display 'compact': small toggles that wrap (the months), about four across on a phone */
.chips-t { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
@media (min-width: 641px) { .chips-t { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: 640px; } }
.chip-t { min-height: 40px; padding: 0 2px; font-size: 13px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
[data-family="sheet"] .chip-t { border: 0; border-radius: 10px; background: #fff; color: var(--ink); }
[data-family="sheet"] .chip-t:hover { color: var(--deep); }
[data-family="sheet"] .chip-t[aria-pressed="true"] { background: var(--base); color: #fff; }
[data-family="curve"] .chip-t { border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }
[data-family="curve"] .chip-t[aria-pressed="true"] { background: var(--deep); border-color: var(--deep); color: #fff; }
[data-family="sheet"] .svwrap .chip-t { background: var(--well); }

/* display 'dropdowns': one select per answer, then "Add another language" */
.dd { display: flex; flex-direction: column; gap: 8px; }
.dd-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.dd-sel {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 38px !important; font-weight: 500;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2331607F' stroke-width='1.7'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 14px center !important;
}
.dd-sel:has(option[value=""]:checked) { color: var(--faint); }
.dd-add { margin-top: 6px; padding-left: 0 !important; }
@media (min-width: 641px) { .dd { max-width: 420px; } }

/* table: a card per row on a phone; one header and a line of cells per row when there is room */
.tb { container-type: inline-size; }
.tb-head { display: none; }
.tb-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tb-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -4px -4px 4px 0; }
.tb-n { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.tb-acts { display: flex; }
.tb-acts .icon-btn { width: 34px; height: 34px; }
.tb-acts .icon-btn:disabled { opacity: .3; }
/* a phone card: six tracks, a cell spans by its width (1 = a third, 2 = half, 3 = two thirds, 4 = the line) */
.tb-cells { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 8px; }
.tb-cell.w1 { grid-column: span 2; } .tb-cell.w2 { grid-column: span 3; } .tb-cell.w3 { grid-column: span 4; }
.tb-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tb-cell.w4 { grid-column: 1 / -1; }
.tb-l { font-size: 12px; font-weight: 600; }
.tb-cell .inp { height: 44px; }
.tb-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.tb-add { padding-left: 0 !important; }
.tb-add:disabled { opacity: .4; }
.tb-count { font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
[data-family="sheet"] .tb-row { background: color-mix(in srgb, var(--strong) 28%, var(--well)); border-radius: 14px; padding: 10px 12px 12px; }
[data-family="sheet"] .tb-n, [data-family="sheet"] .tb-l, [data-family="sheet"] .tb-count, [data-family="sheet"] .tb-head { color: var(--soft); }
[data-family="sheet"] .tb-acts .icon-btn:hover { background: #fff; }
[data-family="curve"] .tb-row { border: 1.5px solid var(--line); border-radius: 16px; padding: 10px 12px 12px; }
[data-family="curve"] .tb-n, [data-family="curve"] .tb-l, [data-family="curve"] .tb-count, [data-family="curve"] .tb-head { color: var(--muted); }
.tb .inp.miss { outline: 2px solid color-mix(in srgb, var(--bad) 55%, transparent); }
[data-family="curve"] .tb .inp.miss { outline: 0; border-color: #c0402d; }
/* a medium box (the curve card on a computer): three cells across, every cell the same */
@container (min-width: 480px) and (max-width: 699px) {
  .tb-cells { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tb-cell.w1, .tb-cell.w2, .tb-cell.w3, .tb-cell.w4 { grid-column: auto; }
}
@container (min-width: 700px) {
  .tb-head { display: grid; grid-template-columns: minmax(0, 1fr) 108px; margin: 0 0 6px; }
  .tb-hc { display: grid; grid-template-columns: var(--tb-cols); gap: 8px; font-size: 12px; font-weight: 600; }
  .tb-hc span { padding-left: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tb-rows { gap: 6px; }
  .tb-row, [data-family="sheet"] .tb-row, [data-family="curve"] .tb-row { display: grid; grid-template-columns: minmax(0, 1fr) 108px; align-items: center; padding: 0; border: 0; background: transparent; border-radius: 0; }
  .tb-top { display: contents; }
  .tb-n { display: none; }
  .tb-acts { grid-column: 2; grid-row: 1; justify-content: flex-end; }
  .tb-cells { grid-column: 1; grid-row: 1; grid-template-columns: var(--tb-cols); }
  .tb-cell.w1, .tb-cell.w2, .tb-cell.w3, .tb-cell.w4 { grid-column: auto; }
  .tb-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tb-cell .inp { height: 42px; padding: 0 10px; font-size: 15px; }
}
