/* =====================================================================
   NOAH GenCode - design system (v0.4)
   One stylesheet for every GenCode page. No external fonts, no frameworks,
   no third-party CSS: system UI type, CSS custom properties, light + dark.
   The ORIGINAL NOAH v9 CSS is used only inside preview iframes of generated
   menu items (materials/noah) - never for the GenCode UI itself.
   ===================================================================== */

/* ---------- tokens ---------- */
:root {
    --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --mono: "Cascadia Code", "Cascadia Mono", Consolas, "Courier New", monospace;
    --fs: 13px;

    --bg: #EEF2F5;            /* canvas behind panels */
    --surface: #FFFFFF;       /* panels, inputs, tables */
    --surface-2: #F5F7F9;     /* toolbars, table heads, hover */
    --surface-3: #E9EDF1;     /* pressed / locked fields */
    --border: #D7DEE5;
    --border-strong: #B4C0CB;
    --text: #1B2430;
    --text-2: #5C6B7A;
    --text-3: #8A97A4;

    --accent: #0E8C7F;        /* verdigris - the one accent */
    --accent-ink: #0B6F65;
    --accent-soft: #DCF2EE;
    --on-accent: #FFFFFF;

    --warn: #A8690D;  --warn-soft: #FBEFD6;
    --danger: #B3261E; --danger-soft: #FAE0DD;
    --info: #2460A6;   --info-soft: #DEE9F7;
    --ok: #1F7A4A;     --ok-soft: #DCF2E4;

    --select: #E4F3F0;
    --focus: 0 0 0 3px rgba(14,140,127,.25);
    --shadow-pop: 0 12px 36px rgba(16,32,48,.18), 0 2px 6px rgba(16,32,48,.08);
    --radius: 6px;
    --radius-lg: 10px;

    --chrome: #13233A;        /* app sidebar */
    --chrome-2: #1A2F4D;
    --chrome-text: #D6E0EA;
    --chrome-muted: #8CA0B5;
    --chrome-active: rgba(60,201,184,.16);
    --chrome-accent: #3CC9B8;

    color-scheme: light;
}
:root[data-theme="dark"] {
    --bg: #0F161D; --surface: #161F28; --surface-2: #1C2731; --surface-3: #243140;
    --border: #2A3743; --border-strong: #3E4F5E; --text: #E5EDF3; --text-2: #97A8B7; --text-3: #6F8090;
    --accent: #3CC9B8; --accent-ink: #6ADACC; --accent-soft: rgba(60,201,184,.16); --on-accent: #06211E;
    --warn: #E0A84A; --warn-soft: rgba(224,168,74,.16); --danger: #F0776B; --danger-soft: rgba(240,119,107,.16);
    --info: #7FB3F0; --info-soft: rgba(127,179,240,.16); --ok: #5CC98A; --ok-soft: rgba(92,201,138,.16);
    --select: rgba(60,201,184,.14); --focus: 0 0 0 3px rgba(60,201,184,.3);
    --shadow-pop: 0 12px 36px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.3);
    --chrome: #0B1118; --chrome-2: #121C27; --chrome-text: #D6E0EA; --chrome-muted: #7D8FA0;
    color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0F161D; --surface: #161F28; --surface-2: #1C2731; --surface-3: #243140;
        --border: #2A3743; --border-strong: #3E4F5E; --text: #E5EDF3; --text-2: #97A8B7; --text-3: #6F8090;
        --accent: #3CC9B8; --accent-ink: #6ADACC; --accent-soft: rgba(60,201,184,.16); --on-accent: #06211E;
        --warn: #E0A84A; --warn-soft: rgba(224,168,74,.16); --danger: #F0776B; --danger-soft: rgba(240,119,107,.16);
        --info: #7FB3F0; --info-soft: rgba(127,179,240,.16); --ok: #5CC98A; --ok-soft: rgba(92,201,138,.16);
        --select: rgba(60,201,184,.14); --focus: 0 0 0 3px rgba(60,201,184,.3);
        --shadow-pop: 0 12px 36px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.3);
        --chrome: #0B1118; --chrome-2: #121C27; --chrome-text: #D6E0EA; --chrome-muted: #7D8FA0;
        color-scheme: dark;
    }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--font); font-size: var(--fs); line-height: 1.45; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.3; }
h3 { font-size: 13px; }
h4 { font-size: 13px; margin: 14px 0 4px; }
p { margin: 0 0 8px; }
ul, ol { margin: 4px 0 8px; padding-left: 22px; }
li { margin: 2px 0; }
code, .gc-mono, pre { font-family: var(--mono); font-size: 12px; }
code { background: var(--surface-3); padding: 0 4px; border-radius: 3px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 10px 0; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-track { background: transparent; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

.gc-hide { display: none !important; }
.gc-muted { color: var(--text-2); }
.gc-upper { text-transform: uppercase; }
.gc-req { color: var(--danger); margin-left: 3px; }
.gc-help { color: var(--text-2); font-size: 11.5px; margin-top: 2px; line-height: 1.4; }

/* ---------- page skeleton: toolbar / content / footer ---------- */
.gc-page { display: flex; flex-direction: column; height: 100vh; overflow: hidden; background: var(--bg); }
.gc-toolbar { flex: 0 0 auto; display: flex; align-items: center; gap: 2px; min-height: 42px; padding: 4px 10px; background: var(--surface); border-bottom: 1px solid var(--border); overflow-x: auto; }
.gc-content { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 12px 14px 14px; }
.gc-footer { flex: 0 0 auto; display: flex; gap: 18px; align-items: center; min-height: 26px; padding: 3px 14px; font-size: 11.5px; color: var(--text-2); background: var(--surface); border-top: 1px solid var(--border); }
.gc-footer b { font-weight: 600; color: var(--text); }
.gc-footer:empty { display: none; }

/* toolbar buttons */
.gc-tb { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border: 1px solid transparent; border-radius: var(--radius); background: transparent; color: var(--text); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; }
.gc-tb svg { width: 16px; height: 16px; flex: 0 0 16px; color: var(--text-2); }
.gc-tb:hover:not(.is-disabled) { background: var(--surface-2); border-color: var(--border); }
.gc-tb:hover:not(.is-disabled) svg { color: var(--accent-ink); }
.gc-tb:active:not(.is-disabled) { background: var(--surface-3); }
.gc-tb.is-primary:not(.is-disabled) { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.gc-tb.is-primary:not(.is-disabled) svg { color: var(--on-accent); }
.gc-tb.is-primary:not(.is-disabled):hover { background: var(--accent-ink); }
.gc-tb.is-danger:not(.is-disabled):hover { color: var(--danger); border-color: var(--danger-soft); background: var(--danger-soft); }
.gc-tb.is-danger:not(.is-disabled):hover svg { color: var(--danger); }
.gc-tb.is-disabled { opacity: .38; cursor: default; }
.gc-tb.is-hidden { display: none; }
.gc-tb kbd { display: none; font: 10.5px var(--font); color: var(--text-3); border: 1px solid var(--border); border-radius: 3px; padding: 0 4px; line-height: 15px; background: var(--surface-2); }
@media (min-width: 1700px) { .gc-tb kbd { display: inline-block; } }
.gc-tb.is-primary kbd { color: var(--on-accent); border-color: transparent; background: rgba(255,255,255,.18); }
.gc-tb-sep { width: 1px; height: 20px; background: var(--border); margin: 0 6px; flex: 0 0 1px; }
.gc-toolbar .gc-spacer { flex: 1 1 auto; }

/* ---------- panels ---------- */
.gc-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px 12px; margin: 0 0 10px; }
.gc-section > h3 { display: flex; align-items: center; gap: 8px; margin: -10px -12px 10px; padding: 8px 12px; font-size: 12.5px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.gc-section > h3 .gc-muted { font-weight: 400; }
.gc-note { background: var(--info-soft); border-left: 3px solid var(--info); border-radius: 4px; padding: 7px 10px; margin: 0 0 10px; color: var(--text); }
.gc-note b { font-weight: 600; }

/* ---------- forms ---------- */
.gc-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.gc-row.wrap { flex-wrap: wrap; gap: 3px 22px; }
.gc-item { display: flex; align-items: center; gap: 8px; }
.gc-label { flex: 0 0 175px; min-width: 175px; max-width: 175px; color: var(--text-2); }
.gc-label.sm { flex-basis: 110px; min-width: 110px; max-width: 110px; }
.gc-w-xs { width: 80px; } .gc-w-sm { width: 160px; } .gc-w-md { width: 320px; } .gc-w-lg { width: 480px; } .gc-w-full { width: 100%; }
input[type=text], input[type=password], input[type=number], input[type=search], input[type=email], select, textarea {
    font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 4px; padding: 5px 9px; min-height: 30px; outline: none; transition: border-color .12s, box-shadow .12s; }
input[type=text]:hover, input[type=password]:hover, select:hover, textarea:hover { border-color: var(--text-3); }
input[type=text]:focus, input[type=password]:focus, input[type=number]:focus, input[type=search]:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: var(--focus); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input[disabled], textarea[disabled], select[disabled], input[readonly], textarea[readonly] { background: var(--surface-3); color: var(--text-2); cursor: default; }
input[data-locked], textarea[data-locked] { background: var(--surface-3) !important; }
textarea { resize: vertical; line-height: 1.45; }
select { padding-right: 26px; appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A97A4' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; }
input[type=checkbox], input[type=radio] { width: 15px; height: 15px; accent-color: var(--accent); margin: 0 4px 0 0; vertical-align: -2px; }
label { cursor: default; }
.gc-code { font-family: var(--mono); font-size: 12px; width: 100%; min-height: 260px; white-space: pre; tab-size: 4; line-height: 1.5; }

/* buttons */
.gc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 84px; height: 30px; padding: 0 14px; border-radius: 5px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; transition: background .12s, border-color .12s; white-space: nowrap; }
.gc-btn:hover:not([disabled]) { background: var(--surface-2); border-color: var(--text-3); }
.gc-btn:active:not([disabled]) { background: var(--surface-3); }
.gc-btn[disabled] { opacity: .45; cursor: default; }
.gc-btn svg { width: 15px; height: 15px; }
.gc-btn.btnBlue, .gc-btn.btnGreen, .gc-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.gc-btn.btnBlue:hover:not([disabled]), .gc-btn.btnGreen:hover:not([disabled]), .gc-btn.primary:hover:not([disabled]) { background: var(--accent-ink); border-color: var(--accent-ink); }
.gc-btn.btnOrange { color: var(--warn); border-color: var(--warn); }
.gc-btn.btnOrange:hover:not([disabled]) { background: var(--warn-soft); }
.gc-btn.btnRed, .gc-btn.danger { color: var(--danger); border-color: var(--danger); }
.gc-btn.btnRed:hover:not([disabled]), .gc-btn.danger:hover:not([disabled]) { background: var(--danger-soft); }
.gc-btn.btnGray { color: var(--text-2); }
.gc-btn.sm { height: 26px; min-width: 0; padding: 0 10px; font-size: 12px; }
.gc-btn.ghost { border-color: transparent; background: transparent; }

/* ---------- data grid ---------- */
.gc-grid-wrap { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: auto; position: relative; }
table.gc-grid { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12.5px; }
table.gc-grid th { position: sticky; top: 0; z-index: 1; text-align: left; font-weight: 600; font-size: 11.5px; color: var(--text-2); white-space: nowrap; cursor: pointer; user-select: none;
    background: var(--surface-2); border-bottom: 1px solid var(--border); padding: 7px 10px; }
table.gc-grid th:hover { color: var(--text); }
table.gc-grid th.sorted-asc::after { content: " \2191"; color: var(--accent); }
table.gc-grid th.sorted-desc::after { content: " \2193"; color: var(--accent); }
table.gc-grid td { padding: 6px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; height: 32px; }
table.gc-grid tbody tr:last-child td { border-bottom: 0; }
table.gc-grid tbody tr { cursor: default; }
table.gc-grid tbody tr:hover td { background: var(--surface-2); }
table.gc-grid tbody tr.is-selected td { background: var(--select); }
table.gc-grid tbody tr.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
table.gc-grid td.num, table.gc-grid th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.gc-grid td.clip { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.gc-grid td a { color: var(--accent-ink); }
.gc-grid-empty { padding: 28px 16px; color: var(--text-2); text-align: center; }
.gc-grid-count { font-size: 11.5px; color: var(--text-2); padding: 3px 2px; margin-left: auto; }

/* ---------- badges ---------- */
.gc-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 16px; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.gc-badge.Active, .gc-badge.Approved, .gc-badge.Resolved, .gc-badge.Done, .gc-badge.ok, .gc-badge.Learned, .gc-badge.Exported, .gc-badge.Answered, .gc-badge.Reviewed, .gc-badge.Reference { background: var(--ok-soft); color: var(--ok); }
.gc-badge.NeedsReview, .gc-badge.Pending, .gc-badge.Open, .gc-badge.Warning, .gc-badge.Medium, .gc-badge.Review, .gc-badge.New { background: var(--warn-soft); color: var(--warn); }
.gc-badge.Proposed, .gc-badge.Draft, .gc-badge.Info, .gc-badge.Low, .gc-badge.Uploaded, .gc-badge.Upload, .gc-badge.Generated, .gc-badge.Enhanced, .gc-badge.MenuItem, .gc-badge.MenuTree, .gc-badge.Note { background: var(--info-soft); color: var(--info); }
.gc-badge.Deprecated, .gc-badge.Rejected, .gc-badge.WontFix, .gc-badge.Archived { background: var(--surface-3); color: var(--text-3); text-decoration: line-through; }
.gc-badge.Executed { background: var(--ok-soft); color: var(--ok); }
.gc-badge.Running { background: var(--warn-soft); color: var(--warn); }
.gc-badge.Suggested { background: var(--info-soft); color: var(--info); }
.gc-badge.Cancelled { background: var(--surface-3); color: var(--text-3); text-decoration: line-through; }
.gc-badge.Error, .gc-badge.High, .gc-badge.err, .gc-badge.Failed { background: var(--danger-soft); color: var(--danger); }

/* ---------- layout helpers ---------- */
.gc-split { display: flex; gap: 12px; height: 100%; min-height: 0; }
.gc-split > .left { flex: 0 0 46%; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.gc-split > .right { flex: 1 1 auto; overflow: auto; min-width: 0; }
.gc-filter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 8px; }
.gc-filter > span:not(.gc-grid-count) { color: var(--text-2); }
.gc-kv { display: grid; grid-template-columns: 175px 1fr; gap: 5px 12px; align-items: baseline; }
.gc-kv > div:nth-child(odd) { color: var(--text-2); }
.gc-kv > div:nth-child(even) { min-width: 0; overflow-wrap: anywhere; }
.gc-pre { white-space: pre-wrap; word-break: break-word; background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 8px 10px; max-height: 420px; overflow: auto; font-family: var(--mono); font-size: 12px; }
.gc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.gc-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px 14px; position: relative; overflow: hidden; }
.gc-card::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--accent); }
.gc-card .n { font-size: 26px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.gc-card .t { color: var(--text-2); font-size: 12px; }
.gc-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.gc-tab { padding: 7px 12px; cursor: pointer; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: transparent; color: var(--text-2); font: inherit; font-weight: 500; }
.gc-tab:hover { color: var(--text); }
.gc-tab.on { color: var(--accent-ink); border-bottom-color: var(--accent); }
.gc-thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.gc-thumbs figure { margin: 0; font-size: 11px; color: var(--text-2); }
.gc-thumbs img { max-width: 220px; max-height: 140px; border: 1px solid var(--border); border-radius: 4px; cursor: zoom-in; background: #fff; }
.gc-empty { padding: 36px 16px; text-align: center; color: var(--text-2); }
.gc-empty b { display: block; color: var(--text); font-weight: 600; margin-bottom: 4px; }

/* ---------- dialogs (native <dialog>) ---------- */
dialog.gc-dialog, dialog.gc-win { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0; background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop); max-width: min(92vw, 560px); width: max-content; min-width: 360px; }
dialog.gc-win { max-width: min(92vw, 760px); min-width: 420px; max-height: 90vh; display: flex; flex-direction: column; }
dialog.gc-win[open] { display: flex; }
dialog.gc-win.gc-wide { width: 88vw; max-width: 88vw; }
dialog::backdrop { background: rgba(10, 18, 28, .45); backdrop-filter: blur(1px); }
.gc-dlg-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; }
.gc-dlg-head .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 30px; }
.gc-dlg-head .ic svg { width: 18px; height: 18px; }
.gc-dialog.info .ic, .gc-dialog.question .ic { background: var(--accent-soft); color: var(--accent-ink); }
.gc-dialog.warning .ic { background: var(--warn-soft); color: var(--warn); }
.gc-dialog.error .ic { background: var(--danger-soft); color: var(--danger); }
.gc-dlg-title { font-weight: 600; font-size: 14px; }
.gc-dlg-body { padding: 10px 16px 4px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; max-height: 60vh; overflow: auto; }
.gc-win .gc-dlg-body { white-space: normal; flex: 1 1 auto; max-height: none; padding: 12px 16px; }
.gc-dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px 14px; }
.gc-win .gc-dlg-head { border-bottom: 1px solid var(--border); padding: 12px 16px; }
.gc-win .gc-dlg-foot { border-top: 1px solid var(--border); }
.gc-dlg-x { margin-left: auto; width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--text-2); cursor: pointer; display: grid; place-items: center; }
.gc-dlg-x:hover { background: var(--surface-2); color: var(--text); }
.gc-dlg-x svg { width: 16px; height: 16px; }

/* ---------- toast ---------- */
.gc-toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 9999; }
.gc-toast { background: var(--text); color: var(--bg); padding: 9px 14px; border-radius: 8px; font-size: 12.5px; box-shadow: var(--shadow-pop); max-width: 380px; animation: gc-in .18s ease-out; }
.gc-toast.ok { background: var(--ok); color: #fff; }
.gc-toast.err { background: var(--danger); color: #fff; }
@keyframes gc-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- loading ---------- */
.gc-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9998; background: var(--accent-soft); overflow: hidden; }
.gc-progress::after { content: ""; position: absolute; left: -40%; width: 40%; height: 100%; background: var(--accent); animation: gc-bar 1.1s ease-in-out infinite; }
@keyframes gc-bar { 0% { left: -40%; } 60% { left: 100%; } 100% { left: 100%; } }
.gc-busy { position: fixed; inset: 0; z-index: 9997; background: rgba(238,242,245,.45); display: grid; place-items: center; }
:root[data-theme="dark"] .gc-busy { background: rgba(15,22,29,.5); }
.gc-busy .sp { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--accent); animation: gc-spin .8s linear infinite; }
@keyframes gc-spin { to { transform: rotate(360deg); } }

/* ---------- misc ---------- */
.gc-icon { width: 16px; height: 16px; vertical-align: -3px; }
kbd.gc-kbd { font: 11px var(--font); color: var(--text-2); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--surface); }
@media print { .gc-toolbar, .gc-footer { display: none !important; } .gc-page { height: auto; overflow: visible; } .gc-content { overflow: visible; } }

/* ------------------------------------------------------------ code audit severity (v0.7) */
.gc-sev { display: inline-block; min-width: 24px; padding: 0 5px; border-radius: 4px; font-size: 11px; font-weight: 700; line-height: 17px; text-align: center; white-space: nowrap; }
.gc-sev.I1, .gc-sev.I2 { background: var(--info-soft); color: var(--info); }
.gc-sev.I3 { background: var(--info); color: #fff; }
.gc-sev.W1, .gc-sev.W2 { background: var(--warn-soft); color: var(--warn); }
.gc-sev.W3 { background: var(--warn); color: #fff; }
.gc-sev.E1, .gc-sev.E2 { background: var(--danger-soft); color: var(--danger); }
.gc-sev.E3 { background: var(--danger); color: #fff; }
/* code viewer with line numbers */
.gc-codeview { font-family: var(--mono); font-size: 12px; line-height: 1.5; max-height: 65vh; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); white-space: pre; tab-size: 4; }
.gc-codeview .cl { padding-right: 12px; min-height: 18px; }
.gc-codeview .cl.hl { background: var(--warn-soft); box-shadow: inset 3px 0 0 var(--warn); }
.gc-codeview .cl.hl.cur { background: color-mix(in srgb, var(--warn) 32%, transparent); box-shadow: inset 5px 0 0 var(--warn); }   /* v0.11.1: current part (Previous / Next) */
.gc-cvbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gc-cvbar .gc-cvnote { flex: 1 1 auto; }
.gc-cvnav { display: inline-flex; align-items: center; gap: 6px; }
.gc-cvnav[hidden] { display: none; }
.gc-cvnav .gc-cvpos { min-width: 54px; text-align: center; font-variant-numeric: tabular-nums; }
.gc-codeview .ln { display: inline-block; width: 52px; padding-right: 10px; margin-right: 8px; text-align: right; color: var(--text-3); border-right: 1px solid var(--border); user-select: none; background: var(--surface-2); }
/* page help ("i") */
.gc-pagehelp { max-width: 640px; line-height: 1.55; }
.gc-pagehelp .ph-code { color: var(--text-3); font-size: 12px; margin-bottom: 6px; }
.gc-pagehelp h4 { margin: 12px 0 4px; font-size: 13px; }
.gc-pagehelp p { margin: 0; }
.gc-pagehelp ol { margin: 0; padding-left: 20px; }
.gc-tb-help { margin-left: auto; }

/* audit scan progress (gc.scanProgress) */
.gc-scan-prog { display: flex; flex-direction: column; gap: 4px; }
.gc-scan-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gc-scan-steps { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); }
.gc-scan-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); display: inline-block; }
.gc-scan-dot.done { background: var(--ok); } .gc-scan-dot.on { background: var(--info); }
.gc-scan-label { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.gc-scan-bar { position: relative; height: 10px; border-radius: 5px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.gc-scan-bar > span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--info); border-radius: 5px; transition: width .6s ease; }
.gc-scan-bar.indet > span { animation: gc-scan-move 1.4s ease-in-out infinite; }
@keyframes gc-scan-move { 0% { left: -30%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .gc-scan-bar.indet > span { animation: none; left: 0; width: 100% !important; opacity: .35; } }
.gc-scan-meta { font-size: 12px; color: var(--text-2); }

/* v0.10.2: severity codes I1-I3 / W1-W3 / E1-E3 (Business and Technical rules, Code Audit) */
.gc-badge.E1, .gc-badge.E2, .gc-badge.E3 { background: var(--danger-soft); color: var(--danger); }
.gc-badge.W1, .gc-badge.W2, .gc-badge.W3 { background: var(--warn-soft); color: var(--warn); }
.gc-badge.I1, .gc-badge.I2, .gc-badge.I3 { background: var(--info-soft); color: var(--info); }
