/* ═════════════════════════════════════════════════════════════
   Chestionar sportivi — RYEN Health
   Desktop: fidel documentului (foaie A4, frunze acuarelă, benzi navy/lila)
   Mobil:   aceeași identitate, adaptată pentru atingere
   ═════════════════════════════════════════════════════════════ */

:root {
  --navy: #1f497d;
  --navy-hi: #4b6d96;
  --navy-lo: #193b64;
  --lilac: #b2a1c7;
  --lilac-hi: #d1c7de;
  --lilac-lo: #8f7fa6;
  --shadow-band: rgba(107, 97, 120, .55);
  --title: #3d3a78;
  --title-2: #2f3f63;
  --ink: #1c1c22;
  --ink-2: #4a4a55;
  --muted: #7a7a86;
  --rule: #6f6f78;
  --rule-soft: rgba(60, 60, 70, .32);
  --paper: #f2f1ef;
  --paper-2: #f7f6f3;
  --glass: rgba(255, 255, 255, .62);
  --focus: rgba(31, 73, 125, .08);
  --ok: #2f7a5b;
  --err: #b4383b;
  --serif: 'Crimson Pro', 'Times New Roman', Times, serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sheet-w: 880px;
  --pad-x: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
  background: #dfe4ea;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* fundal: aceeași acuarelă, estompată */
.backdrop {
  position: fixed; inset: -40px; z-index: -1;
  background:
    linear-gradient(180deg, rgba(232, 236, 242, .78), rgba(222, 228, 236, .9)),
    var(--bg-full) center / cover no-repeat;
  filter: blur(14px) saturate(.9);
}

/* ───────── Bara de sus ───────── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px clamp(16px, 3vw, 32px);
  font-family: var(--sans);
  background: rgba(247, 246, 243, .72);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(31, 73, 125, .08);
}
.brand { display: flex; align-items: center; gap: 11px; }
.mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 19px; color: #fff;
  background: linear-gradient(145deg, #2b5c95, var(--navy-lo));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 4px 12px rgba(31, 73, 125, .25);
}
.brand-t { display: flex; flex-direction: column; line-height: 1.15; }
.brand-t b { font-size: 14px; letter-spacing: .02em; color: var(--navy-lo); }
.brand-t small { font-size: 12px; color: var(--muted); }
.save { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.save i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(47, 122, 91, .15); transition: background .3s; }
.save[data-state="saving"] i { background: #c79a2b; box-shadow: 0 0 0 3px rgba(199, 154, 43, .18); }
.save[data-state="error"] i { background: var(--err); }
body[data-screen="intro"] .save { visibility: hidden; }

/* ───────── Ecrane ───────── */
.screen { display: none; }
.screen.active { display: block; animation: rise .5s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ───────── Butoane ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent;
  font-family: var(--sans); font-weight: 600; font-size: 15px; letter-spacing: .01em;
  cursor: pointer; transition: transform .2s var(--ease), box-shadow .25s, background .25s, border-color .25s;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.btn.primary { color: #fff; background: linear-gradient(180deg, #275993, var(--navy)); box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 8px 22px -8px rgba(31, 73, 125, .65); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 12px 28px -8px rgba(31, 73, 125, .7); }
.btn.primary:hover svg { transform: translateX(3px); }
.btn.ghost { color: var(--navy-lo); background: rgba(255, 255, 255, .6); border-color: rgba(31, 73, 125, .18); }
.btn.ghost:hover { background: #fff; border-color: rgba(31, 73, 125, .35); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:focus-visible, .link:focus-visible { outline: 3px solid rgba(31, 73, 125, .35); outline-offset: 2px; }
.link { background: none; border: 0; padding: 0; color: var(--navy); font-family: var(--sans); font-weight: 600; font-size: 13.5px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(31, 73, 125, .35); }
.link:hover { text-decoration-color: currentColor; }

/* ───────── Start / Final ───────── */
#intro, #done { padding: clamp(24px, 6vh, 72px) 16px 64px; }
.intro-card {
  position: relative; overflow: hidden; isolation: isolate;
  max-width: 720px; margin: 0 auto;
  padding: clamp(56px, 9vw, 96px) clamp(24px, 7vw, 80px) clamp(40px, 6vw, 64px);
  text-align: center;
  background: var(--paper);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(20, 30, 50, .06), 0 30px 60px -24px rgba(20, 40, 70, .35);
}
.intro-bg { position: absolute; inset: 0; z-index: -1; background: var(--bg-full) center / cover no-repeat; opacity: .95; }
.intro-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(247, 246, 243, .88), rgba(247, 246, 243, .35) 75%, transparent); }
.eyebrow { margin: 0 0 14px; font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--navy-hi); }
.intro-card h1 { margin: 0; font-weight: 600; font-size: clamp(34px, 5.6vw, 54px); line-height: 1.05; color: var(--title-2); letter-spacing: -.01em; }
.intro-card h1 em { font-style: italic; font-weight: 500; color: var(--title); }
.lead { max-width: 520px; margin: 20px auto 0; font-size: 19px; line-height: 1.5; color: var(--ink-2); }
.facts { display: flex; justify-content: center; gap: clamp(14px, 4vw, 40px); margin: 34px 0 0; padding: 0; list-style: none; font-family: var(--sans); }
.facts li { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.facts b { font-family: var(--serif); font-size: 30px; font-weight: 600; color: var(--navy); line-height: 1; }
.facts span { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.intro-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 38px; }
.intro-actions .btn { min-width: 220px; }
.fine { max-width: 470px; margin: 26px auto 0; font-family: var(--sans); font-size: 12.5px; line-height: 1.6; color: var(--muted); }
#intro .res-t, #intro .res-only { display: none; }
#intro.resume .res-t { display: inline; }
#intro.resume .res-only { display: inline-flex; }
#intro.resume .new-t { display: none; }

.seal { width: 74px; height: 74px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, #2b5c95, var(--navy-lo)); box-shadow: 0 0 0 8px rgba(31, 73, 125, .08), 0 14px 30px -10px rgba(31, 73, 125, .6); }
.seal svg { width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .7s .3s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ───────── Progres ───────── */
.progress {
  position: sticky; top: 59px; z-index: 20;
  max-width: calc(var(--sheet-w) + 120px); margin: 0 auto;
  padding: 18px 16px 14px;
  font-family: var(--sans);
}
.prog-top, .bar { display: none; }
.steps { position: relative; display: flex; justify-content: space-between; margin: 0; padding: 0; list-style: none; }
.steps::before { content: ""; position: absolute; left: 5%; right: 5%; top: 15px; height: 2px; background: rgba(31, 73, 125, .14); }
.steps li { position: relative; flex: 1; display: flex; justify-content: center; }
.steps button { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 0 2px; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.steps button:disabled { cursor: default; }
.steps .n {
  position: relative; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: var(--muted);
  background: #f4f4f2; border: 1.5px solid rgba(31, 73, 125, .2);
  transition: all .3s var(--ease);
}
.steps .t { max-width: 96px; font-size: 11px; font-weight: 600; line-height: 1.25; text-align: center; color: var(--muted); transition: color .3s; }
.steps button:not(:disabled):hover .n { border-color: var(--navy); color: var(--navy); }
.steps .done .n { color: #fff; background: var(--navy-hi); border-color: var(--navy-hi); }
.steps .done .n::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 8px no-repeat; border: 2px solid #f4f4f2; }
.steps .current .n { color: #fff; background: var(--navy); border-color: var(--navy); box-shadow: 0 0 0 5px rgba(31, 73, 125, .14); transform: scale(1.08); }
.steps .current .t { color: var(--navy-lo); }

/* ═════════════ FOAIA (pagina din PDF) ═════════════ */
#sheets { padding: 6px 16px 0; }
.sheet {
  position: relative; isolation: isolate;
  display: none;
  max-width: var(--sheet-w); margin: 0 auto;
  min-height: calc(var(--sheet-w) * 1.294);
  padding: 30px var(--pad-x) 190px;
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(20, 30, 50, .08), 0 2px 8px rgba(20, 30, 50, .05), 0 40px 70px -30px rgba(20, 40, 70, .4);
}
.sheet.active { display: block; animation: sheetIn .55s var(--ease) both; }
@keyframes sheetIn { from { opacity: 0; transform: translateY(18px) scale(.995); } to { opacity: 1; transform: none; } }

/* frunze: sus + jos, mijlocul se estompează — funcționează la orice înălțime */
.sheet-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.sheet-bg::before, .sheet-bg::after { content: ""; position: absolute; left: 0; right: 0; aspect-ratio: 1055 / 477; background: var(--bg-top) top center / 100% 100% no-repeat; }
.sheet-bg::before { top: 0; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.sheet-bg::after { bottom: 0; aspect-ratio: 1055 / 567; background-image: var(--bg-bottom); -webkit-mask-image: linear-gradient(transparent, #000 30%); mask-image: linear-gradient(transparent, #000 30%); }
.sheet::before { content: ""; position: absolute; left: 0; right: 0; top: 30%; height: 40%; z-index: -2; background: var(--bg-mid) center / 100% 100% no-repeat; opacity: .8; -webkit-mask-image: linear-gradient(transparent, #000 25%, #000 75%, transparent); mask-image: linear-gradient(transparent, #000 25%, #000 75%, transparent); }

.sheet-head {
  display: flex; justify-content: space-between;
  margin: 0 -8px 18px; padding: 2px 8px;
  font-family: var(--serif); font-weight: 700; font-size: 15px; color: #fff;
  background: linear-gradient(180deg, #d9d9d9, #cfcfcf);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .12);
}
.sheet:not(.show-head) .sheet-head { visibility: hidden; height: 6px; padding: 0; margin-bottom: 26px; }
.sheet:not(:has(.sheet-head)) .sheet-body { padding-top: 32px; }

.doc-title { margin: 6px 0 22px; text-align: center; font-weight: 700; font-size: 25px; line-height: 1.25; letter-spacing: .01em; color: var(--title-2); }
.doc-title span { color: var(--title); }

.page-pill { position: absolute; left: 0; right: 0; bottom: 30px; display: flex; justify-content: center; }
.page-pill::before { content: ""; position: absolute; left: 14%; right: 14%; top: 50%; height: 1px; background: linear-gradient(90deg, transparent, rgba(80, 90, 110, .45) 20%, rgba(80, 90, 110, .45) 80%, transparent); }
.page-pill span { position: relative; min-width: 48px; padding: 3px 14px; text-align: center; font-size: 14px; background: #fff; border: 1px solid rgba(80, 90, 110, .35); border-radius: 7px; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }

/* ───────── Benzi de secțiune (navy / lila) ───────── */
.band {
  position: relative;
  margin: 30px -22px 20px;
  padding: 5px 16px;
  text-align: center;
  font-weight: 700; font-size: 15.5px; letter-spacing: .03em; color: #fff;
  background: linear-gradient(180deg, #23518a, var(--navy) 55%, #1d4475);
  border-top: 3px solid var(--navy-hi);
  border-bottom: 3px solid var(--navy-lo);
  box-shadow: 3px 3px 0 var(--shadow-band);
}
.band:first-child { margin-top: 4px; }
.band.alt { background: linear-gradient(180deg, #bcadcf, var(--lilac)); border-top-color: var(--lilac-hi); border-bottom-color: var(--lilac-lo); text-shadow: 0 1px 1px rgba(60, 40, 90, .25); }
.band.small { font-size: 14px; }
.band em { font-weight: 400; font-style: italic; opacity: .85; font-size: .9em; }

.note { margin: -4px 0 10px; text-align: center; font-style: italic; font-size: 14.5px; color: var(--muted); }
.intro { margin: -8px 0 14px; font-size: 15.5px; color: var(--ink-2); }
.intro.center { text-align: center; }
.thanks { margin: 46px 0 0; text-align: center; font-size: 19px; font-style: italic; color: var(--title-2); }

/* ───────── Întrebări ───────── */
.q { margin: 0 0 16px; transition: opacity .3s; }
.q.is-hidden, .band.is-hidden, .intro.is-hidden { display: none; }
.ql { display: flex; gap: 8px; margin-bottom: 6px; line-height: 1.38; }
.qn { flex: none; min-width: 22px; font-weight: 700; color: var(--ink); }
.qt b { font-weight: 700; }
.qsub { margin: -2px 0 8px 30px; font-size: 15.5px; }
.q > .opts, .q > textarea, .q > .scale, .q > .matrix, .q > .groups, .q > .mtable, .q > .row { margin-left: 30px; }
.q-plain > textarea, .q-plain .ql { margin-left: 0; }
.q-plain .ql { font-size: 16.5px; }
.q-indent { margin-left: 30px; }

/* câmpuri text: linie ca în document */
.line {
  width: 100%; min-width: 0;
  padding: 2px 4px 1px;
  font: inherit; font-size: 16.5px; color: var(--navy-lo);
  background: transparent;
  border: 0; border-bottom: 1px solid var(--rule);
  border-radius: 0;
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.line:hover { background: rgba(255, 255, 255, .35); }
.line:focus { border-bottom-color: var(--navy); box-shadow: 0 1px 0 var(--navy); background: var(--focus); }
.line[readonly] { color: var(--navy); font-weight: 700; border-bottom-style: dotted; background: none; box-shadow: none; }
input[type="date"].line { font-family: var(--serif); min-height: 28px; }
textarea.line {
  display: block;
  resize: none; overflow: hidden;
  min-height: 3.4em;
  line-height: 1.7em;
  padding: 0 4px;
  border-bottom: 0;
  background-image: repeating-linear-gradient(180deg, transparent 0, transparent calc(1.7em - 1px), var(--rule) calc(1.7em - 1px), var(--rule) 1.7em);
  background-attachment: local;
}
textarea.line:focus { box-shadow: none; background-color: var(--focus); background-image: repeating-linear-gradient(180deg, transparent 0, transparent calc(1.7em - 1px), var(--navy) calc(1.7em - 1px), var(--navy) 1.7em); }
textarea[rows="1"].line { min-height: 1.7em; }

.q-inline { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.q-inline .ql { margin: 0; flex: 0 1 auto; }
.q-inline > .line { flex: 1 1 200px; }

/* rânduri de câmpuri */
.row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 26px; }
.row-center { justify-content: center; margin-bottom: 14px; }
.row-center.bold .fl { font-weight: 700; }
.row-spread { justify-content: space-between; }
.row-top { gap: 10px 40px; margin: 0 0 12px 8px; }
.row-indent { margin-left: 30px; }
.q.has-label { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; }
.q.has-label > .ql { flex: 0 1 auto; margin-bottom: 4px; }
.q.has-label > .row { margin-left: 30px; flex: 1 1 auto; }
.q.has-label.row-boxed > .row, .q.row-yn > .row { flex-basis: 100%; }
.q.has-label .ql:has(+ .row .fw-xs:only-child) { flex: 0 1 auto; }
.fld { display: inline-flex; align-items: baseline; gap: 8px; }
.fld > label, .fld .fl { white-space: nowrap; }
.fld .fi { display: inline-flex; align-items: baseline; gap: 6px; flex: 1; }
.fld .suf, .pre { white-space: nowrap; color: var(--ink); }
.fld .sep { color: var(--ink-2); }
.fld .hint { display: none; }
.fw-xxs .line { width: 54px; } .fw-xs .line { width: 72px; } .fw-sm .line { width: 120px; } .fw-md .line { width: 210px; }
.fw-fill { flex: 1 1 200px; }
.fld.multi .line { width: 50px; text-align: center; }
.req { color: var(--err); font-style: normal; margin-left: 2px; }
.fld.invalid .line { border-bottom-color: var(--err); box-shadow: 0 1px 0 var(--err); animation: shake .4s; }
.fld.invalid .fl { color: var(--err); }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 28px; margin: 0 0 18px 8px; }
.grid3 .fld { display: grid; grid-template-columns: 74px 1fr; }
.grid3 .fld > label { white-space: nowrap; }

.boxed > label .fl, .boxed .fl { display: inline-block; padding: 0 22px 0 6px; border: 1px solid var(--rule); background: rgba(255, 255, 255, .55); }
.row-boxed { gap: 10px 22px; }
.row-boxed .fld { flex: 1 1 260px; }

.dim { opacity: .38; transition: opacity .25s; }
.dim:focus-within { opacity: 1; }

/* ───────── Căsuțe de bifat (pătrate ca în document) ───────── */
.opts { display: grid; gap: 3px 22px; }
.cols-1 { grid-template-columns: 1fr; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-5 { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 6px; font-size: 15px; letter-spacing: -.005em; }
.cols-5 .txt { white-space: nowrap; }
.cols-5 .opt > label { gap: 6px; padding-right: 2px; }
.cols-5 .box { width: 19px; height: 19px; }
.opt { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; min-width: 0; border-radius: 4px; transition: background .2s; }
.opt.wide, .opt.has-input.wide { grid-column: 1 / -1; }
.opt > label { display: flex; align-items: flex-start; gap: 10px; padding: 3px 6px 3px 2px; cursor: pointer; flex: 0 1 auto; -webkit-tap-highlight-color: transparent; }
.opt .txt { padding-top: 1px; }
.opt .extra { display: flex; align-items: baseline; gap: 6px; flex: 1 1 120px; min-width: 0; }
.opt:hover { background: rgba(255, 255, 255, .45); }
.opts.small { font-size: 15.5px; }

input[type="checkbox"], input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.box {
  position: relative; flex: none;
  width: 21px; height: 21px; margin-top: 1px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid #55555e;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, .25), inset 0 1px 2px rgba(0, 0, 0, .06);
  transition: background .2s, border-color .2s, transform .15s;
}
.box::after {
  content: ""; position: absolute; inset: 3px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.5l5 5L19.5 7'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: scale(0); transition: transform .22s var(--ease);
}
label:hover > .box { border-color: var(--navy); }
input:checked + .box { background: var(--navy); border-color: var(--navy-lo); }
input:checked + .box::after { transform: scale(1); }
input:focus-visible + .box { outline: 3px solid rgba(31, 73, 125, .35); outline-offset: 2px; }
label:active > .box { transform: scale(.9); }
input:checked ~ .txt { color: var(--navy-lo); }

.opts.full .opt:not(:has(input:checked)) { opacity: .45; }
.counter { margin: 6px 0 0 30px; font-family: var(--sans); font-size: 12.5px; color: var(--muted); }
.counter b { color: var(--navy); }

/* opțiuni inline (M / F, S / M / L, Da / Nu) */
.iopts { display: inline-flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; }
.iopts.slash { gap: 6px; }
.iopt { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-weight: 700; }
.iopts.compact .iopt { font-weight: 400; }
.iopt .box { width: 19px; height: 19px; margin: 0; }
.sl { color: var(--ink-2); padding: 0 2px; }
.row-yn { gap: 8px 22px; }
.row-yn .iopt { font-weight: 700; font-size: 15.5px; }

/* ───────── Scală 0–10 ───────── */
.scale { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 6px; max-width: 560px; margin-top: 4px; }
.sc { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sc span {
  display: grid; place-items: center; height: 36px;
  font-family: var(--sans); font-weight: 600; font-size: 14px; color: var(--ink-2);
  background: rgba(255, 255, 255, .65);
  border: 1px solid rgba(60, 60, 70, .28);
  border-radius: 8px;
  transition: all .2s var(--ease);
}
.sc:hover span { border-color: var(--navy); color: var(--navy); }
.sc input:checked + span { color: #fff; background: var(--navy); border-color: var(--navy); box-shadow: 0 6px 14px -6px rgba(31, 73, 125, .7); transform: translateY(-1px); }
.sc input:focus-visible + span { outline: 3px solid rgba(31, 73, 125, .35); outline-offset: 2px; }

/* ───────── Tabel 0–3 ───────── */
.matrix { border: 1px solid #8a8a94; background: rgba(255, 255, 255, .35); }
.mx-row { display: grid; grid-template-columns: 1fr repeat(var(--c), 56px); align-items: stretch; border-top: 1px solid #a3a3ab; }
.mx-head { border-top: 0; background: var(--navy); color: #fff; font-weight: 700; font-size: 14.5px; }
.mx-head span { padding: 3px 0; text-align: center; border-left: 1px solid rgba(255, 255, 255, .3); }
.mx-head span:first-child { border-left: 0; }
.mx-label { padding: 5px 10px; font-size: 15.5px; }
.mx-cell { display: grid; place-items: center; border-left: 1px solid #a3a3ab; cursor: pointer; transition: background .2s; }
.mx-cell:hover { background: rgba(31, 73, 125, .06); }
.mx-cell .box { width: 18px; height: 18px; margin: 0; border-radius: 50%; }
.mx-cell .box::after { inset: 3px; }
.mx-cell em { display: none; }
.mx-row:has(input:checked) .mx-label { color: var(--navy-lo); }

/* ───────── Grupe alimente (5 coloane) ───────── */
.q > .groups { margin-left: 0; }
.groups { display: grid; grid-template-columns: repeat(5, auto); justify-content: space-between; gap: 0 12px; font-size: 14.5px; }
.gopt .txt { white-space: nowrap; }
.grp { display: flex; flex-direction: column; }
.gopt { display: flex; align-items: center; gap: 8px; padding: 1.5px 0; cursor: pointer; }
.gopt .box { width: 19px; height: 19px; margin: 0; }
.ghead .txt { font-weight: 600; }
.gopt:hover .box { border-color: var(--navy); }

.q-checktext { margin-left: 30px; }
.ct-head { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; cursor: pointer; }
.q-checktext textarea { margin-left: 31px; width: calc(100% - 31px); }

/* ───────── Tabel medicamente ───────── */
.mtable { font-size: 15.5px; }
.mt-row { display: grid; grid-template-columns: var(--mt, 22px 1fr .7fr .9fr 1.6fr); gap: 14px; align-items: end; }
.mtable .mt-rl, .mtable .mt-head .mt-n { font-family: var(--serif); font-size: 15.5px; color: var(--ink); text-align: left; padding: 0; }
.mtable .mt-rl { font-weight: 600; }
.subhead { margin: 18px 0 6px 30px; font-size: 16.5px; font-weight: 700; color: var(--title-2); }
.subhead.is-hidden { display: none; }
.mt-head { font-weight: 700; text-align: center; margin-bottom: 2px; }
.mt-n { font-family: var(--sans); font-size: 11px; color: var(--muted); text-align: right; padding-bottom: 4px; }
.mt-l { display: none; }
.mt-cell .line { font-size: 15.5px; }
.add-row { margin: 10px 0 0 36px; padding: 6px 14px; border: 1px dashed rgba(31, 73, 125, .4); border-radius: 999px; background: rgba(255, 255, 255, .5); color: var(--navy); font-family: var(--sans); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s; }
.add-row span { font-size: 15px; margin-right: 2px; }
.add-row:hover { background: #fff; border-style: solid; }

/* ───────── Navigare jos ───────── */
.navbar {
  position: sticky; bottom: 0; z-index: 20;
  display: flex; justify-content: space-between; gap: 12px;
  max-width: calc(var(--sheet-w) + 32px); margin: 0 auto;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
}

/* ───────── Recapitulare ───────── */
#review { padding: 32px 16px 64px; }
.paper { max-width: var(--sheet-w); margin: 0 auto; padding: clamp(32px, 6vw, 64px) clamp(20px, 6vw, 64px); background: var(--paper-2); border-radius: 6px; box-shadow: 0 30px 60px -28px rgba(20, 40, 70, .35); }
.paper h2 { margin: 0; font-size: clamp(30px, 4vw, 40px); font-weight: 600; color: var(--title-2); line-height: 1.1; }
.paper .lead { margin: 12px 0 30px; max-width: none; font-size: 17px; }
.rv-step { border-top: 1px solid rgba(31, 73, 125, .14); padding: 18px 0 14px; }
.rv-step header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.rv-step .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; font-family: var(--sans); font-size: 12px; font-weight: 700; color: #fff; background: var(--navy); }
.rv-step h3 { flex: 1; margin: 0; font-size: 20px; font-weight: 600; color: var(--navy-lo); }
.rv-step dl { margin: 0 0 0 38px; }
.rv-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 4px 24px; padding: 7px 0; border-bottom: 1px dashed rgba(60, 60, 70, .14); }
.rv-item:last-child { border-bottom: 0; }
.rv-item dt { font-size: 15px; color: var(--ink-2); }
.rv-item dd { margin: 0; font-size: 16px; color: var(--navy-lo); font-weight: 500; overflow-wrap: anywhere; }
.rv-empty { margin: 0 0 0 38px; font-size: 15px; font-style: italic; color: var(--muted); }
.review-actions { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 34px; padding-top: 24px; border-top: 1px solid rgba(31, 73, 125, .14); }

/* ───────── Legal ───────── */
.legal-note { margin: -6px 0 22px; padding: 10px 14px; font-family: var(--sans); font-size: 12.5px; line-height: 1.55; color: var(--ink-2); background: rgba(255, 255, 255, .55); border-left: 3px solid var(--navy-hi); border-radius: 0 8px 8px 0; }
.legal-note a, .consent a, .fine a { color: var(--navy); font-weight: 600; }
.consent { margin: 30px 0 0; padding: 22px 22px 16px; border-radius: 12px; background: #fff; border: 1px solid rgba(31, 73, 125, .16); box-shadow: 0 12px 28px -20px rgba(20, 40, 70, .4); }
.consent h3 { margin: 0 0 12px; font-size: 20px; font-weight: 600; color: var(--navy-lo); }
.consent-item { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; font-size: 16px; line-height: 1.45; cursor: pointer; }
.consent-item .box { margin-top: 2px; }
.consent-fine { margin: 10px 0 0; font-family: var(--sans); font-size: 12px; line-height: 1.55; color: var(--muted); }
.consent.shake { animation: shake .4s; }
.btn.is-disabled { opacity: .55; filter: saturate(.6); }
.btn.is-disabled:hover { transform: none; }

/* ───────── Toast ───────── */
.toast { position: fixed; left: 50%; bottom: 96px; z-index: 50; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 12px; font-family: var(--sans); font-size: 14px; color: #fff; background: rgba(22, 34, 52, .94); box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .4); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: all .35s var(--ease); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ═════════════ Temă: lavandă (chestionar nutrițional) ═════════════ */
.theme-lavanda {
  --navy: #6d5898; --navy-hi: #9a87bf; --navy-lo: #4d3c74;
  --title: #4d3c74; --title-2: #3e3260;
  --paper: #fcf7f5; --paper-2: #fdf9f7;
  --band: #b3a2c7;
  --focus: rgba(109, 88, 152, .08);
  background: #ebe5ef;
}
.theme-lavanda .backdrop { background: linear-gradient(180deg, rgba(240, 233, 243, .8), rgba(232, 225, 238, .9)), var(--bg-full) center / cover no-repeat; }
.theme-lavanda .mark, .theme-lavanda .seal { background: linear-gradient(145deg, #8f78b8, var(--navy-lo)); }
.theme-lavanda .btn.primary { background: linear-gradient(180deg, #7d68a8, var(--navy)); box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 8px 22px -8px rgba(77, 60, 116, .6); }
.theme-lavanda .btn.ghost { color: var(--navy-lo); border-color: rgba(109, 88, 152, .22); }
.theme-lavanda .topbar { background: rgba(252, 247, 245, .75); border-bottom-color: rgba(109, 88, 152, .1); }
.theme-lavanda .steps::before { background: rgba(109, 88, 152, .16); }
.theme-lavanda .steps .current .n { box-shadow: 0 0 0 5px rgba(109, 88, 152, .16); }
.theme-lavanda .steps .t { max-width: 84px; }
.theme-lavanda .band {
  margin: 30px calc(-1 * var(--pad-x)) 18px;
  padding: 4px var(--pad-x);
  text-align: left; font-size: 15.5px; letter-spacing: .02em;
  background: var(--band); border: 0; box-shadow: none; text-shadow: 0 1px 1px rgba(60, 40, 90, .2);
}
.theme-lavanda .band:first-child { margin-top: 0; }
.doc-band {
  margin: 0 calc(-1 * var(--pad-x)) 14px; padding: 9px var(--pad-x);
  text-align: center; font-size: 18px; font-weight: 700; line-height: 1.3; letter-spacing: .02em; color: #fff;
  background: var(--band, #b3a2c7); text-shadow: 0 1px 1px rgba(60, 40, 90, .2);
}
.doc-sub { margin: 0 0 14px; text-align: center; font-weight: 700; font-size: 17px; }
.doc-intro { margin: 0 0 22px; font-style: italic; font-size: 16.5px; color: var(--ink-2); }
.doc-intro p { margin: 0 0 10px; }
.thanks small { display: block; margin-top: 8px; font-size: 15.5px; color: var(--ink-2); }
.row-day, .row-meals { gap: 10px 26px; }
.row-day { display: grid; grid-template-columns: 1fr 1fr; }
.row-day .fld .fl, .row-day .fld > label { white-space: normal; }
.row-day .fld .fi { min-width: 90px; }
.row-meals .fld { flex: 0 1 auto; }
.theme-lavanda .sheet:not(:has(.sheet-head)) .sheet-body { padding-top: 18px; }
.theme-lavanda .sheet[data-step="0"] .sheet-body { padding-top: 0; }
.theme-lavanda .sheet { padding-top: 46px; }
.mtable.labeled .mt-row { align-items: end; }

/* ═════════════ Tabletă ═════════════ */
@media screen and (max-width: 980px) {
  :root { --pad-x: 44px; }
  .steps .t { display: none; }
  .prog-top { display: flex; justify-content: center; gap: 10px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
  .prog-top b { color: var(--navy-lo); }
  .groups { grid-template-columns: repeat(3, auto); row-gap: 14px; }
  .cols-5 { justify-content: flex-start; column-gap: 24px; }
}

/* ═════════════ Mobil ═════════════ */
@media screen and (max-width: 720px) {
  :root { --pad-x: 18px; }
  body { font-size: 17px; }
  .topbar { padding: 10px 16px; }
  .brand-t small { display: none; }
  .mark { width: 30px; height: 30px; font-size: 17px; border-radius: 9px; }

  .progress { top: 51px; padding: 10px 16px 10px; background: rgba(242, 241, 239, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(31, 73, 125, .08); }
  .steps { display: none; }
  .prog-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 12px; }
  .prog-top b { font-size: 14px; text-align: right; }
  .bar { display: block; height: 4px; border-radius: 4px; background: rgba(31, 73, 125, .12); overflow: hidden; }
  .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--navy-hi), var(--navy)); border-radius: inherit; transition: width .5s var(--ease); }

  #sheets { padding: 0; }
  .sheet { min-height: 0; padding: 22px var(--pad-x) 150px; box-shadow: none; }
  .sheet-bg::before { -webkit-mask-image: linear-gradient(#000 40%, transparent 90%); mask-image: linear-gradient(#000 40%, transparent 90%); opacity: .75; }
  .sheet::before { opacity: .45; }
  .sheet-head { margin: -8px -10px 14px; font-size: 13px; }
  .sheet:not(.show-head) .sheet-head { display: none; }
  .sheet:not(:has(.sheet-head)) .sheet-body { padding-top: 0; }
  .doc-title { font-size: 21px; margin-bottom: 18px; }
  .page-pill { bottom: 28px; }

  .band { margin: 26px calc(-1 * var(--pad-x)) 18px; padding: 8px 16px; font-size: 14px; box-shadow: none; border-top-width: 2px; border-bottom-width: 2px; }
  .band:first-child { margin-top: 0; }

  .q { margin-bottom: 22px; }
  .ql { margin-bottom: 10px; font-size: 17.5px; font-weight: 500; }
  .qn { min-width: 0; color: var(--navy); }
  .qsub { margin-left: 0; font-size: 15px; }
  .q > .opts, .q > textarea, .q > .scale, .q > .matrix, .q > .groups, .q > .mtable, .q > .row, .q-indent, .row-indent, .q-checktext, .q.has-label > .row { margin-left: 0; }
  .q-inline { display: block; }
  .q-inline .ql { margin-bottom: 6px; }
  .line { font-size: 17px; padding: 8px 10px; background: rgba(255, 255, 255, .72); border: 1px solid rgba(60, 60, 70, .2); border-radius: 10px; }
  .line:focus { background: #fff; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(31, 73, 125, .14); }
  input[type="date"].line { min-height: 44px; }
  textarea.line, textarea.line:focus { padding: 8px 10px; line-height: 1.5; min-height: 84px; background-image: none; border: 1px solid rgba(60, 60, 70, .2); border-radius: 10px; }
  textarea.line:focus { border-color: var(--navy); }
  textarea[rows="1"].line { min-height: 46px; }

  /* câmpurile date generale: etichetă deasupra */
  .grid3 { grid-template-columns: 1fr 1fr; gap: 12px; margin-left: 0; }
  .grid3 .fld { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
  .grid3 .fld:nth-child(3), .grid3 .fld:nth-child(4) { grid-column: 1 / -1; order: 1; }
  .grid3 .fld:nth-child(n+5) { order: 2; }
  .fld .fl { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .03em; color: var(--ink-2); white-space: normal; }
  .row-center.bold .fl { font-weight: 600; }
  .row, .row-center, .row-spread { justify-content: flex-start; gap: 12px; }
  .row-top { margin-left: 0; justify-content: space-between; }
  .row-center .fld:not(.fld-radio), .row-spread .fld { flex: 1 1 calc(50% - 6px); flex-direction: column; align-items: stretch; gap: 4px; }
  .row-center .fld.multi { flex-basis: 100%; }
  .fld.multi .line { width: 100%; }
  .fld .fi { width: 100%; align-items: center; }
  .fw-xxs .line, .fw-xs .line, .fw-sm .line { width: 100%; }
  .fld .hint { display: block; font-family: var(--sans); font-size: 11px; color: var(--muted); }
  .fld-radio { flex-basis: 100% !important; flex-direction: row !important; align-items: center !important; justify-content: space-between; flex-wrap: wrap; }
  .q.has-label { display: block; }
  .q.has-label > .row .fld { flex: 1 1 100%; flex-direction: row; align-items: center; }
  .q.has-label > .row .fld .fi { flex: 1; }
  .row-boxed .fld { flex-direction: column !important; align-items: stretch !important; }
  .boxed .fl { border: 0; background: none; padding: 0; }
  .row-yn .fld:not(.fld-radio) { flex-direction: column !important; align-items: stretch !important; gap: 4px; }

  /* opțiuni: carduri atingibile */
  .opts, .opts.cols-2, .opts.cols-3, .opts.cols-5 { display: grid; grid-template-columns: 1fr; gap: 8px; font-size: inherit; }
  .cols-5 .txt { white-space: normal; }
  .gopt .txt { white-space: normal; }
  .opts.short { grid-template-columns: 1fr 1fr; }
  .opt { background: rgba(255, 255, 255, .66); border: 1px solid rgba(60, 60, 70, .14); border-radius: 12px; transition: all .2s var(--ease); }
  .opt > label { flex: 1 1 auto; padding: 12px 12px; gap: 12px; min-height: 48px; align-items: center; }
  .opt .txt { padding: 0; line-height: 1.3; }
  .opt .extra { flex: 1 1 100%; padding: 0 12px 12px 45px; flex-wrap: wrap; }
  .opt:not(.on):not(:has(input:checked)) .extra { display: none; }
  .opt:has(input:checked) { background: #fff; border-color: var(--navy); box-shadow: 0 6px 18px -10px rgba(31, 73, 125, .55); }
  .opt:hover { background: rgba(255, 255, 255, .85); }
  .opts.full .opt:not(:has(input:checked)) { opacity: .5; }
  .box { width: 22px; height: 22px; border-radius: 6px; box-shadow: none; margin: 0; }
  input[type="radio"] + .box { border-radius: 50%; }
  .counter { margin-left: 0; }

  .iopt { padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .66); border: 1px solid rgba(60, 60, 70, .14); }
  .iopt:has(input:checked) { background: #fff; border-color: var(--navy); }
  .sl { display: none; }
  .iopts.slash { gap: 8px; }

  .scale { grid-template-columns: repeat(6, 1fr); gap: 8px; }
  .scale[style*="--n:10"] { grid-template-columns: repeat(5, 1fr); }
  .sc span { height: 46px; font-size: 16px; border-radius: 12px; }

  /* tabel 0–3 → carduri */
  .matrix { border: 0; background: none; display: flex; flex-direction: column; gap: 10px; }
  .mx-head { display: none; }
  .mx-row { grid-template-columns: repeat(var(--c), 1fr); gap: 6px; padding: 12px; border: 1px solid rgba(60, 60, 70, .14); border-radius: 12px; background: rgba(255, 255, 255, .66); }
  .mx-label { grid-column: 1 / -1; padding: 0 0 4px; font-size: 16px; }
  .mx-cell { border: 1px solid rgba(60, 60, 70, .2); border-radius: 10px; padding: 6px 2px; background: rgba(255, 255, 255, .7); }
  .mx-cell .box { display: none; }
  .mx-cell em { display: flex; flex-direction: column; align-items: center; font-style: normal; font-family: var(--sans); font-weight: 700; font-size: 16px; line-height: 1.1; color: var(--ink-2); }
  .mx-cell em small { font-weight: 500; font-size: 10.5px; color: var(--muted); }
  .mx-cell:has(input:checked) { background: var(--navy); border-color: var(--navy); }
  .mx-cell:has(input:checked) em, .mx-cell:has(input:checked) em small { color: #fff; }

  /* grupe alimente → carduri cu „chips” */
  .groups { grid-template-columns: 1fr; gap: 12px; }
  .grp { flex-direction: row; flex-wrap: wrap; gap: 8px; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .55); border: 1px solid rgba(60, 60, 70, .12); }
  .gopt { padding: 8px 12px; border-radius: 999px; background: #fff; border: 1px solid rgba(60, 60, 70, .16); font-size: 15px; }
  .gopt .box { display: none; }
  .gopt.ghead { flex-basis: 100%; padding: 0 2px 4px; border: 0; background: none; border-radius: 0; font-size: 16px; }
  .gopt.ghead .box { display: block; width: 20px; height: 20px; }
  .gopt:not(.ghead):has(input:checked) { background: var(--navy); border-color: var(--navy); color: #fff; }
  .gopt:not(.ghead):has(input:checked) .txt { color: #fff; }
  .q-checktext textarea { margin-left: 0; width: 100%; }
  .ct-head { padding: 4px 0 8px; }

  /* tabel medicamente → carduri */
  .mt-head { display: none; }
  .mt-row { grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 12px 12px; margin-bottom: 10px; border-radius: 12px; background: rgba(255, 255, 255, .55); border: 1px solid rgba(60, 60, 70, .12); }
  .mt-n { grid-column: 1 / -1; text-align: left; padding: 0; font-weight: 700; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
  .mt-n[data-pre]::before { content: attr(data-pre); }
  .mt-cell { display: flex; flex-direction: column; gap: 4px; }
  .mt-cell:first-of-type, .mt-cell:last-of-type { grid-column: 1 / -1; }
  .mt-l { display: block; font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--ink-2); }
  .add-row { margin-left: 0; width: 100%; padding: 12px; }

  .doc-band { margin: 0 calc(-1 * var(--pad-x)) 12px; font-size: 16px; }
  .doc-intro { font-size: 16px; }
  .theme-lavanda .sheet { padding-top: 22px; }
  .theme-lavanda .band { margin-left: calc(-1 * var(--pad-x)); margin-right: calc(-1 * var(--pad-x)); padding: 8px var(--pad-x); font-size: 14px; }
  .opts.cols-4.short { grid-template-columns: 1fr 1fr; }
  .row-day .fld, .row-meals .fld { flex: 1 1 calc(50% - 6px) !important; flex-direction: column !important; align-items: stretch !important; gap: 4px; }
  .row-day { display: flex; }
  .mtable.labeled .mt-cell { grid-column: auto !important; }
  .mtable.labeled .mt-cell:nth-of-type(2) { grid-column: 1 / -1 !important; order: 3; }
  .mtable.labeled .mt-rl { grid-column: 1 / -1; font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); }
  .subhead { margin-left: 0; }
  .navbar { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(247, 246, 243, .88) !important; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid rgba(31, 73, 125, .1); }
  .navbar .btn { flex: 1; }
  .navbar .btn.ghost { flex: 0 0 auto; padding: 0 16px; }
  .navbar .btn.ghost span { display: none; }

  .rv-step dl, .rv-empty { margin-left: 0; }
  .rv-item { grid-template-columns: 1fr; gap: 2px; }
  .review-actions .btn { flex: 1 1 100%; }
  .intro-actions .btn { width: 100%; }
  .toast { bottom: 92px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ═════════════ Tipărire / PDF: toate paginile, ca documentul original ═════════════ */
@media print {
  @page { size: A4; margin: 0; }
  html { font-size: 12px; }
  body { background: #fff; font-size: 11.6px; line-height: 1.32; }
  .backdrop, .topbar, .progress, .navbar, .toast, .add-row, .counter, .note, .fld .hint, #intro, #review, #done { display: none !important; }
  #form { display: block !important; animation: none !important; }
  #sheets { padding: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sheet { display: block !important; max-width: none; min-height: 296mm; margin: 0; padding: 9mm 14mm 30mm; box-shadow: none; animation: none !important; break-after: page; }
  .sheet:last-child { break-after: auto; }
  .sheet-head { font-size: 12px; margin-bottom: 8px; }
  .sheet:not(.show-head) .sheet-head { margin-bottom: 10px; }
  .sheet:not(:has(.sheet-head)) .sheet-body { padding-top: 6px; }
  .doc-title { font-size: 19px; margin: 2px 0 10px; }
  .page-pill { bottom: 9mm; }
  .page-pill span { font-size: 11px; padding: 1px 10px; }
  .band { margin: 12px -14px 9px; padding: 2px 10px; font-size: 12px; border-top-width: 2px; border-bottom-width: 2px; box-shadow: 2px 2px 0 var(--shadow-band); }
  .band:first-child { margin-top: 0; }
  .intro, .thanks { margin-top: 0; margin-bottom: 8px; font-size: 12px; }
  .q { margin-bottom: 7px; break-inside: avoid; }
  .q-plain .ql { font-size: inherit; }
  .ql { margin-bottom: 3px; }
  .qsub { font-size: 11.5px; margin-bottom: 4px; }
  .q > .opts, .q > textarea, .q > .scale, .q > .matrix, .q > .mtable, .q > .row, .q-indent, .row-indent, .q-checktext, .q.has-label > .row { margin-left: 22px; }
  .line, .mt-cell .line { font-size: 11.6px; color: #1a3a66; padding: 0 3px; }
  textarea.line { line-height: 1.55em; min-height: 3.1em; }
  input[type="date"].line { min-height: 0; }
  .opts { gap: 1px 16px; }
  .opts.small, .cols-5 { font-size: 11.2px; }
  .opt > label { padding: 1px 4px 1px 0; gap: 7px; }
  .box, .iopt .box, .gopt .box { width: 13px; height: 13px; }
  .box::after { inset: 2px; }
  .scale { max-width: 380px; gap: 4px; }
  .sc span { height: 20px; font-size: 10.5px; border-radius: 5px; }
  .mx-row { grid-template-columns: 1fr repeat(var(--c), 40px); }
  .mx-label { padding: 2px 8px; font-size: 11.2px; }
  .mx-head { font-size: 11px; }
  .mx-cell .box { width: 12px; height: 12px; }
  .groups { font-size: 11px; }
  .gopt { padding: 0; gap: 6px; }
  .row { gap: 6px 20px; }
  .row-center { margin-bottom: 6px; }
  .grid3 { margin-bottom: 8px; gap: 2px 20px; }
  .grid3 .fld { grid-template-columns: 58px 1fr; }
  .fw-xxs .line { width: 42px; } .fw-xs .line { width: 56px; } .fw-sm .line { width: 90px; }
  .fld.multi .line { width: 40px; }
  .mt-row { gap: 10px; }
  .mtable { font-size: 11.6px; }
  .dim { opacity: 1; }
  .opts.full .opt { opacity: 1 !important; }
  .is-hidden { display: none !important; }
  .theme-lavanda .sheet { padding-top: 12mm; padding-bottom: 20mm; }
  .theme-lavanda .q { margin-bottom: 5px; }
  .theme-lavanda textarea.line { min-height: 2.6em; }
  .theme-lavanda .band, .doc-band { margin-left: -14mm; margin-right: -14mm; padding-left: 14mm; padding-right: 14mm; }
  .doc-band { font-size: 14px; padding-top: 5px; padding-bottom: 5px; }
  .doc-sub { font-size: 13px; margin-bottom: 6px; }
  .doc-intro { font-size: 11.6px; margin-bottom: 10px; }
  .subhead { font-size: 12.5px; margin: 8px 0 3px 22px; }
  .mtable .mt-rl, .mtable .mt-head .mt-n { font-size: 11.6px; }
  .mtable.labeled { --mt: 120px 50px 2.2fr 1fr !important; }
}

.mark-img { height: 40px; width: auto; filter: drop-shadow(0 2px 3px rgba(120, 90, 40, .18)); }
