/* v3 additions (10/11): small layout helpers for the new pages. Only existing design tokens; no colour or theme is redefined. */
.v3-chipbar { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; flex: none; font-size: var(--text-xs); color: var(--text-muted); }
.v3-chipbar .chip { background: var(--accent-soft); color: var(--accent-soft-fg); font-weight: 600; gap: 6px; padding-right: 4px; }
.v3-chipbar .chip button { opacity: .75; }
.v3-sub { margin: 0 0 12px; color: var(--text-muted); font-size: var(--text-sm); line-height: 1.5; max-width: 980px; }
.v3-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 10px 14px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--radius-card, 10px); background: var(--raised); font-size: var(--text-sm); flex: none; }
.v3-strip__item { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.v3-strip__item .label { margin: 0; }
.v3-strip__item b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.v3-strip__desc { flex-basis: 100%; color: var(--text-muted); line-height: 1.45; }
.v3-bar { display: inline-block; width: 74px; height: 6px; border-radius: 999px; background: var(--border-subtle); overflow: hidden; vertical-align: middle; }
.v3-bar > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.v3-bar--ok > i { background: var(--positive-solid); }
.v3-bar--warn > i { background: var(--warning-solid); }
.v3-prog { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.v3-ph { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 16px; border: 1px dashed var(--border); border-radius: var(--radius-card, 10px); background: var(--raised); color: var(--text-muted); font-size: var(--text-sm); }
.v3-ph b { color: var(--text); font-weight: 650; }
.v3-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.v3-tile { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-card, 10px); background: var(--raised); min-width: 0; }
.v3-tile .stat__value { font-size: 22px; }
.v3-tile--link { cursor: pointer; }
.v3-tile--link:hover { border-color: var(--text-faint); }
.v3-stages { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.v3-stage { border: 1px solid var(--border); border-radius: var(--radius-control); padding: 8px 10px; background: var(--raised); font-size: var(--text-xs); display: flex; flex-direction: column; gap: 5px; }
.v3-stage b { font-size: var(--text-sm); color: var(--text); }
.v3-stage--done { border-color: color-mix(in oklab, var(--positive-solid) 40%, transparent); }
.v3-stage--now { border-color: var(--accent); box-shadow: 0 0 0 2px var(--ring); }
.v3-cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.v3-sec { margin: 18px 0 8px; font: 650 var(--text-sm)/1.2 var(--font-sans); color: var(--text); display: flex; align-items: center; gap: 8px; }
.v3-sec small { font-weight: 500; color: var(--text-muted); }
.v3-cadence td, .v3-cadence th { padding: 7px 10px; border-bottom: 1px solid var(--border-subtle); text-align: left; font-size: var(--text-sm); vertical-align: top; }
.v3-cadence th { font: 600 var(--text-xs)/1.2 var(--font-sans); text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.v3-cadence { width: 100%; border-collapse: collapse; }
.v3-yaml { margin: 0; }
.v3-lane { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-subtle); font-size: var(--text-sm); }
.v3-lane:last-child { border-bottom: 0; }
.v3-lane__n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-soft-fg); font-size: var(--text-xs); font-weight: 700; flex: none; }
.v3-chat { display: flex; flex-direction: column; gap: 10px; }
.v3-msg { max-width: 88%; padding: 8px 11px; border-radius: 10px; font-size: var(--text-sm); line-height: 1.5; border: 1px solid var(--border-subtle); background: var(--raised); }
.v3-msg--me { align-self: flex-end; background: var(--accent-soft); color: var(--accent-soft-fg); }
.v3-msg small { display: block; color: var(--text-faint); margin-top: 3px; font-size: var(--text-2xs); }
.v3-md h1, .v3-md h2, .v3-md h3 { margin: 12px 0 4px; font-size: var(--text-sm); color: var(--text); }
.v3-md h1 { font-size: var(--text-base, 14px); }
.v3-md p, .v3-md li { font-size: var(--text-sm); line-height: 1.55; color: var(--text-body); }
.v3-md ul, .v3-md ol { padding-left: 18px; margin: 4px 0; }
.v3-reason { display: flex; gap: 8px; align-items: flex-start; font-size: var(--text-sm); color: var(--text-muted); }
.v3-sev-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.table-cell-sm { font-size: var(--text-xs); color: var(--text-muted); }
.v3-reveal { filter: blur(0); }
.sys-scope.is-off { opacity: .6; cursor: not-allowed; }
.v3-two { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.v3-inline-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; align-items: start; }
.v3-inline-form .field--wide { grid-column: 1 / -1; }
.v3-readonly { color: var(--text); font-size: var(--text-sm); padding: 6px 0; }

.v3-cols2 > .card, .v3-cols2 > section { margin-top: 0 !important; }

.v3-tight .dt td { white-space: nowrap; }
.v3-tight .root-actions { flex-wrap: nowrap; }

/* ================= Round 1 (10/11): comment round ================= */
/* C-03: elements that are after the MVP. Hidden in MVP; in Full design they carry a dashed outline and a small tag. */
.v3-after { position: relative; border: 1.5px dashed var(--accent); border-radius: var(--radius-card, 10px); padding: 14px 12px 10px; margin: 16px 0 12px; background: color-mix(in oklab, var(--accent-soft) 40%, transparent); min-width: 0; }
.v3-after > .v3-sec:first-of-type { margin-top: 0; }
.v3-after__tag { position: absolute; top: -9px; right: 12px; font: 700 10px/1 var(--font-sans); letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-contrast); white-space: nowrap; }
.v3-after__tag--inline { position: static; margin-left: 2px; padding: 2px 6px; font-size: 9px; }
.tab--after { outline: 1.5px dashed var(--accent); outline-offset: -3px; border-radius: 6px 6px 0 0; }
.v3-after-cell { outline: 1.5px dashed var(--accent); outline-offset: -2px; }

/* C-16: readable keys: the title is the main text, the key is the small mono line under it */
.v3-tc { display: flex; flex-direction: column; gap: 1px; line-height: 1.3; padding: 4px 0; min-width: 0; }
.v3-tc__t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.v3-key { color: var(--text-faint); font-size: 11px; letter-spacing: .02em; white-space: nowrap; }
.drawer__title .v3-key { font-size: 12px; margin-left: 8px; font-weight: 500; vertical-align: middle; }

/* C-01: a tab bar that overflows scrolls sideways, with arrows */
.tabs--overflow { -webkit-mask-image: none; mask-image: none; padding-right: 0; scrollbar-width: none; scroll-behavior: auto; }
.page-head > .tabs-arrow { align-self: flex-end; flex: none; width: 24px; height: 30px; margin: 0 -20px 3px; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; display: grid; place-items: center; border-radius: 6px; }
.page-head > .tabs-arrow:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.page-head > .tabs-arrow:disabled { opacity: .25; cursor: default; }
.page-head > .tabs-arrow--l { margin-left: -12px; }

/* tables whose cells wrap on purpose (C-05) */
.dt td.wrap, .dt td.wrap .wrap-in { white-space: normal; }
.dt td.wrap { padding-top: 6px; padding-bottom: 6px; vertical-align: middle; line-height: 1.35; overflow: visible; text-overflow: clip; }
.v3-cell2 { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; min-width: 0; }
.v3-cell2 .mono { overflow-wrap: anywhere; }
.v3-row-badges { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

/* system drawer: advanced settings, test accounts, scope picker */
details.v3-adv { border: 1px solid var(--border); border-radius: var(--radius-card, 10px); background: var(--raised); margin-bottom: 12px; }
details.v3-adv > summary { cursor: pointer; padding: 12px 14px; display: flex; align-items: center; gap: 10px; font: 650 var(--text-base)/1.2 var(--font-sans); color: var(--text); list-style: none; }
details.v3-adv > summary::-webkit-details-marker { display: none; }
details.v3-adv > summary::before { content: ''; width: 7px; height: 7px; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(-45deg); transition: transform .15s; flex: none; }
details.v3-adv[open] > summary::before { transform: rotate(45deg); }
details.v3-adv > summary small { font-weight: 500; color: var(--text-muted); font-size: var(--text-xs); }
details.v3-adv > .v3-adv__body { padding: 4px 14px 12px; border-top: 1px solid var(--border-subtle); }
.v3-adv__body .card { margin-top: 12px; }
.v3-matrix { width: 100%; border-collapse: collapse; font-size: var(--text-xs); }
.v3-matrix th, .v3-matrix td { text-align: left; vertical-align: top; padding: 6px 8px; border-bottom: 1px solid var(--border-subtle); }
.v3-matrix th { font: 600 var(--text-2xs)/1.2 var(--font-sans); text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.v3-modecards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 6px 0 4px; }
.v3-modecard { border: 1px solid var(--border); border-radius: var(--radius-control); padding: 9px 11px; background: var(--raised); display: flex; flex-direction: column; gap: 5px; font-size: var(--text-xs); line-height: 1.45; color: var(--text-body); cursor: pointer; }
.v3-modecard b { font-size: var(--text-sm); color: var(--text); }
.v3-modecard.is-on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--ring); }
.v3-modecard.is-dis { cursor: default; opacity: .75; }
.v3-modecard ul { margin: 0; padding-left: 16px; }
.v3-acct { border: 1px solid var(--border); border-radius: var(--radius-card, 10px); background: var(--raised); margin-bottom: 10px; }
.v3-acct__head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; flex-wrap: wrap; }
.v3-acct__head b { font-size: var(--text-base); color: var(--text); }
.v3-acct__body { padding: 2px 14px 12px; border-top: 1px solid var(--border-subtle); }
.v3-guide { white-space: pre-wrap; font-size: var(--text-sm); line-height: 1.55; background: var(--sunken); border-radius: var(--radius-control); padding: 8px 10px; color: var(--text-body); }
.v3-scope { border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--raised); }
.v3-scope__root { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--border-subtle); flex-wrap: wrap; }
.v3-scope__root:last-child { border-bottom: 0; }
.v3-scope__root .spacer { flex: 1; }
.v3-scope__assets { padding: 8px 10px 10px 34px; background: var(--sunken); border-bottom: 1px solid var(--border-subtle); }
.v3-scope__list { max-height: 168px; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 14px; margin-top: 6px; }
.v3-scope__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 10px 8px 34px; }
.v3-qtile { border: 1px solid var(--border); border-radius: var(--radius-control); padding: 8px 10px; background: var(--raised); font-size: var(--text-xs); color: var(--text-muted); }
.v3-qtile b { display: block; font-size: 20px; color: var(--text); font-variant-numeric: tabular-nums; }
.v3-statrow { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: var(--text-xs); color: var(--text-muted); }
.v3-statrow b { color: var(--text); font-variant-numeric: tabular-nums; }
.v3-unchecked { margin: 0; padding-left: 16px; font-size: var(--text-xs); color: var(--text-muted); line-height: 1.5; }
.v3-sugg { border: 1px dashed var(--accent); border-radius: var(--radius-control); background: color-mix(in oklab, var(--accent-soft) 45%, transparent); padding: 9px 12px; margin: 6px 0 10px; font-size: var(--text-sm); line-height: 1.5; }
.v3-sugg b { color: var(--text); }
.chip--ro { background: var(--sunken); color: var(--text); border: 1px solid var(--border); font-weight: 600; }
.v3-source-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.v3-stages { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.v3-stage .v3-statrow { flex-direction: column; gap: 2px; }
@media (max-width: 1300px) { .v3-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); } .v3-modecards { grid-template-columns: 1fr; } }
.v3-after-row { outline: 1.5px dashed var(--accent); outline-offset: -2px; }
.v3-inline-form > .field { margin: 0 0 10px; }
.v3-inline-form .input[type="number"] { display: inline-block; }
.field + .v3-inline-form { margin-top: 12px; }
