/*
 * Phase 1 shell styles.
 *
 * Deliberately small: Bootstrap 5.3 is vendored in phase 4 and will take over the
 * component layer. The theming here already uses Bootstrap's data-bs-theme attribute
 * convention, so that swap is additive rather than a rewrite.
 */

:root {
  color-scheme: light dark;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --border: #dfe3e8;
  --text: #16191d;
  --muted: #5c6470;
  --accent: #0d6efd;
  --radius: 10px;
  --wrap: 68rem;
}

[data-bs-theme="dark"] {
  --bg: #14171a;
  --surface: #1c2024;
  --border: #2c3238;
  --text: #e8eaed;
  --muted: #98a1ad;
  --accent: #5b9dff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1rem;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 10;
}
.skip-link:focus { left: 0; }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 650;
  font-size: 1.05rem;
  color: inherit;
  text-decoration: none;
}
.brand-mark { font-size: 1.3rem; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.control {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem 0.5rem;
  font: inherit;
  font-size: 0.875rem;
}

.lang-switch {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.lang-switch a {
  display: block;
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
}
.lang-switch a[aria-current="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

main { padding-block: 1.5rem 3rem; }

.hero h1 { margin: 0 0 0.25rem; font-size: clamp(1.6rem, 4vw, 2.25rem); }
.hero .lead { margin: 0 0 1.5rem; color: var(--muted); }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.panel h2 { margin: 0 0 1rem; font-size: 1.1rem; }

.notice {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  color: var(--muted);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem 1.5rem;
  margin: 0;
}
.stat-grid dt { color: var(--muted); font-size: 0.8125rem; }
.stat-grid dd { margin: 0.1rem 0 0; font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }

.table-scroll { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.data-table th, .data-table td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.data-table thead th {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td { border-bottom: 0; }

.muted { color: var(--muted); font-size: 0.8125rem; }

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 1.25rem;
  color: var(--muted);
  font-size: 0.8125rem;
}
.site-footer p { margin: 0.2rem 0; }

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