/* Sổ tay Step-by-step chạy Nessus: "phiếu kiểm tra hiện trường". Bricolage Grotesque + IBM Plex Mono, giấy ấm, một màu cam nhấn, thang màu mức độ chỉ dành cho lỗ hổng. */
:root {
  --bg: oklch(96.6% 0.011 85);
  --paper: oklch(99% 0.006 85);
  --sunk: oklch(93.4% 0.014 82);
  --ink: oklch(22% 0.035 255);
  --ink-2: oklch(37% 0.03 255);
  --muted: oklch(51% 0.026 250);
  --line: oklch(88% 0.016 82);
  --line-2: oklch(79% 0.022 80);
  --ac: oklch(63% 0.185 46);
  --ac-text: oklch(50% 0.17 42);
  --ac-ink: oklch(99% 0.01 85);
  --ac-soft: color-mix(in oklch, var(--ac) 12%, var(--paper));
  --code-bg: oklch(24% 0.024 62);
  --code-ink: oklch(93% 0.016 85);
  --code-dim: oklch(69% 0.03 80);
  --s-crit: oklch(44% 0.18 6);
  --s-high: oklch(58% 0.2 28);
  --s-med: oklch(73% 0.15 68);
  --s-low: oklch(78% 0.13 118);
  --s-info: oklch(64% 0.1 240);
  --ok: oklch(52% 0.13 152);
  --bad: oklch(54% 0.19 27);
  --focus: oklch(55% 0.16 255);
  --shadow: 0 1px 2px oklch(25% 0.04 60 / 0.07), 0 10px 26px -14px oklch(25% 0.04 60 / 0.22);
  --r: 12px;
  --top: 60px;
  --f: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: oklch(19% 0.022 255); --paper: oklch(22.5% 0.024 255); --sunk: oklch(26.5% 0.026 255);
    --ink: oklch(94% 0.012 85); --ink-2: oklch(84% 0.014 85); --muted: oklch(70% 0.018 250);
    --line: oklch(31% 0.024 255); --line-2: oklch(40% 0.03 255);
    --ac: oklch(73% 0.16 52); --ac-text: oklch(78% 0.15 55); --ac-ink: oklch(20% 0.03 255);
    --code-bg: oklch(16% 0.018 255); --code-ink: oklch(93% 0.014 85); --code-dim: oklch(66% 0.026 80);
    --s-crit: oklch(60% 0.2 8); --s-high: oklch(68% 0.19 30); --s-med: oklch(80% 0.14 75); --s-low: oklch(82% 0.13 120); --s-info: oklch(72% 0.11 240);
    --ok: oklch(75% 0.14 152); --bad: oklch(72% 0.17 27); --focus: oklch(75% 0.13 255);
    --shadow: 0 1px 2px oklch(5% 0.02 255 / 0.45), 0 12px 30px -14px oklch(5% 0.02 255 / 0.75);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: oklch(19% 0.022 255); --paper: oklch(22.5% 0.024 255); --sunk: oklch(26.5% 0.026 255);
  --ink: oklch(94% 0.012 85); --ink-2: oklch(84% 0.014 85); --muted: oklch(70% 0.018 250);
  --line: oklch(31% 0.024 255); --line-2: oklch(40% 0.03 255);
  --ac: oklch(73% 0.16 52); --ac-text: oklch(78% 0.15 55); --ac-ink: oklch(20% 0.03 255);
  --code-bg: oklch(16% 0.018 255); --code-ink: oklch(93% 0.014 85); --code-dim: oklch(66% 0.026 80);
  --s-crit: oklch(60% 0.2 8); --s-high: oklch(68% 0.19 30); --s-med: oklch(80% 0.14 75); --s-low: oklch(82% 0.13 120); --s-info: oklch(72% 0.11 240);
  --ok: oklch(75% 0.14 152); --bad: oklch(72% 0.17 27); --focus: oklch(75% 0.13 255);
  --shadow: 0 1px 2px oklch(5% 0.02 255 / 0.45), 0 12px 30px -14px oklch(5% 0.02 255 / 0.75);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 20px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16.5px/1.65 var(--f); font-optical-sizing: auto; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration-color: color-mix(in oklch, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
code, kbd { font-family: var(--mono); font-size: .88em; }
:not(pre) > code { background: var(--sunk); border: 1px solid var(--line); border-radius: 5px; padding: .05em .35em; overflow-wrap: anywhere; }
kbd { border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0 .35em; font-size: .78em; color: var(--muted); }
svg { display: block; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }

/* ---------------------------------------------------------------- thanh trên */
.top { position: sticky; top: 0; z-index: 50; height: var(--top); display: flex; align-items: center; gap: 14px; padding: 0 clamp(12px, 2.4vw, 28px); background: color-mix(in oklch, var(--bg) 90%, transparent); backdrop-filter: saturate(1.3) blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; flex: none; }
.brand .bm { width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: var(--paper); display: grid; place-items: center; }
.brand .bm svg { width: 16px; height: 16px; }
.brand em { font-style: normal; color: var(--ac-text); }
.phases { display: flex; flex: 1 1 auto; gap: 6px; min-width: 0; max-width: 780px; margin-left: 10px; }
.ph { flex: 1 1 0; min-width: 0; display: grid; gap: 5px; text-decoration: none; padding: 6px 0 0; }
.ph i { display: block; height: 4px; border-radius: 4px; background: var(--line-2); transition: background .3s; }
.ph span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .3s; }
.ph b { font: 600 11px var(--mono); margin-right: 5px; letter-spacing: .02em; }
.ph.done i { background: color-mix(in oklch, var(--ac) 45%, var(--line-2)); }
.ph.on i { background: var(--ac); }
.ph.on span { color: var(--ink); font-weight: 600; }
.top-act { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.tb { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid transparent; background: none; font-size: 14.5px; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.tb:hover { background: var(--sunk); color: var(--ink); }
.tb.line { border-color: var(--line-2); }
.tb[aria-expanded="true"] { background: var(--sunk); color: var(--ink); }
.tb svg { width: 18px; height: 18px; flex: none; }
.who { font-size: 13px; color: var(--muted); padding: 0 6px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.toc-pop { position: fixed; z-index: 49; top: calc(var(--top) + 6px); left: clamp(8px, 2vw, 24px); right: clamp(8px, 2vw, 24px); max-width: 1060px; margin: 0 auto; background: var(--paper); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 30px 70px -26px oklch(10% 0.03 255 / .55); padding: 22px clamp(16px, 2.4vw, 30px) 24px; max-height: calc(100dvh - var(--top) - 24px); overflow-y: auto; }
.toc-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px 22px; }
.toc-ph h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; display: flex; align-items: baseline; gap: 7px; color: var(--ink); }
.toc-ph h3 b { font: 600 11.5px var(--mono); color: var(--ac-text); }
.toc-ph ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.toc-ph a { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 4px; padding: 6px 8px 6px 6px; border-radius: 8px; text-decoration: none; font-size: 14.5px; line-height: 1.3; color: var(--ink-2); }
.toc-ph a:hover, .toc-ph a.on { background: var(--sunk); color: var(--ink); }
.toc-ph a.on { font-weight: 600; }
.toc-ph a .n { font: 500 12px var(--mono); color: var(--muted); padding-top: 1px; }
.toc-extra { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 4px; }
.toc-extra a { display: inline-flex; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; text-decoration: none; font-size: 14px; color: var(--ink-2); }
.toc-extra a:hover { border-color: var(--line-2); color: var(--ink); }
.toc-extra a .n { font: 500 12px var(--mono); color: var(--muted); }

/* ---------------------------------------------------------------- bố cục */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 304px; gap: 0 clamp(28px, 4vw, 64px); max-width: 1400px; margin: 0 auto; padding: 0 clamp(16px, 3.6vw, 52px) 90px; }
.col { min-width: 0; }
.sheet { position: sticky; top: calc(var(--top) + 18px); align-self: start; margin-top: 30px; max-height: calc(100dvh - var(--top) - 36px); overflow-y: auto; border: 1px solid var(--line-2); border-radius: 16px; background: var(--paper); box-shadow: var(--shadow); scrollbar-width: thin; }
.sheet-h { position: sticky; top: 0; z-index: 1; background: var(--paper); padding: 18px 18px 12px; border-bottom: 1px dashed var(--line-2); }
.sheet-h h2 { margin: 0; font-size: 1.1rem; font-weight: 700; letter-spacing: -.015em; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sheet-h h2 b { font: 600 13px var(--mono); color: var(--ac-text); }
.bar { height: 6px; border-radius: 9px; background: var(--sunk); overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; width: 0; background: var(--ac); border-radius: inherit; transition: width .4s cubic-bezier(.2, .7, .2, 1); }
.sheet ol { list-style: none; margin: 0; padding: 8px 8px 6px; }
.sheet li { position: relative; }
.sheet li + li { margin-top: 1px; }
.st { display: grid; grid-template-columns: 24px 24px minmax(0, 1fr); gap: 8px; align-items: start; padding: 7px 10px 7px 8px; border-radius: 10px; cursor: pointer; transition: background .2s; }
.st:hover { background: var(--sunk); }
.st input { position: absolute; opacity: 0; pointer-events: none; }
.st .no { font: 500 12px/24px var(--mono); color: var(--muted); text-align: right; }
.st .bx { width: 22px; height: 22px; margin-top: 1px; border-radius: 7px; border: 1.5px solid var(--line-2); display: grid; place-items: center; background: var(--paper); transition: background .2s, border-color .2s; }
.st .bx svg { width: 14px; height: 14px; color: var(--ac-ink); opacity: 0; transform: scale(.6); transition: opacity .2s, transform .25s cubic-bezier(.2, .9, .3, 1.3); }
.st.on .bx { background: var(--ac); border-color: var(--ac); }
.st.on .bx svg { opacity: 1; transform: none; }
.st.on .tx { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in oklch, var(--muted) 50%, transparent); }
.st.cur { background: var(--ac-soft); box-shadow: inset 3px 0 0 var(--ac); }
.st input:focus-visible ~ .bx { outline: 2px solid var(--focus); outline-offset: 2px; }
.st .tx { font-size: 14.5px; line-height: 1.4; padding-top: 2px; min-width: 0; overflow-wrap: anywhere; }
.st .tx a { font: 500 11px var(--mono); color: var(--ac-text); margin-left: 6px; text-decoration: none; white-space: nowrap; }
.st .tx a:hover { text-decoration: underline; }
.sheet-f { padding: 8px 18px 16px; font-size: 13px; color: var(--muted); display: flex; gap: 8px 14px; flex-wrap: wrap; align-items: center; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; font-size: 13.5px; }
.linkbtn:hover { color: var(--ink); }
.fab { display: none; position: fixed; z-index: 46; right: 14px; bottom: 14px; align-items: center; gap: 9px; height: 46px; padding: 0 16px 0 14px; border-radius: 99px; border: 0; background: var(--ink); color: var(--paper); box-shadow: var(--shadow); font-weight: 600; font-size: 14.5px; }
.fab svg { width: 18px; height: 18px; }
.fab b { font: 600 13px var(--mono); color: var(--ac); }
.scrim { position: fixed; inset: 0; z-index: 54; background: oklch(18% 0.02 255 / .45); }

/* ---------------------------------------------------------------- mở đầu */
.hero { padding: clamp(34px, 6vw, 80px) 0 14px; }
.kicker { font: 500 12.5px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ac-text); margin: 0 0 20px; }
.hero h1 { font-weight: 800; font-size: clamp(2.9rem, 1.2rem + 6.6vw, 6.6rem); line-height: .93; letter-spacing: -.045em; margin: 0; max-width: 11ch; text-wrap: balance; }
.hero h1 .hl { color: var(--ac); }
.hero .sub { font-size: clamp(1.15rem, 1rem + .7vw, 1.6rem); font-weight: 400; color: var(--ink-2); margin: 18px 0 0; letter-spacing: -.015em; }
.hero .lede { max-width: 60ch; margin: 18px 0 0; color: var(--ink-2); }
.tape { display: inline-flex; align-items: center; gap: 10px; margin: 26px 0 0; padding: 9px 16px 9px 12px; border: 1.5px solid var(--ac); border-radius: 8px; background: repeating-linear-gradient(-45deg, color-mix(in oklch, var(--ac) 15%, transparent) 0 9px, transparent 9px 18px), var(--paper); font: 600 12.5px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.tape svg { width: 18px; height: 18px; color: var(--ac-text); flex: none; }
.hero .meta { margin: 20px 0 0; font: 400 13px var(--mono); color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 18px; }

.cycle { margin: 44px 0 0; display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 0 14px; }
.loop { grid-column: 3 / 6; height: 42px; margin-left: 23px; margin-right: calc((100% - 56px) / 3 - 23px); border: 2px dashed var(--ac); border-bottom: 0; border-radius: 22px 22px 0 0; position: relative; }
.loop::before { content: ''; position: absolute; left: -7px; bottom: -3px; border: 6px solid transparent; border-top: 9px solid var(--ac); border-bottom: 0; }
.loop span { position: absolute; left: 50%; top: -12px; transform: translateX(-50%); padding: 0 10px; background: var(--bg); font: 600 11.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ac-text); white-space: nowrap; }
.stop { position: relative; padding-top: 58px; min-width: 0; }
.stop::before { content: ''; position: absolute; top: 22px; left: -8px; right: -8px; height: 2px; background: var(--ink); opacity: .85; }
.stop:first-of-type::before { left: 23px; }
.stop:last-child::before { right: calc(100% - 23px); }
.stop .dot { position: absolute; top: 0; left: 0; width: 46px; height: 46px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); display: grid; place-items: center; font: 700 .95rem var(--f); z-index: 1; letter-spacing: -.02em; }
.stop.hot .dot { background: var(--ac); border-color: var(--ac); color: var(--ac-ink); }
.stop h3 { margin: 0; font-size: 1.12rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.stop p { margin: 5px 0 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.stop ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.stop li a { display: inline-flex; gap: 6px; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line-2); font-size: 12.5px; text-decoration: none; color: var(--ink-2); background: var(--paper); }
.stop li a:hover { border-color: var(--ac); color: var(--ink); }
.stop li a b { font: 600 11px var(--mono); color: var(--ac-text); padding-top: 1px; }
.loop-note { display: none; }

/* ---------------------------------------------------------------- phần */
.sec { padding: clamp(54px, 7vw, 96px) 0 4px; }
.sec-h { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 clamp(16px, 2.6vw, 34px); align-items: end; margin-bottom: 30px; }
.sec-n { font-weight: 800; font-size: clamp(4.2rem, 2.6rem + 5.4vw, 8rem); line-height: .78; letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 1.6px var(--ac); padding-bottom: .04em; user-select: none; }
.sec-t { min-width: 0; padding-bottom: 4px; }
.sec-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font: 500 11.5px var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.sec-meta .ph-tag { color: var(--ac-text); }
.sec-meta .src { padding: 1px 8px; border: 1px solid var(--line-2); border-radius: 99px; text-transform: none; letter-spacing: 0; font-family: var(--f); font-size: 12px; }
.sec h2 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.7rem); line-height: 1.06; font-weight: 750; letter-spacing: -.035em; margin: 0; max-width: 22ch; text-wrap: balance; }
.sec-intro { margin: 0 0 24px; max-width: 64ch; color: var(--ink-2); font-size: 1.05rem; }
.sub-h { font-size: 1.12rem; font-weight: 700; letter-spacing: -.015em; margin: 38px 0 12px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.sub-h small { font: 500 12.5px var(--mono); color: var(--muted); }
.more { margin-top: 28px; padding: 16px 18px; border-radius: var(--r); background: var(--sunk); max-width: 70ch; }
.more::before { content: 'Ghi chú thêm'; display: block; font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.more p:first-child { margin-top: 0; } .more p:last-child { margin-bottom: 0; }
.prose { max-width: 64ch; color: var(--ink-2); }

.callout { --c: var(--s-info); display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding: 14px 16px; margin: 16px 0; border-radius: var(--r); background: color-mix(in oklch, var(--c) 8%, var(--paper)); border: 1px solid color-mix(in oklch, var(--c) 28%, var(--line)); max-width: 76ch; font-size: 15.5px; }
.callout svg { width: 20px; height: 20px; color: var(--c); margin-top: 2px; }
.callout b.lbl { display: block; font-size: 12.5px; font-weight: 700; color: var(--c); margin-bottom: 2px; letter-spacing: .02em; }
.callout.warn { --c: var(--ac); }
.callout.warn b.lbl { color: var(--ac-text); }
.callout.bad { --c: var(--bad); }
.callout.ok { --c: var(--ok); }

/* ---------------------------------------------------------------- khối lệnh */
.code { margin: 16px 0; border-radius: 12px; background: var(--code-bg); color: var(--code-ink); overflow: hidden; box-shadow: var(--shadow); max-width: 880px; }
.code-h { display: flex; align-items: center; gap: 10px; padding: 9px 9px 9px 14px; border-bottom: 1px solid oklch(100% 0 0 / .09); }
.lang { flex: none; font: 600 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 3px 7px; border-radius: 5px; background: oklch(100% 0 0 / .09); color: var(--code-dim); }
.code-t { flex: 1; min-width: 0; font-size: 13.5px; color: oklch(90% 0.016 85); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 8px; border: 1px solid oklch(100% 0 0 / .16); background: oklch(100% 0 0 / .05); color: oklch(94% 0.012 85); font-size: 13px; }
.copy:hover { background: oklch(100% 0 0 / .13); }
.copy svg { width: 15px; height: 15px; }
.copy.done { color: oklch(82% 0.14 152); border-color: oklch(82% 0.14 152 / .5); }
.code pre { margin: 0; padding: 14px 16px 16px; overflow-x: auto; font: 400 13.5px/1.7 var(--mono); tab-size: 2; scrollbar-width: thin; scrollbar-color: oklch(100% 0 0 / .22) transparent; }
.code code { font-size: inherit; }
.t-c { color: var(--code-dim); font-style: italic; }
.t-s { color: oklch(83% 0.11 150); }
.t-k { color: oklch(82% 0.11 70); }
.t-p { color: oklch(82% 0.1 215); }
.t-v { color: oklch(80% 0.12 330); }
.t-o { color: oklch(76% 0.08 290); }
mark.var { background: oklch(80% 0.14 85 / .22); color: oklch(91% 0.13 85); border-radius: 4px; padding: 0 2px; box-shadow: inset 0 -1.5px 0 oklch(80% 0.14 85 / .7); }
mark.var.empty { background: oklch(100% 0 0 / .08); color: inherit; box-shadow: inset 0 -1.5px 0 oklch(100% 0 0 / .3); }
.code-note { margin: 0; padding: 10px 16px 12px; font-size: 13.5px; color: var(--code-dim); border-top: 1px solid oklch(100% 0 0 / .08); }

.seg { display: inline-flex; flex-wrap: wrap; padding: 3px; border-radius: 12px; background: var(--sunk); border: 1px solid var(--line); gap: 2px; max-width: 100%; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 9px; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); font-weight: 600; }
.seg .pk { font: 500 11px var(--mono); color: var(--muted); margin-left: 6px; }

/* ---------------------------------------------------------------- bảng */
.tbl-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); scrollbar-width: thin; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line); }
th { font: 500 11.5px var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); background: var(--sunk); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

/* ---------------------------------------------------------------- mock giao diện */
.mock { margin: 18px 0; max-width: 760px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); overflow: hidden; }
.mock-bar { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: var(--sunk); border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.mock-bar .dots { display: flex; gap: 6px; }
.mock-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.mock-bar .tag { margin-left: auto; font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 12px 16px 4px; font-size: 14px; }
.crumbs span { padding: 2px 9px; border-radius: 6px; background: var(--sunk); border: 1px solid var(--line); }
.crumbs span:last-child { background: var(--ac-soft); border-color: color-mix(in oklch, var(--ac) 45%, var(--line)); font-weight: 600; }
.crumbs i { font-style: normal; color: var(--muted); }
.fld { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr); gap: 4px 16px; padding: 10px 16px; align-items: center; }
.fld + .fld { border-top: 1px solid var(--line); }
.fld .k { font: 500 12.5px var(--mono); color: var(--muted); }
.fld .v { font: 500 14px var(--mono); background: var(--sunk); border: 1px solid var(--line); border-radius: 8px; padding: 6px 11px; overflow-wrap: anywhere; min-width: 0; }
.fld .v.secret { letter-spacing: .15em; }
.fld .v.key { border-color: var(--ac); background: var(--ac-soft); }
.mock-note { padding: 10px 16px 14px; font-size: 14px; color: var(--ink-2); border-top: 1px solid var(--line); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 22px 32px; align-items: start; margin: 16px 0; }
.split > .mock { margin: 0; max-width: none; }
.split .fld { grid-template-columns: minmax(0, 84px) minmax(0, 1fr); }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.step { counter-increment: s; position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; padding-bottom: 14px; }
.step::before { content: counter(s); font: 600 13px/1 var(--mono); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--paper); position: relative; z-index: 1; }
.step::after { content: ''; position: absolute; left: 16.75px; top: 36px; bottom: 2px; width: 1.5px; background: var(--line-2); }
.step:last-child::after { display: none; }
.step p { margin: 5px 0 0; font-size: 15.5px; line-height: 1.45; }
.step.hot::before { background: var(--ac); border-color: var(--ac); color: var(--ac-ink); }

/* 0. phạm vi */
.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.rule { padding: 18px 22px 22px 0; border-bottom: 1px solid var(--line); }
.rule + .rule { padding-left: 22px; border-left: 1px solid var(--line); }
.rule .no { font: 600 12px var(--mono); color: var(--ac-text); }
.rule h3 { font-size: 1.28rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin: 6px 0 8px; }
.rule p { margin: 0; font-size: 15px; color: var(--ink-2); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 840px; }
.chk { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--paper); cursor: pointer; transition: border-color .2s, background .2s; }
.chk:hover { border-color: var(--line-2); }
.chk input { position: absolute; opacity: 0; pointer-events: none; }
.box { width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--line-2); display: grid; place-items: center; margin-top: 1px; transition: background .2s, border-color .2s; }
.box svg { width: 15px; height: 15px; color: var(--ac-ink); opacity: 0; transform: scale(.6); transition: opacity .2s, transform .25s cubic-bezier(.2, .9, .3, 1.3); }
.chk.on { background: var(--ac-soft); border-color: color-mix(in oklch, var(--ac) 45%, var(--line)); }
.chk.on .box { background: var(--ac); border-color: var(--ac); }
.chk.on .box svg { opacity: 1; transform: none; }
.chk input:focus-visible + .box { outline: 2px solid var(--focus); outline-offset: 2px; }
.chk b { font-weight: 650; display: block; }
.chk span.rq { display: block; color: var(--ink-2); font-size: 15px; }
.chk-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 14px; font-size: 14px; color: var(--muted); }
.chk-bar .bar { flex: 0 1 220px; margin: 0; }
.go { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; border: 1.5px solid var(--ink); background: var(--paper); font-size: 15px; }
.go:hover { background: var(--ink); color: var(--paper); }

/* 2. thanh địa chỉ */
.addr { display: grid; gap: 10px; max-width: 760px; }
.addr-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; }
.addr-row .k { font-size: 13.5px; color: var(--muted); }
.urlbar { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 14px; border-radius: 99px; background: var(--paper); border: 1px solid var(--line-2); font: 500 14px var(--mono); box-shadow: var(--shadow); }
.urlbar svg { width: 15px; height: 15px; color: var(--ac-text); flex: none; }
.urlbar span { overflow-wrap: anywhere; min-width: 0; }
.urlbar mark.var { background: var(--ac-soft); color: var(--ac-text); box-shadow: inset 0 -1.5px 0 var(--ac); }
.urlbar mark.var.empty { background: var(--sunk); color: var(--muted); box-shadow: inset 0 -1.5px 0 var(--line-2); }
.open { font-size: 13px; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line-2); text-decoration: none; background: var(--paper); white-space: nowrap; }
.open:hover { background: var(--ink); color: var(--paper); }
.warnbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: color-mix(in oklch, var(--s-med) 16%, var(--paper)); border: 1px solid color-mix(in oklch, var(--s-med) 45%, var(--line)); font-size: 14px; max-width: 760px; }
.warnbar svg { width: 18px; height: 18px; color: color-mix(in oklch, var(--s-med) 70%, var(--ink)); flex: none; }

/* 3. license */
.lic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 820px; margin: 0 0 8px; }
.lic-c { padding: 18px 20px; border: 1.5px solid var(--line-2); border-radius: 14px; background: var(--paper); display: grid; gap: 8px; align-content: start; }
.lic-c .opt { font: 500 12px var(--mono); color: var(--muted); }
.lic-c .opt::before { content: '◯  '; }
.lic-c h3 { margin: 0; font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.lic-c .tag { justify-self: start; font: 600 11px var(--mono); letter-spacing: .07em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; background: var(--ac-soft); color: var(--ac-text); border: 1px solid color-mix(in oklch, var(--ac) 35%, var(--line)); }
.lic-c p { margin: 0; font-size: 15px; color: var(--ink-2); }

/* 4. target */
.fmts { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; max-width: 880px; }
.fmt { padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); display: grid; gap: 6px; min-width: 0; }
.fmt b { font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fmt button { text-align: left; border: 0; background: none; padding: 0; font: 500 13.5px var(--mono); color: var(--ink); overflow-wrap: anywhere; cursor: copy; }
.fmt button:hover { color: var(--ac-text); }
.fmt button.done { color: var(--ok); }
.lab { margin: 20px 0 0; max-width: 880px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); border: 1px solid var(--line-2); border-radius: 16px; background: var(--paper); box-shadow: var(--shadow); overflow: hidden; }
.lab-in { padding: 16px; border-right: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.lab-in label { font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lab-in textarea { width: 100%; min-height: 150px; resize: vertical; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg); padding: 10px 12px; font: 500 13.5px/1.55 var(--mono); }
.lab-in textarea:focus { outline: 2px solid var(--focus); border-color: transparent; }
.lab-in small { color: var(--muted); font-size: 13px; }
.lab-out { padding: 16px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.lab-sum { display: flex; align-items: baseline; gap: 10px; }
.lab-sum b { font: 700 2.4rem/1 var(--f); letter-spacing: -.04em; }
.lab-sum span { color: var(--ink-2); font-size: 14px; }
.rungs { display: grid; gap: 5px; }
.rung { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 9px; border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.rung i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--line-2); }
.rung span:last-child { font: 500 11.5px var(--mono); }
.rung.on { color: var(--ink); border-color: var(--ac); background: var(--ac-soft); font-weight: 600; }
.rung.on i { background: var(--ac); border-color: var(--ac); }
.rung.bad.on { border-color: var(--bad); background: color-mix(in oklch, var(--bad) 8%, var(--paper)); }
.rung.bad.on i { background: var(--bad); border-color: var(--bad); }
.toks { display: flex; flex-wrap: wrap; gap: 6px; }
.tok { display: inline-flex; align-items: baseline; gap: 7px; max-width: 100%; padding: 3px 9px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--sunk); font: 500 12.5px var(--mono); }
.tok em { font: 600 10px var(--mono); font-style: normal; letter-spacing: .07em; text-transform: uppercase; color: var(--ac-text); }
.tok span { overflow-wrap: anywhere; min-width: 0; }
.tok.bad { border-color: var(--bad); background: color-mix(in oklch, var(--bad) 9%, var(--paper)); }
.tok.bad em { color: var(--bad); }
.lab-out .copy2 { justify-self: start; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--paper); font-size: 14.5px; font-weight: 600; text-decoration: none; color: var(--ink); white-space: nowrap; }
.btn:hover { border-color: var(--ink-2); }
.btn.pri { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.pri:hover { background: color-mix(in oklch, var(--ink) 80%, var(--ac)); }
.btn svg { width: 16px; height: 16px; }
.btn[disabled] { opacity: .5; cursor: default; }
.groups { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.groups span { padding: 3px 11px; border-radius: 99px; border: 1px dashed var(--line-2); font-size: 13.5px; color: var(--ink-2); }

/* 5. discovery, 6. template */
.tpls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 14px 16px; }
.tpl { padding: 12px 13px; border: 1.5px solid var(--line); border-radius: 10px; display: grid; gap: 3px; background: var(--paper); }
.tpl b { font-size: 14px; line-height: 1.25; }
.tpl span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.tpl.pick { border-color: var(--ac); background: var(--ac-soft); box-shadow: 0 0 0 3px color-mix(in oklch, var(--ac) 20%, transparent); }
.tpl.pick b::after { content: ' ✓'; color: var(--ac-text); }
.cmp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 760px; margin-top: 16px; }
.cmp > div { padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--paper); }
.cmp b { display: block; font-size: 15px; margin-bottom: 3px; }
.cmp p { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.cmp .adv { border-style: dashed; border-color: color-mix(in oklch, var(--ac) 55%, var(--line)); }

/* 7. credential */
.cred-tabs { margin: 0 0 4px; }
.vtabs { display: flex; gap: 6px; padding: 10px 16px 0; }
.vtabs button { border: 1px solid var(--line-2); background: none; border-radius: 99px; padding: 3px 12px; font-size: 13px; color: var(--ink-2); }
.vtabs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.dd { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; max-width: 760px; margin: 16px 0 0; border-top: 2px solid var(--ink); }
.dd > div { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; font-size: 15.5px; }
.dd > div:nth-child(2n) { padding-left: 16px; border-left: 1px solid var(--line); }
.mk { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in oklch, var(--ok) 14%, transparent); color: var(--ok); }
.mk.no { background: color-mix(in oklch, var(--bad) 12%, transparent); color: var(--bad); }
.mk svg { width: 14px; height: 14px; }

/* 8. trạng thái, thang mở rộng */
.track { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0; margin: 4px 0 8px; max-width: 760px; }
.tstate { flex: 1 1 150px; position: relative; padding: 14px 16px 14px 18px; background: var(--paper); border: 1px solid var(--line-2); display: grid; gap: 2px; }
.tstate:first-child { border-radius: 12px 0 0 12px; }
.tstate:last-child { border-radius: 0 12px 12px 0; }
.tstate + .tstate { margin-left: -1px; }
.tstate b { font: 600 14px var(--mono); }
.tstate span { font-size: 13.5px; color: var(--muted); }
.tstate .pip { position: absolute; top: 14px; right: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.tstate:nth-child(2) .pip { background: var(--ac); animation: pulse 1.6s ease-in-out infinite; }
.tstate:last-child .pip { background: var(--ok); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--ac) 50%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }
.ladder { display: flex; align-items: flex-end; gap: 10px; max-width: 760px; margin: 8px 0 4px; }
.lad { flex: 1 1 0; min-width: 0; padding: 12px 14px; border-radius: 12px 12px 4px 4px; background: var(--ac-soft); border: 1px solid color-mix(in oklch, var(--ac) 40%, var(--line)); display: grid; align-content: end; }
.lad:nth-child(1) { min-height: 74px; }
.lad:nth-child(2) { min-height: 112px; }
.lad:nth-child(3) { min-height: 150px; background: color-mix(in oklch, var(--ac) 22%, var(--paper)); }
.lad b { font-size: 1.2rem; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; }
.lad span { font-size: 13.5px; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 99px; border: 1px solid color-mix(in oklch, var(--bad) 35%, var(--line)); background: color-mix(in oklch, var(--bad) 6%, var(--paper)); font-size: 13.5px; }
.chip::before { content: '✕'; color: var(--bad); font-size: 11px; }

/* 9. plugin */
.plugs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 900px; }
.plug { margin: 0; max-width: none; }
.plug-h { display: flex; align-items: baseline; gap: 10px; padding: 14px 16px 6px; }
.plug-h .pid { font: 700 1.5rem/1 var(--mono); letter-spacing: -.03em; }
.plug-h .pn { font-size: 14.5px; font-weight: 600; }
.plug-r { padding: 0 16px 12px; font-size: 14.5px; color: var(--ink-2); }
.pout { margin: 0 16px; padding: 10px 12px; border-radius: 8px; background: var(--code-bg); color: var(--code-ink); font: 500 13px/1.5 var(--mono); }
.pout .lbl { display: block; font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--code-dim); margin-bottom: 2px; }
.pout.good b { color: oklch(82% 0.14 152); font-weight: 600; }
.pout.none { background: var(--sunk); color: var(--muted); }
.verdict { margin: 12px 16px 16px; padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.verdict svg { width: 16px; height: 16px; flex: none; }
.verdict.good { background: color-mix(in oklch, var(--ok) 12%, var(--paper)); color: color-mix(in oklch, var(--ok) 75%, var(--ink)); }
.verdict.bad { background: color-mix(in oklch, var(--bad) 10%, var(--paper)); color: color-mix(in oklch, var(--bad) 75%, var(--ink)); }

/* 10. kết quả */
.rtabs { display: flex; flex-wrap: wrap; gap: 0; padding: 0 12px; background: var(--sunk); border-bottom: 1px solid var(--line); }
.rtab { border: 0; background: none; padding: 11px 14px; font-size: 14px; color: var(--ink-2); border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.rtab[aria-selected="true"] { color: var(--ink); font-weight: 650; border-bottom-color: var(--ac); }
.rtab-p { padding: 16px; font-size: 15px; color: var(--ink-2); }
.sevs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; max-width: 760px; margin: 18px 0 0; }
.sev { --c: var(--s-info); padding: 10px 12px 11px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--c); display: grid; gap: 2px; }
.sev b { font-size: 14px; font-weight: 650; }
.sev span { font: 500 11px var(--mono); color: var(--muted); }
.s-crit, .sev.crit { --c: var(--s-crit); } .s-high, .sev.high { --c: var(--s-high); } .s-med, .sev.med { --c: var(--s-med); } .s-low, .sev.low { --c: var(--s-low); } .s-info, .sev.info { --c: var(--s-info); }
.vuln { margin: 18px 0; max-width: 820px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); overflow: hidden; }
.vuln-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--sunk); font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.vrow { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 16px; padding: 11px 16px; align-items: baseline; }
.vrow + .vrow { border-top: 1px solid var(--line); }
.vrow .k { font: 600 12.5px var(--mono); color: var(--ink-2); }
.vrow .v { font-size: 15px; color: var(--ink-2); }
.vrow.key { background: var(--ac-soft); box-shadow: inset 3px 0 0 var(--ac); }
.vrow.key .k { color: var(--ac-text); }
.vrow.key .v { color: var(--ink); font-weight: 500; }
.prio { list-style: none; margin: 14px 0 0; padding: 0; max-width: 760px; display: grid; gap: 6px; counter-reset: pr; }
.prio li { counter-increment: pr; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 16px 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); font-size: 15.5px; position: relative; overflow: hidden; }
.prio li::before { content: counter(pr); font: 800 1.5rem/1 var(--f); letter-spacing: -.04em; color: var(--ac); text-align: center; }
.prio li::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ac); opacity: calc(1.1 - var(--i, 0) * .2); }
.prio li:nth-child(1) { --i: 0; } .prio li:nth-child(2) { --i: 1; } .prio li:nth-child(3) { --i: 2; } .prio li:nth-child(4) { --i: 3; } .prio li:nth-child(5) { --i: 4; }
.prio .arr { font: 500 11px var(--mono); color: var(--muted); white-space: nowrap; }

/* 11. xuất báo cáo */
.fmtt { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; max-width: 860px; }
.ft { padding: 14px 14px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); display: grid; gap: 4px; align-content: start; min-width: 0; }
.ft b { font: 700 1.15rem var(--mono); letter-spacing: -.02em; overflow-wrap: anywhere; }
.ft span { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.mx td, .mx th { text-align: center; }
.mx td:first-child, .mx th:first-child { text-align: left; font-weight: 600; }
.mx td:last-child, .mx th:last-child { text-align: left; font-weight: 400; color: var(--ink-2); }
.cell { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 99px; font: 600 11.5px var(--mono); }
.cell.full { background: color-mix(in oklch, var(--ok) 16%, transparent); color: color-mix(in oklch, var(--ok) 78%, var(--ink)); }
.cell.basic { background: color-mix(in oklch, var(--s-med) 22%, transparent); color: color-mix(in oklch, var(--s-med) 55%, var(--ink)); }
.cell.none { background: var(--sunk); color: var(--muted); }
.mx-note { font-size: 13.5px; color: var(--muted); margin: -6px 0 0; }

/* 12. flow */
.lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 1000px; }
.lane { border: 1px solid var(--line-2); border-radius: 14px; background: var(--paper); overflow: hidden; display: grid; align-content: start; min-width: 0; }
.lane h3 { margin: 0; padding: 12px 16px; font-size: 14px; font-weight: 700; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; background: var(--sunk); border-bottom: 1px solid var(--line); }
.lane h3 small { font: 500 11px var(--mono); color: var(--muted); letter-spacing: .05em; }
.lane ol { list-style: none; margin: 0; padding: 8px; display: grid; gap: 2px; }
.back { display: flex; align-items: center; gap: 12px; margin-top: 14px; max-width: 1000px; padding: 12px 16px; border: 1.5px dashed var(--ac); border-radius: 12px; font-size: 15px; color: var(--ink-2); }
.back svg { width: 20px; height: 20px; color: var(--ac-text); flex: none; }

/* 13. nhật ký */
.rec-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 14px; }
.rec-h .grow { margin-right: auto; }
.sumr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; max-width: 880px; }
.sm { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); display: grid; gap: 1px; }
.sm b { font: 700 1.7rem/1.1 var(--f); letter-spacing: -.035em; }
.sm span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.eid-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 0 0 12px; }
.find { flex: 1 1 200px; max-width: 280px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--paper); font-size: 14.5px; }
.sevbar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--sunk); min-width: 110px; }
.sevbar i { display: block; height: 100%; background: var(--c); }
.sevbar i + i { border-left: 1.5px solid var(--paper); }
.cnt { display: flex; flex-wrap: wrap; gap: 2px 9px; font: 500 11.5px var(--mono); color: var(--muted); margin-top: 4px; }
.cnt b { font-weight: 600; color: var(--c); }
.runs td { vertical-align: middle; }
.runs .nm { font-weight: 650; }
.runs .sm2 { font-size: 12.5px; color: var(--muted); }
.runs .act { white-space: nowrap; text-align: right; }
.runs .act button { background: none; border: 0; padding: 4px 6px; font-size: 13px; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.runs .act button:hover { color: var(--ink); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 3px 10px 3px 8px; border-radius: 99px; white-space: nowrap; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.plan { background: var(--sunk); color: var(--muted); }
.pill.run { background: var(--ac-soft); color: var(--ac-text); }
.pill.done { background: color-mix(in oklch, var(--ok) 13%, transparent); color: color-mix(in oklch, var(--ok) 80%, var(--ink)); }
.pill.redo { background: color-mix(in oklch, var(--bad) 11%, transparent); color: color-mix(in oklch, var(--bad) 80%, var(--ink)); }
.auth { font: 600 11.5px var(--mono); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.auth.yes { border-color: color-mix(in oklch, var(--ok) 55%, var(--line)); color: color-mix(in oklch, var(--ok) 78%, var(--ink)); background: color-mix(in oklch, var(--ok) 8%, transparent); }
.auth.no { border-color: color-mix(in oklch, var(--bad) 50%, var(--line)); color: color-mix(in oklch, var(--bad) 78%, var(--ink)); }
.delta { font: 600 11.5px var(--mono); }
.delta.dn { color: var(--ok); } .delta.up { color: var(--bad); } .delta.eq { color: var(--muted); }
.login-note { padding: 16px 18px; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--ink-2); font-size: 15px; }
.none { color: var(--muted); font-size: 14.5px; padding: 18px; text-align: center; }

dialog { border: 0; padding: 0; border-radius: 18px; background: var(--paper); color: var(--ink); width: min(780px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); box-shadow: 0 30px 80px -20px oklch(10% 0.03 255 / .6); }
dialog::backdrop { background: oklch(18% 0.02 255 / .5); backdrop-filter: blur(2px); }
.dlg-h { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--paper); }
.dlg-h h3 { margin: 0; font-size: 1.15rem; font-weight: 700; margin-right: auto; letter-spacing: -.015em; }
.x { width: 34px; height: 34px; border-radius: 8px; border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; }
.x:hover { background: var(--sunk); color: var(--ink); }
.dlg-b { padding: 18px 20px 6px; display: grid; gap: 14px; }
.dlg-f { position: sticky; bottom: 0; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--paper); }
.dlg-f .msg { margin-right: auto; align-self: center; font-size: 13.5px; color: var(--bad); }
.fl { display: grid; gap: 5px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); min-width: 0; }
.fl small { font-weight: 400; color: var(--muted); }
.fl input, .fl textarea, .fl select { width: 100%; min-width: 0; border: 1px solid var(--line-2); border-radius: 9px; background: var(--bg); padding: 9px 11px; font-size: 15px; font-weight: 400; color: var(--ink); }
.fl textarea { resize: vertical; min-height: 76px; line-height: 1.5; }
.fl input:focus, .fl textarea:focus, .fl select:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.row5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.row5 .fl { --c: var(--s-info); }
.row5 .fl > span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 6px; }

/* 14. chẩn đoán */
.diag { list-style: none; margin: 18px 0 8px; padding: 0; max-width: 900px; }
.dq { display: grid; grid-template-columns: minmax(0, 1.15fr) 84px minmax(0, 1fr); align-items: center; position: relative; padding-bottom: 28px; }
.dq::before { content: ''; position: absolute; left: 26px; top: 50%; bottom: 0; width: 1.5px; background: var(--line-2); }
.dq:last-child { padding-bottom: 0; }
.dq:last-child::before { display: none; }
.qb { position: relative; z-index: 1; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: center; padding: 12px 14px 12px 10px; border-radius: 12px; background: var(--paper); border: 1.5px solid var(--ink); }
.qb .qn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 12.5px var(--mono); background: var(--ink); color: var(--paper); }
.qb small { display: block; font: 600 10.5px var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ac-text); margin-bottom: 1px; }
.qb span { font-size: 15px; font-weight: 600; line-height: 1.35; }
.br { position: relative; height: 2px; margin: 0 6px; background: var(--bad); }
.br::after { content: ''; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--bad); border-right: 0; }
.br span { position: absolute; left: 50%; top: -21px; transform: translateX(-50%); font-size: 12px; font-weight: 650; color: var(--bad); white-space: nowrap; }
.fixb { padding: 11px 14px; border-radius: 12px; background: color-mix(in oklch, var(--bad) 6%, var(--paper)); border: 1px dashed color-mix(in oklch, var(--bad) 45%, var(--line)); font-size: 14.5px; color: var(--ink-2); }
.yes { position: absolute; left: 36px; bottom: 5px; font-size: 12px; font-weight: 650; color: var(--ok); }
.diag-end { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 16px; border-radius: 12px; background: color-mix(in oklch, var(--ok) 11%, var(--paper)); border: 1px solid color-mix(in oklch, var(--ok) 40%, var(--line)); font-weight: 600; font-size: 15px; }
.diag-end svg { width: 18px; height: 18px; color: var(--ok); }

.refs { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); max-width: 860px; }
.refs li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.refs .no { font: 600 13px var(--mono); color: var(--ac-text); padding-top: 2px; }
.refs b { font-weight: 650; }
.refs a b { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.refs a:hover b { text-decoration-color: currentColor; }
.refs p { margin: 2px 0 0; font-size: 15px; color: var(--ink-2); }
.refs .u { font: 400 12px var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.foot-page { margin-top: 80px; padding: 26px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 13.5px; color: var(--muted); }
.foot-page p { margin: 0; max-width: 70ch; flex: 1 1 360px; }

/* ---------------------------------------------------------------- tìm, thông số */
.overlay { position: fixed; inset: 0; z-index: 80; background: oklch(18% 0.02 255 / .45); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 14px 14px; }
.sbox { width: min(640px, 100%); background: var(--paper); border-radius: 16px; box-shadow: 0 30px 80px -20px oklch(10% 0.03 255 / .6); overflow: hidden; display: flex; flex-direction: column; max-height: 76vh; }
.sbox input { border: 0; border-bottom: 1px solid var(--line); padding: 18px 20px; font-size: 17px; background: none; outline: none; }
.sres { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.sres a { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none; align-items: baseline; }
.sres a.on, .sres a:hover { background: var(--sunk); }
.sres .ty { font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sres b { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sres small { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shint { padding: 10px 18px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); }
.vars { position: fixed; z-index: 70; top: calc(var(--top) + 8px); right: 14px; width: min(400px, calc(100vw - 28px)); background: var(--paper); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 24px 60px -20px oklch(10% 0.03 255 / .5); padding: 16px; display: grid; gap: 12px; }
.vars h3 { margin: 0; font-size: 15px; font-weight: 700; }
.vars p { margin: 0; font-size: 13px; color: var(--muted); }
.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 3px color-mix(in oklch, var(--ac) 60%, transparent); } 100% { box-shadow: 0 0 0 3px transparent; } }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 90; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }

/* ---------------------------------------------------------------- màn hình hẹp */
@media (max-width: 1180px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sheet { position: fixed; z-index: 55; top: var(--top); right: 0; bottom: 0; margin: 0; width: min(350px, 92vw); max-height: none; border-radius: 16px 0 0 16px; transform: translateX(105%); transition: transform .28s cubic-bezier(.2, .7, .2, 1); }
  body.sheet-open .sheet { transform: none; }
  .fab { display: inline-flex; }
  body.sheet-open .fab { display: none; }
}
@media (max-width: 1020px) {
  .toc-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .phases { display: none; }
  .fmtt { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lanes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .tb .lbl { display: none; }
  .tb { padding: 0 9px; }
  .split, .lab, .plugs, .lic, .cmp, .rules { grid-template-columns: minmax(0, 1fr); }
  .lab-in { border-right: 0; border-bottom: 1px solid var(--line); }
  .rule, .rule + .rule { padding: 16px 0; border-left: 0; }
  .sumr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sevs { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
  .sev { padding: 8px 8px 9px; }
  .sev b { font-size: 12.5px; }
  .addr-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .addr-row .open { justify-self: start; }
  .cycle { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 34px; }
  .loop { display: none; }
  .stop { padding: 0 0 24px 62px; }
  .stop::before { top: 46px; bottom: 0; left: 22px; right: auto; width: 2px; height: auto; }
  .stop:first-of-type::before { left: 22px; }
  .stop:last-child::before { display: none; }
  .loop-note { display: flex; align-items: center; gap: 10px; margin-top: 4px; padding: 10px 14px; border: 1.5px dashed var(--ac); border-radius: 12px; font-size: 14px; color: var(--ink-2); }
  .dq { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .br, .yes { display: none; }
  .fixb { margin-left: 44px; }
  .fixb::before { content: 'Không → '; color: var(--bad); font-weight: 700; }
  .dq::before { top: 34px; }
  .dd { grid-template-columns: minmax(0, 1fr); }
  .dd > div, .dd > div:nth-child(2n) { padding: 12px 0; border-left: 0; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .top { gap: 6px; }
  .brand span.t { font-size: 15px; }
  .who, .hide-m, .brand em { display: none; }
  .toc-cols { grid-template-columns: minmax(0, 1fr); }
  .toc-pop { padding: 16px 14px; }
  .sec-h { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .sec-n { font-size: 3.6rem; line-height: .9; }
  .fld { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .vrow { grid-template-columns: minmax(0, 1fr); }
  .tpls { grid-template-columns: minmax(0, 1fr); }
  .fmtt { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row2, .row5 { grid-template-columns: minmax(0, 1fr); }
  .row5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .code pre { font-size: 12.5px; padding: 12px 13px 14px; }
  .runs thead { display: none; }
  .runs tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 12px; border-bottom: 1px solid var(--line); }
  .runs td { border: 0; padding: 0; }
  .runs td.wide { grid-column: 1 / -1; }
  .ladder { gap: 6px; }
  .lad { padding: 10px; }
  .prio li { grid-template-columns: 32px minmax(0, 1fr); }
  .prio .arr { display: none; }
  .mx { font-size: 13.5px; }
  .mx th, .mx td { padding: 9px 8px; }
  .dlg-b { padding: 14px 14px 4px; }
  .dlg-h, .dlg-f { padding-left: 14px; padding-right: 14px; }
  .sres a { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .stop h3 { font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
@media print {
  .top, .sheet, .fab, .copy, .rec-h .btn, .runs .act, .eid-bar, .toc-pop { display: none !important; }
  .layout { display: block; padding: 0; }
  .code { box-shadow: none; }
}
