:root {
  color-scheme: light dark;
  --page: #f6f7fb;
  --surface: #ffffff;
  --surface-soft: #f0f3f8;
  --text: #181b24;
  --muted: #5e6573;
  --line: #dfe3ea;
  --accent: #a82f75;
  --accent-soft: #f7e8f1;
  --focus: #175cd3;
  --max: 780px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Thai", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  border-radius: 4px;
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: 8px;
  background: var(--text);
  color: var(--surface);
}

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

.policy-header,
.policy-main,
.policy-footer {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

.policy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-block: 24px;
}

.policy-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.policy-brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.policy-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 16px;
  font-size: 0.84rem;
}

.policy-nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
}

.policy-main {
  padding-block: clamp(28px, 6vw, 64px) 72px;
}

.policy-hero {
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.28;
  text-wrap: balance;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 3.4rem);
  letter-spacing: -0.045em;
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(1.25rem, 4vw, 1.55rem);
}

h3 {
  margin: 24px 0 8px;
  font-size: 1.05rem;
}

p,
ul,
ol {
  margin-block: 0 14px;
}

ul,
ol {
  padding-left: 1.35rem;
}

li + li {
  margin-top: 8px;
}

.policy-meta {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.policy-summary,
.policy-section {
  border: 1px solid var(--line);
  background: var(--surface);
}

.policy-summary {
  margin: 28px 0 18px;
  padding: 20px;
  border-left: 4px solid var(--accent);
}

.policy-summary p:last-child,
.policy-section > :last-child {
  margin-bottom: 0;
}

.policy-section {
  padding: clamp(22px, 5vw, 34px);
  border-bottom: 0;
}

.policy-section:first-of-type {
  border-radius: 14px 14px 0 0;
}

.policy-section:last-of-type {
  border-bottom: 1px solid var(--line);
  border-radius: 0 0 14px 14px;
}

.contact-card {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.contact-card strong {
  display: block;
  margin-bottom: 6px;
}

.policy-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 26px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 620px) {
  .policy-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .policy-nav {
    justify-content: flex-start;
  }

  .policy-main {
    padding-top: 20px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0c0d12;
    --surface: #15171f;
    --surface-soft: #1b1e28;
    --text: #f2f3f7;
    --muted: #aab0bc;
    --line: #303440;
    --accent: #f18ac2;
    --accent-soft: #3a2230;
    --focus: #78a9ff;
  }
}

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