/* ==========================================================================
   SIYB VIỆT NAM - CLB DOANH NHÂN KHỞI SỰ VÀ HỖ TRỢ DOANH NGHIỆP (HUBA)
   Design System: "The Printed Annual" (editorial-report)
   Skills Applied: Impeccable + Taste-Skill v2
   Fonts: Self-hosted Phudu (Display/Titles) & Be Vietnam Pro (Body/UI)
   ========================================================================== */

:root {
  /* Palette Tokens (Normative from DESIGN.md) */
  --bg: #F6F5F0;                   /* Architectural Alabaster - Primary Ground (75%+) */
  --surface: #EAE7DF;              /* Warm Stone Surface - Tonal Step (No 1px lines) */
  --ink: #0A1628;                  /* Deep Institutional Ink - Main Text & Dark Field */
  --muted: #42526B;                /* Muted Slate Ink - Secondary Text on Light Ground (7.4:1) */

  --field-navy: #003D82;           /* Sovereign HUBA Navy - Primary Brand Field & Button */
  --field-navy-deep: #002855;      /* Sovereign Navy Deep - Spine Card Step 2 */
  --field-navy-ink: #10233F;       /* Sovereign Navy Dark - Spine Card Step 3 */
  --field-crimson: #B83224;        /* Trade Promotion Crimson - Mosaic Counter-Tile */
  --field-ink: #0A1628;            /* Deep Institutional Ink - Closing & CTA Field */
  --field-hero-scrim: rgba(10, 22, 40, 0.82); /* Neutral Dark Scrim for Hero h1 */

  --accent: #F5EB00;               /* SIYB Signal Gold - Action & Hover Polarity (<5% screen) */
  --accent-warm: #D9CF00;          /* Signal Gold Warm - Focus Ring & Secondary Highlight */
  --accent-ink: #0A1628;           /* Text on Signal Gold (15.8:1 AAA contrast) */

  /* Typography Tokens (Self-Hosted Local Fonts Only) */
  --font-display: 'Phudu', 'Helvetica Neue', Arial, sans-serif;
  --font-text: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Fluid Type Scale - Few Sizes, Far Apart (taste-skill type.md §2) */
  --step-small: 0.9375rem;                                         /* 15px */
  --step-body: 1.0625rem;                                          /* 17px */
  --step-lead: 1.375rem;                                           /* 22px */
  --step-title: clamp(1.375rem, 2vw, 1.875rem);                    /* 22px–30px */
  --step-head: clamp(2rem, 3.2vw, 3.25rem);                        /* 32px–52px */
  --step-display: clamp(2rem, 4.6vw, 4.25rem);                     /* 32px–68px */
  --step-stat: clamp(2.25rem, 5.5vw, 5.5rem);                      /* 36px–88px */
  --step-footer-cta: clamp(1.35rem, 6.6vw, 5.5rem);                /* Fits 19-char email on 320px–390px real phones */

  /* Frame & Grid Tokens (taste-skill layout.md §2 & §5) */
  --margin: clamp(16px, 2.2vw, 32px);
  --gutter: clamp(16px, 1.5vw, 24px);
  --section-space: clamp(88px, 10vw, 160px);

  /* Motion Tokens (Animate UI tokens.md + Emil Kowalski animate skill) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);                      /* ease.out - fast start for enter/exit */
  --ease-soft: cubic-bezier(0.215, 0.61, 0.355, 1);                /* ease.soft - disclosures, sheets, overlays */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);                  /* ease.inOut - on-screen movement/morph */
  --ease-drawer: cubic-bezier(0.34, 1.2, 0.64, 1);                 /* ease.drawer - drawer/popup entrance */
  --ease-away: cubic-bezier(0.33, 0.17, 0.67, 0.5);                /* ease.away - dismissal speed-off */
  --ease-enter: cubic-bezier(0.25, 0.1, 0.35, 1);                  /* ease.enter - panel arriving from blur */
  --ease-leave: cubic-bezier(0, 0, 0.58, 1);                       /* ease.leave - panel leaving into blur */
  --dur-press: 120ms;
  --dur-fast: 220ms;
  --dur-med: 760ms;
  --scale-press: 0.97;
  --scale-choice: 0.985;
  --blur-icon: 2px;
  --blur-panel: 5px;
  --shift-tabs: 12px;

  /* Unified Non-Overlapping Z-Index Token Scale (ANIMATION.md §2) */
  --z-bg-media: 1;                  /* Hero media stage, stats & CTA photo bands */
  --z-bg-scrim: 2;                  /* Hero dark scrim, CTA field band, site footer */
  --z-card-overlay: 5;              /* Hero copy/cards, showcase captions & zoom badges */
  --z-floating-dock: 80;            /* Mobile left-side matcher trigger (below header) */
  --z-site-header: 90;              /* Sticky top navigation bar */
  --z-drawer-backdrop: 110;         /* Mobile matcher popup backdrop (above header) */
  --z-drawer-panel: 120;            /* Mobile matcher floating popup panel */
  --z-mobile-nav: 200;              /* Full-screen mobile navigation sheet */
  --z-lightbox: 1000;               /* GLightbox fullscreen media viewer */
}

/* Base Reset & Browser Surface Theming (impeccable + mobile-native) */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.55;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  accent-color: var(--field-navy);
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-size: var(--step-body);
  line-height: 1.55;
  overflow-x: hidden;
  overflow-x: clip;
  width: 100%;
}

::selection {
  background-color: var(--accent);
  color: var(--accent-ink);
}

/* Custom Scrollbar Theming */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--surface);
}
::-webkit-scrollbar-thumb {
  background: var(--field-navy);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--ink);
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0px;
}

/* Typography Rules & Two-Line Headline Guarantee */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
  hyphens: none;
  text-wrap: balance;
  font-kerning: normal;
}

h1 {
  font-size: var(--step-display);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

h2 {
  font-size: var(--step-head);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

h3 {
  font-size: var(--step-title);
  line-height: 1.14;
  letter-spacing: -0.01em;
  font-weight: 600;
}

p {
  margin: 0;
  max-width: 65ch;
  text-wrap: pretty;
}

p + p {
  margin-top: 0.9em;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.08em;
  transition: color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--field-navy);
  outline-offset: 3px;
}

.field-navy a:focus-visible,
.field-ink a:focus-visible,
.hero-viewport a:focus-visible,
.field-navy button:focus-visible,
.field-ink button:focus-visible,
.hero-viewport button:focus-visible {
  outline-color: var(--accent);
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.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;
}

/* ==========================================================================
   BACKGROUND FIELDS FOR H1 & H2 (Normative Matrix from DESIGN.md)
   ========================================================================== */

/* Field 1 for h2: Architectural Alabaster Ground (--bg: #F6F5F0) */
.field-paper {
  background-color: var(--bg);
  color: var(--ink);
}
.field-paper h2,
.field-paper h3 {
  color: var(--ink);
}
.field-paper .text-secondary {
  color: var(--muted);
}

/* Field 2 for h2: Warm Stone Surface (--surface: #EAE7DF) */
.field-stone {
  background-color: var(--surface);
  color: var(--ink);
}
.field-stone h2 {
  color: var(--field-navy);
}
.field-stone h3 {
  color: var(--ink);
}
.field-stone .text-secondary {
  color: var(--muted);
}

/* Field 3 for h1/h2: Sovereign HUBA Navy Solid Block (--field-navy: #003D82) */
.field-navy {
  background-color: var(--field-navy);
  color: var(--bg);
}
.field-navy h1,
.field-navy h2,
.field-navy h3 {
  color: var(--bg);
}
.field-navy .text-secondary {
  color: rgba(246, 245, 240, 0.84);
}

/* Field 4 for h2: Deep Institutional Ink Solid Block (--field-ink: #0A1628) */
.field-ink {
  background-color: var(--field-ink);
  color: var(--bg);
}
.field-ink h2,
.field-ink h3 {
  color: var(--accent);
}
.field-ink .text-secondary {
  color: rgba(246, 245, 240, 0.82);
}

/* ==========================================================================
   BUTTON SYSTEM & HOVER POLARITY SWAP (DESIGN.md Normative Specs)
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 14px 28px;
  font-family: var(--font-text);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 0;
  border-radius: 0px;
  cursor: pointer;
  white-space: nowrap;
  transform: translateY(0) scale(1);
  transition:
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-press) var(--ease-out);
}

/* 1. Primary Button: Navy (#003D82) -> Hover: Signal Gold (#F5EB00) + Ink (#0A1628) */
.btn-primary {
  background-color: var(--field-navy);
  color: var(--bg);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--accent);
  color: var(--ink);
}

/* 2. Accent CTA Button: Signal Gold (#F5EB00) -> Hover: Alabaster (#F6F5F0) + Navy (#003D82) */
.btn-accent {
  background-color: var(--accent);
  color: var(--ink);
}
.btn-accent:hover,
.btn-accent:focus-visible {
  background-color: var(--bg);
  color: var(--field-navy);
}

/* 3. Secondary / Filter Button: Stone (#EAE7DF) -> Hover/Active: Ink (#0A1628) + Gold (#F5EB00) */
.btn-secondary {
  background-color: var(--surface);
  color: var(--ink);
}
.btn-secondary:hover,
.btn-secondary:focus-visible,
.btn-secondary.is-active {
  background-color: var(--ink);
  color: var(--accent);
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover,
  .btn-accent:hover,
  .btn-secondary:hover {
    transform: translateY(-2px);
  }
}

.btn:active,
.btn-primary:active,
.btn-accent:active,
.btn-secondary:active {
  transform: translateY(0) scale(0.97);
}

/* ==========================================================================
   THE FRAME & 12-COLUMN EDITORIAL GRID (taste-skill layout.md §2 & §5)
   ========================================================================== */

.wrap {
  width: 100%;
  padding-inline: var(--margin);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}

/* ==========================================================================
   HERO VIEWPORT - "View with two cards in the corner" (direction.json §6)
   ========================================================================== */

.hero-viewport {
  position: relative;
  width: 100%;
  min-height: 100svh;
  padding-top: 96px;
  background-color: var(--ink);
  color: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

/* Slow Crossfade Background Stage */
.hero-media-stage {
  position: absolute;
  inset: 0;
  z-index: var(--z-bg-media);
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 65% center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1600ms var(--ease-out), transform 6000ms linear;
  transform: scale(1.02);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

/* Neutral Scrim protecting Left Half (Columns 1-6) per Hero Blueprint */
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: var(--z-bg-scrim);
  background-color: rgba(10, 22, 40, 0.58);
  pointer-events: none;
}

/* Top Navigation Bar - Fixed header that follows scroll with favlogo badge */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-site-header);
  width: 100%;
  padding-inline: max(var(--margin), env(safe-area-inset-left, 0px)) max(var(--margin), env(safe-area-inset-right, 0px));
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
  padding-bottom: 16px;
  background-color: rgba(10, 22, 40, 0.86);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition:
    background-color 260ms var(--ease-out),
    padding-block 260ms var(--ease-out);
}

.site-header.is-scrolled {
  background-color: var(--ink);
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  padding-bottom: 10px;
}

.brand-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--bg);
}

.brand-wordmark img {
  width: 44px;
  height: auto;
  flex-shrink: 0;
  padding: 4px;
  background-color: var(--bg);
  transition:
    transform 260ms var(--ease-out),
    background-color 260ms var(--ease-out);
}

.site-header.is-scrolled .brand-wordmark img {
  background-color: var(--accent);
  transform: scale(0.95);
}

.brand-wordmark-text {
  font-family: var(--font-display);
  font-size: var(--step-lead);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--bg);
}

.brand-wordmark-sub {
  display: block;
  font-family: var(--font-text);
  font-size: var(--step-small);
  font-weight: 500;
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav-links a {
  font-size: var(--step-small);
  font-weight: 500;
  color: var(--bg);
  text-decoration: none;
  padding-block: 6px;
}

.site-nav-links a:hover {
  color: var(--accent);
}

.mobile-menu-toggle {
  display: none;
  background: var(--field-navy);
  color: var(--bg);
  border: 0;
  padding: 12px 18px;
  font-family: var(--font-text);
  font-size: var(--step-small);
  font-weight: 600;
  cursor: pointer;
}

.mobile-menu-toggle:hover {
  background: var(--accent);
  color: var(--ink);
}

/* Mobile Full-Screen Sheet */
.mobile-nav-sheet {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-mobile-nav);
  background-color: var(--ink);
  color: var(--bg);
  padding: calc(var(--margin) + env(safe-area-inset-top, 0px)) var(--margin) calc(var(--margin) + env(safe-area-inset-bottom, 0px));
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mobile-nav-sheet.is-open {
  display: flex;
}

.mobile-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mobile-nav-list a {
  font-family: var(--font-display);
  font-size: var(--step-head);
  font-weight: 700;
  color: var(--bg);
  text-decoration: none;
}

.mobile-nav-list a:hover {
  color: var(--accent);
}

/* Hero Main Body Grid */
.hero-body {
  position: relative;
  z-index: var(--z-card-overlay);
  width: 100%;
  padding-inline: var(--margin);
  padding-block: 36px 32px;
  flex: 1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: end;
  pointer-events: none;
}

/* Left Copy Block on Dark Scrim Backing (Field 1 for h1) */
.hero-copy-block {
  grid-column: 1 / 7;
  align-self: center;
  background-color: var(--field-hero-scrim);
  padding: clamp(24px, 3vw, 40px);
  pointer-events: auto;
}

.hero-copy-block h1 {
  color: var(--bg);
  margin-bottom: 20px;
  max-width: 16ch;
}

.hero-lead {
  font-size: var(--step-body);
  line-height: 1.5;
  color: var(--bg);
  max-width: 42ch;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

.hero-text-link {
  font-size: var(--step-small);
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.hero-text-link:hover {
  color: var(--bg);
}

/* Right Half: Subject Pin + Two Corner Cards (direction.json §6) */
.hero-right-zone {
  grid-column: 7 / 13;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  height: 100%;
  gap: 32px;
}

.hero-pin-fact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--field-hero-scrim);
  color: var(--bg);
  padding: 10px 16px;
  font-size: var(--step-small);
  font-weight: 500;
  margin-top: 24px;
  pointer-events: auto;
}

.hero-pin-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent);
  flex-shrink: 0;
}

.hero-corner-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(210px, 240px));
  pointer-events: auto;
  gap: 16px;
  margin-top: auto;
}

.hero-corner-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background-color: var(--bg);
  color: var(--ink);
  transform: translateY(0) scale(1);
  transition: transform var(--dur-fast) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .hero-corner-card:hover {
    transform: translateY(-4px);
  }
}

.hero-corner-card:active {
  transform: translateY(0) scale(0.97);
  transition-duration: var(--dur-press);
}

.hero-corner-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.hero-corner-bar {
  min-height: 44px;
  padding: 10px 14px;
  background-color: var(--bg);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--step-small);
  font-weight: 600;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.hero-corner-card:hover .hero-corner-bar {
  background-color: var(--accent);
  color: var(--ink);
}

/* ==========================================================================
   SECTION 1: INTRO - "Lead line over four columns" (direction.json §7.1)
   Background Field: Architectural Alabaster (--bg: #F6F5F0)
   ========================================================================== */

.section-intro {
  padding-block: clamp(88px, 8vw, 128px);
}

.intro-header-row {
  margin-bottom: 40px;
}

.intro-lead-statement {
  grid-column: 1 / 13;
  font-size: var(--step-lead);
  font-weight: 500;
  line-height: 1.32;
  color: var(--ink);
  max-width: 58ch;
  margin-top: 24px;
}

.intro-four-cols {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 32px;
  align-items: start;
}

.intro-col {
  grid-column: span 3;
  font-size: var(--step-body);
  line-height: 1.55;
  color: var(--muted);
}

.intro-col strong {
  color: var(--ink);
  font-weight: 700;
}

/* ==========================================================================
   SECTION 2: FEATURES & LIVE INTERACTIVE MATCHER (direction.json §7.2 + Step 4)
   Background Field: Warm Stone Surface (--surface: #EAE7DF)
   ========================================================================== */

.section-pillars {
  padding-block: var(--section-space);
}

.pillars-top-grid {
  align-items: end;
  margin-bottom: 48px;
}

.pillars-title-col {
  grid-column: 1 / 6;
}

.pillars-summary-col {
  grid-column: 6 / 13;
}

/* Paragraph with enlarged inline picture slots (click to open Lightbox) */
.picture-words-statement {
  font-size: var(--step-lead);
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink);
  max-width: 56ch;
}

.inline-photo-slot {
  position: relative;
  display: inline-block;
  width: clamp(96px, 8.5vw, 136px);
  height: clamp(56px, 5vw, 78px);
  vertical-align: middle;
  margin-inline: 8px;
  margin-block: 4px;
  overflow: hidden;
  background-color: var(--field-navy);
  padding: 3px;
  cursor: zoom-in;
  transition: background-color 220ms var(--ease-out);
}

.inline-photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (hover: hover) and (pointer: fine) {
  .inline-photo-slot:hover {
    background-color: var(--accent);
  }
}

/* Live Interactive Tool: SIYB Trade & Support Matcher */
.matcher-console {
  position: relative;
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 24px;
  align-items: stretch;
}

.matcher-left-dock-btn,
.matcher-drawer-backdrop,
.matcher-drawer-mobile-bar,
.matcher-controls-spacer {
  display: none;
}

.matcher-controls-panel {
  grid-column: 1 / 7;
  background-color: var(--bg);
  padding: clamp(24px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.matcher-group-label {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-body);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}

.matcher-option-grid,
.matcher-chip-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.matcher-chip {
  min-height: 48px;
  padding: 12px 16px;
  background-color: var(--surface);
  color: var(--ink);
  border: 0;
  font-family: var(--font-text);
  font-size: var(--step-small);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transform: translateY(0) scale(1);
  transition:
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-press) var(--ease-out);
}

.matcher-chip:hover {
  background-color: var(--field-navy);
  color: var(--bg);
}

@media (hover: hover) and (pointer: fine) {
  .matcher-chip:hover {
    transform: translateY(-2px);
  }
}

.matcher-chip:active {
  transform: translateY(0) scale(0.97);
}

.matcher-chip[aria-pressed="true"] {
  background-color: var(--ink);
  color: var(--accent);
}

.matcher-result-panel {
  grid-column: 7 / 13;
  min-width: 0;
  background-color: var(--field-navy);
  color: var(--bg);
  padding: clamp(24px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  opacity: 1;
  filter: blur(0px);
  transform: translate3d(0, 0, 0);
  transition:
    opacity 260ms var(--ease-enter),
    filter 260ms var(--ease-enter),
    transform 260ms var(--ease-enter);
}

[data-pillar-summary] {
  opacity: 1;
  filter: blur(0px);
  transform: translate3d(0, 0, 0);
  transition:
    opacity 260ms var(--ease-enter),
    filter 260ms var(--ease-enter),
    transform 260ms var(--ease-enter);
}

/* Animate UI: transition.panelOut (130ms ease-leave, blur.panel 5px, shift.tabs 12px) */
.matcher-result-panel.is-panel-leaving,
[data-pillar-summary].is-panel-leaving,
.matcher-result-panel.is-swapping,
[data-pillar-summary].is-swapping {
  opacity: 0;
  filter: blur(var(--blur-panel));
  transform: translate3d(calc(var(--panel-dir, 1) * -1 * var(--shift-tabs)), 0, 0);
  transition:
    opacity 130ms var(--ease-leave),
    filter 130ms var(--ease-leave),
    transform 130ms var(--ease-leave);
}

/* Animate UI: instant prep position on opposite side before transition.panelIn (260ms ease-enter) */
.matcher-result-panel.is-panel-entering-prep,
[data-pillar-summary].is-panel-entering-prep {
  opacity: 0;
  filter: blur(var(--blur-panel));
  transform: translate3d(calc(var(--panel-dir, 1) * var(--shift-tabs)), 0, 0);
  transition: none;
}

.matcher-result-panel h3 {
  color: var(--accent);
  margin-bottom: 12px;
}

.matcher-result-desc {
  color: var(--bg);
  font-size: var(--step-body);
  line-height: 1.55;
}

.matcher-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  background-color: var(--field-navy-deep);
  padding: 20px;
}

.matcher-meta-item strong {
  display: block;
  font-size: var(--step-small);
  color: var(--accent);
  margin-bottom: 4px;
}

.matcher-meta-item span {
  font-size: var(--step-small);
  color: var(--bg);
}

.matcher-result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* ==========================================================================
   SECTION 3: SHOWCASE - "Band of unequal panels" (direction.json §7.3)
   Background Field: Architectural Alabaster (--bg: #F6F5F0)
   ========================================================================== */

.section-showcase {
  padding-top: var(--section-space);
  padding-bottom: clamp(64px, 6vw, 96px);
}

.showcase-header {
  margin-bottom: 48px;
}

.showcase-heading-col {
  grid-column: 3 / 8;
}

.showcase-note-col {
  grid-column: 8 / 13;
  align-self: end;
}

.showcase-band {
  width: 100%;
  height: 68svh;
  min-height: 440px;
  max-height: 720px;
  display: flex;
  flex-direction: row;
  gap: 8px;
  padding-inline: var(--margin);
  overflow: hidden;
}

.showcase-panel {
  position: relative;
  overflow: hidden;
  flex: 1.15 1 0%;
  filter: brightness(0.68);
  transition:
    flex 820ms var(--ease-out),
    filter 540ms var(--ease-out);
  margin: 0;
  cursor: zoom-in;
}

.showcase-panel.is-active {
  flex: 6 1 0%;
  filter: brightness(1);
}

.showcase-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.showcase-panel::after {
  content: "⤢ Bấm để phóng to ảnh";
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: var(--z-card-overlay);
  background-color: var(--ink);
  color: var(--accent);
  padding: 8px 14px;
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;
  transition: none;
}

.showcase-panel.is-active::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity 260ms var(--ease-out) 420ms,
    transform 260ms var(--ease-out) 420ms;
}

.showcase-panel-caption-box {
  position: absolute;
  top: 24px;
  left: 24px;
  right: auto;
  z-index: var(--z-card-overlay);
  width: max-content;
  max-width: min(320px, calc(100vw - 80px));
  background-color: var(--field-hero-scrim);
  color: var(--bg);
  padding: 14px 20px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  pointer-events: none;
  transition: none;
}

.showcase-panel.is-active .showcase-panel-caption-box {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity 280ms var(--ease-out) 420ms,
    transform 280ms var(--ease-out) 420ms;
}

.showcase-panel-caption-box p {
  font-family: var(--font-display);
  font-size: var(--step-lead);
  font-weight: 700;
  line-height: 1.15;
  color: var(--bg);
}

.showcase-footer-row {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.showcase-footer-caption {
  margin-top: 0;
  font-size: var(--step-body);
  color: var(--muted);
}

.showcase-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.showcase-step-btn {
  min-height: 40px;
  padding: 8px 16px;
  background-color: var(--surface);
  color: var(--ink);
  border: 0;
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 700;
  cursor: pointer;
  transform: translateY(0) scale(1);
  transition:
    background-color 220ms var(--ease-out),
    color 220ms var(--ease-out),
    transform var(--dur-press) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .showcase-step-btn:hover {
    background-color: var(--field-navy);
    color: var(--bg);
    transform: translateY(-2px);
  }
}

.showcase-step-btn:active {
  transform: translateY(0) scale(var(--scale-press));
}

.showcase-step-btn.is-active {
  background-color: var(--ink);
  color: var(--accent);
}

/* ==========================================================================
   SECTION 4: STATS - "Photograph with figure tiles" (direction.json §7.4)
   Background Field: Paper + Gutterless Mosaic (#003D82 & #B83224)
   ========================================================================== */

.section-stats {
  padding-top: clamp(48px, 6vw, 96px);
  padding-bottom: var(--section-space);
}

.stats-header {
  margin-bottom: 40px;
  align-items: end;
}

.stats-title-col {
  grid-column: 1 / 6;
}

.stats-desc-col {
  grid-column: 6 / 13;
}

.stats-mosaic {
  position: relative;
  z-index: var(--z-bg-media);
  width: 100%;
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  min-height: 520px;
  max-height: 720px;
  overflow: hidden;
}

.stats-photo-cell {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.stats-photo-cell img {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .stats-photo-cell:hover img {
    transform: scale(1.03);
  }
}

.stats-tiles-stack {
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  min-height: 0;
}

.stat-tile {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}

.stat-tile-navy {
  background-color: var(--field-navy);
  color: var(--bg);
}

.stat-tile-crimson {
  background-color: var(--field-crimson);
  color: var(--bg);
}

.stat-figure {
  font-family: var(--font-display);
  font-size: var(--step-stat);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-bottom: 12px;
}

.stat-tile-crimson .stat-figure {
  color: var(--bg);
}

.stat-caption {
  font-size: var(--step-body);
  font-weight: 500;
  line-height: 1.4;
  color: var(--bg);
  max-width: 28ch;
}

/* ==========================================================================
   SECTION 5: LIST - "Cards that fold into spines" (direction.json §7.5)
   Background Field: Sovereign HUBA Navy (--field-navy: #003D82)
   ========================================================================== */

.section-events {
  padding-block: var(--section-space);
}

.events-header {
  margin-bottom: 48px;
  align-items: end;
}

.events-title-col {
  grid-column: 1 / 6;
}

.events-lead-col {
  grid-column: 6 / 13;
}

/* Horizontal Spine Deck on Desktop */
.spine-deck {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 380px;
  gap: 0;
  width: 100%;
}

.spine-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px;
  transition: flex 520ms var(--ease-in-out), background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

/* Three neighbouring tones of institutional blue/ink */
.spine-card:nth-child(3n+1) { background-color: var(--field-navy-deep); color: var(--bg); }
.spine-card:nth-child(3n+2) { background-color: var(--field-navy-ink); color: var(--bg); }
.spine-card:nth-child(3n+3) { background-color: #163056; color: var(--bg); }

.spine-card.is-expanded {
  flex: 1 1 620px;
  cursor: default;
}

.spine-card:not(.is-expanded) {
  flex: 0 0 clamp(84px, 8.5vw, 120px);
  padding: 28px 14px;
}

.spine-card:not(.is-expanded):hover {
  background-color: var(--accent);
  color: var(--ink);
}

.spine-sliver-label {
  display: none;
  font-family: var(--font-display);
  font-size: var(--step-lead);
  font-weight: 700;
  line-height: 1.1;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 290px;
  opacity: 1;
  transition: opacity 220ms var(--ease-out);
}

.spine-card:not(.is-expanded) .spine-sliver-label {
  display: block;
}

.spine-card.is-moving .spine-sliver-label {
  opacity: 0;
  transition: none;
}

.spine-card:not(.is-expanded) .spine-full-content {
  display: none;
}

.spine-full-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
  min-width: 320px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: none;
}

.spine-card.is-expanded.is-content-visible .spine-full-content {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 240ms var(--ease-out);
}

.spine-card-top h3 {
  color: var(--bg);
  margin-bottom: 16px;
  max-width: 28ch;
}

.spine-card-excerpt {
  color: rgba(246, 245, 240, 0.88);
  font-size: var(--step-body);
  line-height: 1.55;
  max-width: 54ch;
}

.spine-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  font-size: var(--step-small);
}

.spine-date {
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.spine-link {
  color: var(--bg);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.spine-link:hover {
  color: var(--accent);
}

.events-footer-bar {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: var(--step-body);
}

/* ==========================================================================
   SECTION 6: ABOUT - "Portrait as drop cap" (direction.json §7.6)
   Background Field: Architectural Alabaster (--bg: #F6F5F0)
   ========================================================================== */

.section-about {
  padding-block: clamp(96px, 10vw, 140px);
}

.about-header {
  margin-bottom: 40px;
}

.about-title-col {
  grid-column: 3 / 13;
}

.about-facts-col {
  grid-column: 1 / 3;
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: var(--step-small);
  line-height: 1.45;
  color: var(--muted);
}

.about-facts-col strong {
  display: block;
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 4px;
}

.about-bio-col {
  grid-column: 3 / 13;
}

/* Statement size kept <= 32px desktop, <= 22px phone per copy.md §2 */
.about-dropcap-text {
  font-size: var(--step-lead);
  font-weight: 400;
  line-height: 1.32;
  color: var(--ink);
  max-width: 52ch;
}

.about-dropcap-portrait {
  float: left;
  width: 3.8em;
  height: 3.8em;
  object-fit: cover;
  margin-right: 0.65em;
  margin-bottom: 0.25em;
}

.about-dropcap-second {
  margin-top: 28px;
  font-size: var(--step-body);
  line-height: 1.5;
  color: var(--muted);
  max-width: 56ch;
}

.about-dropcap-second a {
  color: var(--field-navy);
  font-weight: 600;
  text-decoration: underline;
}

/* ==========================================================================
   SECTION 7: CTA & MEMBERSHIP - "Three photographs, then a field" (§7.7)
   ========================================================================== */

.section-cta-strip {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.cta-photo-row {
  position: relative;
  z-index: var(--z-bg-media);
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  height: 40svh;
  min-height: 260px;
  max-height: 420px;
  overflow: hidden;
}

.cta-photo-row img {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

.cta-field-band {
  position: relative;
  z-index: var(--z-bg-scrim);
  background-color: var(--field-navy);
  color: var(--bg);
  padding-block: clamp(64px, 7vw, 104px);
}

.cta-band-grid {
  align-items: end;
  row-gap: 40px;
}

.cta-statement-col {
  grid-column: 1 / 8;
  min-width: 0;
}

.cta-statement-col h2 {
  color: var(--bg);
  margin-bottom: 24px;
}

.cta-closing-statement {
  font-size: var(--step-lead);
  line-height: 1.35;
  color: var(--bg);
  max-width: 46ch;
  margin-bottom: 28px;
}

.cta-underline-action {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 4px;
  text-underline-offset: 6px;
}

.cta-underline-action:hover {
  background-color: var(--accent);
  color: var(--ink);
  text-decoration: none;
  padding-inline: 6px;
}

.cta-sub-notes {
  font-size: var(--step-body);
  color: rgba(246, 245, 240, 0.86);
  max-width: 52ch;
}

/* Membership Registration Form & Portrait on Right (Columns 8-12) */
.cta-form-col {
  grid-column: 8 / 13;
  min-width: 0;
  background-color: var(--field-navy-deep);
  padding: clamp(24px, 2.6vw, 36px);
}

.member-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.member-form-row,
.member-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.member-form-row label,
.member-form-field label {
  font-size: var(--step-small);
  font-weight: 600;
  color: var(--bg);
}

.member-form-row input,
.member-form-row select,
.member-form-row textarea,
.member-form-field input,
.member-form-field select,
.member-form-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  background-color: var(--bg);
  color: var(--ink);
  border: 0;
  border-radius: 0px;
  font-family: var(--font-text);
  font-size: var(--step-body);
}

.member-form-row textarea,
.member-form-field textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}

/* Hộp kiểm đồng ý xử lý dữ liệu cá nhân (Luật 91/2025/QH15 & NĐ 356/2025/NĐ-CP) */
.member-form-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background-color: rgba(10, 22, 40, 0.35);
}

.member-form-consent .consent-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  cursor: pointer;
}

.member-form-consent input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin-top: 2px;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.member-form-consent label,
.member-form-consent span {
  font-size: var(--step-small);
  line-height: 1.48;
  font-weight: 400;
  color: rgba(246, 245, 240, 0.92);
  cursor: pointer;
}

.member-form-consent a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Animate UI: Status Button Label Swap (blur.icon 2px, 150ms ease-out) */
.member-form button[type="submit"] {
  transition:
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-press) var(--ease-out),
    opacity 150ms var(--ease-out),
    filter 150ms var(--ease-out);
}

.member-form button[type="submit"].is-status-swapping {
  opacity: 0;
  filter: blur(var(--blur-icon));
  transform: translateY(4px) scale(0.985);
}

.form-status-msg {
  font-size: var(--step-small);
  font-weight: 600;
  color: var(--accent);
  min-height: 1.4em;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}

/* ==========================================================================
   SECTION 8: CONTACT - "Sentence, portrait, two links" (direction.json §7.8)
   Background Field: Architectural Alabaster (--bg: #F6F5F0)
   ========================================================================== */

.section-contact {
  padding-top: clamp(96px, 11vw, 150px);
  padding-bottom: clamp(80px, 9vw, 120px);
}

.contact-grid {
  align-items: start;
  row-gap: 32px;
}

.contact-sentence-col {
  grid-column: 1 / 6;
  min-width: 0;
}

.contact-sentence-col h2 {
  margin-bottom: 20px;
}

.contact-lead-copy {
  font-size: var(--step-lead);
  line-height: 1.32;
  color: var(--ink);
  max-width: 34ch;
}

.contact-portrait-col {
  grid-column: 7 / 9;
}

.contact-portrait-col img {
  width: 170px;
  height: 170px;
  object-fit: cover;
}

.contact-links-col {
  grid-column: 9 / 13;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-question {
  font-size: var(--step-body);
  font-weight: 600;
  color: var(--ink);
}

.contact-link-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-link-stack a {
  font-size: var(--step-body);
  font-weight: 600;
  color: var(--field-navy);
  text-decoration: underline;
  text-underline-offset: 5px;
  overflow-wrap: anywhere;
}

.contact-link-stack a:hover {
  color: var(--ink);
  background-color: var(--accent);
}

.contact-meta-line {
  font-size: var(--step-small);
  color: var(--muted);
  margin-top: 8px;
}

/* ==========================================================================
   SECTION 9: FOOTER - "Contact as the headline" (direction.json §7.9)
   Background Field: Deep Institutional Ink (--field-ink: #0A1628)
   ========================================================================== */

.site-footer {
  position: relative;
  z-index: var(--z-bg-scrim);
  width: 100%;
  overflow-x: hidden;
  min-height: auto;
  padding-top: 64px;
  padding-bottom: max(48px, calc(32px + env(safe-area-inset-bottom, 0px)));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 56px;
}

.footer-top-row {
  align-items: start;
  row-gap: 24px;
}

.footer-brand-col {
  grid-column: 1 / 5;
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand-col img {
  width: 44px;
  height: auto;
  flex-shrink: 0;
}

.footer-notes-col {
  grid-column: 5 / 11;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  font-size: var(--step-small);
  color: rgba(246, 245, 240, 0.84);
}

.footer-backtop-col {
  grid-column: 11 / 13;
  text-align: right;
  white-space: nowrap;
}

.footer-backtop-link {
  font-size: var(--step-small);
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.footer-backtop-link:hover {
  color: var(--bg);
}

.footer-lower-stage {
  display: flex;
  flex-direction: column;
  gap: 36px;
  max-width: 100%;
  min-width: 0;
}

.footer-giant-contact {
  font-family: var(--font-display);
  font-size: var(--step-footer-cta);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.03em;
  color: var(--accent);
  text-decoration: none;
  display: inline-block;
  align-self: flex-start;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.footer-giant-contact:hover {
  color: var(--bg);
}

.footer-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  font-size: var(--step-small);
  color: rgba(246, 245, 240, 0.78);
}

.footer-meta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-meta-credits {
  white-space: nowrap;
}

.footer-meta-copy {
  text-align: right;
  white-space: nowrap;
}

.footer-credit-signature {
  font-size: var(--step-small);
  color: rgba(246, 245, 240, 0.72);
  letter-spacing: 0.01em;
}

.footer-mbws-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: rgba(246, 245, 240, 0.85);
  text-decoration: none;
}

.footer-mbws-badge img {
  height: 38px;
  width: auto;
  display: block;
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.footer-credit-signature strong {
  color: var(--accent);
  font-weight: 700;
}

/* ==========================================================================
   SURFACE HOVER & MOBILE-NATIVE TOUCH ERGONOMICS (Entrance animations removed)
   ========================================================================== */

.btn,
button,
.matcher-chip,
.showcase-step-btn,
.spine-card,
.mobile-menu-toggle,
.matcher-left-dock-btn,
.inline-photo-slot,
.showcase-panel {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.hero-copy-block,
.pillars-title-col,
.pillars-summary-col,
.matcher-controls-panel,
.matcher-result-panel,
.subpage-title-col,
.editorial-split-left,
.editorial-split-right,
.event-report-content {
  min-width: 0;
}

.motion-item,
.intro-col,
.tonal-block-4,
.tonal-block-6,
.partner-tile,
.event-report-item,
.faq-item {
  opacity: 1;
  transform: none;
  transition:
    transform 220ms var(--ease-out),
    opacity 260ms var(--ease-out),
    filter 260ms var(--ease-out),
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.partner-tile:active,
.tonal-block-6[data-pillar-card]:active {
  transform: scale(var(--scale-choice));
  transition-duration: var(--dur-press);
}

/* Animate UI: Filter Grid Reflow & Reveal (su-kien.html) */
@keyframes filterCardReveal {
  0% {
    opacity: 0;
    transform: scale(0.96);
    filter: blur(var(--blur-icon));
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0px);
  }
}

.event-report-item.is-filtering-in {
  animation: filterCardReveal 260ms var(--ease-out) both;
}

/* Reduced Motion: remove spatial movement, preserve opacity & color transitions (STANDARDS.md) */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .motion-item,
  .btn,
  .matcher-chip,
  .hero-corner-card,
  .showcase-panel img,
  .tonal-block-4,
  .tonal-block-6,
  .partner-tile,
  .event-report-item,
  .faq-item {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

/* ==========================================================================
   TABLET & MOBILE COMPOSITIONS (768px & 390px - layout.md §9)
   ========================================================================== */

@media (max-width: 1024px) {
  .site-nav-links {
    display: none;
  }
  .mobile-menu-toggle {
    display: inline-flex;
  }
  .hero-copy-block {
    grid-column: 1 / 13;
  }
  .hero-right-zone {
    grid-column: 1 / 13;
    align-items: flex-start;
  }
  .hero-corner-cards {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .intro-col {
    grid-column: span 6;
  }
  .pillars-title-col,
  .pillars-summary-col,
  .matcher-controls-panel,
  .matcher-result-panel,
  .showcase-heading-col,
  .showcase-note-col,
  .stats-title-col,
  .stats-desc-col,
  .events-title-col,
  .events-lead-col,
  .about-title-col,
  .about-facts-col,
  .about-bio-col,
  .cta-statement-col,
  .cta-form-col,
  .contact-sentence-col,
  .contact-portrait-col,
  .contact-links-col {
    grid-column: 1 / 13;
  }

  /* Mobile Left-Side Dock Icon & Reverse Entrance Disappear when scrolled to .matcher-result-panel */
  .matcher-console.is-drawer-open .matcher-controls-spacer {
    display: block;
    grid-column: 1 / 13;
  }

  .matcher-left-dock-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: fixed;
    left: 0;
    top: 50%;
    z-index: var(--z-floating-dock);
    padding: 14px 10px;
    padding-left: max(10px, env(safe-area-inset-left, 10px));
    background-color: var(--accent);
    color: var(--ink);
    border: 0;
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transform: translate3d(-110%, -50%, 0);
    opacity: 0;
    pointer-events: none;
    transition:
      transform 360ms var(--ease-drawer),
      opacity 240ms var(--ease-out),
      background-color 200ms var(--ease-out),
      color 200ms var(--ease-out);
  }

  .matcher-left-dock-btn:hover,
  .matcher-left-dock-btn:active {
    background-color: var(--field-navy);
    color: var(--bg);
  }

  .matcher-console.is-mobile-docked .matcher-left-dock-btn {
    transform: translate3d(0, -50%, 0);
    opacity: 1;
    pointer-events: auto;
  }

  .matcher-console.is-drawer-open .matcher-left-dock-btn {
    transform: translate3d(-110%, -50%, 0);
    opacity: 0;
    pointer-events: none;
  }

  /* In-flow .matcher-controls-panel: disappears with exact reverse of entrance animation on scroll down, reappears on scroll up */
  .matcher-console .matcher-controls-panel {
    transition:
      transform 560ms var(--ease-out),
      opacity 560ms var(--ease-out);
  }

  .matcher-console.is-mobile-docked:not(.is-drawer-open) .matcher-controls-panel {
    opacity: 0 !important;
    transform: translateY(44px) scale(0.95) !important;
    pointer-events: none;
  }

  .matcher-console.is-mobile-docked .matcher-drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: var(--z-drawer-backdrop);
    background-color: rgba(10, 22, 40, 0.72);
    opacity: 0;
    pointer-events: none;
    transition: opacity 280ms var(--ease-out);
  }

  .matcher-console.is-mobile-docked.is-drawer-open .matcher-drawer-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  /* Compact floating popup when user taps the left-side icon button (never stretches full-screen) */
  .matcher-console.is-mobile-docked.is-drawer-open .matcher-controls-panel {
    position: fixed;
    top: 50%;
    left: max(14px, env(safe-area-inset-left, 14px));
    bottom: auto;
    height: auto;
    max-height: calc(100svh - 108px);
    width: min(350px, calc(100vw - 28px));
    z-index: var(--z-drawer-panel);
    overflow-y: auto;
    overscroll-behavior: contain;
    justify-content: flex-start;
    padding: 20px 18px 24px;
    background-color: var(--bg);
    opacity: 1 !important;
    transform: translate3d(0, -50%, 0) scale(1) !important;
    pointer-events: auto;
  }

  .matcher-console.is-mobile-docked.is-drawer-open .matcher-drawer-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background-color: var(--surface);
  }

  .matcher-drawer-mobile-bar strong {
    font-family: var(--font-display);
    font-size: var(--step-small);
    color: var(--ink);
  }

  .matcher-drawer-close {
    background-color: var(--ink);
    color: var(--accent);
    border: 0;
    padding: 8px 14px;
    font-family: var(--font-text);
    font-size: var(--step-small);
    font-weight: 700;
    cursor: pointer;
  }

  .about-facts-col {
    flex-direction: row;
    flex-wrap: wrap;
    margin-bottom: 24px;
  }
  .about-facts-col > div {
    flex: 1 1 180px;
  }
  /* Spine Cards stack on Tablet/Phone per direction.json §7.5 */
  .spine-deck {
    flex-direction: column;
    gap: 12px;
  }
  .spine-card,
  .spine-card.is-expanded,
  .spine-card:not(.is-expanded) {
    flex: 1 1 auto;
    padding: 24px;
  }
  .spine-card:not(.is-expanded) .spine-sliver-label {
    display: none;
  }
  .spine-full-content,
  .spine-card:not(.is-expanded) .spine-full-content {
    display: flex;
    min-width: 0;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

@media (max-width: 640px) {
  .hero-viewport {
    padding-top: 76px;
  }

  .site-header {
    padding-block: 10px;
    gap: 10px;
  }

  .brand-wordmark img {
    width: 38px;
    padding: 3px;
  }

  .brand-wordmark-sub {
    display: none;
  }

  .site-nav > .btn-accent {
    display: none;
  }

  .hero-body {
    padding-block: 20px 24px;
    row-gap: 20px;
  }

  .hero-copy-block {
    padding: 20px;
  }

  .hero-pin-fact {
    display: none;
  }

  .hero-corner-cards {
    gap: 12px;
  }

  .intro-col {
    grid-column: 1 / 13;
  }

  .matcher-option-grid,
  .matcher-meta-grid {
    grid-template-columns: 1fr;
  }

  /* Showcase vertical expanding stack on phone so active panel always has 100% width and text never crushes */
  .showcase-band {
    display: flex;
    flex-direction: column;
    height: 76svh;
    min-height: 480px;
    max-height: 680px;
    gap: 8px;
  }
  .showcase-panel {
    width: 100%;
    flex: 1 1 0%;
  }
  .showcase-panel.is-active {
    flex: 4.2 1 0%;
  }
  .showcase-panel-caption-box {
    top: 14px;
    left: 14px;
    right: auto;
    width: max-content;
    max-width: calc(100% - 28px);
    padding: 10px 14px;
  }
  .showcase-panel-caption-box p {
    font-size: clamp(1rem, 4.2vw, 1.2rem);
  }
  .showcase-panel::after {
    bottom: 12px;
    right: 12px;
    padding: 6px 12px;
    font-size: 0.8125rem;
  }

  /* Stats Mosaic on phone: Photo 4:3 on top, two 50vw squares below (§7.4) */
  .stats-mosaic {
    grid-template-columns: 1fr;
    max-height: none;
  }
  .stats-photo-cell {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }
  .stats-tiles-stack {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .stat-tile {
    padding: 20px 16px;
    min-height: 48vw;
  }

  /* About portrait drop-cap on phone (§7.6) */
  .about-dropcap-portrait {
    width: 104px;
    height: 104px;
  }

  /* CTA Strip on phone: first photo full width, next two half width (§7.7) */
  .cta-photo-row {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1.2fr 1fr;
    height: auto;
  }
  .cta-photo-row img:first-child {
    grid-column: 1 / 3;
    aspect-ratio: 16 / 9;
  }
  .cta-photo-row img:nth-child(2),
  .cta-photo-row img:nth-child(3) {
    aspect-ratio: 4 / 3;
  }

  /* Contact row on phone (§7.8) */
  .contact-portrait-col img {
    width: 96px;
    height: 96px;
  }

  /* Footer on phone (§7.9) */
  .footer-brand-col,
  .footer-notes-col,
  .footer-backtop-col,
  .footer-meta-links,
  .footer-meta-credits,
  .footer-meta-copy {
    grid-column: 1 / 13;
    text-align: left;
    white-space: normal;
  }
  .footer-notes-col {
    grid-template-columns: 1fr;
  }
}

/* Foldable Phone — Unfolded Inner Display & iPad Mini (641px – 900px) */
@media (min-width: 641px) and (max-width: 900px) {
  .showcase-band {
    height: 58svh;
    min-height: 400px;
    max-height: 560px;
  }
  .stats-mosaic {
    grid-template-columns: 1.35fr 1fr;
    min-height: 440px;
  }
  .matcher-option-grid,
  .matcher-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Foldable Phone — Folded Cover Screen (280px – 359px, e.g. Galaxy Z Fold Cover) */
@media (max-width: 359px) {
  :root {
    --margin: 12px;
    --step-h1: clamp(1.65rem, 7.5vw, 2.1rem);
    --step-h2: clamp(1.45rem, 6.8vw, 1.85rem);
    --step-footer-cta: clamp(1.15rem, 6vw, 1.5rem);
  }
  .hero-corner-cards,
  .stats-tiles-stack,
  .cta-photo-row {
    grid-template-columns: 1fr;
  }
  .cta-photo-row img:first-child {
    grid-column: 1 / 2;
  }
  .stat-tile {
    min-height: auto;
  }
}

/* ==========================================================================
   SUBPAGE MASTHEADS & MULTI-PAGE EDITORIAL MODULES (SITEMAP.md)
   ========================================================================== */

/* Solid Navy Banner Masthead (Field 2 for h1: gioi-thieu.html, hoi-vien.html, lien-he.html) */
.subpage-masthead {
  background-color: var(--field-navy);
  color: var(--bg);
  padding-top: 88px;
  padding-bottom: clamp(56px, 6vw, 96px);
}

.subpage-masthead-grid {
  padding-top: clamp(32px, 4vw, 56px);
  align-items: end;
  row-gap: 32px;
}

.subpage-title-col {
  grid-column: 1 / 7;
}

.subpage-title-col h1 {
  color: var(--bg);
  margin-bottom: 20px;
}

.subpage-lead {
  font-size: var(--step-body);
  line-height: 1.5;
  color: rgba(246, 245, 240, 0.9);
  max-width: 46ch;
}

.subpage-media-col {
  grid-column: 7 / 13;
}

.subpage-media-col img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* Active link state in top navigation */
.site-nav-links a[aria-current="page"] {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

/* Editorial Split Section (Left 5 cols + Right 7 cols on 42% Axis) */
.editorial-section {
  padding-block: var(--section-space);
}

.editorial-split-left {
  grid-column: 1 / 6;
}

.editorial-split-right {
  grid-column: 6 / 13;
}

/* Tonal Feature Blocks (No borders, separated by surface tone) */
.tonal-blocks-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
  margin-top: 48px;
}

.tonal-block-4 {
  grid-column: span 4;
  background-color: var(--surface);
  color: var(--ink);
  padding: clamp(24px, 2.5vw, 36px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.field-stone .tonal-block-4,
.field-stone .tonal-block-6 {
  background-color: var(--bg);
}

.field-navy .tonal-block-4,
.field-navy .tonal-block-6 {
  background-color: var(--field-navy-deep);
  color: var(--bg);
}

.tonal-block-6 {
  grid-column: span 6;
  background-color: var(--surface);
  color: var(--ink);
  padding: clamp(24px, 2.8vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

/* Event Archive Filter & Editorial Report Entries (su-kien.html) */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  margin-bottom: 48px;
}

.event-report-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.event-report-item {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 24px;
  background-color: var(--surface);
  padding: clamp(24px, 3vw, 40px);
  align-items: center;
}

.field-stone .event-report-item {
  background-color: var(--bg);
}

.event-report-media {
  grid-column: 1 / 6;
  overflow: hidden;
}

.event-report-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 460ms var(--ease-out);
}

.event-report-content {
  grid-column: 6 / 13;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.event-report-meta {
  font-size: var(--step-small);
  font-weight: 600;
  color: var(--field-navy);
  font-variant-numeric: tabular-nums;
}

/* Partner Matrix Grid (hoi-vien.html) */
.partner-matrix {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  margin-top: 48px;
}

.partner-tile {
  grid-column: span 3;
  background-color: var(--surface);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.field-stone .partner-tile {
  background-color: var(--bg);
}

.partner-tile strong {
  font-family: var(--font-display);
  font-size: var(--step-lead);
  color: var(--field-navy);
  transition: color var(--dur-fast) var(--ease-out);
}

.partner-tile span {
  font-size: var(--step-small);
  color: var(--muted);
  transition: color var(--dur-fast) var(--ease-out);
}

/* FAQ Editorial List (lien-he.html) */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.faq-item {
  background-color: var(--surface);
  padding: 28px 32px;
}

.faq-item h3 {
  margin-bottom: 12px;
  color: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .intro-col:hover,
  .tonal-block-4:hover,
  .tonal-block-6:hover,
  .faq-item:hover {
    transform: translateY(-5px);
  }

  .partner-tile:hover {
    transform: translateY(-5px);
    background-color: var(--field-navy);
    color: var(--bg);
  }

  .partner-tile:hover strong {
    color: var(--accent);
  }

  .partner-tile:hover span {
    color: rgba(246, 245, 240, 0.88);
  }

  .event-report-item:hover {
    transform: translateY(-4px);
  }

  .event-report-item:hover .event-report-media img {
    transform: scale(1.04);
  }
}

@media (max-width: 1024px) {
  .subpage-title-col,
  .subpage-media-col,
  .editorial-split-left,
  .editorial-split-right,
  .event-report-media,
  .event-report-content {
    grid-column: 1 / 13;
  }
  .tonal-block-4,
  .tonal-block-6,
  .partner-tile {
    grid-column: span 6;
  }
}

@media (max-width: 640px) {
  .tonal-block-4,
  .tonal-block-6,
  .partner-tile {
    grid-column: 1 / 13;
  }
}

/* ==========================================================================
   FANCYBOX V5 CUSTOM SIYB THEME (Theo tài liệu chính thức @fancyapps/ui v5)
   Custom toàn bộ nút điều hướng (<, >), thanh công cụ (Zoom In, Zoom Out,
   1:1, Slideshow, Fullscreen, Thumbs, Close X), bộ đếm, caption và thumbnail
   ========================================================================== */

[data-fancybox],
[data-lightbox-ready] {
  cursor: zoom-in;
}

.fancybox__container {
  --fancybox-zIndex: var(--z-lightbox);
  --fancybox-bg: rgba(10, 22, 40, 0.95);
  --fancybox-color: var(--bg);
  --fancybox-hover-color: var(--ink);
  --f-spinner-color-1: rgba(246, 245, 240, 0.2);
  --f-spinner-color-2: var(--accent);
  z-index: var(--z-lightbox) !important;
  font-family: var(--font-text);
}

/* Custom Thanh Công Cụ (Toolbar) & Nút Điều Hướng (<, >) bằng biến CSS chính thức */
.fancybox__toolbar,
.fancybox__nav {
  --f-button-width: 46px;
  --f-button-height: 46px;
  --f-button-border: 0;
  --f-button-border-radius: 0px;
  --f-button-color: var(--bg);
  --f-button-hover-color: var(--ink);
  --f-button-bg: var(--field-navy);
  --f-button-hover-bg: var(--accent);
  --f-button-active-bg: var(--accent-warm);
  --f-button-shadow: none;
  --f-button-svg-width: 21px;
  --f-button-svg-height: 21px;
  --f-button-svg-stroke-width: 2;
  --f-button-svg-filter: none;
  --f-button-svg-disabled-opacity: 0.38;
  --f-button-next-pos: 20px;
  --f-button-prev-pos: 20px;
  --f-progress-color: var(--accent);
  text-shadow: none; /* taste-skill-ignore */
}

.fancybox__toolbar {
  padding: 14px 20px;
}

.fancybox__toolbar__column {
  gap: 4px;
}

/* Phản hồi xúc giác khi nhấn nút trong Popup (scale 0.95) */
.fancybox__toolbar .f-button,
.fancybox__nav .f-button {
  transition:
    background-color 160ms var(--ease-out),
    color 160ms var(--ease-out),
    transform 120ms var(--ease-out);
}

.fancybox__toolbar .f-button:active:not([disabled]),
.fancybox__nav .f-button:active:not([disabled]) {
  transform: scale(0.95);
}

.fancybox__nav .f-button.is-prev:active:not([disabled]),
.fancybox__nav .f-button.is-next:active:not([disabled]) {
  transform: translateY(-50%) scale(0.95);
}

/* Nút Đóng (Close X) nổi bật ở góc phải trên cùng */
.fancybox__toolbar [data-fancybox-close] {
  --f-button-bg: var(--accent-crimson);
  --f-button-color: var(--bg);
  --f-button-hover-bg: var(--accent);
  --f-button-hover-color: var(--ink);
}

/* Bộ đếm số thứ tự ảnh (Infobar 1 / N) góc trái trên */
.fancybox__infobar {
  height: 46px;
  line-height: 46px;
  padding: 0 16px;
  background-color: var(--field-navy-deep);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  pointer-events: auto;
}

/* Khung chú thích ảnh (Caption) chuẩn biên tập SIYB */
.fancybox__footer {
  background: transparent;
}

.fancybox__footer .fancybox__caption {
  max-width: 880px;
  margin: 0 auto 10px;
  padding: 14px 22px;
  background-color: var(--field-navy-deep);
  color: var(--bg);
  text-align: left;
}

.fancybox-caption-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.fancybox-caption-desc {
  display: block;
  font-family: var(--font-text);
  font-size: 0.94rem;
  line-height: 1.45;
  color: var(--bg);
}

/* Dải ảnh thu nhỏ (Thumbnails) vuông vức 0px radius, viền chọn Vàng Tín Hiệu */
.fancybox__thumbs {
  --f-thumb-width: 88px;
  --f-thumb-height: 62px;
  --f-thumb-border-radius: 0px;
  --f-thumb-outline: 3px;
  --f-thumb-outline-color: var(--accent);
  --f-thumb-gap: 6px;
  background-color: rgba(10, 22, 40, 0.9);
  padding-top: 6px;
  padding-bottom: 10px;
}

@media (max-width: 640px) {
  .fancybox__toolbar {
    padding: 8px 10px;
  }

  .fancybox__toolbar,
  .fancybox__nav {
    --f-button-width: 42px;
    --f-button-height: 42px;
    --f-button-next-pos: 10px;
    --f-button-prev-pos: 10px;
  }

  .fancybox__infobar {
    height: 42px;
    line-height: 42px;
    padding: 0 12px;
    font-size: 0.85rem;
  }

  .fancybox__footer .fancybox__caption {
    margin: 0 10px 6px;
    padding: 12px 14px;
  }
}

/* ==========================================================================
   BESPOKE LEGAL CHARTER & PDPL DOSSIER LAYOUT (chinh-sach-bao-mat.html)
   Thiết kế độc bản kiểu Văn kiện Hiến chương Pháp lý trên nền Giấy Kiến Trúc
   (Loại nền 3 cho h1: #F6F5F0 chữ #0A1628 + Cột Mục lục Neo trái + Bảng SLA
   Thời hạn Pháp định + Trạm Thực hiện Quyền Chủ thể Dữ liệu)
   ========================================================================== */

.legal-charter-hero {
  padding-top: clamp(124px, 13vw, 168px);
  padding-bottom: clamp(56px, 6vw, 88px);
  background-color: var(--bg);
  color: var(--ink);
}

.legal-hero-grid {
  align-items: stretch;
  row-gap: 32px;
}

.legal-hero-main {
  grid-column: 1 / 8;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding-right: clamp(0px, 2vw, 28px);
}

.legal-doc-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 8px 14px;
  background-color: var(--field-navy);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 700;
}

.legal-hero-main h1 {
  color: var(--ink);
  margin: 0;
}

.legal-hero-lead {
  font-size: var(--step-lead);
  line-height: 1.42;
  color: var(--ink);
  max-width: 54ch;
}

.legal-hero-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.legal-highlight-chip {
  background-color: var(--surface);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legal-highlight-chip strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--field-navy);
}

.legal-highlight-chip span {
  font-size: var(--step-small);
  color: var(--muted);
  line-height: 1.35;
}

/* Khối Hồ sơ Pháp định (Dossier Stamp Ledger) bên phải Hero (Cột 8-12) */
.legal-dossier-stamp {
  grid-column: 8 / 13;
  background-color: var(--field-ink);
  color: var(--bg);
  padding: clamp(28px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.legal-dossier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  background-color: var(--field-navy-deep);
  padding: 16px 20px;
}

.legal-dossier-header strong {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--accent);
}

.legal-dossier-status {
  padding: 4px 10px;
  background-color: var(--accent);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 700;
}

.legal-dossier-rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.legal-dossier-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  background-color: rgba(246, 245, 240, 0.05);
}

.legal-dossier-row span {
  font-size: var(--step-small);
  color: rgba(246, 245, 240, 0.72);
}

.legal-dossier-row strong {
  font-size: 0.96rem;
  color: var(--bg);
  font-variant-numeric: tabular-nums;
}

.legal-dossier-row a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Băng thông số SLA Thời hạn Pháp định (Điều 5 NĐ 356/2025/NĐ-CP) */
.legal-sla-band {
  background-color: var(--field-navy);
  color: var(--bg);
  padding: clamp(44px, 5vw, 68px) 0;
}

.legal-sla-header {
  margin-bottom: 28px;
  align-items: end;
}

.legal-sla-title-col {
  grid-column: 1 / 6;
}

.legal-sla-title-col h2 {
  color: var(--bg);
}

.legal-sla-desc-col {
  grid-column: 6 / 13;
}

.legal-sla-desc-col p {
  color: rgba(246, 245, 240, 0.88);
  font-size: var(--step-body);
}

.legal-sla-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.legal-sla-card {
  background-color: var(--field-navy-deep);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.legal-sla-days {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.2vw, 2.85rem);
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.legal-sla-card h3 {
  color: var(--bg);
  font-size: 1.15rem;
  margin: 0;
}

.legal-sla-card p {
  font-size: var(--step-small);
  color: rgba(246, 245, 240, 0.85);
  line-height: 1.45;
}

.legal-sla-ref {
  display: inline-block;
  width: fit-content;
  padding: 4px 10px;
  background-color: rgba(246, 245, 240, 0.1);
  color: var(--accent);
  font-size: var(--step-small);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Không gian đọc Hiến chương 2 cột: Cột Mục lục Neo trái + Cột Văn bản Điều khoản */
.legal-workspace-section {
  padding: clamp(72px, 8vw, 120px) 0;
  background-color: var(--surface);
}

.legal-workspace-grid {
  align-items: start;
  row-gap: 36px;
}

.legal-index-rail {
  grid-column: 1 / 5;
  position: sticky;
  top: 108px;
  background-color: var(--bg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.legal-index-rail h2 {
  font-size: 1.45rem;
  color: var(--field-navy);
  margin: 0;
}

.legal-index-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legal-index-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background-color: var(--surface);
  color: var(--ink);
  font-size: var(--step-small);
  font-weight: 600;
  text-decoration: none;
  transition:
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-press) var(--ease-out);
}

.legal-index-link.is-active {
  background-color: var(--field-navy);
  color: var(--bg);
}

.legal-index-link:active {
  transform: scale(0.98);
}

.legal-index-cta-box {
  background-color: var(--field-ink);
  color: var(--bg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legal-index-cta-box p {
  font-size: var(--step-small);
  color: rgba(246, 245, 240, 0.88);
  line-height: 1.42;
}

/* Cột Luồng Điều Khoản Chi Tiết (Columns 5-12) */
.legal-clauses-stream {
  grid-column: 5 / 13;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Ma trận Kiểm toán Dữ liệu (Data Audit Matrix) */
.legal-audit-matrix {
  background-color: var(--bg);
  padding: clamp(24px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.legal-audit-matrix-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.legal-audit-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.legal-audit-cell {
  background-color: var(--surface);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legal-audit-cell-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.legal-audit-cell-top strong {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ink);
}

.legal-status-tag {
  padding: 3px 9px;
  background-color: var(--field-navy);
  color: var(--accent);
  font-size: var(--step-small);
  font-weight: 700;
}

.legal-audit-cell p {
  font-size: var(--step-small);
  color: var(--muted);
  line-height: 1.42;
}

/* Thẻ Điều Khoản Hiến Chương (Statutory Clause Card) */
.legal-clause-card {
  background-color: var(--bg);
  padding: clamp(26px, 3vw, 38px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-margin-top: 112px;
}

.legal-clause-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.legal-clause-pill {
  padding: 5px 12px;
  background-color: var(--field-navy);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 700;
}

.legal-clause-law-ref {
  padding: 5px 12px;
  background-color: var(--surface);
  color: var(--field-navy);
  font-size: var(--step-small);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.legal-clause-card h3 {
  color: var(--ink);
  margin: 0;
}

.legal-clause-card p {
  font-size: var(--step-body);
  color: var(--ink);
  line-height: 1.56;
}

.legal-subpoints {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.legal-subpoint {
  background-color: var(--surface);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legal-subpoint strong {
  font-size: 0.94rem;
  color: var(--field-navy);
}

.legal-subpoint span {
  font-size: var(--step-small);
  color: var(--ink);
  line-height: 1.42;
}

/* Trạm Tương tác Thực hiện Quyền Chủ thể Dữ liệu (PDPL Rights Console) */
.legal-rights-section {
  padding: clamp(72px, 8vw, 112px) 0;
  background-color: var(--bg);
}

.legal-rights-header {
  margin-bottom: 32px;
  align-items: end;
}

.legal-rights-section .matcher-controls-panel {
  background-color: var(--surface);
}

.legal-rights-section .matcher-chip {
  background-color: var(--bg);
}

.legal-rights-section .matcher-chip:hover {
  background-color: var(--field-navy);
  color: var(--bg);
}

.legal-rights-section .matcher-chip[aria-pressed="true"] {
  background-color: var(--ink);
  color: var(--accent);
}

.legal-rights-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legal-rights-step-item {
  background-color: var(--bg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legal-rights-step-item strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--field-navy);
}

.legal-rights-step-item span {
  font-size: var(--step-small);
  color: var(--ink);
  line-height: 1.42;
}

@media (hover: hover) and (pointer: fine) {
  .legal-index-link:hover {
    background-color: var(--accent);
    color: var(--ink);
    transform: translateX(4px);
  }

  .legal-sla-card:hover,
  .legal-clause-card:hover {
    transform: translateY(-4px);
  }
}

@media (max-width: 1024px) {
  .legal-hero-main,
  .legal-dossier-stamp,
  .legal-sla-title-col,
  .legal-sla-desc-col,
  .legal-index-rail,
  .legal-clauses-stream {
    grid-column: 1 / 13;
  }

  .legal-index-rail {
    position: static;
  }

  .legal-sla-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .legal-hero-highlights,
  .legal-sla-grid,
  .legal-audit-rows,
  .legal-subpoints {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   BLOG / NEWS & CMS POLICY PAGES
   ========================================================================== */
.subpage-masthead--compact {
  padding-top: 88px;
  padding-bottom: 44px;
}

.subpage-masthead-copy {
  grid-column: 7 / 13;
  align-self: end;
}

.blog-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(246, 245, 240, 0.72);
  margin-bottom: 14px;
}

.blog-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.blog-breadcrumb a:hover {
  text-decoration: underline;
}

.blog-section-tight {
  padding-block: 36px 72px;
}

.blog-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 24px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.blog-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.blog-filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(10, 22, 40, 0.14);
  border-radius: 0px;
  background-color: var(--surface);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-press) var(--ease-out);
}

.blog-filter-chip:hover,
.blog-filter-chip:focus-visible {
  background-color: var(--ink);
  border-color: var(--ink);
  color: var(--accent);
}

.blog-filter-chip.is-active {
  background-color: var(--field-navy);
  border-color: var(--field-navy);
  color: var(--bg);
}

.blog-search-form {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
}

.blog-search-input {
  width: 250px;
  height: 48px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(10, 22, 40, 0.18);
  border-radius: 0px;
  font-family: var(--font-text);
  font-size: 0.9375rem;
  font-weight: 500;
  background-color: #ffffff;
  color: var(--ink);
  outline: none;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}

.blog-search-input:focus {
  border-color: var(--field-navy);
  box-shadow: inset 0 0 0 1px var(--field-navy);
}

.blog-sort-select {
  height: 48px;
  min-height: 48px;
  padding: 0 40px 0 16px;
  border: 1px solid rgba(10, 22, 40, 0.18);
  border-radius: 0px;
  font-family: var(--font-text);
  font-size: 0.9375rem;
  font-weight: 600;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%230A1628' stroke-width='1.8' stroke-linecap='square'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color var(--dur-fast) var(--ease-out);
}

.blog-sort-select:hover,
.blog-sort-select:focus {
  border-color: var(--field-navy);
}

.blog-search-form .btn {
  height: 48px;
  min-height: 48px;
  padding: 0 22px;
}

.blog-result-count {
  font-size: 0.85rem;
  color: var(--ink-muted);
  font-weight: 600;
}

.blog-featured-card {
  display: grid;
  grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
  background: #ffffff;
  border: 1px solid rgba(10, 22, 40, 0.1);
  margin-bottom: 32px;
  overflow: hidden;
  transition: box-shadow 220ms ease;
}

.blog-featured-card:hover {
  box-shadow: 0 16px 36px rgba(10, 22, 40, 0.08);
}

.blog-featured-media {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f4f8;
  padding: 16px;
  max-height: 360px;
  overflow: hidden;
}

.blog-featured-media img {
  width: 100%;
  height: 100%;
  max-height: 328px;
  object-fit: contain;
  display: block;
}

.blog-featured-body {
  padding: clamp(24px, 3vw, 38px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.blog-featured-title {
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  line-height: 1.28;
  margin: 0;
}

.blog-featured-title a {
  color: var(--ink);
  text-decoration: none;
}

.blog-featured-title a:hover {
  color: var(--field-navy);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}

.blog-card {
  grid-column: span 4;
  background: #ffffff;
  border: 1px solid rgba(10, 22, 40, 0.1);
  display: flex;
  flex-direction: column;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.blog-card--half {
  grid-column: span 6;
}

.blog-pagination {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.blog-pagination-info {
  font-size: 0.92rem;
  color: var(--ink-secondary);
}

.blog-pagination-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.blog-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(10, 22, 40, 0.16);
  border-radius: 0px;
  background-color: #ffffff;
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

a.blog-page-btn:hover {
  background-color: var(--ink);
  border-color: var(--ink);
  color: var(--accent);
}

.blog-page-btn.is-active {
  background-color: var(--field-navy);
  border-color: var(--field-navy);
  color: #ffffff;
}

.blog-page-btn.is-disabled {
  background-color: var(--surface);
  color: var(--ink-muted);
  opacity: 0.55;
  cursor: not-allowed;
}

.blog-page-btn.is-dots {
  border-color: transparent;
  background: transparent;
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(10, 22, 40, 0.08);
}

.blog-card-media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f1f4f8;
}

.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
  transition: transform 360ms ease;
}

.blog-card:hover .blog-card-media img {
  transform: scale(1.03);
}

.blog-card-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.blog-badge {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(0, 61, 130, 0.08);
  color: var(--field-navy);
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 3px;
}

.blog-card-title {
  font-size: 1.12rem;
  line-height: 1.35;
  margin: 0;
}

.blog-card-title a {
  color: var(--ink);
  text-decoration: none;
}

.blog-card-title a:hover {
  color: var(--field-navy);
}

.blog-card-excerpt {
  margin: 0;
  max-width: none;
  font-size: 0.92rem;
  line-height: 1.58;
  color: var(--ink-secondary);
}

/* Article Detail Header & Reading Sheet */
.article-masthead {
  background-color: var(--field-navy);
  color: var(--bg);
  padding-top: 112px;
  padding-bottom: 40px;
}

.article-masthead h1 {
  color: #ffffff;
  font-size: clamp(1.65rem, 2.8vw, 2.35rem);
  line-height: 1.24;
  text-transform: none;
  letter-spacing: -0.01em;
  max-width: 44ch;
  margin: 0 0 16px;
}

.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 0.9rem;
  color: rgba(246, 245, 240, 0.84);
}

.article-cat-pill {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 3px;
  text-decoration: none;
}

.blog-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}

.blog-article-sheet {
  background: #ffffff;
  border: 1px solid rgba(10, 22, 40, 0.09);
  padding: clamp(24px, 3.2vw, 44px);
}

.blog-lead-callout {
  margin: 0 0 28px;
  max-width: none;
  padding: 16px 20px;
  background: #f6f8fb;
  border-left: 4px solid var(--field-navy);
  font-size: 1.04rem;
  line-height: 1.65;
  color: var(--ink);
  font-weight: 500;
}

.blog-article-prose h2,
.blog-article-prose h3 {
  margin-top: 30px;
  margin-bottom: 12px;
  color: var(--field-navy);
  font-size: 1.3rem;
  scroll-margin-top: 112px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0, 61, 130, 0.12);
}

.blog-article-prose p,
.blog-article-prose ul,
.blog-article-prose ol,
.blog-article-prose li {
  max-width: none;
  margin-bottom: 16px;
  line-height: 1.75;
}

.blog-article-prose ul {
  padding-left: 22px;
  list-style: disc;
}

.blog-article-prose img {
  display: block;
  width: 100%;
  max-width: 540px;
  height: auto;
  margin: 22px auto;
  border-radius: 6px;
  border: 1px solid rgba(10, 22, 40, 0.1);
  box-shadow: 0 8px 24px rgba(10, 22, 40, 0.08);
}

.blog-article-prose a {
  color: var(--field-navy);
  font-weight: 600;
  text-decoration: underline;
}

.blog-toc-card {
  position: sticky;
  top: 108px;
  background: #ffffff;
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-top: 4px solid var(--field-navy);
  padding: 20px 22px;
}

.blog-toc-title {
  margin: 0 0 12px;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--field-navy);
}

.blog-toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.blog-toc-list a {
  display: block;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--ink-secondary);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(10, 22, 40, 0.08);
}

.blog-toc-list a:hover {
  color: var(--field-navy);
}

.blog-toc-sub {
  padding-left: 14px;
  font-size: 0.85rem;
}

@media (max-width: 1024px) {
  .blog-featured-card {
    grid-template-columns: 1fr;
  }
  .blog-card,
  .blog-card--half {
    grid-column: span 6;
  }
  .subpage-masthead-copy {
    grid-column: 1 / 13;
  }
}

@media (max-width: 960px) {
  .blog-detail-layout {
    grid-template-columns: 1fr;
  }
  .blog-toc-card {
    position: static;
    order: -1;
  }
}

@media (max-width: 640px) {
  .blog-card,
  .blog-card--half {
    grid-column: span 12;
  }
  .blog-search-input {
    width: 100%;
  }
}

