/* Shared styling for the static legal pages (policy.html, terms.html).
 *
 * These pages live in public/ and are copied verbatim by Vite, so they cannot
 * import src/app.css through the bundler. The design tokens below are therefore
 * a deliberate copy of the ones in src/app.css — keep them in sync if the brand
 * colours change. Same plain-<link> approach notepad-web/public already uses.
 *
 * Both languages are present in the HTML at once. English is visible by
 * default so the page is fully readable with JavaScript disabled (Google's
 * OAuth reviewers and crawlers must be able to read it); the inline script in
 * each page flips [data-lang] to switch.
 */

:root {
  --bg: #090a14;
  --panel: rgba(255, 255, 255, 0.032);
  --line: rgba(255, 255, 255, 0.1);
  --text: #e8eaf4;
  --muted: #9aa1b9;
  --accent: #818cf8;
  --accent-2: #22d3ee;

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- language switching ---------- */

.lang-vi {
  display: none;
}
html[data-lang='vi'] .lang-vi {
  display: block;
}
html[data-lang='vi'] .lang-en {
  display: none;
}

/* ---------- header ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(9, 10, 20, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.top .brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.top .spacer {
  flex: 1;
}

.lang-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
}

.lang-switch button {
  padding: 5px 11px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

html[data-lang='en'] .lang-switch button[data-set-lang='en'],
html:not([data-lang='vi']) .lang-switch button[data-set-lang='en'],
html[data-lang='vi'] .lang-switch button[data-set-lang='vi'] {
  background: rgba(129, 140, 248, 0.16);
  color: var(--text);
}

/* ---------- document ---------- */

main {
  max-width: 800px;
  margin: 0 auto;
  padding: 52px 24px 80px;
}

h1 {
  margin: 0 0 6px;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.updated {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
}

.intro {
  margin: 0 0 40px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
}

h2 {
  margin: 40px 0 12px;
  font-size: 20px;
  letter-spacing: -0.01em;
}

h2 .num {
  margin-right: 9px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

p {
  margin: 0 0 14px;
}

ul {
  margin: 0 0 14px;
  padding-left: 22px;
}

li {
  margin-bottom: 7px;
}

a {
  color: var(--accent-2);
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
}

strong {
  color: #fff;
}

code {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.88em;
}

table {
  width: 100%;
  margin: 0 0 16px;
  border-collapse: collapse;
  font-size: 15px;
}

th,
td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--panel);
  font-weight: 600;
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--line);
  padding: 30px 24px 44px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

footer a {
  color: var(--muted);
  margin: 0 9px;
}

@media (max-width: 560px) {
  main {
    padding: 34px 18px 64px;
  }
  table {
    font-size: 14px;
  }
  th,
  td {
    padding: 8px 9px;
  }
}
