/* iTach Forms & Analytics — all colours come from CSS variables written by the Appearance settings. */
:root {
  --primary: #123B4F; --primary-dk: #0C2838; --accent: #13A89E; --accent-2: #F2A541;
  --bg: #F4F7F8; --surface: #FFFFFF; --border: #D7E1E4; --text: #15232A; --muted: #5C7079;
  --success: #1F8A4C; --warning: #B3541E; --danger: #A32E2E; --sidebar: #0C2838;
  --radius: 12px;
  --font-head: 'Fraunces', Georgia, serif;
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shell: 70rem;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.55 var(--font-body); }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; margin: 0 0 .6rem; }
a { color: var(--primary); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; }
.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 1.25rem; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.strong { font-weight: 600; }
.centre { text-align: center; }
.hidden { display: none; }
.warn-text { color: var(--warning); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: #fff; padding: .6rem 1rem; z-index: 50; border-radius: 8px; }

/* ---------- buttons, forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; cursor: pointer;
  font: 600 .98rem/1 var(--font-body); color: #fff; background: var(--primary); border: 1px solid var(--primary);
  border-radius: calc(var(--radius) - 4px); padding: .82rem 1.3rem; text-decoration: none; transition: background .15s, transform .1s; }
.btn:hover { background: var(--primary-dk); border-color: var(--primary-dk); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--primary); }
.btn.ghost:hover { background: var(--primary); color: #fff; }
.btn.small { padding: .5rem .8rem; font-size: .86rem; }
.btn.big { padding: 1rem 1.7rem; font-size: 1.05rem; }
.btn.block { width: 100%; }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; }

input, select, textarea { width: 100%; font: inherit; color: var(--text); background: #fff;
  border: 1px solid var(--border); border-radius: calc(var(--radius) - 5px); padding: .62rem .72rem; }
textarea { line-height: 1.5; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); outline: none; }
input[type=checkbox], input[type=radio] { width: 1.1rem; height: 1.1rem; accent-color: var(--primary); }
input[type=color] { padding: 2px; height: 2.6rem; }
select { appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--primary) 50%), linear-gradient(135deg, var(--primary) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 12px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 2rem; }
label { font-weight: 500; }
.field { margin-bottom: 1rem; }
.field > label, .mini { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .32rem; }
.hint { color: var(--muted); font-size: .86rem; margin: .35rem 0 0; }
.check { display: inline-flex; gap: .5rem; align-items: center; font-weight: 500; margin: .35rem 0; }
.check.small { font-size: .88rem; }
.stack label { display: block; margin-bottom: .85rem; font-weight: 600; font-size: .92rem; }
.stack label input, .stack label select { margin-top: .3rem; font-weight: 400; }
.save-row { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.narrow { max-width: 34rem; }
.hp { position: absolute; left: -9999px; }

.alert { border-radius: calc(var(--radius) - 4px); padding: .8rem 1rem; margin-bottom: 1.1rem; border: 1px solid; }
.alert.ok { background: color-mix(in srgb, var(--success) 10%, #fff); border-color: color-mix(in srgb, var(--success) 35%, #fff); color: var(--success); }
.alert.bad { background: color-mix(in srgb, var(--danger) 8%, #fff); border-color: color-mix(in srgb, var(--danger) 30%, #fff); color: var(--danger); }
.alert.warn { background: color-mix(in srgb, var(--accent-2) 14%, #fff); border-color: color-mix(in srgb, var(--accent-2) 45%, #fff); color: var(--warning); }
.alert ul { margin: .4rem 0 0 1.1rem; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1.1rem; }
.card.pad, .pad { padding: 1.25rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.card-title { font-size: 1.12rem; margin: 0 0 .5rem; color: var(--primary); }
.card-head .card-title { margin: 0; }
.grid-2 { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); align-items: start; }
.pill { display: inline-block; padding: .12rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.pill.good { background: color-mix(in srgb, var(--success) 14%, #fff); color: var(--success); }
.pill.warn { background: color-mix(in srgb, var(--accent-2) 22%, #fff); color: var(--warning); }
.pill.neutral { background: color-mix(in srgb, var(--primary) 9%, #fff); color: var(--primary); }

/* ---------- public site ---------- */
.site-head { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.site-head .shell { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.2rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--primary); font-weight: 700; }
.brand-dot { width: 1.1rem; height: 1.1rem; border-radius: 4px; background: var(--accent); position: relative; flex: 0 0 auto; }
.brand-dot::after { content: ''; position: absolute; inset: 4px 4px auto auto; width: .45rem; height: .45rem; border-radius: 2px; background: var(--accent-2); }
.brand-name { font-family: var(--font-head); font-size: 1.05rem; }
.site-nav { display: flex; align-items: center; gap: 1.3rem; }
.site-nav a { text-decoration: none; color: var(--text); font-weight: 500; font-size: .96rem; }
.site-nav a:hover, .site-nav a.on { color: var(--accent); }
.site-nav .btn { color: #fff; }
.site-nav .btn.ghost { color: var(--primary); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 4px 0; }

.hero { background: linear-gradient(170deg, var(--primary) 0%, var(--primary-dk) 100%); color: #fff; padding: 4rem 0 4.5rem; }
.hero-grid { display: grid; gap: 2.5rem; grid-template-columns: 1.15fr .85fr; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 600; color: var(--accent-2); margin: 0 0 1rem; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); color: #fff; max-width: 14ch; }
.lede { font-size: 1.1rem; line-height: 1.6; max-width: 46ch; }
.hero .lede { color: #D5E3E6; }
.hero-cta { display: flex; gap: .7rem; flex-wrap: wrap; margin: 1.8rem 0 1rem; }
.hero .btn { background: var(--accent); border-color: var(--accent); }
.hero .btn:hover { background: #0F8F87; border-color: #0F8F87; }
.hero .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.hero .btn.ghost:hover { background: rgba(255,255,255,.12); }
.hero-note { color: #9FBAC0; font-size: .86rem; }
.panel-card { background: var(--surface); color: var(--text); border-radius: var(--radius); padding: 1.2rem; box-shadow: 0 24px 50px rgba(0,0,0,.28); }
.panel-head { display: flex; align-items: center; gap: .35rem; margin-bottom: 1rem; color: var(--muted); font-size: .85rem; }
.panel-head .dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--border); }
.panel-head em { margin-left: auto; font-style: normal; font-weight: 600; color: var(--primary); }
.panel-stat { display: flex; align-items: baseline; gap: .4rem; margin-bottom: 1rem; }
.panel-stat strong { font-family: var(--font-head); font-size: 2.4rem; color: var(--primary); }
.panel-stat span { color: var(--muted); }
.panel-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; align-items: end; height: 8rem; margin-bottom: 1rem; }
.panel-bars div { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; gap: .35rem; text-align: center; }
.panel-bars i { display: block; height: var(--h); background: var(--accent); border-radius: 6px 6px 0 0; }
.panel-bars div:nth-child(2) i { background: color-mix(in srgb, var(--accent) 70%, #fff); }
.panel-bars div:nth-child(3) i { background: var(--accent-2); }
.panel-bars div:nth-child(4) i { background: color-mix(in srgb, var(--accent-2) 55%, #fff); }
.panel-bars span { font-size: .72rem; color: var(--muted); }
.panel-row { display: flex; justify-content: space-between; border-top: 1px solid var(--border); padding-top: .55rem; margin-top: .55rem; font-size: .92rem; }
.panel-row strong { color: var(--primary); }

.flow { background: var(--surface); border-bottom: 1px solid var(--border); padding: 2.2rem 0; }
.flow-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.flow-steps li { position: relative; }
.flow-steps span { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 16%, #fff); color: var(--primary); font-weight: 700; font-size: .9rem; margin-bottom: .5rem; }
.flow-steps h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.flow-steps p { margin: 0; color: var(--muted); font-size: .9rem; }

.section { padding: 3.4rem 0; }
.section.alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-title { font-size: clamp(1.6rem, 3.4vw, 2.1rem); color: var(--primary); max-width: 22ch; }
.section-lede { color: var(--muted); max-width: 55ch; margin-bottom: 1.8rem; }
.feature-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); margin-top: 1.6rem; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; }
.section.alt .feature { background: var(--bg); }
.feature h3 { font-size: 1.05rem; color: var(--primary); }
.feature p { margin: 0; color: var(--muted); font-size: .94rem; }

.tpl-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.tpl-grid.wide { grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); }
.tpl { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.2rem; text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
a.tpl:hover { border-color: var(--accent); transform: translateY(-2px); }
.tpl-cat { display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .5rem; }
.tpl h3 { font-size: 1.12rem; color: var(--primary); }
.tpl p { color: var(--muted); font-size: .92rem; }
.tpl-questions { list-style: none; margin: .8rem 0; padding: 0; font-size: .86rem; }
.tpl-questions li { padding: .3rem 0; border-top: 1px dashed var(--border); color: var(--muted); }
.ftype { display: inline-block; min-width: 6.5rem; color: var(--accent); font-weight: 600; font-size: .76rem; }
.tpl-foot { display: flex; align-items: center; gap: .5rem; margin-top: .8rem; }
.tpl-foot input { flex: 1 1 auto; min-width: 0; }
.tpl-meta { color: var(--muted); font-size: .84rem; }

.sector-grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); margin-top: 1.6rem; }
.sector h3 { margin-top: .9rem; color: var(--primary); font-size: 1.1rem; }
.sector p { color: var(--muted); font-size: .93rem; margin: 0; }
.img-ph { display: grid; place-content: center; gap: .3rem; text-align: center; aspect-ratio: 4 / 3;
  border: 2px dashed color-mix(in srgb, var(--primary) 26%, #fff); border-radius: var(--radius);
  background: color-mix(in srgb, var(--primary) 5%, #fff); padding: 1rem; }
.img-ph-size { font-weight: 700; color: var(--primary); font-size: .85rem; letter-spacing: .04em; }
.img-ph-desc { color: var(--muted); font-size: .84rem; max-width: 24ch; margin: 0 auto; }

.price-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin-top: 1.6rem; }
.price { position: relative; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; }
.section.alt .price { background: var(--bg); }
.price.featured { border-color: var(--accent); border-width: 2px; background: var(--surface); }
.ribbon { position: absolute; top: -.75rem; left: 1.2rem; background: var(--accent); color: #fff;
  font-size: .72rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; }
.price h3 { font-size: 1.15rem; color: var(--primary); margin-bottom: .2rem; }
.amount { font-family: var(--font-head); font-size: 1.8rem; color: var(--text); margin: .2rem 0; }
.amount span { font-family: var(--font-body); font-size: .85rem; color: var(--muted); }
.who { color: var(--muted); font-size: .9rem; }
.price ul { list-style: none; margin: 1rem 0; padding: 0; font-size: .92rem; }
.price li { padding: .3rem 0 .3rem 1.3rem; position: relative; }
.price li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.price .btn { width: 100%; }

.cta { background: var(--primary); color: #fff; padding: 3rem 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta h2 { color: #fff; max-width: 20ch; }
.cta p { color: #C6DADE; margin: 0; }
.cta .btn { background: var(--accent-2); border-color: var(--accent-2); color: #26190A; }

.page-head { background: var(--surface); border-bottom: 1px solid var(--border); padding: 2.6rem 0 2rem; }
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--primary); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.chip { text-decoration: none; font-size: .88rem; font-weight: 500; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 999px; padding: .35rem .85rem; }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip span { opacity: .6; margin-left: .2rem; }
.prose { max-width: 46rem; }
.prose h2 { color: var(--primary); font-size: 1.25rem; margin-top: 1.6rem; }

.site-foot { background: var(--primary-dk); color: #BFD3D8; padding: 2.6rem 0 1.4rem; }
.site-foot .brand { color: #fff; }
.foot-grid { display: grid; gap: 1.6rem; grid-template-columns: 1.4fr 1fr 1fr; }
.site-foot h4 { color: #fff; font-size: .95rem; margin-bottom: .6rem; }
.site-foot a { display: block; color: #BFD3D8; text-decoration: none; font-size: .92rem; padding: .18rem 0; }
.site-foot a:hover { color: #fff; }
.foot-base { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid rgba(255,255,255,.14);
  margin-top: 1.8rem; padding-top: 1rem; font-size: .84rem; }

/* ---------- auth ---------- */
.auth-page { display: grid; place-items: center; min-height: 100vh; padding: 2rem 1rem; background: var(--primary-dk); }
.auth-card { width: 100%; max-width: 26rem; background: var(--surface); border-radius: var(--radius); padding: 2rem; }
.auth-card h1 { font-size: 1.5rem; color: var(--primary); }
.brandmark { display: block; text-decoration: none; color: var(--primary); font-family: var(--font-head);
  font-size: 1.05rem; margin-bottom: 1.2rem; }
.brandmark span { color: var(--accent); }
.auth-card h2 { font-size: 1rem; color: var(--muted); margin: 1.2rem 0 .4rem; }

/* ---------- public form ---------- */
.form-page { background: var(--bg); }
.form-shell { width: 100%; max-width: 44rem; margin: 0 auto; padding: 0 1.1rem; }
.form-head { background: var(--primary); color: #fff; padding: 2.4rem 0 2.6rem; margin-bottom: 1.6rem; }
.form-org { margin: 0 0 .3rem; font-weight: 600; color: #A9C6CC; font-size: .9rem; letter-spacing: .04em; }
.form-head h1 { color: #fff; font-size: clamp(1.6rem, 4.6vw, 2.3rem); max-width: 22ch; }
.form-desc { color: #D5E3E6; margin: .6rem 0 0; max-width: 54ch; }
.form-meta { color: var(--accent-2); font-size: .88rem; margin: .8rem 0 0; font-weight: 600; }
.public-form .fset { margin-bottom: 1.1rem; }
.fset-title { font-size: 1.2rem; color: var(--primary); }
.q { margin: 1.3rem 0; }
.q-label { display: block; font-weight: 600; margin-bottom: .35rem; }
.q-label .req { font-weight: 400; font-size: .76rem; color: var(--warning); margin-left: .3rem; }
.q-label .opt { font-weight: 400; font-size: .76rem; color: var(--muted); margin-left: .3rem; }
.q-help { color: var(--muted); font-size: .88rem; margin: 0 0 .45rem; }
.q-heading { font-size: 1.1rem; color: var(--primary); margin: 1.6rem 0 .3rem; }
.q-statement { color: var(--text); background: color-mix(in srgb, var(--accent) 7%, #fff);
  border-left: 3px solid var(--accent); padding: .7rem .9rem; border-radius: 0 8px 8px 0; }
.choices { display: grid; gap: .5rem; }
.choices-wide { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.choice { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 5px); padding: .7rem .8rem; cursor: pointer; font-weight: 500; }
.choice:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 5%, #fff); }
.scale { display: flex; gap: .4rem; flex-wrap: wrap; }
.pip { flex: 1 1 2.6rem; }
.pip input { position: absolute; opacity: 0; width: 0; height: 0; }
.pip span { display: grid; place-items: center; min-height: 2.8rem; border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 5px); font-weight: 600; cursor: pointer; }
.pip input:checked + span { background: var(--primary); color: #fff; border-color: var(--primary); }
.pip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.scale-ends { display: flex; justify-content: space-between; color: var(--muted); font-size: .78rem; margin-top: .3rem; }
.matrix { width: 100%; border-collapse: collapse; font-size: .9rem; }
.matrix th, .matrix td { border: 1px solid var(--border); padding: .5rem; text-align: center; }
.matrix th[scope=row] { text-align: left; font-weight: 500; min-width: 9rem; }
.matrix thead th { background: color-mix(in srgb, var(--primary) 6%, #fff); font-weight: 600; }
.ranking { display: grid; gap: .5rem; }
.rank-row { display: flex; align-items: center; gap: .8rem; border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 5px); padding: .5rem .7rem; }
.rank-row span { flex: 1 1 auto; }
.rank-row select { width: 6rem; }
.thanks h2 { color: var(--primary); font-size: 1.5rem; }
.form-foot { text-align: center; margin: 1.2rem 0 2.5rem; font-size: .86rem; }
.tablewrap { overflow-x: auto; }

/* ---------- admin ---------- */
.admin { background: var(--bg); }
.admin-wrap { display: grid; grid-template-columns: 15rem 1fr; min-height: 100vh; }
.side { background: var(--sidebar); color: #CBDDE2; padding: 1.2rem 1rem; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 1.2rem; }
.side .brand { color: #fff; }
.side-nav { display: flex; flex-direction: column; gap: .1rem; }
.side-nav a { color: #BFD3D8; text-decoration: none; padding: .6rem .7rem; border-radius: 8px; font-size: .95rem; font-weight: 500; }
.side-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-nav a.on { background: var(--accent); color: #fff; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; }
.side-foot a { color: #9FBAC0; text-decoration: none; }
.side-foot a:hover { color: #fff; }
.admin-main { min-width: 0; display: flex; flex-direction: column; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); padding: .9rem 1.5rem;
  display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 10; }
.topbar-title { font-size: 1.2rem; margin: 0; color: var(--primary); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .9rem; }
.topbar-right select { width: auto; }
.org-chip { background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: .3rem .8rem; font-size: .86rem; }
.who { display: flex; flex-direction: column; line-height: 1.15; font-weight: 600; font-size: .9rem; }
.who small { font-weight: 400; color: var(--muted); font-size: .76rem; }
.admin-body { padding: 1.5rem; max-width: 76rem; width: 100%; }
.page-h2 { font-size: 1.3rem; color: var(--primary); margin: 0; }
.lede + .chips { margin-bottom: 1.2rem; }

.tiles { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); margin-bottom: 1.2rem; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; }
.tile-n { display: block; font-family: var(--font-head); font-size: 1.9rem; color: var(--primary); line-height: 1.1; }
.tile-l { display: block; font-weight: 600; font-size: .92rem; }
.tile-s { display: block; color: var(--muted); font-size: .82rem; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filters { display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-end; }
.filters .field { margin: 0; }
.filters .field.grow { flex: 1 1 14rem; }
.form-topline { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.topline-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--border); margin-bottom: 1.2rem; }
.tabs a { padding: .6rem 1rem; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--primary); border-bottom-color: var(--accent); }

table.list { width: 100%; border-collapse: collapse; font-size: .94rem; background: var(--surface); }
table.list th, table.list td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--border); vertical-align: top; }
table.list thead th { background: color-mix(in srgb, var(--primary) 6%, #fff); color: var(--primary); font-weight: 600; font-size: .86rem; }
table.list.tight th, table.list.tight td { padding: .5rem .6rem; }
table.list .num { text-align: right; }
table.list td.num small { display: block; color: var(--muted); font-size: .74rem; }
.total-row td, .total-row th { font-weight: 700; background: color-mix(in srgb, var(--primary) 4%, #fff); }
.row-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.row-actions a { font-size: .86rem; }
.row-actions select { width: auto; font-size: .84rem; padding: .3rem 1.8rem .3rem .5rem; }
.inline { display: inline; }
.menu-table input[type=text], .menu-table input:not([type]) { min-width: 8rem; }
.tiny { width: 4.5rem; }
.link-small { font-size: .86rem; word-break: break-all; }
.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin: 1rem 0; }
.empty { text-align: center; padding: 2.4rem 1.2rem; }
.empty h3 { color: var(--primary); }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.kv { list-style: none; margin: 0; padding: 0; }
.kv li { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.kv span { color: var(--muted); }

.resp summary { cursor: pointer; padding: .8rem 1rem; display: grid; grid-template-columns: 4rem 11rem 1fr auto; gap: .8rem; align-items: baseline; }
.resp .rid { color: var(--accent); font-weight: 700; }
.resp .peek { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resp-body { padding: 0 1rem 1rem; border-top: 1px solid var(--bg); }
.resp dt { font-weight: 600; color: var(--primary); margin-top: .8rem; font-size: .9rem; }
.resp dd { margin: .15rem 0 0; white-space: pre-wrap; }
.resp-actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1rem; }

.qstat-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.qstat-grid { display: grid; gap: 1.2rem; grid-template-columns: 1.1fr .9fr; align-items: start; }
.chart-box { min-width: 0; }
.nps-line strong { font-family: var(--font-head); font-size: 1.5rem; color: var(--primary); margin: 0 .4rem; }
.quotes { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .6rem; }
.quotes li { background: var(--bg); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; padding: .6rem .8rem; font-size: .93rem; }
.quotes li span { display: block; margin-top: .3rem; }
.words { display: flex; flex-wrap: wrap; gap: .45rem; margin: .4rem 0 1rem; }
.word { background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--primary); border-radius: 999px;
  padding: .2rem .7rem; font-size: calc(.8rem * var(--w)); font-weight: 600; }
.word small { color: var(--muted); font-weight: 400; margin-left: .3rem; }
.crosstab th[scope=row] { font-weight: 600; }

/* builder */
.builder { display: grid; grid-template-columns: 1fr 15rem; gap: 1.1rem; align-items: start; }
.builder-side { position: sticky; top: 5rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem; }
.builder-side h3 { font-size: 1rem; color: var(--primary); }
.side-group { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: .9rem 0 .35rem; font-weight: 700; }
.type-list { display: grid; gap: .3rem; }
.type-btn { text-align: left; background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: .42rem .6rem; font: inherit; font-size: .86rem; cursor: pointer; }
.type-btn:hover { border-color: var(--accent); color: var(--primary); }
.sec-card { padding: 1rem; }
.sec-head { display: flex; gap: .6rem; align-items: center; margin-bottom: .5rem; }
.sec-title { font-family: var(--font-head); font-size: 1.1rem; font-weight: 600; border: 0; border-bottom: 2px solid var(--border); border-radius: 0; padding: .3rem 0; }
.sec-intro { border: 0; border-bottom: 1px dashed var(--border); border-radius: 0; padding: .3rem 0; font-size: .9rem; color: var(--muted); margin-bottom: .8rem; }
.q-list { display: grid; gap: .8rem; }
.q-card { border: 1px solid var(--border); border-radius: calc(var(--radius) - 4px); padding: .85rem; background: var(--bg); }
.q-card.is-layout { background: color-mix(in srgb, var(--accent) 6%, #fff); }
.q-card-head { display: flex; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.q-num { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--primary);
  color: #fff; font-size: .8rem; font-weight: 700; flex: 0 0 auto; }
.q-type { width: auto; min-width: 9rem; font-size: .88rem; padding: .35rem 1.8rem .35rem .5rem; }
.q-card-tools { margin-left: auto; display: flex; gap: .25rem; }
.icon-btn { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: .25rem .5rem;
  font: inherit; font-size: .8rem; cursor: pointer; }
.icon-btn:hover { border-color: var(--accent); }
.icon-btn.danger { color: var(--danger); }
.icon-btn[disabled] { opacity: .35; cursor: default; }
.q-card textarea, .q-card input { background: var(--surface); }
.q-label { font-weight: 600; }
.q-help { font-size: .88rem; margin-top: .4rem; }
.q-card .mini { margin-top: .5rem; font-size: .8rem; color: var(--muted); }
.mini-row { display: flex; gap: .6rem; }
.q-card-foot { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin-top: .6rem; font-size: .85rem; }
.q-key { margin-left: auto; color: var(--muted); font-size: .76rem; }
.logic summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: .84rem; }
.logic-row { display: flex; gap: .4rem; margin-top: .5rem; flex-wrap: wrap; }
.logic-row select, .logic-row input { width: auto; flex: 1 1 8rem; font-size: .85rem; padding: .35rem .5rem; }
.sticky-save { position: sticky; bottom: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .8rem 1rem; display: flex; gap: .6rem; align-items: center; justify-content: flex-end;
  margin-top: 1.1rem; box-shadow: 0 -6px 18px rgba(0,0,0,.06); }
.sticky-save #save-hint { margin-right: auto; }
.copy-row { display: flex; gap: .5rem; margin-bottom: 1rem; }
textarea.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; }
.colour-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.colour { display: grid; grid-template-columns: 2.8rem 1fr; grid-template-rows: auto auto; gap: .2rem .6rem; align-items: center; font-size: .88rem; }
.colour input { grid-row: span 2; }
.colour output { color: var(--muted); font-size: .78rem; font-family: ui-monospace, monospace; }

/* QR poster */
.poster-wrap { display: grid; grid-template-columns: 1fr 18rem; gap: 1.1rem; align-items: start; }
.poster { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-align: center; }
.poster-top { background: var(--primary); color: #fff; padding: 2rem 1.5rem 1.8rem; }
.poster-org { margin: 0 0 .4rem; color: #A9C6CC; font-weight: 600; letter-spacing: .06em; font-size: .86rem; text-transform: uppercase; }
.poster-top h1 { color: #fff; font-size: clamp(1.5rem, 3.4vw, 2.2rem); margin: 0 auto; max-width: 20ch; }
.poster-desc { color: #D5E3E6; margin: .7rem auto 0; max-width: 46ch; font-size: .95rem; }
.poster-when { color: var(--accent-2); font-weight: 600; margin: .7rem 0 0; }
.poster-mid { padding: 2rem 1.5rem 2.2rem; }
.poster-scan { font-family: var(--font-head); font-size: 1.35rem; color: var(--primary); margin: 0 0 1.1rem; }
#qr { display: inline-block; padding: 14px; border: 3px solid var(--accent); border-radius: 14px; background: #fff; }
#qr img, #qr canvas { display: block; width: 240px; height: 240px; }
.poster-url { font-weight: 700; color: var(--primary); margin: 1.1rem 0 0; font-size: 1.05rem; word-break: break-all; }
.poster-note { color: var(--warning); font-weight: 600; font-size: .9rem; margin: .4rem 0 0; }

@media print {
  @page { size: A4 portrait; margin: 12mm; }
  body { background: #fff; }
  .side, .topbar, .no-print, .form-topline, .alert { display: none !important; }
  .admin-wrap { display: block; }
  .admin-body { padding: 0; max-width: none; }
  .poster-wrap { display: block; }
  .poster { border: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .poster-top { padding: 16mm 10mm 14mm; }
  #qr img, #qr canvas { width: 95mm; height: 95mm; }
}

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .qstat-grid { grid-template-columns: 1fr; }
  .builder { grid-template-columns: 1fr; }
  .builder-side { position: static; }
  .poster-wrap { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .admin-wrap { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 15rem; transform: translateX(-100%); transition: transform .2s; z-index: 40; }
  body.side-open .side { transform: none; }
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface);
    border-bottom: 1px solid var(--border); flex-direction: column; align-items: stretch; gap: 0; padding: .6rem 1.25rem 1rem; }
  body.nav-open .site-nav { display: flex; }
  .site-nav a { padding: .6rem 0; }
  .resp summary { grid-template-columns: 3.5rem 1fr; }
  .resp .peek { grid-column: 1 / -1; white-space: normal; }
  .foot-grid { grid-template-columns: 1fr; }
  .admin-body { padding: 1rem; }
}

/* ---------- per-question analysis ---------- */
.finding { background: color-mix(in srgb, var(--accent) 8%, #fff); border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0; padding: .6rem .85rem; margin: .2rem 0 .9rem; font-size: .96rem; }
.ratio-strip { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); margin-bottom: 1rem; }
.ratio { background: var(--bg); border: 1px solid var(--border); border-radius: calc(var(--radius) - 5px); padding: .6rem .7rem; }
.ratio-l { display: block; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.ratio strong { display: block; font-family: var(--font-head); font-size: 1.25rem; color: var(--primary); line-height: 1.2; margin: .1rem 0; }
.ratio-n { display: block; font-size: .78rem; color: var(--muted); }
.split-bar { display: flex; height: 1.6rem; border-radius: 999px; overflow: hidden; margin: .8rem 0 .3rem; background: var(--bg); }
.split-bar .seg { display: grid; place-items: center; font-size: .74rem; font-weight: 700; color: #fff; min-width: 0; overflow: hidden; }
.split-bar .pos { background: var(--success); }
.split-bar .neu { background: color-mix(in srgb, var(--muted) 45%, #fff); color: var(--text); }
.split-bar .neg { background: var(--warning); }
.sub-h { font-size: .95rem; color: var(--primary); margin: 1.1rem 0 .4rem; }

/* ---------- links & QR hub ---------- */
.share-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); }
.share-card { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding: 1rem; margin: 0; align-items: start; }
.share-card.is-dim { opacity: .72; }
.share-qr { width: 8.5rem; height: 8.5rem; display: grid; place-items: center; background: #fff;
  border: 2px solid var(--accent); border-radius: calc(var(--radius) - 4px); padding: .3rem; }
.share-qr img, .share-qr canvas { width: 100% !important; height: auto !important; display: block; }
.share-body { min-width: 0; }
.share-body h3 { font-size: 1.05rem; color: var(--primary); margin-bottom: .4rem; }
.share-meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 0 0 .6rem; }
.share-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.share-url { font-weight: 600; color: var(--primary); word-break: break-all; margin: .3rem 0; }
.print-only { display: none; }
.deadline-now { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin: .4rem 0 0; }
@media print {
  .print-only { display: block; }
  .share-grid { grid-template-columns: 1fr 1fr; gap: 10mm; }
  .share-card { break-inside: avoid; border: 1px solid #ccc; }
  .chips, .topline-actions, .side, .topbar { display: none !important; }
}
