:root {
  --bg: #F4F6FA;
  --surface: #FFFFFF;
  --surface-2: #F0F3F8;
  --ink: #142033;
  --ink-2: #4A5A72;
  --ink-3: #7D8BA1;
  --line: #E1E6EE;
  --primary: #1557C0;
  --primary-ink: #FFFFFF;
  --primary-soft: #E6EEFB;
  --accent: #D62F2F;
  --ok: #138A4B;
  --warn-bg: #FFF7E6;
  --warn-line: #F2C46B;
  --shadow: 0 1px 2px rgba(16, 32, 64, .06), 0 6px 20px rgba(16, 32, 64, .06);

  /* phone (app look stays light like the real app) */
  --ph-bg: #F2F4F8;
  --ph-card: #FFFFFF;
  --ph-ink: #13233F;
  --ph-ink2: #7A869A;
  --ph-line: #E6EAF0;
  --ph-navy: #0E2A5C;
  --ph-blue: #1E5BC6;
  --ph-grid: #E8ECF2;
  --ph-zero: #EEF0F3;
  --ph-th: #E5EEFC;
  --ph-alt: #F7F9FC;
  --ph-tc: #E3F5E8;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1420; --surface: #161E2D; --surface-2: #1C2638; --ink: #E7ECF4; --ink-2: #AEB9CB; --ink-3: #7F8BA0;
    --line: #2A3549; --primary: #6EA2FF; --primary-ink: #0B1220; --primary-soft: #1D2D4A; --accent: #FF6B6B; --ok: #4ACB86;
    --warn-bg: #2A2416; --warn-line: #7A6328; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1420; --surface: #161E2D; --surface-2: #1C2638; --ink: #E7ECF4; --ink-2: #AEB9CB; --ink-3: #7F8BA0;
  --line: #2A3549; --primary: #6EA2FF; --primary-ink: #0B1220; --primary-soft: #1D2D4A; --accent: #FF6B6B; --ok: #4ACB86;
  --warn-bg: #2A2416; --warn-line: #7A6328; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
.ic { display: inline-block; vertical-align: middle; flex: none; }
.rot { animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; height: 60px; display: flex; align-items: center; gap: 12px;
  padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand b { display: block; font-size: 16px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { color: var(--ink-3); font-size: 12px; }
.logo { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, #0D3D8F, #1E7FD8); flex: none; }
.top-r { margin-left: auto; display: flex; gap: 8px; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 17px; }
.icon-btn:hover { background: var(--surface-2); }
.only-sm, .only-md { display: none; }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 300px minmax(0, 1fr) 420px; min-height: calc(100vh - 60px); }
.nav {
  position: sticky; top: 60px; height: calc(100vh - 60px); overflow: auto; border-right: 1px solid var(--line);
  background: var(--surface); padding: 14px 10px 40px;
}
.nav-search input {
  width: 100%; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink); padding: 0 12px; font: inherit; font-size: 14px;
}
.nav-search input:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.nav-hint { font-size: 12px; color: var(--ink-3); margin: 10px 6px 8px; line-height: 1.45; }

.tree { list-style: none; margin: 0; padding: 0; }
.tree .tree { display: none; padding-left: 14px; }
.tree li.open > .tree { display: block; }
.tn { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--ink-2); }
.tn:hover { background: var(--surface-2); color: var(--ink); }
.tn.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.tree.d1 > li > .tn { font-weight: 600; color: var(--ink); }
.tree.d3 .tn { font-size: 13px; }
.tree.d3 .tl::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .45; margin-right: 8px; vertical-align: middle; }
.tw { width: 20px; height: 20px; border: 0; background: none; padding: 0; display: grid; place-items: center; color: var(--ink-3); border-radius: 5px; }
.tw:hover { background: var(--line); }
.tw .ic { transition: transform .15s; }
li.open > .tn .tw .ic { transform: rotate(90deg); }
.tw-sp { width: 20px; flex: none; }
.tl { flex: 1; min-width: 0; }
.tgo { font-size: 11px; color: var(--ink-3); opacity: 0; }
.tn:hover .tgo, .tn.on .tgo { opacity: 1; }

/* ---------- content ---------- */
.content { padding: 28px 40px 80px; min-width: 0; }
.doc-sec { max-width: 860px; margin: 0 auto 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px 32px; scroll-margin-top: 76px; box-shadow: var(--shadow); }
.doc-sec .sub, .doc-sec .comp, .doc-sec .mini, .doc-sec .st-card, .doc-sec details, .doc-sec h4 { scroll-margin-top: 80px; }
h2 { font-size: 24px; line-height: 1.3; margin: 0 0 14px; display: flex; align-items: center; gap: 12px; }
h3 { font-size: 19px; margin: 28px 0 12px; display: flex; align-items: center; gap: 10px; }
.tab-sec h3 { margin-top: 0; }
h4 { font-size: 15px; margin: 22px 0 10px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.num { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 9px; background: var(--primary); color: var(--primary-ink); font-size: 15px; font-weight: 700; }
h3 .num { min-width: 30px; height: 28px; font-size: 13px; background: var(--primary-soft); color: var(--primary); }
p { margin: 0 0 12px; }
.sub { border-top: 1px dashed var(--line); margin-top: 22px; }
.flash { animation: flash 1.4s ease; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px var(--primary); } 100% { box-shadow: 0 0 0 0 transparent; } }
.tab-sec { border-top: 4px solid var(--primary); }
#s4 > #tabDocs > .tab-sec { margin: 22px 0 0; box-shadow: none; background: var(--surface-2); }

.purpose { background: var(--primary-soft); border-radius: 10px; padding: 12px 14px; }
.howto { background: var(--surface-2); border-radius: 12px; padding: 14px 18px; margin: 14px 0; }
.howto ul, .bul { margin: 8px 0 0; padding-left: 20px; }
.howto li, .bul li { margin: 4px 0; }
.kbd { display: inline-block; padding: 0 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.steps li { display: grid; grid-template-columns: 74px 1fr auto; gap: 12px; align-items: start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); transition: border-color .15s, background .15s; }
.steps li.act { border-color: var(--primary); background: var(--primary-soft); }
.steps ul { margin: 6px 0 0; padding-left: 18px; }
.sn { font-size: 12px; font-weight: 700; color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 3px 10px; text-align: center; white-space: nowrap; }
.steps li.act .sn { background: var(--primary); color: var(--primary-ink); }
.go-btn { border: 1px solid var(--primary); color: var(--primary); background: transparent; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.go-btn:hover { background: var(--primary); color: var(--primary-ink); }
.go-btn.sm { padding: 1px 9px; font-size: 12px; margin-left: 4px; }

.note { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 12px; padding: 12px 16px; margin: 16px 0; }
.note ul { margin: 6px 0 0; padding-left: 20px; }

.comps { display: grid; gap: 8px; }
.comp { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.comp.child { margin-left: 22px; border-left: 3px solid var(--primary); }
.comp-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.comp-top b { flex: 1; min-width: 140px; }
.comp p { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; }
.badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chips span { font-size: 12px; padding: 1px 9px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.gallery img { width: 100%; border-radius: 12px; border: 1px solid var(--line); cursor: zoom-in; aspect-ratio: 945/2048; object-fit: cover; object-position: top; background: var(--surface-2); }

.kpi-table { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.kpi-link { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 12px; }
.kpi-link:hover { border-color: var(--primary); }
.kpi-link i { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.kpi-link span { font-weight: 600; font-size: 14px; }
.kpi-link em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--ink-3); white-space: nowrap; }

.anatomy { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 20px; align-items: center; margin: 10px 0 16px; }
.an-card { background: #fff; color: #13233F; border-radius: 14px; padding: 14px; border: 1px solid #E6EAF0; box-shadow: 0 4px 18px rgba(16,32,64,.08); }
.an-h { display: flex; justify-content: space-between; gap: 8px; }
.an-t { font-weight: 700; }
.an-s { color: #7A869A; font-size: 13px; }
.an-f { position: relative; width: 34px; height: 34px; border-radius: 50%; background: #EAF1FD; color: #1E5BC6; display: grid; place-items: center; }
.an-f i { position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: #1E86F0; }
.an-card em { font-style: normal; color: #D62F2F; font-weight: 800; font-size: 13px; margin-left: 4px; }
.an-f em { position: absolute; right: -16px; top: -6px; }
.an-vt { display: flex; justify-content: flex-end; align-items: center; gap: 2px; margin-top: 12px; font-size: 12px; }
.an-vt span { padding: 4px 10px; background: #EEF1F5; color: #8892A2; }
.an-vt span:first-child { border-radius: 999px 0 0 999px; }
.an-vt span:nth-child(2) { border-radius: 0 999px 999px 0; }
.an-vt span.on { background: #fff; color: #13233F; box-shadow: inset 0 0 0 1px #E1E6EE; font-weight: 600; }
.an-list { margin: 0; padding-left: 22px; }
.an-list li::marker { color: var(--accent); font-weight: 800; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface); }
.mini.wide { grid-column: 1 / -1; }
.mini ul { padding-left: 18px; margin: 6px 0 10px; font-size: 14px; color: var(--ink-2); }
.states { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.st-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.st-card p { font-size: 14px; color: var(--ink-2); margin: 6px 0 10px; }
.tbl-demo { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 12px; background: #fff; }
.tbl-demo .dtable { font-size: 13px; }
.up { color: #1E5BC6; font-weight: 600; }
.down { color: #D62F2F; font-weight: 600; }
.content .up { color: var(--primary); }
.content .down { color: var(--accent); }
.content .tbl-demo .up { color: #1E5BC6; }
.content .tbl-demo .down { color: #D62F2F; }

.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 12px 0; font-weight: 600; }
.faq details p { color: var(--ink-2); }
.gloss { width: 100%; border-collapse: collapse; font-size: 14px; }
.gloss th, .gloss td { border-bottom: 1px solid var(--line); text-align: left; padding: 10px 12px; }
.gloss th { background: var(--surface-2); }
.gloss td:first-child { font-weight: 700; white-space: nowrap; color: var(--primary); }
.foot { text-align: center; color: var(--ink-3); font-size: 13px; }

/* ---------- phone column ---------- */
.phone-col { position: sticky; top: 60px; height: calc(100vh - 60px); padding: 14px 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; border-left: 1px solid var(--line); background: var(--surface); overflow: auto; }
.ph-tools { width: 375px; max-width: 100%; display: flex; flex-direction: column; gap: 8px; }
.ph-loc { font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-btns { display: flex; gap: 6px; }
.ph-btns button, .ph-btns select { height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; font-size: 13px; padding: 0 10px; }
.ph-btns select { flex: 1; min-width: 0; }
.ph-btns button.on { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.ph-hint { font-size: 12px; color: var(--ink-3); }

.phone {
  position: relative; width: 375px; height: 760px; max-height: calc(100vh - 170px); min-height: 560px; flex: none;
  border-radius: 46px; background: #0B0F17; padding: 11px; box-shadow: 0 20px 50px rgba(10,20,40,.28), inset 0 0 0 2px #2A3242;
}
.ph-screen {
  position: relative; width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: var(--ph-bg);
  color: var(--ph-ink); font-size: 13px; line-height: 1.4; display: flex; flex-direction: column; user-select: none;
}
#phSheet { position: absolute; inset: 11px; border-radius: 36px; overflow: hidden; pointer-events: none; z-index: 10; }
#phSheet > * { pointer-events: auto; }

.ph-head {
  flex: none; color: #fff;
  background: radial-gradient(120% 90% at 0% 0%, rgba(80,170,255,.35), transparent 55%), radial-gradient(90% 120% at 100% 0%, rgba(30,120,220,.5), transparent 60%), linear-gradient(180deg, #0B3D86, #0D4FA6);
}
.sbar { height: 40px; display: flex; align-items: center; justify-content: space-between; padding: 0 26px 0 30px; font-size: 13px; font-weight: 700; }
.island { width: 96px; height: 26px; border-radius: 20px; background: #000; }
.sicons { font-size: 10px; letter-spacing: 1px; }
.ph-title { position: relative; height: 44px; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 500; }
.hb { position: absolute; left: 8px; border: 0; background: none; color: #fff; width: 36px; height: 36px; }

.ph-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 10px 16px; scrollbar-width: none; overscroll-behavior: contain; }
.ph-body::-webkit-scrollbar { display: none; }
.ph-body.detail { padding-top: 10px; }
.ptr { height: 0; opacity: 0; display: grid; place-items: center; color: var(--ph-blue); overflow: hidden; }

.tabbar { flex: none; display: flex; gap: 2px; overflow-x: auto; background: #fff; border-bottom: 1px solid var(--ph-line); scrollbar-width: none; padding: 0 6px; }
.tabbar::-webkit-scrollbar { display: none; }
.tabbar button { flex: none; border: 0; background: none; padding: 11px 10px 9px; color: #8A94A6; font-size: 13.5px; white-space: nowrap; border-bottom: 2.5px solid transparent; }
.tabbar button.on { color: var(--ph-navy); font-weight: 700; border-bottom-color: var(--ph-navy); }

.card { background: var(--ph-card); border-radius: 14px; padding: 12px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(16,32,64,.06); position: relative; }
.card.bare { padding-top: 6px; }
.card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card-t { font-weight: 700; font-size: 14px; color: var(--ph-ink); }
.card-t.up { letter-spacing: .01em; }
.card-s { color: var(--ph-ink2); font-size: 11.5px; margin-top: 2px; }
.card-tools { display: flex; justify-content: flex-end; margin: 8px 0 6px; }
.vt { display: flex; background: #EEF1F5; border-radius: 999px; padding: 2px; }
.vt button { border: 0; background: none; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; color: #8892A2; display: flex; align-items: center; gap: 4px; }
.vt button.on { background: #fff; color: var(--ph-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.fbtn { position: relative; flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0; background: #F1F4F8; color: #4B5870; display: grid; place-items: center; }
.fbtn.on { color: var(--ph-blue); background: #E6EEFB; }
.fdot { position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: #1E86F0; border: 1.5px solid #fff; }

.hscroll { overflow-x: auto; scrollbar-width: thin; scrollbar-color: #CBD3DF transparent; }
.hscroll::-webkit-scrollbar { height: 4px; }
.hscroll::-webkit-scrollbar-thumb { background: #CBD3DF; border-radius: 2px; }
.chart-wrap { position: relative; }
svg.bars text.bl { font-size: 9.5px; fill: #3A465C; text-anchor: middle; font-family: inherit; }
svg.bars text.xl { font-size: 10px; fill: #5D6A80; text-anchor: middle; font-family: inherit; }
svg.bars text.ax { font-size: 8.5px; fill: #8A94A6; font-family: inherit; }
.tip { position: absolute; top: 6px; background: rgba(20,28,44,.94); color: #fff; font-size: 11px; border-radius: 8px; padding: 7px 9px; pointer-events: none; z-index: 3; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.tip i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.tip .tt { font-weight: 700; margin-bottom: 2px; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-top: 6px; font-size: 11.5px; color: #3A465C; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.lg-tog { cursor: pointer; }
.lg-tog.off { text-decoration: line-through; opacity: .45; }

.donut { position: relative; width: 210px; height: 210px; margin: 6px auto 10px; }
.donut circle { transition: stroke-width .15s, opacity .15s; }
.dcenter { position: absolute; inset: 52px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.dc-val { font-weight: 800; font-size: 15px; }
.dc-val.big { font-size: 20px; }
.dc-name { font-size: 11px; font-weight: 600; color: #4B5870; line-height: 1.2; max-width: 100px; }
.dc-sub { font-size: 11px; color: var(--ph-ink2); }
.dlegend { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.dl { display: flex; align-items: center; gap: 5px; padding: 5px 7px; border: 1px solid var(--ph-line); border-radius: 7px; font-size: 10.5px; cursor: pointer; min-width: 0; }
.dl i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.dl .dn { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl b { font-size: 10.5px; }
.dl em { font-style: normal; color: var(--ph-ink2); font-size: 10px; }
.dl.on { border-color: var(--ph-blue); background: #EEF4FE; }
.dl.dim { opacity: .45; }

.heat { border-collapse: separate; border-spacing: 2px; font-size: 10.5px; }
.heat th { font-weight: 600; color: #5D6A80; padding: 4px; white-space: nowrap; font-size: 10px; }
.heat tbody th { text-align: left; color: var(--ph-ink); position: sticky; left: 0; background: #fff; z-index: 1; }
.heat td { width: 44px; min-width: 44px; height: 29px; text-align: center; border-radius: 4px; cursor: pointer; font-weight: 600; }
.heat td.on { outline: 2px solid #F0A030; }
.heat-scale { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 10px; color: var(--ph-ink2); margin-top: 6px; }
.heat-scale i { width: 110px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #E8F0FE, #123A8A); }

.rk-search { display: flex; align-items: center; gap: 6px; border: 1px solid var(--ph-line); border-radius: 9px; padding: 0 10px; color: #98A2B3; margin-bottom: 8px; }
.rk-search input { flex: 1; border: 0; outline: 0; height: 34px; font: inherit; font-size: 12.5px; background: transparent; color: var(--ph-ink); }
.rank { display: grid; gap: 2px; }
.rk { display: flex; gap: 8px; align-items: center; padding: 6px 2px; border-bottom: 1px solid #F1F3F7; }
.rk-no { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; color: #5D6A80; flex: none; }
.rk-no.top { background: #1E5BC6; color: #fff; font-weight: 700; }
.rk-main { flex: 1; min-width: 0; }
.rk-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.rk-n { font-weight: 600; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-v { font-size: 11.5px; color: #4B5870; white-space: nowrap; }
.rk-bar { flex: 1; height: 5px; background: #EDF0F5; border-radius: 3px; overflow: hidden; margin-top: 4px; }
.rk-bar i { display: block; height: 100%; border-radius: 3px; }
.rk-p { font-size: 11px; color: #1E5BC6; min-width: 40px; text-align: right; }
.rk-d { font-size: 11px; color: #D62F2F; white-space: nowrap; }

.dtable { border-collapse: collapse; width: 100%; font-size: 11px; white-space: nowrap; color: #13233F; }
.dtable th { background: var(--ph-th); color: #1E3E7A; font-weight: 700; padding: 7px 8px; text-align: right; }
.dtable th:first-child { text-align: left; }
.dtable td { padding: 6px 8px; text-align: right; border-bottom: 1px solid #EEF1F5; }
.dtable td.l { text-align: left; font-weight: 600; }
.dtable td.grp { vertical-align: middle; background: #fff; }
.dtable tbody tr:nth-child(even) td { background: var(--ph-alt); }
.dtable tr.tc td { background: var(--ph-tc) !important; font-weight: 800; }
.dtable .up { color: #1E5BC6; }
.dtable .down { color: #D62F2F; }
.dtable .dl0 { color: #98A2B3; }
.sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }

.banner { border-radius: 14px; padding: 12px 14px; color: #fff; margin-bottom: 10px; box-shadow: 0 2px 6px rgba(16,32,64,.12); }
.bn-cap { font-size: 10.5px; letter-spacing: .04em; opacity: .9; margin-bottom: 2px; }
.bn-row { display: flex; justify-content: space-between; gap: 10px; }
.bn-row .r { text-align: right; }
.bn-row.sm { font-size: 11.5px; opacity: .95; margin-top: 4px; }
.bn-l { font-size: 11.5px; opacity: .9; }
.bn-v { font-size: 22px; font-weight: 800; letter-spacing: .01em; line-height: 1.2; }
.bn-v.sm { font-size: 17px; }
.bn-prog { height: 5px; border-radius: 3px; background: rgba(255,255,255,.3); margin-top: 8px; overflow: hidden; }
.bn-prog i { display: block; height: 100%; border-radius: 3px; }
.bn-sub { display: grid; grid-template-columns: 1fr 1fr; margin: 10px -14px -12px; border-radius: 0 0 14px 14px; overflow: hidden; }
.bn-sub > div { padding: 8px 14px; }
.sw-top { display: flex; gap: 10px; align-items: center; }
.sw-ic { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.18); display: grid; place-items: center; }
.sw-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.sw-tiles > div { background: rgba(255,255,255,.14); border-radius: 10px; padding: 8px 10px; }

.segrow { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 2px 0 10px; }
.segrow.right { justify-content: flex-end; }
.seg { display: flex; background: #E9EDF3; border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 999px; font-size: 11.5px; color: #8A94A6; white-space: nowrap; }
.seg button.on { background: #fff; color: var(--ph-blue); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg .rd { margin-right: 4px; }

.group { margin-bottom: 10px; }
.group-h { display: flex; align-items: center; gap: 8px; padding: 10px 4px; cursor: pointer; }
.gbar { width: 4px; align-self: stretch; border-radius: 2px; background: var(--ph-navy); }
.gtxt { flex: 1; min-width: 0; }
.gt { font-weight: 800; font-size: 13.5px; color: var(--ph-ink); }
.gs { font-size: 11.5px; color: var(--ph-ink2); }
.gchev { color: #4B5870; transition: transform .15s; display: grid; }
.group.col .gchev { transform: rotate(-90deg); }
.group.col { border-bottom: 1px solid var(--ph-line); }

.tiles-wrap { margin-bottom: 10px; }
.tiles-h { display: flex; justify-content: space-between; align-items: center; margin: 4px 2px 8px; font-size: 13px; }
.tiles { display: grid; gap: 8px; }
.tiles.c2 { grid-template-columns: 1fr 1fr; }
.tiles.c3 { grid-template-columns: 1fr 1fr 1fr; }
.tile { border-radius: 12px; padding: 10px 12px; border: 1px solid; }
.tile.wide { grid-column: 1 / -1; }
.tile .tl { font-size: 10px; color: #5D6A80; letter-spacing: .02em; }
.tile .tv { font-size: 19px; font-weight: 800; }
.tile.red { background: #FDECEC; border-color: #F6C9C9; color: #C62828; }
.tile.orange { background: #FFF4E5; border-color: #F8D9A8; color: #D9822B; }
.tile.blue { background: #EAF1FD; border-color: #C9DAF8; color: #1E3E7A; }

.stats { background: linear-gradient(180deg, #1A7FC1, #1569A6); color: #fff; border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.stats .card-t { color: #fff; }
.stats .card-s { color: rgba(255,255,255,.85); }
.stats-h { display: flex; justify-content: space-between; align-items: center; }
.stats-b { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 10px; background: rgba(255,255,255,.15); border-radius: 10px; padding: 8px 4px; text-align: center; }
.stats-b span { display: block; font-size: 10.5px; opacity: .85; }
.stats-b b { font-size: 13px; }

.qgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.qcol { background: #F5F7FB; border-radius: 10px; padding: 8px 10px; }
.qh { font-weight: 700; display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.qh i { width: 9px; height: 9px; border-radius: 2px; background: #3D6FE0; }
.qr { display: flex; justify-content: space-between; font-size: 12px; padding: 2px 0; }
.qt { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; }
.qt b { font-size: 16px; }
.qt span { font-size: 11px; color: var(--ph-ink2); }
.qbar { height: 4px; border-radius: 2px; background: #E1E6EE; margin-top: 4px; }
.qbar i { display: block; height: 100%; border-radius: 2px; background: #3D6FE0; }
.qtotal { font-size: 14px; }

.empty { text-align: center; padding: 34px 10px; color: var(--ph-ink2); font-size: 12.5px; }
.empty.err { color: #C62828; }
.skel { border-radius: 10px; background: linear-gradient(90deg, #E9EDF2 0%, #F5F7FA 50%, #E9EDF2 100%); background-size: 200% 100%; animation: shimmer 1.1s linear infinite; margin-bottom: 4px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* overview */
.ov-chart { text-align: center; }
.ov-t { color: #1E5BC6; font-weight: 800; font-size: 14px; letter-spacing: .02em; }
.pills { display: flex; justify-content: center; gap: 4px; margin: 10px 0 6px; }
.pills button { border: 0; background: none; padding: 5px 10px; border-radius: 999px; font-weight: 700; font-size: 12.5px; color: var(--ph-navy); }
.pills button.on { background: #1E9BEA; color: #fff; }
.ov-u { text-align: left; font-size: 11px; font-weight: 700; color: var(--ph-navy); margin: 4px 0; }
.ov-lg { font-size: 11.5px; }
.ov-lg b { color: #1E5BC6; }
.ov-err { text-align: center; padding: 60px 10px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kpi { border-radius: 12px; color: #fff; padding: 10px 10px 12px; min-height: 92px; cursor: pointer; transition: transform .1s; position: relative; }
.kpi:active { transform: scale(.98); }
.kpi-h { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; line-height: 1.2; }
.kpi-ic { width: 22px; height: 22px; border-radius: 6px; background: rgba(255,255,255,.95); color: inherit; display: grid; place-items: center; flex: none; }
.kpi-ic .ic { color: #3A465C; }
.kpi-v { font-weight: 800; font-size: 17px; margin-top: 8px; word-break: break-all; }
.kpi-n { font-size: 10.5px; opacity: .92; margin-top: 2px; }
.kpi-r { display: flex; justify-content: space-between; font-size: 12px; margin-top: 6px; }
.skel-k { min-height: 92px; background: linear-gradient(90deg, #E2E7EE 0%, #F2F4F8 50%, #E2E7EE 100%); background-size: 200% 100%; animation: shimmer 1.1s linear infinite; cursor: default; }

/* bottom nav */
.bnav { flex: none; height: 64px; background: #fff; display: flex; align-items: center; justify-content: space-around; border-top: 1px solid var(--ph-line); position: relative; }
.bnav button { border: 0; background: none; color: #8A94A6; width: 60px; height: 44px; }
.bnav button.on { color: var(--ph-blue); }
.bn-center { width: 54px !important; height: 54px !important; border-radius: 50%; background: #fff !important; color: var(--ph-navy) !important; box-shadow: 0 4px 14px rgba(16,32,64,.2); margin-top: -26px; }

/* home */
.ph-head.home { padding-bottom: 12px; }
.hm-user { display: flex; align-items: center; gap: 8px; padding: 6px 16px 10px; }
.av { width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #0D4FA6; display: grid; place-items: center; font-weight: 800; }
.bell { margin-left: auto; position: relative; }
.bell i { position: absolute; top: 0; right: 0; width: 7px; height: 7px; border-radius: 50%; background: #E53935; }
.hm-search { margin: 0 12px; background: #fff; color: var(--ph-ink); border-radius: 12px; padding: 8px; }
.hm-search .chips { margin: 0 0 8px; }
.hm-search .chips span { background: #EEF2F8; color: #4B5870; font-size: 11px; }
.hm-search .chips span.on { background: #1E86F0; color: #fff; }
.sbox { border: 1px solid var(--ph-line); border-radius: 8px; padding: 7px 10px; color: #98A2B3; font-size: 11.5px; }
.hm-sec { font-weight: 800; color: var(--ph-navy); font-size: 12.5px; margin: 4px 4px 10px; }
.hm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 6px; text-align: center; font-size: 11.5px; font-weight: 600; }
.hm-fn span { display: grid; place-items: center; width: 42px; height: 42px; margin: 0 auto 4px; border-radius: 12px; background: #EAF1FD; color: #1E5BC6; }
.hm-more { text-align: center; color: #E07B0C; font-size: 11.5px; margin: 10px 0; }
.hm-rp { background: #fff; border-radius: 12px; padding: 10px; }
.hm-rph { display: flex; justify-content: space-between; }
.hm-rph a { color: #E07B0C; font-size: 11.5px; cursor: pointer; }
.hm-rpc { background: #F2F6FC; border-radius: 10px; padding: 8px; margin-top: 8px; font-size: 11.5px; }
.hm-rpv { display: grid; grid-template-columns: 1fr 1fr; margin-top: 6px; }
.hm-rpv small { display: block; color: var(--ph-ink2); }
.hm-rpv b { color: #1E5BC6; }
.neg { color: #D62F2F; }

/* highlight like red box in PDF */
.hl { position: relative; outline: 3px solid #E53935 !important; outline-offset: 2px; border-radius: 14px; animation: hlpulse 1.2s ease-in-out 3; z-index: 2; }
@keyframes hlpulse { 50% { outline-color: rgba(229,57,53,.25); } }

/* sheets */
.sheet-bg { position: absolute; inset: 0; background: rgba(8,14,26,.45); animation: fade .15s; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; color: var(--ph-ink); border-radius: 22px 22px 0 0; padding: 8px 16px 22px; animation: up .2s ease-out; font-size: 13px; max-height: 80%; overflow: auto; }
.sheet.pick { z-index: 2; box-shadow: 0 -10px 30px rgba(0,0,0,.18); }
@keyframes up { from { transform: translateY(40%); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.grip { width: 40px; height: 4px; border-radius: 2px; background: #D5DBE5; margin: 2px auto 8px; }
.sh-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.sh-h b { font-size: 16px; }
.sh-h button { border: 0; background: #F1F4F8; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #4B5870; }
.fr { margin-bottom: 10px; }
.fr label { display: block; font-size: 12px; color: #5D6A80; margin-bottom: 4px; font-weight: 600; }
.fsel { width: 100%; display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--ph-line); background: #F8FAFC; border-radius: 10px; padding: 9px 12px; text-align: left; color: var(--ph-ink); }
.frd { display: flex; align-items: center; gap: 6px; }
.frd button { flex: 1; border: 1px solid var(--ph-line); background: #F8FAFC; border-radius: 10px; padding: 9px 10px; color: var(--ph-ink); }
.ferr { color: #D62F2F; font-size: 12px; margin: -2px 0 8px; }
.sh-btns { display: flex; gap: 10px; margin-top: 14px; }
.btn-o, .btn-p { flex: 1; height: 42px; border-radius: 12px; font-weight: 700; display: grid; place-items: center; }
.btn-o { border: 1px solid #C9D3E3; background: #fff; color: #4B5870; }
.btn-p { border: 0; background: var(--ph-blue); color: #fff; }
.ov-err .btn-p { width: 140px; margin: 10px auto 0; }
.plist { display: grid; max-height: 300px; overflow: auto; }
.plist button { display: flex; justify-content: space-between; align-items: center; border: 0; border-bottom: 1px solid #F1F3F7; background: none; padding: 11px 4px; text-align: left; color: var(--ph-ink); }
.plist button.on { color: var(--ph-blue); font-weight: 700; }
.dinp { width: 100%; height: 44px; border: 1px solid var(--ph-line); border-radius: 10px; padding: 0 12px; font: inherit; color: var(--ph-ink); background: #F8FAFC; color-scheme: light; }

/* real screenshots */
.real { position: relative; height: 100%; background: #000; }
.real img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.real-nav { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.6); color: #fff; padding: 4px 8px; border-radius: 999px; font-size: 12px; }
.real-nav button { border: 0; background: rgba(255,255,255,.18); color: #fff; width: 28px; height: 28px; border-radius: 50%; font-size: 16px; }

.lightbox { position: fixed; inset: 0; background: rgba(5,10,20,.82); display: none; place-items: center; z-index: 90; cursor: zoom-out; padding: 20px; }
.lightbox.on { display: grid; }
.lightbox img { max-height: 92vh; max-width: 92vw; border-radius: 18px; }
.scrim { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1360px) {
  .layout { grid-template-columns: 260px minmax(0, 1fr) 400px; }
  .content { padding: 24px 22px 80px; }
  .phone-col { padding: 12px; }
}
@media (max-width: 1100px) {
  .layout { grid-template-columns: 260px minmax(0, 1fr); }
  .only-md { display: inline-block; }
  .phone-col { position: fixed; top: 60px; right: 0; bottom: 0; height: auto; width: 410px; max-width: 100vw; z-index: 60; transform: translateX(105%); transition: transform .25s; box-shadow: -10px 0 30px rgba(0,0,0,.2); }
  body.show-phone .phone-col { transform: none; }
  body.show-phone .scrim, body.show-nav .scrim { display: block; position: fixed; inset: 60px 0 0; background: rgba(5,10,20,.35); z-index: 50; }
}
@media (max-width: 820px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .only-sm { display: inline-block; }
  .nav { position: fixed; top: 60px; left: 0; bottom: 0; height: auto; width: 300px; max-width: 86vw; z-index: 60; transform: translateX(-105%); transition: transform .25s; box-shadow: 10px 0 30px rgba(0,0,0,.2); }
  body.show-nav .nav { transform: none; }
  .content { padding: 16px 16px 60px; }
  .doc-sec { padding: 20px 16px; }
  .steps li { grid-template-columns: 1fr; gap: 6px; }
  .sn { justify-self: start; }
  .go-btn { justify-self: start; }
  .grid2, .states, .anatomy { grid-template-columns: 1fr; }
  .brand small { display: none; }
  .topbar { padding: 0 12px; }
}
@media (max-width: 430px) {
  .phone-col { width: 100vw; padding: 8px; }
  .phone { width: 100%; height: calc(100vh - 150px); border-radius: 34px; padding: 8px; }
  .ph-screen { border-radius: 26px; }
  #phSheet { inset: 8px; border-radius: 26px; }
  .ph-tools { width: 100%; }
}
