/* Vững Lái — static site styles. No framework; Be Vietnam Pro from Google Fonts. */
:root {
  color-scheme: light dark;
  --bg: #f6f9fe;
  --surface: #ffffff;
  --surface-2: #eef4fc;
  --text: #0b1a3a;
  --text-dim: #4a5a78;
  --border: #d8e2f1;
  --accent: #0060e4;
  --accent-2: #007c79;
  --link: #0057cf;
  --warn-bg: #fff6e0;
  --warn-border: #e8b649;
  --warn-text: #5a4100;
  --hero-from: #e8f4ff;
  --hero-to: #f6f9fe;
  --grad: linear-gradient(90deg, #009dff, #0060e4 55%, #00c796);
  --radius: 14px;
  --maxw: 960px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #050c1f;
    --surface: #0b1838;
    --surface-2: #10204a;
    --text: #e6eefb;
    --text-dim: #9db0d3;
    --border: #1d3266;
    --accent: #3d8dff;
    --accent-2: #00d99b;
    --link: #6cc4ff;
    --warn-bg: #2a2109;
    --warn-border: #8a6a1c;
    --warn-text: #f3dc9c;
    --hero-from: #0b1c48;
    --hero-to: #050c1f;
  }
}
:root[data-theme="dark"] {
  --bg: #050c1f; --surface: #0b1838; --surface-2: #10204a; --text: #e6eefb; --text-dim: #9db0d3;
  --border: #1d3266; --accent: #3d8dff; --accent-2: #00d99b; --link: #6cc4ff;
  --warn-bg: #2a2109; --warn-border: #8a6a1c; --warn-text: #f3dc9c; --hero-from: #0b1c48; --hero-to: #050c1f;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 6px 10px; z-index: 10; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-style: italic; font-size: 20px; }
.brand img { width: 50px; height: 32px; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(0, 157, 255, .3)); }
.brand .lai { background: linear-gradient(90deg, #007392, #00c796); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; }
.nav a { color: var(--text-dim); text-decoration: none; padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }

/* Hero */
.hero { background: linear-gradient(180deg, var(--hero-from), var(--hero-to)); padding: 40px 0 32px; text-align: center; }
.hero .logo { width: min(320px, 78vw); display: block; margin: 0 auto; }
.hero p.lead { font-size: 19px; color: var(--text-dim); max-width: 640px; margin: 12px auto 20px; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; background: var(--grad); color: #fff; font-weight: 700; text-decoration: none; }
.btn.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.note { font-size: 14px; color: var(--text-dim); }

main { padding: 24px 0 48px; }
h1 { font-size: clamp(28px, 5vw, 38px); line-height: 1.25; margin: 16px 0 8px; }
h2 { font-size: clamp(22px, 3.6vw, 27px); line-height: 1.3; margin: 40px 0 10px; }
h3 { font-size: 19px; margin: 24px 0 6px; }
.meta { color: var(--text-dim); font-size: 15px; }
section { scroll-margin-top: 16px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 16px 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.card h3 { margin-top: 0; font-size: 17px; }
.card p { margin: 0; color: var(--text-dim); font-size: 15.5px; }

.callout { background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--warn-text); border-radius: var(--radius); padding: 14px 18px; margin: 20px 0; }
.callout strong { color: inherit; }
.info { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; margin: 20px 0; }

table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15.5px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); }
.table-scroll { overflow-x: auto; }

.lang-switch { display: inline-flex; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 4px; margin: 8px 0 4px; }
.lang-switch a { padding: 4px 14px; border-radius: 999px; text-decoration: none; color: var(--text-dim); font-size: 15px; font-weight: 600; }
.lang-switch a:hover { color: var(--text); background: var(--surface); }
.lang-divider { border: 0; border-top: 2px dashed var(--border); margin: 56px 0 8px; }

details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 18px; margin: 10px 0; }
summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style-position: outside; }
details[open] summary { border-bottom: 1px solid var(--border); margin-bottom: 8px; }
details > *:last-child { margin-bottom: 14px; }

.qr-box { display: grid; grid-template-columns: minmax(0, 260px) 1fr; gap: 24px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 20px 0; }
.qr-box img { background: #fff; border-radius: 10px; padding: 6px; width: 100%; }
.qr-box dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.qr-box dt { color: var(--text-dim); }
.qr-box dd { margin: 0; font-weight: 700; word-break: break-all; }
@media (max-width: 600px) {
  .qr-box { grid-template-columns: 1fr; justify-items: center; text-align: left; }
  .qr-box img { max-width: 260px; }
  body { font-size: 16px; }
  .site-header .wrap { min-height: 0; padding-top: 10px; padding-bottom: 6px; row-gap: 0; }
  .nav { gap: 0 14px; font-size: 14.5px; }
  .nav a { padding: 4px 0; }
  table { font-size: 14px; }
  th, td { padding: 6px 6px; }
}

.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 24px 0 32px; font-size: 14.5px; color: var(--text-dim); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.site-footer a { color: var(--text-dim); }
