/* techpark: giấy ấm, mực gần đen, một màu nhấn dùng rất ít. Tham chiếu: folk.app (khung app, nhãn ngoặc vuông,
   tag pastel), theorg.com (sơ đồ trên xuống, pill đếm, phần khoá làm mờ). */
:root {
  --bg: #FAF9F7;
  --surface: #FFFFFF;
  --ink: #1A1917;
  --ink-2: #3D3A36;
  --mute: #75716B;
  --faint: #A8A39C;
  --line: rgba(26, 25, 23, 0.08);
  --line-2: rgba(26, 25, 23, 0.15);
  --wash: #F3F1EE;
  --accent: #FF6341;
  --shadow: 0 1px 2px rgba(26, 25, 23, 0.05), 0 4px 16px rgba(26, 25, 23, 0.05);
  --shadow-lg: 0 12px 48px rgba(26, 25, 23, 0.16), 0 2px 6px rgba(26, 25, 23, 0.06);

  --t-green-bg: #E4F2E6; --t-green: #1F6B34;
  --t-yellow-bg: #FAF0CF; --t-yellow: #765800;
  --t-blue-bg: #E5ECFA; --t-blue: #2A4C96;
  --t-red-bg: #FBE6E0; --t-red: #983820;
  --t-grey-bg: #EFEDEA; --t-grey: #55524D;

  --display: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --hdr: 60px;
  /* Một hệ bo góc: tag 5, control (nút, ô nhập, thẻ) 8, panel nổi 12. Chỉ avatar là tròn. */
  --r-sm: 5px; --r: 8px; --r-lg: 12px;

  /* tên cũ, trang /admin vẫn dùng */
  --navy: var(--ink); --navy-2: var(--ink-2); --dim: var(--mute); --rust: var(--accent); --rust-soft: var(--t-red-bg); --body: var(--ink-2);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--sans); font-size: 14px; line-height: 1.5; color: var(--ink);
  background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01';
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
.mono { font-family: var(--mono); }
/* Mono chỉ cho chuỗi kỹ thuật (bản ghi TXT, mã năng lực). Nhãn và số dùng Inter, số đều cột. */
.num { font-variant-numeric: tabular-nums; }
.ic { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ───────── header ───────── */
.bar {
  position: sticky; top: 0; z-index: 30; height: var(--hdr);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 0 28px; background: rgba(250, 249, 247, 0.86); backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}
.wordmark { font-family: var(--display); font-size: 17px; font-weight: 600; letter-spacing: -0.02em; text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.wordmark .mk { width: 22px; height: 22px; display: block; }
.wordmark span { color: var(--faint); font-weight: 500; margin-left: -8px; }
.nav { display: flex; gap: 26px; font-size: 14px; }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }
.bar-right { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.lang { display: flex; gap: 2px; font-size: 12px; font-weight: 500; color: var(--faint); }
.lang button { padding: 4px 6px; border-radius: 4px; }
.lang button[aria-pressed="true"] { color: var(--ink); background: var(--wash); }
.pill-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); font-size: 13.5px; font-weight: 500; color: var(--ink); text-decoration: none; white-space: nowrap; }
.pill-btn:hover { border-color: var(--ink); }
.pill-btn .ic { color: var(--mute); }

/* ───────── hero ───────── */
main { flex: 1; }
.hero { max-width: 980px; margin: 0 auto; padding: 96px 24px 72px; text-align: center; }
.bracket { display: inline-block; font-size: 13px; font-weight: 500; color: var(--mute); margin: 0 0 26px; }
.bracket .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin: 0 8px 1px 2px; vertical-align: middle; }
h1 { font-family: var(--display); font-weight: 500; font-size: clamp(38px, 6.4vw, 72px); line-height: 1.02; letter-spacing: -0.035em; margin: 0 0 22px; color: var(--ink); text-wrap: balance; }
.lede { font-size: clamp(16px, 1.7vw, 19px); line-height: 1.5; color: var(--ink-2); max-width: 640px; margin: 0 auto 36px; letter-spacing: -0.01em; text-wrap: pretty; }
.hero-form { display: inline-flex; max-width: 100%; border: 1px solid var(--ink); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.hero-form input { width: 300px; max-width: 58vw; border: 0; padding: 0 16px; height: 48px; font: inherit; font-size: 15px; color: var(--ink); background: transparent; outline: none; }
.hero-form input::placeholder { color: var(--faint); }
.hero-form button { height: 48px; padding: 0 22px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 500; white-space: nowrap; }
.hero-form button:hover { background: #000; }
.hero-note { margin: 14px 0 0; font-size: 13px; color: var(--mute); }
.hero-note.err { color: var(--t-red); }
.hero-org { display: inline-flex; align-items: center; gap: 14px; padding: 8px 8px 8px 18px; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); font-size: 14px; }
.hero-org b { font-weight: 600; }
.hero-org .sep { width: 1px; height: 16px; background: var(--line-2); }

/* ───────── khung app ───────── */
.stage {
  position: relative; padding: 56px 28px;
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(255, 255, 255, 0.55), transparent 60%),
    linear-gradient(180deg, #D9D6D1 0%, #C9C5BF 100%);
}
.stage::before { /* hạt giấy */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.app { position: relative; max-width: 1360px; margin: 0 auto; background: var(--surface); border: 1px solid rgba(26, 25, 23, 0.12); border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; }
.app-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px 0; }
.app-title { display: flex; align-items: baseline; gap: 10px; }
.app-title h2 { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.app-title span { font-size: 12px; color: var(--faint); }
.search { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--r); color: var(--mute); width: 240px; }
.search input { border: 0; outline: none; font: inherit; font-size: 13px; width: 100%; background: transparent; color: var(--ink); }
.tabs { display: flex; align-items: center; gap: 22px; padding: 12px 20px 0; border-bottom: 1px solid var(--line); }
.tabs button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 0 11px; font-size: 13.5px; color: var(--mute); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tabs .spacer { flex: 1; }
.legend { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--mute); padding-bottom: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.canvas { position: relative; min-height: 560px; }

/* ───────── kanban: dòng chảy ───────── */
.board { position: relative; overflow-x: auto; padding: 18px 20px 24px; scrollbar-width: thin; }
.board-inner { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 232px; gap: 14px; min-width: max-content; }
.links { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 3; }
.links path { fill: none; stroke: var(--ink); stroke-width: 1.2; opacity: 0.55; }
.links path.up { stroke-dasharray: 3 3; }
.col { display: flex; flex-direction: column; gap: 8px; }
.col-h { display: flex; flex-direction: column; gap: 3px; padding: 2px 2px 8px; }
.col-h .t { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
.col-h .t .n { font-size: 12px; font-weight: 500; color: var(--faint); font-variant-numeric: tabular-nums; }
.col-h .t .c { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--mute); font-variant-numeric: tabular-nums; }
.col-h .need { font-size: 12px; color: var(--mute); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.card {
  position: relative; z-index: 2; display: flex; flex-direction: column; gap: 10px; width: 100%; text-align: left;
  padding: 12px 12px 11px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r);
  transition: border-color 0.15s, box-shadow 0.15s, opacity 0.2s;
}
.card:hover { border-color: rgba(26, 25, 23, 0.32); box-shadow: var(--shadow); }
.card:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.card .nm { font-size: 13.5px; font-weight: 500; line-height: 1.3; color: var(--ink); letter-spacing: -0.005em; }
.card .row { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.card .row .meta { font-size: 12px; color: var(--mute); display: inline-flex; align-items: center; gap: 5px; }
.card .row .tag { margin-left: auto; }
.card.sel { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink), var(--shadow); }
.card.near { border-color: rgba(26, 25, 23, 0.5); }
.card.dim { opacity: 0.35; }
.card.next::after { content: ''; position: absolute; top: 10px; right: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.card.hidden { display: none; }

.tag { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 7px; border-radius: var(--r-sm); font-size: 11.5px; font-weight: 500; white-space: nowrap; background: var(--t-grey-bg); color: var(--t-grey); }
.tag.green { background: var(--t-green-bg); color: var(--t-green); }
.tag.yellow { background: var(--t-yellow-bg); color: var(--t-yellow); }
.tag.blue { background: var(--t-blue-bg); color: var(--t-blue); }
.tag.red { background: var(--t-red-bg); color: var(--t-red); }
.tag.outline { background: transparent; border: 1px solid var(--line-2); color: var(--mute); }

.avs { display: inline-flex; }
.av { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 9.5px; font-weight: 600; letter-spacing: 0; border: 1.5px solid var(--surface); margin-left: -6px; color: var(--ink-2); }
.avs .av:first-child { margin-left: 0; }
.av.more { background: var(--wash); color: var(--mute); font-weight: 600; font-size: 9.5px; }
.av.ghost { background: #E7E4E0; filter: blur(1.5px); }

/* ───────── cây: trên xuống, kiểu sơ đồ tổ chức ───────── */
.org { overflow-x: auto; padding: 30px 20px 36px; scrollbar-width: thin; }
.org-inner { min-width: max-content; display: flex; flex-direction: column; align-items: center; }
.node {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 14px 16px 18px;
}
.node.root { width: 260px; }
.node.root .glyph { width: 34px; height: 34px; border-radius: 9px; background: var(--ink); display: grid; place-items: center; margin-bottom: 6px; }
.node.root .glyph i { width: 11px; height: 11px; border-radius: 3px; background: var(--accent); }
.node .t { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.node .s { font-size: 11.5px; color: var(--mute); line-height: 1.35; }
.count { position: absolute; left: 50%; bottom: -11px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 3px; height: 21px; padding: 0 8px; border-radius: var(--r-sm); background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.count .ic { width: 11px; height: 11px; stroke-width: 2; }
.count.light { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); }
.stem { width: 1px; height: 28px; background: var(--line-2); }
.bracket-row { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 214px; gap: 18px; padding-top: 28px; }
.bracket-row::before { /* đường ngoặc nối các giai đoạn */
  content: ''; position: absolute; top: 0; left: 107px; right: 107px; height: 28px;
  border: 1px solid var(--line-2); border-bottom: 0; border-radius: 10px 10px 0 0;
}
.branch { position: relative; display: flex; flex-direction: column; align-items: center; }
.branch > .node { width: 100%; padding-top: 12px; }
.branch > .node .n { font-size: 12px; font-weight: 500; color: var(--faint); font-variant-numeric: tabular-nums; }
.leaves { position: relative; width: 100%; display: flex; flex-direction: column; gap: 8px; padding: 30px 0 0 18px; }
.leaves::before { content: ''; position: absolute; left: 50%; top: 0; height: 18px; width: 1px; background: var(--line-2); }
.leaves::after { content: ''; position: absolute; left: 6px; top: 18px; bottom: 22px; width: 1px; background: var(--line-2); border-top: 1px solid var(--line-2); }
.leaves .rail { position: absolute; left: 6px; top: 18px; width: calc(50% - 6px); height: 1px; background: var(--line-2); }
.leaves .card { padding: 10px 11px; }
.leaves .card::before { content: ''; position: absolute; left: -12px; top: 50%; width: 12px; height: 1px; background: var(--line-2); }
.vend { list-style: none; margin: -2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.vend li { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); }
.vend li .av { margin: 0; width: 18px; height: 18px; font-size: 8.5px; border: 0; }
.vend li .st { margin-left: auto; font-size: 10.5px; color: var(--mute); }

/* phần khoá kiểu theorg: làm mờ + một lời mời ở giữa */
.gate { position: absolute; left: 50%; top: 260px; transform: translateX(-50%); z-index: 6; width: min(420px, calc(100% - 32px)); text-align: center;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(6px); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 22px 22px 20px; }
.gate h3 { margin: 0 0 6px; font-family: var(--display); font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.gate p { margin: 0 0 16px; font-size: 13.5px; color: var(--mute); }
.blur .avs, .blur .vend { filter: blur(3px); }

/* ───────── drawer chi tiết (kiểu folk) ───────── */
.drawer {
  position: fixed; top: calc(var(--hdr) + 12px); right: 12px; bottom: 12px; z-index: 40; width: 440px; max-width: calc(100vw - 24px);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; transform: translateX(calc(100% + 24px)); transition: transform 0.28s cubic-bezier(0.2, 0, 0, 1); overflow: hidden;
}
.drawer.on { transform: none; }
.d-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.d-top .crumbs { font-size: 13px; font-weight: 500; color: var(--mute); }
.icon-btn { width: 30px; height: 30px; border-radius: var(--r); display: grid; place-items: center; color: var(--mute); }
.icon-btn:hover { background: var(--wash); color: var(--ink); }
.d-body { flex: 1; overflow-y: auto; }
.notice { display: flex; align-items: center; gap: 12px; padding: 11px 16px; background: #EEF3FC; color: #22427F; font-size: 13px; line-height: 1.45; border-bottom: 1px solid #DCE5F6; }
.notice.warm { background: #FBF4E4; color: #6E5208; border-bottom-color: #F1E4C3; }
.notice span { flex: 1; }
.notice .pill-btn { height: 30px; font-size: 12.5px; }
.d-head { display: flex; gap: 14px; align-items: center; padding: 20px 20px 4px; }
.d-head .glyph { width: 52px; height: 52px; border-radius: 12px; background: var(--wash); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.d-head .glyph .ic { width: 22px; height: 22px; }
.d-head h2 { margin: 0; font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }
.d-head .sub { font-size: 13px; color: var(--mute); margin-top: 3px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; padding: 18px 20px; }
.facts dt { font-size: 12px; color: var(--mute); margin: 0 0 2px; }
.facts dd { margin: 0; font-size: 13.5px; font-weight: 500; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.d-tabs { display: flex; gap: 20px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.d-tabs button { padding: 8px 0 10px; font-size: 13.5px; color: var(--mute); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.d-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.d-tabs button .k { font-size: 12px; color: var(--faint); margin-left: 4px; font-variant-numeric: tabular-nums; }
.d-sec { padding: 16px 20px 22px; }
.d-sec h4 { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.d-sec p { margin: 0 0 12px; font-size: 13.5px; color: var(--ink-2); }
.hint { font-size: 12.5px; color: var(--mute); line-height: 1.5; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rows li:last-child { border-bottom: 0; }
.rows .av { width: 30px; height: 30px; font-size: 11px; margin: 0; border: 0; }
.rows .main { flex: 1; min-width: 0; }
.rows .t { font-size: 13.5px; font-weight: 500; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.rows .s { font-size: 12.5px; color: var(--mute); margin-top: 2px; overflow-wrap: anywhere; }
.rows .s a { color: var(--mute); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.rows .s a:hover { color: var(--ink); }
.rows .r { font-size: 12px; color: var(--mute); white-space: nowrap; }
.chain { display: flex; flex-wrap: wrap; gap: 6px; }
.chain button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--r); border: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink); background: var(--surface); }
.chain button:hover { border-color: var(--ink); }
.chain button .ic { width: 13px; height: 13px; color: var(--mute); }
.meter { height: 4px; border-radius: 2px; background: var(--wash); overflow: hidden; margin: 4px 0 8px; }
.meter i { display: block; height: 100%; background: var(--ink); }
.ghost-list i { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ghost-list i::before { content: ''; width: 30px; height: 30px; border-radius: 50%; background: #ECE9E5; }
.ghost-list i::after { content: ''; height: 10px; width: 55%; border-radius: 4px; background: #ECE9E5; }
.ghost-list { filter: blur(2px); margin-bottom: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; border-radius: var(--r); text-decoration: none; }
.btn:hover { background: #000; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.block { display: flex; width: 100%; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 12.5px; color: var(--mute); }
.field input, .field textarea, .field select { font: inherit; font-size: 14px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--ink); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.err { font-size: 12.5px; color: var(--t-red); margin: 8px 0 0; }

/* tài khoản */
.levels { display: flex; gap: 4px; margin: 6px 0 4px; }
.levels i { flex: 1; height: 4px; border-radius: 2px; background: var(--wash); }
.levels i.on { background: var(--ink); }
.proof { padding: 14px 0; border-bottom: 1px solid var(--line); }
.proof:last-child { border-bottom: 0; }
.proof .ph { display: flex; align-items: center; gap: 10px; }
.proof .ph .ic { color: var(--mute); }
.proof .pt { flex: 1; font-size: 13.5px; font-weight: 500; }
.proof .pb { margin: 8px 0 0 26px; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.proof .pb p { margin: 0 0 10px; }
.proof code { font-family: var(--mono); font-size: 11.5px; background: var(--wash); padding: 2px 5px; border-radius: 4px; word-break: break-all; }
.inline-form { display: flex; gap: 6px; margin-top: 8px; }
.inline-form input { flex: 1; min-width: 0; font: inherit; font-size: 13px; padding: 0 10px; height: 32px; border: 1px solid var(--line-2); border-radius: var(--r); outline: none; }
.inline-form input:focus { border-color: var(--ink); }
.listing-caps { max-height: 280px; overflow: auto; border: 1px solid var(--line-2); border-radius: var(--r); padding: 4px 12px; }
.listing-caps .grp { font-size: 12px; font-weight: 600; color: var(--mute); margin: 12px 0 2px; }
.listing-caps label { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 0; }
.listing-caps select { margin-left: auto; font: inherit; font-size: 12px; border: 1px solid var(--line); background: var(--surface); }

/* ───────── dưới khung ───────── */
.lower { max-width: 1360px; margin: 0 auto; padding: 88px 28px 96px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 72px; }
.lower h2 { font-family: var(--display); font-size: clamp(26px, 3vw, 36px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 12px; }
.lower .sub { margin: 0 0 28px; font-size: 15px; color: var(--mute); max-width: 520px; }
.feed { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.feed li { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: baseline; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.feed li .ic { color: var(--mute); transform: translateY(3px); }
.feed li.struct .ic { color: var(--accent); }
.feed .masked { color: var(--mute); }
.feed .at { font-size: 12.5px; color: var(--faint); white-space: nowrap; }
.feed b { font-weight: 600; }
.ladder { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.ladder li { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.ladder .lv { font-size: 13px; font-weight: 600; color: var(--faint); padding-top: 1px; font-variant-numeric: tabular-nums; }
.ladder li.done .lv { color: var(--ink); }
.ladder li.done .lv::after { content: ' ✓'; }
.ladder .lv small { display: block; font-size: 10px; color: var(--faint); }
.ladder b { display: block; font-weight: 600; font-size: 14px; }
.ladder span { display: block; color: var(--mute); font-size: 13.5px; margin-top: 2px; }
.ladder .note { display: block; margin-top: 16px; font-size: 12.5px; color: var(--faint); }

.foot { display: flex; justify-content: space-between; gap: 16px; padding: 22px 28px; border-top: 1px solid var(--line); font-size: 12px; color: var(--mute); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 16px; border-radius: var(--r); font-size: 13px; z-index: 60; box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px); }
.empty { padding: 56px; text-align: center; color: var(--mute); }

@media (max-width: 1080px) {
  .lower { grid-template-columns: 1fr; gap: 64px; }
  .nav { display: none; }
  .bar { grid-template-columns: 1fr auto; }
}
@media (max-width: 640px) {
  .bar { padding: 0 16px; }
  .lang { display: none; }
  .hero { padding: 64px 16px 48px; }
  .hero-form { display: flex; width: 100%; }
  .hero-form input { flex: 1; width: auto; min-width: 0; max-width: none; }
  .stage { padding: 24px 0; }
  .app { border-radius: 0; border-left: 0; border-right: 0; }
  .app-top { flex-wrap: wrap; padding: 14px 16px 0; }
  .search { width: 100%; }
  .tabs { padding: 10px 16px 0; overflow-x: auto; }
  .legend { display: none; }
  .board { padding: 14px 16px 20px; }
  .board-inner { grid-auto-columns: 210px; }
  .drawer { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-width: none; height: 86vh; border-radius: 14px 14px 0 0; transform: translateY(105%); }
  .lower { padding: 64px 16px 72px; }
  .foot { flex-direction: column; padding: 18px 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Drawer đang mở: chừa chỗ để các cột cuối cuộn ra khỏi vùng bị che. */
body.drawer-on .board-inner, body.drawer-on .org-inner { padding-right: 452px; }
@media (max-width: 640px) { body.drawer-on .board-inner, body.drawer-on .org-inner { padding-right: 0; } }

/* ───────── trang đầu = bản đồ toàn màn hình ───────── */
body.immersive { height: 100dvh; overflow: hidden; }
body.immersive .bar { grid-template-columns: auto 1fr auto; }
.bar-mid { display: flex; align-items: center; justify-content: center; gap: 12px; min-width: 0; }
.bar .tabs { display: inline-flex; gap: 2px; padding: 3px; border: 0; border-radius: var(--r); background: var(--wash); }
.bar .tabs button { padding: 5px 11px; margin: 0; border: 0; border-radius: var(--r-sm); font-size: 13px; }
.bar .tabs button[aria-selected="true"] { background: var(--surface); box-shadow: 0 1px 2px rgba(26, 25, 23, 0.12); }
.bar .search { width: 220px; background: var(--surface); }
.pill-btn .ic { color: var(--mute); }
#accountChip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

body.immersive .canvas {
  position: fixed; top: var(--hdr); left: 0; right: 0; bottom: 0; min-height: 0;
  background-color: var(--bg);
  background-image: radial-gradient(circle, rgba(26, 25, 23, 0.09) 1px, transparent 1.4px);
  background-size: 22px 22px;
}
body.immersive .board, body.immersive .org { position: absolute; inset: 0; overflow: auto; }
body.immersive .board { padding: 24px 28px 140px; }
body.immersive .org { padding: 36px 28px 160px; }
body.immersive .col-h { background: var(--bg); border-radius: 6px; }

.float { position: fixed; z-index: 35; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-lg); }
.intro { left: 20px; bottom: 20px; width: 420px; padding: 22px 22px 18px; }
.intro .bracket { margin: 0 0 14px; font-size: 10.5px; color: var(--mute); }
.intro h1 { font-size: 30px; line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 10px; text-align: left; }
.intro .lede { text-align: left; font-size: 14.5px; margin: 0 0 18px; color: var(--ink-2); }
.intro .hero-form { display: flex; width: 100%; }
.intro .hero-form input { flex: 1; width: auto; min-width: 0; max-width: none; height: 44px; }
.intro .hero-form button { height: 44px; }
.intro .hero-note { text-align: left; }
.coach { left: 20px; bottom: 20px; width: 380px; padding: 16px 16px 16px 18px; display: flex; gap: 12px; align-items: flex-start; }
.coach .k { flex: 1; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.coach .k b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.coach .k .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin: 0 2px 1px; vertical-align: middle; }

.ticker { position: fixed; right: 20px; bottom: 20px; z-index: 34; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.ticker .tk { display: inline-flex; align-items: center; gap: 10px; max-width: min(520px, calc(100vw - 480px)); height: 38px; padding: 0 14px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 13px; color: var(--ink-2); }
.ticker .tk:hover { border-color: var(--ink); }
.ticker .tk .live { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 0 3px rgba(255, 99, 65, 0.18); }
.ticker .tk .txt { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ticker .tk .at { color: var(--faint); font-size: 12px; white-space: nowrap; }
.ticker .tk b { font-weight: 600; color: var(--ink); }
.ticker .pop { width: 460px; max-width: calc(100vw - 40px); max-height: 56vh; overflow: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px 16px 8px; }
.ticker .pop h3 { margin: 10px 0 2px; font-size: 14px; font-weight: 600; }
.ticker .pop .hint { margin: 0 0 6px; }
.ticker .feed { border-top: 0; }
.ticker .feed li { font-size: 13px; padding: 10px 0; }
body.drawer-on .ticker, body.drawer-on .coach { display: none; }

@media (max-width: 900px) {
  body.immersive .bar .search, body.immersive .lang { display: none; }
  .ticker .tk { max-width: calc(100vw - 40px); }
  body.has-intro .ticker { display: none; }
}
@media (max-width: 640px) {
  body.immersive .bar { gap: 8px; padding: 0 12px; }
  body.immersive .wordmark span { display: none; }
  .bar .tabs button span { display: none; }
  #accountChip { max-width: 130px; }
  .intro, .coach { left: 12px; right: 12px; bottom: 12px; width: auto; }
  .intro { padding: 18px 16px 14px; }
  .intro h1 { font-size: 24px; }
  .ticker { right: 12px; left: 12px; bottom: 12px; align-items: stretch; }
  .ticker .pop { width: auto; }
  body.immersive .board { padding: 16px 14px 120px; }
}
