:root {
  /* Poster palette: deep cosmic blue background, white content cards, vivid pipeline accents */
  --ink: #0d1b3e;
  --muted: #58688a;

  --card: #ffffff;
  --card-soft: #f4f7ff;
  --line: rgba(13, 27, 62, 0.12);
  --shadow: 0 22px 70px rgba(2, 8, 25, 0.55);
  --card-shadow: 0 16px 44px rgba(8, 18, 48, 0.16);

  /* pipeline / accent colors taken from the poster */
  --blue: #1f5fd0;
  --purple: #7c3aed;
  --teal: #0f9d96;
  --orange: #e2622a;

  --spider: var(--teal);
  /* Z spider convention from the poster: light-green fill, dark-green outline */
  --spider-fill: #c7e7ba;
  --spider-stroke: #3f7a33;
  --recursive: #d95d39;
  --shallow: #2563eb;
  --flag: #8b5cf6;
  --mqt: #c2410c;
  --forest: #00a6a6;
  --mark: #ff8c42;
  --data-wire: #4f46e5;
  --flag-wire: #f59e0b;
}

* {
  box-sizing: border-box;
}

html {
  /* cosmic nebula background like the poster */
  background-color: #05091c;
  background-image:
    radial-gradient(ellipse 80% 60% at 20% -10%, rgba(124, 58, 237, 0.35), transparent 60%),
    radial-gradient(ellipse 70% 60% at 90% 0%, rgba(15, 157, 150, 0.30), transparent 55%),
    radial-gradient(ellipse 90% 70% at 50% 110%, rgba(31, 95, 208, 0.30), transparent 60%),
    linear-gradient(180deg, #060b22 0%, #040713 100%);
  background-attachment: fixed;
  color: var(--ink);
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Avenir Next", "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  background: rgba(13, 27, 62, 0.07);
  border-radius: 0.45rem;
  padding: 0.12rem 0.35rem;
}

.page-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 2.5rem;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.9fr 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.75rem 2rem;
  border-radius: 1.75rem;
  /* metallic silver frame echoing the poster's ornate header */
  border: 1.5px solid rgba(180, 205, 255, 0.35);
  background:
    linear-gradient(135deg, rgba(13, 27, 62, 0.92), rgba(8, 16, 42, 0.92)),
    radial-gradient(circle at 80% 0%, rgba(15, 157, 150, 0.22), transparent 45%),
    radial-gradient(circle at 10% 100%, rgba(124, 58, 237, 0.22), transparent 45%);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  color: #eef3ff;
}

.eyebrow {
  margin: 0 0 0.7rem;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8ff0e6;
  text-shadow: 0 0 18px rgba(110, 231, 223, 0.35);
}

.hero h1 {
  margin: 0 0 0.85rem;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(2.1rem, 3.8vw, 3.5rem);
  line-height: 1.04;
  color: #f4f8ff;
}

.hero h1 .hl {
  color: #ff8c5a;
  font-style: italic;
}

.hero-text {
  margin: 0;
  max-width: 60ch;
  color: #b9c6e6;
  font-size: 1.04rem;
}

.hero-text a {
  color: #8fd9d2;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  color: #06121a;
  background: linear-gradient(135deg, #6ee7df, #0f9d96);
  box-shadow: 0 8px 22px rgba(15, 157, 150, 0.4);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.hero-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(15, 157, 150, 0.5);
}

.hero-link.ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #d8e3ff;
  border: 1px solid rgba(180, 205, 255, 0.35);
  box-shadow: none;
}

.hero-link.ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

.hero-figure {
  display: grid;
  gap: 1rem;
  justify-items: center;
}

.hero-logo-glow {
  position: relative;
  display: grid;
  place-items: center;
  padding: 0.5rem;
}

.hero-logo-glow::before {
  content: "";
  position: absolute;
  inset: -8%;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(124, 58, 237, 0.55), transparent 62%),
    radial-gradient(circle at 60% 40%, rgba(15, 157, 150, 0.45), transparent 60%);
  filter: blur(14px);
  z-index: 0;
}

.hero-logo {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
  /* circular badge — render as a round logo */
  border-radius: 50%;
  filter: drop-shadow(0 14px 30px rgba(2, 8, 25, 0.6));
}

/* ---------- Pipeline ---------- */
.pipeline {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: 1.4rem;
  border: 1px solid rgba(180, 205, 255, 0.2);
  background: rgba(8, 16, 42, 0.55);
  box-shadow: var(--card-shadow);
}

.pipeline-label {
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #cdd9f5;
  white-space: nowrap;
}

.pipeline-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 1;
}

.pipe-step {
  flex: 1 1 auto;
  text-align: center;
  padding: 0.6rem 0.9rem;
  border-radius: 0.85rem;
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 8px 20px rgba(2, 8, 25, 0.4);
}

.step-blue { background: linear-gradient(135deg, #3b82f6, var(--blue)); }
.step-purple { background: linear-gradient(135deg, #9d5cf5, var(--purple)); }
.step-teal { background: linear-gradient(135deg, #19c2b6, var(--teal)); }
.step-orange { background: linear-gradient(135deg, #f5853f, var(--orange)); }

.pipe-arrow {
  color: #8fa3cf;
  font-size: 1.2rem;
  font-weight: 700;
}

/* ---------- Controls ---------- */
.controls-panel {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr;
  gap: 1rem;
  margin-top: 1.4rem;
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background: var(--card);
  box-shadow: var(--card-shadow);
}

.control-block {
  display: grid;
  gap: 0.55rem;
}

.control-block label {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
}

.control-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.9rem;
  align-items: center;
}

.control-row strong {
  color: var(--ink);
}

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

.control-note {
  align-self: center;
  padding: 0.4rem 0.2rem 0.4rem 0.9rem;
  border-left: 3px solid rgba(15, 157, 150, 0.3);
}

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

/* ---------- Parameter callout ---------- */
.param-callout {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0.95rem 1.3rem;
  border: 1px solid rgba(15, 157, 150, 0.35);
  border-radius: 1.2rem;
  background:
    linear-gradient(120deg, rgba(15, 157, 150, 0.12), rgba(31, 95, 208, 0.08)),
    var(--card);
  box-shadow: var(--card-shadow);
}

.param-callout-badge {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-size: 1.3rem;
  font-weight: 800;
  font-style: italic;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  box-shadow: 0 6px 16px rgba(15, 157, 150, 0.35);
}

.param-callout p {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.5;
}

.param-callout strong {
  color: var(--teal);
  font-weight: 800;
}

/* ---------- Section headings ---------- */
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.2rem 0 0.9rem;
  padding-left: 0.9rem;
  border-left: 5px solid var(--orange);
}

.section-heading h2 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 1.7rem;
  color: #eaf0ff;
}

.section-heading p {
  margin: 0;
  color: #aab8da;
}

/* ---------- Method cards ---------- */
.method-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.method-group-head {
  grid-row: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.7rem;
  margin-top: 0.4rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}

.method-group-head h3 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 1.15rem;
  color: #eaf0ff;
}

.method-group-head p {
  margin: 0;
  color: #aab8da;
  font-size: 0.92rem;
}

.method-card {
  grid-row: 2;
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background: var(--card);
  box-shadow: var(--card-shadow);
  border-top: 4px solid var(--teal);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  cursor: pointer;
}

.method-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(8, 18, 48, 0.24);
}

.method-card.selected {
  border-color: rgba(15, 157, 150, 0.55);
  box-shadow: 0 22px 50px rgba(15, 157, 150, 0.28);
}

.method-card.unavailable {
  opacity: 0.85;
  border-top-color: rgba(13, 27, 62, 0.2);
  background: linear-gradient(180deg, #ffffff, #eef2fb);
}

.method-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: start;
}

.method-header h3 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 1.2rem;
  color: var(--ink);
}

.kind-pill,
.highlight-pill,
.metric-label,
.inline-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
}

.kind-pill {
  border: 1px solid var(--line);
  color: var(--muted);
}

.highlight-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.highlight-pill {
  background: rgba(124, 58, 237, 0.1);
  color: var(--purple);
  font-weight: 600;
}

.method-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.metric-box {
  display: grid;
  gap: 0.18rem;
  padding: 0.7rem;
  border-radius: 1rem;
  background: var(--card-soft);
  border: 1px solid rgba(13, 27, 62, 0.08);
}

.metric-box strong {
  font-size: 1.2rem;
  color: var(--blue);
}

.metric-label {
  padding: 0;
  font-weight: 700;
  color: var(--muted);
}

.availability-box {
  display: grid;
  gap: 0.45rem;
  padding: 0.9rem;
  border-radius: 1.1rem;
  border: 1px dashed rgba(13, 27, 62, 0.18);
  background: var(--card-soft);
}

.availability-box strong {
  font-size: 1.02rem;
  line-height: 1.25;
}

.availability-box p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.availability-pill,
.availability-hint {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
}

.availability-pill {
  padding: 0.24rem 0.62rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
  background: var(--teal);
}

.availability-hint {
  padding: 0.18rem 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.method-footer {
  display: grid;
  gap: 0.4rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.method-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.method-link {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--teal);
  background: rgba(15, 157, 150, 0.1);
  border: 1px solid rgba(15, 157, 150, 0.25);
  transition: background 0.16s ease, transform 0.16s ease;
}

.method-link:hover {
  background: rgba(15, 157, 150, 0.18);
  transform: translateY(-1px);
}

/* ---------- Detail ---------- */
.detail-layout {
  display: grid;
  grid-template-columns: 1.55fr 0.95fr;
  gap: 1rem;
}

.visual-panel,
.detail-info {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--card);
  box-shadow: var(--card-shadow);
}

.visual-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.inline-pill {
  background: rgba(13, 27, 62, 0.06);
  color: var(--ink);
}

.visual-host {
  min-height: 560px;
  border-radius: 1rem;
  background: linear-gradient(180deg, #ffffff, #f1f5ff);
  border: 1px solid rgba(13, 27, 62, 0.06);
  overflow: auto;
}

.visual-host svg {
  display: block;
  width: 100%;
  height: auto;
}

.view-toggle {
  display: inline-flex;
  gap: 0.25rem;
  margin: 0.6rem 0.6rem 0;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(13, 27, 62, 0.06);
  border: 1px solid rgba(13, 27, 62, 0.08);
}

.view-toggle-button {
  padding: 0.4rem 0.95rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.view-toggle-button:hover {
  color: var(--ink);
}

.view-toggle-button.active {
  background: var(--card);
  color: var(--recursive);
  box-shadow: 0 4px 12px rgba(8, 18, 48, 0.12);
}

.zx-figure {
  margin: 0;
  padding: 0.4rem 0.8rem 0.9rem;
  display: grid;
  justify-items: center;
}

.zx-image {
  display: block;
  width: 100%;
  max-width: 980px;
  height: auto;
  border-radius: 0.75rem;
  background: #ffffff;
}

.export-panel {
  margin: 0.4rem 0.6rem 0.6rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(13, 27, 62, 0.1);
  background: rgba(244, 247, 255, 0.9);
  display: grid;
  gap: 0.6rem;
}

.export-summary {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.export-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
}

.export-flags {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.export-flags input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--recursive);
  cursor: pointer;
}

.export-button {
  padding: 0.45rem 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--recursive);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
  box-shadow: 0 6px 16px rgba(217, 93, 57, 0.28);
}

.export-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 20px rgba(217, 93, 57, 0.36);
}

.export-button.ghost {
  background: var(--card);
  color: var(--recursive);
  border-color: rgba(217, 93, 57, 0.4);
  box-shadow: none;
}

.export-button.ghost:hover {
  background: #fff3ee;
}

.export-button.copied {
  background: #2e8b57;
  box-shadow: none;
}

.export-button:disabled {
  opacity: 0.45;
  cursor: default;
  box-shadow: none;
  transform: none;
}

/* Draggable ZZ-measurements in the recursive ZX diagram */
.zx-meas-handle {
  cursor: ew-resize;
  touch-action: none;
}

.zx-meas-handle circle,
.zx-meas-handle line {
  transition: filter 0.12s ease;
}

.zx-meas-handle:hover circle,
.zx-meas-handle:focus-visible circle,
.zx-meas-handle.dragging circle {
  filter: drop-shadow(0 0 3px rgba(13, 27, 62, 0.45));
}

.zx-meas-handle:focus {
  outline: none;
}

.dragging-zx,
.dragging-zx .zx-meas-handle {
  cursor: ew-resize;
}

.zx-reset-row {
  display: flex;
  justify-content: flex-end;
  padding: 0.2rem 0.7rem 0.6rem;
}

.zoomable-figure {
  display: grid;
  gap: 0.7rem;
  padding: 0.2rem;
}

.zoom-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.zoom-hint {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.zoom-button {
  min-width: 2.5rem;
  height: 2.3rem;
  padding: 0 0.8rem;
  border: 1px solid rgba(13, 27, 62, 0.12);
  border-radius: 999px;
  background: var(--card-soft);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.zoom-button:hover:not(:disabled) {
  background: #e9eefb;
  border-color: rgba(15, 157, 150, 0.4);
  transform: translateY(-1px);
}

.zoom-button:disabled {
  opacity: 0.5;
  cursor: default;
}

.zoom-readout {
  min-width: 4.3rem;
}

.zoom-viewport {
  overflow: auto;
  min-height: 420px;
  height: clamp(420px, 62vh, 620px);
  border-radius: 1rem;
  border: 1px solid rgba(13, 27, 62, 0.08);
  background: linear-gradient(180deg, #ffffff, #f1f5ff);
}

.zoom-stage {
  min-width: 100%;
}

.zoom-stage svg {
  display: block;
  width: 100%;
  height: auto;
}

.graph-node-handle {
  cursor: grab;
  touch-action: none;
}

.graph-node-handle.dragging,
.dragging-graph .graph-node-handle {
  cursor: grabbing;
}

.graph-node-handle text {
  user-select: none;
  pointer-events: none;
}

.circuit-gate-handle {
  cursor: ew-resize;
  touch-action: none;
}

.circuit-gate-handle.dragging,
.dragging-graph .circuit-gate-handle {
  cursor: grabbing;
}

.visual-caption {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.detail-info {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.detail-info h3 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 1.25rem;
  color: var(--ink);
}

.detail-info p,
.detail-info ul {
  margin: 0;
  color: var(--muted);
}

.detail-info ul {
  padding-left: 1.1rem;
}

.detail-kpis {
  display: grid;
  gap: 0.7rem;
}

.detail-kpi {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: baseline;
  padding-bottom: 0.65rem;
  border-bottom: 1px dashed rgba(13, 27, 62, 0.12);
}

.detail-kpi:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.detail-kpi span {
  color: var(--muted);
}

.detail-kpi strong {
  font-size: 1.08rem;
  color: var(--blue);
}

/* ---------- Export ---------- */
.export-block {
  margin-top: 1rem;
  padding-top: 0.95rem;
  border-top: 1px dashed rgba(13, 27, 62, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.export-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.export-button {
  cursor: pointer;
  border: 1px solid var(--spider-stroke);
  background: var(--spider-fill);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  padding: 0.5rem 0.95rem;
  border-radius: 0.7rem;
  transition: filter 0.15s ease, transform 0.05s ease;
}

.export-button:hover {
  filter: brightness(0.96);
}

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

.export-hint {
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---------- Notes ---------- */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.note-card {
  padding: 1rem 1.05rem;
  border-radius: 1.25rem;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--card-shadow);
  border-left: 5px solid var(--purple);
}

.note-card:nth-child(2) { border-left-color: var(--teal); }
.note-card:nth-child(3) { border-left-color: var(--orange); }

.note-card h3 {
  margin: 0 0 0.4rem;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  color: var(--ink);
}

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

/* ---------- Footer ---------- */
.footer {
  margin: 2.2rem 0 0.5rem;
  padding: 1rem 1.2rem;
  border-radius: 1.2rem;
  border: 1px solid rgba(180, 205, 255, 0.18);
  background: rgba(8, 16, 42, 0.5);
}

.footer p {
  margin: 0;
  color: #aab8da;
}

.footer a {
  color: #8fd9d2;
}

.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 440px;
  padding: 2rem;
  color: var(--muted);
  text-align: center;
}

.decomp-output {
  margin: 0.6rem;
  padding: 1rem 1.1rem;
  border-radius: 0.75rem;
  background: #0d1b3e;
  color: #e6edff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.35;
  white-space: pre;
  overflow: auto;
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .hero,
  .controls-panel,
  .detail-layout,
  .notes-grid,
  .method-grid {
    grid-template-columns: 1fr;
  }

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

  /* Below the wide breakpoint there aren't enough columns for the single-row
     layout, so revert headers and cards to natural grouped stacking. */
  .method-group-head {
    grid-row: auto !important;
    grid-column: 1 / -1 !important;
  }

  .method-card {
    grid-row: auto;
  }

  .control-note {
    border-left: 0;
    border-top: 3px solid rgba(15, 157, 150, 0.3);
    padding-left: 0;
    padding-top: 0.8rem;
  }

  .pipe-step {
    flex-basis: 100%;
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 1rem;
  }

  .hero,
  .controls-panel,
  .visual-panel,
  .detail-info,
  .note-card,
  .method-card {
    padding: 0.95rem;
  }

  .method-grid,
  .notes-grid {
    grid-template-columns: 1fr;
  }

  .visual-host {
    min-height: 420px;
  }

  .zoom-viewport {
    min-height: 340px;
    height: clamp(340px, 56vh, 480px);
  }

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

  .section-heading {
    flex-direction: column;
    align-items: start;
  }

  .pipe-arrow {
    transform: rotate(90deg);
    width: 100%;
    text-align: center;
  }
}
