:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-elevated: rgba(15, 23, 42, 0.8);
  --panel: rgba(15, 23, 42, 0.88);
  --line: rgba(148, 163, 184, 0.24);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #22c55e;
  --accent-soft: rgba(34, 197, 94, 0.14);
  --shadow: 0 32px 80px rgba(2, 6, 23, 0.45);
  --radius-lg: 28px;
  --radius-md: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.16), transparent 32%),
    radial-gradient(circle at 85% 15%, rgba(56, 189, 248, 0.12), transparent 20%),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
  font-family: "Instrument Sans", "Segoe UI", sans-serif;
}

.page-shell {
  position: relative;
  overflow: hidden;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.13;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 100%);
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 28px;
  padding: 56px 0 32px;
  align-items: center;
}

.hero-copy h1,
.section-heading h2,
.panel-head h3,
.info-head h3,
.support-card h3 {
  margin: 0;
  font-family: "Space Mono", monospace;
  letter-spacing: -0.03em;
}

.hero-copy h1 {
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  line-height: 0.94;
  max-width: 10ch;
}

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

.hero-text {
  max-width: 58ch;
  margin: 24px 0 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-actions,
.hero-points,
.panel-actions,
.example-row,
.status-badges,
.target-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 28px;
}

.hero-points {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.hero-points li,
.support-card p,
.notice-list li,
.example-row span {
  color: var(--text-muted);
}

.eyebrow,
.label,
.panel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: #cbd5e1;
}

.eyebrow-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 10px rgba(34, 197, 94, 0.16);
}

.solid-button,
.ghost-button,
.target-chip,
.mini-chip {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    color 220ms ease,
    transform 220ms ease,
    box-shadow 220ms ease;
}

.solid-button {
  padding: 14px 22px;
  background: var(--accent);
  color: #04120b;
  font-weight: 700;
  box-shadow: 0 12px 26px rgba(34, 197, 94, 0.24);
}

.solid-button:hover,
.solid-button:focus-visible {
  background: #4ade80;
  transform: translateY(-1px);
}

.ghost-button,
.target-chip,
.mini-chip {
  padding: 12px 18px;
  background: rgba(15, 23, 42, 0.44);
  border-color: rgba(148, 163, 184, 0.18);
  color: var(--text);
}

.ghost-button:hover,
.ghost-button:focus-visible,
.target-chip:hover,
.target-chip:focus-visible,
.mini-chip:hover,
.mini-chip:focus-visible {
  border-color: rgba(34, 197, 94, 0.42);
  background: rgba(30, 41, 59, 0.78);
}

.target-chip.is-active {
  background: var(--accent-soft);
  border-color: rgba(34, 197, 94, 0.54);
  color: #bbf7d0;
}

.small {
  padding: 10px 16px;
  font-size: 0.95rem;
}

.mini-chip {
  padding: 8px 12px;
  font-size: 0.84rem;
}

.hero-card,
.panel,
.info-card,
.support-card {
  position: relative;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.88));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.hero-card {
  padding: 18px;
  overflow: hidden;
}

.window-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.window-bar span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.24);
}

.window-bar span:first-child {
  background: #fb7185;
}

.window-bar span:nth-child(2) {
  background: #facc15;
}

.window-bar span:nth-child(3) {
  background: var(--accent);
}

.hero-snippet,
.code-output,
textarea {
  margin: 0;
  border: 0;
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.9)),
    linear-gradient(90deg, rgba(34, 197, 94, 0.07), transparent);
  color: var(--text);
  font-family: "Space Mono", monospace;
  line-height: 1.65;
}

.hero-snippet {
  padding: 22px;
  min-height: 420px;
  overflow: auto;
  font-size: 0.93rem;
}

.workspace {
  padding: 44px 0 24px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.converter-grid,
.insights-grid,
.support-grid {
  display: grid;
  gap: 18px;
}

.converter-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.insights-grid {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  margin-top: 18px;
}

.panel,
.info-card {
  padding: 18px;
}

.panel-head,
.info-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

textarea {
  width: 100%;
  min-height: 430px;
  padding: 20px;
  resize: vertical;
  outline: none;
  font-size: 0.94rem;
}

textarea::placeholder {
  color: rgba(148, 163, 184, 0.9);
}

textarea:focus-visible,
.target-chip:focus-visible,
.solid-button:focus-visible,
.ghost-button:focus-visible,
.mini-chip:focus-visible {
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.24);
  outline: none;
}

.input-footer {
  margin-top: 14px;
  display: grid;
  gap: 14px;
}

.badge {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-family: "Space Mono", monospace;
}

.badge.accent {
  background: rgba(34, 197, 94, 0.14);
  color: #bbf7d0;
}

.badge.muted {
  background: rgba(51, 65, 85, 0.6);
  color: #cbd5e1;
}

.code-output {
  min-height: 536px;
  max-height: 620px;
  overflow: auto;
  padding: 22px;
  font-size: 0.93rem;
  white-space: pre-wrap;
}

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 20px;
  margin: 0;
}

.facts dt {
  color: #94a3b8;
  font-family: "Space Mono", monospace;
}

.facts dd {
  margin: 0;
  color: var(--text);
  word-break: break-word;
}

.notice-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
}

.support-section {
  padding: 28px 0 68px;
}

.support-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.support-card {
  padding: 18px;
  min-height: 168px;
}

.support-card h3 {
  margin-bottom: 12px;
  font-size: 1.15rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1100px) {
  .hero,
  .converter-grid,
  .insights-grid,
  .support-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .section {
    width: min(100% - 20px, 100%);
  }

  .hero {
    padding-top: 22px;
  }

  .panel,
  .info-card,
  .support-card,
  .hero-card {
    border-radius: 22px;
  }

  .hero-snippet,
  .code-output,
  textarea {
    border-radius: 18px;
  }

  .section-heading,
  .panel-head,
  .info-head {
    align-items: flex-start;
    flex-direction: column;
  }

  textarea {
    min-height: 320px;
  }

  .code-output {
    min-height: 400px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
