/* Sopimushallinta demo (Skillkraft). Light and calm: warm paper, white cards, one deep-green accent, amber for notes.
   No Certia colours, logos or branding. No inline styles anywhere (strict CSP on Labs): sizes go through the CSSOM. */
:root {
  color-scheme: light;
  --paper: #f6f6f2;
  --surface: #ffffff;
  --surface-2: #fafaf7;
  --hover: #eef4f1;
  --ink: #17222a;
  --ink-2: #33424b;
  --muted: #55636b;
  --line: #e3e5e0;
  --line-2: #cbd3d4;
  --accent: #1d6352;
  --accent-2: #134638;
  --accent-soft: #e3f0eb;
  --accent-mid: #8dbba9;
  --warm: #9a4a14;
  --warm-soft: #fbeee2;
  --ok: #1b6642;
  --ok-soft: #e4f2e9;
  --warn: #7f4510;
  --warn-soft: #fcf1df;
  --warn-line: #ecd3ab;
  --bad: #9e3419;
  --banner-bg: #1f2a27;
  --font: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 34, 42, 0.05), 0 6px 20px rgba(23, 34, 42, 0.05);
}
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/instrument-sans-var-latin.woff2") format("woff2"); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; font-weight: 650; margin: 0; }
p { margin: 0 0 10px; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-2); }
button, select, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.ic { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 8px; box-shadow: var(--shadow); }
.skip:focus { top: 8px; }
.noscript { padding: 24px; }
.eyebrow { font-size: 13px; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.warn-t { color: var(--warn); }
.ok-t { color: var(--ok); }

/* ---------- honesty banner (always visible) ---------- */
.demo-banner { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 7px 16px; background: var(--banner-bg); color: #f3f6f6; font-size: 14px; line-height: 1.35; text-align: center; }
.demo-banner b { font-weight: 650; }
.demo-tag { flex: none; padding: 1px 8px; border-radius: 999px; background: #f2d9a6; color: #3a2606; font-size: 12px; font-weight: 650; letter-spacing: 0.03em; text-transform: uppercase; }
.banner-fiction { color: #c9d4d6; }

/* ---------- header ---------- */
.top { position: relative; background: var(--surface); border-bottom: 1px solid var(--line); }
.bar1 { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1240px; margin: 0 auto; padding: 10px 24px 6px; }
.brand { display: flex; align-items: center; gap: 11px; flex: none; color: var(--ink); text-decoration: none; }
.bar1 > .tools { margin-left: auto; }
.mark { width: 38px; height: 38px; border-radius: 11px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.mark-ic { width: 22px; height: 22px; }
.brand-t { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-t b { font-size: 19px; font-weight: 700; letter-spacing: -0.015em; white-space: nowrap; }
.brand-sub { font-size: 13px; color: var(--muted); }
.quick { display: flex; align-items: center; gap: 8px; }
.account { display: flex; align-items: center; gap: 8px; }
.who { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); padding: 3px 8px 3px 3px; border-radius: 999px; }
.who:hover { background: var(--hover); color: var(--ink); }
.who-t { display: flex; flex-direction: column; line-height: 1.2; }
.who-t b { font-size: 14px; }
.who-t span { font-size: 12px; color: var(--muted); max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.avatar-anon { background: #eceee9; color: var(--muted); }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--ink-2); }
.icon-btn:hover { background: var(--hover); }
.menu-btn { display: none; width: auto; padding: 0 12px; grid-auto-flow: column; gap: 6px; border-color: var(--line-2); font-weight: 600; font-size: 14px; }
.badge { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--warm); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.panel { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; max-width: 1240px; margin: 0 auto; padding: 0 24px 8px; flex-wrap: wrap; }
.tools .tool-login { display: none; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.nav-a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: 15px; }
.nav-a .ic { width: 17px; height: 17px; color: var(--muted); }
.nav-a:hover { background: var(--hover); color: var(--ink); }
.nav-a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-2); font-weight: 650; }
.nav-a[aria-current="page"] .ic { color: var(--accent); }
.tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tool { display: flex; align-items: center; gap: 6px; }
.tools-lbl { font-size: 13px; color: var(--muted); }
.select-sm { border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); padding: 6px 8px; font-size: 14px; max-width: 240px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: #eceee8; border-radius: 10px; }
.seg-btn { border: 0; background: transparent; padding: 5px 11px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.seg-btn[aria-pressed="true"] { background: var(--surface); color: var(--accent-2); box-shadow: 0 1px 3px rgba(23, 34, 42, 0.15); }
.toggle { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: var(--surface); padding: 5px 11px 5px 6px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.toggle-k { width: 30px; height: 18px; border-radius: 999px; background: #d5dad8; position: relative; transition: background 0.15s; }
.toggle-k::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: transform 0.15s; }
.toggle[aria-pressed="true"] { border-color: var(--accent-mid); color: var(--accent-2); }
.toggle[aria-pressed="true"] .toggle-k { background: var(--accent); }
.toggle[aria-pressed="true"] .toggle-k::after { transform: translateX(12px); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 10px 18px; font-size: 15px; font-weight: 600; border: 1px solid transparent; line-height: 1.25; text-decoration: none; text-align: left; }
.btn .ic { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); color: #fff; }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { background: var(--hover); color: var(--ink); }
.btn-sm { padding: 7px 13px; font-size: 14px; }
.btn-lg { padding: 12px 20px; font-size: 16px; }
.btn-small { padding: 7px 12px; font-size: 14px; background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-small:hover { background: var(--hover); }
.btn-danger { color: var(--bad); border-color: #e3bfb3; }
.linkish { border: 0; background: none; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0 4px; }

/* ---------- page layout ---------- */
main { outline: none; }
.view { max-width: 1240px; margin: 0 auto; padding: 26px 24px 48px; }
.page-head { margin-bottom: 20px; }
.page-head .actions { margin-top: 12px; }
.title { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; outline: none; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 760px; margin-bottom: 6px; }
.h2 { font-size: 21px; margin-bottom: 12px; font-weight: 650; }
.h3 { font-size: 17px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; font-weight: 650; }
.h3 .ic { color: var(--accent); }
.section { margin-top: 34px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; text-decoration: none; }
.two-col { display: grid; grid-template-columns: 1.35fr 1fr; gap: 32px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; }
.card + .card { margin-top: 16px; }
.grid-2 > .card, .grid-3 > .card, .grid-2 > figure.card { margin-top: 0; }
.card-staff { border-color: #c5dce4; background: #f6fafb; }
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; text-decoration: none; margin-bottom: 14px; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.detail-main { min-width: 0; }
.detail-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.detail-side .card + .card { margin-top: 0; }
.rem-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.rem-grid .fs { display: flex; flex-wrap: wrap; gap: 0 16px; }
.rem-grid .fs legend { width: 100%; }
.body-l { font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 70ch; }
.empty { padding: 24px; text-align: center; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.notice { display: flex; gap: 10px; align-items: flex-start; background: var(--warn-soft); border: 1px solid var(--warn-line); color: #4a2b08; border-radius: 12px; padding: 10px 14px; font-size: 15px; margin: 12px 0; }
.notice .ic { margin-top: 3px; }
.notice p { margin: 0; }
.notice-ok { background: var(--ok-soft); border-color: #b9dcc6; color: #123f29; }
.ticks { list-style: none; padding: 0; margin: 0 0 12px; }
.ticks li { position: relative; padding-left: 24px; margin-bottom: 6px; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 10px; height: 6px; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); }
.plain-list { margin: 0 0 12px; padding-left: 22px; }
.facts { display: grid; gap: 10px; margin: 6px 0 16px; }
.facts div { display: grid; grid-template-columns: 150px 1fr; gap: 10px; }
.facts dt { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 14px; font-weight: 600; }
.facts dd { margin: 0; }
.facts-wide div { grid-template-columns: 190px 1fr; padding: 10px 0; border-top: 1px solid var(--line); }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; background: #eef0ec; color: var(--ink-2); font-size: 13px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.chip .ic { width: 14px; height: 14px; }
.chip-soft { background: var(--accent-soft); color: var(--accent-2); }
.chip-open { background: #e6f2ea; color: #1d5a3a; }
.chip-new { background: var(--warm-soft); color: var(--warm); }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-wait { background: var(--warn-soft); color: var(--warn); }
.st-demo { background: var(--ok-soft); color: var(--ok); }
.st-std { background: var(--accent-soft); color: var(--accent-2); }
.st-plan { background: var(--warn-soft); color: var(--warn); }
.st-partner { background: #efe9f6; color: #573a7f; }
.vis-public { background: #e6f2ea; color: #1d5a3a; }
.vis-members { background: var(--accent-soft); color: var(--accent-2); }
.vis-staff { background: #efe9f6; color: #573a7f; }
.ev-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; }

/* forms */
.field { margin-bottom: 14px; }
.lbl { display: block; font-weight: 600; font-size: 15px; margin-bottom: 5px; }
.req { color: var(--bad); }
.hint { font-size: 14px; color: var(--muted); margin: -2px 0 6px; }
.err { color: var(--bad); font-size: 14px; font-weight: 600; margin: 5px 0 0; }
.input { width: 100%; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); padding: 9px 12px; font-size: 16px; }
.input:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.input[aria-invalid="true"], .has-err .input { border-color: var(--bad); background: #fff8f6; }
.input-sm { width: auto; padding: 6px 10px; font-size: 14px; }
textarea.input { resize: vertical; }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; cursor: pointer; }
.check input { width: 19px; height: 19px; margin: 3px 0 0; accent-color: var(--accent); flex: none; }
.check-locked { color: var(--muted); cursor: default; }
.fs { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 8px; margin: 0 0 14px; min-width: 0; }
.fs legend { font-weight: 650; font-size: 15px; padding: 0 4px; }
.fs-inline { display: flex; flex-wrap: wrap; gap: 0 18px; }
.fs-big { border: 0; padding: 0; margin: 0; min-width: 0; }
.fs-big legend { padding: 0; }
.inline-field { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row { display: flex; gap: 8px; }
.row .input { flex: 1; min-width: 0; }
.filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 18px; }
.filters-lbl { font-size: 14px; font-weight: 600; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chip-btn { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 6px 13px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.chip-btn:hover { background: var(--hover); }
.chip-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.search { position: relative; min-width: 240px; }
.search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 36px; }
.api-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 14px; color: var(--muted); }
.api-line > .ic { color: var(--accent); }

/* bars */
.bar { display: block; height: 8px; border-radius: 999px; background: #e7ebe8; overflow: hidden; min-width: 80px; }
.bar-fill { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width 0.3s ease; }
.bar-lg { height: 12px; flex: 1; }
.seats { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table thead th { background: var(--surface-2); font-size: 13px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); font-weight: 650; }
.table tbody th { font-weight: 600; }
.table tr:last-child th, .table tr:last-child td { border-bottom: 0; }
.table-perms td { text-align: center; }
.table-perms input { width: 19px; height: 19px; accent-color: var(--accent); }
.lvl-req { border-color: var(--accent-mid); background: var(--accent-soft); font-weight: 600; }
.lvl-off { color: var(--muted); background: var(--surface-2); }
.tour { counter-reset: tour; display: flex; flex-direction: column; gap: 6px; }
.tour li { counter-increment: tour; display: flex; gap: 10px; align-items: baseline; }
.tour li::before { content: counter(tour); width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-2); font-size: 13px; font-weight: 700; display: grid; place-items: center; flex: none; }

/* ---------- code ---------- */
.code { font-family: var(--mono); font-size: 13px; line-height: 1.5; background: #17222a; color: #e6eef0; border-radius: 10px; padding: 12px 14px; overflow: auto; margin: 10px 0 0; max-height: 360px; white-space: pre; }
.code-out { min-height: 64px; }

/* ---------- sign-up ---------- */
.stepper { list-style: none; margin: 0 0 16px; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.stepper li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: 14px; }
.stepper li.now { border-color: var(--accent); color: var(--accent-2); }
.stepper li.done { color: var(--ok); }
.step-n { width: 26px; height: 26px; border-radius: 50%; background: #eceee9; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.step-n .ic { width: 15px; height: 15px; }
.stepper li.now .step-n { background: var(--accent); color: #fff; }
.stepper li.done .step-n { background: var(--ok); color: #fff; }
.join-card { max-width: 860px; }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.radio-card { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1.5px solid var(--line-2); border-radius: 14px; background: var(--surface); cursor: pointer; }
.radio-card:hover { border-color: var(--accent-mid); }
.radio-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.radio-card:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.rc-ic { width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.radio-card:has(input:checked) .rc-ic { background: var(--accent); color: #fff; }
.rc-t { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.rc-t span { color: var(--ink-2); font-size: 15px; }
.form-grid { gap: 0 18px; margin-top: 8px; }
.consents { margin: 6px 0 4px; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.err-summary { border: 2px solid var(--bad); background: #fff6f3; border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; outline: none; }
.err-summary ul { margin: 4px 0 0; padding-left: 20px; }
.err-summary a { color: var(--bad); font-weight: 600; }
.done { text-align: left; }
.done-ic { width: 52px; height: 52px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin-bottom: 12px; }
.done-ic .ic { width: 28px; height: 28px; }

.subnav { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.subnav-a { padding: 9px 14px; text-decoration: none; color: var(--ink-2); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.subnav-a:hover { color: var(--ink); background: var(--hover); border-radius: 8px 8px 0 0; }
.subnav-a[aria-current="page"] { color: var(--accent-2); border-bottom-color: var(--accent); }
/* ---------- materials ---------- */
.mat-list { display: flex; flex-direction: column; gap: 8px; }
.mat { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.mat-ic { width: 42px; height: 42px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.mat-body { flex: 1; min-width: 0; }
.mat-title { font-weight: 650; margin: 0 0 2px; }
.mat-body .small { margin: 0; }

/* ---------- reports ---------- */
.kpis { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.kpi-v { font-size: 26px; font-weight: 700; color: var(--accent-2); letter-spacing: -0.02em; }
.kpi-l { font-size: 13px; color: var(--muted); line-height: 1.3; }
.chart { margin: 0; }
.hbars { display: flex; flex-direction: column; gap: 8px; }
.hbars li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 46px; align-items: center; gap: 10px; font-size: 14px; }
.hb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-track { height: 12px; background: #e7ebe8; border-radius: 999px; overflow: hidden; }
.hb-fill { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.hb-v { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.vbars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; align-items: end; height: 190px; }
.vb { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.vb-v { font-size: 13px; font-weight: 650; }
.vb-col { flex: 1; width: 100%; max-width: 34px; display: flex; align-items: flex-end; }
.vb-fill { display: block; width: 100%; background: var(--accent); border-radius: 6px 6px 2px 2px; }
.vb-l { font-size: 12px; color: var(--muted); }
/* ---------- integrations ---------- */
.int { display: flex; flex-direction: column; margin: 0; }
.ints .card + .card { margin-top: 0; }
.int-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.int-ic { width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.int p { margin: 0; color: var(--ink-2); }

.tile { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; }
.tile > .ic:first-child { color: var(--accent); width: 22px; height: 22px; }
.tile span { flex: 1; }
.tile-go { color: var(--muted); }
.tile:hover { border-color: var(--accent-mid); color: var(--ink); }
/* ---------- gate, dialogs, toast ---------- */
.gate { max-width: 640px; }
.gate-ic { width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 10px; }
.dlg { border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: 0 20px 60px rgba(23, 34, 42, 0.25); color: var(--ink); background: var(--surface); }
.dlg-wide { width: min(820px, calc(100vw - 24px)); }
.dlg::backdrop { background: rgba(23, 34, 42, 0.45); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.dlg-title { font-size: 19px; }
.dlg-body { padding: 16px 22px 22px; }
.persona-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 16px; }
.persona { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); text-align: left; }
.persona:hover { border-color: var(--accent); background: var(--accent-soft); }
.persona > span:last-child { display: flex; flex-direction: column; }
.login-email { border-top: 1px solid var(--line); padding-top: 12px; }
.notes { display: flex; flex-direction: column; gap: 8px; }
.note { display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); }
.note p { margin: 0; }
.note-new { background: var(--accent-soft); border-color: #c5dce4; }
.note > .ic { color: var(--accent); margin-top: 3px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 80; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 14px; }
.foot-in { max-width: 1240px; margin: 0 auto; padding: 20px 24px 28px; }
.foot-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 0; }
.foot-mark { display: inline-flex; align-items: center; gap: 8px; }


/* ================= Sopimushallinta additions ================= */
.block { display: block; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.mono { font-family: var(--mono); font-size: 13px; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stack > .card + .card { margin-top: 0; }
.section-sm { margin-top: 14px; }
.span-2 { grid-column: 1 / -1; }
.bad-t { color: var(--bad); }
.lbl-sm { font-size: 13px; font-weight: 600; color: var(--muted); }
.input-lg { font-size: 18px; padding: 12px 14px 12px 40px; }
.top .input-sm { width: 100%; }
mark { background: #fbe7a6; color: inherit; border-radius: 3px; padding: 0 2px; }

/* header search */
.top-search { position: relative; flex: 1 1 260px; max-width: 380px; margin: 0 8px; }
.top-search .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.top-search .input { padding-left: 32px; }
.panel .top-search { max-width: none; margin: 4px 0 8px; width: 100%; flex: none; }
.bar1 > .tools { flex-wrap: nowrap; }
.two-col > .card, .two-col > section.card { margin-top: 0; }
.flow-grid + .small { margin-top: 12px; }
.chips.filters { justify-content: flex-start; }
.hbars, .notes, .tour { list-style: none; margin: 0; padding: 0; }
.notes { display: flex; flex-direction: column; gap: 8px; }
.table-wrap + p, .table-wrap + .actions, .table-wrap + button { margin-top: 10px; }

/* chips for this demo */
.chip-late { background: #fbe4dd; color: var(--bad); }
.chip-conf { background: #efe9f6; color: #573a7f; }
.chip-tag { text-decoration: none; background: #eef0ec; }
.chip-tag:hover { background: var(--accent-soft); color: var(--accent-2); }
.chip-ai { background: #efe9f6; color: #573a7f; }
.chip-orig { background: #e8eef9; color: #284a86; margin-left: 6px; }
.chip-n { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: rgba(23, 34, 42, 0.08); font-size: 12px; }
.chip-btn[aria-pressed="true"] .chip-n { background: rgba(255, 255, 255, 0.25); }
.st-draft { background: #eef0ec; color: var(--ink-2); }
.st-review, .st-approval { background: #e8eef9; color: #284a86; }
.st-signing { background: #efe9f6; color: #573a7f; }
.st-active { background: var(--ok-soft); color: var(--ok); }
.st-ending { background: var(--warn-soft); color: var(--warn); }
.st-ended, .st-terminated { background: #eceee9; color: var(--muted); }
.ty-hankinta { background: var(--accent-soft); color: var(--accent-2); }
.ty-osto { background: #e6f0f7; color: #1f4f73; }
.ty-tyotilaus { background: #eef2e2; color: #4b5a17; }
.ty-asiakas { background: #fbeee2; color: #7a3a0f; }
.ty-tyo { background: #efe9f6; color: #573a7f; }
.ty-muu { background: #eceee9; color: var(--ink-2); }
.conf-high { background: var(--ok-soft); color: var(--ok); }
.conf-mid { background: var(--warn-soft); color: var(--warn); }
.conf-low { background: #fbe4dd; color: var(--bad); }
.st-tag-demo { background: var(--ok-soft); color: var(--ok); }
.st-tag-std { background: var(--accent-soft); color: var(--accent-2); }
.st-tag-build { background: var(--warn-soft); color: var(--warn); }
.st-tag-partner { background: #efe9f6; color: #573a7f; }
.user-chip { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.avatar-sm { width: 26px; height: 26px; font-size: 11px; }
.btn-sim { border-style: dashed; border-color: #b9a6d6; color: #573a7f; background: #faf7fd; }
.btn-sim:hover { background: #f2ecfa; }
.btn-okd { background: var(--ok-soft); border-color: #9fcfb1; color: var(--ok); }
.btn[disabled], .btn-small[disabled], .icon-btn[disabled], .seg-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.file-btn { cursor: pointer; }
.file-btn:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.tick { color: var(--ok); display: inline-grid; }

/* desk */
.rights-line { margin: -6px 0 16px; }
.rights-line .ic { width: 16px; height: 16px; color: var(--accent); vertical-align: -3px; margin-right: 6px; }
.kpis { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.kpis-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
a.kpi { text-decoration: none; color: var(--ink); height: 100%; }
a.kpi:hover { border-color: var(--accent-mid); }
.kpi-warn .kpi-v { color: var(--warn); }
.kpi-bad .kpi-v { color: var(--bad); }
.card-accent { border-color: #bcd8cc; background: linear-gradient(180deg, #f1f8f5, #ffffff 70%); }
.task-list, .mini-list, .log-mini, .notes-list, .task-grid, .versions, .flow-list, .signer-list, .outbox, .rule-list, .spend, .tpl-grid, .sug-list, .results, .hits, .clist { list-style: none; margin: 0; padding: 0; }
.task-row { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line); }
.task-row:first-child { border-top: 0; }
.task-t { display: flex; flex-direction: column; min-width: 0; }
.task-t a { font-weight: 600; text-decoration: none; }
.mini-list li { display: flex; flex-direction: column; gap: 2px; padding: 9px 0; border-top: 1px solid var(--line); }
.mini-list li:first-child { border-top: 0; padding-top: 2px; }
.mini-list a { font-weight: 600; text-decoration: none; }
.mini-list .chip { align-self: flex-start; }
.mini-list-cards li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; background: var(--surface); }
.mini-list-cards li:first-child { padding-top: 10px; }
.log-mini li { display: flex; flex-direction: column; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.log-mini li:first-child { border-top: 0; }
.tour-card .tour a { text-decoration: none; font-weight: 600; }

/* register */
.filters-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 12px; }
.filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-row-2 { align-items: flex-end; }
.search-grow { flex: 1 1 260px; }
.field-inline { margin: 0; display: flex; flex-direction: column; gap: 3px; }
.result-line { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; margin: 6px 0 12px; }
.bucket { margin-top: 22px; }
.bucket-h { font-size: 18px; display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.bucket-n { font-size: 14px; color: var(--muted); font-weight: 600; }
.bucket-v { font-size: 14px; color: var(--accent-2); font-weight: 650; margin-left: auto; }
.clist-head, .crow-a { display: grid; grid-template-columns: minmax(0, 2.6fr) minmax(0, 1.25fr) minmax(0, 1fr) 110px 90px minmax(0, 1fr); gap: 12px; align-items: center; }
.clist-head { padding: 0 16px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 650; }
.clist { display: flex; flex-direction: column; gap: 6px; }
.crow-a { padding: 11px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.crow-a:hover { border-color: var(--accent-mid); color: var(--ink); background: #fcfdfc; }
.crow-main { display: flex; flex-direction: column; min-width: 0; }
.crow-title { font-weight: 650; }
.crow-cell { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 0; font-size: 15px; }
.crow-num { font-variant-numeric: tabular-nums; }
.cell-l { display: none; }

/* search */
.search-big { margin-bottom: 10px; max-width: 760px; }
.search-big .search .ic { left: 13px; }
.examples { margin: 4px 0 14px; }
.examples a { text-decoration: none; }
.results { display: flex; flex-direction: column; gap: 12px; }
.result { margin: 0; }
.results .card + .card { margin-top: 0; }
.result-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.result-title { font-size: 18px; font-weight: 650; text-decoration: none; }
.hits { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.hits li { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 10px; font-size: 15px; padding-top: 6px; border-top: 1px solid var(--line); }
.hit-where { font-size: 13px; font-weight: 650; color: var(--muted); }
.hit-text { color: var(--ink-2); }

/* contract */
.c-head .chips { margin-bottom: 6px; }
.lead-sm { font-size: 16px; color: var(--muted); }
.sub-badge { display: inline-block; margin-left: 6px; min-width: 20px; padding: 0 6px; border-radius: 999px; background: #eceee9; color: var(--ink-2); font-size: 12px; text-align: center; }
.subnav { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin; }
.subnav-a { white-space: nowrap; }
.big-num { font-size: 24px; font-weight: 700; color: var(--accent-2); margin: 0 0 6px; }
.big-num .small { font-weight: 500; }
.bar-warn .bar-fill { background: #c47a1d; }
.timeline { margin: 8px 0 4px; }
.tl-track { position: relative; height: 10px; background: #e7ebe8; border-radius: 999px; margin: 14px 0 6px; }
.tl-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent-mid); border-radius: 999px; }
.tl-mark { position: absolute; top: -6px; width: 3px; height: 22px; background: var(--ink); border-radius: 2px; transform: translateX(-1px); }
.tl-notice { background: var(--warn); }
.tl-ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 8px; }
.tl-legend { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.tl-legend li { display: flex; align-items: center; gap: 8px; }
.tl-key { width: 4px; height: 16px; border-radius: 2px; background: var(--ink); flex: none; }
.tl-key.tl-notice { background: var(--warn); }
.tl-key.tl-end { background: var(--accent-mid); }
.doc-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; margin-bottom: 12px; }
.doc-bar .small { display: inline-flex; align-items: center; gap: 4px; }
.actions-tight { margin: 0; gap: 6px; }
.doc { max-width: 860px; padding: 30px 36px; }
.doc-head { border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 16px; }
.doc-kind { font-size: 12px; letter-spacing: 0.08em; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.doc-title { font-size: 24px; margin-bottom: 4px; }
.doc-sec { margin-bottom: 14px; }
.doc-h { font-size: 16px; font-weight: 650; margin: 0 0 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.doc-sec p { color: var(--ink-2); max-width: 72ch; }
.doc-edit-sec { display: flex; gap: 10px; margin-bottom: 12px; }
.doc-edit-n { font-weight: 700; color: var(--muted); padding-top: 9px; width: 26px; flex: none; }
.doc-in-h { font-weight: 650; margin-bottom: 6px; }
.doc-mini p { margin-bottom: 8px; }
.doc-raw { white-space: pre-wrap; font-family: var(--font); font-size: 14px; line-height: 1.55; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; max-height: 620px; overflow: auto; margin: 0; }
.notes-list { display: flex; flex-direction: column; gap: 10px; }
.notes-list .card + .card { margin-top: 0; }
.note-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.note-claim { border-left: 4px solid var(--bad); }
.note-text { font-size: 16px; }
.note-res { background: var(--ok-soft); border-radius: 8px; padding: 6px 10px; }
.task-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.task-grid-1 { grid-template-columns: minmax(0, 1fr); margin-top: 0; }
.task-grid .card + .card { margin-top: 0; }
.task { margin: 0; }
.task-done { opacity: 0.7; }
.task-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.task-title { font-weight: 650; font-size: 16px; margin: 6px 0 4px; }
.task .ok-t { display: flex; align-items: center; gap: 4px; }
.task .ok-t .ic { width: 15px; height: 15px; }
.two-cols-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.versions { display: flex; flex-direction: column; gap: 4px; }
.ver { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.ver:first-child { border-top: 0; }
.ver-n { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-2); font-weight: 700; font-size: 13px; display: grid; place-items: center; flex: none; }
.ver-orig { background: #e8eef9; color: #284a86; }
.diff { margin-top: 10px; }
.diff-sec { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
del { background: #fbe4dd; color: #7a2410; text-decoration: line-through; border-radius: 3px; }
ins { background: #dff1e6; color: #12492c; text-decoration: none; border-radius: 3px; }
.legend del, .legend ins { padding: 0 4px; }

/* signing */
.flow-grid { margin-top: 6px; }
.flow-box { margin: 0; }
.flow-list { display: flex; flex-direction: column; gap: 10px; margin: 8px 0; }
.flow-p { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); }
.flow-p:first-child { border-top: 0; }
.flow-p .chip { align-self: flex-start; }
.flow-act { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.flow-edit { align-items: start; margin-bottom: 8px; }
.signer-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; counter-reset: sg; }
.signer { counter-increment: sg; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.signer-t { display: flex; flex-direction: column; min-width: 0; }
.signer-t b::before { content: counter(sg) ". "; color: var(--muted); }
.signer-m { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 3px; }
.signer-m .input { width: 100%; }
.signer-b { grid-row: 1; grid-column: 2; display: flex; gap: 2px; }
.add-signer summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.add-signer[open] summary { margin-bottom: 10px; }
.radio-cards-2 { grid-template-columns: 1fr 1fr; }
.radio-card-sm { padding: 10px 12px; }
.radio-card-sm .rc-t { gap: 1px; }

/* tasks, messages, rules */
.outbox { display: flex; flex-direction: column; gap: 8px; }
.outbox .card + .card { margin-top: 0; }
.msg { padding: 12px 16px; }
.msg summary { cursor: pointer; display: flex; flex-direction: column; gap: 2px; list-style: none; }
.msg summary::-webkit-details-marker { display: none; }
.msg-s { font-weight: 650; }
.msg-b { margin-top: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.rule .fs { margin-bottom: 8px; }
.rule-list { display: flex; flex-direction: column; gap: 10px; }
.rule-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.spend { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.spend li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 190px; gap: 12px; align-items: center; }
.spend a { font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* create and import */
.create-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.create-form .h2 { margin-top: 18px; }
.create-form .h2:first-of-type { margin-top: 0; }
.preview-col { position: sticky; top: 52px; }
.doc-preview { padding: 22px 24px; max-height: calc(100vh - 120px); overflow: auto; }
.doc-preview .doc-sec p { font-size: 15px; }
.tpl-grid { display: flex; flex-direction: column; gap: 8px; }
.tpl { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; }
.tpl:hover { border-color: var(--accent-mid); color: var(--ink); }
.tpl-ic { width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.tpl-t { display: flex; flex-direction: column; min-width: 0; }
.drop { text-align: left; border-style: dashed; border-width: 2px; border-color: var(--line-2); }
.drop-ic { width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 10px; }
.drop-ic .ic { width: 26px; height: 26px; }
.busy { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.import-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.import-grid > .card + .card { margin-top: 0; }
.import-doc { position: sticky; top: 52px; }
.sug-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.sug { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.sug-ok { border-color: #9fcfb1; background: #f5fbf7; }
.sug-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.sug-top .lbl { margin: 0 auto 0 0; }
.sug-row { display: flex; gap: 8px; align-items: center; }
.sug-row .input { flex: 1; min-width: 0; }
.sug-src { margin: 6px 0 0; }
.sug-src q { font-style: italic; }
.admin-tiles { margin-top: 4px; }
.int-toggle { margin-top: 10px; font-size: 14px; }
.ints { list-style: none; padding: 0; }
.ints .int { margin: 0; }
.int .code { max-height: 200px; }
.chain { display: flex; align-items: center; gap: 6px; font-weight: 650; margin: 10px 0 0; }

.hbars li { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 72px; }

/* responsive */
@media (max-width: 1240px) {
  .kpis-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1179px) {
  .menu-btn { display: inline-grid; }
  .panel { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 50; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(23, 34, 42, 0.12); padding: 10px 16px 16px; flex-direction: column; align-items: stretch; }
  .panel.open { display: flex; }
  .nav-list { flex-direction: column; }
  .nav-a { display: flex; padding: 11px 12px; font-size: 16px; }
  .tools { padding-top: 10px; border-top: 1px solid var(--line); }
  .tool-viewas { flex-wrap: wrap; }
  .who-t span { display: none; }
  .create-grid, .import-grid { grid-template-columns: minmax(0, 1fr); }
  .preview-col, .import-doc { position: static; }
  .doc-preview { max-height: none; }
}
@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clist-head { display: none; }
  .crow-a { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .crow-main { grid-column: 1 / -1; }
  .crow-cell { font-size: 14px; }
  .cell-l { display: inline; color: var(--muted); font-size: 13px; margin-right: 4px; }
}
@media (max-width: 980px) {
  .who-t { display: none; }
  .two-col, .detail { grid-template-columns: minmax(0, 1fr); }
  .task-grid { grid-template-columns: minmax(0, 1fr); }
  .hits li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
@media (max-width: 760px) {
  .bar1 { padding: 8px 16px; }
  .view { padding: 18px 16px 40px; }
  .foot-in { padding: 18px 16px 24px; }
  .demo-banner { font-size: 13px; padding: 6px 12px; text-align: left; }
  .banner-fiction { display: none; }
  .brand-sub { display: none; }
  .brand-t b { font-size: 17px; }
  .mark { width: 34px; height: 34px; }
  .menu-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .menu-btn { width: 40px; padding: 0; }
  .title { font-size: 25px; }
  .lead { font-size: 17px; }
  .grid-2, .grid-3, .grid-4, .radio-cards, .radio-cards-2, .two-cols-checks { grid-template-columns: minmax(0, 1fr); }
  .kpis-6, .kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 16px; }
  .facts div, .facts-wide div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .search { min-width: 0; width: 100%; }
  .filter-row-2 > .field-inline { flex: 1 1 140px; }
  .filter-row-2 .input-sm { width: 100%; }
  .doc { padding: 18px 16px; }
  .doc-title { font-size: 20px; }
  .spend li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .table th, .table td { padding: 8px 10px; }
  .dlg-body { padding: 14px 16px 18px; }
  .hbars li { grid-template-columns: minmax(0, 1fr) 54px; }
  .hb-track { grid-column: 1 / -1; grid-row: 2; }
  .vbars { gap: 4px; height: 160px; }
  .bucket-v { margin-left: 0; }
  .doc-bar { align-items: stretch; flex-direction: column; }
  .sug-row { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
@media print {
  .demo-banner { position: static; background: #fff; color: #000; border-bottom: 1px solid #999; }
  .top, .foot, .subnav, .doc-bar, .actions, .back, .toast, .c-head .chips, .notice { display: none !important; }
  body { background: #fff; }
  .view { padding: 0; }
  .doc { box-shadow: none; border: 0; padding: 0; max-width: none; }
}
