:root {
  --color-primary: #4f46e5;
  --color-primary-soft: #eef2ff;
  --bg: #ffffff;
  --bg-soft: #f8f9fb;
  --bg-card: #ffffff;
  --bg-hover: #eef1f5;
  --text: #1a1a1a;
  --text-soft: #57606a;
  --text-muted: #8b949e;
  --border: #e1e4e8;
  --border-strong: #d8dce0;
  --success: #16833b;
  --success-soft: #eaf8ef;
  --warning: #a15c00;
  --warning-soft: #fff7e6;
  --danger: #c52b36;
  --danger-soft: #fff0f1;
  --shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);

}

:root[data-theme='dark'] {
  --color-primary: #818cf8;
  --color-primary-soft: #252b52;
  --bg: #0d1117;
  --bg-soft: #161b22;
  --bg-card: #161b22;
  --bg-hover: #21262d;
  --text: #e6edf3;
  --text-soft: #c9d1d9;
  --text-muted: #8b949e;
  --border: #30363d;
  --border-strong: #444c56;
  --success: #56d364;
  --success-soft: rgba(46, 160, 67, 0.14);
  --warning: #e3b341;
  --warning-soft: rgba(210, 153, 34, 0.14);
  --danger: #ff7b72;
  --danger-soft: rgba(248, 81, 73, 0.14);
  --shadow: 0 1px 4px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --color-primary: #818cf8;
    --color-primary-soft: #252b52;
    --bg: #0d1117;
    --bg-soft: #161b22;
    --bg-card: #161b22;
    --bg-hover: #21262d;
    --text: #e6edf3;
    --text-soft: #c9d1d9;
    --text-muted: #8b949e;
    --border: #30363d;
    --border-strong: #444c56;
    --success: #56d364;
    --success-soft: rgba(46, 160, 67, 0.14);
    --warning: #e3b341;
    --warning-soft: rgba(210, 153, 34, 0.14);
    --danger: #ff7b72;
    --danger-soft: rgba(248, 81, 73, 0.14);
    --shadow: 0 1px 4px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
  }
}

* {
  box-sizing: border-box;
}

:where(.legacy-page) * {
  margin: 0;
  padding: 0;
}

html {
  color-scheme: light;
  overflow-y: scroll;
}

:root[data-theme='dark'] {
  color-scheme: dark;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--color-primary);
}

.container {
  width: min(1000px, 100%);
  margin: 0 auto;
  padding: 0 20px 10px;
}

.section-gap {
  margin-top: 16px;
}

.comparison-table {
  width: 100%;
  margin: 14px 0;
  border-collapse: collapse;
  font-size: 0.9em;
}

.comparison-table th,
.comparison-table td {
  padding: 8px 12px;
  border: 1px solid var(--border);
}

.comparison-table th {
  background: var(--bg-soft);
  text-align: left;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
