/* BangBiz – tài liệu học tập */
:root {
  --bg: #f6f3ec;
  --surface: #ffffff;
  --ink: #1b2430;
  --muted: #5b6573;
  --line: #e4ded1;
  --brand: #0f5c55;
  --brand-ink: #ffffff;
  --brand-soft: #e3efec;
  --accent: #e0902f;
  --accent-soft: #fbeedd;
  --shadow: 0 1px 2px rgba(27, 36, 48, .06), 0 8px 24px rgba(27, 36, 48, .06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12171d;
    --surface: #1a2129;
    --ink: #e8ecf0;
    --muted: #9aa5b1;
    --line: #2b3440;
    --brand: #3fb3a6;
    --brand-ink: #0c1a18;
    --brand-soft: #16302d;
    --accent: #f0a849;
    --accent-soft: #33271a;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #12171d;
  --surface: #1a2129;
  --ink: #e8ecf0;
  --muted: #9aa5b1;
  --line: #2b3440;
  --brand: #3fb3a6;
  --brand-ink: #0c1a18;
  --brand-soft: #16302d;
  --accent: #f0a849;
  --accent-soft: #33271a;
  --shadow: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--brand); }
img { max-width: 100%; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* Thanh trên */
.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; min-height: 60px; flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--brand); color: var(--brand-ink);
  display: grid; place-items: center; font-weight: 800; font-size: 18px;
}
.logo b { display: block; font-size: 16px; line-height: 1.1; }
.logo small { display: block; font-size: 12px; color: var(--muted); line-height: 1.2; }
.docnav { display: flex; gap: 6px; flex-wrap: wrap; }
.docnav a {
  font-size: 14px; font-weight: 600; text-decoration: none;
  padding: 6px 12px; border-radius: 999px; color: var(--muted);
  border: 1px solid var(--line);
}
.docnav a[aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Hero */
.hero { padding: 48px 0 32px; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent);
}
.hero h1 {
  font-size: clamp(30px, 5vw, 46px); line-height: 1.15; margin: 8px 0 14px;
  letter-spacing: -.02em; max-width: 18ch;
}
.hero .lead { font-size: 19px; color: var(--muted); max-width: 60ch; margin: 0; }

/* Bố cục: mục lục bên trái, nội dung bên phải */
.layout { display: grid; grid-template-columns: 220px 1fr; gap: 40px; padding-bottom: 56px; }
.toc { position: sticky; top: 20px; align-self: start; }
.toc p { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a {
  display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent;
  text-decoration: none; color: var(--muted); font-size: 14px; line-height: 1.4;
}
.toc a:hover { color: var(--ink); border-left-color: var(--brand); }

.note {
  background: var(--accent-soft); border-radius: 12px; padding: 16px 18px;
  margin: 0 0 28px; font-size: 16px;
}
.note strong { color: var(--ink); }

/* Các bước */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step {
  position: relative; padding: 0 0 32px 64px;
}
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand); color: var(--brand-ink);
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
}
.step::after {
  content: ""; position: absolute; left: 21px; top: 52px; bottom: 8px;
  width: 2px; background: var(--line);
}
.step:last-child::after { display: none; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 22px; box-shadow: var(--shadow);
}
.tag {
  font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--brand);
}
.tag.req { color: var(--accent); }
.card h2 { font-size: 22px; line-height: 1.3; margin: 4px 0 10px; }
.card p { margin: 0 0 12px; }
.card ol, .card ul { margin: 0 0 12px; padding-left: 22px; }
.card li { margin: 4px 0; }
.card > :last-child { margin-bottom: 0; }
.tip { font-size: 15px; color: var(--muted); border-left: 3px solid var(--accent); padding-left: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand); color: var(--brand-ink); text-decoration: none;
  font-weight: 700; font-size: 15px; padding: 10px 18px; border-radius: 10px;
  margin: 4px 8px 4px 0;
}
.btn.ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.btn:hover { filter: brightness(1.08); }

.prompt {
  background: var(--brand-soft); border-radius: 10px; padding: 14px 16px;
  font: 14px/1.6 ui-monospace, "Cascadia Code", Consolas, monospace; white-space: pre-wrap;
  margin: 0 0 12px; overflow-wrap: anywhere;
}

/* Hình minh họa */
.shot { margin: 14px 0 12px; }
.shot img {
  display: block; width: 100%; height: auto; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg);
}
.shot figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }

/* Ô gõ lệnh cho Claude */
.say {
  background: var(--brand-soft); border-left: 4px solid var(--brand); border-radius: 0 10px 10px 0;
  padding: 12px 16px; margin: 0 0 12px; font-weight: 600; overflow-wrap: anywhere;
}
.say::before {
  content: "Gõ vào Claude"; display: block; font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 2px;
}

.callout {
  background: var(--accent-soft); border-radius: 10px; padding: 14px 16px; margin: 0 0 12px; font-size: 16px;
}
.callout p { margin: 0 0 8px; }
.callout > :last-child { margin-bottom: 0; }

.done {
  background: var(--brand-soft); border: 1px solid var(--brand); border-radius: 14px;
  padding: 20px 22px; margin: 0 0 16px;
}
.done p { margin: 0 0 12px; }
.done > :last-child { margin-bottom: 0; }

/* Khối chuyển trang */
.next {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--ink); color: var(--bg); border-radius: 14px; padding: 20px 22px; margin: 8px 0 0;
  text-decoration: none;
}
.next small { display: block; opacity: .7; font-size: 13px; }
.next b { font-size: 18px; }
.next span.arrow { font-size: 24px; }

footer { border-top: 1px solid var(--line); padding: 24px 0 36px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
footer b { color: var(--ink); }

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
  .hero { padding: 32px 0 24px; }
  .step { padding-left: 0; padding-top: 56px; }
  .step::after { display: none; }
  .card { padding: 18px; }
}

/* ===== Trang giới thiệu (landing) ===== */
.land-hero { padding: 56px 0 40px; border-bottom: 1px solid var(--line); }
.land-hero h1 { font-size: clamp(32px, 6vw, 56px); line-height: 1.1; letter-spacing: -.025em; margin: 10px 0 18px; max-width: 16ch; }
.land-hero h1 em { font-style: normal; color: var(--brand); }
.land-hero .lead { font-size: 20px; max-width: 58ch; color: var(--muted); margin: 0 0 14px; }
.land-hero .meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 24px; }
.chip { font-size: 14px; font-weight: 600; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.btn.lg { font-size: 17px; padding: 14px 24px; border-radius: 12px; }

.sec { padding: 56px 0; border-bottom: 1px solid var(--line); }
.sec:last-of-type { border-bottom: 0; }
.sec h2.big { font-size: clamp(26px, 4vw, 36px); line-height: 1.2; letter-spacing: -.02em; margin: 6px 0 16px; max-width: 24ch; }
.sec .prose { max-width: 68ch; }
.sec .wrap.prose { max-width: 1040px; }
.sec .wrap.prose > * { max-width: 68ch; }
.sec .prose p { margin: 0 0 14px; }

.brains { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.brain { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: var(--shadow); border-top: 5px solid var(--c); }
.brain .n { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--c); }
.brain h3 { margin: 6px 0 10px; font-size: 20px; line-height: 1.3; }
.brain p { margin: 0; font-size: 16px; color: var(--muted); }

.modules { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; counter-reset: m; }
.modules li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 16px 64px; position: relative; }
.modules li::before { counter-increment: m; content: counter(m); position: absolute; left: 18px; top: 14px; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; }

.author { display: grid; grid-template-columns: 120px 1fr; gap: 28px; align-items: start; }
.avatar { width: 120px; height: 120px; border-radius: 24px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-size: 42px; font-weight: 800; }
.author .role { color: var(--muted); margin: 0 0 14px; }
.pull { font-size: 19px; font-weight: 700; border-left: 4px solid var(--accent); padding-left: 14px; margin: 18px 0 0; }

.needs { display: grid; gap: 12px; margin-top: 20px; }
.need { display: grid; grid-template-columns: 44px 1fr; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.need b.k { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 18px; }
.need p { margin: 0; }

.checks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.checks li { padding-left: 34px; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-size: 13px; font-weight: 800; }

.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; margin: 0 0 10px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

.cta-band { background: var(--ink); color: var(--bg); border-radius: 18px; padding: 36px 28px; text-align: center; }
.cta-band h2 { font-size: clamp(22px, 3.5vw, 30px); line-height: 1.3; margin: 0 0 18px; }
.cta-band .btn { background: var(--accent); color: #1b1206; }

/* ===== Form đăng ký ===== */
.form-card { max-width: 560px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); }
.field { margin: 0 0 16px; }
.field label { display: block; font-weight: 700; font-size: 15px; margin: 0 0 6px; }
.field input { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.field input:focus { outline: none; border-color: var(--brand); }
.field input[aria-invalid="true"] { border-color: #c0392b; }
.form-card .btn { width: 100%; justify-content: center; border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.form-card .btn[disabled] { opacity: .6; cursor: wait; }
.form-msg { min-height: 1.5em; margin: 12px 0 0; font-size: 15px; color: #c0392b; }
.form-note { font-size: 14px; color: var(--muted); margin: 8px 0 0; }
.hp { position: absolute; left: -9999px; }

@media (max-width: 820px) {
  .brains, .modules { grid-template-columns: 1fr; }
  .author { grid-template-columns: 1fr; }
  .avatar { width: 88px; height: 88px; font-size: 32px; border-radius: 18px; }
  .sec { padding: 40px 0; }
  .land-hero { padding: 36px 0 32px; }
  .form-card { padding: 20px; }
}
