/* InvoiceNET Help Center — follows the InvoiceNET portal look: Inter, slate canvas, navy primary,
   white rounded panels, small uppercase tracked labels, a dark navy feature card. */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #123d67;
  --primary-hover: #0d2f50;
  --primary-ink: #ffffff;
  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --blue-ink: #1d4ed8;
  --navy-card: #0f172a;
  --navy-card-2: #1e293b;
  --navy-ink: #e2e8f0;
  --ok: #047857;
  --ok-soft: #ecfdf5;
  --warn: #92400e;
  --warn-soft: #fef3c7;
  --warn-line: #fcd34d;
  --bad: #b91c1c;
  --bad-soft: #fef2f2;
  --violet: #6d28d9;
  --violet-soft: #f5f3ff;
  --code-bg: #0f172a;
  --code-ink: #e2e8f0;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius: 12px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sidebar: 256px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1120; --surface: #111a2e; --surface-2: #17223a; --ink: #e5ebf5; --ink-2: #c3cede; --muted: #8b9ab3; --line: #22304b;
    --primary: #3b82c4; --primary-hover: #4a92d6; --primary-ink: #ffffff; --blue: #60a5fa; --blue-soft: #14233f; --blue-ink: #93c5fd;
    --navy-card: #050b18; --navy-card-2: #101a30; --navy-ink: #e2e8f0;
    --ok: #34d399; --ok-soft: #0c2a22; --warn: #fbbf24; --warn-soft: #2a2010; --warn-line: #78560f; --bad: #f87171; --bad-soft: #2c1414;
    --violet: #c4b5fd; --violet-soft: #221a3d; --code-bg: #050b18; --code-ink: #e2e8f0;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -14px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1120; --surface: #111a2e; --surface-2: #17223a; --ink: #e5ebf5; --ink-2: #c3cede; --muted: #8b9ab3; --line: #22304b;
  --primary: #3b82c4; --primary-hover: #4a92d6; --primary-ink: #ffffff; --blue: #60a5fa; --blue-soft: #14233f; --blue-ink: #93c5fd;
  --navy-card: #050b18; --navy-card-2: #101a30; --navy-ink: #e2e8f0;
  --ok: #34d399; --ok-soft: #0c2a22; --warn: #fbbf24; --warn-soft: #2a2010; --warn-line: #78560f; --bad: #f87171; --bad-soft: #2c1414;
  --violet: #c4b5fd; --violet-soft: #221a3d; --code-bg: #050b18; --code-ink: #e2e8f0;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -14px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--surface); }
a { color: var(--blue-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
button { font: inherit; color: inherit; cursor: pointer; }
code, kbd, pre { font-family: var(--mono); }
.label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ------------------------------------------------ shell */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; display: flex; align-items: center; gap: 16px; height: 64px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; flex-direction: column; line-height: 1; color: var(--ink); text-decoration: none !important; min-width: 0; }
.brand .word { font-size: 26px; font-weight: 900; letter-spacing: -.03em; color: var(--primary); }
:root[data-theme="dark"] .brand .word { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand .word { color: var(--ink); } }
.brand .word b { color: var(--blue); font-weight: 900; }
.brand .tag { font-size: 8.5px; font-weight: 600; letter-spacing: .22em; color: var(--ink-2); margin-top: 3px; white-space: nowrap; }
.help-pill { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ok); background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 25%, transparent); padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.top-search { flex: 1; max-width: 560px; margin-left: auto; position: relative; }
.top-search button.fake { width: 100%; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; color: var(--muted); text-align: left; }
.top-search kbd { margin-left: auto; font-size: 11px; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; background: var(--surface); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-2); }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid transparent; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; text-decoration: none !important; }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-soft { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.btn-ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }

.layout { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: calc(100% - 64px); }
.sidebar { position: sticky; top: calc(64px + env(safe-area-inset-top, 0px)); align-self: start; height: calc(100vh - 64px - env(safe-area-inset-top, 0px)); overflow-y: auto; padding: 20px 16px 32px max(16px, env(safe-area-inset-left, 0px)); background: var(--surface); border-right: 1px solid var(--line); }
.nav-group { display: grid; gap: 2px; margin-bottom: 20px; }
.nav-group .label { padding: 0 14px 6px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-radius: 12px; color: var(--ink-2); font-size: 14.5px; font-weight: 500; text-decoration: none !important; }
.nav-link svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.nav-link:hover { background: var(--surface-2); }
.nav-link.active { background: var(--blue-soft); color: var(--primary); font-weight: 600; }
:root[data-theme="dark"] .nav-link.active { color: var(--blue-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav-link.active { color: var(--blue-ink); } }
.nav-link.active svg { color: var(--blue); }
.nav-link .count { margin-left: auto; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

main { min-width: 0; padding-block: 28px 80px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 900px) { main { padding-left: 32px; padding-right: 32px; } }
.page { max-width: 1180px; margin: 0 auto; display: grid; gap: 24px; }

/* ------------------------------------------------ panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow); padding: 24px; min-width: 0; }
.panel-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.head-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); flex: none; border: 1px solid color-mix(in srgb, var(--blue) 18%, transparent); }
.page-title { margin: 0; font-size: clamp(22px, 3vw, 28px); line-height: 1.15; font-weight: 800; letter-spacing: -.01em; text-transform: uppercase; text-wrap: balance; }
.page-sub { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.crumbs { font-size: 12px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }

/* hero */
.hero { position: relative; overflow: hidden; background: var(--navy-card); color: var(--navy-ink); border-radius: var(--radius-xl); padding: clamp(24px, 4vw, 44px); box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 320px; height: 320px; border-radius: 50%; border: 40px solid rgba(96, 165, 250, .07); pointer-events: none; }
.hero h1 { margin: 6px 0 8px; font-size: clamp(26px, 4.4vw, 44px); line-height: 1.05; font-weight: 900; letter-spacing: -.02em; text-transform: uppercase; text-wrap: balance; max-width: 18ch; }
.hero p { margin: 0 0 22px; color: #a8b5ca; max-width: 60ch; }
.hero .label { color: #93c5fd; }
.hero-search { display: flex; gap: 10px; max-width: 720px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-search input { flex: 1 1 260px; min-width: 0; height: 52px; border-radius: 14px; border: 1px solid #334155; background: #0b1324; color: #f1f5f9; padding: 0 16px 0 44px; font: inherit; font-size: 16px; }
.hero-search .ico { position: absolute; left: 14px; top: 16px; color: #64748b; }
.hero-search .btn { height: 52px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; position: relative; z-index: 1; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); text-decoration: none !important; }
.hero .chip { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #dbe4f0; }
.hero .chip:hover { background: rgba(255,255,255,.12); }
.mode-toggle { display: inline-flex; gap: 4px; padding: 4px; background: rgba(255,255,255,.06); border-radius: 12px; margin-bottom: 14px; }
.mode-toggle span { font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 5px 10px; border-radius: 8px; }
.mode-toggle .on { background: #f59e0b; color: #1f1300; }

/* stat cards */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.stat { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 20px; text-decoration: none !important; color: var(--ink); box-shadow: var(--shadow); }
.stat:hover { border-color: color-mix(in srgb, var(--blue) 40%, var(--line)); }
.stat .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.stat.g .ic { background: var(--ok-soft); color: var(--ok); }
.stat.v .ic { background: var(--violet-soft); color: var(--violet); }
.stat .badge { position: absolute; right: 16px; top: 16px; }
.stat .num { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 12px; line-height: 1.1; }
.stat .foot { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 6px; gap: 8px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-ink); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.violet { background: var(--violet-soft); color: var(--violet); }
.badge.muted { background: var(--surface-2); color: var(--muted); }

.deadline { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 16px 20px; border-radius: var(--radius-lg); background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--ink); }
.deadline .days { font-size: 28px; font-weight: 900; color: var(--warn); font-variant-numeric: tabular-nums; line-height: 1; }
.deadline p { margin: 0; flex: 1 1 280px; font-size: 14px; }

/* grids of cards */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { display: flex; flex-direction: column; gap: 6px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); color: var(--ink); text-decoration: none !important; min-width: 0; }
.card:hover { border-color: color-mix(in srgb, var(--blue) 45%, var(--line)); box-shadow: var(--shadow); }
.card h3 { margin: 0; font-size: 15.5px; line-height: 1.3; font-weight: 700; }
.card p { margin: 0; color: var(--muted); font-size: 13.5px; }
.card .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.cat-card .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--primary); margin-bottom: 6px; }
:root[data-theme="dark"] .cat-card .ic { color: var(--blue-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cat-card .ic { color: var(--blue-ink); } }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 8px 0 -8px; }
.section-title h2 { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }

.scenario-card .codes { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 12px; margin-top: 8px; color: var(--muted); }
.scenario-card .codes code { color: var(--ink); font-size: 11.5px; overflow-wrap: anywhere; }

/* ------------------------------------------------ article */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: start; }
.toc { position: sticky; top: 88px; display: grid; gap: 4px; font-size: 13px; }
.toc a { color: var(--muted); padding: 4px 10px; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--ink); border-color: var(--blue); text-decoration: none; }
.prose { font-size: 15.5px; color: var(--ink); max-width: 76ch; }
.prose h2, .prose h3 { scroll-margin-top: 90px; }
.prose h3 { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); margin: 28px 0 10px; }
:root[data-theme="dark"] .prose h3 { color: var(--blue-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .prose h3 { color: var(--blue-ink); } }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 14px; }
.prose li { margin: 4px 0; }
.prose li input[type=checkbox] { margin-right: 6px; accent-color: var(--ok); }
.prose code { font-size: .86em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; overflow-wrap: anywhere; }
.prose pre { background: var(--code-bg); color: var(--code-ink); padding: 16px; border-radius: var(--radius); overflow-x: auto; font-size: 12.5px; line-height: 1.55; }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.prose blockquote { margin: 0 0 16px; padding: 12px 16px; border-radius: var(--radius); background: var(--blue-soft); border: 1px solid color-mix(in srgb, var(--blue) 25%, transparent); color: var(--ink); }
.prose blockquote p:last-child { margin: 0; }
.table-wrap { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.prose table, table.data { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.prose th, table.data th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); font-weight: 700; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.prose td, table.data td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tr:last-child td, table.data tr:last-child td { border-bottom: 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 4px 0 20px; }
.fact { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; min-width: 0; }
.fact .label { font-size: 10px; }
.fact code { font-size: 13px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; display: grid; gap: 10px; }
.ask-inline { background: var(--navy-card); color: var(--navy-ink); border-radius: var(--radius-lg); padding: 16px; display: grid; gap: 10px; }
.ask-inline p { margin: 0; font-size: 13px; color: #a8b5ca; }
.helpful { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; margin-top: 24px; }

/* ------------------------------------------------ tool controls */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.input, .select { height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 12px; font: inherit; font-size: 14px; min-width: 0; }
.input { flex: 1 1 240px; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 9px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.env-seg { align-self: center; }
.env-seg button[data-e="sandbox"].on { background: var(--ok-soft); color: var(--ok); }
.env-seg button[data-e="live"].on { background: var(--blue-soft); color: var(--blue-ink); }
.result-count { font-size: 12px; color: var(--muted); }

/* rules */
.rule-list { display: grid; gap: 10px; }
.rule { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.rule.fatal { border-left: 4px solid var(--bad); }
.rule.warning { border-left: 4px solid var(--warn-line); }
.rule summary { list-style: none; cursor: pointer; padding: 14px 16px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; }
.rule summary::-webkit-details-marker { display: none; }
.rule .rid { font-family: var(--mono); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.rule .rplain { font-size: 14px; color: var(--ink); }
.rule .rmsg { grid-column: 2 / 4; font-size: 12.5px; color: var(--muted); }
.rule-body { padding: 0 16px 16px; display: grid; gap: 10px; font-size: 13.5px; }
.rule-body .row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; }
.rule-body .k { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.term-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.term-chip { font-size: 12px; padding: 3px 8px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.term-chip b { font-family: var(--mono); font-weight: 700; color: var(--ink); margin-right: 4px; }
mark { background: color-mix(in srgb, #facc15 45%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }

/* fields table */
.field-group-row td { background: var(--surface-2); font-weight: 700; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.req { font-weight: 800; font-size: 11px; padding: 2px 7px; border-radius: 6px; }
.req.M { background: var(--bad-soft); color: var(--bad); }
.req.C { background: var(--warn-soft); color: var(--warn); }
.req.O { background: var(--surface-2); color: var(--muted); }
td.mono, .mono { font-family: var(--mono); font-size: 12px; }

/* portal form guide */
.wizard-steps { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wizard-steps button { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 6px 12px 6px 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.wizard-steps button .n { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.wizard-steps button.on { border-color: var(--blue); color: var(--ink); }
.wizard-steps button.on .n { background: var(--primary); color: #fff; }
.form-guide { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.mock { display: grid; gap: 16px; }
.mock-section { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; background: var(--surface); }
.mock-section > .label { display: block; margin-bottom: 12px; color: var(--ink-2); }
.mock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.mfield { display: grid; gap: 4px; padding: 8px; margin: -8px; border-radius: 12px; border: 2px solid transparent; cursor: pointer; text-align: left; background: none; }
.mfield:hover { background: var(--surface-2); }
.mfield.sel { border-color: var(--blue); background: var(--blue-soft); }
.mfield .flabel { display: flex; gap: 6px; align-items: center; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.mfield .flabel .m { color: var(--bad); }
.mfield .fake-input { height: 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 0 10px; display: flex; align-items: center; font-size: 13px; color: var(--ink); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mfield .fake-input.empty { color: var(--muted); }
.flag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.flag { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 13px; font-weight: 600; cursor: pointer; text-align: left; }
.flag input { accent-color: var(--primary); width: 16px; height: 16px; }
.flag.sel { border-color: var(--blue); background: var(--blue-soft); }
.txn-code { font-family: var(--mono); font-size: 26px; font-weight: 800; letter-spacing: .12em; display: flex; gap: 2px; flex-wrap: wrap; }
.txn-code span { width: 30px; text-align: center; border-radius: 8px; background: var(--surface-2); padding: 2px 0; }
.txn-code span.on { background: var(--primary); color: #fff; }
.inspector { position: sticky; top: 88px; display: grid; gap: 12px; }
.inspector .term { font-family: var(--mono); font-size: 12px; }
.inspector h3 { margin: 0; font-size: 18px; font-weight: 800; }

/* finder */
.q-step { display: grid; gap: 12px; }
.options { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.option { text-align: left; padding: 16px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); display: grid; gap: 4px; }
.option:hover { border-color: var(--blue); }
.option b { font-size: 15px; }
.option span { color: var(--muted); font-size: 13px; }
.finder-path { display: flex; flex-wrap: wrap; gap: 6px; }

/* search palette */
.palette-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(15, 23, 42, .45); display: grid; justify-items: center; align-items: start; padding: calc(env(safe-area-inset-top, 0px) + 8vh) max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); }
.palette { width: min(720px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); overflow: hidden; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.palette-input input { flex: 1; min-width: 0; height: 56px; border: 0; outline: 0; background: transparent; font: inherit; font-size: 17px; color: var(--ink); }
.palette-results { max-height: min(60vh, 520px); overflow-y: auto; padding: 8px; }
.pr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink); text-decoration: none !important; }
.pr.on, .pr:hover { background: var(--blue-soft); }
.pr .t { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr .s { grid-column: 2; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr .badge { align-self: start; margin-top: 2px; min-width: 64px; justify-content: center; }
.palette-foot { display: flex; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.palette-ask { display: flex; width: 100%; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--blue) 50%, var(--line)); background: none; text-align: left; color: var(--ink); margin-bottom: 6px; }

/* ------------------------------------------------ chat */
.chat-fab { position: fixed; z-index: 70; right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 20px 0 16px; border-radius: 18px; border: 0; background: var(--primary); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; box-shadow: 0 16px 40px -12px rgba(18, 61, 103, .65); }
.chat-fab:hover { background: var(--primary-hover); }
.chat-fab .dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .25); }
.chat-panel { position: fixed; z-index: 80; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: min(480px, calc(100vw - 32px)); height: min(760px, calc(100vh - 96px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 40px 100px -30px rgba(0,0,0,.5); overflow: hidden; }
.chat-panel.full { position: static; width: auto; height: calc(100vh - 170px); min-height: 520px; box-shadow: var(--shadow); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--navy-card); color: var(--navy-ink); }
.chat-head .av { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(140deg, #1d4ed8, #123d67); display: grid; place-items: center; color: #fff; flex: none; }
.chat-head h3 { margin: 0; font-size: 14px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.chat-head p { margin: 0; font-size: 12px; color: #94a3b8; }
.chat-head .icon-btn { margin-left: auto; background: transparent; border-color: #334155; color: #cbd5e1; width: 34px; height: 34px; }
.chat-head .icon-btn + .icon-btn { margin-left: 0; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; background: var(--bg); }
.msg { max-width: 100%; display: grid; gap: 8px; min-width: 0; }
.msg.user { justify-self: end; align-self: flex-end; max-width: 85%; background: var(--primary); color: #fff; padding: 10px 14px; border-radius: 16px 16px 4px 16px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.bot .bubble { background: var(--surface); border: 1px solid var(--line); padding: 12px 14px; border-radius: 16px 16px 16px 4px; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.msg.bot .bubble.prose { max-width: none; font-size: 14px; }
.msg.bot .bubble h3 { margin-top: 14px; }
.msg.bot .bubble > :last-child { margin-bottom: 0; }
.msg .mini-label { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.rule-chips { display: grid; gap: 6px; }
.rchip { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; font-size: 12.5px; }
.rchip summary { cursor: pointer; padding: 8px 10px; display: flex; gap: 8px; align-items: baseline; list-style: none; }
.rchip summary::-webkit-details-marker { display: none; }
.rchip summary code { font-weight: 700; white-space: nowrap; }
.rchip summary span { color: var(--ink-2); }
.rchip .rc-body { padding: 0 10px 10px; color: var(--muted); display: grid; gap: 6px; }
.rchip.fatal summary code { color: var(--bad); }
.rchip.warning summary code { color: var(--warn); }
.src-links { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-suggest button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; color: var(--ink-2); text-align: left; }
.chat-suggest button:hover { border-color: var(--blue); color: var(--ink); }
.chat-foot { border-top: 1px solid var(--line); padding: 12px; display: grid; gap: 8px; background: var(--surface); }
.chat-form { display: flex; gap: 8px; align-items: flex-end; }
.chat-form textarea { flex: 1; min-width: 0; resize: none; min-height: 44px; max-height: 160px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); padding: 11px 14px; font: inherit; font-size: 14px; line-height: 1.45; }
.chat-form button { height: 44px; width: 44px; border-radius: 14px; border: 0; background: var(--primary); color: #fff; display: grid; place-items: center; flex: none; }
.chat-form button:disabled { opacity: .5; cursor: default; }
.chat-note { font-size: 11px; color: var(--muted); text-align: center; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite both; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* misc */
.empty { padding: 32px; text-align: center; color: var(--muted); }
.glossary dl { margin: 0; display: grid; gap: 2px; }
.glossary dt { font-weight: 700; margin-top: 12px; }
.glossary dd { margin: 0; color: var(--ink-2); }
.footer-notice { max-width: 1180px; margin: 16px auto 0; padding: 12px 16px; border: 1px solid #f0c36d; border-inline-start: 4px solid #d99a1f; border-radius: 10px; background: #fff8e6; color: #5b4204; font-size: 13px; line-height: 1.55; }
.footer-notice strong { color: #3f2d00; }
.footer-notice a { color: #7a4f00; font-weight: 600; text-decoration: underline; }
:root[data-theme="dark"] .footer-notice { background: #2b2410; border-color: #6b5420; color: #ead9a8; }
:root[data-theme="dark"] .footer-notice strong { color: #fff1c9; }
:root[data-theme="dark"] .footer-notice a { color: #f5d27a; }
@media print { .footer-notice { display: none !important; } }
.footer { max-width: 1180px; margin: 40px auto 0; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.hide-sm { }
.menu-btn { display: none; }
.scrim { display: none; }

@media (max-width: 1080px) { .article-layout { grid-template-columns: minmax(0, 1fr); } .toc-col { display: none; } .form-guide { grid-template-columns: minmax(0, 1fr); } .inspector { position: static; } }
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 90; left: 0; top: 0; bottom: 0; height: auto; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .2s ease; padding-top: calc(20px + env(safe-area-inset-top, 0px)); box-shadow: 20px 0 60px -20px rgba(0,0,0,.4); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 85; background: rgba(15,23,42,.4); }
  .menu-btn { display: grid; }
  .hide-sm { display: none !important; }
  .help-pill { display: none; }
  .brand .word { font-size: 22px; }
  .top-search { max-width: none; }
  .top-search kbd, .top-search .txt { display: none; }
  .top-search button.fake { width: 40px; padding: 0; justify-content: center; }
  .top-search { flex: 0 0 auto; margin-left: auto; }
  .chat-panel { inset: auto 0 0 0; width: 100%; height: calc(100% - 40px - env(safe-area-inset-top, 0px)); border-radius: 22px 22px 0 0; right: 0; bottom: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .chat-fab .txt { display: none; }
  .chat-fab { padding: 0 16px; }
  .rule summary { grid-template-columns: minmax(0, 1fr) auto; }
  .rule .rplain { grid-column: 1 / 3; }
  .rule .rmsg { grid-column: 1 / 3; }
  .rule-body .row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ------------------------------------------------ v2 additions */
:root { --font-ar: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif; }
html[lang="ar"] body, html[lang="ar"] button, html[lang="ar"] input, html[lang="ar"] textarea { font-family: var(--font-ar); }
html[lang="ar"] .label, html[lang="ar"] .page-title, html[lang="ar"] .hero h1, html[lang="ar"] .btn, html[lang="ar"] .prose h3, html[lang="ar"] .section-title h2, html[lang="ar"] .badge, html[lang="ar"] .seg button { letter-spacing: 0; text-transform: none; }
html[lang="ar"] .hero h1 { line-height: 1.3; }
.lang-btn { width: auto; padding: 0 12px; font-weight: 700; font-size: 13px; font-family: var(--font-ar); }
[dir="rtl"] .sidebar { border-right: 0; border-left: 1px solid var(--line); padding: 20px max(16px, env(safe-area-inset-right, 0px)) 32px 16px; }
[dir="rtl"] .toc a { border-left: 0; border-right: 2px solid var(--line); }
[dir="rtl"] .prose ul, [dir="rtl"] .prose ol { padding-left: 0; padding-right: 22px; }
[dir="rtl"] .hero::after { right: auto; left: -60px; }
[dir="rtl"] .hero-search .ico { left: auto; right: 14px; }
[dir="rtl"] .hero-search input { padding: 0 44px 0 16px; }
[dir="rtl"] .stat .badge { right: auto; left: 16px; }
[dir="rtl"] .chat-fab { right: auto; left: calc(20px + env(safe-area-inset-left, 0px)); }
[dir="rtl"] .chat-panel:not(.full) { right: auto; left: calc(16px + env(safe-area-inset-left, 0px)); }
[dir="rtl"] .chat-head .icon-btn:first-of-type { margin-left: 0; margin-right: auto; }
[dir="rtl"] .msg.user { border-radius: 16px 16px 16px 4px; }
[dir="rtl"] .msg.bot .bubble { border-radius: 16px 16px 4px 16px; }
[dir="rtl"] .rule.fatal { border-left: 1px solid var(--line); border-right: 4px solid var(--bad); }
[dir="rtl"] .rule.warning { border-left: 1px solid var(--line); border-right: 4px solid var(--warn-line); }
[dir="rtl"] .prose th, [dir="rtl"] table.data th { text-align: right; }
[dir="rtl"] .top-search { margin-left: 0; margin-right: auto; }
[dir="rtl"] .top-search kbd { margin-left: 0; margin-right: auto; }
[dir="rtl"] .nav-link .count { margin-left: 0; margin-right: auto; }
.prose code, .rid, .mono, code, kbd, .txn-code, pre { unicode-bidi: isolate; }
.ssr .prose { max-width: none; }

textarea.code-input { width: 100%; min-height: 260px; resize: vertical; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); color: var(--ink); padding: 12px 14px; font: 12.5px/1.55 var(--mono); }
textarea.code-input.drag { border-color: var(--blue); background: var(--blue-soft); }
.verdict { display: flex; gap: 16px; align-items: center; }
.verdict h2 { margin: 2px 0; font-size: 20px; font-weight: 800; }
.verdict p { margin: 0; color: var(--muted); font-size: 13.5px; }
.verdict .v-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none; }
.verdict.ok .v-ic { background: var(--ok-soft); color: var(--ok); }
.verdict.bad .v-ic { background: var(--bad-soft); color: var(--bad); }
.verdict .v-ic svg { width: 26px; height: 26px; }
.issue { padding: 12px 16px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; font-size: 14px; }
.issue .rmsg { grid-column: 2 / 4; }
.err-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.err-row:last-child { border-bottom: 0; }
.err-row code { font-weight: 800; color: var(--bad); }
pre.xml { background: var(--code-bg); color: var(--code-ink); padding: 16px; border-radius: var(--radius); overflow-x: auto; font-size: 12px; line-height: 1.55; max-height: 70vh; margin: 0; text-align: left; }
.x-t { color: #7dd3fc; } .x-a { color: #c4b5fd; } .x-v { color: #86efac; } .x-c { color: #94a3b8; font-style: italic; }
.sample-link { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border: 1px dashed color-mix(in srgb, var(--blue) 45%, var(--line)); border-radius: var(--radius); margin: 20px 0 0; font-size: 14px; }
.sample-link > span:first-child { color: var(--blue); display: grid; }
.sample-link .btn { margin-inline-start: auto; }
.walk { display: grid; gap: 12px; margin: 0 0 20px; }
.walk-fig { margin: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-2); }
.walk-fig .label { display: flex; gap: 6px; align-items: center; padding: 10px 14px; }
.walk-fig .label svg { width: 16px; height: 16px; }
.walk-fig img { display: block; width: 100%; height: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.walk-fig figcaption { padding: 8px 14px; font-size: 12.5px; color: var(--muted); }
.timeline { display: grid; gap: 12px; }
.ready-sec { display: grid; gap: 8px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.ready-sec:last-child { border-bottom: 0; margin-bottom: 0; }
.ready-q { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 6px 0; font-size: 14px; }
.ready-q > span { flex: 1 1 260px; min-width: 0; }
.score { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.gap { display: flex; gap: 8px; align-items: baseline; font-size: 13.5px; }
.gap .badge { flex: none; min-width: 60px; justify-content: center; }
.calc { display: grid; gap: 16px; }
.calc-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 12px; align-items: center; }
.calc-row > span { display: grid; gap: 2px; font-size: 14px; }
.calc-row .input { width: 100%; text-align: end; font-variant-numeric: tabular-nums; }
.big-num { font-size: 32px; font-weight: 900; color: var(--bad); font-variant-numeric: tabular-nums; line-height: 1.1; }
.msg-fb { display: flex; align-items: center; gap: 6px; }
.fb-btn { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.fb-btn svg { width: 16px; height: 16px; }
.fb-btn.on { color: var(--blue); border-color: var(--blue); background: var(--blue-soft); }
.fb-btn:disabled { cursor: default; }
.helpful .btn svg { width: 16px; height: 16px; }
@media (max-width: 860px) {
  [dir="rtl"] .sidebar { left: auto; right: 0; transform: translateX(102%); }
  [dir="rtl"] body.nav-open .sidebar { transform: none; }
  [dir="rtl"] .chat-panel:not(.full) { left: 0; right: 0; }
  .calc-row { grid-template-columns: minmax(0, 1fr); }
  .issue { grid-template-columns: minmax(0, 1fr) auto; }
  .issue .rplain, .issue .rmsg { grid-column: 1 / 3; }
}
code, kbd, pre, .rid, .mono, .txn-code, .fact code { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .fact code, [dir="rtl"] td code { display: inline-block; }
@media (max-width: 420px) { .brand .tag { display: none; } .brand .word { font-size: 21px; } }

/* ---------- v3: builder, viewer, training, official check ---------- */
code.loc { display: block; font: 11px/1.4 var(--mono); color: var(--muted); word-break: break-all; margin-top: 4px; }
.builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.b-out { position: sticky; top: 76px; }
.b-out pre.xml { max-height: 62vh; }
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 12px; margin-bottom: 12px; }
.bf { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bf > span { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.bf .input, .bf .select { width: 100%; min-width: 0; flex: none; }
.bsec { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin: 10px 0; background: var(--surface-2); }
.bsec summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.bsec[open] summary { margin-bottom: 8px; }
.bline { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px 0; margin-bottom: 10px; }
.bline .bgrid { flex: 1; }
.bdel { flex: none; padding: 6px 8px; }
.bq { border-radius: var(--radius); padding: 8px 12px; margin-bottom: 10px; font-size: 13px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bq svg { width: 16px; height: 16px; flex: none; }
.bq.ok { background: var(--ok-soft); color: var(--ok); }
.bq.bad { background: var(--bad-soft); color: var(--bad); }
@media (max-width: 1100px) { .builder { grid-template-columns: 1fr; } .b-out { position: static; } }

.vinv { text-align: left; }
.vhead { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid var(--primary); padding-bottom: 12px; margin-bottom: 12px; }
.vhead h2 { margin: 2px 0; font-size: 24px; font-weight: 800; }
.vdl { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin: 6px 0 0; font-size: 13px; }
.vdl dt { color: var(--muted); font-weight: 600; }
.vdl dd { margin: 0; word-break: break-word; }
.vparties { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 12px 0; }
.vparty { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--surface-2); font-size: 13.5px; }
.vparty b { font-size: 15px; display: block; margin: 2px 0; }
.vnote { background: var(--blue-soft); color: var(--blue-ink); border-radius: var(--radius); padding: 8px 12px; margin: 8px 0; font-size: 13px; }
.vtotals { display: grid; grid-template-columns: 1fr minmax(240px, 340px); gap: 16px; margin-top: 14px; align-items: start; }
.vsum { font-size: 14px; } .vsum dd { text-align: right; font-family: var(--mono); }
.vsum .big { font-size: 16px; font-weight: 800; color: var(--ink); border-top: 1px solid var(--line); padding-top: 6px; }
td.mono, .mono { font-family: var(--mono); white-space: nowrap; }
@media (max-width: 760px) { .vparties, .vtotals { grid-template-columns: 1fr; } }

.pbar { height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; margin: 10px 0 6px; }
.pbar span { display: block; height: 100%; background: var(--primary); border-radius: 99px; transition: width .3s; }
.lessons { display: grid; gap: 10px; margin: 16px 0; }
.card.lesson { display: flex; gap: 14px; align-items: flex-start; }
.lnum { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); font-weight: 800; color: var(--primary); }
.lnum.done { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.lnum svg { width: 16px; height: 16px; }
fieldset.qz { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 12px; }
fieldset.qz legend { font-weight: 700; padding: 0 6px; }
.qopt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.qopt:hover { background: var(--surface-2); }
.qopt input { margin-top: 3px; }
.qopt.right { background: var(--ok-soft); border-color: var(--ok); }
.qopt.wrong { background: var(--bad-soft); border-color: var(--bad); }
.qwhy { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); }
.okc { color: var(--ok); } .badc { color: var(--bad); }

.cert { background: #fff; color: #0f172a; border-radius: 16px; padding: 14px; margin: 16px 0; box-shadow: 0 2px 14px rgba(15,23,42,.08); }
.cert-in { border: 3px double #123d67; border-radius: 10px; padding: 44px 32px; text-align: center; }
.cert-in .brand { justify-content: center; margin-bottom: 18px; }
.cert-in .brand .word, .cert-in .brand .tag { color: #123d67 !important; }
.cert-in .label { color: #64748b; }
.cert-in h1 { font-size: 34px; margin: 12px 0 6px; font-weight: 800; color: #123d67; border-bottom: 1px solid #cbd5e1; display: inline-block; padding: 0 24px 6px; }
.cert-in h2 { font-size: 22px; margin: 6px 0; }
.cert-in p { color: #334155; }
.cert-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 32px; font-size: 12px; color: #64748b; border-top: 1px solid #e2e8f0; padding-top: 12px; }
@media print {
  .topbar, .sidebar, #sidebar, .footer, .no-print, #chatFab, .chat-fab, #chatMount, .scrim { display: none !important; }
  body, .main, #main { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  .cert { box-shadow: none; margin: 0; }
}
.vsum { column-gap: 0; } .vsum dt, .vsum dd { padding: 3px 0; } .vsum dt { padding-inline-end: 14px; }
.vinv .table-wrap { max-width: 100%; overflow-x: auto; }
.vinv, .vinv .table-wrap, .vparty, .vparties > * { min-width: 0; } .vdl dd { overflow-wrap: anywhere; }
.select { max-width: 100%; } #main, .page { min-width: 0; }
.page > * { min-width: 0; max-width: 100%; }

/* ---------- v4: home flow, trust, roles, CTA, digest, sheets, batch, mapping, planner, events, admin, chat attach ---------- */
.trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.trust-i { display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 14px; }
.trust-i svg { flex: none; color: var(--ok); width: 22px; height: 22px; }
.trust-i b { display: block; font-size: 13px; } .trust-i span { font-size: 12px; color: var(--muted); }
@media (max-width: 900px) { .trust { grid-template-columns: 1fr 1fr; } }
.flow { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; align-items: center; }
.flow h2 { margin: 4px 0 8px; font-size: 22px; font-weight: 800; } .flow p { color: var(--ink-2); line-height: 1.6; }
.flow-svg { width: 100%; height: auto; }
.flow-svg .fn rect { fill: var(--surface-2); stroke: var(--line); stroke-width: 1.5; }
.flow-svg .fn2 rect { fill: var(--blue-soft); stroke: var(--blue); }
.flow-svg .fn5 rect { fill: var(--ok-soft); stroke: var(--ok); }
.flow-svg .fn-t { font: 700 12.5px var(--font); fill: var(--ink); text-anchor: middle; }
.flow-svg .fn-s { font: 500 10.5px var(--font); fill: var(--muted); text-anchor: middle; }
.flow-svg .fl { fill: none; stroke: var(--muted); stroke-width: 2; } .flow-svg .fl.dash { stroke-dasharray: 5 4; stroke: var(--ok); }
.flow-svg .fa { fill: var(--muted); }
.flow-svg .fnum circle { fill: var(--primary); } .flow-svg .fnum text { fill: #fff; font: 700 11px var(--font); text-anchor: middle; }
.flow-svg .fdot { fill: var(--blue); } .flow-svg .fdot.f2 { fill: var(--ok); }
:root[dir="rtl"] .flow-svg { direction: ltr; }
@media (prefers-reduced-motion: reduce) { .flow-svg .fdot { display: none; } }
@media (max-width: 900px) { .flow { grid-template-columns: 1fr; } }
.roles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.card.role .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue-ink); margin-bottom: 10px; }
.role-links { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; } .role-links a { font-weight: 600; font-size: 13.5px; }
@media (max-width: 1100px) { .roles { grid-template-columns: 1fr 1fr; } } @media (max-width: 560px) { .roles { grid-template-columns: 1fr; } }
.trust-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.tb { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; }
.tb svg { width: 14px; height: 14px; } .tb.ok { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.cta-box { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--navy-card); color: var(--navy-ink); border-radius: var(--radius-lg); padding: 16px 18px; margin: 18px 0; }
.cta-box b { display: block; color: #fff; } .cta-box span { font-size: 13.5px; opacity: .85; }
.modal-back { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); z-index: 200; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal { background: var(--surface); color: var(--ink); border-radius: var(--radius-lg); padding: 24px; width: min(560px, 100%); position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal h2 { margin: 4px 0 4px; font-size: 22px; font-weight: 800; } .modal-x { position: absolute; top: 12px; inset-inline-end: 12px; }
.lead-form .bf { margin-top: 0; } .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.consent { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--ink-2); margin-top: 10px; } .consent input { margin-top: 3px; }
.digest { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 18px; align-items: center; }
.digest b { display: block; font-size: 16px; } .digest > div > span { font-size: 13.5px; color: var(--muted); }
.digest-in { display: flex; gap: 8px; } .digest .consent, .digest .dmsg { grid-column: 1 / -1; margin-top: 0; }
@media (max-width: 760px) { .digest { grid-template-columns: 1fr; } }
.sheet-card a { color: inherit; text-decoration: none; } .sheet-card .meta { padding: 0; }
.sheet { background: #fff; color: #0f172a; border-radius: 14px; padding: 28px 30px; margin: 16px 0; box-shadow: var(--shadow); max-width: 900px; }
.sheet-h { display: flex; justify-content: space-between; align-items: center; border-bottom: 3px solid #123d67; padding-bottom: 10px; margin-bottom: 14px; }
.sheet-h .brand .word { color: #123d67; } .sheet-h .brand .tag { color: #334155; } .sheet .label { color: #64748b; }
.sheet h1 { font-size: 26px; font-weight: 800; color: #123d67; margin: 0; } .sheet .page-sub { color: #334155; margin: 4px 0 14px; }
.sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.sheet-sec { border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 14px; break-inside: avoid; } .sheet-sec.wide { grid-column: 1 / -1; }
.sheet-sec h2 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: #123d67; margin: 0 0 6px; }
.sheet-sec ul { margin: 0; padding-inline-start: 18px; font-size: 13px; line-height: 1.5; } .sheet-sec li { margin: 2px 0; }
.sheet-sec table { width: 100%; border-collapse: collapse; font-size: 12.5px; } .sheet-sec th, .sheet-sec td { text-align: start; padding: 4px 6px; border-bottom: 1px solid #eef2f7; vertical-align: top; } .sheet-sec th { color: #64748b; font-weight: 700; font-size: 11px; text-transform: uppercase; }
.sheet-sec td.code { font-family: var(--mono); font-size: 12px; }
.sheet-tip { margin-top: 12px; background: #eff6ff; color: #1d4ed8; border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.sheet-f { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 8px; border-top: 1px solid #e2e8f0; font-size: 11px; color: #64748b; }
@media (max-width: 700px) { .sheet { padding: 18px; } .sheet-grid { grid-template-columns: 1fr; } }
.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 2px dashed var(--line); border-radius: var(--radius-lg); padding: 30px 16px; text-align: center; cursor: pointer; background: var(--surface-2); }
.drop.drag { border-color: var(--blue); background: var(--blue-soft); } .drop .ic { color: var(--blue); } .drop span { color: var(--muted); font-size: 13px; }
tr.bdet td { background: var(--surface-2); padding: 8px 12px; } .bfail { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; } .bfail:last-child { border: 0; }
.chips-sel { display: flex; flex-wrap: wrap; gap: 8px; } .chip-cb { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; font-size: 13px; cursor: pointer; background: var(--surface); }
.chip-cb:has(input:checked) { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-ink); }
.map-t tr.miss td { background: var(--bad-soft); } .map-t tr.fixed td { color: var(--muted); } .map-t .select { min-width: 160px; height: 36px; }
.phase-pre { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; } .phase-pre div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; } .phase-pre b { display: block; } .phase-pre span { font-size: 12.5px; color: var(--muted); }
.plan-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.input.inl, .select.inl { height: 34px; flex: none; width: auto; font-size: 13px; padding: 0 8px; }
.ptask { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); } .ptask:first-of-type { border-top: 0; }
.pchk { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: #fff; margin-top: 2px; }
.ptask.s-done .pchk { background: var(--ok); border-color: var(--ok); } .ptask.s-done .ptitle { text-decoration: line-through; color: var(--muted); } .ptask.s-na { opacity: .55; }
.ptask.s-doing .pchk { border-color: var(--blue); } .ptask.od .ptitle::after { content: " •"; color: var(--bad); }
.pchk svg { width: 14px; height: 14px; } .pmain { flex: 1; min-width: 0; } .ptitle { font-weight: 700; }
.pfields { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; } .pnote { margin-top: 6px; height: 34px; width: 100%; font-size: 13px; }
.ptask.od input[data-f=due] { border-color: var(--bad); color: var(--bad); }
.print-only { display: none; }
.cta-card .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue-ink); margin-bottom: 10px; } .cta-card .btn { margin-top: 10px; }
.card.event { display: flex; gap: 14px; } .ev-date { flex: none; width: 56px; height: 60px; border-radius: 12px; background: var(--primary); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; } .ev-date b { font-size: 22px; line-height: 1; } .ev-date span { font-size: 11px; text-transform: uppercase; }
.bars { display: flex; gap: 3px; align-items: flex-end; height: 160px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.bar { flex: 1; display: flex; flex-direction: column-reverse; height: 100%; min-width: 3px; } .bar span { display: block; } .bar .b1 { background: var(--primary); } .bar .b2 { background: var(--blue); } .bar .b3 { background: var(--ok); }
.ced { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; } .ced-prev { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; max-height: 420px; overflow: auto; }
@media (max-width: 900px) { .ced { grid-template-columns: 1fr; } }
.att-btn { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--muted); cursor: pointer; } .att-btn:hover { background: var(--surface-2); color: var(--blue); }
.att-chip { display: flex; gap: 8px; align-items: center; background: var(--blue-soft); color: var(--blue-ink); border-radius: 10px; padding: 6px 8px 6px 10px; margin-bottom: 8px; font-size: 13px; flex-wrap: wrap; } .att-chip svg { width: 16px; height: 16px; } .att-chip .icon-btn { margin-inline-start: auto; width: 28px; height: 28px; }
.att-in { display: flex; gap: 6px; align-items: center; font-size: 12px; opacity: .85; margin-bottom: 4px; } .att-in svg { width: 14px; height: 14px; }
.chk-card { border-radius: 10px; padding: 8px 12px; margin-bottom: 6px; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.chk-card.ok { background: var(--ok-soft); color: var(--ok); } .chk-card.bad { background: var(--bad-soft); color: var(--bad); } .chk-card.warn { background: var(--warn-soft); color: var(--warn); }
@media print {
  .print-only { display: block; } .sheet { box-shadow: none; margin: 0; padding: 0; max-width: none; border-radius: 0; }
  .ptask input, .ptask select { border: 0; } .plan-ph { break-inside: avoid-page; box-shadow: none; border: 0; } .pnote:placeholder-shown { display: none; }
  .modal-back, .cta-box { display: none !important; }
}
.digest-in .input { flex: 1 1 auto; min-width: 0; width: 100%; } .digest > * { min-width: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; } .chip-row .chip { display: inline-flex; width: auto; }

/* ---------- v5: Citytech solution, portal tour, contact ---------- */
.sol-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px; align-items: start; }
.sol h2, .contact h2 { margin: 4px 0 8px; font-size: 22px; font-weight: 800; } .sol p, .contact p { color: var(--ink-2); line-height: 1.6; margin: 0; }
.certs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cert-b { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--surface-2); }
.cert-b svg { flex: none; color: var(--ok); } .cert-b span { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; } .cert-b b { color: var(--ink); font-size: 12.5px; }
.caps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.cap { display: flex; gap: 12px; padding: 14px; border-radius: 14px; background: var(--surface-2); }
.cap .ic { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue-ink); }
.cap b { font-size: 14px; } .cap p { font-size: 13px; margin-top: 4px; }
.isteps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; counter-reset: s; }
.isteps li { position: relative; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.isteps .n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; font-size: 12px; margin-bottom: 8px; }
.isteps b { display: block; } .isteps p { font-size: 13px; margin-top: 4px; }
.tour-fig { margin: 12px 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.browser { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.browser span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); } .browser em { font-style: normal; font-size: 12px; color: var(--muted); margin-inline-start: 10px; }
.tour-fig img { display: block; width: 100%; height: auto; }
.tour-fig figcaption { padding: 10px 14px; font-size: 13px; color: var(--ink-2); background: var(--surface); border-top: 1px solid var(--line); }
.tour-tabs { flex-wrap: wrap; }
.contact { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px; align-items: center; background: linear-gradient(135deg, var(--surface), var(--blue-soft)); }
.offices { display: grid; gap: 12px; } .offices div { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--ink-2); border-inline-start: 3px solid var(--primary); padding-inline-start: 12px; } .offices b { color: var(--ink); }
@media (max-width: 1100px) { .caps { grid-template-columns: 1fr 1fr; } .isteps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .sol-head, .contact { grid-template-columns: 1fr; } .caps, .isteps { grid-template-columns: 1fr; } }
.contact .toolbar { margin-top: 14px; } .contact a[href^="mailto"] { text-transform: none; }
.lgd i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 10px; vertical-align: -1px; } .lgd i.b1 { background: var(--primary); } .lgd i.b2 { background: var(--blue); } .lgd i.b3 { background: var(--ok); }
.layers { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.ly { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; }
.ly div { flex: 1; min-width: 0; } .ly b { display: block; font-size: 13.5px; } .ly div span { font-size: 12px; color: var(--muted); }
.ly-ic { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-weight: 700; }
.ly-ic svg { width: 14px; height: 14px; } .ly.ok .ly-ic { background: var(--ok-soft); color: var(--ok); } .ly.bad .ly-ic { background: var(--bad-soft); color: var(--bad); } .ly.bad { border-color: var(--bad); }
.ly.warnl .ly-ic { background: var(--warn-soft); color: var(--warn); } .ly.warnl { border-color: var(--warn-line); }
/* FAQ page */
.faq-list { display: grid; gap: 8px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 14px 16px; font-weight: 600; font-size: 14.5px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 20px; font-weight: 400; color: var(--muted); flex-shrink: 0; }
.faq-item[open] summary::after { content: '−'; }
.faq-item[open] summary { background: var(--surface-2); border-bottom: 1px solid var(--line); }
.faq-ans { padding: 14px 16px; font-size: 14px; line-height: 1.7; color: var(--ink-2); }
/* Compliance timeline */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ''; position: absolute; inset-inline-start: 18px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.tl-item { display: flex; gap: 14px; align-items: flex-start; padding: 0 0 20px; position: relative; }
.tl-dot { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; z-index: 1; }
.tl-dot.past { background: var(--ok-soft); color: var(--ok); border: 2px solid var(--ok); }
.tl-dot.now { background: var(--primary); color: #fff; border: 2px solid var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 20%, transparent); }
.tl-dot.future { background: var(--surface-2); color: var(--muted); border: 2px solid var(--line); }
.tl-body { flex: 1; min-width: 0; padding-top: 6px; }
.tl-body h3 { margin: 0 0 4px; font-size: 14.5px; font-weight: 700; }
.tl-body p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.tl-date { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
/* Quick reference / cheat sheet */
.qr-section { break-inside: avoid; }
.qr-section h2.section-h { margin: 0 0 12px; font-size: 16px; font-weight: 700; }
.qr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 820px) { .qr-cols { grid-template-columns: 1fr; } }
.print-footer { font-size: 11px; color: var(--muted); padding: 12px 0 4px; border-top: 1px solid var(--line); margin-top: 8px; }
@media print {
  .print-footer { display: block !important; }
  .qr-section { page-break-inside: avoid; break-inside: avoid; border: none; box-shadow: none; margin-bottom: 16px; }
  .qr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .panel { box-shadow: none; border: 1px solid #ddd; }
  .table-wrap { overflow: visible; }
  table.data { font-size: 11px; }
  table.data th, table.data td { padding: 4px 8px; }
  code { font-size: 10px; }
}
/* ERP guide */
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--blue-ink); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
/* AI agent — thinking indicator & low-confidence CTA */
.thinking-label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:.5} 50%{opacity:1} }
.cta-inline { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; font-size: 13px; color: var(--muted); }
.cta-chip { background: var(--blue-ink) !important; color: #fff !important; border-color: transparent !important; font-size: 12px; }
.cta-chip:hover { opacity: .88; }

/* article screenshots + lightbox */
.prose .shot { display: block; margin: 14px 0 20px; }
.prose .shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); cursor: zoom-in; background: #fff; transition: transform .15s ease, box-shadow .15s ease; }
.prose .shot img:hover { transform: translateY(-1px); }
.prose .shot img:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.prose .shot-cap { display: block; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(8, 15, 30, .88); display: flex; align-items: center; justify-content: center; padding: 48px 16px 16px; cursor: zoom-out; animation: lbIn .15s ease; }
.lightbox figure { margin: 0; max-width: min(1400px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 8px; background: #fff; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox figcaption { color: #e2e8f0; font-size: 14px; margin-top: 10px; text-align: center; }
.lightbox-x { position: absolute; top: 10px; right: 12px; color: #fff !important; background: rgba(255,255,255,.12) !important; }
[dir="rtl"] .lightbox-x { right: auto; left: 12px; }
@keyframes lbIn { from { opacity: 0 } to { opacity: 1 } }
body.no-scroll { overflow: hidden; }

/* interactive checklist */
.prose ul.checklist { list-style: none; padding: 0 !important; margin: 0 0 8px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.prose ul.checklist li { margin: 0; border-bottom: 1px solid var(--line); background: var(--surface); }
.prose ul.checklist li:last-child { border-bottom: 0; }
.prose ul.checklist label { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; cursor: pointer; }
.prose ul.checklist input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--ok); cursor: pointer; }
.prose ul.checklist li.done { background: var(--ok-soft); }
.prose ul.checklist li.done label { color: var(--ink-2); }
.check-progress { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 16px; }
.check-progress.ok { color: var(--ok); }

/* home: new customer card */
.onboard-card { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; border-left: 4px solid var(--ok); }
[dir="rtl"] .onboard-card { border-left: 1px solid var(--line); border-right: 4px solid var(--ok); }
.onboard-ico { width: 46px; height: 46px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); display: flex; align-items: center; justify-content: center; flex: none; }
.onboard-ico svg { width: 24px; height: 24px; }
.onboard-txt { flex: 1 1 320px; min-width: 0; }
.onboard-txt h2 { margin: 2px 0 4px; font-size: 18px; }
.onboard-txt p { margin: 0; color: var(--muted); font-size: 14px; }
.onboard-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media print { .lightbox { display: none; } .prose .shot img { box-shadow: none; } }
.lb-hint { display: none; }
@media (max-width: 700px) {
  .lightbox { display: block; overflow: auto; padding: 60px 0 24px; -webkit-overflow-scrolling: touch; }
  .lightbox figure { display: block; max-width: none; max-height: none; }
  .lightbox img { max-width: none; max-height: none; width: 230vw; border-radius: 0; cursor: default; }
  .lightbox figcaption { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px 14px; background: rgba(8,15,30,.92); }
  .lb-hint { display: block; font-size: 12px; color: #94a3b8; margin-top: 2px; }
}
.cta-box.onb-cta { border-left: 4px solid var(--ok); }
[dir="rtl"] .cta-box.onb-cta { border-left: 0; border-right: 4px solid var(--ok); }
.cta-box.onb-cta.compact { margin: 6px 0 22px; }
.prose video.walk-video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--radius); background: #123d67; box-shadow: var(--shadow); margin: 6px 0 22px; }
.chip.src-official { background: var(--surface); border-style: dashed; }
.chip.src-official .src-pub { font-weight: 700; font-size: 11px; color: var(--blue-ink); background: var(--blue-soft); border-radius: 4px; padding: 1px 5px; margin-inline-end: 2px; }

/* Google reCAPTCHA v3: the floating badge is hidden; the required notice is shown on each form and in the chat panel instead. */
.grecaptcha-badge { visibility: hidden !important; }
.rc-note { margin: 10px 0 0; font-size: 11px; line-height: 1.5; color: var(--muted); }
.rc-note a { color: inherit; text-decoration: underline; }
.chat-foot .rc-note { margin: 2px 0 0; text-align: center; font-size: 10.5px; }
.digest .rc-note { flex-basis: 100%; }
