:root {
  --bg: #f7f8fa;
  --bg-elevated: #ffffff;
  --text: #1b1f27;
  --text-muted: #5a6270;
  --border: #e1e4ea;
  --accent: #4f5bd5;
  --accent-contrast: #ffffff;
  --shadow: 0 1px 3px rgba(20, 24, 33, 0.08), 0 1px 2px rgba(20, 24, 33, 0.06);

  --cat-optics: #4f5bd5;
  --cat-input: #d5674f;
  --cat-research: #2e9e6b;
  --cat-commercial: #b8862f;
  --cat-armr: #a24fd5;
  --cat-hype: #5a6270;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161c;
    --bg-elevated: #1d2028;
    --text: #eef0f4;
    --text-muted: #a3aab8;
    --border: #2c303c;
    --accent: #8f97ff;
    --accent-contrast: #14161c;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);

    --cat-optics: #8f97ff;
    --cat-input: #ef9b85;
    --cat-research: #5cd19b;
    --cat-commercial: #e0b25c;
    --cat-armr: #d38ff5;
    --cat-hype: #a3aab8;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.site-header__title {
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-left: auto;
}

.site-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
}

.site-nav a:hover {
  background: var(--bg);
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.page-header {
  margin-bottom: 28px;
}

.page-header h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  margin: 0 0 8px;
}

.page-header p {
  color: var(--text-muted);
  max-width: 65ch;
  margin: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.unit-card {
  display: block;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
}

.unit-card h2 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.unit-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.unit-card__tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.coming-soon {
  padding: 48px 24px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--text-muted);
}

footer.site-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 20px 60px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
