/* Kantoorbrievenwerkbank - demo by PitchAI. Colours re-typed from the public Toeslagen theme tokens
   (see app/static/HOUSESTYLE.md); nothing is loaded from belastingdienst.nl or toeslagen.nl. */

@font-face { font-family: "Source Sans 3"; src: url("/static/fonts/SourceSans3-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/static/fonts/SourceSans3-It.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/static/fonts/SourceSans3-Semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/static/fonts/SourceSans3-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --purple: #42145f; --purple-125: #310f47; --purple-140: #280c39; --purple-75: #714f87; --purple-45: #a995b7;
  --purple-30: #c6b8ce; --purple-15: #e3dce7; --purple-8: #f3eff5;
  --yellow: #ffb612; --yellow-140: #996d0b; --yellow-30: #fee9b7; --yellow-15: #fef4db;
  --green: #39870c; --green-125: #2b6509; --green-30: #c3dbb5; --green-15: #e1edda;
  --red: #d52b1e; --red-125: #a02016; --red-15: #f9dfdd;
  --blue: #007bc7; --blue-125: #005c95; --blue-15: #d9ebf7;
  --orange: #e17000; --orange-125: #a95400; --orange-15: #fbead9;
  --ink: #050914; --g900: #101729; --g800: #1e293b; --g700: #334155; --g600: #475569; --g500: #64748b;
  --g400: #94a3b8; --g300: #cbd5e1; --g200: #e2e8f0; --g100: #f1f5f9; --g50: #f8fafc; --white: #fff;
  --font: "Source Sans 3", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --r: 6px; --r-lg: 10px;
  --shadow-paper: 0 1px 2px rgba(16, 23, 41, .06), 0 8px 28px rgba(16, 23, 41, .08);
  --focus: 0 0 0 3px var(--white), 0 0 0 5px var(--purple);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; }
img, svg { display: block; }
a { color: var(--purple); text-underline-offset: .18em; }
a:hover { color: var(--purple-125); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 3px; }
h1, h2, h3, h4 { color: var(--purple); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--g600); }
svg { width: 1em; height: 1em; flex: none; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 28px; }
.wrap--wide { max-width: 1680px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--purple); color: #fff; padding: .6rem 1rem; z-index: 99; }
.skip-link:focus { left: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- ribbon + top bar ---- */
.demo-ribbon { background: var(--yellow-15); border-bottom: 1px solid var(--yellow-30); font-size: .82rem; color: var(--g800); }
.demo-ribbon__inner { padding-top: .35rem; padding-bottom: .35rem; }
.topbar { background: var(--white); border-bottom: 1px solid var(--g200); position: sticky; top: 0; z-index: 30; }
.topbar__inner { display: flex; align-items: center; gap: 2rem; height: 68px; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); }
.brand__mark { width: 38px; height: 38px; border-radius: 8px; background: var(--purple); color: var(--yellow); display: grid; place-items: center; }
.brand__mark svg { width: 22px; height: 22px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-weight: 700; font-size: 1.12rem; color: var(--purple); letter-spacing: -.01em; }
.brand__sub { font-size: .8rem; color: var(--g600); margin-top: .15rem; }
.nav { display: flex; gap: .25rem; margin-left: auto; }
.nav__link { text-decoration: none; color: var(--g800); font-weight: 600; padding: .5rem .8rem; border-radius: var(--r); font-size: .98rem; }
.nav__link:hover { background: var(--g100); color: var(--purple); }
.nav__link.is-active { color: var(--purple); box-shadow: inset 0 -3px 0 var(--yellow); border-radius: 0; }
.role { position: relative; }
.role > summary { list-style: none; cursor: pointer; }
.role > summary::-webkit-details-marker { display: none; }
.role__btn { display: flex; align-items: center; gap: .6rem; padding: .35rem .6rem .35rem .4rem; border: 1px solid var(--g200); border-radius: 999px; }
.role__btn:hover { border-color: var(--purple-30); background: var(--purple-8); }
.role__avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: #fff; background: var(--purple); flex: none; }
.role__avatar--eindredacteur { background: var(--green-125); }
.role__avatar--redacteur { background: var(--blue-125); }
.role__meta { display: flex; flex-direction: column; line-height: 1.1; }
.role__label { font-weight: 700; font-size: .88rem; }
.role__name { font-size: .76rem; color: var(--g600); }
.role__chev { width: 16px; height: 16px; color: var(--g500); }
.role__menu { position: absolute; right: 0; top: calc(100% + 8px); width: 290px; background: #fff; border: 1px solid var(--g200); border-radius: var(--r-lg); box-shadow: 0 12px 32px rgba(16,23,41,.14); padding: .5rem; z-index: 40; }
.role__hint { font-size: .82rem; color: var(--g600); margin: .3rem .5rem .5rem; }
.role__item { display: flex; gap: .7rem; align-items: center; padding: .55rem .5rem; border-radius: var(--r); text-decoration: none; color: var(--ink); }
.role__item:hover, .role__item.is-current { background: var(--purple-8); }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: inherit; font-weight: 600; font-size: .98rem; line-height: 1; padding: .78rem 1.15rem;
  border-radius: var(--r); border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--purple); color: #fff; }
.btn--primary:hover { background: var(--purple-125); color: #fff; }
.btn--cta { background: var(--green); color: #fff; }
.btn--cta:hover { background: var(--green-125); color: #fff; }
.btn--ghost { background: #fff; color: var(--purple); border-color: var(--purple-30); }
.btn--ghost:hover { background: var(--purple-8); border-color: var(--purple); color: var(--purple); }
.btn--quiet { background: transparent; color: var(--g700); padding: .5rem .6rem; }
.btn--quiet:hover { background: var(--g100); color: var(--purple); }
.btn--danger { background: #fff; color: var(--red-125); border-color: #efb3ae; }
.btn--danger:hover { background: var(--red-15); }
.btn--sm { padding: .5rem .75rem; font-size: .88rem; }
.btn--xs { padding: .32rem .5rem; font-size: .8rem; border-radius: 5px; }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* ---- generic ---- */
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--purple-75); margin-bottom: .6rem; display: block; }
.lead { font-size: 1.22rem; color: var(--g700); max-width: 44rem; line-height: 1.5; }
.tag { display: inline-flex; align-items: center; gap: .3rem; font-size: .76rem; font-weight: 600; padding: .15rem .5rem; border-radius: 999px; background: var(--g100); color: var(--g700); line-height: 1.5; white-space: nowrap; }
.tag svg { width: 12px; height: 12px; }
.tag--purple { background: var(--purple-15); color: var(--purple); }
.tag--green { background: var(--green-15); color: var(--green-125); }
.tag--yellow { background: var(--yellow-30); color: #5c4207; }
.tag--red { background: var(--red-15); color: var(--red-125); }
.tag--blue { background: var(--blue-15); color: var(--blue-125); }
.tag--orange { background: var(--orange-15); color: var(--orange-125); }
.rule { border: 0; border-top: 1px solid var(--g200); margin: 0; }
.kbd { font-family: var(--mono); font-size: .82em; background: var(--g100); padding: .05em .35em; border-radius: 4px; }
.field-input, .select, textarea.field-input { font: inherit; font-size: .95rem; padding: .62rem .75rem; border: 1px solid var(--g300); border-radius: var(--r); background: #fff; color: var(--ink); width: 100%; }
.field-input:focus, .select:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-15); }
.notice { display: flex; gap: .6rem; align-items: flex-start; padding: .7rem .85rem; border-radius: var(--r); font-size: .9rem; background: var(--blue-15); color: var(--blue-125); }
.notice svg { width: 18px; height: 18px; margin-top: .1rem; }
.notice--warn { background: var(--orange-15); color: var(--orange-125); }
.notice--ok { background: var(--green-15); color: var(--green-125); }
.notice--err { background: var(--red-15); color: var(--red-125); }

/* ---- landing ---- */
.hero { background: linear-gradient(180deg, var(--purple-8) 0%, #fff 100%); border-bottom: 1px solid var(--g200); overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 4rem; align-items: center; padding-top: 4.5rem; padding-bottom: 4.5rem; }
.hero h1 { max-width: 17ch; font-size: clamp(2rem, 1.3rem + 2.2vw, 3.1rem); }
.hero h1 em { font-style: normal; color: var(--purple-75); }
.hero__actions { display: flex; gap: .8rem; margin-top: 2rem; flex-wrap: wrap; }
.hero__facts { display: flex; gap: 2.2rem; margin-top: 2.6rem; padding-top: 1.4rem; border-top: 1px solid var(--purple-15); flex-wrap: wrap; }
.hero__fact strong { display: block; font-size: 1.7rem; color: var(--purple); line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero__fact span { font-size: .86rem; color: var(--g600); }
.hero-visual { position: relative; height: 500px; }
.hv-paper { position: absolute; background: #fff; border-radius: 4px; box-shadow: var(--shadow-paper); padding: 28px 30px; font-size: 12.5px; overflow: hidden; line-height: 1.55; color: var(--g800); }
.hv-paper--back { width: 330px; height: 380px; top: 0; left: 0; transform: rotate(-3deg); opacity: .9; }
.hv-paper--front { width: 440px; top: 40px; right: 0; }
.hv-paper h4 { font-size: 12px; color: var(--ink); margin: 10px 0 6px; }
.hv-line { height: 7px; border-radius: 4px; background: var(--g200); margin: 6px 0; }
.hv-paper .tc-del { background: var(--red-15); color: var(--red-125); text-decoration: line-through; }
.hv-paper .tc-ins { background: var(--green-15); color: var(--green-125); text-decoration: underline; text-decoration-color: var(--green); }
.hv-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.hv-wordmark { font-weight: 700; color: var(--purple); font-size: 12px; display: flex; gap: 6px; align-items: center; }
.hv-wordmark::before { content: ""; width: 4px; height: 16px; background: var(--purple); border-radius: 1px; }
.hv-score { position: absolute; left: 22px; bottom: 6px; background: #fff; border-radius: var(--r-lg); box-shadow: 0 10px 30px rgba(16,23,41,.14); padding: 14px 18px; display: flex; gap: 18px; align-items: center; }
.hv-score__num { font-size: 26px; font-weight: 700; color: var(--purple); font-variant-numeric: tabular-nums; line-height: 1; }
.hv-score__num small { font-size: 12px; color: var(--g500); font-weight: 600; display: block; margin-top: 4px; }
.hv-score__arrow { color: var(--g400); width: 22px; height: 22px; }
.hv-ai { position: absolute; right: 24px; top: 4px; background: var(--purple); color: #fff; border-radius: var(--r-lg); padding: 10px 14px; font-size: 12.5px; display: flex; gap: 8px; align-items: center; box-shadow: 0 10px 30px rgba(66,20,95,.3); }
.hv-ai svg { width: 16px; height: 16px; color: var(--yellow); }
.section { padding: 4.5rem 0; }
.section--tint { background: var(--g50); border-top: 1px solid var(--g200); border-bottom: 1px solid var(--g200); }
.section__head { max-width: 46rem; margin-bottom: 2.6rem; }
.steps4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.4rem; counter-reset: s; }
.steps4 > div { border-top: 3px solid var(--purple); padding-top: 1.1rem; }
.steps4 > div:nth-child(2) { border-color: var(--purple-75); }
.steps4 > div:nth-child(3) { border-color: var(--yellow); }
.steps4 > div:nth-child(4) { border-color: var(--green); }
.steps4 h3 { display: flex; gap: .55rem; align-items: center; color: var(--ink); }
.steps4 h3 svg { width: 20px; height: 20px; color: var(--purple); }
.steps4 p { color: var(--g700); font-size: .98rem; }
.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--g200); border-bottom: 1px solid var(--g200); }
.numbers > div { padding: 1.6rem 1.4rem; border-left: 1px solid var(--g200); }
.numbers > div:first-child { border-left: 0; padding-left: 0; }
.numbers strong { display: block; font-size: 2.3rem; line-height: 1; color: var(--purple); font-weight: 700; font-variant-numeric: tabular-nums; margin-bottom: .45rem; }
.numbers span { color: var(--g700); font-size: .95rem; }
.numbers em { display: block; font-style: normal; color: var(--g500); font-size: .8rem; margin-top: .35rem; }
.control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: .7rem; padding: .7rem 0; border-bottom: 1px solid var(--g200); }
.checklist li svg { width: 20px; height: 20px; color: var(--green); margin-top: .15rem; }
.req-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.req-table th, .req-table td { text-align: left; padding: .7rem .6rem; border-bottom: 1px solid var(--g200); vertical-align: top; }
.req-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--g600); font-weight: 700; }
.req-table td:first-child { font-variant-numeric: tabular-nums; color: var(--purple); font-weight: 700; white-space: nowrap; }
.cta-band { background: var(--purple); color: #fff; border-radius: var(--r-lg); padding: 2.4rem 2.6rem; display: flex; justify-content: space-between; align-items: center; gap: 2rem; }
.cta-band h2 { color: #fff; margin: 0 0 .3rem; }
.cta-band p { margin: 0; color: var(--purple-15); }
.cta-band .btn--cta { background: var(--yellow); color: var(--ink); }
.cta-band .btn--cta:hover { background: #ffc94d; color: var(--ink); }
.footer { background: var(--g50); border-top: 1px solid var(--g200); margin-top: 0; font-size: .9rem; color: var(--g700); }
.footer__inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; padding-top: 2.6rem; padding-bottom: 2.6rem; }
.footer__title { font-weight: 700; color: var(--purple); margin-bottom: .35rem; }

/* ---- werkbank (library) ---- */
.page-head { padding: 2.4rem 0 1.6rem; }
.page-head h1 { font-size: 2.1rem; margin-bottom: .3rem; }
.page-head p { color: var(--g700); margin: 0; max-width: 52rem; }
.lib { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 2.6rem; padding-bottom: 4rem; }
.lib__filters { position: sticky; top: 92px; align-self: start; }
.lib__filters h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--g600); margin: 1.4rem 0 .5rem; }
.facet { display: flex; justify-content: space-between; align-items: center; padding: .42rem .6rem; border-radius: var(--r); text-decoration: none; color: var(--g800); font-size: .95rem; }
.facet:hover { background: var(--g100); color: var(--purple); }
.facet.is-active { background: var(--purple-8); color: var(--purple); font-weight: 600; box-shadow: inset 3px 0 0 var(--purple); }
.facet span { font-size: .8rem; color: var(--g500); font-variant-numeric: tabular-nums; }
.search { position: relative; }
.search svg { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--g500); }
.search input { padding-left: 2.4rem; }
.tpl-list { border-top: 1px solid var(--g200); }
.tpl { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2rem; padding: 1.35rem 0; border-bottom: 1px solid var(--g200); }
.tpl__top { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: .35rem; }
.tpl__id { font-family: var(--mono); font-size: .8rem; color: var(--g600); }
.tpl h3 { margin: 0 0 .3rem; font-size: 1.18rem; }
.tpl h3 a { text-decoration: none; }
.tpl h3 a:hover { text-decoration: underline; }
.tpl p { margin: 0; color: var(--g700); font-size: .95rem; }
.tpl__meta { display: flex; gap: 1.1rem; margin-top: .6rem; font-size: .82rem; color: var(--g600); flex-wrap: wrap; }
.tpl__meta span { display: inline-flex; gap: .3rem; align-items: center; }
.tpl__meta svg { width: 14px; height: 14px; }
.tpl__start { display: flex; flex-direction: column; gap: .5rem; }
.tpl__start label { font-size: .8rem; font-weight: 600; color: var(--g700); }
.tpl__row { display: flex; gap: .5rem; }
.tpl__row .select { flex: 1; min-width: 0; font-size: .9rem; padding: .55rem .6rem; }
.recent { margin-top: 2.6rem; }
.recent h2 { font-size: 1.25rem; }
.recent-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.recent-table td, .recent-table th { padding: .6rem .5rem; border-bottom: 1px solid var(--g200); text-align: left; }
.recent-table th { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--g600); }

/* ---- workbench (letter) ---- */
body.is-bench { background: var(--g100); }
body.is-bench .footer { display: none; }
body.is-bench .wrap { max-width: none; }
.bench-bar { background: #fff; border-bottom: 1px solid var(--g200); }
.bench-bar__inner { display: flex; align-items: center; gap: 1.2rem; min-height: 64px; flex-wrap: wrap; padding-top: .6rem; padding-bottom: .6rem; }
.crumbs { font-size: .85rem; color: var(--g600); display: flex; gap: .35rem; align-items: center; }
.crumbs a { color: var(--g600); text-decoration: none; }
.crumbs a:hover { color: var(--purple); text-decoration: underline; }
.crumbs svg { width: 14px; height: 14px; }
.bench-title { font-size: 1.2rem; font-weight: 700; color: var(--ink); margin: 0; line-height: 1.2; }
.bench-title small { font-weight: 400; color: var(--g600); font-size: .9rem; margin-left: .4rem; }
.bench-bar__right { margin-left: auto; display: flex; gap: .6rem; align-items: center; }
.status-pill { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .84rem; padding: .3rem .7rem; border-radius: 999px; }
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-pill--concept { background: var(--g100); color: var(--g700); }
.status-pill--ter_review { background: var(--yellow-30); color: #6b4c05; }
.status-pill--teruggestuurd { background: var(--orange-15); color: var(--orange-125); }
.status-pill--goedgekeurd { background: var(--green-15); color: var(--green-125); }
.bench { display: grid; grid-template-columns: 300px minmax(0, 1fr) 400px; gap: 0; height: calc(100vh - 68px - 64px - 29px); min-height: 640px; }
.pane { overflow-y: auto; min-height: 0; }
.pane--left { background: #fff; border-right: 1px solid var(--g200); padding: 1.2rem 1.2rem 2rem; }
.pane--center { padding: 1.6rem 1.6rem 4rem; scroll-behavior: smooth; }
.pane--right { background: #fff; border-left: 1px solid var(--g200); display: flex; flex-direction: column; overflow: hidden; }
.pane-h { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--g600); margin: 0 0 .7rem; display: flex; align-items: center; justify-content: space-between; }
.dossier-person { display: flex; gap: .75rem; align-items: center; margin-bottom: 1rem; }
.dossier-person__av { width: 42px; height: 42px; border-radius: 50%; background: var(--purple-15); color: var(--purple); display: grid; place-items: center; font-weight: 700; }
.dossier-person strong { display: block; font-size: 1.02rem; line-height: 1.2; }
.dossier-person small { font-size: .82rem; }
.case-title { font-size: .92rem; color: var(--g800); background: var(--g50); border-left: 3px solid var(--yellow); padding: .55rem .7rem; margin: 0 0 1.2rem; border-radius: 0 var(--r) var(--r) 0; }
.fieldlist { margin: 0 0 1.4rem; }
.fieldrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem .6rem; padding: .48rem 0; border-bottom: 1px solid var(--g100); font-size: .86rem; cursor: default; }
.fieldrow:hover, .fieldrow.is-hot { background: var(--purple-8); margin: 0 -.5rem; padding-left: .5rem; padding-right: .5rem; border-radius: 4px; }
.fieldrow dt { color: var(--g600); grid-column: 1 / -1; font-size: .76rem; display: flex; gap: .35rem; align-items: center; }
.fieldrow dd { margin: 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.src { font-size: .68rem; font-weight: 600; padding: .05rem .38rem; border-radius: 4px; background: var(--g100); color: var(--g600); white-space: nowrap; align-self: center; }
.src--berekend { background: var(--blue-15); color: var(--blue-125); }
.src--brp { background: var(--green-15); color: var(--green-125); }
.src--tvs { background: var(--purple-15); color: var(--purple); }
.src--ontbreekt { background: var(--red-15); color: var(--red-125); }
.notes { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.notes li { font-size: .86rem; color: var(--g800); padding: .55rem .65rem; background: var(--yellow-15); border-radius: var(--r); margin-bottom: .45rem; line-height: 1.4; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--g200); }
.timeline li { position: relative; padding: 0 0 .7rem 1rem; font-size: .84rem; color: var(--g700); }
.timeline li::before { content: ""; position: absolute; left: -6px; top: .38rem; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--purple-45); }
.timeline time { display: block; font-size: .74rem; color: var(--g500); font-variant-numeric: tabular-nums; }

/* toolbar above paper */
.paper-tools { max-width: 794px; margin: 0 auto .9rem; display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.toggle { display: inline-flex; align-items: center; gap: .45rem; font-size: .86rem; color: var(--g700); cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--purple); width: 16px; height: 16px; }
.legend { display: flex; gap: .9rem; margin-left: auto; font-size: .8rem; color: var(--g600); align-items: center; }
.legend i { display: inline-block; width: 18px; height: 10px; border-radius: 2px; margin-right: .3rem; vertical-align: -1px; }
.legend .l-veld { background: var(--purple-15); border-bottom: 2px solid var(--purple-45); }
.legend .l-del { background: var(--red-15); }
.legend .l-ins { background: var(--green-15); }

/* right pane */
.tabs { display: flex; border-bottom: 1px solid var(--g200); padding: 0 .6rem; flex: none; }
.tab { font: inherit; background: none; border: 0; padding: .9rem .7rem .75rem; font-weight: 600; font-size: .92rem; color: var(--g600); cursor: pointer; border-bottom: 3px solid transparent; display: inline-flex; gap: .4rem; align-items: center; }
.tab:hover { color: var(--purple); }
.tab[aria-selected="true"] { color: var(--purple); border-bottom-color: var(--yellow); }
.tab .count { background: var(--purple); color: #fff; border-radius: 999px; font-size: .7rem; padding: .05rem .42rem; min-width: 1.3rem; text-align: center; }
.tab .count[data-n="0"] { background: var(--g200); color: var(--g600); }
.tabpanel { flex: 1; overflow-y: auto; padding: 1.1rem 1.2rem 2rem; min-height: 0; }
.tabpanel[hidden] { display: none; }
.ai-actions { display: grid; gap: .55rem; margin-bottom: 1.1rem; }
.ai-action { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: .75rem; align-items: center; text-align: left; font: inherit; padding: .75rem .8rem; border: 1px solid var(--g200); border-radius: var(--r-lg); background: #fff; cursor: pointer; color: var(--ink); transition: border-color .15s, background .15s, box-shadow .15s; }
.ai-action:hover { border-color: var(--purple-45); background: var(--purple-8); }
.ai-action.is-running { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-15); }
.ai-action.is-done .ai-action__n { background: var(--green); }
.ai-action[disabled] { opacity: .5; cursor: not-allowed; }
.ai-action__n { width: 34px; height: 34px; border-radius: 50%; background: var(--purple); color: #fff; display: grid; place-items: center; font-weight: 700; }
.ai-action__n svg { width: 18px; height: 18px; }
.ai-action strong { display: block; font-size: .98rem; }
.ai-action small { display: block; font-size: .8rem; color: var(--g600); line-height: 1.35; }
.ai-action__go { color: var(--purple); width: 20px; height: 20px; }
.instr { margin: -.15rem 0 .2rem; }
.instr summary { font-size: .84rem; color: var(--purple); cursor: pointer; font-weight: 600; list-style: none; }
.instr summary::-webkit-details-marker { display: none; }
.instr textarea { margin-top: .5rem; min-height: 70px; resize: vertical; font-size: .88rem; }
.run { border-top: 1px solid var(--g200); padding-top: 1rem; margin-top: .4rem; }
.run[hidden] { display: none; }
.run__head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: .7rem; }
.run__title { font-weight: 700; font-size: .98rem; display: flex; gap: .5rem; align-items: center; }
.run__title .spin { width: 16px; height: 16px; border: 2px solid var(--purple-15); border-top-color: var(--purple); border-radius: 50%; animation: spin .8s linear infinite; }
.run.is-done .run__title .spin { display: none; }
.run__time { font-size: .8rem; color: var(--g600); font-variant-numeric: tabular-nums; }
.model-chip { display: inline-flex; gap: .4rem; align-items: center; font-size: .78rem; font-weight: 600; background: var(--g900); color: #fff; padding: .25rem .55rem; border-radius: 999px; margin-bottom: .7rem; }
.model-chip svg { width: 14px; height: 14px; color: var(--yellow); }
.model-chip[hidden] { display: none; }
.model-skip { font-size: .74rem; color: var(--g500); margin: -.4rem 0 .7rem; }
.stepper { list-style: none; padding: 0; margin: 0; }
.stepper > li { position: relative; padding: 0 0 .85rem 1.9rem; }
.stepper > li::before { content: ""; position: absolute; left: 9px; top: 22px; bottom: 0; width: 2px; background: var(--g200); }
.stepper > li:last-child::before { display: none; }
.stepper__dot { position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--g300); background: #fff; display: grid; place-items: center; }
.stepper__dot svg { width: 12px; height: 12px; color: #fff; opacity: 0; }
.stepper > li[data-status="running"] .stepper__dot { border-color: var(--purple); border-top-color: transparent; animation: spin .8s linear infinite; }
.stepper > li[data-status="done"] .stepper__dot { background: var(--green); border-color: var(--green); }
.stepper > li[data-status="done"] .stepper__dot svg { opacity: 1; }
.stepper > li[data-status="skipped"] .stepper__dot { background: var(--g300); border-color: var(--g300); }
.stepper > li[data-status="error"] .stepper__dot { background: var(--red); border-color: var(--red); }
.stepper__label { font-weight: 600; font-size: .9rem; color: var(--g800); }
.stepper > li[data-status="waiting"] .stepper__label { color: var(--g500); }
.stepper__detail { font-size: .8rem; color: var(--g600); }
.stepper__log { list-style: none; padding: 0; margin: .3rem 0 0; font-size: .78rem; }
.stepper__log li { padding: .18rem 0 .18rem .9rem; position: relative; color: var(--g700); line-height: 1.35; }
.stepper__log li::before { content: ""; position: absolute; left: 0; top: .62rem; width: 5px; height: 5px; border-radius: 50%; background: var(--g400); }
.stepper__log li.k-tool { font-family: var(--mono); font-size: .74rem; color: var(--g800); }
.stepper__log li.k-tool::before { background: var(--purple-45); }
.stepper__log li.k-warn { color: var(--orange-125); }
.stepper__log li.k-warn::before { background: var(--orange); }
.ai-stream { font-family: var(--mono); font-size: .72rem; color: var(--g700); background: var(--g50); border: 1px solid var(--g200); border-radius: var(--r); padding: .5rem .6rem; max-height: 140px; overflow-y: auto; white-space: pre-wrap; margin-top: .4rem; }
.ai-stream:empty { display: none; }
.findings-live { margin-top: .5rem; display: grid; gap: .35rem; }

/* readability meter */
.meter { margin: 0 0 1.2rem; }
.meter__grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--g200); border-radius: var(--r-lg); overflow: hidden; }
.meter__cell { padding: .7rem .75rem; border-left: 1px solid var(--g200); }
.meter__cell:first-child { border-left: 0; }
.meter__k { font-size: .72rem; color: var(--g600); font-weight: 600; display: block; text-transform: uppercase; letter-spacing: .05em; }
.meter__v { font-size: 1.35rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; display: flex; align-items: baseline; gap: .3rem; }
.meter__from { font-size: .8rem; color: var(--g500); font-weight: 600; text-decoration: line-through; }
.meter__delta { font-size: .74rem; font-weight: 700; color: var(--green-125); }
.meter__delta.is-worse { color: var(--red-125); }
.meter__level { display: flex; justify-content: space-between; align-items: center; margin-top: .6rem; font-size: .84rem; }
.lvl { display: inline-flex; gap: 2px; }
.lvl span { font-size: .72rem; font-weight: 700; padding: .14rem .42rem; background: var(--g100); color: var(--g500); }
.lvl span:first-child { border-radius: 4px 0 0 4px; }
.lvl span:last-child { border-radius: 0 4px 4px 0; }
.lvl span.on { background: var(--purple); color: #fff; }
.lvl span.on.lvl-B1, .lvl span.on.lvl-A2 { background: var(--green); }

/* changes */
.changes-head { display: flex; gap: .5rem; align-items: center; justify-content: space-between; margin-bottom: .8rem; flex-wrap: wrap; }
.change { border: 1px solid var(--g200); border-radius: var(--r-lg); padding: .7rem .8rem; margin-bottom: .55rem; background: #fff; }
.change:hover, .change.is-hot { border-color: var(--purple-45); }
.change__top { display: flex; align-items: center; gap: .4rem; margin-bottom: .35rem; flex-wrap: wrap; }
.change__src { font-size: .72rem; color: var(--g500); margin-left: auto; }
.change__diff { font-size: .88rem; line-height: 1.45; margin: .2rem 0 .4rem; }
.change__diff del { background: var(--red-15); color: var(--red-125); text-decoration-color: var(--red); }
.change__diff ins { background: var(--green-15); color: var(--green-125); text-decoration: none; }
.change__why { font-size: .8rem; color: var(--g600); margin: 0 0 .5rem; }
.change__btns { display: flex; gap: .4rem; }
.change--resolved { opacity: .65; }
.empty { text-align: center; color: var(--g600); padding: 1.6rem .5rem; font-size: .92rem; }
.empty svg { width: 34px; height: 34px; margin: 0 auto .5rem; color: var(--g400); }

/* review */
.flow { display: flex; align-items: center; gap: 0; margin: 0 0 1.2rem; }
.flow__step { flex: 1; text-align: center; font-size: .76rem; color: var(--g500); font-weight: 600; position: relative; padding-top: 28px; }
.flow__step::before { content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--g300); background: #fff; z-index: 1; }
.flow__step::after { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: var(--g200); }
.flow__step:first-child::after { display: none; }
.flow__step.is-done { color: var(--green-125); }
.flow__step.is-done::before { background: var(--green); border-color: var(--green); }
.flow__step.is-done::after, .flow__step.is-current::after { background: var(--green); }
.flow__step.is-current { color: var(--purple); }
.flow__step.is-current::before { border-color: var(--purple); background: var(--purple); box-shadow: 0 0 0 4px var(--purple-15); }
.review-box { border-top: 1px solid var(--g200); padding-top: 1rem; margin-top: 1rem; }
.review-box h4 { font-size: .95rem; color: var(--ink); margin-bottom: .4rem; }
.comments { list-style: none; padding: 0; margin: .5rem 0 0; }
.comments li { font-size: .86rem; padding: .55rem .7rem; background: var(--g50); border-radius: var(--r); margin-bottom: .4rem; }
.comments li b { color: var(--purple); }
.comments time { color: var(--g500); font-size: .74rem; margin-left: .3rem; }
.audit-mini { list-style: none; padding: 0; margin: 0; }
.audit-mini li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: .5rem; font-size: .82rem; padding: .5rem 0; border-bottom: 1px solid var(--g100); }
.audit-mini time { color: var(--g500); font-variant-numeric: tabular-nums; font-size: .76rem; padding-top: .05rem; }
.audit-mini b { font-weight: 600; color: var(--g800); }
.audit-mini .who { color: var(--g500); font-size: .74rem; }

/* toast */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(30px); background: var(--g900); color: #fff; padding: .7rem 1.1rem; border-radius: var(--r-lg); font-size: .9rem; opacity: 0; transition: .25s; z-index: 80; pointer-events: none; max-width: 90vw; }
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.is-err { background: var(--red-125); }

/* template detail */
.tpl-detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 3rem; padding-bottom: 4rem; }
.blocklist { border-top: 1px solid var(--g200); }
.blockrow { padding: 1.1rem 0; border-bottom: 1px solid var(--g200); }
.blockrow__head { display: flex; gap: .5rem; align-items: center; margin-bottom: .45rem; flex-wrap: wrap; }
.blockrow__head strong { font-size: 1rem; }
.blockrow pre { white-space: pre-wrap; font-family: var(--mono); font-size: .8rem; background: var(--g50); border: 1px solid var(--g200); padding: .7rem .8rem; border-radius: var(--r); margin: 0; color: var(--g800); line-height: 1.5; }
.blockrow pre .ph { color: var(--purple); background: var(--purple-15); border-radius: 3px; padding: 0 2px; }
.meta-dl { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: .45rem .8rem; font-size: .9rem; margin: 0 0 1.6rem; }
.meta-dl dt { color: var(--g600); }
.meta-dl dd { margin: 0; font-weight: 600; }
.versions { list-style: none; padding: 0; margin: 0 0 1.6rem; }
.versions li { padding: .55rem 0; border-bottom: 1px solid var(--g200); font-size: .88rem; }
.versions b { color: var(--purple); }

/* benchmark */
.bm-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--g200); border-bottom: 1px solid var(--g200); margin-bottom: 2.6rem; }
.bm-grid > div { padding: 1.4rem 1.2rem; border-left: 1px solid var(--g200); }
.bm-grid > div:first-child { border-left: 0; padding-left: 0; }
.bm-grid strong { display: block; font-size: 2rem; color: var(--purple); line-height: 1.05; font-variant-numeric: tabular-nums; margin-bottom: .3rem; }
.bm-grid span { font-size: .9rem; color: var(--g700); }
.bm-table { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
.bm-table th, .bm-table td { padding: .55rem .5rem; border-bottom: 1px solid var(--g200); text-align: right; white-space: nowrap; }
.bm-table th:first-child, .bm-table td:first-child, .bm-table th:nth-child(2), .bm-table td:nth-child(2) { text-align: left; }
.bm-table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--g600); }
.bm-table td.good { color: var(--green-125); font-weight: 700; }
.bm-table td.bad { color: var(--red-125); font-weight: 700; }
.bar { display: inline-block; height: 8px; border-radius: 4px; background: var(--purple-15); vertical-align: middle; position: relative; width: 120px; overflow: hidden; }
.bar > i { position: absolute; inset: 0 auto 0 0; background: var(--purple); border-radius: 4px; }
.chart-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 110px; gap: 1rem; align-items: center; padding: .5rem 0; font-size: .9rem; }
.chart-track { height: 12px; background: var(--g100); border-radius: 6px; position: relative; overflow: hidden; }
.chart-track i { position: absolute; top: 0; bottom: 0; left: 0; background: var(--purple); border-radius: 6px; }
.chart-track i.green { background: var(--green); }
.chart-track i.yellow { background: var(--yellow); }
.chart-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; margin-bottom: 3rem; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes caret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 1280px) {
  .bench { grid-template-columns: 260px minmax(0, 1fr) 360px; }
}
@media (max-width: 1080px) {
  .hero__inner, .control-grid, .tpl-detail, .two-col { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .steps4, .numbers, .bm-grid { grid-template-columns: 1fr 1fr; }
  .lib { grid-template-columns: 1fr; }
  .lib__filters { position: static; }
  .tpl { grid-template-columns: 1fr; }
  .bench { grid-template-columns: 1fr; height: auto; }
  .pane { overflow: visible; }
  .pane--right { overflow: visible; }
  .nav { display: none; }
}
@media (max-width: 640px) {
  .steps4, .numbers, .bm-grid, .footer__inner { grid-template-columns: 1fr; }
  .role__meta { display: none; }
  .cta-band { flex-direction: column; align-items: flex-start; }
}
