/* Palette: 1:1 from brand-tokens.yaml (ui, neutral — 2026-10-21). Themes: system by default, manual override via <html data-theme>. */
:root {
  color-scheme: light;
  --bg: #F5F5F7;
  --surface: #FFFFFF;
  --text: #1D1D1F;
  --text-secondary: #424245;
  --text-muted: #6E6E73;
  --line: #D2D2D7;
  --accent: #8A3A64;
  --focus-ring: #8A3A64;
  --icon-ring: #C7C7CC;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #000000;
    --surface: #1C1C1E;
    --text: #F5F5F7;
    --text-secondary: #C7C7CC;
    --text-muted: #98989D;
    --line: #38383A;
    --accent: #BA7295;
    --focus-ring: #BA7295;
    --icon-ring: #48484A;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #1C1C1E;
  --text: #F5F5F7;
  --text-secondary: #C7C7CC;
  --text-muted: #98989D;
  --line: #38383A;
  --accent: #BA7295;
  --focus-ring: #BA7295;
  --icon-ring: #48484A;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  /* Sticky footer: footer sits at the bottom on short pages. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
main { flex: 1 0 auto; width: 100%; }
.site-header { width: 100%; }
main {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px;
}
main { padding-top: clamp(40px, 8vh, 80px); }
h1 {
  margin: 0 0 12px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(40px, 9vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.lead {
  margin: 0 0 16px;
  font-size: clamp(21px, 4.5vw, 24px);
  line-height: 1.35;
  font-weight: 500;
}
.body { margin: 0; color: var(--text-secondary); }
section { margin-top: 64px; }
h2 {
  margin: 0 0 16px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.apps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.app {
  padding: 20px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.app-head { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; margin-bottom: 10px; min-height: 56px; }
.app-head > :not(.app-icon) { grid-column: 2; }
.app-icon { grid-row: 1 / span 2; display: block; width: 56px; height: 56px; }
.app-icon img { display: block; width: 56px; height: 56px; border-radius: 12.5px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.10); }

.app h3 { margin: 0; font-size: 22px; font-weight: 600; line-height: 1.3; }
.status { display: block; margin-top: 2px; font-size: 14px; color: var(--text-muted); }
.app p { margin: 0; color: var(--text-secondary); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; border-radius: 4px; }
/* Full-width rule; text column stays aligned with main (640px + 24px gutters). */
footer {
  margin-top: 80px;
  padding: 24px max(24px, calc((100% - 640px) / 2 + 24px)) 48px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}
footer p { margin: 0 0 8px; }

/* Brand header + document pages (/privacy) */
.doc { padding-top: 48px; }
.doc h1 { font-size: clamp(36px, 8vw, 48px); }
.doc .updated { margin: 0 0 40px; color: var(--text-muted); font-size: 15px; }
.doc h2 { font-size: 24px; margin: 40px 0 12px; }
.doc p { margin: 0 0 16px; color: var(--text-secondary); }
footer a { color: var(--accent); }

/* Header: lockup left, theme toggle right */
.site-header {
  max-width: 640px; margin: 0 auto; padding: 16px 24px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo { display: inline-flex; align-items: center; border-radius: 4px; }
.logo img { display: block; height: 30px; width: auto; }
.logo .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo .logo-dark { display: block; }
}
:root[data-theme="dark"] .logo .logo-light { display: none; }
:root[data-theme="dark"] .logo .logo-dark { display: block; }

.theme-toggle {
  flex: none; width: 44px; height: 44px; padding: 0; margin-right: -10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 12px; color: var(--text); cursor: pointer;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.theme-toggle svg { width: 24px; height: 24px; display: block; }
/* Show the icon of the theme the click leads to: moon in light, sun in dark */
.theme-toggle .i-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* App icons: light/dark variants follow the same theme logic as the logo */
.app-icon .icon-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .app-icon .icon-light { display: none; }
  :root:not([data-theme="light"]) .app-icon .icon-dark { display: block; }
}
:root[data-theme="dark"] .app-icon .icon-light { display: none; }
:root[data-theme="dark"] .app-icon .icon-dark { display: block; }
