/* haudau.com — shared styles. No external requests. */
:root {
  --bg: #faf7f2;
  --bg-soft: #f2ede4;
  --surface: #ffffff;
  --text: #1d1a16;
  --muted: #6b645a;
  --line: #e4ddd1;
  --brand: #c8283c;
  --brand-ink: #ffffff;
  --focus: #2f6fdf;
  --shadow: 0 1px 2px rgba(40, 30, 10, .06), 0 8px 24px rgba(40, 30, 10, .06);

  --taptho: #2a8fb0;
  --dapchuot: #3f9a2c;
  --xuyenviet: #c8283c;
  --vuimap: #f0566b;

  --radius: 18px;
  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14120f; --bg-soft: #1c1915; --surface: #221f1a; --text: #f3eee6; --muted: #a9a094;
    --line: #34302a; --brand: #ef5466; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    --taptho: #5cc0de; --dapchuot: #7ccf5f; --xuyenviet: #ef5466; --vuimap: #ff8291;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14120f; --bg-soft: #1c1915; --surface: #221f1a; --text: #f3eee6; --muted: #a9a094;
  --line: #34302a; --brand: #ef5466; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  --taptho: #5cc0de; --dapchuot: #7ccf5f; --xuyenviet: #ef5466; --vuimap: #ff8291;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .5em; text-wrap: balance; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
@media (max-width: 480px) { .wrap { padding: 0 16px; } }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; text-decoration: none; letter-spacing: -0.02em; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-size: 16px; font-weight: 800; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 600; padding: 6px 10px; border-radius: 8px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--bg-soft); }
@media (max-width: 560px) { .nav a.hide-sm { display: none; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 80px; padding: 36px 0 48px; color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-dark { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Legal / prose pages */
.page-head { padding: 56px 0 24px; }
.page-head .eyebrow { color: var(--muted); font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; }
.page-head h1 { font-size: clamp(32px, 5vw, 46px); }
.page-head .meta { color: var(--muted); font-size: 15px; }
.prose { max-width: 720px; }
.prose h2 { font-size: 24px; margin-top: 2em; }
.prose h3 { font-size: 19px; margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin: .3em 0; }
.prose a { color: var(--brand); }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--bg-soft); font-weight: 700; }
.callout { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin: 0 0 1.4em; }
.lang-switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--line); margin-bottom: 8px; }
.lang-switch a { text-decoration: none; font-size: 14px; font-weight: 700; padding: 4px 10px; border-radius: 7px; color: var(--muted); }
.lang-switch a[aria-current="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.app-chip { display: inline-flex; align-items: center; gap: 10px; }
.app-chip img { width: 44px; height: 44px; border-radius: 11px; }
.card-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 0 0 1.4em; padding: 0; list-style: none; }
.card-list a { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--text); font-weight: 700; }
.card-list a:hover { box-shadow: var(--shadow); }
.card-list img { width: 40px; height: 40px; border-radius: 10px; }
.card-list small { display: block; font-weight: 500; color: var(--muted); }

/* ===== v2: i18n header, app + guide pages (appended to site.css at build) ===== */
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { left: 12px; }
.header-right { display: flex; align-items: center; gap: 6px; }
.langs { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); margin-left: 4px; }
.langs a { min-width: 34px; min-height: 30px; display: grid; place-items: center; font-size: 13px; font-weight: 800; text-decoration: none; color: var(--muted); border-radius: 7px; padding: 0 6px; }
.langs a[aria-current="true"] { background: var(--text); color: var(--bg); }
.langs a:not([aria-current="true"]):hover { color: var(--text); background: var(--bg-soft); }
@media (max-width: 400px) { .nav a { padding: 6px 7px; font-size: 14px; } }

[hidden] { display: none !important; }
.crumbs { font-size: 14px; color: var(--muted); padding-top: 24px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs span[aria-hidden] { opacity: .5; }

.accent { --accent: var(--accent-l); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .accent { --accent: var(--accent-d); } }
:root[data-theme="dark"] .accent { --accent: var(--accent-d); }

/* App intro page */
.app-hero { display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 4vw, 40px); align-items: center; padding: clamp(24px, 5vw, 48px) 0 clamp(32px, 5vw, 56px); }
.app-hero .icon { width: clamp(96px, 16vw, 168px); height: auto; aspect-ratio: 1; border-radius: 23%; box-shadow: 0 18px 40px color-mix(in srgb, var(--accent) 30%, rgba(0,0,0,.18)); }
.app-hero .kind { color: var(--accent); font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.app-hero h1 { font-size: clamp(34px, 6vw, 56px); letter-spacing: -0.03em; margin-bottom: 6px; }
.app-hero .tagline { font-size: clamp(18px, 2.4vw, 22px); font-weight: 700; margin-bottom: 8px; text-wrap: pretty; }
.app-hero .lede { color: var(--muted); font-size: 17px; max-width: 36em; margin-bottom: 22px; text-wrap: pretty; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cta .btn { min-height: 46px; padding: 11px 18px; }
.soon { display: inline-flex; align-items: center; min-height: 40px; font-size: 13px; font-weight: 700; padding: 0 12px; border-radius: 10px; background: var(--bg-soft); color: var(--muted); border: 1px dashed var(--line); }
@media (max-width: 600px) {
  .app-hero { grid-template-columns: 1fr; }
  .app-hero .cta .btn { flex: 1 1 auto; justify-content: center; }
}

.block { margin-bottom: clamp(48px, 7vw, 72px); }
.block > h2 { font-size: clamp(24px, 3.4vw, 30px); letter-spacing: -0.02em; margin-bottom: 18px; }
.highlights { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.highlights li { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.highlights li::before { content: ""; display: block; width: 28px; height: 6px; border-radius: 3px; background: var(--accent); margin-bottom: 14px; }
.highlights h3 { font-size: 17px; margin-bottom: 4px; }
.highlights p { color: var(--muted); font-size: 15.5px; line-height: 1.5; margin: 0; text-wrap: pretty; }

.gallery { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
.gallery figure { margin: 0; flex: 0 0 min(78%, 320px); scroll-snap-align: start; background: color-mix(in srgb, var(--accent) 8%, var(--bg-soft)); border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
.gallery img { width: 100%; height: 240px; object-fit: contain; }
.gallery figcaption { font-size: 14px; color: var(--muted); padding: 10px 14px; }

.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 3vw, 28px); }
.panel h2 { font-size: 22px; margin-bottom: 14px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; line-height: 1.5; }
.steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, var(--bg-soft)); color: var(--accent); font-weight: 800; font-size: 14px; display: grid; place-items: center; }
.link-arrow { font-weight: 700; color: var(--accent); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.link-arrow:hover { text-decoration: underline; }
.facts { margin: 0 0 16px; }
.facts div { display: grid; grid-template-columns: 40% 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.panel-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.panel-links a { font-weight: 600; font-size: 15px; min-height: 40px; display: inline-flex; align-items: center; }

.more { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.more a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; }
.more a:hover { box-shadow: var(--shadow); }
.more img { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.more b { display: block; }
.more small { color: var(--muted); font-size: 14px; display: block; line-height: 1.35; }

/* Guide page */
.guide-head { display: flex; gap: 18px; align-items: center; padding: 20px 0 28px; }
.guide-head img { width: 64px; height: 64px; border-radius: 16px; flex: none; }
.guide-head h1 { font-size: clamp(28px, 5vw, 44px); letter-spacing: -0.03em; margin: 0 0 4px; }
.guide-head p { margin: 0; color: var(--muted); text-wrap: pretty; }
.guide { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
.toc { position: sticky; top: 80px; font-size: 15px; }
.toc summary { font-weight: 800; cursor: pointer; list-style: none; min-height: 44px; display: flex; align-items: center; justify-content: space-between; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary svg { width: 18px; height: 18px; transition: transform .2s; }
.toc[open] summary svg { transform: rotate(180deg); }
.toc ol { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 2px; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 12px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.4; }
.toc a:hover { color: var(--text); border-left-color: var(--accent); }
@media (min-width: 861px) { .toc summary { pointer-events: none; } .toc summary svg { display: none; } }
@media (max-width: 860px) {
  .guide { grid-template-columns: 1fr; gap: 20px; }
  .toc { position: static; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 2px 16px 10px; }
  .toc:not([open]) { padding-bottom: 2px; }
}
.guide-body { max-width: 720px; }
.guide-sec { padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.guide-sec:last-of-type { border-bottom: 0; }
.guide-sec h2 { font-size: clamp(21px, 3vw, 25px); display: flex; gap: 12px; align-items: baseline; }
.guide-sec h2 .n { color: var(--accent); font-size: .8em; font-weight: 800; flex: none; }
.tip, .warn { border-radius: 14px; padding: 14px 16px; margin: 0 0 12px; font-size: 15.5px; line-height: 1.5; }
.tip { background: color-mix(in srgb, var(--accent) 8%, var(--bg-soft)); }
.tip b, .warn b { display: block; margin-bottom: 4px; }
.tip ul, .warn ul { margin: 0; padding-left: 1.2em; }
.tip li + li, .warn li + li { margin-top: 4px; }
.warn { background: color-mix(in srgb, #e0a100 14%, var(--bg-soft)); border: 1px solid color-mix(in srgb, #e0a100 40%, var(--line)); margin-bottom: 28px; }
.note { color: var(--muted); font-size: 15px; }
.help { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; margin-top: 12px; }
.help h2 { font-size: 20px; margin: 0 0 2px; }
.help p { margin: 0; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .toc summary svg { transition: none; } }
@media (max-width: 600px) { .highlights { gap: 10px; } .highlights li { padding: 16px; } .highlights li::before { margin-bottom: 10px; } }
