:root {
  --font-geist-sans: system-ui;
  --font-geist-mono: ui-monospace;
  --page: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #eef3f9;
  --ink: #142033;
  --muted: #59677c;
  --line: #d9e2ee;
  --accent: #2856b6;
  --accent-strong: #183b82;
  --accent-soft: #e7eefc;
  --hero: #0d1a33;
  --hero-soft: #182a4b;
  --hero-ink: #f7f9fd;
  --warm: #d97706;
  --shadow: 0 18px 60px rgba(18, 35, 64, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-geist-sans), "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid #f5b942;
  outline-offset: 4px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-160%);
  padding: 10px 16px;
  border-radius: 8px;
  background: white;
  color: #102143;
  font-weight: 700;
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.hero {
  position: relative;
  overflow: hidden;
  color: var(--hero-ink);
  background:
    radial-gradient(circle at 82% 12%, rgba(76, 121, 220, 0.36), transparent 34%),
    radial-gradient(circle at 9% 110%, rgba(217, 119, 6, 0.16), transparent 31%),
    var(--hero);
}

.hero::after {
  content: "";
  position: absolute;
  right: -100px;
  bottom: -180px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 54px rgba(255, 255, 255, 0.025), 0 0 0 108px rgba(255, 255, 255, 0.018);
  pointer-events: none;
}

.hero-inner,
.page-shell,
footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: white;
  font-size: 1.02rem;
  font-weight: 720;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.77rem;
}

.language-links {
  display: flex;
  gap: 6px;
}

.language-links a {
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #d9e4f7;
  font-size: 0.8rem;
  text-decoration: none;
}

.language-links a:hover {
  background: rgba(255, 255, 255, 0.09);
  color: white;
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 72px 0 78px;
}

.pill {
  display: inline-flex;
  margin: 0 0 18px;
  padding: 7px 12px;
  border: 1px solid rgba(135, 170, 240, 0.38);
  border-radius: 999px;
  background: rgba(43, 85, 170, 0.22);
  color: #c9dafb;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.03em;
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.55rem, 7vw, 5.6rem);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.hero-lead {
  max-width: 760px;
  margin: 24px 0 0;
  color: #cbd7e9;
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  line-height: 1.8;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 840px;
  margin-top: 38px;
}

.hero-meta > div {
  display: flex;
  flex-direction: column;
  min-height: 84px;
  justify-content: center;
  padding: 14px 17px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
}

.hero-meta span {
  color: #96a9c8;
  font-size: 0.74rem;
  font-weight: 620;
}

.hero-meta strong,
.hero-meta a {
  margin-top: 2px;
  color: white;
  font-size: 0.94rem;
  font-weight: 650;
}

.page-shell {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 58px;
  padding: 70px 0 100px;
}

.side-nav {
  position: sticky;
  top: 28px;
  align-self: start;
  padding: 8px 0;
}

.side-nav > p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.side-nav nav {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
}

.side-nav a {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 4px;
  padding: 8px 0 8px 13px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.4;
  text-decoration: none;
}

.side-nav a span {
  color: #9aa8bb;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.67rem;
}

.side-nav a:hover {
  border-left-color: var(--accent);
  color: var(--accent-strong);
}

main {
  min-width: 0;
}

.policy-section {
  padding: 70px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 16px;
}

.policy-section.opening {
  padding-top: 0;
  border-top: 0;
}

.section-heading {
  max-width: 800px;
  margin-bottom: 30px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.74rem;
  font-weight: 720;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.section-heading h2,
.contact-section h2 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.55rem);
  letter-spacing: -0.035em;
  line-height: 1.25;
}

.section-heading > p {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.principle-grid,
.control-grid,
.english-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

.policy-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(28, 49, 80, 0.02);
}

.policy-card h3,
.limit-box h3 {
  margin: 0 0 9px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.45;
}

.policy-card p,
.policy-card ul,
.notice p,
.limit-box p,
.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.91rem;
}

.policy-card ul {
  padding-left: 20px;
}

.policy-card li + li {
  margin-top: 7px;
}

code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.82em;
}

.notice,
.limit-box {
  margin-top: 18px;
  padding: 22px 24px;
  border: 1px solid #cbd8ef;
  border-left: 4px solid var(--accent);
  border-radius: 13px;
  background: var(--accent-soft);
}

.notice strong {
  display: block;
  margin-bottom: 5px;
  color: var(--accent-strong);
  font-size: 0.88rem;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.limit-box {
  border-color: #ead5b8;
  border-left-color: var(--warm);
  background: #fff8ed;
}

.steps {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.steps li > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.78rem;
  font-weight: 750;
}

.steps strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.95rem;
}

.text-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 680;
}

.data-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.data-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.35fr) 1fr;
  gap: 24px;
  padding: 17px 21px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.data-row:first-child {
  border-top: 0;
}

.data-row strong {
  color: var(--ink);
}

.data-head {
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 720;
  letter-spacing: 0.04em;
}

.fine-print {
  margin: 15px 2px 0;
  color: var(--muted);
  font-size: 0.83rem;
}

.license-list {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.license-list li {
  padding: 18px 20px;
  border-left: 3px solid #9db3df;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.92rem;
}

.license-list strong {
  color: var(--ink);
}

.english {
  padding: 54px;
  border: 1px solid #cbd8ef;
  border-radius: 24px;
  background: #eaf0fb;
}

.english .policy-card {
  background: rgba(255, 255, 255, 0.72);
}

.english-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.contact-section {
  margin-top: 70px;
  padding: 48px;
  border-radius: 24px;
  background: var(--hero);
  color: white;
  box-shadow: var(--shadow);
}

.contact-section .eyebrow {
  color: #9ebcf7;
}

.contact-section > p:not(.eyebrow) {
  max-width: 650px;
  margin: 12px 0 23px;
  color: #c7d4e8;
}

.contact-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 10px 17px;
  border-radius: 10px;
  background: white;
  color: #102143;
  font-size: 0.93rem;
  font-weight: 720;
  text-decoration: none;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

footer div {
  display: flex;
  gap: 12px;
}

footer strong {
  color: var(--ink);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0b1120;
    --surface: #111a2b;
    --surface-soft: #172236;
    --ink: #edf3fb;
    --muted: #aebbd0;
    --line: #293650;
    --accent: #91b2f5;
    --accent-strong: #b8cdf9;
    --accent-soft: #17294f;
    --hero: #08101f;
  }

  .limit-box {
    border-color: #63481f;
    background: #261d10;
  }

  .english {
    border-color: #30466d;
    background: #101d35;
  }

  .english .policy-card {
    background: rgba(17, 26, 43, 0.76);
  }
}

@media (max-width: 900px) {
  .page-shell {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .side-nav {
    position: static;
    overflow-x: auto;
    padding: 0 0 12px;
  }

  .side-nav > p {
    display: none;
  }

  .side-nav nav {
    flex-direction: row;
    width: max-content;
    border-left: 0;
    gap: 6px;
  }

  .side-nav a {
    display: flex;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    white-space: nowrap;
  }

  .side-nav a:hover {
    border-color: var(--accent);
  }
}

@media (max-width: 700px) {
  .hero-inner,
  .page-shell,
  footer {
    width: min(100% - 28px, 1180px);
  }

  .topbar {
    min-height: 66px;
  }

  .hero-copy {
    padding: 54px 0 58px;
  }

  .hero h1 {
    letter-spacing: -0.045em;
  }

  .hero-meta,
  .principle-grid,
  .control-grid,
  .english-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  .page-shell {
    padding: 38px 0 70px;
  }

  .policy-section {
    padding: 52px 0;
  }

  .data-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .english,
  .contact-section {
    padding: 28px 22px;
    border-radius: 18px;
  }

  footer,
  footer div {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media print {
  :root {
    --page: #fff;
    --surface: #fff;
    --surface-soft: #f5f5f5;
    --ink: #111;
    --muted: #333;
    --line: #ccc;
  }

  .hero {
    background: #fff;
    color: #111;
  }

  .hero-lead,
  .hero-meta span,
  .hero-meta strong,
  .hero-meta a,
  .pill {
    color: #222;
  }

  .topbar,
  .side-nav,
  .contact-button,
  footer a {
    display: none;
  }

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

  .page-shell {
    display: block;
    padding: 20px 0;
  }

  .policy-section {
    break-inside: avoid;
  }

  .english,
  .contact-section {
    border: 1px solid #bbb;
    background: #fff;
    color: #111;
    box-shadow: none;
  }
}
