/* Hướng dẫn sử dụng Arcpoly Architect - web tra cứu + bản in A4 / A3. Màu theo bộ nhận diện Arcpoly (token --arc-*, giá trị chép từ ui/kit). */
:root {
    --arc-brand: #f54d2d; --arc-brand-600: #d8401f; --arc-brand-700: #b23318; --arc-brand-50: #fff2ef; --arc-brand-100: #ffe2db;
    --arc-bg: #eeeff1; --arc-surface: #ffffff; --arc-surface-2: #f4f5f7; --arc-line: #dfe3e8; --arc-line-soft: #e9ecf0;
    --arc-ink: #232a31; --arc-ink-2: #626c77; --arc-ink-3: #828990; --arc-ok: #17a673; --arc-info: #2d7ff0; --arc-warn: #d98a09;
    --arc-font: 'Be Vietnam Pro', Arial, 'Segoe UI', Roboto, Helvetica, sans-serif;
    --side-w: 310px; --k: 1;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-print]):not([data-theme="light"]) {
        --arc-brand: #f75c3d; --arc-brand-50: #3a2420; --arc-brand-100: #4a2a22; --arc-brand-700: #fa7154;
        --arc-bg: #1b1c20; --arc-surface: #25262c; --arc-surface-2: #2d2e35; --arc-line: #3a3b43; --arc-line-soft: #33343b;
        --arc-ink: #e9ebee; --arc-ink-2: #aab1b9; --arc-ink-3: #8a9097; color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --arc-brand: #f75c3d; --arc-brand-50: #3a2420; --arc-brand-100: #4a2a22; --arc-brand-700: #fa7154;
    --arc-bg: #1b1c20; --arc-surface: #25262c; --arc-surface-2: #2d2e35; --arc-line: #3a3b43; --arc-line-soft: #33343b;
    --arc-ink: #e9ebee; --arc-ink-2: #aab1b9; --arc-ink-3: #8a9097; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--arc-font); color: var(--arc-ink); background: var(--arc-surface); font-size: calc(14.5px * var(--k)); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--arc-brand-700); text-decoration: none; }
a:hover { text-decoration: underline; }
kbd { font-family: var(--arc-font); font-size: .86em; font-weight: 600; padding: .05em .45em; border: 1px solid var(--arc-line); border-bottom-width: 2px; border-radius: 4px; background: var(--arc-surface-2); white-space: nowrap; }
b { font-weight: 650; }

/* ------------------------------------------------ web */
.m-web { background: var(--arc-bg); }
.w-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; height: 54px; padding: 0 16px; background: var(--arc-surface); border-bottom: 1px solid var(--arc-line); }
.w-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; color: var(--arc-ink); }
.w-logo i { width: 26px; height: 26px; border-radius: 7px; background: var(--arc-brand); display: grid; place-items: center; color: #fff; font-style: normal; font-size: 14px; font-weight: 800; }
.w-logo .w-ico { width: 26px; height: 26px; display: block; }
.w-logo small { font-weight: 500; color: var(--arc-ink-3); font-size: 12.5px; }
.w-top .sp { flex: 1; }
.w-btn { border: 1px solid var(--arc-line); background: var(--arc-surface); color: var(--arc-ink); border-radius: 6px; height: 30px; padding: 0 10px; font: inherit; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.w-btn:hover { border-color: var(--arc-brand); color: var(--arc-brand-700); }
.w-menu { display: none; }
.w-wrap { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: calc(100vh - 54px); }
.w-side { position: sticky; top: 54px; height: calc(100vh - 54px); overflow: auto; background: var(--arc-surface); border-right: 1px solid var(--arc-line); padding: 14px 10px 30px; }
.w-search { position: relative; margin: 0 4px 12px; }
.w-search input { width: 100%; height: 36px; border: 1px solid var(--arc-line); border-radius: 8px; padding: 0 10px 0 32px; font: inherit; font-size: 13.5px; background: var(--arc-surface-2); color: var(--arc-ink); outline: none; }
.w-search input:focus { border-color: var(--arc-brand); background: var(--arc-surface); }
.w-search svg { position: absolute; left: 10px; top: 10px; width: 16px; height: 16px; stroke: var(--arc-ink-3); fill: none; stroke-width: 2; }
.w-toc { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.w-toc .ch > a { display: flex; gap: 8px; padding: 6px 8px; border-radius: 6px; font-weight: 600; color: var(--arc-ink); }
.w-toc .ch > a .no { color: var(--arc-ink-3); font-weight: 500; min-width: 18px; }
.w-toc .ch > a .tag { margin-left: auto; font-size: 10.5px; font-weight: 600; color: var(--arc-ok); border: 1px solid currentColor; border-radius: 99px; padding: 0 6px; line-height: 16px; height: 18px; align-self: center; }
.w-toc .ch > a:hover, .w-toc a.on { background: var(--arc-brand-50); text-decoration: none; }
.w-toc a.on { color: var(--arc-brand-700) !important; }
.w-toc ul { list-style: none; margin: 0 0 4px 0; padding: 0 0 0 26px; display: none; }
.w-toc .ch.open > ul { display: block; }
.w-toc ul a { display: block; padding: 3px 8px; border-radius: 5px; color: var(--arc-ink-2); }
.w-toc ul a:hover { background: var(--arc-surface-2); text-decoration: none; }
.w-toc .part { margin: 14px 8px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--arc-ink-3); }
.w-results { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.w-results li a { display: block; padding: 6px 8px; border-radius: 6px; color: var(--arc-ink); }
.w-results li a:hover { background: var(--arc-brand-50); text-decoration: none; }
.w-results li small { display: block; color: var(--arc-ink-3); font-size: 12px; }
.w-results .none { color: var(--arc-ink-3); padding: 6px 8px; }
.w-main { padding: 26px 36px 80px; min-width: 0; }
.w-page { max-width: 960px; margin: 0 auto; background: var(--arc-surface); border: 1px solid var(--arc-line); border-radius: 10px; padding: 34px 44px 50px; }
.w-crumb { font-size: 12.5px; color: var(--arc-ink-3); margin-bottom: 4px; }
.w-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--arc-line); font-size: 13.5px; }
@media (max-width: 860px) {
    .w-wrap { grid-template-columns: minmax(0, 1fr); }
    .w-side { position: fixed; left: 0; top: 54px; width: min(var(--side-w), 88vw); z-index: 6; transform: translateX(-102%); transition: transform .18s; box-shadow: 0 8px 30px rgba(0,0,0,.18); }
    .w-side.open { transform: none; }
    .w-menu { display: inline-flex; }
    .w-main { padding: 12px 16px 60px; }
    .w-page { padding: 20px 16px 36px; border-radius: 8px; }
    .w-logo small { display: none; }
}

/* ------------------------------------------------ nội dung chung */
.chap-head { margin: 0 0 18px; }
.chap-head .kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--arc-brand); }
h1 { font-size: 1.95em; line-height: 1.25; margin: 4px 0 10px; letter-spacing: -.01em; }
.intro { color: var(--arc-ink-2); font-size: 1.04em; margin: 0 0 8px; }
.badge-auto { display: inline-block; margin: 4px 0 6px; font-size: 12px; color: var(--arc-warn); border: 1px solid currentColor; border-radius: 99px; padding: 0 9px; }
section.sec { margin: 34px 0 0; padding-top: 6px; }
section.sec + section.sec { border-top: 1px solid var(--arc-line-soft); padding-top: 26px; }
h2 { font-size: 1.38em; line-height: 1.3; margin: 0 0 8px; display: flex; gap: 10px; align-items: baseline; }
h2 .no { color: var(--arc-brand); font-weight: 700; }
h3 { font-size: 1.02em; margin: 20px 0 8px; color: var(--arc-ink); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
h3::before { content: ''; display: inline-block; width: 4px; height: .9em; background: var(--arc-brand); border-radius: 2px; margin-right: 8px; vertical-align: -1px; }
.purpose { margin: 0 0 10px; }
.access { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 10px 0 6px; padding: 10px 14px; border: 1px solid var(--arc-line); border-left: 3px solid var(--arc-brand); border-radius: 6px; background: var(--arc-surface-2); font-size: .94em; }
.access dt { color: var(--arc-ink-3); font-weight: 600; }
.access dd { margin: 0; }
ol.steps { counter-reset: st; list-style: none; padding: 0; margin: 6px 0; }
ol.steps > li { counter-increment: st; position: relative; padding: 2px 0 6px 36px; }
ol.steps > li::before { content: counter(st); position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%; background: var(--arc-brand); color: #fff; font-weight: 700; font-size: .82em; display: grid; place-items: center; }
figure { margin: 14px 0 16px; break-inside: avoid; }
figure .shot { border: 1px solid var(--arc-line); border-radius: 6px; overflow: hidden; background: #fff; width: fit-content; max-width: 100%; margin: 0 auto; }
figure figcaption, figure .legend { max-width: 100%; }
figure img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
figure img.small { max-width: min(100%, 460px); }
figcaption { font-size: .88em; color: var(--arc-ink-2); margin-top: 6px; }
figcaption b { color: var(--arc-ink); }
.legend { list-style: none; padding: 0; margin: 8px 0 0; columns: 2; column-gap: 24px; font-size: .9em; }
.legend li { break-inside: avoid; display: flex; gap: 8px; padding: 1px 0; }
.legend li span { flex: none; width: 19px; height: 19px; border-radius: 50%; background: var(--arc-brand); color: #fff; font-size: .78em; font-weight: 700; display: grid; place-items: center; margin-top: 2px; }
table.t { width: 100%; border-collapse: collapse; margin: 8px 0 12px; font-size: .92em; break-inside: auto; }
table.t caption { text-align: left; font-weight: 650; margin-bottom: 6px; }
table.t th { text-align: left; background: var(--arc-surface-2); color: var(--arc-ink-2); font-weight: 650; font-size: .92em; }
table.t th, table.t td { border: 1px solid var(--arc-line); padding: 6px 9px; vertical-align: top; }
table.t td:first-child { font-weight: 600; width: 32%; }
table.t tr { break-inside: avoid; }
table.t.keys td:first-child { width: auto; }
table.t.keys td:nth-child(2), table.t.keys td:nth-child(3) { width: 90px; white-space: nowrap; }
.callout { margin: 12px 0; padding: 10px 14px 10px 14px; border-radius: 6px; border: 1px solid; font-size: .94em; break-inside: avoid; }
.callout .h { font-weight: 700; display: block; margin-bottom: 2px; }
.callout ul { margin: 0; padding-left: 18px; }
.callout.tip { border-color: color-mix(in srgb, var(--arc-ok) 45%, transparent); background: color-mix(in srgb, var(--arc-ok) 7%, var(--arc-surface)); }
.callout.tip .h { color: var(--arc-ok); }
.callout.note { border-color: color-mix(in srgb, var(--arc-warn) 50%, transparent); background: color-mix(in srgb, var(--arc-warn) 8%, var(--arc-surface)); }
.callout.note .h { color: var(--arc-warn); }
.related { font-size: .92em; color: var(--arc-ink-2); margin-top: 10px; }
.related a { margin-right: 4px; }
.cmdlist { width: 100%; border-collapse: collapse; font-size: .9em; margin: 6px 0 4px; }
.cmdlist td, .cmdlist th { border-bottom: 1px solid var(--arc-line-soft); padding: 7px 8px; vertical-align: top; text-align: left; }
.cmdlist th { font-size: .86em; color: var(--arc-ink-3); font-weight: 600; border-bottom: 1px solid var(--arc-line); }
.cmdlist td.nm { font-weight: 650; width: 25%; }
.cmdlist td.nm small { display: block; font-weight: 400; color: var(--arc-ink-3); font-size: .86em; margin-top: 2px; }
.cmdlist td.k { width: 82px; white-space: nowrap; }
.cmdlist .w { color: var(--arc-ok); font-size: .85em; font-weight: 600; }
:target > h2, .flash > h2 { animation: flash 1.4s ease-out; }
@keyframes flash { from { background: var(--arc-brand-100); } to { background: transparent; } }

/* ------------------------------------------------ bản in */
.m-print { background: #fff; color: #1f252b; }
.m-a4 { --k: 0.74; }
.m-a3 { --k: 1.02; }
@page { size: A4; margin: 14mm 15mm 16mm 15mm; }
html[data-print="a3"] { }
.m-print .p-cover { height: calc(297mm - 31mm); display: flex; flex-direction: column; justify-content: space-between; break-after: page; }
.m-a3 .p-cover { height: calc(420mm - 31mm); }
.p-cover .top { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.3em; }
.p-cover .top .w-ico { width: 38px; height: 38px; display: block; }
.p-cover .top i { width: 34px; height: 34px; border-radius: 8px; background: var(--arc-brand); display: grid; place-items: center; color: #fff; font-style: normal; font-weight: 800; }
.p-cover .mid { border-left: 6px solid var(--arc-brand); padding-left: 22px; }
.p-cover .mid .k { font-size: 1.1em; letter-spacing: .14em; text-transform: uppercase; color: var(--arc-brand); font-weight: 700; }
.p-cover .mid h1 { font-size: 3.3em; margin: 8px 0 14px; }
.p-cover .mid p { font-size: 1.2em; color: var(--arc-ink-2); max-width: 70%; }
.p-cover .bot { display: flex; justify-content: space-between; color: var(--arc-ink-2); font-size: .95em; border-top: 1px solid var(--arc-line); padding-top: 10px; }
.p-cover .hero { border: 1px solid var(--arc-line); border-radius: 6px; overflow: hidden; }
.p-cover .hero img { display: block; width: 100%; }
.p-toc { break-after: page; }
.p-toc h1 { margin-bottom: 18px; }
.p-toc ol { list-style: none; padding: 0; margin: 0; }
.p-toc > ol > li { margin: 0 0 10px; break-inside: avoid; }
.p-toc .c { font-weight: 700; font-size: 1.08em; display: flex; gap: 10px; border-bottom: 1px solid var(--arc-line); padding-bottom: 3px; }
.p-toc .c .n { color: var(--arc-brand); min-width: 28px; }
.p-toc ol ol { columns: 2; column-gap: 26px; margin-top: 4px; }
.p-toc ol ol li { display: flex; gap: 8px; font-size: .93em; padding: 1px 0; break-inside: avoid; }
.p-toc ol ol li .n { color: var(--arc-ink-3); min-width: 30px; }
.p-toc .soon { font-weight: 500; font-size: .8em; color: var(--arc-ink-3); }
.m-print .chap { break-before: page; }
.m-print .chap-head { border-bottom: 2px solid var(--arc-brand); padding-bottom: 10px; margin-bottom: 8px; }
.m-print h1 { font-size: 2.2em; }
.m-print section.sec { break-before: auto; }
.m-print h2 { break-after: avoid; }
.m-print h3 { break-after: avoid; }
.m-print .p-sec-break { break-before: page; }
.m-print figure .shot { border-color: #cfd5dc; }
.m-a4 figure img { max-height: 170mm; width: auto; }
.m-a3 figure img { max-height: 250mm; width: auto; }
.m-print .cmdlist { font-size: .86em; }
.m-print a { color: inherit; }
.m-print .related a { color: var(--arc-brand-700); }
/* [11-11-2026] hai ngôn ngữ + bảng cuộn ngang trên điện thoại */
.w-lang { display: inline-flex; gap: 0; margin-right: 4px; }
.w-lang .w-btn { border-radius: 0; padding: 0 9px; font-weight: 600; font-size: 12px; }
.w-lang .w-btn:first-child { border-radius: 6px 0 0 6px; }
.w-lang .w-btn:last-child { border-radius: 0 6px 6px 0; margin-left: -1px; }
.w-lang .w-btn.on { background: var(--arc-brand); border-color: var(--arc-brand); color: #fff; cursor: default; }
.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.m-print .tw { overflow: visible; }
@media (max-width: 640px) { .w-pr { display: none; } .w-logo small { display: none; } }
