:root {
  --bg: #071a33;
  --bg-elev: #0d2647;
  --card: #102d53;
  --text: #eaf7fc;
  --muted: #9fc3d4;
  --accent: #1696d9;
  --accent-soft: rgba(22, 150, 217, 0.2);
  --border: rgba(227, 246, 252, 0.14);
  --max-width: 1060px;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(180deg, #061528 0%, var(--bg) 55%);
  color: var(--text);
}

body {
  line-height: 1.6;
}

.shell {
  width: min(100% - 2.5rem, var(--max-width));
  margin: 0 auto;
}

.site-header,
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
}

.brand {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.text-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 0.15rem;
}

.hero {
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.08;
  max-width: 17ch;
}

.hero .lead {
  margin-top: 1.4rem;
  color: var(--muted);
  max-width: 62ch;
  font-size: 1.08rem;
}

.hero .cta-row {
  margin-top: 2rem;
}

.button {
  display: inline-block;
  text-decoration: none;
  color: var(--text);
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.7rem 1.15rem;
  font-weight: 600;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 0 0 0.25rem var(--accent-soft);
}

.section {
  padding: 4.75rem 0;
  border-bottom: 1px solid var(--border);
}

.section-heading h2,
.section h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.2;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-size: 0.78rem;
  margin: 0 0 0.8rem;
}

.section-copy {
  color: var(--muted);
  max-width: 60ch;
}

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

.cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 1.5rem;
}

.card,
.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent), var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.card h3 {
  margin-top: 0;
  font-size: 1.05rem;
}

.card p {
  margin: 0.45rem 0;
}

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

.annotation {
  margin-top: 0.9rem;
  color: #c6e6f2;
  font-size: 0.95rem;
  border-left: 2px solid var(--accent);
  padding-left: 0.75rem;
}

.playground-layout {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.signal-group + .signal-group {
  margin-top: 1rem;
}

.signal-row {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: baseline;
}

.signal-row strong {
  font-size: 0.95rem;
}

.signal-row span {
  color: var(--muted);
  font-size: 0.9rem;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.preset-row {
  display: flex;
  gap: 0.65rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.preset-btn {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
}

.preset-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.output-text {
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.principles-grid {
  margin-top: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.closing {
  text-align: center;
}

.site-footer {
  color: var(--muted);
  font-size: 0.92rem;
  justify-content: center;
}

@media (max-width: 800px) {
  .playground-layout {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
  }
}
