/* OSANTISFORMS design tokens: one palette, type scale and shape for every screen (respondent,
   consent, author, data, login). Colours are sampled from the Typeform rea captures
   (data/rea-cat-typeform-v3/screenshots g01, g02, g11, g40, h00, b02, f02); see L21. */
:root {
  --page: #ffffff; --canvas: #fafafa; --surface: #f7f7f8; --tile: #ededee; --tile-hover: #e5e4e5;
  --line: #dad9db; --line-soft: #ededee; --ink: #28222b; --ink-2: #524d54; --muted: #595959;
  --chrome: #39323e; --chrome-2: #635d67; --select: #dbd6f9; --link: #3555e0;
  --accent: #28222b; --accent-ink: #ffffff;
  --bg: var(--canvas); --card: var(--page);
  --ok: #1b6f46; --bad: #c4321f; --warn: #8a5a00;
  --scale: 1; --radius: 8px; --radius-lg: 12px; --radius-pill: 999px;
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem; --space-6: 1.5rem; --space-8: 2rem; --space-12: 3rem;
  --text-xs: .75rem; --text-sm: .875rem; --text-md: 1rem; --text-lg: 1.25rem; --text-xl: 1.5rem; --text-2xl: 2rem;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --shadow: 0 1px 2px rgba(40, 34, 43, .06), 0 4px 16px rgba(40, 34, 43, .06);
}
* { box-sizing: border-box; }
html { font-size: calc(16px * var(--scale)); }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
.demo-banner { background: #24313c; color: #e9eef2; font-size: .78rem; padding: .3rem .8rem; text-align: center; letter-spacing: .02em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, white); outline-offset: 2px; }

/* buttons */
.btn { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: .5rem 1rem; cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, white); }
.btn.small, .mini { padding: .15rem .45rem; font-size: .8rem; border-radius: 4px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.btn:disabled, .mini:disabled { opacity: .45; cursor: default; }

/* ---------------- respondent ---------------- */
.respondent #app { display: flex; justify-content: center; padding: 1.2rem .8rem 3rem; }
.survey { width: 100%; max-width: 780px; }
body[data-layout=tarjetas] .survey .question { box-shadow: 0 2px 10px rgba(20, 40, 60, .08); }
body[data-layout=simple] .survey .question { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.preview-flag { background: #fff7e0; border: 1px solid #ecd28a; color: var(--warn); padding: .4rem .7rem; border-radius: 6px; font-size: .85rem; }
.progress { position: relative; height: 1.15rem; background: #e3e9ee; border-radius: 99px; margin: .4rem 0 1rem; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); transition: width .35s ease; }
.progress-text { position: absolute; inset: 0; text-align: center; font-size: .75rem; line-height: 1.15rem; font-weight: 600; mix-blend-mode: difference; color: #fff; }
.question { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.question.has-error { border-color: var(--bad); }
.hidden-q { display: none; }
.qtext { font-weight: 600; font-size: 1.06rem; margin-bottom: .7rem; white-space: pre-wrap; }
.qnum { color: var(--muted); }
.req { color: var(--bad); }
.qnote { color: var(--muted); font-size: .88rem; margin: .3rem 0; }
.qerror, .page-error { color: var(--bad); font-size: .9rem; min-height: 0; }
.qerror:not(:empty) { margin-top: .5rem; }
.choices { display: flex; flex-direction: column; gap: .35rem; }
.choices.horizontal { flex-direction: row; flex-wrap: wrap; }
.choices.columns { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); }
.choice-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.choice { display: flex; align-items: center; gap: .55rem; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; background: #fff; flex: 1; min-height: 44px; }
.choice:hover { border-color: var(--accent); }
.choice:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, white); }
.choice.exclusive { border-style: dashed; }
.choice input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.choice-img { max-width: 140px; max-height: 100px; border-radius: 4px; }
.text { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: .55rem .65rem; background: #fff; }
.text.inline { width: auto; flex: 1; min-width: 12rem; }
.text.num { max-width: 8rem; text-align: right; }
.text.cell { min-width: 5rem; }
.select { border: 1px solid var(--line); border-radius: 6px; padding: .5rem; background: #fff; max-width: 100%; }
.counter { color: var(--muted); font-size: .8rem; text-align: right; }
.nav { display: flex; justify-content: space-between; gap: 1rem; margin: 1rem 0; }
.end-message, .refused { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; font-size: 1.1rem; text-align: center; margin-top: 2rem; }
.request-box { position: fixed; inset: auto 0 0 0; background: #fff; border-top: 3px solid var(--warn); padding: 1rem 1.5rem; box-shadow: 0 -4px 16px rgba(0,0,0,.12); }
.tr-fade .page { animation: fadein .35s ease; }
.tr-slide .page { animation: slidein .35s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes slidein { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tr-fade .page, .tr-slide .page { animation: none; } .progress-fill { transition: none; } }

/* matrix */
.matrix-wrap { overflow-x: auto; }
table.matrix { border-collapse: collapse; width: 100%; }
table.matrix th, table.matrix td { padding: .45rem .4rem; text-align: center; border-bottom: 1px solid #edf1f4; font-size: .92rem; }
table.matrix tbody th { text-align: left; font-weight: 500; }
table.matrix thead th { font-weight: 600; color: var(--muted); font-size: .82rem; vertical-align: bottom; }
table.matrix tbody tr:nth-child(odd) { background: #fafcfd; }
table.matrix input[type=radio], table.matrix input[type=checkbox] { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); }
.bipolar-right { text-align: right !important; }
.row-total { font-weight: 600; }
.matrix-accordion { display: none; }
.matrix-accordion details { border: 1px solid var(--line); border-radius: 6px; margin-bottom: .4rem; }
.matrix-accordion summary { padding: .6rem .7rem; cursor: pointer; font-weight: 500; }
.acc-options { display: flex; flex-direction: column; gap: .3rem; padding: 0 .6rem .6rem; }
.acc-cell { display: flex; gap: .5rem; align-items: center; }
.profile-row, .drill-row { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .3rem 0; }
.carousel { border: 1px solid var(--line); border-radius: 8px; padding: 1rem; text-align: center; }
.carousel-item { font-size: 1.1rem; font-weight: 600; margin: .6rem 0 1rem; }
.carousel-count { color: var(--muted); font-size: .8rem; }
.carousel-options { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.carousel-nav { display: flex; justify-content: space-between; margin-top: .8rem; }
.choice-btn { border: 1px solid var(--line); background: #fff; border-radius: 6px; min-width: 2.6rem; min-height: 2.6rem; padding: .3rem .6rem; cursor: pointer; }
.choice-btn.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* scales */
.nps-buttons, .ns-buttons { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: .3rem; }
.ns-buttons { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: minmax(0, 1fr); }
.ns-anchors { display: flex; justify-content: space-between; color: var(--muted); font-size: .82rem; margin-top: .3rem; }
.ns-row { margin-bottom: .8rem; }
.ns-item, .slider-item { font-weight: 500; margin-bottom: .3rem; }
.slider-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: .82rem; padding-left: 0; }
.slider-row { display: grid; grid-template-columns: minmax(8rem, 30%) 1fr auto; gap: .8rem; align-items: center; padding: .4rem 0; }
.slider-ctl { display: flex; align-items: center; gap: .6rem; }
.range { width: 100%; accent-color: var(--accent); opacity: .55; }
.range.touched { opacity: 1; }
.range.bar { height: 1.4rem; }
.slider-value { min-width: 2.5rem; font-variant-numeric: tabular-nums; font-weight: 600; }
.stars { display: flex; gap: .2rem; }
.star { font-size: 1.8rem; background: none; border: 0; color: #c7d0d8; cursor: pointer; line-height: 1; }
.star.on { color: #e0a100; }
.na { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.cs-row { display: flex; align-items: center; gap: .6rem; padding: .3rem 0; }
.cs-row label { flex: 1; }
.cs-row.total { border-top: 1px solid var(--line); font-weight: 600; }
.cs-total.bad { color: var(--bad); }
.affix { color: var(--muted); }

/* rank, pgr, misc */
.rank-list { list-style: none; padding: 0; margin: 0; }
.rank-item { display: flex; align-items: center; gap: .6rem; border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: .5rem .6rem; margin-bottom: .35rem; cursor: grab; }
.rank-n { width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.rank-label { flex: 1; }
.rank-btns { display: flex; gap: .25rem; }
.rank-boxes { display: flex; flex-direction: column; gap: .35rem; }
.rank-box { display: flex; gap: .6rem; align-items: center; }
.pgr { display: grid; grid-template-columns: 1fr 2fr; gap: .8rem; }
.pgr-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .6rem; }
.pgr-bank, .pgr-group { border: 1px dashed var(--line); border-radius: 8px; padding: .5rem; min-height: 6rem; background: #fbfcfd; }
.pgr-title { font-weight: 600; font-size: .85rem; color: var(--muted); margin-bottom: .3rem; }
.pgr-card { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: .4rem .5rem; margin-bottom: .3rem; display: flex; justify-content: space-between; gap: .4rem; align-items: center; cursor: grab; }
.mini-sel { padding: .15rem; font-size: .8rem; }
.sig { width: 100%; max-width: 600px; height: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; touch-action: none; }
.sig-tools { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: .4rem; }
.video-preview { width: 100%; max-width: 420px; background: #10181f; border-radius: 6px; }
.file-info { color: var(--muted); font-size: .88rem; margin-top: .3rem; }
.captcha { display: flex; align-items: center; gap: .6rem; font-size: 1.2rem; }
.hl-text { line-height: 2.1; }
.hl-word { border: 0; background: none; padding: .1rem .15rem; border-radius: 3px; cursor: pointer; }
.hl-0 { background: #cde9d6; } .hl-1 { background: #f6d0cc; } .hl-2 { background: #d6e2f5; } .hl-3 { background: #f3e5b8; }
.hl-legend { display: flex; gap: .5rem; } .hl-tag { padding: .1rem .5rem; border-radius: 4px; font-size: .82rem; }
.hm-box { position: relative; display: inline-block; max-width: 100%; cursor: crosshair; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.hm-img { display: block; max-width: 100%; }
.hm-placeholder { width: min(560px, 82vw); aspect-ratio: 16/10; background: repeating-linear-gradient(45deg, #e9eef2 0 14px, #f5f8fa 14px 28px); display: grid; place-items: center; color: var(--muted); }
.hm-dot { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: rgba(214, 48, 49, .8); border: 2px solid #fff; pointer-events: none; }
.hs-region { position: absolute; border: 2px dashed var(--accent); background: rgba(31, 95, 139, .08); font-size: .78rem; color: var(--ink); cursor: pointer; }
.hs-region[data-state=on], .hs-region[data-state=like] { background: rgba(46, 125, 79, .35); border-style: solid; }
.hs-region[data-state=dislike] { background: rgba(179, 38, 30, .3); border-style: solid; }
.gs { display: flex; gap: .6rem; flex-wrap: wrap; }
.gs-face { border: 2px solid transparent; background: none; border-radius: 50%; padding: .2rem; cursor: pointer; opacity: .7; }
.gs-face.on { border-color: var(--accent); opacity: 1; }
.tree { list-style: none; padding-left: 1.1rem; margin: .2rem 0; }
.tree-node { border: 0; background: none; padding: .25rem .4rem; border-radius: 4px; cursor: pointer; text-align: left; }
.tree-node.branch::before { content: '▸ '; } .tree-node.branch[aria-expanded=true]::before { content: '▾ '; }
.tree-node.on { background: var(--accent); color: #fff; }
.form-row { display: grid; grid-template-columns: 12rem 1fr; gap: .6rem; align-items: center; margin-bottom: .35rem; }
.calendar { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.text.date { max-width: 12rem; }
.db img { max-width: 100%; }

/* phone */
@media (max-width: 700px) {
  .respondent #app { padding: .5rem .4rem 2rem; }
  .question { padding: .9rem .8rem; }
  .matrix-wrap:not(.no-acc):not(.sbs-wrap) table.matrix { display: none; }
  .matrix-wrap:not(.no-acc):not(.sbs-wrap) .matrix-accordion { display: block; }
  .choices.columns, .choices.horizontal { display: flex; flex-direction: column; }
  .slider-row { grid-template-columns: 1fr; }
  .nps.vm .nps-buttons { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ns-buttons { grid-auto-flow: row; grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .pgr { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .nav .btn { flex: 1; min-height: 48px; }
}

/* ---------------- author: list ---------------- */
.topbar { display: flex; align-items: center; gap: 1rem; padding: .6rem 1.2rem; background: #fff; border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 1.1rem; margin: 0; }
.topbar .spacer { flex: 1; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 1rem 1.2rem; }
.proj-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.proj-table th, .proj-table td { padding: .6rem .8rem; border-bottom: 1px solid #edf1f4; text-align: left; }
.create-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; margin: 1rem 0 1.5rem; }
.create-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 1rem; }
.create-card h3 { margin: 0 0 .4rem; font-size: 1rem; }
.create-card p { color: var(--muted); font-size: .88rem; margin: 0 0 .7rem; }
.create-card textarea { width: 100%; min-height: 7rem; font-family: ui-monospace, monospace; font-size: .8rem; }

/* ---------------- author: builder ---------------- */
.builder #app { display: grid; grid-template-rows: auto auto 1fr; height: calc(100vh - 1.6rem); }
.tabs { display: flex; gap: .2rem; padding: 0 1rem; background: #fff; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { border: 0; background: none; padding: .7rem .9rem; cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tab[aria-selected=true] { border-bottom-color: var(--accent); font-weight: 600; }
.workspace { display: grid; grid-template-columns: 360px 1fr; min-height: 0; }
.workspace.single { grid-template-columns: 1fr; }
.side { background: #fff; border-right: 1px solid var(--line); overflow-y: auto; padding: .8rem 1rem 3rem; }
.canvas { overflow-y: auto; padding: 1rem 1.4rem 4rem; }
.side h2 { font-size: 1rem; margin: .2rem 0 .8rem; }
.side h3 { font-size: .86rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 1.1rem 0 .4rem; border-top: 1px solid #edf1f4; padding-top: .8rem; }
.field { display: flex; flex-direction: column; gap: .2rem; margin-bottom: .55rem; font-size: .88rem; }
.field.inline { flex-direction: row; align-items: center; gap: .5rem; }
.field input[type=text], .field input[type=number], .field select, .field textarea { border: 1px solid var(--line); border-radius: 5px; padding: .35rem .45rem; background: #fff; }
.field textarea { min-height: 4rem; }
.block-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 1rem; }
.block-head { display: flex; align-items: center; gap: .5rem; padding: .5rem .8rem; border-bottom: 1px solid #edf1f4; background: #fafbfc; border-radius: 8px 8px 0 0; }
.block-head input { font-weight: 600; border: 1px solid transparent; background: transparent; padding: .2rem; flex: 1 1 18rem; min-width: 8rem; }
.block-head input:focus { border-color: var(--line); background: #fff; }
.block-meta { color: var(--muted); font-size: .78rem; }
.qcard { border: 1px solid transparent; border-radius: 6px; margin: .5rem; padding: .6rem .8rem; cursor: pointer; position: relative; }
.qcard:hover { border-color: var(--line); }
.qcard.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.qcard .qhead { display: flex; gap: .5rem; align-items: baseline; }
.qtag { font-weight: 700; color: var(--accent); font-size: .85rem; }
.qtype { color: var(--muted); font-size: .78rem; }
.qtools { position: absolute; right: .5rem; top: .4rem; display: none; gap: .2rem; }
.qcard:hover .qtools, .qcard.sel .qtools { display: flex; }
.badges { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .3rem; }
.badge { font-size: .7rem; background: #eef3f7; color: #34505f; border-radius: 3px; padding: .05rem .35rem; }
.pagebreak { text-align: center; color: var(--muted); font-size: .75rem; border-top: 1px dashed var(--line); margin: .3rem .8rem; padding-top: .2rem; }
.mini-preview { color: var(--muted); font-size: .82rem; margin-top: .3rem; }
.add-row { display: flex; gap: .5rem; padding: .5rem .8rem .8rem; flex-wrap: wrap; }
.type-picker { position: fixed; z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: .5rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .2rem; max-height: 80vh; overflow-y: auto; width: 520px; }
.type-picker button { text-align: left; border: 0; background: none; padding: .45rem .55rem; border-radius: 5px; cursor: pointer; font-size: .88rem; }
.type-picker button:hover, .type-picker button:focus { background: #eef3f7; }
.type-picker .fam { grid-column: 1/-1; font-size: .72rem; text-transform: uppercase; color: var(--muted); padding: .3rem .5rem 0; }
.choice-editor { display: flex; flex-direction: column; gap: .25rem; }
.choice-line { display: grid; grid-template-columns: 1fr 3.4rem auto; gap: .25rem; align-items: center; }
.choice-line input { min-width: 0; }
.choice-flags { display: flex; gap: .3rem; font-size: .72rem; color: var(--muted); }
.modal-back { position: fixed; inset: 0; background: rgba(20, 30, 40, .4); z-index: 40; display: grid; place-items: center; }
.modal { background: #fff; border-radius: 10px; width: min(920px, 94vw); max-height: 88vh; overflow-y: auto; padding: 1rem 1.3rem; }
.modal h2 { margin-top: 0; font-size: 1.1rem; }
.cond-row { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; margin-bottom: .35rem; padding: .35rem; background: #f7f9fa; border-radius: 5px; }
.cond-row select, .cond-row input { border: 1px solid var(--line); border-radius: 4px; padding: .25rem; max-width: 16rem; }
.flow-el { border: 1px solid var(--line); border-left: 5px solid #9fb3c2; border-radius: 6px; background: #fff; margin: .4rem 0; padding: .45rem .6rem; }
.flow-el.k-randomizer { border-left-color: #7a4fb3; }
.flow-el.k-branch { border-left-color: #c47a00; }
.flow-el.k-embedded { border-left-color: #2e7d4f; }
.flow-el.k-end { border-left-color: #b3261e; }
.flow-el.k-group { border-left-color: #3a7bbf; }
.flow-el.k-auth { border-left-color: #555; }
.flow-head { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.flow-kind { font-weight: 700; font-size: .82rem; }
.flow-kids { margin-left: 1.4rem; }
.flow-tools { margin-left: auto; display: flex; gap: .2rem; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .2rem .8rem; font-size: .88rem; }
.result-q { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1rem; margin-bottom: .8rem; }
.bar-row { display: grid; grid-template-columns: minmax(8rem, 30%) 1fr 3.5rem; gap: .5rem; align-items: center; font-size: .86rem; margin: .15rem 0; }
.bar { height: .9rem; background: color-mix(in srgb, var(--accent) 75%, white); border-radius: 2px; }
.preview-frame { border: 1px solid var(--line); border-radius: 10px; background: #fff; height: 74vh; }
.preview-frame.phone { width: 390px; height: 760px; border-radius: 26px; border: 10px solid #222; }
table.grid { border-collapse: collapse; width: 100%; font-size: .85rem; background: #fff; }
table.grid th, table.grid td { border: 1px solid #e3e8ec; padding: .3rem .45rem; text-align: left; }
#toasts { position: fixed; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .4rem; z-index: 60; }
.toast { background: #24313c; color: #fff; padding: .55rem .9rem; border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.toast.bad { background: var(--bad); }
.warnings { background: #fff7e0; border: 1px solid #ecd28a; border-radius: 6px; padding: .5rem .8rem; font-size: .85rem; color: var(--warn); }
.status-pill { font-size: .75rem; padding: .1rem .5rem; border-radius: 99px; background: #eef3f7; }
.status-pill.pub { background: #dff1e6; color: var(--ok); }
.matrix-accordion .acc-total { display: flex; justify-content: space-between; padding: .4rem .7rem; border-top: 1px solid var(--line); }


/* T94: accessible file picker. The native input stays in the DOM, visually hidden but focusable; the label shows a
   translated button and the chosen file name instead of the browser's own English text. */
.filepick { position: relative; display: inline-flex; align-items: center; flex-wrap: wrap; gap: var(--space-2, .5rem); max-width: 100%; cursor: pointer; }
.filepick > input.filepick-input[type=file], .filepick > input[type=file] { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.filepick-btn { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; padding: var(--space-1, .25rem) var(--space-3, .75rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--page); color: var(--ink); font: inherit; font-weight: 600; }
.filepick:hover .filepick-btn { background: var(--tile); }
.filepick:focus-within .filepick-btn { outline: 2px solid var(--link); outline-offset: 2px; }
.filepick:has(input:disabled) { cursor: not-allowed; opacity: .6; }
.filepick-name { min-width: 0; overflow-wrap: anywhere; color: var(--ink-2); font-size: var(--text-sm, .875rem); }
/* A notice never takes a click from the page under it, and on a narrow screen it stays inside the margins. */
#toasts { pointer-events: none; max-width: calc(100vw - 2rem); }
