:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-alt: #f0efe9;
  --text: #111111;
  --muted: #555555;
  --accent: #1f8dff;
  --accent-2: #0a5dbb;
  --accent-3: #80c4ff;
  --border: rgba(17, 17, 17, 0.12);
  --shadow: 0 18px 60px rgba(15, 15, 15, 0.12);
  --radius: 18px;
  --banner-height: 44px;
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a.link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.top-banner {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: var(--banner-height);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.6));
  color: #f8f8f8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  padding: 0.45rem 1rem;
  line-height: 1.25;
}

.site-header {
  position: sticky;
  top: var(--banner-height);
  z-index: 25;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.9rem 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
  font-size: 1.05rem;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.nav-links a {
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
}

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

.route-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.route-switcher select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 0.55rem 1.3rem;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.2);
}

.cta.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: none;
}

.cta.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: none;
}

main {
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 3.5rem 0;
}

.hero {
  padding: 4.5rem 0 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
  gap: 2.5rem;
}

.hero > * {
  min-width: 0;
}

.hero > .container {
  width: 100%;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 3vw, 3.6rem);
  margin: 0 0 1rem;
  line-height: 1.1;
}

.hero p {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.page-hero {
  padding: 3.2rem 0 1.8rem;
}

.page-hero h1 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 2.5vw, 2.8rem);
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 640px;
}

.diff-block {
  margin-top: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.diff-block h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.diff-block ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.trust-rule {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 600;
}

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

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

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.08);
}

.card h4 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
}

.card p {
  margin: 0;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.metric {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 700;
}

.dashboard {
  border-radius: 24px;
  padding: 1.5rem;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.bar {
  height: 8px;
  background: var(--surface-alt);
  border-radius: 999px;
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th,
.table td {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
}

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

.diagram .node {
  background: var(--surface-alt);
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 0.8rem;
  font-size: 0.85rem;
  text-align: center;
}

.diagram-row {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  align-items: center;
}

.diagram-arrow {
  text-align: center;
  color: var(--muted);
  font-size: 1.1rem;
}

.timeline {
  position: relative;
  padding-left: 1.4rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--accent);
}

.timeline li {
  margin-bottom: 0.9rem;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 0.75rem;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-title h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.8rem;
}

.list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-family: var(--font-body);
  background: #fff;
  font-size: 0.95rem;
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  padding: 0;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.form-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-disclaimer {
  margin-top: 1.2rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-copy {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

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

pre {
  background: var(--surface-alt);
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.toast {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  background: var(--text);
  color: #fff;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(6px);
  z-index: 40;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .cta {
    transition: none;
  }
}

@media (max-width: 960px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.95rem;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    row-gap: 0.7rem;
  }
  .site-header {
    background: rgba(255, 255, 255, 0.96);
  }
}

@media (max-width: 720px) {
  .top-banner {
    position: static;
    padding: 0.5rem 0.75rem;
  }
  .site-header {
    top: 0;
  }
  .hero {
    padding-top: 3.5rem;
  }
  .nav-links {
    width: 100%;
    row-gap: 0.55rem;
  }
  .header-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }
  .route-switcher {
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 0.65rem;
  }
  .route-switcher span {
    flex: 0 0 auto;
  }
  .route-switcher select {
    max-width: 220px;
    min-width: 0;
  }
}
