/* Shared styles for the website's legal pages (terms.html, privacy.html). Tokens match index.html. */
:root {
  --brand: #5B5BF6; --violet: #8B5CF6;
  --text: #0F1629; --muted: #5B6478; --line: #E6E8F0; --soft: #F5F6FB; --soft-2: #EEF0FF;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 12px 32px -12px rgba(16,24,40,.14);
  --display: 'Plus Jakarta Sans', Inter, 'Kantumruy Pro', 'Noto Sans SC', system-ui, sans-serif;
}
html[lang="km"] { --display: 'Kantumruy Pro', 'Plus Jakarta Sans', system-ui, sans-serif; }
html[lang="zh"] { --display: 'Noto Sans SC', 'Plus Jakarta Sans', system-ui, sans-serif; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; font: 16px/1.7 Inter, 'Kantumruy Pro', 'Noto Sans SC', system-ui, sans-serif; color: var(--text); background: #fff; -webkit-font-smoothing: antialiased; }
html[lang="km"] body { line-height: 1.9; }
a { color: inherit; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* Header (always solid on these pages) */
header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.88); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--line); }
header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 20px/1 var(--display); letter-spacing: -.02em; text-decoration: none; color: var(--text); }
.brand .logo { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, var(--brand), var(--violet)); display: grid; place-items: center; box-shadow: 0 6px 16px -6px rgba(91,91,246,.9); color: #fff; }
.brand .logo .i { width: 19px; height: 19px; stroke-width: 2.2; }
.brand .logo-img { display: block; height: 37px; width: auto; }
nav.links { display: flex; gap: 4px; font-size: 14.5px; font-weight: 500; }
nav.links a { text-decoration: none; padding: 8px 14px; border-radius: 999px; color: var(--muted); }
nav.links a:hover { color: var(--text); background: var(--soft); }
.spacer { flex: 1; }
.langs { display: inline-flex; border-radius: 999px; padding: 3px; background: var(--soft); border: 1px solid var(--line); }
.langs button { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: 999px; cursor: pointer; color: var(--text); opacity: .65; }
.langs button[aria-pressed="true"] { opacity: 1; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--brand), var(--violet)); box-shadow: 0 10px 30px -10px rgba(91,91,246,.8); }
.login { text-decoration: none; font-weight: 600; font-size: 14.5px; color: var(--text); opacity: .85; }
@media (max-width: 900px) { nav.links, header .login { display: none; } header .wrap { gap: 12px; } }
@media (max-width: 480px) { header .btn-primary { display: none; } }

/* Page */
.hero { background: linear-gradient(180deg, var(--soft-2), #fff); border-bottom: 1px solid var(--line); padding: 56px 0 40px; }
.hero .back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--brand); text-decoration: none; }
.hero .back .i { width: 16px; height: 16px; transform: rotate(180deg); }
.hero h1 { font: 800 clamp(32px, 4.4vw, 48px)/1.1 var(--display); letter-spacing: -.03em; margin: 14px 0 10px; }
.hero p { margin: 0; color: var(--muted); }
.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; padding-top: 48px; padding-bottom: 24px; align-items: start; }
@media (max-width: 900px) { .layout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 28px; } }
.toc { position: sticky; top: 96px; font-size: 14px; }
.toc h2 { font: 700 12px/1.4 var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; color: var(--muted); }
.toc a:hover { color: var(--brand); border-left-color: var(--brand); }
@media (max-width: 900px) { .toc { position: static; padding: 16px 18px; border-radius: 14px; background: var(--soft); } .toc ol { columns: 2; column-gap: 16px; border: 0; } .toc a { padding-left: 0; border: 0; } }
@media (max-width: 520px) { .toc ol { columns: 1; } }

.doc { max-width: 760px; }
.doc[hidden] { display: none; }
.doc h2 { font: 700 22px/1.3 var(--display); letter-spacing: -.015em; margin: 40px 0 12px; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { font: 700 16.5px/1.4 var(--display); margin: 22px 0 6px; }
.doc p, .doc li { color: #2A3247; }
.doc ul { padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc a { color: var(--brand); }
.note { margin: 0 0 28px; padding: 14px 18px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); font-size: 14.5px; color: var(--muted); }

/* Footer (same as index.html) */
footer { padding: 64px 0 36px; margin-top: 72px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14.5px; }
.foot { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .foot { grid-template-columns: 1fr 1fr; } .foot > :first-child { grid-column: span 2; } }
.foot .brand { margin-bottom: 14px; } .foot p { margin: 0; max-width: 300px; }
.foot h4 { margin: 0 0 14px; color: var(--text); font-size: 14px; }
.foot a { display: block; text-decoration: none; padding: 4px 0; } .foot a:hover { color: var(--brand); }
.legal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13.5px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.legal-links a { text-decoration: none; } .legal-links a:hover { color: var(--brand); }
.accept { display: inline-flex; align-items: center; gap: 10px; }
.accept img { height: auto; width: 70px; }
