/* XLab Hub: bố cục kiểu Apple, màu FPT */
:root {
  --bg: #f5f5f7; --card: #fff; --ink: #1d1d1f; --ink2: #6e6e73; --ink3: #6e6e73;
  --hair: rgba(0,0,0,.09); --hair2: rgba(0,0,0,.05); --fill: rgba(0,0,0,.04); --fill2: rgba(0,0,0,.08);
  --o: #F37021; --b: #0A5BAA; --g: #1E7A35; --red: #D70015; --amb: #995000;
  --trad: #0A5BAA; --innov: #1E7A35; --chip-trad: #0A5BAA; --chip-innov: #1E7A35; --o-text: #A8460A;
  --nav: rgba(245,245,247,.85); --shadow: 0 24px 60px rgba(0,0,0,.18); --r: 14px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000; --card: #1c1c1e; --ink: #f5f5f7; --ink2: #a1a1a6; --ink3: #8e8e93;
    --hair: rgba(255,255,255,.13); --hair2: rgba(255,255,255,.07); --fill: rgba(255,255,255,.07); --fill2: rgba(255,255,255,.13);
    --b: #4A90D9; --trad: #4A90D9; --g: #3DBE5A; --innov: #3DBE5A; --red: #FF453A; --amb: #E0A040;
    --nav: rgba(22,22,23,.85); --shadow: 0 24px 60px rgba(0,0,0,.6); --o-text: #FF8A3D; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000; --card: #1c1c1e; --ink: #f5f5f7; --ink2: #a1a1a6; --ink3: #8e8e93;
  --hair: rgba(255,255,255,.13); --hair2: rgba(255,255,255,.07); --fill: rgba(255,255,255,.07); --fill2: rgba(255,255,255,.13);
  --b: #4A90D9; --trad: #4A90D9; --g: #3DBE5A; --innov: #3DBE5A; --red: #FF453A; --amb: #E0A040;
  --nav: rgba(22,22,23,.85); --shadow: 0 24px 60px rgba(0,0,0,.6); --o-text: #FF8A3D; color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
p, li, dd, td, .pvt, .ns-why { text-wrap: pretty; }
h1, h2, h3, h4, .ns { text-wrap: balance; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; }
a { color: var(--b); text-decoration: none; }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding-left: 20px; }
:focus-visible { outline: 2px solid var(--b); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--ink2); } .faint { color: var(--ink3); } .small { font-size: 13px; } .xs { font-size: 12px; }
.nowrap { white-space: nowrap; } .num { font-variant-numeric: tabular-nums; }
.view .edit-only { display: none !important; }

/* nav */
.nav { position: sticky; top: 0; z-index: 30; background: var(--nav); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--hair); }
.nav-in { max-width: 1280px; margin: 0 auto; padding: 0 24px; height: 52px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; white-space: nowrap; color: var(--ink); }
.logo { display: inline-flex; gap: 2px; } .logo i { width: 5px; height: 14px; border-radius: 2px; transform: skewX(-12deg); }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 6px 11px; border-radius: 980px; font-size: 13px; color: var(--ink2); white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); background: var(--fill2); font-weight: 600; }
.mode { font-size: 12px; white-space: nowrap; padding: 4px 10px; border-radius: 980px; border: 1px solid var(--hair); color: var(--ink2); }
.mode b { color: var(--ink); font-weight: 600; }

/* page */
.page { max-width: 1280px; margin: 0 auto; padding: 40px 24px 120px; }
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.ph h1 { font-size: 34px; line-height: 1.15; font-weight: 700; letter-spacing: -.025em; }
.ph p { color: var(--ink2); margin-top: 6px; max-width: 760px; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--o-text); margin-bottom: 6px; }
.sec { margin-top: 44px; }
.sec > h2, .sh h2 { font-size: 21px; font-weight: 700; letter-spacing: -.015em; }
.sh { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.sh p { color: var(--ink2); font-size: 14px; }
.panel { background: var(--card); border-radius: var(--r); padding: 22px 24px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid2 > *, .grid3 > * { min-width: 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px; border-radius: 980px; font-size: 14px; font-weight: 500; white-space: nowrap; background: var(--fill2); color: var(--ink); min-height: 36px; }
.btn:hover { background: var(--hair); }
.btn.pri { background: var(--ink); color: var(--bg); }
.btn.pri:hover { opacity: .88; }
.btn.sm { padding: 5px 11px; font-size: 13px; min-height: 30px; }
.btn.ghost { background: none; color: var(--b); padding-left: 6px; padding-right: 6px; }
.btn.ghost:hover { background: var(--fill); }
.btn.danger { color: var(--red); background: none; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; background: var(--fill2); border-radius: 980px; padding: 2px; }
.seg button { padding: 5px 12px; border-radius: 980px; font-size: 13px; color: var(--ink2); white-space: nowrap; min-height: 30px; }
.seg button.on { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* chips */
.code { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .02em; padding: 2px 7px; border-radius: 6px; color: #fff; white-space: nowrap; vertical-align: 1px; }
.code.trad { background: var(--chip-trad); } .code.innov { background: var(--chip-innov); }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 9px; border-radius: 980px; background: var(--fill2); color: var(--ink2); white-space: nowrap; }
.tag.red { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
.tag.green { background: color-mix(in srgb, var(--g) 13%, transparent); color: var(--g); }
.tag.amb { background: color-mix(in srgb, var(--amb) 14%, transparent); color: var(--amb); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.who { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--fill2); font-size: 11px; font-weight: 700; color: var(--ink2); flex: none; }
.whos { display: inline-flex; } .whos .who { margin-left: -5px; border: 2px solid var(--card); } .whos .who:first-child { margin-left: 0; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--card); border-radius: var(--r); }
.stat { padding: 18px 22px; border-left: 1px solid var(--hair2); }
.stat:first-child { border-left: 0; }
.stat .v { font-size: 30px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .v small { font-size: 15px; font-weight: 600; color: var(--ink2); }
.stat .l { font-size: 13px; color: var(--ink2); margin-top: 4px; }
.stat.alert .v { color: var(--red); }

/* north star */
.ns { font-size: 22px; line-height: 1.4; font-weight: 600; letter-spacing: -.01em; max-width: 980px; }
.ns-why { color: var(--ink2); margin-top: 10px; max-width: 860px; }

/* org tree */
.tree { background: var(--card); border-radius: var(--r); padding: 26px 24px 22px; }
.t-root { display: flex; justify-content: center; }
.t-root .node { min-width: 220px; text-align: center; }
.t-tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 34px; position: relative; }
.t-tracks::before { content: ""; position: absolute; top: -34px; left: 50%; height: 17px; border-left: 1.5px solid var(--hair); }
.t-tracks::after { content: ""; position: absolute; top: -17px; left: 25%; right: 25%; border-top: 1.5px solid var(--hair); }
.t-track { position: relative; }
.t-track::before { content: ""; position: absolute; top: -17px; left: 50%; height: 17px; border-left: 1.5px solid var(--hair); }
.t-head { text-align: center; font-weight: 700; font-size: 15px; padding: 8px 0 2px; }
.t-head small { display: block; font-weight: 400; color: var(--ink2); font-size: 12px; }
.t-lines { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.node { border: 1px solid var(--hair); border-radius: 12px; padding: 12px 14px; background: var(--card); }
.lnode { display: block; width: 100%; border-top: 3px solid var(--tc); text-align: left; color: var(--ink); }
.lnode:hover { border-color: var(--tc); }
.lnode h4 { font-size: 14px; font-weight: 650; line-height: 1.3; margin-top: 6px; }
.lnode .meta { font-size: 12px; color: var(--ink2); margin-top: 4px; }
.pips { display: flex; gap: 3px; margin-top: 10px; flex-wrap: wrap; }
.pip { width: 14px; height: 6px; border-radius: 3px; background: var(--fill2); }
.lnode .foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--ink2); }

/* stage colours: neutral to blue to green */
.st-idea { --sc: #A1A1A6; } .st-explore { --sc: #6FA3DC; } .st-pilot { --sc: #0A5BAA; } .st-scale { --sc: #2E9E46; } .st-done { --sc: #1F6E31; } .st-stop { --sc: #D70015; }
.pip[class*="st-"] { background: var(--sc); }
.stage { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink2); white-space: nowrap; }
.stage::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sc); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink2); margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

/* bubble */
.bubble svg { width: 100%; height: auto; display: block; overflow: visible; }
.bubble text { font-family: var(--font); }

/* lists */
.feed { list-style: none; padding: 0; }
.feed li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--hair2); font-size: 14px; }
.feed li:first-child { border-top: 0; }
.feed .when { color: var(--ink3); font-size: 12px; white-space: nowrap; min-width: 52px; padding-top: 1px; }
.attn li { align-items: flex-start; }
.empty { color: var(--ink3); font-size: 14px; padding: 8px 0; }

/* table */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink2); padding: 8px 10px; border-bottom: 1px solid var(--hair); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--hair2); vertical-align: top; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--fill); }
.tbl .grp td { background: var(--fill); font-weight: 600; font-size: 13px; padding: 7px 10px; }
.tblwrap { overflow-x: auto; background: var(--card); border-radius: var(--r); }

/* progress */
.prog { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.bar { flex: 1; height: 6px; border-radius: 3px; background: var(--fill2); overflow: hidden; min-width: 60px; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--g); }
.pvt { font-size: 12px; color: var(--ink2); line-height: 1.4; }
.prog .pv { font-size: 12px; color: var(--ink2); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* kanban */
.kb { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.col { background: var(--fill); border-radius: var(--r); padding: 12px; min-height: 120px; }
.col h3 { font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 10px; }
.col h3 .n { color: var(--ink2); font-weight: 500; }
.icard { display: block; width: 100%; background: var(--card); border-radius: 11px; padding: 12px 13px; margin-bottom: 9px; box-shadow: 0 1px 2px rgba(0,0,0,.06); text-align: left; }
.icard:hover { box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.icard h4 { font-size: 14px; font-weight: 600; line-height: 1.35; margin: 6px 0 8px; }
.icard .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink2); margin-top: 6px; }
.flags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }

/* gantt */
.gantt { background: var(--card); border-radius: var(--r); overflow-x: auto; }
.g-in { min-width: 880px; }
.g-row { display: grid; grid-template-columns: 210px 1fr; border-top: 1px solid var(--hair2); }
.g-row:first-child { border-top: 0; }
.g-lab { padding: 9px 16px 9px 28px; font-size: 13px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.g-lab span.t { line-height: 1.3; }
.g-track { position: relative; display: grid; grid-template-columns: repeat(var(--m), 1fr); min-height: 38px; }
.g-track > i { border-left: 1px solid var(--hair2); }
.g-track > i.q { border-left-color: var(--hair); }
.g-head .g-track > i { font-style: normal; font-size: 12px; color: var(--ink2); padding: 10px 0 8px 6px; white-space: nowrap; }
.g-head .g-lab { padding-left: 16px; font-size: 12px; color: var(--ink2); font-weight: 600; }
.g-bar { position: absolute; top: 8px; height: 22px; border-radius: 6px; background: var(--lc); color: #fff; font-size: 12px; font-weight: 600; padding: 0 8px; display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
button.g-bar:hover { filter: brightness(1.08); }
.g-gate { position: absolute; top: 9px; width: 16px; height: 16px; transform: translateX(-8px) rotate(45deg); background: var(--o); border-radius: 3px; }
.g-grp td, .g-grp { background: var(--fill); }
.g-grp .g-lab { padding-left: 16px; font-weight: 700; font-size: 12px; color: var(--ink2); }
.g-today { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--red); pointer-events: none; }

/* heatmap */
.heat td.c { text-align: center; font-variant-numeric: tabular-nums; font-size: 13px; padding: 0; }
.heat td.c button { display: block; width: 100%; min-height: 40px; padding: 10px 6px; }
.heat .h0 { color: var(--ink3); }
.heat .h1 { background: color-mix(in srgb, var(--b) 14%, transparent); }
.heat .h2 { background: color-mix(in srgb, var(--b) 30%, transparent); }
.heat .h3 { background: color-mix(in srgb, var(--b) 45%, transparent); color: var(--ink); font-weight: 600; }
.heat .hover { background: color-mix(in srgb, var(--red) 22%, transparent); color: var(--red); font-weight: 700; }
.heat .plan { font-style: italic; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; }

/* detail drawer and modal */
#layer:empty { display: none; }
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.28); display: flex; justify-content: flex-end; }
.drawer { width: min(720px, 100%); height: 100%; background: var(--bg); overflow-y: auto; box-shadow: var(--shadow); padding: 0 0 60px; }
.dhead { position: sticky; top: 0; z-index: 2; background: var(--nav); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; border-bottom: 1px solid var(--hair); }
.dbody { padding: 24px; }
.dbody h2 { font-size: 24px; line-height: 1.25; letter-spacing: -.02em; margin: 8px 0 6px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; font-size: 14px; margin-top: 18px; }
.kv dt { color: var(--ink2); } .kv dd { margin: 0; }
.dsec { margin-top: 26px; }
.dsec h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mbox { background: var(--card); border-radius: 12px; padding: 16px 18px; }
.mnums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.mnums div { font-size: 12px; color: var(--ink2); } .mnums b { display: block; font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }
.modal-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.28); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { width: min(620px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--card); border-radius: 18px; box-shadow: var(--shadow); }
.modal .mh { padding: 18px 22px 6px; font-size: 18px; font-weight: 700; }
.modal form { padding: 8px 22px 20px; }
.fld { display: block; margin-top: 12px; }
.fld > span { display: block; font-size: 12px; font-weight: 600; color: var(--ink2); margin-bottom: 4px; }
.fld input, .fld select, .fld textarea { width: 100%; border: 1px solid var(--hair); border-radius: 9px; padding: 8px 10px; background: var(--bg); min-height: 38px; }
.fld textarea { min-height: 72px; resize: vertical; }
.frow { display: grid; grid-template-columns: repeat(var(--n, 2), 1fr); gap: 12px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; padding-top: 4px; }
.checks label { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; white-space: nowrap; }
.mfoot { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* report */
.report { background: var(--card); border-radius: var(--r); padding: 28px 32px; max-width: 900px; }
.report h2 { font-size: 22px; letter-spacing: -.015em; }
.report h3 { font-size: 15px; font-weight: 700; margin: 24px 0 8px; }
.report ul { padding-left: 20px; } .report li { margin: 5px 0; }
.report .sub { color: var(--ink2); font-size: 14px; margin-top: 4px; }
.headline { width: 100%; min-height: 80px; border: 1px solid var(--hair); border-radius: 10px; padding: 10px 12px; background: var(--bg); }

/* goals */
.goals { list-style: none; padding: 0; background: var(--card); border-radius: var(--r); }
.goals li { display: grid; grid-template-columns: 150px 1fr 1.1fr 40px; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--hair2); align-items: start; font-size: 14px; }
.goals li:first-child { border-top: 0; }
.goals .gt { font-weight: 600; }
.qs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--card); border-radius: var(--r); }
.qs > div { padding: 16px 20px; border-left: 1px solid var(--hair2); font-size: 14px; }
.qs > div:first-child { border-left: 0; }
.qs b { display: block; font-size: 13px; color: var(--o-text); margin-bottom: 4px; }

.ideas .score { font-variant-numeric: tabular-nums; font-weight: 700; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 9px 16px; border-radius: 980px; font-size: 14px; z-index: 80; opacity: 0; pointer-events: none; transition: opacity .2s; }
#toast.on { opacity: 1; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters select { border: 1px solid var(--hair); border-radius: 980px; padding: 6px 12px; background: var(--card); font-size: 13px; min-height: 32px; }

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(4) { border-left: 0; } .stat:nth-child(n+4) { border-top: 1px solid var(--hair2); }
  .stat:last-child { grid-column: span 2; }
  .t-lines { grid-template-columns: 1fr; }
  .qs { grid-template-columns: 1fr 1fr; } .qs > div:nth-child(3) { border-left: 0; } .qs > div:nth-child(n+3) { border-top: 1px solid var(--hair2); }
}
@media (max-width: 760px) {
  .nav-in { padding: 8px 12px; gap: 6px; height: auto; flex-wrap: wrap; }
  .tabs { flex-wrap: wrap; overflow: visible; flex-basis: 100%; gap: 2px 0; }
  .tab { padding: 12px 10px; min-height: 44px; display: inline-flex; align-items: center; min-width: 44px; justify-content: center; }
  .btn { min-height: 44px; }
  .feed a[data-open] { display: inline-block; padding: 12px 4px; margin: -12px 0; }
  .filters select { flex: 1 1 calc(50% - 10px); min-width: 0; }
  .tbl td:first-child { min-width: 180px; }
  .brand .bt { display: none; }
  .mode { display: none; }
  .page { padding: 24px 16px 90px; }
  .ph h1 { font-size: 27px; }
  .ns { font-size: 18px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 14px 16px; } .stat .v { font-size: 24px; }
  .stat:nth-child(odd) { border-left: 0; } .stat:nth-child(4) { border-left: 1px solid var(--hair2); } .stat:nth-child(n+3) { border-top: 1px solid var(--hair2); }
  .stat:last-child { grid-column: span 2; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .t-tracks { grid-template-columns: 1fr; gap: 26px; margin-top: 20px; }
  .t-tracks::before, .t-tracks::after, .t-track::before { display: none; }
  .t-lines { grid-template-columns: 1fr; }
  .panel, .tree { padding: 18px 16px; }
  .goals li { grid-template-columns: 56px 1fr 34px; } .goals li .gm { grid-column: 2 / 3; }
  .qs { grid-template-columns: 1fr; } .qs > div { border-left: 0 !important; border-top: 1px solid var(--hair2); } .qs > div:first-child { border-top: 0; }
  .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 10px; }
  .dbody, .dhead { padding-left: 16px; padding-right: 16px; }
  .frow { grid-template-columns: 1fr; }
  .report { padding: 20px 18px; }
  .kb { grid-template-columns: repeat(5, 78vw); }
  .g-row { grid-template-columns: 150px 1fr; }
  .mnums b { font-size: 17px; }
}
@media print {
  .nav, .edit-only, .btns, .filters { display: none !important; }
  body { background: #fff; } .page { padding: 0; }
}
.heat td.c span { display: block; padding: 10px 6px; }
/* bóng ở mép khi bảng cuộn ngang được */
.tblwrap, .gantt {
  background:
    linear-gradient(90deg, var(--card) 30%, transparent) left / 40px 100% no-repeat local,
    linear-gradient(270deg, var(--card) 30%, transparent) right / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.22), transparent) left / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.22), transparent) right / 14px 100% no-repeat scroll,
    var(--card);
}

.kb {
  background:
    linear-gradient(90deg, var(--bg) 30%, transparent) left / 40px 100% no-repeat local,
    linear-gradient(270deg, var(--bg) 30%, transparent) right / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.22), transparent) left / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.22), transparent) right / 14px 100% no-repeat scroll;
}

/* ===== v2 ===== */
.gl { font-size: 13px; font-weight: 600; color: var(--ink2); }
.psel { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink2); }
.psel select { border: 1px solid var(--hair); border-radius: 980px; padding: 7px 14px; background: var(--card); font-size: 14px; font-weight: 600; color: var(--ink); min-height: 38px; }
.stats { grid-template-columns: repeat(6, 1fr); }
.stats.s5 { grid-template-columns: repeat(5, 1fr); }
.stat .xs { margin-top: 4px; }
.dl { color: var(--ink3); } .dl.up { color: var(--g); } .dl.down { color: var(--red); }
.seg.wrap { flex-wrap: wrap; border-radius: 14px; }
/* track panels */
.tracks .track { border-top: 3px solid var(--tc); }
.track-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tname { font-size: 19px; font-weight: 700; color: var(--tc); letter-spacing: -.01em; }
.vision { margin-top: 6px; font-size: 15px; }
.kpi { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; margin: 18px 0 6px; padding: 14px 16px; background: var(--fill); border-radius: 12px; }
.kpi-n b { font-size: 40px; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi-n span { display: block; font-size: 13px; color: var(--ink2); margin-top: 2px; }
.bar.big { height: 8px; margin: 8px 0 6px; }
.lines-t { margin-top: 10px; }
.lines-t td, .lines-t th { padding-left: 0; }
.int { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 980px; white-space: nowrap; }
.int-high { background: color-mix(in srgb, var(--g) 14%, transparent); color: var(--g); }
.int-mid { background: var(--fill2); color: var(--ink2); }
.int-none { background: color-mix(in srgb, var(--red) 11%, transparent); color: var(--red); }
.pips { display: flex; gap: 3px; flex-wrap: wrap; justify-content: flex-end; }
/* interest heatmap */
.heatm th, .heatm td { text-align: center; padding: 0; font-size: 12px; }
.heatm thead th { padding: 8px 4px; }
.heatm tbody th { text-align: left; padding: 8px 12px; font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--ink); }
.heatm td.im { position: relative; height: 40px; min-width: 52px; border-left: 2px solid var(--card); border-bottom: 2px solid var(--card); font-variant-numeric: tabular-nums; }
.heatm td.im span { font-weight: 600; }
.heatm th.now { color: var(--o-text); }
.heatm td.now { box-shadow: inset 0 0 0 2px var(--o); }
.evd { position: absolute; top: 3px; right: 4px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--ink); color: var(--card); font-size: 10px; font-style: normal; font-weight: 700; line-height: 16px; padding: 0 4px; }
.evd.static { position: static; display: inline-block; }
.heatm .grp td { text-align: left; padding: 6px 12px; }
/* horizontal bars */
.hbars { display: grid; gap: 10px; }
.hb { display: grid; grid-template-columns: minmax(110px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.hb-l { overflow-wrap: anywhere; }
.hb-b { display: flex; height: 12px; background: var(--fill); border-radius: 6px; overflow: hidden; }
.hb-b i { display: block; height: 100%; background: var(--b); }
.hb-v { color: var(--ink2); white-space: nowrap; }
.trg, .hb-b i.trg { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--b) 45%, transparent) 0 4px, transparent 4px 7px) !important; }
.sw.trg { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--b) 55%, transparent) 0 3px, transparent 3px 5px); border: 1px solid color-mix(in srgb, var(--b) 40%, transparent); }
/* quarter compare */
.qc { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.qc-i { background: var(--card); border-radius: var(--r); padding: 14px 14px 10px; }
.qc-bars { display: flex; align-items: flex-end; gap: 6px; height: 110px; margin-top: 10px; }
.qc-b { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.qc-b i { display: block; width: 100%; max-width: 30px; border-radius: 4px 4px 0 0; background: var(--fill2); min-height: 2px; }
.qc-b.sel i { background: var(--b); }
.qc-v { font-size: 11px; color: var(--ink2); white-space: nowrap; margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.qc-l { font-size: 11px; color: var(--ink2); margin-top: 4px; }
.qc-b.cur .qc-l { color: var(--o-text); font-weight: 700; }
/* attention chips */
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.chipb { font-size: 13px; padding: 6px 11px; border-radius: 980px; background: var(--fill); color: var(--ink2); min-height: 32px; white-space: nowrap; }
.chipb.on { background: var(--ink); color: var(--bg); }
.chipb .n { opacity: .7; margin-left: 2px; }
.chips select { border: 1px solid var(--hair); border-radius: 980px; padding: 5px 10px; background: var(--card); font-size: 13px; margin-left: auto; min-height: 32px; }
/* roadmap v2 */
.g-qs { display: flex; border-bottom: 1px solid var(--hair); }
.g-qs span { padding: 10px 6px 6px; font-size: 12px; font-weight: 700; border-left: 1px solid var(--hair); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-head2 .g-track > i { font-style: normal; font-size: 11px; color: var(--ink2); padding: 6px 0 6px 5px; white-space: nowrap; }
.g-bar { top: 7px; height: 24px; font-size: 12px; font-weight: 600; text-align: left; }
.g-bar.ph { background: var(--o); }
.master { background: color-mix(in srgb, var(--o) 6%, transparent); }
.gates .g-track { min-height: 44px; }
.g-gl { position: absolute; top: 25px; transform: translateX(-50%); font-size: 10.5px; color: var(--ink2); white-space: nowrap; }
.g-gate { top: 7px; }
/* boards */
.kb4 { grid-template-columns: repeat(4, minmax(220px, 1fr)); }
.col.over { outline: 2px dashed var(--b); outline-offset: -4px; background: color-mix(in srgb, var(--b) 8%, transparent); }
.icard, .tcard { cursor: pointer; }
[draggable="true"] { cursor: grab; }
.dragging { opacity: .45; }
.tcard { display: block; width: 100%; background: var(--card); border-radius: 11px; padding: 11px 12px; margin-bottom: 9px; box-shadow: 0 1px 2px rgba(0,0,0,.06); text-align: left; }
.tcard:hover { box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.tcard .tt { font-size: 14px; font-weight: 600; line-height: 1.35; margin: 6px 0 2px; }
.tcard .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--ink2); margin-top: 6px; }
.late { color: var(--red); font-weight: 600; }
.addc { width: 100%; justify-content: center; }
.tbl .lvl1 td { background: var(--fill2); }
.tbl .lvl2 td { background: var(--fill); font-weight: 500; padding-left: 26px; color: var(--ink2); }
/* drawer streams */
.stream { margin-top: 10px; background: var(--card); border-radius: 12px; padding: 10px 14px; }
.stream-h { display: flex; align-items: center; gap: 10px; justify-content: space-between; font-size: 14px; }
.stream-h b { flex: 1; }
.prog.sm { min-width: 110px; }
.feed li.click { cursor: pointer; } .feed li.click:hover { background: var(--fill); }
/* monthly cost bars */
.mbars { display: grid; grid-template-columns: repeat(13, 1fr); gap: 8px; align-items: end; height: 220px; }
.mb { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.mb-s { width: 100%; max-width: 40px; display: flex; flex-direction: column-reverse; height: calc(100% - 40px); justify-content: flex-start; }
.mb-s i { display: block; width: 100%; background: var(--cc); }
.mb-s i:last-child { border-radius: 4px 4px 0 0; }
.mb-s i.trg { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--cc) 55%, transparent) 0 4px, transparent 4px 7px); }
.mb-v { font-size: 10.5px; color: var(--ink2); white-space: nowrap; margin-bottom: 3px; }
.mb-l { font-size: 11px; color: var(--ink2); margin-top: 5px; white-space: nowrap; }
td.over { color: var(--red); font-weight: 700; }
/* radar */
.rstat { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; font-size: 14px; padding: 14px 20px; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--hair); border-top-color: var(--b); border-radius: 50%; animation: sp 1s linear infinite; vertical-align: -1px; margin-right: 6px; }
@keyframes sp { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
.sigs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sig { background: var(--card); border-radius: var(--r); padding: 16px 18px; border-left: 3px solid var(--hair); }
.sig.s3 { border-left-color: var(--o); } .sig.s2 { border-left-color: var(--b); }
.sig h3 { font-size: 16px; line-height: 1.35; margin: 8px 0 6px; }
.sig p { font-size: 14px; margin-top: 6px; }
.sig-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sig-f { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; font-size: 13px; }
.sig-f .btns { margin-left: auto; }
.lab { display: inline-block; font-size: 11px; font-weight: 700; color: var(--ink2); background: var(--fill2); border-radius: 5px; padding: 1px 6px; margin-right: 4px; }
.lab.inf { color: var(--amb); background: color-mix(in srgb, var(--amb) 12%, transparent); }
.rrep { max-width: 1000px; }
.kinds { display: flex; flex-wrap: wrap; gap: 10px; }
.kinds div { background: var(--fill); border-radius: 12px; padding: 10px 14px; min-width: 100px; }
.kinds b { display: block; font-size: 24px; }
.kinds span { font-size: 12px; color: var(--ink2); }
.toplist li { margin: 12px 0; }
/* ideas */
.ideas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.idea { background: var(--card); border-radius: var(--r); padding: 14px 16px; }
.idea.click { cursor: pointer; } .idea.click:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.idea h3 { font-size: 15px; margin: 8px 0 4px; line-height: 1.35; }
.checks-l { list-style: none; padding: 0; } .checks-l li { display: flex; gap: 8px; align-items: baseline; }
/* form extras */
.rng { display: flex; align-items: center; gap: 10px; min-height: 38px; }
.rng input { flex: 1; accent-color: var(--b); }
.rng output { min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.fld small { display: block; margin-top: 4px; }
/* quick capture */
.fab { position: fixed; right: 24px; bottom: 24px; z-index: 40; display: inline-flex; align-items: center; gap: 6px; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 980px; font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.25); min-height: 44px; }
.fab span { font-size: 18px; line-height: 1; }
.fab[hidden] { display: none; }
@media (max-width: 1100px) {
  .stats, .stats.s5 { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(4) { border-left: 0; } .stat:nth-child(n+4) { border-top: 1px solid var(--hair2); }
  .stat:last-child { grid-column: auto; }
  .stats.s5 .stat:last-child { grid-column: span 2; }
  .qc { grid-template-columns: repeat(3, 1fr); }
  .ideas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .stats, .stats.s5 { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(odd) { border-left: 0; } .stat:nth-child(even) { border-left: 1px solid var(--hair2); } .stat:nth-child(n+3) { border-top: 1px solid var(--hair2); }
  .stats.s5 .stat:last-child { grid-column: span 2; }
  .qc { grid-template-columns: 1fr 1fr; }
  .sigs, .ideas { grid-template-columns: 1fr; }
  .kpi { grid-template-columns: 1fr; gap: 6px; }
  .goals li { grid-template-columns: 1fr 34px; } .goals li .gl { grid-column: 1 / -1; } .goals li .gm { grid-column: 1 / 2; }
  .mbars { gap: 3px; height: 180px; } .mb-v { display: none; }
  .fab { right: 16px; bottom: 16px; }
  .chips select { margin-left: 0; }
  .psel span { display: none; }
}
@media print { .fab { display: none !important; } }
.g-row .g-track { min-height: 46px; }
.g-bar { top: 6px; height: 34px; white-space: normal; line-height: 1.2; font-size: 11.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; padding: 3px 8px; overflow: hidden; }
.g-head2 .g-track, .g-head .g-track { min-height: 0; }
.mb-s { height: calc(100% - 22px); }
.mb-s .mb-v { text-align: center; margin: 0 0 3px; }
.lands { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.land h3 { font-size: 16px; }
.claims { padding-left: 18px; } .claims li { margin: 8px 0; }
.lab.unk { color: var(--ink3); }
@media (max-width: 760px) { .lands { grid-template-columns: 1fr; } }
/* ===== QA v2 fixes ===== */
.tscroll { overflow-x: auto; max-width: 100%; }
.g-bar.ph { background: #B4500F; }
.g-bar { height: 40px; top: 4px; -webkit-line-clamp: 3; font-size: 12px; line-height: 1.15; }
.g-row .g-track { min-height: 48px; }
.g-gl, .qc-v, .qc-l, .mb-v, .mb-l, .g-head2 .g-track > i { font-size: 12px; }
.evd { font-size: 11px; }
@media (max-width: 1100px) { .mbars .mb:nth-child(even) .mb-l { visibility: hidden; } }
@media (max-width: 760px) {
  .lines-t th:nth-child(2), .lines-t td:nth-child(2) { display: none; }
  .seg { max-width: 100%; }
  .seg.wrap button { flex: 1 1 auto; }
  .chipb { min-height: 44px; }
  .ph p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}
.qc { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.qc-bars { gap: 4px; }
.qc-l, .qc-v { max-width: 100%; overflow: hidden; text-overflow: clip; }
@media (max-width: 1100px) { .qc { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .qc { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .qc-i { padding: 12px 10px 8px; } .qc-v { font-size: 11px; } }
/* ===== QA v2 round 2 ===== */
.code { font-size: 12px; }
.who { width: 26px; height: 26px; font-size: 12px; }
.lab { font-size: 12px; }
.evd { font-size: 12px; min-width: 18px; height: 18px; line-height: 18px; border-radius: 9px; }
.qc-v, .qc-l { font-size: 12px; overflow: visible; white-space: nowrap; }
@media (max-width: 760px) {
  .ph p { display: block; -webkit-line-clamp: unset; overflow: visible; }
  .nav-in { flex-wrap: nowrap; height: 56px; padding: 0 12px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; flex-basis: auto; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 24px; }
  .seg.wrap { display: grid; grid-template-columns: 1fr 1fr; width: 100%; border-radius: 14px; }
  .seg button, .seg.wrap button { min-height: 44px; }
  .filters select, .psel select, .chips select { min-height: 44px; }
  .btn, .btn.ghost, .btn.sm { min-height: 44px; }
  .tblwrap .tbl td:nth-child(2) { min-width: 200px; }
}
.tab { flex: none; }
@media (max-width: 760px) { .tabs { min-width: 0; flex: 1 1 0; } .brand { flex: none; } }
@media (max-width: 760px) { .tabs { -webkit-mask-image: linear-gradient(90deg, transparent, #000 18px, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 18px, #000 85%, transparent); padding-left: 10px; } }
/* ===== QA round 3 ===== */
.seg.wrap button:last-child:nth-child(odd) { grid-column: span 2; }
@media (max-width: 760px) {
  .sig-f a, .feed a[data-open], .toplist a { display: inline-block; padding: 12px 2px; margin: -12px 0; }
  .heat td:first-child, .heat th:first-child, .heatm tbody th { position: sticky; left: 0; background: var(--card); z-index: 1; box-shadow: 4px 0 6px -4px rgba(0,0,0,.25); }
}
@media (max-width: 760px) {
  .lines-t th:nth-child(4), .lines-t td:nth-child(4) { display: none; }
  .lines-t { table-layout: fixed; width: 100%; }
  .int { white-space: normal; }
}
td, .ph p { text-wrap: balance; }
.report a[data-open] { display: inline-block; padding: 12px 2px; margin: -12px 0; }
.brand { padding: 12px 4px; margin: -12px 0; }
.report a[data-open] { padding: 8px 2px; margin: -8px 0; }
.report li { margin: 8px 0; }
@media (max-width: 760px) { .brand { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0; margin: 0; } }
/* ===== Visual v3 ===== */
.kpi2 { display: flex; align-items: center; gap: 16px; margin: 16px 0 4px; }
.kpi-big { font-size: 15px; color: var(--ink2); } .kpi-big b { font-size: 34px; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ring { flex: none; }
.ltiles { display: grid; gap: 10px; margin-top: 16px; }
.ltile { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--fill); color: var(--ink); }
.ltile:hover { background: var(--fill2); }
.lt-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.lt-m { display: flex; align-items: center; gap: 8px; }
.lt-n { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lt-m .spark { margin-left: auto; }
.lt-f { display: flex; justify-content: space-between; align-items: center; }
.lt-f .pips { justify-content: flex-start; }
.spark.big { width: 100%; height: 120px; display: block; margin-top: 8px; }
.sp-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink2); margin-top: 4px; }
/* strategy */
.ns-hero { padding: 28px 0 8px; }
.ns-hero .ns { font-size: 28px; line-height: 1.3; font-weight: 700; letter-spacing: -.02em; max-width: 960px; }
.tcard2 { border-top: 3px solid var(--tc); }
.goals2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.goal { background: var(--card); border-radius: var(--r); padding: 18px 20px; border-left: 4px solid var(--tc); display: flex; flex-direction: column; gap: 10px; }
.g-line { font-size: 12px; font-weight: 700; color: var(--tc); }
.goal h3 { font-size: 16px; line-height: 1.35; }
.g-target { display: grid; gap: 2px; } .g-target b { font-size: 15px; }
.g-foot { display: flex; gap: 14px; align-items: center; margin-top: auto; font-size: 13px; color: var(--ink2); } .g-foot b { color: var(--ink); } .g-foot .btn { margin-left: auto; }
.qline { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; position: relative; }
.qline::before { content: ""; position: absolute; top: 9px; left: 0; right: 0; border-top: 2px solid var(--hair); }
.qline li { position: relative; padding: 26px 18px 0 0; }
.q-dot { position: absolute; top: 2px; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--card); border: 2px solid var(--hair); }
.qline li.now .q-dot { background: var(--o); border-color: var(--o); box-shadow: 0 0 0 5px color-mix(in srgb, var(--o) 20%, transparent); }
.qline li.past .q-dot { background: var(--ink3); border-color: var(--ink3); }
.qline b { font-size: 15px; } .qline p { font-size: 14px; color: var(--ink2); margin-top: 4px; }
.qline li.now b { color: var(--o-text); }
.princ { counter-reset: p; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.princ li { counter-increment: p; display: flex; gap: 12px; font-size: 15px; }
.princ li::before { content: counter(p); flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--fill2); font-weight: 700; font-size: 13px; display: grid; place-items: center; }
/* lines */
.stats.s4 { grid-template-columns: repeat(4, 1fr); }
.stat .v small { font-size: 15px; color: var(--ink2); }
.funnel { display: grid; gap: 10px; margin-top: 4px; }
.fn { display: grid; grid-template-columns: 120px 1fr 28px; gap: 10px; align-items: center; font-size: 14px; }
.fn-b { height: 22px; background: var(--fill); border-radius: 6px; overflow: hidden; } .fn-b i { display: block; height: 100%; background: var(--sc); border-radius: 6px; min-width: 2px; }
.fn b { text-align: right; font-variant-numeric: tabular-nums; }
.whos-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chipp { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; background: var(--fill); border-radius: 980px; padding: 3px 10px 3px 3px; }
.icards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.icards .icard { margin: 0; }
.levers { padding-left: 18px; } .levers li { margin: 6px 0; }
/* ideas */
.idcard { background: var(--card); border-radius: 11px; margin-bottom: 9px; box-shadow: 0 1px 2px rgba(0,0,0,.06); border-left: 3px solid var(--tc); overflow: hidden; cursor: pointer; }
.idcard:hover { box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.id-img { height: 96px; background-size: cover; background-position: center; }
.id-h { display: flex; gap: 6px; align-items: center; padding: 10px 12px 0; min-height: 10px; }
.idcard h4 { font-size: 14px; line-height: 1.35; padding: 6px 12px 0; }
.id-f { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px 10px; }
.score { display: inline-grid; place-items: center; min-width: 32px; height: 26px; border-radius: 8px; font-weight: 700; font-size: 13px; background: var(--fill2); padding: 0 6px; }
.score.s4, .score.s5 { background: color-mix(in srgb, var(--g) 18%, transparent); color: var(--g); }
.score.s1, .score.s2 { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
.sc-row { display: grid; grid-template-columns: 1fr auto 24px; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; }
.sc-dots { display: flex; gap: 4px; }
.sd { width: 30px; height: 30px; border-radius: 8px; background: var(--fill2); border: 0; padding: 0; }
.sd.on { background: var(--b); }
button.sd:hover { outline: 2px solid var(--b); }
.d-img { height: 200px; border-radius: 12px; background-size: cover; background-position: center; display: grid; place-items: end start; color: #fff; font-weight: 700; padding: 14px; }
/* radar */
.rsum { display: grid; grid-template-columns: 1.1fr 1.3fr 1fr; gap: 16px; align-items: stretch; }
.rs-k { display: grid; grid-template-columns: 1fr 1fr; background: var(--card); border-radius: var(--r); }
.rs-k .stat:nth-child(odd) { border-left: 0; } .rs-k .stat:nth-child(n+3) { border-top: 1px solid var(--hair2); }
.rs-dom { display: grid; gap: 6px; align-content: start; }
.rsd { display: grid; grid-template-columns: minmax(0, 1fr) 90px 20px; gap: 8px; align-items: center; font-size: 13px; padding: 4px 0; min-height: 30px; text-align: left; }
.rsd:hover .rsd-l { text-decoration: underline; }
.rsd-l { display: flex; gap: 8px; align-items: center; min-width: 0; } .rsd-l i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.rsd b { text-align: right; }
.days { display: flex; align-items: flex-end; gap: 4px; height: 90px; margin-top: 10px; }
.days span { flex: 1; display: flex; align-items: flex-end; height: 100%; } .days i { display: block; width: 100%; border-radius: 3px 3px 0 0; background: var(--b); }
.rline { margin: 12px 0 4px; }
.sgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sg { background: var(--card); border-radius: var(--r); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.sg:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.12); }
.sg-img, .rv-img, .rr-img { background-size: cover; background-position: center; }
.sg-img { aspect-ratio: 16 / 9; }
.ph-img { display: grid; place-items: end start; padding: 12px; color: rgba(255,255,255,.92); font-weight: 700; font-size: 14px; }
.sg-b { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.sg-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.sg h3 { font-size: 15px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sg-f { display: flex; gap: 10px; font-size: 12px; color: var(--ink2); margin-top: auto; }
.sg-f .str { margin-left: auto; color: var(--o); letter-spacing: 1px; }
.sg.s3 { box-shadow: inset 0 3px 0 var(--o); }
.rv-list { display: grid; gap: 10px; }
.rv { display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: center; background: var(--card); border-radius: 12px; padding: 10px; }
.rv-img { width: 96px; height: 60px; border-radius: 8px; }
.rv-img.ph-img span { display: none; }
.rv-t { display: grid; gap: 2px; text-align: left; min-height: 44px; }
.rr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.rr { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: start; }
.rr-img { width: 120px; height: 80px; border-radius: 10px; }
.rr-img.ph-img span { font-size: 11px; display: none; }
@media (max-width: 1100px) { .rsum { grid-template-columns: 1fr 1fr; } .rs-day { grid-column: 1 / -1; } .sgrid, .icards, .goals2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .rsum, .sgrid, .icards, .goals2, .rr-grid, .princ { grid-template-columns: 1fr; }
  .qline { grid-template-columns: 1fr; gap: 14px; } .qline::before { display: none; }
  .rv { grid-template-columns: 72px 1fr; } .rv .btns { grid-column: 1 / -1; }
  .rv-img { width: 72px; height: 48px; }
  .ns-hero .ns { font-size: 21px; }
  .stats.s4 { grid-template-columns: 1fr 1fr; }
  .fn { grid-template-columns: 96px 1fr 24px; }
  .rr { grid-template-columns: 88px 1fr; } .rr-img { width: 88px; height: 60px; }
}
@media (prefers-reduced-motion: reduce) { .sg { transition: none; } .sg:hover { transform: none; } }
.sd { font-size: 13px; font-weight: 600; color: var(--ink2); display: inline-grid; place-items: center; }
.sd.on { color: #fff; }
.gate { max-width: 360px; margin: 12vh auto 0; text-align: center; display: grid; gap: 12px; justify-items: center; }
.gate h1 { font-size: 30px; }
.logo.big i { width: 8px; height: 22px; }
.gate form { display: flex; gap: 8px; width: 100%; }
.gate input { flex: 1; border: 1px solid var(--hair); border-radius: 980px; padding: 10px 16px; background: var(--card); min-height: 44px; font-size: 16px; }
.lnk { color: var(--b); font-size: 12px; text-decoration: underline; }
/* ===== Visual v3 fixes ===== */
.ltiles { gap: 0; margin-top: 12px; }
.ltile { background: none; border-radius: 0; border-top: 1px solid var(--hair2); padding: 12px 2px; }
.ltile:hover { background: var(--fill); }
.kpi3 { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; margin: 14px 0 4px; }
.segs { display: flex; gap: 4px; margin-top: 6px; }
.segs i { flex: 1; height: 8px; border-radius: 3px; background: var(--fill2); max-width: 48px; }
.pipe { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; background: var(--card); border-radius: var(--r); }
.pp-col { padding: 16px 16px 18px; border-left: 1px solid var(--hair2); }
.pp-col:first-child { border-left: 0; }
.pp-h { display: flex; align-items: baseline; gap: 8px; } .pp-h b { font-size: 30px; letter-spacing: -.02em; } .pp-h span { font-size: 13px; color: var(--ink2); }
.pp-h::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--sc); align-self: center; }
.pp-dots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pp-d { font-size: 12px; font-weight: 700; color: #fff; background: var(--lc); border-radius: 7px; padding: 5px 7px; min-height: 28px; }
.pp-d.stale { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--red); }
.pp-d:hover { filter: brightness(1.1); }
.why { margin-top: 10px; } .why summary { cursor: pointer; color: var(--b); font-size: 14px; min-height: 32px; } .why p { margin-top: 6px; }
.navsel { display: none; }
@media (max-width: 760px) {
  .pipe { grid-template-columns: 1fr; } .pp-col { border-left: 0; border-top: 1px solid var(--hair2); } .pp-col:first-child { border-top: 0; }
  .pp-d { min-height: 36px; padding: 8px 9px; }
  .tabs { display: none; }
  .navsel { display: block; flex: 1; border: 1px solid var(--hair); border-radius: 980px; padding: 8px 14px; background: var(--card); font-size: 16px; font-weight: 600; min-height: 44px; }
  .nav-in { gap: 12px; }
}
.kb { align-items: start; }
.sg-f .str { color: var(--o-text); }
@media (max-width: 760px) { .pp-d { min-height: 44px; } }
