/* ─────────────────────────────────────────────────────────────
   danhnolan.com — hệ thiết kế
   Sáng, navy đậm làm màu chủ đạo. Chỉ một tông màu duy nhất, dùng
   sắc độ thay vì thêm màu mới — đó là thứ tạo cảm giác cao cấp.

   Nội dung migrate mang <style> riêng, nên mọi selector ở đây được
   giữ hẹp và KHÔNG áp màu/font vào trong .body.
   ───────────────────────────────────────────────────────────── */

:root {
  /* Thang navy: một màu, chín sắc độ */
  --navy-900: #071A33;
  --navy-800: #0A2540;
  --navy-700: #103358;
  --navy-600: #17466F;
  --navy-500: #1E5A8E;
  --navy-300: #7A9CC0;
  --navy-100: #DCE6F1;
  --navy-050: #F1F5FA;

  --ink: #0A2540;
  --body: #46586E;
  --muted: #6B7C93;
  --line: #E4EAF2;
  --line-soft: #EFF3F8;
  --bg: #FFFFFF;
  --surface: #F7FAFD;

  --accent: var(--navy-600);
  --accent-hover: var(--navy-800);

  --wrap: min(72rem, 100% - 3rem);
  --measure: 44rem;
  --radius: 12px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(10, 37, 64, .05);
  --shadow-md: 0 4px 16px rgba(10, 37, 64, .07);
  --shadow-lg: 0 12px 36px rgba(10, 37, 64, .10);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", "Noto Sans", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

/* ── Chữ ─────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 680;
  letter-spacing: -.022em;
  line-height: 1.22;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.35rem + 2.7vw, 3.15rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.4rem, 1.15rem + 1.05vw, 1.95rem); margin: 3rem 0 .85rem; }
h3 { font-size: clamp(1.13rem, 1.02rem + .45vw, 1.32rem); margin: 2rem 0 .6rem; }
p  { margin: 0 0 1.15rem; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent-hover); }

.lede {
  font-size: clamp(1.1rem, 1.03rem + .32vw, 1.28rem);
  line-height: 1.6; color: var(--body);
  max-width: var(--measure); margin: 0 0 1.6rem;
}
.meta { color: var(--muted); font-size: .875rem; letter-spacing: .01em; margin: .35rem 0; }

/* ── Bố cục ──────────────────────────────────────────────── */
main { width: var(--wrap); margin-inline: auto; padding-block: 3rem 6rem; }
.block { margin-block: 4.5rem; }
.head { margin-bottom: 2.5rem; }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 1rem; top: 1rem; z-index: 99;
  background: var(--navy-800); color: #fff;
  padding: .7rem 1.2rem; border-radius: var(--radius);
}
:focus-visible { outline: 2px solid var(--navy-500); outline-offset: 3px; border-radius: 4px; }

/* ── Đầu trang ───────────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.site-head > * { }
.site-head {
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: center; justify-content: space-between;
  padding: .95rem max(1.5rem, calc((100% - 72rem) / 2));
}
.brand {
  font-size: 1.16rem; font-weight: 700; letter-spacing: -.03em;
  color: var(--ink); text-decoration: none;
}
.brand span { color: var(--navy-300); font-weight: 500; }

.site-head nav { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.site-head nav a {
  color: var(--body); text-decoration: none;
  font-size: .935rem; font-weight: 500;
  padding: .48rem .78rem; border-radius: 8px;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.site-head nav a:hover { background: var(--navy-050); color: var(--ink); }
.site-head nav a.cta {
  background: var(--navy-800); color: #fff; margin-left: .4rem;
  box-shadow: var(--shadow-sm);
}
.site-head nav a.cta:hover { background: var(--navy-900); color: #fff; }

/* ── Breadcrumb ──────────────────────────────────────────── */
.crumb { font-size: .845rem; color: var(--muted); margin-bottom: 1.6rem; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.crumb a::after { content: "/"; color: var(--navy-300); margin: 0 .5rem; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 1rem;
}
.hero h1 { max-width: 20ch; }
.cta-row { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 2rem; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .82rem 1.7rem; border-radius: 10px;
  background: var(--navy-800); color: #fff;
  font-weight: 600; font-size: .97rem; text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.btn:hover { background: var(--navy-900); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn.ghost {
  background: transparent; color: var(--navy-800);
  box-shadow: inset 0 0 0 1px var(--navy-100);
}
.btn.ghost:hover { background: var(--navy-050); color: var(--navy-900); box-shadow: inset 0 0 0 1px var(--navy-300); }

/* ── Thẻ ─────────────────────────────────────────────────── */
.cards {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 1.15rem;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
}
.cards > li { display: flex; }
.cards a {
  display: flex; flex-direction: column; width: 100%;
  padding: 1.5rem 1.55rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-decoration: none; color: inherit;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.cards a:hover {
  border-color: var(--navy-300);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.cards h2, .cards h3 {
  margin: 0 0 .55rem; font-size: 1.045rem; line-height: 1.4;
  font-weight: 650; letter-spacing: -.012em; color: var(--ink);
}
.cards p { margin: 0; color: var(--muted); font-size: .915rem; line-height: 1.6; }
.cards .meta { margin-top: auto; padding-top: .9rem; font-size: .8rem; }

.plain { list-style: none; padding: 0; margin: 0; }
.plain li {
  padding: .95rem 0; border-bottom: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.plain li:first-child { border-top: 1px solid var(--line-soft); }
.plain a { color: var(--ink); text-decoration: none; font-weight: 500; }
.plain a:hover { color: var(--accent); }

/* ── Mục lục ─────────────────────────────────────────────── */
.toc {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.7rem; margin: 2.2rem 0;
  max-width: var(--measure);
}
.toc h2 {
  margin: 0 0 .8rem; font-size: .74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
}
.toc ol { margin: 0; padding-left: 1.15rem; }
.toc li { margin: .42rem 0; }
.toc a { color: var(--body); text-decoration: none; font-size: .945rem; }
.toc a:hover { color: var(--accent); text-decoration: underline; }

/* ── Thân bài ────────────────────────────────────────────────
   Chỉ đặt bề rộng đọc và cho phần tử rộng cuộn trong khung riêng.
   Không áp màu/font để CSS gốc trong bài giữ nguyên diện mạo. */
.body { max-width: var(--measure); }
.body section { margin-block: 2.2rem; scroll-margin-top: 5.5rem; }
.body table { display: block; overflow-x: auto; max-width: 100%; }
.body pre { overflow-x: auto; }
.body img { border-radius: var(--radius); margin-block: 1.5rem; }
.body > section > h2:first-child { padding-top: .4rem; }

article > .head h1 { max-width: 24ch; }

/* ── Chân trang ──────────────────────────────────────────── */
.site-foot {
  border-top: 1px solid var(--line);
  background: var(--surface);
  margin-top: 5rem;
}
.site-foot {
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: center; justify-content: space-between;
  padding: 2.4rem max(1.5rem, calc((100% - 72rem) / 2));
  color: var(--muted); font-size: .885rem;
}
.site-foot nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--accent); }
.site-foot p { margin: 0; }

@media (max-width: 40rem) {
  :root { --wrap: min(72rem, 100% - 2rem); }
  .site-head { padding-inline: 1rem; }
  .site-head nav { gap: .1rem; }
  .site-head nav a { padding: .42rem .55rem; font-size: .88rem; }
}

/* ── Giao diện hệ thống 2026 ───────────────────────────── */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.eyebrow {
  margin: 0 0 .75rem; color: var(--navy-500); font-size: .75rem;
  line-height: 1.3; font-weight: 750; letter-spacing: .14em; text-transform: uppercase;
}
.menu-toggle {
  display: none; align-items: center; gap: .55rem; border: 1px solid var(--line);
  border-radius: 9px; padding: .5rem .7rem; background: #fff; color: var(--ink);
  font: inherit; font-size: .86rem; font-weight: 650; cursor: pointer;
}
.site-head nav a[aria-current="page"] { background: var(--navy-050); color: var(--ink); }
.site-head .search-link span { font-size: 1.2em; line-height: 0; }

.home-hero {
  display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(20rem, .82fr);
  gap: clamp(2rem, 7vw, 6rem); align-items: center;
  padding-block: clamp(4rem, 8vw, 7.5rem); margin-bottom: 0;
}
.home-hero h1 { max-width: 14ch; font-size: clamp(2.8rem, 2rem + 3.5vw, 5rem); line-height: 1.04; }
.home-hero .lede { max-width: 42rem; }
.hero-panel {
  position: relative; overflow: hidden; padding: 1.25rem;
  border: 1px solid var(--navy-700); border-radius: 24px;
  background: var(--navy-900); color: #fff; box-shadow: var(--shadow-lg);
}
.hero-panel::before {
  content: ""; position: absolute; width: 16rem; height: 16rem; right: -8rem; top: -9rem;
  border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 3rem rgba(255,255,255,.025);
}
.panel-kicker {
  position: relative; margin: .3rem .45rem 1.25rem; color: var(--navy-300);
  font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
}
.hero-panel ol { position: relative; list-style: none; margin: 0; padding: 0; }
.hero-panel li { display: grid; grid-template-columns: 2.2rem 1fr; gap: .8rem; align-items: center; padding: 1.25rem .5rem; border-top: 1px solid rgba(255,255,255,.12); }
.hero-panel li > span { color: var(--navy-300); font: 600 .72rem/1 ui-monospace, monospace; }
.hero-panel strong { display: block; color: #fff; font-size: 1.05rem; letter-spacing: -.01em; }
.hero-panel small { display: block; margin-top: .22rem; color: #9fb4cc; font-size: .79rem; }

.trust-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line);
  margin-bottom: 6rem; padding-block: 1.8rem;
}
.trust-strip p { display: flex; flex-direction: column; gap: .15rem; margin: 0; padding-inline: 1.5rem; border-left: 1px solid var(--line); }
.trust-strip p:first-child { padding-left: 0; border-left: 0; }
.trust-strip strong { color: var(--ink); font-size: 1.55rem; line-height: 1.2; letter-spacing: -.035em; }
.trust-strip span { color: var(--muted); font-size: .8rem; }

.section-head {
  display: flex; align-items: end; justify-content: space-between; gap: 2rem;
  margin-bottom: 2rem;
}
.section-head h2 { max-width: 22ch; margin: 0; }
.section-head > p { max-width: 30rem; margin: 0; color: var(--muted); font-size: .94rem; }
.text-link { flex: none; font-size: .9rem; font-weight: 650; text-decoration: none; }

.path-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.path-grid > a { position: relative; min-height: 19rem; padding: 2rem; border-left: 1px solid var(--line); color: inherit; text-decoration: none; transition: background .2s var(--ease), color .2s var(--ease); }
.path-grid > a:first-child { border-left: 0; }
.path-grid > a:hover { background: var(--navy-900); color: #fff; }
.path-grid .path-number { color: var(--navy-300); font: 600 .72rem/1 ui-monospace, monospace; }
.path-grid h3 { margin: 4.8rem 0 .65rem; font-size: 1.35rem; }
.path-grid p { color: var(--muted); font-size: .9rem; line-height: 1.6; }
.path-grid strong { position: absolute; left: 2rem; bottom: 1.8rem; color: var(--navy-600); font-size: .82rem; }
.path-grid > a:hover h3, .path-grid > a:hover strong { color: #fff; }
.path-grid > a:hover p { color: #aebfd1; }

.featured-block { padding-block: 4.5rem; }
.featured-cards .card-tag, .result-type { color: var(--navy-500); font-size: .68rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.featured-cards h3 { margin-top: 1.4rem; font-size: 1.25rem; }
.featured-cards .card-action { margin-top: auto; padding-top: 1.8rem; color: var(--navy-600); font-size: .82rem; }

.service-banner {
  display: flex; justify-content: space-between; align-items: end; gap: 3rem;
  padding: clamp(2.3rem, 5vw, 4.5rem); border-radius: 24px;
  background: var(--navy-900); color: #b7c5d5;
}
.service-banner h2 { max-width: 24ch; margin: 0 0 1rem; color: #fff; }
.service-banner > div > p:last-child { max-width: 42rem; margin: 0; }
.service-banner .eyebrow { color: var(--navy-300); }
.service-banner .cta-row { flex: none; margin: 0; }
.btn.light { background: #fff; color: var(--navy-900); }
.btn.light:hover { background: var(--navy-050); color: var(--navy-900); }

.site-foot {
  display: grid; grid-template-columns: minmax(16rem, 1.4fr) minmax(20rem, 1fr);
  align-items: start; gap: 3rem 5rem; padding-block: 4rem 2rem;
}
.footer-brand { max-width: 26rem; }
.footer-brand .brand { display: inline-block; margin-bottom: 1rem; font-size: 1.35rem; }
.footer-brand p { line-height: 1.6; }
.footer-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.site-foot .footer-links nav { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; }
.footer-links strong { color: var(--ink); margin-bottom: .25rem; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.copyright { grid-column: 1 / -1; width: 100%; padding-top: 1.5rem; border-top: 1px solid var(--line); }

.search-head { max-width: 52rem; margin: 2rem auto 3rem; text-align: center; }
.search-head h1 { max-width: 18ch; margin-inline: auto; }
.search-form { display: flex; gap: .75rem; margin: 2rem auto 1rem; max-width: 46rem; }
.search-form input {
  width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); padding: .85rem 1rem; font: inherit; box-shadow: var(--shadow-sm);
}
.search-form input:focus { border-color: var(--navy-300); outline: 2px solid rgba(30,90,142,.12); }
.search-form .btn { border: 0; cursor: pointer; }
.search-results { list-style: none; max-width: 52rem; margin: 0 auto; padding: 0; }
.search-results li { border-top: 1px solid var(--line); }
.search-results a { display: block; padding: 1.5rem .2rem; color: inherit; text-decoration: none; }
.search-results h3 { margin: .35rem 0 .4rem; }
.search-results p { margin: 0; color: var(--muted); font-size: .92rem; }
.search-results a:hover h3 { color: var(--navy-500); }
.not-found { max-width: 46rem; padding-block: 5rem; }

@media (max-width: 64rem) {
  .site-head { flex-wrap: nowrap; }
  .menu-toggle { display: inline-flex; }
  .site-head nav {
    display: none; position: absolute; inset: 100% 0 auto 0; padding: .8rem 1rem 1rem;
    background: rgba(255,255,255,.98); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
  }
  .site-head nav.is-open { display: grid; grid-template-columns: repeat(2, 1fr); }
  .site-head nav .cta { margin-left: 0; text-align: center; }
  .home-hero { grid-template-columns: 1fr; }
  .hero-copy { max-width: 46rem; }
  .hero-panel { max-width: 36rem; }
  .path-grid { grid-template-columns: 1fr; }
  .path-grid > a { min-height: 14rem; border-left: 0; border-top: 1px solid var(--line); }
  .path-grid > a:first-child { border-top: 0; }
  .path-grid h3 { margin-top: 2.7rem; }
  .service-banner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 40rem) {
  main { padding-top: 2rem; }
  .menu-label { display: none; }
  .site-head nav.is-open { grid-template-columns: 1fr; }
  .home-hero { padding-top: 2.5rem; gap: 2rem; }
  .home-hero h1 { font-size: clamp(2.55rem, 12vw, 3.6rem); }
  .trust-strip { grid-template-columns: repeat(2, 1fr); margin-bottom: 4rem; }
  .trust-strip p { padding: 1rem; border-top: 1px solid var(--line); }
  .trust-strip p:nth-child(odd) { border-left: 0; }
  .trust-strip p:nth-child(-n+2) { border-top: 0; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .path-grid > a { min-height: 15rem; padding: 1.5rem; }
  .path-grid strong { left: 1.5rem; }
  .service-banner { border-radius: 18px; }
  .site-foot { grid-template-columns: 1fr; }
  .copyright { grid-column: 1; }
  .search-form { flex-direction: column; }
  .search-form .btn { justify-content: center; }
}
