:root {
  --bg: #0b0f14;
  --bg-elev: #111824;
  --panel: #151f2d;
  --panel-2: #182437;
  --text: #e6edf7;
  --text-muted: #9fb0c7;
  --accent: #4da3ff;
  --accent-2: #6fd3ff;
  --ok: #46c98b;
  --warn: #ffb86c;
  --danger: #ff6b81;
  --border: #27364d;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --max: 1160px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  background: radial-gradient(circle at top right, rgba(77, 163, 255, 0.12), transparent 40%), var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Inter, Arial, sans-serif;
  line-height: 1.6;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

a {
  color: var(--accent-2);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-links a:focus-visible,
.brand:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 10px;
}

.container {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

img {
  max-width: 100%;
  height: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 15, 20, 0.92);
  backdrop-filter: blur(6px);
}

.nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.brand .mono {
  color: var(--accent);
  font-family: Consolas, Monaco, monospace;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  border-color: var(--border);
  background: var(--bg-elev);
  text-decoration: none;
}

.hero {
  padding: 4rem 0 2.2rem;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  align-items: center;
  gap: 1.5rem;
}

.hero-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo img {
  width: min(100%, 280px);
  height: auto;
  object-fit: contain;
}

.hero-copy {
  min-width: 0;
}

.kicker {
  color: var(--accent);
  font-family: Consolas, Monaco, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.hero h1 {
  margin-top: 0.8rem;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.12;
}

.hero p {
  margin-top: 1rem;
  max-width: 70ch;
  color: var(--text-muted);
}

.cta-row {
  margin-top: 1.3rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
}

.btn:hover {
  text-decoration: none;
  background: var(--panel-2);
}

.btn.primary {
  border-color: rgba(77, 163, 255, 0.45);
  background: linear-gradient(180deg, #225082, #1b3f66);
}

.section {
  padding: 2rem 0;
}

.section h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
  margin-bottom: 0.9rem;
}

.section p.lead {
  color: var(--text-muted);
  max-width: 80ch;
  margin-bottom: 1.3rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid.cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.logo-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.8rem;
}

.logo-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 120px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  color: var(--text);
  text-decoration: none;
  padding: 0.75rem;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.logo-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(111, 211, 255, 0.45);
  text-decoration: none;
}

.logo-tile img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.logo-tile span {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
}

.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

a.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.card-link:hover {
  text-decoration: none;
}

a.card-link .card {
  transition: transform 0.18s ease, border-color 0.18s ease;
}

a.card-link:hover .card {
  transform: translateY(-2px);
  border-color: rgba(111, 211, 255, 0.45);
}

.card h3 {
  margin-bottom: 0.45rem;
}

.card p,
.card li {
  color: var(--text-muted);
}

.card,
.notice,
.kv dt,
.kv dd,
.card p,
.card li,
.card h3,
.card h4,
.resource-group h3,
.resource-group p {
  overflow-wrap: anywhere;
  word-break: normal;
}

.meta-row {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-elev);
}

.pill.ok {
  color: var(--ok);
  border-color: rgba(70, 201, 139, 0.35);
}

.pill.warn {
  color: var(--warn);
  border-color: rgba(255, 184, 108, 0.35);
}

.inline-list {
  margin-left: 1.2rem;
}

.inline-list li + li {
  margin-top: 0.3rem;
}

.inline-list a {
  font-weight: 500;
}

.polished-list li::marker {
  color: var(--accent-2);
}

.notice {
  border-left: 4px solid var(--accent);
  padding: 0.8rem 0.9rem;
  border-radius: 8px;
  background: rgba(77, 163, 255, 0.09);
  color: var(--text-muted);
}

.resource-layout {
  display: grid;
  gap: 1rem;
}

.resource-group {
  border-color: rgba(77, 163, 255, 0.45);
}

.resource-group h3 {
  margin-bottom: 0.35rem;
}

.resource-group > p {
  margin-bottom: 0.9rem;
}

.resource-group-grid {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.resource-group-hub-row {
  display: flex;
}

.resource-group-hub-row .card-link {
  flex: 1;
}

.resource-group-hub-row .mini-card {
  min-height: 70px;
}

.resource-group-os-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.mini-card {
  min-height: 140px;
  padding: 0.85rem;
}

.mini-card h4 {
  margin-bottom: 0.35rem;
  font-size: 1.02rem;
}

.mini-card p {
  margin-top: 0;
}

.footer {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  padding: 1.2rem 0 2rem;
  color: var(--text-muted);
  font-size: 0.93rem;
}

.kv {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0.5rem 1rem;
}

.kv dt {
  color: var(--text);
  font-weight: 600;
}

@media (max-width: 980px) {
  .hero {
    padding: 3rem 0 1.8rem;
  }

  .hero-layout {
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    gap: 1rem;
  }

  .hero-logo img {
    width: min(100%, 220px);
  }

  .resource-group-os-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kv {
    grid-template-columns: minmax(180px, 240px) 1fr;
  }
}

@media (max-width: 860px) {
  .nav {
    min-height: auto;
    padding: 0.75rem 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .brand {
    justify-content: center;
    text-align: center;
  }

  .nav-links {
    justify-content: center;
  }

  .nav-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero p,
  .hero h1 {
    text-align: center;
  }

  .hero-logo {
    justify-content: center;
  }

  .cta-row {
    justify-content: center;
  }

  .grid.cols-2,
  .grid.cols-3 {
    grid-template-columns: 1fr;
  }

  .mini-card,
  .resource-group-hub-row .mini-card {
    min-height: 0;
  }
}

@media (max-width: 700px) {
  .container {
    width: min(var(--max), calc(100% - 1.2rem));
  }

  .topbar {
    position: static;
  }

  .nav {
    min-height: auto;
    padding: 0.75rem 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .brand {
    justify-content: center;
    text-align: center;
    letter-spacing: 0.04em;
    font-size: 0.95rem;
  }

  .nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
  }

  .nav-links a {
    display: block;
    width: 100%;
    text-align: center;
    min-height: 44px;
    padding: 0.55rem 0.6rem;
  }

  .hero {
    padding: 2.1rem 0 1.2rem;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 0.85rem;
  }

  .hero-logo {
    justify-content: center;
  }

  .hero-logo img {
    width: min(100%, 180px);
  }

  .hero-copy {
    text-align: center;
  }

  .hero h1 {
    font-size: clamp(1.55rem, 8vw, 2.1rem);
    line-height: 1.18;
  }

  .hero p {
    margin-top: 0.75rem;
    font-size: 0.98rem;
  }

  .cta-row {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
    text-align: center;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .section {
    padding: 1.3rem 0;
  }

  .card {
    padding: 0.85rem;
    border-radius: 12px;
  }

  .grid {
    gap: 0.75rem;
  }

  .grid.cols-2,
  .grid.cols-3 {
    grid-template-columns: 1fr;
  }

  .logo-banner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer {
    font-size: 0.88rem;
    padding: 1rem 0 1.4rem;
  }

  .logo-tile {
    min-height: 96px;
    padding: 0.6rem;
  }

  .logo-tile img {
    width: 52px;
    height: 52px;
  }

  .meta-row {
    gap: 0.35rem;
  }

  .pill {
    font-size: 0.74rem;
  }

  .kv {
    grid-template-columns: 1fr;
  }

  .resource-group-os-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .container {
    width: calc(100% - 1rem);
  }

  .nav-links {
    grid-template-columns: 1fr;
  }

  .brand img {
    width: 30px;
    height: 30px;
  }

  .brand {
    font-size: 0.88rem;
  }

  .hero h1 {
    font-size: clamp(1.4rem, 8.8vw, 1.8rem);
  }

  .hero p,
  .section p,
  .card p,
  .card li,
  .notice {
    font-size: 0.95rem;
  }

  .section h2 {
    font-size: clamp(1.18rem, 7vw, 1.4rem);
    margin-bottom: 0.75rem;
  }

  .card {
    padding: 0.75rem;
  }

  .logo-banner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) and (orientation: landscape) {
  .hero {
    padding-top: 1.4rem;
  }

  .hero-logo img {
    width: min(100%, 150px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-tile,
  a.card-link .card {
    transition: none;
  }
}
