:root {
  --bg: #f4f5f7; --surface: #ffffff; --ink: #14181f; --ink-2: #4b5563; --ink-3: #8a93a3;
  --line: #e4e7ec; --line-2: #cfd5de;
  --brand: #09223d; --brand-2: #164071; --accent: #c8963e;
  --ok: #1f7a4d; --ok-bg: #e4f3eb; --warn: #b7791f; --warn-bg: #fbf1dc; --bad: #b42318; --bad-bg: #fde8e6; --muted-bg: #eef0f3;
  --blue: #1d4ed8; --teal: #0f766e; --violet: #6d28d9; --amber: #b45309; --rose: #be123c;
  --radius: 10px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --font: ui-sans-serif, -apple-system, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .4rem; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; } h4 { font-size: .92rem; color: var(--ink-2); }
p { margin: 0 0 .8rem; }
small, .muted { color: var(--ink-3); }
.muted { font-size: .88rem; }
code { font: .85em var(--mono); background: var(--muted-bg); padding: .1em .35em; border-radius: 4px; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--brand); color: #d9e2ec; padding: 1.2rem 1rem; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.side .brand { color: #fff; font-weight: 700; font-size: 1.05rem; letter-spacing: .01em; display: block; margin-bottom: .2rem; }
.side .brand small { display: block; color: #9fb3c8; font-weight: 400; font-size: .78rem; margin-top: .45rem; }
.side .brand .logo { height: 30px; width: auto; display: block; }
.public header .logo { height: 28px; width: auto; display: block; }
.logo-dark { display: block; }
.side nav { margin-top: 1.4rem; display: flex; flex-direction: column; gap: 2px; }
.side nav a { color: #c5d2df; padding: .5rem .7rem; border-radius: 7px; font-size: .93rem; display: flex; align-items: center; gap: .6rem; }
.side nav a:hover { background: rgba(255,255,255,.07); text-decoration: none; color: #fff; }
.side nav a.active { background: rgba(255,255,255,.14); color: #fff; }
.side nav .sep { margin: .7rem .7rem .3rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: #7f93a8; }
.side .foot { margin-top: auto; font-size: .82rem; color: #9fb3c8; border-top: 1px solid rgba(255,255,255,.1); padding-top: .8rem; }
.side .foot a { color: #c5d2df; }
.main { padding: 1.6rem 2rem 3rem; max-width: 1240px; width: 100%; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.topbar .crumb { color: var(--ink-3); font-size: .85rem; margin-bottom: .2rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* Narrow desktop / side panel: slimmer sidebar, still beside the content */
@media (max-width: 1180px) {
  .app { grid-template-columns: 200px 1fr; }
  .side { padding: 1rem .7rem; }
  .side nav a { font-size: .86rem; padding: .4rem .55rem; }
  .main { padding: 1.2rem 1.2rem 2.5rem; }
  .grid-5 { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
/* Small screens: collapsible top bar instead of a stacked sidebar */
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; z-index: 40; height: auto; padding: .6rem .9rem; display: block; }
  .side .brand-row { display: flex; align-items: center; justify-content: space-between; }
  .side .brand { display: flex; align-items: center; margin: 0; }
  .side .brand .logo { height: 24px; }
  .side .brand small { display: inline; margin: 0 0 0 .6rem; font-size: .74rem; }
  .side .nav-toggle { display: inline-flex; }
  .side nav { display: none; margin-top: .6rem; flex-direction: row; flex-wrap: wrap; gap: .25rem; }
  .side.open nav { display: flex; }
  .side nav a { padding: .35rem .6rem; font-size: .84rem; background: rgba(255,255,255,.06); }
  .side .sep { display: none; }
  .side .foot { display: none; }
  .side.open .foot { display: block; margin-top: .6rem; padding-top: .5rem; }
  .main { padding: 1rem .9rem 2rem; }
  .topbar { margin-bottom: 1rem; }
  h1 { font-size: 1.3rem; }
  .grid-2, .grid-3, .grid-5 { grid-template-columns: 1fr; }
  .grid-3 > .card[style*="span 2"] { grid-column: auto !important; }
  .asst-pane { width: 100vw; }
  table { font-size: .86rem; }
}
.nav-toggle { display: none; align-items: center; gap: .4rem; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 6px; padding: .35rem .6rem; font: 600 .8rem var(--font); cursor: pointer; }

/* ---------- public ---------- */
.public { min-height: 100vh; display: flex; flex-direction: column; }
.public header { padding: .85rem 2rem; display: flex; align-items: center; gap: 1.6rem; background: var(--brand); color: #fff; }
.public header > a:first-child { margin-right: auto; }
.pub-nav { display: flex; align-items: center; gap: 1.6rem; font-size: .95rem; }
.pub-nav a { opacity: .92; } .pub-nav a:hover { opacity: 1; }
.lang-seg { display: inline-flex; border: 1px solid rgba(255,255,255,.25); border-radius: 6px; overflow: hidden; font-size: .78rem; }
.lang-seg a { padding: .22rem .55rem; opacity: .7; color: #fff; text-decoration: none; }
.lang-seg a.on { background: rgba(255,255,255,.16); opacity: 1; font-weight: 600; }
.lang-seg a:hover { opacity: 1; text-decoration: none; }
.hero-actions { gap: 1.2rem; }
.txt-link { color: var(--brand-2); font-weight: 600; font-size: .92rem; }
@media (max-width: 700px) {
  .public header { flex-wrap: wrap; padding: .7rem 1rem; gap: .6rem 1rem; }
  .public header > a:first-child { margin-right: 0; }
  .pub-nav { gap: .9rem; font-size: .88rem; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
  .lang-seg { order: 3; }
  .pub-cta { order: 4; flex: 1 0 100%; justify-content: center; }
}
.public header a { color: #fff; }
.public main { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 2.5rem 1.2rem; }
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: center; }
.hero h1 { font-size: 2.3rem; margin-bottom: .8rem; }
.hero p.lead { font-size: 1.1rem; color: var(--ink-2); }
.reg-chips { display: flex; gap: .4rem; flex-wrap: wrap; margin: 1rem 0 1.4rem; }
.auth { max-width: 520px; margin: 0 auto; }
@media (max-width: 800px) { .hero { grid-template-columns: 1fr; } }

/* ---------- cards & grid ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; box-shadow: var(--shadow); }
.card + .card { margin-top: 1rem; }
.card h2, .card h3 { margin-bottom: .6rem; }
.card .card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .6rem; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid-5 { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 760px) { .grid-2, .grid-3, .grid-5 { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 1rem; }

/* ---------- scores ---------- */
.score-card { display: flex; gap: .9rem; align-items: center; }
.score-card .ring { flex: 0 0 auto; }
.score-card .meta { min-width: 0; }
.score-card .meta .name { font-weight: 650; font-size: 1rem; }
.score-card .meta .note { font-size: .76rem; color: var(--ink-3); margin-top: .15rem; line-height: 1.3; }
.grid-5 .card { padding: .9rem 1rem; }
.ring { width: 64px; height: 64px; }
.ring text { font: 700 15px var(--font); fill: var(--ink); }
.ring .track { stroke: var(--line); }
.ring .bar { stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.tone-blue { color: var(--blue); } .tone-teal { color: var(--teal); } .tone-violet { color: var(--violet); } .tone-amber { color: var(--amber); } .tone-rose { color: var(--rose); }
.bar-meter { height: 8px; background: var(--muted-bg); border-radius: 4px; overflow: hidden; }
.bar-meter > span { display: block; height: 100%; background: currentColor; border-radius: 4px; }

/* ---------- badges ---------- */
.badge { display: inline-block; font-size: .74rem; font-weight: 600; padding: .14rem .5rem; border-radius: 999px; line-height: 1.4; white-space: nowrap; letter-spacing: .01em; }
.b-ok { background: var(--ok-bg); color: var(--ok); } .b-warn { background: var(--warn-bg); color: var(--warn); } .b-bad { background: var(--bad-bg); color: var(--bad); } .b-muted { background: var(--muted-bg); color: var(--ink-2); }
.b-reg { background: #eef2ff; color: #3730a3; }
.b-crit { background: #4c0519; color: #fff; } .b-high { background: var(--bad-bg); color: var(--bad); } .b-med { background: var(--warn-bg); color: var(--warn); } .b-low { background: var(--muted-bg); color: var(--ink-2); }
.sev { display: inline-flex; gap: 2px; vertical-align: middle; }
.sev i { width: 7px; height: 11px; background: var(--line-2); border-radius: 2px; display: inline-block; }
.sev i.on { background: var(--bad); }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
tr.clickable:hover td { background: #fafbfc; }
.table-wrap { overflow-x: auto; }

/* ---------- forms ---------- */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.field { margin-bottom: 1rem; }
.field .help { font-size: .82rem; color: var(--ink-3); margin-top: .25rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url], select, textarea {
  width: 100%; font: inherit; padding: .55rem .7rem; border: 1px solid var(--line-2); border-radius: 7px; background: #fff; color: var(--ink);
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(27,74,115,.25); border-color: var(--brand-2); }
.row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.row-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
@media (max-width: 700px) { .row, .row-3 { grid-template-columns: 1fr; } }
.choice { display: flex; gap: .4rem; flex-wrap: wrap; }
.choice label { font-weight: 500; display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--line-2); padding: .4rem .7rem; border-radius: 7px; cursor: pointer; background: #fff; margin: 0; }
.choice label:has(input:checked) { border-color: var(--brand-2); background: #eef3f8; }
.choice input { margin: 0; }
.check-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .35rem .9rem; }
.check-list label { font-weight: 500; display: flex; align-items: flex-start; gap: .5rem; margin: 0; padding: .3rem .4rem; border-radius: 6px; }
.check-list label:hover { background: #fafbfc; }
.check-list input { margin-top: .3rem; }
@media (max-width: 700px) { .check-list { grid-template-columns: 1fr; } }
.q { padding: .9rem 0; border-bottom: 1px solid var(--line); border-left: 0; border-right: 0; border-top: 0; margin: 0; min-width: 0; }
fieldset.q legend { padding: 0; float: left; width: 100%; }
fieldset.q legend + * { clear: both; }
.q:last-child { border-bottom: 0; }
.q .q-label { font-weight: 600; margin-bottom: .45rem; }
.q .q-key { font: .72rem var(--mono); color: var(--ink-3); }
.btn { display: inline-flex; align-items: center; gap: .4rem; font: 600 .9rem var(--font); padding: .55rem 1rem; border-radius: 7px; border: 1px solid var(--brand); background: var(--brand); color: #fff; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--brand-2); text-decoration: none; }
.btn.secondary { background: #fff; color: var(--brand); border-color: var(--line-2); }
.btn.secondary:hover { background: #f4f6f9; }
.btn.small { padding: .32rem .65rem; font-size: .8rem; }
.btn.danger { background: #fff; color: var(--bad); border-color: var(--line-2); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #1a1200; }
.inline-form { display: inline; }
.form-actions { display: flex; gap: .6rem; justify-content: space-between; align-items: center; margin-top: 1.2rem; flex-wrap: wrap; }

/* ---------- flashes ---------- */
.flash { padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .92rem; border: 1px solid; }
.flash.success { background: var(--ok-bg); color: var(--ok); border-color: #bfe5cf; }
.flash.error { background: var(--bad-bg); color: var(--bad); border-color: #f5c2bd; }
.flash.info { background: #e8f0fb; color: #1e3a8a; border-color: #c7d7f3; }

/* ---------- misc ---------- */
.steps { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.steps span { font-size: .78rem; padding: .25rem .6rem; border-radius: 999px; background: var(--muted-bg); color: var(--ink-2); }
.steps span.done { background: var(--ok-bg); color: var(--ok); }
.steps span.now { background: var(--brand); color: #fff; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; font-size: .92rem; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; }
.risk-list { list-style: none; margin: 0; padding: 0; }
.risk-list li { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: start; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.risk-list li:last-child { border-bottom: 0; }
.risk-list .t { font-weight: 600; }
.risk-list .s { font-size: .83rem; color: var(--ink-3); }
.notes li { margin-bottom: .45rem; }
.spark { width: 100%; height: 64px; }
.empty { padding: 2rem; text-align: center; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; flex-wrap: wrap; }
.tabs a { padding: .55rem .85rem; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs a.active { color: var(--brand); border-color: var(--brand); }
.tabs a:hover { text-decoration: none; color: var(--brand); }
.hint { border-left: 3px solid var(--accent); padding: .5rem .8rem; background: #fdf8ee; border-radius: 0 6px 6px 0; font-size: .9rem; }
.src { font-size: .75rem; color: var(--ink-3); }
.print-only { display: none; }
@media print {
  .side, .no-print { display: none !important; }
  .app { display: block; }
  .main { padding: 0; max-width: none; }
  .card { box-shadow: none; break-inside: avoid; }
  .print-only { display: block; }
  body { background: #fff; font-size: 12px; }
}

/* ---------- assistant pane ---------- */
/* Assistant: slim tab docked to the right edge; the pane slides in over the content */
:root { --asst-w: min(440px, 100vw); --asst-ease: 240ms cubic-bezier(.22,.61,.36,1); }
.asst-tab { position: fixed; right: 0; top: 50%; z-index: 70; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: .55rem; padding: .9rem .45rem .8rem; border: 1px solid var(--brand); border-right: 0; border-radius: 10px 0 0 10px; background: var(--brand); color: #fff; font: 600 .74rem/1 var(--font); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; box-shadow: -4px 0 16px rgba(15,42,68,.22); transition: transform var(--asst-ease), background .15s; }
.asst-tab:hover { background: var(--brand-2); }
.asst-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.asst-tab-label { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.asst-tab-chevron { width: 8px; height: 8px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform var(--asst-ease); opacity: .85; }
.asst-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }
body.asst-on .asst-tab { transform: translate(calc(-1 * var(--asst-w)), -50%); }
body.asst-on .asst-tab-chevron { transform: rotate(-135deg); }
.asst-pane { position: fixed; top: 0; right: 0; height: 100vh; width: var(--asst-w); z-index: 60; background: var(--surface); border-left: 1px solid var(--line); box-shadow: -8px 0 24px rgba(16,24,40,.12); display: flex; flex-direction: column; transform: translateX(100%); visibility: hidden; transition: transform var(--asst-ease), visibility 0s linear var(--asst-ease); }
.asst-pane.open { transform: none; visibility: visible; transition: transform var(--asst-ease), visibility 0s; }
.asst-lang-tag { font: 600 .72rem var(--font); letter-spacing: .05em; background: rgba(255,255,255,.14); color: #fff; border-radius: 6px; padding: .3rem .5rem; }
@media (prefers-reduced-motion: reduce) { .asst-tab, .asst-pane, .asst-tab-chevron { transition: none; } }
@media (max-width: 640px) { body.asst-on .asst-tab { transform: translate(-100vw, -50%); } }
.asst-head { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1rem; border-bottom: 1px solid var(--line); background: var(--brand); color: #fff; }
.asst-tools { display: flex; gap: .3rem; align-items: center; }
.asst-tools button { font: 600 .78rem var(--font); background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 6px; padding: .3rem .55rem; cursor: pointer; }
.asst-tools button.active { background: var(--accent); color: #1a1200; }
.asst-tools #asst-close { font-size: 1.1rem; line-height: 1; padding: .2rem .55rem; }
.asst-body { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; background: var(--bg); }
.asst-msg { max-width: 92%; padding: .6rem .8rem; border-radius: 12px; font-size: .9rem; line-height: 1.45; }
.asst-msg p { margin: 0 0 .5rem; } .asst-msg p:last-child { margin: 0; }
.asst-bot { background: var(--surface); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.asst-user { background: var(--brand); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.asst-sections { font-size: .86rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .5rem .8rem; }
.asst-sections summary { cursor: pointer; font-weight: 600; color: var(--brand); }
.asst-sections p { margin: .5rem 0 0; }
.asst-form { display: flex; gap: .4rem; padding: .7rem 1rem; border-top: 1px solid var(--line); }
.asst-form input { flex: 1; }
.asst-chips { display: flex; gap: .3rem; flex-wrap: wrap; padding: 0 1rem .8rem; }
.asst-chip { font: 500 .76rem var(--font); background: var(--muted-bg); border: 1px solid var(--line); color: var(--ink-2); border-radius: 999px; padding: .25rem .6rem; cursor: pointer; }
.asst-chip:hover { border-color: var(--brand-2); color: var(--brand); }
@media print { .asst-tab, .asst-pane { display: none !important; } }

/* ---------- landing hero (v8) ---------- */
.hero-brand { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 3rem; padding: 1rem 0 2rem; }
.hero-brand h1 { font-size: 2.6rem; line-height: 1.12; letter-spacing: -.02em; color: var(--brand); }
.hero-brand .lead { max-width: 34rem; }
.hero-regs { color: var(--ink-3); font-size: .95rem; letter-spacing: .01em; margin: .2rem 0 1.6rem; }
.hero-regs span { color: var(--accent); margin: 0 .35rem; }
.hero-art img { width: 100%; height: auto; display: block; max-width: 560px; margin-left: auto; }
.hero-steps { margin-top: 1rem; }
.hero-steps h3 { color: var(--brand); }
@media (max-width: 900px) { .hero-brand { grid-template-columns: 1fr; } .hero-art img { max-width: 380px; margin: 0 auto; } .hero-brand h1 { font-size: 2rem; } }
.public { background: #fff; }
.public main { background: #fff; }
.hero-steps { align-items: stretch; }
.grid > .card + .card { margin-top: 0; }
html, body { max-width: 100%; overflow-x: hidden; }
.app, .main { min-width: 0; }
.card { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 820px) {
  .side .brand small { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  td, th { white-space: normal !important; }
  .kv { grid-template-columns: 1fr; }
}

/* ---------- portfolio & org switcher (v2) ---------- */
.org-name { color: #9fb3c8; font-size: .78rem; margin-top: .45rem; }
.org-switch { margin-top: .5rem; }
.org-switch select { width: 100%; background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.15); border-radius: 6px; padding: .35rem .5rem; font-size: .82rem; }
.org-switch select option { color: var(--ink); }
.portfolio { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
.pf-card { display: flex; flex-direction: column; }
.pf-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.pf-name { font-weight: 650; font-size: 1.05rem; }
.pf-overall { text-align: center; }
.pf-delta { font-size: .72rem; color: var(--ink-3); } .pf-delta.up { color: var(--ok); } .pf-delta.down { color: var(--bad); }
.pf-regs { display: grid; grid-template-columns: repeat(5, 1fr); gap: .3rem; margin: .8rem 0 .6rem; }
.pf-reg { background: var(--muted-bg); border-radius: 6px; padding: .3rem .4rem; text-align: center; font-size: .78rem; display: flex; flex-direction: column; }
.pf-stats { display: flex; gap: .3rem; flex-wrap: wrap; }
.pf-moves { font-size: .84rem; margin-top: .5rem; }
@media (max-width: 820px) { .org-switch { margin: 0; flex: 1; } .side .brand-row { gap: .6rem; } .org-name { display: none; } }
form.readonly input, form.readonly select, form.readonly textarea { pointer-events: none; background: var(--muted-bg); color: var(--ink-2); }
.portfolio { align-items: stretch; }
.pf-card .actions { margin-top: auto !important; padding-top: .7rem; }

/* v2 / C: living posture */
.notice { padding: .7rem 1rem; border-radius: 8px; font-size: .92rem; border: 1px solid #c7d7f3; background: #e8f0fb; color: #1e3a8a; }
.notice.warn { background: var(--warn-bg, #fff6e5); color: #8a5a00; border-color: #f3dca6; }
.notice form input[type=text], .notice form input[type=date] { padding: .3rem .5rem; font-size: .85rem; }
.review-form { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.review-form input[type=text], .review-form input[type=date] { padding: .3rem .5rem; font-size: .85rem; }
.review-form input[type=text] { width: 10rem; }
.review-cell { min-width: 16rem; }
@media (max-width: 900px) {
  .review-form { flex-direction: column; align-items: stretch; }
  .review-form input[type=text] { width: auto; }
}
.table-wrap th { white-space: nowrap; }

/* v2 / D: dashboard polish */
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .6rem 1.4rem; }
.summary-sec h3 { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 .25rem; }
.summary-sec p { margin: 0; font-size: .95rem; }
@media (max-width: 820px) { .summary-grid { grid-template-columns: 1fr; } }
.delta { font-size: .72rem; font-weight: 600; margin-left: .2rem; padding: .05rem .35rem; border-radius: 999px; vertical-align: middle; }
.delta.up { background: var(--ok-bg); color: var(--ok); } .delta.down { background: var(--bad-bg); color: var(--bad); } .delta.flat { background: var(--muted-bg); color: var(--ink-3); }
svg.trend { width: 100%; height: auto; display: block; }
.bulk-bar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; padding: .6rem .9rem; margin-bottom: .8rem; position: sticky; top: .5rem; z-index: 5; }
.bulk-bar input, .bulk-bar select { padding: .3rem .5rem; font-size: .85rem; }
.board-group { margin-bottom: .8rem; }
.board-group .card-head h2 { display: flex; align-items: center; gap: .5rem; font-size: 1rem; }
.board-table td { padding: .4rem .5rem; font-size: .9rem; }
.src.overdue { color: var(--bad); font-weight: 600; }
.tabs .sep-v { display: inline-block; width: 1px; height: 1.2rem; background: var(--line); margin: 0 .4rem; vertical-align: middle; }
.start-card { position: relative; padding-top: 1.4rem; }
.start-card .start-n { position: absolute; top: -.7rem; left: 1rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.start-card h2 { font-size: 1.05rem; }
@media (max-width: 820px) { .start-grid { grid-template-columns: 1fr; } }
.bulk-bar input[type=date] { width: 10rem; }
.score-card .meta .name { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.lang-switch a { color: inherit; opacity: .6; } .lang-switch a.on { opacity: 1; font-weight: 700; text-decoration: none; }
/* v2 / E: Greek labels are longer */
.grid-5 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.score-card .meta .note { overflow-wrap: normal; hyphens: manual; }
.board-table td.who { overflow-wrap: normal; }
/* v2 / F: external AI markers and voice */
.asst-ext { display: block; margin-top: .35rem; font-size: .7rem; color: var(--ink-3); font-style: italic; }
.asst-speak { float: right; margin-left: .4rem; border: 0; background: transparent; cursor: pointer; font-size: .9rem; opacity: .7; }
.asst-speak:hover { opacity: 1; }
#asst-mic.rec { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }

/* Footer: attribution and standards alignment, deliberately quiet */
.site-foot { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .72rem; line-height: 1.5; color: var(--ink-3); display: flex; flex-direction: column; gap: .15rem; }
.site-foot a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.site-foot a:hover { color: var(--brand); }
body.public .site-foot { max-width: 1100px; margin: 3rem auto 0; padding: 1rem 1.5rem 2rem; }
@media print { .site-foot { margin-top: 2rem; font-size: 8pt; color: #555; } }
.nav-badge { display: inline-block; min-width: 1.3em; padding: 0 .4em; margin-left: .4em; border-radius: 999px; background: var(--accent); color: #1a1200; font: 700 .7rem/1.5 var(--font); text-align: center; vertical-align: middle; }
.radio-row { display: flex; gap: 1rem; flex-wrap: wrap; } .radio-row label { font-weight: 400; display: inline-flex; gap: .35rem; align-items: center; }
.legal h2 { margin-top: 1.4rem; } .legal p, .legal li { font-size: .95rem; }
.scope-result th { white-space: nowrap; width: 6rem; vertical-align: top; }
/* K: report header badge */
.report-badge { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; font-size: .85rem; color: var(--ink-2); margin: -.2rem 0 1rem; }
.report-badge .badge { font-size: .78rem; }
/* K: tables on small screens scroll sideways instead of squeezing columns to one character */
@media (max-width: 820px) {
  .card table:not(.pricing), .main > table:not(.pricing), .public table:not(.pricing):not(.scope-result) { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .card table:not(.pricing) th, .card table:not(.pricing) td, .public table:not(.pricing) th, .public table:not(.pricing) td { min-width: 8rem; max-width: 18rem; }
  .card table:not(.pricing) th, .public table:not(.pricing) th { white-space: nowrap !important; }
  .card table:not(.pricing)::after { content: '⟷'; display: block; text-align: right; color: var(--ink-3); font-size: .75rem; padding: .2rem .4rem 0; }
  .kv dt { min-width: 0; }
}
/* K: pricing as stacked cards on phones */
.btn-sm { font-size: .8rem; padding: .35rem .7rem; }
@media (max-width: 700px) {
  table.pricing, table.pricing tbody, table.pricing tr, table.pricing td { display: block; width: 100%; }
  table.pricing thead { display: none; }
  table.pricing tr { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .9rem; margin-bottom: .9rem; background: #fff; }
  table.pricing td { border: 0; padding: .3rem 0; min-width: 0; max-width: none; }
  table.pricing td::before { content: attr(data-label); display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); margin-bottom: .1rem; }
  table.pricing td:first-child::before { display: none; }
}
/* L: coverage split */
.cov-split > span { display: inline-block; margin-right: 1rem; }

/* ---------- dashboard overview (charts, drill-down, journey, modals) ---------- */
.ov { display: grid; gap: 1rem; margin-bottom: 1.6rem; }
.ov .card + .card { margin-top: 0; }
.ov-panel { min-width: 0; }
.ov-small { font-size: .8rem; }
.ov-note { margin: .8rem 0 0; padding-top: .7rem; border-top: 1px solid var(--line); font-size: .8rem; color: var(--ink-3); }
.ov-eyebrow { text-transform: uppercase; font-size: .7rem; letter-spacing: .08em; color: var(--ink-3); margin-bottom: .2rem; }
.ov-info { font-size: .82rem; text-decoration: underline; text-underline-offset: 3px; color: var(--ink-2); padding: .5rem 0; white-space: nowrap; }
.ov a:focus-visible, .ov button:focus-visible, .ov-dialog a:focus-visible, .ov-dialog button:focus-visible, a[data-ov-modal]:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.ov-section-h { margin: .4rem 0 .8rem; }
.ov-charts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1rem; }
.ov-coverage { display: flex; gap: 1.1rem; align-items: center; margin-bottom: .9rem; }
.ov-ring { flex: 0 0 auto; border-radius: 50%; display: block; line-height: 0; }
.ov-ring .ring { width: 128px; height: 128px; }
.ov-coverage-text { min-width: 0; flex: 1; }
.ov-coverage-lead { font-size: .88rem; color: var(--ink-2); margin-bottom: .4rem; }
.ov-basis { list-style: none; margin: 0 0 .3rem; padding: 0; display: grid; gap: .15rem; font-size: .86rem; }
.ov-basis li { display: flex; justify-content: space-between; gap: .8rem; }
.ov-basis strong { font-variant-numeric: tabular-nums; }
.ov-ok { background: var(--ok); } .ov-warn { background: var(--warn); } .ov-bad { background: var(--bad); } .ov-unknown { background: var(--ink-3); }
.ov-stack { display: flex; gap: 3px; height: 16px; border-radius: 5px; overflow: hidden; margin: .6rem 0; }
.ov-seg { display: block; min-width: 10px; }
.ov-seg:hover { opacity: .85; }
.ov-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .8rem; }
.ov-legend a { color: var(--ink); font-size: .84rem; min-height: 44px; display: flex; align-items: center; }
.ov-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: .5rem; flex: 0 0 auto; }
.ov-regs { display: grid; gap: 2px; }
.ov-reg, .ov-prio-bar { display: grid; grid-template-columns: minmax(5.5rem, 8.5rem) minmax(0, 1fr) 3.4rem; align-items: center; gap: .8rem; min-height: 44px; padding: .4rem .5rem; border-radius: 7px; color: var(--ink); }
.ov-reg:hover, .ov-prio-bar:hover { background: var(--muted-bg); text-decoration: none; }
.ov-reg-name { font-weight: 600; font-size: .92rem; }
.ov-reg-name small { display: block; font-weight: 500; font-size: .72rem; color: var(--ink-3); }
.ov-reg--module .ov-reg-name { padding-left: .9rem; font-weight: 500; }
.ov-track { height: 14px; background: var(--muted-bg); border-radius: 5px; overflow: hidden; }
.ov-track i { display: block; height: 100%; background: currentColor; border-radius: 5px; }
.ov-reg-val { text-align: right; font-variant-numeric: tabular-nums; font-size: .9rem; }
.ov-reg-val .muted { font-size: .72rem; font-weight: 500; }
.ov-drill-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; margin-bottom: .5rem; }
.ov-drill-head h2 { outline: none; }
.ov-back { min-height: 44px; white-space: nowrap; }
.ov-prio { list-style: none; margin: .4rem 0 0; padding: 0; }
.ov-prio li + li { border-top: 1px solid var(--line); }
.ov-prio-bar { grid-template-columns: minmax(0, 1.3fr) minmax(4rem, 1fr) 2.6rem; padding: .6rem .4rem; min-height: 56px; }
.ov-prio-text { display: grid; gap: .2rem; min-width: 0; }
.ov-prio-text strong { font-weight: 600; font-size: .9rem; }
.ov-journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .7rem; }
.ov-step { display: flex; flex-direction: column; gap: .2rem; height: 100%; padding: .85rem; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); min-height: 120px; }
.ov-step:hover { border-color: var(--accent); background: #fdf8ee; text-decoration: none; }
.ov-stepnum { font-size: .74rem; color: var(--ink-3); margin-bottom: .4rem; }
.ov-step b { font-size: .95rem; }
.ov-meter { margin-top: auto; height: 5px; background: var(--muted-bg); border-radius: 4px; overflow: hidden; display: block; }
.ov-meter i { display: block; height: 100%; background: var(--accent); }
.ov-moves { list-style: none; margin: 0; padding: 0; }
.ov-move { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; gap: .8rem; padding: .8rem 0; border-top: 1px solid var(--line); align-items: start; }
.ov-move:first-child { border-top: 0; }
.ov-move p { margin: .2rem 0 0; }
.ov-rank { background: var(--muted-bg); border-radius: 7px; text-align: center; padding: .25rem 0; color: var(--ink-2); font-weight: 600; }
.ov-move-title { font-weight: 600; display: inline-block; padding: .2rem 0; min-height: 32px; }
.ov-move-meta { text-align: right; font-size: .85rem; white-space: nowrap; }
.ov-bottom { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.ov-evidence { display: flex; gap: 1rem; align-items: center; }
.ov-evidence h3 { margin-bottom: .2rem; }
.ov-big { font-size: 2.4rem; font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ov-unavailable { margin-bottom: 1rem; }
.ov-dialog { width: min(640px, calc(100vw - 24px)); max-height: min(86vh, 900px); padding: 0; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--surface); box-shadow: 0 20px 70px rgba(9,34,61,.3); }
.ov-dialog::backdrop { background: rgba(9,34,61,.55); }
.ov-dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.1rem 1.2rem .8rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.ov-dialog-head h2 { margin: 0; font-size: 1.15rem; }
.ov-close { border: 0; background: var(--muted-bg); border-radius: 8px; min-width: 44px; min-height: 44px; font-size: 1rem; cursor: pointer; color: var(--ink); }
.ov-dialog-body { padding: 1rem 1.2rem; display: grid; gap: .6rem; }
.ov-dialog-body p { margin: 0; color: var(--ink-2); font-size: .92rem; }
.ov-dialog-body h3 { margin: .4rem 0 0; font-size: .95rem; }
.ov-dialog-body ul { margin: 0; padding-left: 1.2rem; font-size: .9rem; }
.ov-dialog-body li { margin-bottom: .3rem; }
.ov-row { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem .7rem; background: var(--bg); border-radius: 8px; font-size: .88rem; }
.ov-row span { color: var(--ink-2); }
.ov-row strong { text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.ov-banner { background: var(--warn-bg); color: #6b4a10; padding: .6rem .8rem; border-radius: 8px; font-size: .84rem; }
.ov-dialog-foot { display: flex; flex-wrap: wrap; gap: .5rem; padding: .9rem 1.2rem 1.1rem; border-top: 1px solid var(--line); }
.ov-dialog-foot .btn { min-height: 40px; }
@media (max-width: 1100px) { .ov-journey { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .ov-charts, .ov-bottom { grid-template-columns: 1fr; } }
.ov .card-head { flex-wrap: wrap; }
.ov-basis strong, .ov .card-head h2 { white-space: nowrap; }
@media (max-width: 560px) {
  .ov-journey { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov .card-head h2 { white-space: normal; }
  .ov-journey li:last-child { grid-column: 1 / -1; }
  .ov-coverage { gap: .8rem; flex-direction: column; align-items: flex-start; }
  .ov-ring { align-self: center; }
  .ov-ring .ring { width: 112px; height: 112px; }
  .ov-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-legend a { min-height: 36px; }
  .ov-reg { grid-template-columns: minmax(4.6rem, 6rem) minmax(0, 1fr) 3rem; gap: .5rem; }
  .ov-prio-bar { grid-template-columns: minmax(0, 1fr) 2.6rem; gap: .4rem .6rem; }
  .ov-prio-bar .ov-prio-text { grid-column: 1 / -1; }
  .ov-move { grid-template-columns: 1.8rem minmax(0, 1fr); }
  .ov-move-meta { grid-column: 2; text-align: left; white-space: normal; }
  .ov-row { flex-direction: column; gap: .15rem; }
  .ov-row strong { text-align: left; }
}
@media print { .ov-dialog { display: none !important; } }
/* N: quieter top actions, folded detail sections, info icon, phone ring block */
.top-actions { gap: 1.2rem; }
.ov-i { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--ink-3); color: var(--ink-3); font: 600 .72rem var(--font); text-decoration: none !important; }
.ov-i:hover { color: var(--brand-2); border-color: var(--brand-2); }
details.fold { margin-bottom: .5rem; }
details.fold > summary { list-style: none; cursor: pointer; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .9rem; font-weight: 600; font-size: .95rem; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .6rem; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: '▸'; color: var(--ink-3); font-size: .8rem; }
details.fold[open] > summary::before { content: '▾'; }
details.fold > summary .muted { font-weight: 400; font-size: .82rem; }
details.fold[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; margin-bottom: .6rem; }
.ov-section-h { margin-top: 1.4rem; }
@media (max-width: 700px) {
  .topbar .actions { width: 100%; }
  .asst-tab { padding: .4rem .3rem; font-size: .7rem; }
}
