@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@600;700;800&family=Public+Sans:wght@400;500;600;700&display=swap');

:root {
  --font-display: 'Manrope', 'Segoe UI', sans-serif;
  --font-base: 'Public Sans', 'Segoe UI', sans-serif;

  --primary-500: #163d57;
  --primary-600: #123247;
  --primary-50: #eef6f8;
  --support-500: #4f8f6e;
  --support-600: #3f7459;
  --support-50: #edf6f1;
  --warning: #b98021;
  --warning-bg: #fbf3e4;

  --bg: #f4f1ea;
  --surface: rgb(255 255 255 / 82%);
  --border: rgb(22 61 87 / 14%);
  --border-strong: rgb(22 61 87 / 24%);
  --text: #173042;
  --text-muted: #5f7481;

  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-soft: 0 18px 40px rgb(17 38 52 / 10%);

  --gutter: clamp(1rem, 4vw, 3rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100dvh;
  font-family: var(--font-base);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgb(79 143 110 / 16%) 0%, rgb(79 143 110 / 0%) 32%),
    radial-gradient(circle at 88% 12%, rgb(22 61 87 / 14%) 0%, rgb(22 61 87 / 0%) 28%),
    linear-gradient(180deg, #f7f4ee 0%, #eef2f2 48%, #f6f4ee 100%);
  background-color: var(--bg);
  display: flex;
  flex-direction: column;
}

h1, h2, h3, .brand-mark {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0;
  color: var(--text);
}

h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }

p { margin: 0; }

a { color: var(--primary-500); text-underline-offset: 3px; }
a:hover { color: var(--support-600); }

:focus-visible { outline: 3px solid var(--support-500); outline-offset: 3px; border-radius: 4px; }

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgb(22 61 87 / 8%);
  background: rgb(244 241 234 / 82%);
  backdrop-filter: blur(16px);
}

.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.9rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand { display: inline-flex; flex-direction: column; gap: 2px; text-decoration: none; }
.brand-mark { font-size: 1.25rem; font-weight: 800; color: var(--primary-500); }
.brand-context { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }

.nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.nav a {
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  color: var(--primary-500);
}
.nav a:hover { background: rgb(22 61 87 / 7%); }

/* Layout */
main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter) 4rem; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  background: rgb(22 61 87 / 7%);
  color: var(--primary-600);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.surface {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgb(255 255 255 / 92%) 0%, rgb(248 251 251 / 84%) 100%), var(--surface);
  box-shadow: var(--shadow-soft);
}

/* Status banner */
.status {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgb(185 128 33 / 30%);
  border-radius: var(--radius-md);
  background: var(--warning-bg);
  color: #6b4a12;
}
.status-dot {
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 4px rgb(185 128 33 / 18%);
}
.status strong { color: #5a3d0c; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 5vw, 4rem);
}
.hero h1 { margin-top: 1.25rem; max-width: 18ch; }
.hero-summary { margin-top: 1.25rem; font-size: 1.125rem; color: var(--text-muted); max-width: 58ch; }

.hero-card { padding: clamp(1.25rem, 3vw, 2rem); display: grid; gap: 1rem; }
.hero-card .card-label { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--support-600); }
.metric {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgb(255 255 255 / 70%);
}
.metric span { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.metric strong { display: block; margin-top: 0.25rem; font-family: var(--font-display); font-size: 1.05rem; }
.metric p { margin-top: 0.25rem; font-size: 0.92rem; color: var(--text-muted); }

/* Content sections */
.section { padding-top: clamp(2.5rem, 6vw, 4.5rem); scroll-margin-top: 6rem; }
.section-header { max-width: 720px; }
.section-header h2 { margin-top: 1rem; }
.section-header p { margin-top: 0.75rem; color: var(--text-muted); }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}
.feature { padding: 1.5rem; }
.feature .index {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 12px;
  background: var(--primary-50);
  color: var(--primary-500);
  font-family: var(--font-display);
  font-weight: 800;
}
.feature h3 { margin-top: 1rem; }
.feature p { margin-top: 0.5rem; color: var(--text-muted); }

.principle {
  margin-top: 1.75rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
}
.principle ul { margin: 0; padding-left: 1.2rem; color: var(--text-muted); }
.principle li + li { margin-top: 0.4rem; }

/* Policy */
.doc { max-width: 820px; margin: 0 auto; padding-top: clamp(2rem, 5vw, 3.5rem); }
.doc-header h1 { margin-top: 1rem; font-size: clamp(2rem, 5vw, 2.8rem); }
.doc-meta { margin-top: 0.75rem; color: var(--text-muted); font-size: 0.95rem; }

.toc { margin-top: 2rem; padding: 1.25rem 1.5rem; }
.toc h2 { font-size: 1rem; letter-spacing: 0; }
.toc ol { margin: 0.75rem 0 0; padding-left: 1.3rem; columns: 2; column-gap: 2rem; }
.toc li { break-inside: avoid; padding: 0.15rem 0; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.doc section { margin-top: 2.5rem; scroll-margin-top: 6rem; }
.doc section h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); }
.doc section h3 { margin-top: 1.5rem; }
.doc section p, .doc section ul, .doc section ol, .doc section table { margin-top: 0.85rem; }
.doc ul, .doc ol { padding-left: 1.3rem; }
.doc li + li { margin-top: 0.35rem; }

.table-wrap { overflow-x: auto; margin-top: 0.85rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: rgb(255 255 255 / 75%); }
.table-wrap table { margin: 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
th { font-weight: 700; background: rgb(22 61 87 / 5%); }
tr:last-child td { border-bottom: 0; }

.callout-ai {
  margin-top: 1rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 2px solid var(--support-500);
  border-radius: var(--radius-lg);
  background: var(--support-50);
}
.callout-ai .badge {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--support-500);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.callout-ai h2 { margin-top: 0.75rem; }

.note {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--primary-500);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: rgb(22 61 87 / 5%);
}

/* Footer */
.footer { border-top: 1px solid rgb(22 61 87 / 10%); background: rgb(244 241 234 / 70%); }
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.footer-inner nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }

@media (max-width: 860px) {
  .hero, .principle { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .toc ol { columns: 1; }
}

@media (max-width: 480px) {
  .topbar-inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .nav a { padding: 0.4rem 0.6rem; }
}
