/* ==========================================================================
   VIETRRO 2026 — base.css
   Reset, design tokens and typography shared by the whole merged site.
   Colour values, fonts and spacing are carried over from the 19 original
   VIETRRO_PHAN_* modules (regulation styles.css + royalty styles.css) and
   consolidated here instead of being repeated 19 times.
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

:root {
  /* Core palette — copied verbatim from the source stylesheets */
  --bg: #f7f8fa;
  --white: #fff;
  --ink: #182433;
  --muted: #657487;
  --line: #dde4ea;
  --blue: #123f63;
  --blue2: #1a608f;
  --soft: #eef3f6;
  --dark: #10293d;
  --gold: #b5944f;

  /* Consolidated near-duplicate card borders/backgrounds found across the
     4 distinct royalty stylesheets (#d9e1e6 / #dbe3e8 / #d9e2e8 / #dae2e7 /
     #dce4e9 / #d7e0e6 / #ccd7df) — normalized to one token, see README. */
  --card-border: #d9e1e6;
  --card-border-soft: #dce4e9;
  --field-border: #ccd7df;

  /* Warning / draft-notice tokens (from .draft-alert / .notice-warning /
     .warning-box / .calc-note, all variants of the same amber notice) */
  --warn-bg: #fff9ec;
  --warn-border: #d7bf85;
  --warn-text-strong: #7a5d20;
  --warn-text: #625636;
  --warn-dot: #b5944f;

  /* Dark status/audit box (.status-box / .audit-box) */
  --dark-box: #102f47;
  --dark-box-label: #d6bf88;

  /* Layout metrics */
  --topbar-h: 64px;
  --sidebar-w: 320px;
  --sidebar-rail-w: 60px;
  --content-max: 1160px;
  --radius: 10px;
  --radius-lg: 14px;
}

html, body {
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: Arial, "Helvetica Neue", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
}

/* Vietnamese diacritic rendering fix (kept from source FONT_FIX modules) */
html, body {
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  word-spacing: normal;
  font-family: "Times New Roman", Times, "Noto Serif", serif;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--ink);
}

h1 {
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.012em;
  margin-bottom: 18px;
}

h2 {
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.008em;
}

h3 {
  font-size: 18px;
  line-height: 1.3;
}

p { margin: 0 0 1em; }

a { color: var(--blue2); }

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; }

ul, ol { margin: 0; padding-left: 18px; }

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

/* Visible keyboard focus everywhere (accessibility requirement) */
:focus-visible {
  outline: 3px solid var(--blue2);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: min(var(--content-max), 92vw);
  margin: auto;
}

.kicker {
  display: inline-block;
  color: var(--blue2);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  margin-bottom: 13px;
}

.lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 760px;
}

.section-title { margin-bottom: 30px; }
.section-title > p { max-width: 820px; color: var(--muted); margin: 0; }

.btn {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-weight: 800;
  color: var(--blue);
  background: var(--white);
  border: 1px solid var(--line);
}
.btn.primary { background: var(--blue); color: #fff; border-color: var(--blue); }

.band {
  background: var(--soft);
  border-top: 1px solid #e3e9ed;
  border-bottom: 1px solid #e3e9ed;
}

.section { padding: 64px 0; }

/* Screen-reader-only utility */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
