:root {
  color-scheme: dark;
  --bg: #101828;
  --bg-deep: #020617;
  --panel: rgba(15, 23, 42, 0.74);
  --panel-soft: rgba(15, 23, 42, 0.54);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.16);
  --red: #b91c1c;
  --red-dark: #7f1d1d;
  --red-soft: rgba(127, 29, 29, 0.22);
  --green: #34d399;
  --shadow: 0 28px 68px rgba(2, 6, 23, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.12), transparent 30%),
    radial-gradient(circle at 84% 18%, rgba(148, 163, 184, 0.09), transparent 22%),
    radial-gradient(circle at 50% 110%, rgba(59, 130, 246, 0.07), transparent 28%),
    linear-gradient(180deg, #101828 0%, #162132 48%, #2c374c 100%);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: radial-gradient(circle at center, black, transparent 84%);
  opacity: 0.18;
  pointer-events: none;
}

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

button,
input,
select {
  font: inherit;
}

img,
svg {
  display: block;
}

.section-shell {
  width: min(100% - 1.5rem, 82rem);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0.75rem;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 1.5rem, 82rem);
  margin: 0.75rem auto 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  background: rgba(2, 6, 23, 0.72);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.18);
  backdrop-filter: blur(18px);
}

.brand,
.site-nav,
.panel-heading,
.site-footer > div {
  display: flex;
  align-items: center;
}

.brand {
  min-width: 0;
  gap: 0.75rem;
  font-weight: 700;
}

.brand span {
  white-space: nowrap;
}

.site-nav {
  gap: 1.25rem;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 600;
}

.site-nav a {
  transition: color 180ms ease;
}

.site-nav a:hover {
  color: #fca5a5;
}

.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  margin-top: 1.5rem;
}

.intro-panel,
.panel,
.fact-card,
.site-footer {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--panel), var(--panel-soft));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.intro-panel::before,
.panel::before,
.fact-card::before,
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 24%),
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.1), transparent 28%),
    radial-gradient(circle at bottom left, rgba(148, 163, 184, 0.06), transparent 22%);
  pointer-events: none;
}

.intro-panel {
  border-radius: 2rem;
  padding: clamp(1.35rem, 3vw, 2rem);
}

.intro-panel > *,
.panel > *,
.fact-card > *,
.site-footer > * {
  position: relative;
  z-index: 1;
}

.page-kicker {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(185, 28, 28, 0.7);
  border-radius: 999px;
  background: var(--red-soft);
  padding: 0.625rem 1rem;
  color: #fef2f2;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 56rem;
  margin-top: 1rem;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.05;
}

.intro-panel p {
  max-width: 48rem;
  margin-top: 0.85rem;
  color: #dbe4f0;
  font-size: 1rem;
  line-height: 1.7;
}

.button {
  display: inline-flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.95rem 1.6rem;
  color: var(--text);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--red);
  box-shadow: 0 16px 32px rgba(127, 29, 29, 0.24);
}

.button-primary:hover {
  background: #dc2626;
}

.button-secondary {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.button-secondary:hover {
  border-color: rgba(185, 28, 28, 0.6);
  color: #fca5a5;
}

.panel-heading p,
.fact-card p {
  color: var(--subtle);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.icon-box {
  display: inline-flex;
  width: 3.2rem;
  height: 3.2rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--red);
  border-radius: 1rem;
  background: var(--red);
  color: white;
  box-shadow: 0 16px 34px rgba(127, 29, 29, 0.28);
}

.icon-box svg {
  width: 1.45rem;
  height: 1.45rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.terminal-preview,
.terminal pre,
#terminalOutput {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.terminal-preview {
  min-height: 13rem;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.4rem;
  background: rgba(0, 0, 0, 0.35);
  padding: 1.25rem;
  color: #dbe4f0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.95rem;
  line-height: 1.75;
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 1.5rem;
}

.fact-card {
  border-radius: 1.75rem;
  padding: 1.35rem;
}

.fact-card strong {
  display: block;
  margin-top: 0.6rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1;
}

.fact-card .icon-box {
  margin-bottom: 1.2rem;
}

.console-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1.5rem;
  align-items: start;
  padding-top: 1.5rem;
  scroll-margin-top: 6rem;
}

.panel {
  border-radius: 2rem;
  padding: clamp(1.35rem, 3vw, 2rem);
}

.panel-heading {
  gap: 1rem;
}

.panel-heading h2 {
  margin-top: 0.25rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.15;
}

.form-panel {
  display: grid;
  gap: 1.4rem;
}

.locked-target {
  display: grid;
  gap: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 1rem;
}

.locked-target span {
  color: var(--subtle);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.locked-target strong {
  color: white;
  font-size: 1.12rem;
}

.locked-target code {
  color: #fca5a5;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 1rem;
  font-weight: 800;
}

.field {
  display: grid;
  gap: 0.55rem;
}

.field label {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.field span {
  color: var(--subtle);
  font-size: 0.9rem;
  line-height: 1.6;
}

select,
input {
  min-height: 3.15rem;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  outline: none;
  background: rgba(2, 6, 23, 0.7);
  color: var(--text);
  padding: 0 1rem;
  transition: border-color 180ms ease;
}

select:focus,
input:focus {
  border-color: rgba(185, 28, 28, 0.7);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.1rem;
  background: rgba(2, 6, 23, 0.45);
  padding: 0.35rem;
}

.segment {
  min-height: 2.75rem;
  border: 0;
  border-radius: 0.8rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.segment.active {
  background: var(--red);
  color: white;
  box-shadow: 0 12px 24px rgba(127, 29, 29, 0.22);
}

.quick-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quick-targets button {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  padding: 0.65rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 800;
}

.quick-targets button:hover {
  border-color: rgba(185, 28, 28, 0.55);
  color: #fca5a5;
}

.form-message {
  min-height: 1.4rem;
  color: #fecaca;
  font-size: 0.92rem;
  line-height: 1.5;
}

.submit-button {
  width: 100%;
}

.submit-button[disabled] {
  cursor: wait;
  opacity: 0.68;
}

.terminal {
  margin-top: 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  background: rgba(0, 0, 0, 0.42);
}

.terminal-chrome {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.85rem 1rem;
}

.terminal-chrome span {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
}

.terminal-chrome span:nth-child(1) {
  background: #ef4444;
}

.terminal-chrome span:nth-child(2) {
  background: #f59e0b;
}

.terminal-chrome span:nth-child(3) {
  background: var(--green);
}

.terminal-chrome small {
  margin-left: 0.5rem;
  color: var(--subtle);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

#terminalOutput {
  min-height: 28rem;
  max-height: 44rem;
  margin: 0;
  overflow: auto;
  padding: 1.2rem;
  color: #dbe4f0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.65;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-block: 1.5rem 2rem;
  border-radius: 1.5rem;
  padding: 1.25rem 1.4rem;
}

.site-footer > div {
  gap: 0.8rem;
  font-weight: 800;
}

.site-footer p {
  color: var(--subtle);
  font-size: 0.92rem;
  line-height: 1.6;
}

@media (max-width: 980px) {
  .intro-panel,
  .console-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 680px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.85rem;
  }

  .intro-panel,
  .panel {
    border-radius: 1.5rem;
  }

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

  .button {
    width: 100%;
  }
}
