/* Compliance ONE design system: every value comes from tokens.css. The short
 * names below are the app's own roles, mapped onto those tokens. */
:root {
  --bg: var(--c1-bg);
  --surface: var(--c1-white);
  --surface-2: var(--c1-bg-soft);
  --border: var(--c1-border);
  --text: var(--c1-fg-1);
  --muted: var(--c1-fg-2);
  --accent: var(--c1-blue);
  --accent-soft: var(--c1-tint-info);
  --side: var(--c1-navy);
  --side-text: rgba(255, 255, 255, .72);
  --ok: var(--c1-on-low);
  --ok-soft: var(--c1-tint-low);
  --warn: var(--c1-on-med);
  --warn-soft: var(--c1-tint-med);
  --bad: var(--c1-on-high);
  --bad-soft: var(--c1-tint-high);
  --gray-soft: var(--c1-bg-soft);
  --crit: var(--c1-red);
  --radius: var(--c1-radius-xl);
  --shadow: none;
  font-family: var(--c1-font-sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: var(--accent); text-decoration: none; transition: color var(--c1-ease-out); }
a:hover { color: var(--c1-blue-deep); }
h1, h2, h3 { margin: 0; }
/* Page titles: Montserrat ALL CAPS, regular weight (the system's display style). */
h1 { font-size: clamp(24px, 2.6vw, 34px); font-weight: var(--c1-w-regular); text-transform: uppercase; letter-spacing: var(--c1-letter-tight); line-height: 1.15; }
h2 { font-size: var(--c1-text-h3); font-weight: var(--c1-w-bold); }
h3 { font-size: var(--c1-text-h4); font-weight: var(--c1-w-semibold); }
p { margin: 0; }
.muted { color: var(--muted); }
.mono { font-family: var(--c1-font-mono); font-size: 12px; }
.small { font-size: 12px; }

/* ------------------------------------------------------------ layout */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.sidebar { background: var(--side); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; box-shadow: var(--c1-shadow-rail); }
.brand { display: flex; gap: 10px; align-items: center; padding: 22px 20px 18px; }
.brand-logo { width: 54px; height: 36px; flex: none; display: grid; place-items: center; padding: 5px 6px; background: var(--c1-white); border-radius: var(--c1-radius-lg); }
.brand-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand-word { display: block; color: var(--c1-white); font-size: 16px; font-weight: var(--c1-w-bold); letter-spacing: -.2px; white-space: nowrap; }
.brand-word em { font-style: normal; font-weight: var(--c1-w-semibold); color: var(--c1-seg-sky); margin-left: 3px; }
.brand small { display: block; font-size: var(--c1-text-small); color: var(--side-text); margin-top: 1px; }
#nav { flex: 1; overflow-y: auto; padding: 6px 12px; }
.nav-label { font-size: var(--c1-text-small); font-weight: var(--c1-w-semibold); text-transform: uppercase; letter-spacing: var(--c1-letter-eyebrow); color: var(--c1-fg-3); margin: 18px 10px 6px; }
#nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--c1-radius-lg); color: var(--side-text); font-size: 13px; font-weight: var(--c1-w-medium); transition: background var(--c1-ease-out), color var(--c1-ease-out); }
#nav a:hover { background: rgba(255, 255, 255, .06); color: var(--c1-white); }
#nav a.active { background: var(--c1-blue); color: var(--c1-white); }
#nav a b { margin-left: auto; background: var(--c1-red); color: var(--c1-white); font-size: 11px; font-weight: var(--c1-w-bold); border-radius: var(--c1-radius-full); padding: 1px 7px; }
.ico { display: inline-flex; opacity: .9; }
.sidebar-foot { padding: 14px 20px 18px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 12px; }
.sidebar-foot label { display: block; color: var(--side-text); margin-bottom: 4px; }
.sidebar-foot input { width: 100%; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); color: var(--c1-white); border-radius: var(--c1-radius-md); padding: 6px 8px; font: inherit; }
.version { margin-top: 10px; color: var(--c1-fg-3); font-size: var(--c1-text-small); }
.main { min-width: 0; padding: var(--c1-space-4) var(--c1-space-4) var(--c1-space-4) var(--c1-space-5); }
/* Signature shell: white slab with asymmetric 40/45 corners on the app background. */
.content { background: var(--surface); border-radius: var(--c1-radius-panel); box-shadow: var(--c1-shadow-panel); min-height: calc(100vh - 32px); padding: 34px 40px 60px; }
.loading, .empty { padding: 40px; text-align: center; color: var(--muted); }

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: var(--c1-letter-eyebrow); color: var(--accent); font-weight: var(--c1-w-semibold); margin-bottom: 6px; }
.page-head p { color: var(--muted); margin-top: 8px; max-width: 760px; }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ------------------------------------------------------------ surfaces */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); gap: 12px; }
.card-body { padding: 16px 18px; }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.kpi { padding: 16px 18px; }
.kpi .label { color: var(--muted); font-size: 12px; font-weight: var(--c1-w-medium); }
.kpi .value { font-size: var(--c1-text-h2); font-weight: var(--c1-w-bold); margin-top: 4px; }
.kpi .hint { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.bad .value { color: var(--bad); }
.kpi.warn .value { color: var(--warn); }
.kpi.ok .value { color: var(--ok); }

/* ------------------------------------------------------------ controls */
button, .btn { font: inherit; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 8px 14px; border-radius: var(--c1-radius-lg); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: var(--c1-w-semibold); letter-spacing: .1px; white-space: nowrap; transition: background var(--c1-ease-out), border-color var(--c1-ease-out), color var(--c1-ease-out); }
button:hover, .btn:hover { background: var(--surface-2); }
button:focus-visible, .btn:focus-visible { outline: none; box-shadow: var(--c1-shadow-focus); }
button.primary, .btn.primary { background: var(--c1-blue); border-color: var(--c1-blue); color: var(--c1-fg-on-blue); }
button.primary:hover, .btn.primary:hover { background: var(--c1-blue-deep); border-color: var(--c1-blue-deep); }
button.primary:active, .btn.primary:active { background: var(--c1-blue-press); }
button.danger { color: var(--bad); }
button.ghost { border-color: transparent; background: transparent; color: var(--muted); }
button.ghost:hover { background: rgba(50, 94, 168, .08); color: var(--accent); }
button.sm { padding: 4px 10px; font-size: 12px; }
button:disabled { opacity: .4; cursor: default; }
input, select, textarea { font: inherit; color: var(--text); border: 1px solid var(--border); border-radius: var(--c1-radius-lg); padding: 8px 12px; background: var(--surface); width: 100%; transition: border-color var(--c1-ease-out), box-shadow var(--c1-ease-out); }
input::placeholder, textarea::placeholder { color: var(--c1-fg-4); }
textarea { resize: vertical; min-height: 70px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--c1-shadow-focus); }
select.inline { width: auto; padding: 3px 6px; font-size: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 12px; font-weight: var(--c1-w-semibold); color: var(--muted); }
.field .help { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.check input { width: auto; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input[type=search] { max-width: 280px; }
.toolbar select { width: auto; }

/* ------------------------------------------------------------ pills */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: var(--c1-radius-full); font-size: 11.5px; font-weight: var(--c1-w-semibold); background: var(--gray-soft); color: var(--muted); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.nodot::before { display: none; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.crit { background: var(--c1-red); color: var(--c1-white); }
.pill.info { background: var(--c1-tint-info); color: var(--c1-on-info); }
.chip { display: inline-block; padding: 1px 7px; border-radius: var(--c1-radius-sm); background: var(--gray-soft); font-size: 11.5px; margin: 1px 3px 1px 0; color: var(--text); }
a.chip:hover { background: var(--accent-soft); }

/* ------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: var(--c1-w-semibold); padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--surface-2); }
tr:last-child td { border-bottom: none; }
td .title { font-weight: var(--c1-w-semibold); }
td .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.overdue { color: var(--bad); font-weight: 600; }

/* ------------------------------------------------------------ gap analysis */
.clause { margin-bottom: 14px; }
.clause-head { display: flex; align-items: center; gap: 14px; padding: 12px 18px; cursor: pointer; user-select: none; }
.clause-head .num { font-weight: 700; color: var(--accent); width: 40px; }
.clause-head .name { font-weight: 600; flex: 1; }
.clause-head .caret { color: var(--muted); display: inline-flex; transition: transform var(--c1-ease-move); }
.clause.collapsed .caret { transform: rotate(-90deg); }
.clause.collapsed .clause-body { display: none; }
.clause-body { border-top: 1px solid var(--border); }
.req-row { display: grid; grid-template-columns: 70px 1fr 150px 190px 70px; gap: 12px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--border); cursor: pointer; }
.req-row:last-child { border-bottom: none; }
.req-row:hover { background: var(--surface-2); }
.req-row.sub-heading { background: var(--surface-2); cursor: default; font-weight: 600; font-size: 12.5px; color: var(--muted); grid-template-columns: 70px 1fr auto; padding: 7px 18px; }
.req-row .code { font-weight: var(--c1-w-semibold); font-family: var(--c1-font-mono); font-size: 12.5px; }
.req-row .ev { text-align: right; font-size: 12px; color: var(--muted); }
.req-row.na { opacity: .6; }
.req-row .controls-cell { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bar { height: 7px; background: var(--gray-soft); border-radius: 5px; overflow: hidden; display: flex; }
.bar > i { display: block; height: 100%; }
.bar .c-ok { background: var(--c1-success); }
.bar .c-warn { background: var(--c1-yellow); }
.bar .c-bad { background: var(--c1-red); }
.clause-bar { width: 180px; }
.pct { font-weight: 700; width: 52px; text-align: right; }

.ring { position: relative; width: 132px; height: 132px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-label { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .ring-label strong { font-size: 28px; display: block; }
.ring .ring-label span { font-size: 11px; color: var(--muted); }
.program-hero { display: flex; gap: 26px; align-items: center; padding: 20px 22px; }
.program-hero .meta { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.program-hero .meta div span { display: block; font-size: 12px; color: var(--muted); }
.program-hero .meta div strong { font-size: 15px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ------------------------------------------------------------ heatmap */
.heatmap { display: grid; grid-template-columns: 26px repeat(5, 1fr); gap: 4px; font-size: 12px; }
.heatmap .cell { aspect-ratio: 1.6; border-radius: var(--c1-radius-md); display: grid; place-items: center; font-weight: var(--c1-w-bold); color: var(--c1-fg-1); }
.heatmap .axis { display: grid; place-items: center; color: var(--muted); font-size: 11px; }
.lvl-LOW { background: var(--c1-tint-low); }
.lvl-MEDIUM { background: var(--c1-tint-med); }
.lvl-HIGH { background: var(--c1-tint-high); }
.lvl-CRITICAL { background: var(--c1-red); }
.heatmap .cell.lvl-CRITICAL:not(.zero) { color: var(--c1-white); }
.heatmap .cell.zero { color: transparent; }

/* ------------------------------------------------------------ lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.list li:last-child { border-bottom: none; }

/* ------------------------------------------------------------ drawer & modal */
.drawer, .modal { position: fixed; inset: 0; background: var(--c1-scrim); display: none; z-index: 20; }
.drawer.open, .modal.open { display: block; }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(620px, 100vw); background: var(--surface); box-shadow: var(--c1-shadow-lg); overflow-y: auto; }
.modal.open { display: grid; place-items: center; padding: 20px; }
.modal-panel { width: min(720px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; background: var(--surface); border-radius: var(--c1-radius-xl); box-shadow: var(--c1-shadow-lg); }
.panel-head { position: sticky; top: 0; background: var(--surface); padding: 18px 22px 14px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; z-index: 1; }
.panel-body { padding: 18px 22px; display: flex; flex-direction: column; gap: 16px; }
.panel-foot { position: sticky; bottom: 0; background: var(--surface); padding: 12px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
.close-x { border: none; background: none; color: var(--muted); padding: 6px; border-radius: var(--c1-radius-lg); }
.close-x:hover { background: rgba(50, 94, 168, .08); color: var(--accent); }
.info-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--c1-radius-lg); padding: 12px 14px; font-size: 13px; line-height: 1.5; }
.info-box.hint { background: var(--warn-soft); border-color: var(--c1-yellow); }
.info-box h3 { font-size: 11px; text-transform: uppercase; letter-spacing: var(--c1-letter-eyebrow); color: var(--muted); margin-bottom: 6px; }
.info-box ul { margin: 0; padding-left: 18px; }
.segmented { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.segmented label { flex: 1; text-align: center; padding: 7px 4px; cursor: pointer; font-size: 12.5px; font-weight: 600; border-right: 1px solid var(--border); color: var(--muted); }
.segmented label:last-child { border-right: none; }
.segmented input { display: none; }
.segmented label:has(input:checked) { background: var(--c1-blue); color: var(--c1-white); }

.picklist { border: 1px solid var(--border); border-radius: 8px; }
.picklist .pick-filter { border: none; border-bottom: 1px solid var(--border); border-radius: 8px 8px 0 0; }
.pick-items { max-height: 190px; overflow-y: auto; padding: 4px 0; }
.pick-item { display: flex; gap: 8px; padding: 5px 10px; font-size: 12.5px; cursor: pointer; align-items: flex-start; }
.pick-item:hover { background: var(--surface-2); }
.pick-item input { width: auto; margin-top: 2px; }

.toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 40; }
.toast { background: var(--side); color: var(--c1-white); padding: 10px 14px; border-radius: var(--c1-radius-lg); box-shadow: var(--c1-shadow-md); max-width: 420px; font-size: 13px; }
.toast.error { background: var(--c1-red-deep); }

.clickable-card { cursor: pointer; }
.clickable-card:hover { border-color: var(--accent); }
.clickable-card.selected { border-color: var(--accent); box-shadow: var(--c1-shadow-focus); }
.fw-card { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.fw-card.soon { opacity: .6; border-style: dashed; box-shadow: none; }
.onboard { padding: 34px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.onboard p { max-width: 560px; color: var(--muted); }

/* ------------------------------------------------------------ report */
.report { background: var(--surface); padding: 36px 40px; }
.report h1 { font-size: 24px; }
.report section { margin-top: 26px; }
.report section h2 { border-bottom: 2px solid var(--text); padding-bottom: 6px; margin-bottom: 10px; }
.report table td, .report table th { padding: 6px 8px; font-size: 12px; }
.report .disclaimer { font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--border); padding-top: 12px; margin-top: 30px; }

/* ------------------------------------------------------------ framework map */
.map-pairs { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-bottom: 16px; }
.pair-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.pair-title { font-size: 13px; }
.pair-value { font-size: 24px; font-weight: 700; }
.pair-bar { display: grid; grid-template-columns: 72px 1fr 58px; gap: 8px; align-items: center; font-size: 12px; }
.fw-toggle { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: var(--c1-radius-full); padding: 4px 11px; background: var(--surface); cursor: pointer; font-weight: 600; font-size: 12.5px; }
.fw-toggle input { display: none; }
.fw-toggle.off { opacity: .45; }
.fw-toggle i, .dot, .eq-head i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.dot { margin-right: 5px; }
.map-search { max-width: 360px; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 16px; align-items: start; }
.map-canvas { padding: 6px; }
.map-svg { width: 100%; height: auto; display: block; }
.map-panel { max-height: calc(100vh - 32px); overflow-y: auto; position: sticky; top: 16px; }
.panel-section { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.panel-section:last-child { border-bottom: none; }
.panel-section h3 { font-size: 11px; text-transform: uppercase; letter-spacing: var(--c1-letter-eyebrow); color: var(--muted); margin-bottom: 8px; }
.panel-section h2 { font-size: 15px; line-height: 1.35; }
.map-help { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.55; }
.map-link { fill: none; stroke-opacity: .3; cursor: pointer; transition: stroke-opacity .12s; }
.map-link.is-suggested { stroke-dasharray: 5 4; }
.map-link:hover { stroke-opacity: .85; }
.map-svg.dimmed .map-link { stroke-opacity: .05; }
.map-svg.dimmed .map-link.is-on, .map-link.is-selected { stroke-opacity: .9; }
.map-node { cursor: pointer; transition: opacity .12s; }
.map-node circle { stroke: var(--c1-white); stroke-width: 2; }
.map-node text { font-size: 12.5px; fill: var(--text); }
.map-code { font-weight: 700; }
.map-node.is-isolated { opacity: .4; }
.map-svg.dimmed .map-node { opacity: .2; }
.map-svg.dimmed .map-node.is-on { opacity: 1; }
.map-node.is-selected circle, .map-node:focus circle { stroke: var(--text); stroke-width: 3; }
.map-node:focus { outline: none; }
.map-arc { fill: none; stroke-width: 5; stroke-linecap: round; opacity: .85; }
.map-fw-label { font-size: 16px; font-weight: var(--c1-w-bold); }
.map-controls { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.map-control { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.map-control-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; font-size: 13px; }
.chip.suggested { background: transparent; border: 1px dashed var(--c1-border-strong); }
.clickable-li { cursor: pointer; padding-left: 4px !important; padding-right: 4px !important; border-radius: 6px; }
.clickable-li:hover { background: var(--surface-2); }
.eq-fw { margin-bottom: 10px; }
.eq-head { display: flex; gap: 6px; align-items: center; margin-bottom: 4px; }
@media (max-width: 1100px) {
  .map-layout { grid-template-columns: 1fr; }
  .map-panel { position: static; max-height: none; }
}
@media (max-width: 760px) {
  /* At phone width the full labels would be unreadably small: keep codes, enlarge them. */
  .map-node .map-title { display: none; }
  .map-node text { font-size: 34px; }
  .map-fw-label { font-size: 30px; }
  .map-search { max-width: none; }
}

/* ------------------------------------------------------------ session */
.user-box .user-name { color: var(--c1-white); font-weight: 600; font-size: 13px; }
.user-box .user-mail { color: var(--side-text); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.user-box .user-role { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: var(--c1-w-semibold); color: var(--c1-white); background: var(--c1-navy-3); border-radius: var(--c1-radius-full); padding: 1px 8px; }
.user-box .logout { display: block; margin-top: 10px; width: 100%; justify-content: center; background: transparent; color: var(--side-text); border-color: rgba(255, 255, 255, .18); font-size: 12px; padding: 5px 8px; }
.user-box .logout:hover { background: rgba(255, 255, 255, .08); color: var(--c1-white); }
.dev-tag { font-size: 10px; background: var(--c1-yellow); color: var(--c1-navy); border-radius: 4px; padding: 0 5px; margin-left: 4px; }
/* Viewers: hide every create/edit/delete affordance (the API refuses them anyway). */
.read-only [data-act$="-new"], .read-only [data-act$="-delete"], .read-only [data-act="program-edit"],
.read-only [data-act="audit-edit"], .read-only [data-act="block-applicability"], .read-only [data-act="frameworks-sync"],
.read-only [data-act="finding-close"], .read-only [data-act="finding-reopen"], .read-only [data-act="user-toggle"],
.read-only [data-act="vendor-edit"], .read-only [data-act^="asmt-"], .read-only [data-act="monitoring-sync"], .read-only [data-act="monitor-evidence"], .read-only form[data-form="asmt-complete"],
.read-only .panel-foot button[type=submit] { display: none !important; }

/* ------------------------------------------------------------ trust center admin */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tab { border: none; background: none; border-radius: 0; border-bottom: 2px solid transparent; padding: 9px 12px; color: var(--muted); font-weight: var(--c1-w-semibold); }
.tab:hover { background: none; color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-badge { background: var(--c1-red); color: var(--c1-white); font-size: 11px; border-radius: var(--c1-radius-full); padding: 0 6px; margin-left: 4px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.badge-card { display: flex; flex-direction: column; }
.badge-card .card-body { flex: 1; }
.badge-img { display: grid; place-items: center; height: 130px; padding: 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); border-radius: var(--c1-radius-xl) var(--c1-radius-xl) 0 0; }
.field .badge-img { border-radius: var(--c1-radius-lg); border: 1px solid var(--border); }
.badge-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.trust-progs { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; }
.trust-prog .card-head h3 { font-size: 15px; }
.not-admin .admin-only { display: none !important; }
#nav a b#nav-trust-badge { background: var(--c1-yellow); color: var(--c1-navy); }
@media (max-width: 760px) { .trust-progs { grid-template-columns: 1fr; } }

@media print {
  .sidebar, .no-print, .toasts { display: none !important; }
  .shell { display: block; }
  body { background: var(--c1-white); }
  .main { padding: 0; }
  .content { box-shadow: none; border-radius: 0; min-height: 0; padding: 0; }
  .card { box-shadow: none; border: none; }
  .report { padding: 0; }
  tr { page-break-inside: avoid; }
}

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
  .program-hero .meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .main { padding: 0; }
  .content { padding: 22px 16px 50px; border-radius: var(--c1-radius-2xl) var(--c1-radius-2xl) 0 0; min-height: 0; }
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .req-row { grid-template-columns: 56px 1fr; }
  .req-row > :nth-child(n+3) { grid-column: 2; }
  .form-grid { grid-template-columns: 1fr; }
  .program-hero { flex-direction: column; align-items: flex-start; }
}

/* ------------------------------------------------------------ third parties */
.score-cell { display: grid; grid-template-columns: 80px auto; gap: 8px; align-items: center; }
.asmt-layout { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }
.q-section .card-head { background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.q-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--border); align-items: start; }
.q-row:last-child { border-bottom: none; }
.q-row.gap { background: var(--bad-soft); }
.q-meta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 6px; }
.q-comment { margin-top: 8px; font-size: 12px; padding: 6px 10px; }
.q-comment-text { margin-top: 6px; font-size: 12px; color: var(--muted); border-left: 3px solid var(--border); padding-left: 8px; white-space: pre-line; }
.criteria-table td, .criteria-table th { padding: 8px 10px; }
.criteria-table select, .criteria-table input { padding: 5px 8px; }
.eval-total { display: flex; gap: 10px; align-items: center; padding: 6px 2px; }
@media (max-width: 1100px) { .asmt-layout { grid-template-columns: minmax(0, 1fr); } }
.asmt-layout > .stack { min-width: 0; }
@media (max-width: 760px) { .q-row { grid-template-columns: 1fr; } .score-cell { grid-template-columns: 50px auto; } }

/* ------------------------------------------------------------ continuous monitoring */
.posture-kpis { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 18px; align-items: start; }
.posture-kpis > div { display: flex; flex-direction: column; gap: 6px; }
.posture-kpis strong { font-size: var(--c1-text-h2); font-weight: var(--c1-w-bold); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; margin-top: 4px; }
.history-dots { display: flex; flex-wrap: wrap; gap: 4px; }
.history-dot { width: 12px; height: 12px; border-radius: 3px; background: var(--c1-border); }
.history-dot.ok { background: var(--c1-success); }
.history-dot.bad { background: var(--c1-red); }
.history-dot.warn { background: var(--c1-yellow); }
@media (max-width: 760px) { .posture-kpis { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ settings */
.settings-grid { align-items: start; }
.notif-rule { display: flex; flex-direction: column; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.notif-rule:last-child { border-bottom: none; padding-bottom: 0; }
.sync-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.sync-row .field { min-width: 240px; }
.digest-preview { white-space: pre-wrap; font-family: var(--c1-font-mono); font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--c1-radius-lg); padding: 14px; max-height: 60vh; overflow: auto; margin: 0; }
