:root {
  color-scheme: light dark;
  --bg: #f4f8ff;
  --surface: #ffffff;
  --text: #0d1b2a;
  --muted: #4b5d79;
  --accent: #0f5baa;
  --accent-2: #1e73be;
  --border: #d8e2f0;
  --shadow: 0 12px 30px rgba(15, 35, 70, 0.12);
}

:root[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #101a2e;
  --text: #e6edf8;
  --muted: #9fb0cb;
  --accent: #6aa9ff;
  --accent-2: #5f95d8;
  --border: #23324b;
  --shadow: 0 12px 30px rgba(2, 7, 16, 0.45);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(1200px 500px at 80% -20%, rgba(30, 115, 190, 0.2), transparent),
    radial-gradient(1000px 420px at -5% 100%, rgba(15, 91, 170, 0.18), transparent),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.site-shell {
  width: min(820px, 100vw);
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: block;
  width: min(360px, 70vw);
}

.brand img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.header-actions {
  display: flex;
  gap: 0.4rem;
}

.icon-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.9rem 0.8rem;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-weight: 700;
}

.mobile-nav a.active {
  border-color: var(--accent);
  color: var(--accent);
}

.content {
  padding: 1.1rem 0.9rem 0.6rem;
}

h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.35rem, 3.2vw, 2rem);
}

p {
  margin: 0 0 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

ul {
  color: var(--muted);
  margin-top: 0;
}

.card table {
  width: auto;
  max-width: 100%;
  border-collapse: separate;
  border-spacing: 0.85rem 0.35rem;
}

.card th,
.card td {
  padding: 0.2rem 0;
  color: var(--muted);
  text-align: left;
}

.card th:last-child,
.card td:last-child {
  text-align: right;
  white-space: nowrap;
}

.card {
  background: linear-gradient(145deg, rgba(30, 115, 190, 0.08), rgba(15, 91, 170, 0.03));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
}

.fiber-image {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin: 0.45rem 0 0.3rem;
}

.caption {
  margin-top: 0.2rem;
  font-size: 0.92rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.btn {
  display: inline-block;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  padding: 0.52rem 0.9rem;
  font-weight: 700;
}

.btn.alt {
  background: var(--accent-2);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 0.8rem 0.9rem 1rem;
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
  color: var(--text);
}

.site-footer a {
  color: var(--accent);
}

.copy-btn {
  font: inherit;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 7px;
  padding: 0.15rem 0.4rem;
  cursor: pointer;
}

#copyStatus {
  display: inline-block;
  margin-top: 0.35rem;
  color: var(--muted);
}

@media (min-width: 760px) {
  .site-shell {
    margin: 1rem auto 1.5rem;
    border-radius: 18px;
  }

  .mobile-nav {
    display: flex;
  }
  #menuToggle {
    display: none;
  }
}
