/* SustainableNI — design system, matched to the original React app:
   Montserrat, teal-green brand, light left sidebar, white surfaces. */

@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/montserrat-400.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/montserrat-500.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/montserrat-600.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/montserrat-700.woff2") format("woff2"); }

:root {
  --brand: #50b899;          /* teal-green brand primary */
  --brand-dark: #3f9e82;
  --paper: #ffffff;          /* content background */
  --mist: #f9f8fc;           /* subtle surface / even rows / hover */
  --card: #ffffff;
  --ink: #003f49;            /* deep teal — primary text + headings */
  --ink-soft: #667085;       /* secondary text */
  --ink-faint: #888da3;      /* muted */
  --pine: #50b899;           /* kept name → now brand green (primary buttons) */
  --pine-2: #3f9e82;
  --sage: #50b899;
  --clay: #ec5962;           /* danger */
  --sun: #fc9432;            /* draft / warning accent */
  --sky: #53b4b5;            /* info / invited */
  --line: #dcdbe5;           /* borders */
  --line-strong: #ced2e4;    /* dividers */
  --ok: #3f9e82;             /* success text */
  --ok-bg: #e7f5ef;
  --warn-bg: #fff3e5;
  --err-bg: #fdeaec;
  --sidebar: 240px;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(0, 63, 73, 0.04);
  --sans: "Montserrat", Helvetica, Arial, sans-serif;
  --serif: "Montserrat", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

/* Visible keyboard focus for interactive elements (a11y). Mouse clicks keep the
   clean look via :focus-visible; only keyboard/AT focus draws the ring. */
a:focus-visible, .btn:focus-visible, .side-nav a:focus-visible, .q-nav-item:focus-visible,
summary:focus-visible, [data-segment-id]:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px;
}

/* Turbo's top loading bar, tinted to the brand so navigations show progress. */
.turbo-progress-bar { background: var(--brand); }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--sans); color: var(--ink); line-height: 1.25; margin: 0; }
h1 { font-size: 22px; font-weight: 600; margin: 0 0 4px; }
h2 { font-size: 18px; font-weight: 600; margin: 0 0 6px; }
h3 { font-size: 16px; font-weight: 600; }
b, strong { font-weight: 600; }
code { font-family: var(--mono); font-size: 0.86em; background: var(--mist); padding: 1px 5px; border-radius: 4px; }

/* ---- App shell: fixed left sidebar + main ---- */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; top: 0; left: 0; height: 100vh; width: var(--sidebar);
  background: var(--mist); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 22px 16px 18px; z-index: 10; overflow-y: auto;
}
.sidebar-logo { display: flex; justify-content: center; padding: 4px 8px 10px; }
.sidebar-logo img { max-width: 170px; height: auto; }
.side-nav { display: flex; flex-direction: column; gap: 6px; padding: 14px 0; }
.side-nav a {
  display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 400;
  color: var(--ink); padding: 9px 10px; border-radius: 6px; transition: background-color 0.1s ease;
}
.side-nav a img { width: 17px; height: 17px; opacity: 0.85; flex: none; }
.side-nav a:hover { background: #ebe9f1; }
.side-nav a.active { background: #ebe9f1; font-weight: 500; }
.side-recent { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 6px; }
.side-recent .t { font-size: 13px; font-weight: 600; padding: 4px 8px 8px; color: var(--ink-soft); }
.side-recent a { display: block; font-size: 13px; color: var(--ink-soft); padding: 5px 8px; border-radius: 6px; }
.side-recent a:hover { background: #ebe9f1; color: var(--ink); }
.side-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.side-user { font-size: 13px; font-weight: 600; padding: 0 4px 8px; }
.side-user span { color: var(--ink-faint); font-weight: 400; display: block; font-size: 11px; }
.side-signout { width: 100%; }
.side-copy { color: var(--ink-faint); font-size: 10px; padding-top: 12px; }

.main { margin-left: var(--sidebar); padding: 30px 34px 70px; max-width: 1280px; }
@media (max-width: 820px) {
  .sidebar { position: static; width: 100%; height: auto; flex-direction: column; }
  .main { margin-left: 0; padding: 22px; }
}

/* ---- Flash ---- */
.flash { padding: 11px 16px; border-radius: 8px; margin: 0 0 18px; font-size: 14px; font-weight: 500; }
.flash-notice { background: var(--ok-bg); color: var(--ok); border: 1px solid #bfe6d6; }
.flash-alert { background: var(--err-bg); color: #b82921; border: 1px solid #f4c6cb; }

/* ---- Cards & tables ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card + .card { margin-top: 18px; }
.muted { color: var(--ink-soft); }
.stack > * + * { margin-top: 14px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .sub { color: var(--ink-soft); margin: 0; font-size: 14px; }

table.grid { width: 100%; border-collapse: collapse; background: var(--card); }
table.grid th { text-align: left; font-weight: 600; font-size: 13px; color: var(--ink); padding: 13px 12px; border-bottom: 1px solid var(--line); }
table.grid td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14px; font-weight: 500; letter-spacing: -0.2px; }
table.grid th:first-child, table.grid td:first-child { padding-left: 16px; }
table.grid .nowrap { white-space: nowrap; }
/* Real-data columns are wide (long council names, emails). Below this width,
   nice-to-have columns step aside so the table fits without sideways clipping
   inside .grid-wrap; the wrap's overflow-x stays as the escape hatch. */
@media (max-width: 1440px) { table.grid .col-roomy { display: none; } }
table.grid tr:nth-of-type(even) td { background: var(--mist); }
table.grid tr:hover td { background: rgba(194, 198, 217, 0.18); }
table.grid tr:last-child td { border-bottom: 0; }
.grid-wrap { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; overflow-x: auto; }
/* When a table wrapper sits inside a card, let the wrapper be the visible border. */
.card:has(> .grid-wrap) { border: 0; padding: 0; background: transparent; }
/* Row-action buttons share a width so each table's action column lines up as a
   tidy grid rather than ragged widths. Right-aligned so they meet the edge.
   The <td> must STAY a table cell — the generic .actions class sets display:flex,
   which breaks row height/striping on a td — so lay the buttons out inline. */
table.grid td.actions { display: table-cell; text-align: right; }
table.grid td.actions form { display: inline-block; }
table.grid td.actions .btn { min-width: 94px; margin: 2px 0 2px 6px; }

/* An impact level as a swatch + label chip (the report legend's idiom) —
   readable for every level, unlike white text on the light yellow/grey fills. */
.impact-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--mist); border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 12px 4px 7px; font-size: 12px; font-weight: 600; color: var(--ink);
  white-space: nowrap;
}
.impact-chip .swatch { width: 12px; height: 12px; border-radius: 4px; flex: none; }

/* ---- Buttons: white/outline default, brand-green primary ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 500; font-size: 15px; padding: 9px 24px; border-radius: 8px;
  border: 1px solid var(--brand); background: var(--brand); color: #fff; cursor: pointer;
  line-height: 1.3; transition: filter 0.1s ease; text-align: center;
}
.btn:hover { filter: brightness(95%); }
.btn.secondary { background: #fff; color: var(--ink); border-color: #e5e4eb; }
.btn.secondary:hover { filter: brightness(97%); background: var(--mist); }
.btn.danger { background: var(--clay); border-color: var(--clay); color: #fff; }
.btn.small { padding: 5px 12px; font-size: 12px; border-radius: 4px; }
.btn[disabled], .btn:disabled { background: var(--ink-faint); border-color: var(--ink-faint); color: #f4f5f8; opacity: 0.5; cursor: not-allowed; }

/* ---- Forms ---- */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 500; font-size: 15px; margin-bottom: 6px; color: var(--ink); }
.field .hint { font-size: 13px; color: var(--ink-soft); margin-top: 5px; }
input[type=text], input[type=email], input[type=search], input[type=password], input[type=date], select, textarea {
  width: 100%; font: inherit; font-weight: 500; font-size: 14px; padding: 12px 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--ink);
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 1px solid var(--brand); border-color: var(--brand); }
input::placeholder, textarea::placeholder { color: rgba(17, 27, 71, 0.35); }
input:disabled, select:disabled { color: #888da3; background: #f4f5f8; cursor: not-allowed; }
.errors { background: var(--err-bg); color: #b82921; border: 1px solid #f4c6cb; border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; font-size: 14px; }
.errors ul { margin: 4px 0 0; padding-left: 18px; }

/* ---- Pills / badges ---- */
.badge { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; padding: 3px 10px; border-radius: 999px; background: var(--mist); color: var(--ink-soft); border: 1px solid var(--line); }
.badge.draft { background: var(--warn-bg); color: #c26a12; border-color: #f6d9b4; }
.badge.completed, .badge.active { background: var(--ok-bg); color: var(--ok); border-color: #bfe6d6; }
.badge.invited { background: #e7f2f2; color: #2f7f80; border-color: #c2e0e0; }
.badge.revoked, .badge.removed { background: var(--err-bg); color: #b82921; border-color: #f4c6cb; }

/* ---- Centered auth layout ---- */
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--mist); }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 34px 32px; width: 100%; max-width: 420px; box-shadow: 0 8px 30px rgba(0, 63, 73, 0.08); }
.auth-logo { display: flex; justify-content: center; margin-bottom: 18px; }
.auth-logo img { max-width: 180px; }
.auth-card h1 { font-size: 22px; }
.auth-card .lede { color: var(--ink-soft); font-size: 14px; margin: 0 0 20px; }

/* ---- Metric tiles ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 26px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.tile .label { font-size: 13px; color: var(--ink-soft); font-weight: 500; }
.tile .value { font-size: 32px; font-weight: 600; color: var(--ink); margin: 6px 0 2px; }
.tile .delta { font-size: 12.5px; font-weight: 600; }
.tile .delta.up { color: var(--ok); }
.tile .delta.down { color: var(--clay); }
.tile .delta.flat { color: var(--ink-faint); }

/* ---- Avatars ---- */
.avatar { border-radius: 50%; object-fit: cover; flex: none; vertical-align: middle; }
.avatar-initials { display: inline-grid; place-items: center; background: var(--ok-bg); color: var(--brand-dark); font-weight: 600; letter-spacing: 0.02em; }
.name-cell { display: inline-flex; align-items: center; gap: 10px; }
.profile-photo { display: flex; align-items: center; gap: 14px; }
.profile-photo .avatar { width: 56px; height: 56px; font-size: 22px; }

.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 18px; }
.toolbar .field { margin-bottom: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.empty { text-align: center; color: var(--ink-faint); padding: 40px 20px; }

/* ---- Pagination bar (page-size + prev/next) ---- */
.pagination-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.page-size { font-size: 13px; }
.page-size a { display: inline-block; padding: 2px 8px; border-radius: 6px; color: var(--ink-soft); }
.page-size a:hover { background: var(--mist); color: var(--ink); }
.page-size a.active { background: var(--brand); color: #fff; font-weight: 600; }
@media (max-width: 560px) { .pagination-bar { justify-content: center; } }

/* ---- Read-only detail pages (organisation account) ---- */
.org-logo { max-height: 96px; max-width: 200px; border-radius: 8px; margin-bottom: 16px; display: block; }
.detail-list { margin: 0; }
.detail-list > div {
  display: grid; grid-template-columns: 220px 1fr; gap: 16px;
  padding: 13px 0; border-bottom: 1px solid var(--line); align-items: baseline;
}
.detail-list > div:first-child { padding-top: 0; }
.detail-list > div:last-child { border-bottom: 0; padding-bottom: 0; }
.detail-list dt { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.detail-list dd { margin: 0; font-size: 14px; }
.detail-list dd a { color: var(--brand-dark); }
@media (max-width: 560px) { .detail-list > div { grid-template-columns: 1fr; gap: 2px; } }

/* ---- Glossary terms — the original's rhythm: teal term, muted indented body ---- */
dl.terms { margin: 0; max-width: 76ch; }
dl.terms dt { font-weight: 600; font-size: 14px; color: var(--ink); }
dl.terms div + div dt { margin-top: 16px; }
dl.terms dd { margin: 3px 0 0 10px; color: var(--ink-soft); font-weight: 400; font-size: 14px; }
dl.terms dd p { margin: 0 0 6px; }
dl.terms dd p:last-child { margin-bottom: 0; }

/* ---- Questionnaire (step two) ---- */
.q-layout { display: grid; grid-template-columns: 260px 1fr; gap: 26px; align-items: start; }
@media (max-width: 820px) { .q-layout { grid-template-columns: 1fr; } }
.q-sidebar { position: sticky; top: 20px; background: var(--mist); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.progress-track { height: 8px; background: #e5e4eb; border-radius: 4px; overflow: hidden; margin: 10px 0 4px; }
.progress-fill { height: 100%; background: var(--brand); transition: width 0.25s ease; }
.q-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; }
.q-nav-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 6px; color: var(--ink-soft); font-size: 14px; }
.q-nav-item:hover { background: #ebe9f1; }
.q-nav-item.active { background: var(--brand); color: #fff; }
.q-status { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; font-size: 12px; flex: none; }
.q-status.q-complete { background: var(--ok-bg); color: var(--ok); }
.q-status.q-in_progress { background: var(--warn-bg); color: var(--sun); }
.q-status.q-incomplete { background: #e5e4eb; color: var(--ink-faint); }
.q-nav-item.active .q-status { background: rgba(255,255,255,0.25); color: #fff; }
.q-question { margin-bottom: 16px; }
.q-title { font-weight: 600; font-size: 16px; margin-bottom: 6px; color: var(--ink); }
.q-subtitle { color: var(--ink-soft); font-size: 14px; margin-bottom: 10px; }
.q-subtitle a, .q-tip a { color: var(--brand-dark); }
.q-tip { margin: 6px 0 12px; }
.q-tip summary { cursor: pointer; color: var(--brand-dark); font-weight: 600; font-size: 13px; }
.q-tip > div { margin-top: 8px; font-size: 13.5px; color: var(--ink-soft); background: var(--mist); padding: 10px 14px; border-radius: 8px; }
.q-tip ul { margin: 4px 0; padding-left: 18px; list-style: circle; }
.q-tip li { margin-bottom: 6px; }
.q-answers { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.q-answer { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.q-answer:hover { border-color: var(--brand); }
.q-answer input { margin-top: 3px; flex: none; accent-color: var(--brand); }
.q-letter { font-weight: 600; color: var(--brand-dark); }

/* Two-column field grid for the new-assessment Per-Forma block (ASM-9). */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }
.word-count { font-size: 12px; color: var(--ink-faint); }
.word-count.over { color: var(--clay); font-weight: 600; }

/* ASM-11 reasoning field */
.q-reasoning { margin-top: 12px; }
.q-reasoning label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.q-reasoning textarea { min-height: 72px; }

/* ASM-12 questionnaire image gallery */
.q-images { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.q-images-title { font-size: 13px; font-weight: 600; }
.q-images-alert { color: #b82921; font-size: 12px; margin: 6px 0 0; }
.q-images-empty { font-size: 13px; margin: 6px 0 0; }
.q-images-grid { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.q-image { width: 156px; }
.q-image-thumb img { width: 156px; height: 112px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }
.q-image-controls { display: flex; gap: 4px; margin-top: 5px; }
.icon-btn { width: 26px; height: 26px; border: 1px solid var(--line); background: var(--card); border-radius: 5px; cursor: pointer; font-size: 13px; line-height: 1; color: var(--ink-soft); }
.icon-btn:hover { border-color: var(--brand); color: var(--ink); }
.icon-btn.danger:hover { border-color: var(--clay); color: var(--clay); }
.q-image-caption { width: 100%; margin-top: 5px; font-size: 12px; padding: 5px 7px; }
.q-image-caption-static { font-size: 12px; margin: 5px 0 0; color: var(--ink-soft); }
.q-image-add { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.q-image-add input[type=file] { font-size: 12px; }
.q-image-add .q-image-caption { width: auto; flex: 1; min-width: 140px; margin-top: 0; }
.q-status.q-summary { color: var(--brand-dark); }

/* ---- Report ---- */
.report-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.report-logo { max-height: 64px; max-width: 160px; border-radius: 8px; }
.ring-wrap { display: flex; gap: 34px; flex-wrap: wrap; align-items: center; }
.legend { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.legend div { display: inline-flex; align-items: center; background: var(--mist); border-radius: 9px; padding: 4px 12px; }
.legend .swatch { display: inline-block; width: 16px; height: 16px; border-radius: 4px; margin-right: 10px; }

/* ---- Report document (RPT-10): mirrors the Ideal Report; shared with the PDF ---- */
:root { --doc-tint: #b3dccd; --doc-tint-soft: #d7eee6; }
.report-doc { max-width: 860px; margin: 0 auto; }
.doc-cover { position: relative; text-align: center; padding-bottom: 6px; }
.doc-logo { position: absolute; top: 0; right: 0; max-height: 66px; max-width: 170px; }
.doc-title { font-size: 26px; font-weight: 700; color: var(--brand-dark); margin: 6px 0 10px; text-align: center; }
.doc-context { color: var(--ink); margin: 0 auto 22px; max-width: 60ch; }
.doc-project { background: var(--doc-tint); border-radius: 22px; padding: 22px 26px; text-align: left; margin: 0 0 8px; }
.doc-project h2 { color: var(--ink); font-size: 20px; margin: 0 0 10px; }
.doc-project p { margin: 0 0 12px; color: var(--ink); }
.doc-project .doc-overview p:last-child { margin-bottom: 12px; }
.doc-performa { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 24px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid rgba(0,63,73,0.18); }
.doc-performa > div { display: flex; gap: 8px; font-size: 13.5px; }
.doc-performa dt { font-weight: 600; margin: 0; min-width: 120px; color: var(--ink); }
.doc-performa dd { margin: 0; color: var(--ink); }

.doc-section { margin: 26px 0 0; }
.doc-section-head { color: var(--brand-dark); font-size: 19px; font-weight: 700; text-transform: uppercase; margin: 0 0 12px; letter-spacing: 0.2px; }
.doc-section-num { margin-right: 4px; }

.doc-q { margin: 0 0 22px; break-inside: avoid; }
.doc-q-pill { background: var(--doc-tint); border-radius: 16px; padding: 12px 18px; font-weight: 600; color: var(--ink); }
.doc-q-pill b { font-weight: 700; }
.doc-q-prefix { font-weight: 700; }
.doc-answers { margin: 10px 0 0; padding: 0 4px; }
.doc-answer { display: inline; color: var(--ink); }
.doc-answer + .doc-answer::before { content: ", "; }
.doc-answer-letter { color: var(--brand-dark); font-weight: 700; }
.doc-reasoning { margin: 8px 0 0; padding: 0 4px; color: var(--ink); }
.doc-reasoning-label { color: var(--brand-dark); font-weight: 700; }

.doc-images { display: flex; gap: 12px; margin: 12px 4px 4px; }
.doc-images .doc-image { position: relative; flex: 1 1 0; height: 200px; }
.doc-images.count-1 { justify-content: center; }
.doc-images.count-1 .doc-image { flex: 0 0 62%; max-width: 62%; }
.doc-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; display: block; }
.doc-image figcaption { position: absolute; left: 8px; top: 8px; background: rgba(15,32,36,0.82); color: #fff; font-weight: 600; font-size: 12px; line-height: 1.3; padding: 4px 9px; border-radius: 6px; max-width: calc(100% - 16px); }

.doc-summary { margin: 30px 0 0; }
.doc-summary p { color: var(--ink); margin: 0 0 12px; }
.doc-results { margin: 24px 0 0; }
.doc-results-grid { display: flex; gap: 30px; flex-wrap: wrap; align-items: center; }
.doc-wheel { flex: 1 1 320px; max-width: 460px; }
.doc-results-side { flex: 1 1 220px; }
.doc-general-result { margin-bottom: 16px; }
.doc-gr-label, .doc-key-label { display: block; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.doc-key-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; padding: 3px 0; }
.doc-key-row .swatch { width: 15px; height: 15px; border-radius: 4px; flex: none; }
@media (max-width: 640px) { .doc-performa { grid-template-columns: 1fr; } }

/* Bespoke impact-by-section chart (ported SVG). */
.report-chart { max-width: 440px; width: 100%; height: auto; }
.report-chart [data-segment-id] { cursor: pointer; transition: opacity 0.12s ease; }
.report-chart [data-segment-id]:hover { opacity: 0.85; }
.report-chart .cls-1 { fill: #e57064; }
.report-chart .cls-2 { fill: #ffc558; }
.report-chart .cls-3 { fill: #e8e8e8; }
.report-chart .cls-4 { fill: #53b4b5; }
.report-chart .cls-5 { fill: #92c669; }
.report-chart .cls-6 { fill: #6b6e72; }
.report-chart .cls-10 { fill: #fff; }
.report-chart .cls-11 { opacity: 0.4; }
.report-chart .cls-13 { fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px; }
.tips-group { margin-top: 14px; }
.tips-group h3 { font-size: 16px; margin-bottom: 6px; }
.tip-item { border-left: 3px solid var(--clay); padding: 4px 0 4px 14px; margin: 10px 0; }
.tip-item summary { cursor: pointer; font-weight: 600; }
.tip-item .tip-body { margin-top: 8px; font-size: 13.5px; color: var(--ink-soft); }
.tip-item .tip-body ul { list-style: circle; padding-left: 18px; }
dialog.segment { border: none; border-radius: 12px; max-width: 560px; width: 92%; padding: 0; box-shadow: 0 20px 60px rgba(0,63,73,0.25); }
dialog.segment::backdrop { background: rgba(0,63,73,0.4); }
dialog.segment .seg-head { padding: 16px 20px; color: #fff; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
dialog.segment .seg-body { padding: 16px 20px; max-height: 60vh; overflow-y: auto; background: var(--card); color: var(--ink); }
dialog.segment .seg-body .q { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
