/* Depa — website thông tin nha khoa.
   Identity: the FDI dental chart. Navy ink + steel tooth numbers from the logo; mint is reserved for
   the "occlusal line" (hero search rule, active nav underline, focus). Barlow Semi Condensed echoes the
   DEPA wordmark and carries headings/UI; Source Serif 4 carries anything meant to be read. */

:root {
  --navy: #262262; --navy-2: #3a3585; --ink: #262262;
  --steel: #7fa9c4; --steel-soft: #c6d8e5;
  --mint: #3fe0a8; --mint-ink: #0b7a5c; --mint-wash: #e6faf2;
  --enamel: #f3f5f9; --paper: #ffffff;
  --text: #2c2f4a; --text-2: #5b5f7a; --text-3: #686c86;
  --rule: #dfe3ec;
  --ui: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --read: "Source Serif 4", Georgia, "Times New Roman", serif;
  --w: 1180px; --gutter: 16px; --r: 6px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--ui); font-size: 1.0625rem;
  line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: clip; font-variant-numeric: lining-nums; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--mint-ink); }
:focus-visible { outline: 3px solid var(--mint-ink); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--ui); color: var(--navy); line-height: 1.12; margin: 0 0 .5em; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }
.muted { color: var(--text-2); }
.small { font-size: .9375rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--navy); color: #fff; padding: 8px 14px; z-index: 50; }
.skip:focus { top: 8px; color: #fff; }
.ic { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.15em; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.wrap { max-width: var(--w); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 700px) { :root { --gutter: 28px; } }
main { min-height: 60vh; }

/* ===== header ===== */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--rule); }
.topbar-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo img { height: 42px; width: auto; }
.mainnav { display: flex; gap: 26px; margin-left: auto; align-items: center; }
.mainnav > a { font-weight: 600; font-size: 1.125rem; color: var(--navy); padding: 21px 0 18px; border-bottom: 3px solid transparent; }
.mainnav > a:hover { color: var(--navy); border-bottom-color: var(--steel-soft); }
.mainnav > a[aria-current] { border-bottom-color: var(--mint); }
.nav-search { display: flex; align-items: center; gap: 6px; border: 1px solid var(--rule); border-radius: var(--r); padding: 0 10px; color: var(--text-3); }
.nav-search:focus-within { border-color: var(--navy); color: var(--navy); outline: 3px solid var(--mint-ink); outline-offset: 1px; }
.nav-search input { border: 0; outline: 0; padding: 8px 0; width: 150px; background: transparent; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--rule); border-radius: var(--r);
  width: 44px; height: 44px; color: var(--navy); cursor: pointer; align-items: center; justify-content: center; }
.menu-btn .ic { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .mainnav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--rule); padding: 4px var(--gutter) 16px;
    max-height: calc(100dvh - 68px); overflow-y: auto; overscroll-behavior: contain; }
  .mainnav.open { display: flex; }
  .mainnav > a { padding: 12px 0; border-bottom: 1px solid var(--rule); border-left: 3px solid transparent; }
  .mainnav > a[aria-current] { border-bottom-color: var(--rule); border-left-color: var(--mint); padding-left: 10px; }
  .nav-search { margin-top: 12px; }
  .nav-search input { width: 100%; }
}

/* ===== inputs / buttons ===== */
input[type=search], input[type=text] { font: inherit; color: var(--text); min-width: 0; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: var(--r); background: var(--navy);
  color: #fff; border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: 1.0625rem; }
.btn:hover { background: var(--navy-2); color: #fff; }
.btn.line { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--navy); }
.btn.line:hover { background: var(--navy); color: #fff; }
.more { font-weight: 600; color: var(--mint-ink); white-space: nowrap; border-bottom: 1.5px solid currentColor; }
.more:hover { color: var(--navy); }

/* ===== hero: the FDI chart ===== */
.hero { background: var(--enamel); padding: clamp(40px, 6vw, 72px) 0 clamp(36px, 5vw, 56px); }
.hero h1 { max-width: 20ch; margin-bottom: .35em; }
.hero .lead { font-family: var(--read); font-size: 1.1875rem; line-height: 1.6; color: var(--text-2); max-width: 46ch; margin: 0; }
.hero-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; }
.hero-stats { display: flex; gap: 32px; margin: 0; }
.hero-stats div { display: flex; flex-direction: column-reverse; }
.hero-stats dt { color: var(--text-2); font-size: 1rem; }
.hero-stats dd { margin: 0; font-size: 2.25rem; font-weight: 600; line-height: 1; color: var(--navy); }
.hero-stats a { color: inherit; }
@media (max-width: 760px) { .hero-top { grid-template-columns: 1fr; } .hero-stats { gap: 24px; } .hero-stats dd { font-size: 1.75rem; } }

.chart { margin-top: clamp(28px, 4vw, 44px); }
.arch { display: grid; grid-template-columns: repeat(16, 1fr); color: var(--steel); font-weight: 500;
  font-size: clamp(.8125rem, .45rem + 1.4vw, 1.75rem); line-height: 1; text-align: center; font-variant-numeric: tabular-nums; }
.arch span:nth-child(8) { box-shadow: inset -1px 0 0 var(--steel-soft); }
.arch span { padding: .35em 0; }
.arch.upper span { padding-bottom: .6em; }
.arch.lower span { padding-top: .6em; }
.occlusal { position: relative; display: flex; justify-content: center; padding: 0; }
.occlusal::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; background: var(--mint);
  transform-origin: center; animation: bite 900ms cubic-bezier(.2,.7,.2,1) 150ms both; }
@keyframes bite { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .occlusal::before { animation: none; } }
.hero-search { position: relative; display: flex; width: min(100%, 620px); background: #fff; border: 1.5px solid var(--navy); border-radius: var(--r); }
.hero-search input { flex: 1; border: 0; outline: 0; padding: 14px 16px; background: transparent; font-size: 1.125rem; }
.hero-search button { border-radius: 0 4px 4px 0; }
.hero-search:focus-within { outline: 3px solid var(--mint-ink); outline-offset: 2px; }
.chart-note { margin: 14px 0 0; text-align: center; color: var(--text-2); font-size: 1rem; }
.chart-note a { color: var(--navy); font-weight: 600; margin: 0 6px; border-bottom: 1px solid var(--steel-soft); }
.chart-note a:hover { border-bottom-color: var(--mint); }

/* ===== sections ===== */
.section { padding: clamp(44px, 6vw, 72px) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section.tint { background: var(--enamel); border-top: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--text-2); font-family: var(--read); }

/* ===== article listings ===== */
.thumb { display: block; overflow: hidden; border-radius: var(--r); background: var(--enamel); aspect-ratio: 3/2; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--steel); }
.thumb-ph svg { width: 36%; max-width: 64px; height: auto; }
.meta { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: .9375rem; color: var(--text-3); }
.meta a { color: var(--text-2); }
.meta a:hover { color: var(--mint-ink); }
.excerpt { font-family: var(--read); color: var(--text-2); font-size: 1.0625rem; line-height: 1.55; margin: 6px 0 0; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* home: lead story + index */
.lead-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; }
.lead-story .thumb { aspect-ratio: 16/10; margin-bottom: 18px; }
.lead-story h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 700; margin: 6px 0 4px; }
.lead-story .excerpt { font-size: 1.1875rem; }
.index { list-style: none; margin: 0; padding: 0; }
.index li { border-top: 1px solid var(--rule); }
.index li:last-child { border-bottom: 1px solid var(--rule); }
.index a.row { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 16px; padding: 14px 0; align-items: center; }
.index .row h3 { font-size: 1.1875rem; margin: 0 0 4px; }
.index .row:hover h3 { color: var(--mint-ink); }
.index .thumb { aspect-ratio: 1; }
.cats { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 20px; font-size: 1.0625rem; }
.cats a { font-weight: 600; }
.cats span { color: var(--text-3); font-weight: 500; margin-left: 4px; }
@media (max-width: 860px) { .lead-split { grid-template-columns: 1fr; gap: 28px; } }

/* list pages: article rows */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 22px 0; border-top: 1px solid var(--rule); }
.rows > li:first-child { border-top: 0; padding-top: 0; }
.rows h2, .rows h3 { font-size: 1.375rem; margin: 2px 0 2px; }
.rows h2 a:hover, .rows h3 a:hover { color: var(--mint-ink); }
@media (max-width: 600px) { .rows > li { grid-template-columns: 104px minmax(0, 1fr); gap: 14px; } .rows .thumb { aspect-ratio: 1; }
  .rows .excerpt { display: none; } .rows h2, .rows h3 { font-size: 1.1875rem; } }

/* doctor shares */
.shares { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.shares h3 { margin: 14px 0 4px; font-size: 1.25rem; }
.shares h3 a:hover { color: var(--mint-ink); }
@media (max-width: 860px) { .shares { grid-template-columns: 1fr; gap: 0; }
  .shares article { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 14px; padding: 16px 0; border-top: 1px solid var(--rule); }
  .shares article:first-child { border-top: 0; padding-top: 0; } .shares .thumb { aspect-ratio: 1; } .shares h3 { margin-top: 0; font-size: 1.125rem; }
  .shares .excerpt { display: none; } }

/* ===== seminars: a schedule ===== */
.schedule { list-style: none; margin: 0; padding: 0; }
.schedule > li { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 8px 28px; padding: 20px 0; border-top: 1px solid var(--rule); align-items: start; }
.schedule > li:last-child { border-bottom: 1px solid var(--rule); }
.when { display: flex; flex-direction: column; line-height: 1; color: var(--navy); }
.when b { font-size: 2.75rem; font-weight: 600; letter-spacing: -.02em; }
.when span { font-size: 1rem; color: var(--text-2); margin-top: 6px; }
.past .when b { color: var(--steel); }
.schedule h3 { font-size: 1.25rem; margin: 2px 0 6px; }
.schedule h3 a:hover { color: var(--mint-ink); }
.status { font-size: .9375rem; font-weight: 600; color: var(--text-3); white-space: nowrap; padding-top: 4px; }
.status.open { color: var(--mint-ink); }
@media (max-width: 640px) { .schedule > li { grid-template-columns: 64px minmax(0, 1fr); } .when b { font-size: 2rem; } .status { grid-column: 2; padding: 0; } }
.notice { font-family: var(--read); color: var(--text-2); margin: 0 0 20px; }

/* ===== page head ===== */
.page-head { background: var(--enamel); padding: 36px 0 30px; }
.page-head h1 { margin-bottom: .2em; }
.page-head p { font-family: var(--read); color: var(--text-2); max-width: 60ch; margin: 0; }
.crumbs { font-size: .9375rem; color: var(--text-3); margin-bottom: 10px; }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--navy); }
.crumbs span + span::before { content: "/"; margin: 0 8px; color: var(--steel-soft); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 20px; }
.tabs a { font-weight: 600; padding-bottom: 6px; border-bottom: 3px solid transparent; color: var(--text-2); }
.tabs a:hover { color: var(--navy); }
.tabs a[aria-current] { color: var(--navy); border-bottom-color: var(--mint); }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; padding-top: 40px; padding-bottom: 72px; }
@media (max-width: 960px) { .layout { grid-template-columns: minmax(0, 1fr); gap: 40px; } }
.sidebar { display: flex; flex-direction: column; gap: 32px; }
.side h2, .side h3 { font-size: 1.125rem; padding-bottom: 8px; border-bottom: 2px solid var(--navy); margin-bottom: 4px; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.side li a { font-weight: 600; line-height: 1.3; }
.side li .meta { margin-top: 2px; }
.side p { font-family: var(--read); color: var(--text-2); font-size: 1rem; margin: 10px 0 0; }

/* ===== reading ===== */
.article-head { padding: 40px 0 0; }
.article-head .inner, .reading { max-width: 720px; }
.article-head h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); margin-bottom: .3em; }
.article-head .meta { font-size: 1rem; }
.article-cover { margin: 0 0 32px; }
.article-cover img { border-radius: var(--r); width: 100%; aspect-ratio: 16/10; object-fit: cover; object-position: 50% 30%; }
.prose { font-family: var(--read); font-size: 1.1875rem; line-height: 1.7; color: var(--text); overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose h2 { font-size: 1.75rem; margin: 1.6em 0 .5em; }
.prose h3 { font-size: 1.375rem; margin: 1.4em 0 .4em; }
.prose h4 { font-size: 1.1875rem; margin: 1.2em 0 .4em; }
.prose img { border-radius: var(--r); margin: 1.4em auto; height: auto !important; }
.prose figure { margin: 1.4em 0; }
.prose figcaption, .prose .wp-caption-text { font-family: var(--ui); font-size: .9375rem; color: var(--text-3); text-align: center; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--mint); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:hover { color: var(--mint-ink); }
.prose blockquote { margin: 1.4em 0; padding: 2px 0 2px 22px; border-left: 3px solid var(--mint); color: var(--text-2); font-style: italic; }
.prose table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; font-family: var(--ui); font-size: 1rem; }
.prose td, .prose th { border-bottom: 1px solid var(--rule); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { color: var(--navy); border-bottom: 2px solid var(--navy); }
.prose iframe, .prose video, .prose embed { max-width: 100%; }
.prose img, .prose figure, .prose .wp-caption { max-width: 100% !important; }
.lede { font-size: 1.3125rem; line-height: 1.55; color: var(--text-2); margin-bottom: 1.4em; }
.article-cover figcaption { font-size: .875rem; color: var(--text-3); margin-top: 8px; }
.article-cover figcaption a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--steel-soft); }
.source { margin-top: 32px; font-size: 1rem; color: var(--text-2); }
.source a { color: var(--mint-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.draft-banner { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between;
  background: #fff7e0; border: 1px solid #e9c46a; border-radius: var(--r); padding: 12px 16px; margin-bottom: 24px; color: #6b4e00; }
.draft-banner a { color: #6b4e00; font-weight: 600; text-decoration: underline; }
.disclaimer { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--rule); color: var(--text-2); font-size: 1rem; }

.author-box { display: flex; gap: 16px; align-items: center; margin-top: 32px; padding: 20px 0; border-top: 2px solid var(--navy); }
.avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--enamel);
  display: grid; place-items: center; color: var(--navy); font-weight: 700; font-size: 1.5rem; }

.facts { margin: 0; }
.facts div { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.facts dt { color: var(--text-3); font-size: .9375rem; }
.facts dd { margin: 2px 0 0; font-weight: 600; color: var(--navy); }
.facts a { color: var(--mint-ink); }
.cta-note { color: var(--text-3); font-size: .9375rem; margin: 8px 0 0; }

/* ===== FAQ ===== */
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 48px; }
.faq-grid > div:first-child p { font-family: var(--read); color: var(--text-2); font-size: 1.125rem; max-width: 40ch; }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; gap: 16px; } }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; font-size: 1.1875rem; color: var(--navy); list-style: none;
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--mint-ink); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 0 18px; font-family: var(--read); color: var(--text-2); font-size: 1.0625rem; line-height: 1.65; max-width: 62ch; }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

/* ===== pagination / empty ===== */
.pager { display: flex; gap: 6px; margin-top: 36px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 44px; height: 44px; display: inline-grid; place-items: center; padding: 0 12px; border-radius: var(--r);
  border: 1px solid var(--rule); font-weight: 600; }
.pager a:hover { border-color: var(--navy); }
.pager .current { background: var(--navy); color: #fff; border-color: var(--navy); }
.empty { padding: 28px 0; color: var(--text-2); font-family: var(--read); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

.search-form { display: flex; max-width: 620px; margin-top: 16px; background: #fff; border: 1.5px solid var(--navy); border-radius: var(--r); }
.search-form input { flex: 1; border: 0; outline: 0; padding: 12px 16px; background: transparent; font-size: 1.125rem; }
.search-form:focus-within { outline: 3px solid var(--mint-ink); outline-offset: 2px; }
.search-form button { border-radius: 0 4px 4px 0; }
.result-count { color: var(--text-2); margin-bottom: 24px; }
.group-title { font-size: 1.5rem; margin: 0 0 16px; }

/* ===== footer ===== */
.footer { background: var(--navy); color: #c8cbec; padding: 56px 0 28px; font-size: 1.0625rem; }
.footer a { color: #fff; }
.footer a:hover { color: var(--mint); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h2 { color: #fff; font-size: 1.125rem; font-weight: 600; margin-bottom: 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer .brand img { height: 40px; width: auto; filter: brightness(0) invert(1); margin-bottom: 16px; }
.footer .contact { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.footer .contact a { display: inline-flex; gap: 8px; align-items: center; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 40px; padding-top: 18px; font-size: .9375rem; color: #a3a6d4; }

/* ===== error pages ===== */
.err { padding: 88px 0; }
.err .code { font-size: clamp(4rem, 3rem + 6vw, 8rem); font-weight: 600; color: var(--steel); line-height: 1; margin: 0 0 8px; }
.err p { font-family: var(--read); color: var(--text-2); max-width: 46ch; }
.err .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
