@font-face {
  font-family: "Big Shoulders Display";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("/fonts/big-shoulders-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "Big Shoulders Display";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("/fonts/big-shoulders-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+1E00-1EFF, U+2020, U+20A0-20C0;
}
@font-face {
  font-family: "Red Hat Text";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/redhat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "Red Hat Text";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/redhat-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+1E00-1EFF, U+2020, U+20A0-20C0;
}
@font-face {
  font-family: "Red Hat Text";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/redhat-italic-latin.woff2") format("woff2");
}

:root {
  --night: #0c0a12;
  --asphalt: #14111a;
  --acm: #1c1822;
  --glass: rgba(255, 244, 250, 0.06);
  --glow: #ff5cad;
  --glow-soft: #ff8ac4;
  --electrode: #ff6a3d;
  --ink: #f6eef3;
  --muted: #d4b8c6;
  --line: rgba(255, 92, 173, 0.28);
  --wa: #25d366;
  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --font-body: "Red Hat Text", "Segoe UI", sans-serif;
  --radius: 2px;
  --pad: clamp(1rem, 3vw, 2.25rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--glow-soft); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
::selection { background: var(--glow); color: var(--night); }
:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 3px;
}
input, textarea, select, button { font: inherit; color: inherit; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--night); }
::-webkit-scrollbar-thumb { background: #4a3140; }
::-webkit-scrollbar-thumb:hover { background: var(--glow); }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--glow);
  color: var(--night);
  padding: 0.5rem 0.8rem;
  z-index: 20;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem var(--pad);
  background: var(--acm);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 8;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}
.wordmark svg { display: block; }
.wordmark-type {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  text-shadow: 0 0 12px rgba(255, 92, 173, 0.55);
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  font-size: 0.92rem;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

.site-footer {
  padding: 2.5rem var(--pad) 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
}
.site-footer a { color: var(--muted); }
.site-footer nav { display: flex; gap: 1rem; flex-wrap: wrap; }

.wrap { width: min(1120px, calc(100% - 2 * var(--pad))); margin-inline: auto; }
.prose { width: min(72ch, 100%); }
.prose h1, .prose h2, .prose h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 0.95;
  margin: 1.6em 0 0.45em;
}
.prose h1 { font-size: clamp(2.4rem, 7vw, 4.4rem); margin-top: 0; }
.prose h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
.prose p { margin: 0 0 1rem; color: var(--muted); }
.prose p strong { color: var(--ink); font-weight: 600; }
.prose ul { color: var(--muted); padding-left: 1.2rem; }
.prose li { margin: 0.35rem 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td {
  text-align: left;
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prose th { color: var(--ink); font-weight: 600; }

/* Facade / home */
.facade {
  min-height: calc(100svh - 64px);
  padding: 1.5rem var(--pad) 3rem;
  background:
    radial-gradient(1200px 480px at 50% -10%, rgba(255, 92, 173, 0.16), transparent 60%),
    linear-gradient(180deg, #100d16 0%, var(--night) 55%);
  display: grid;
  grid-template-columns: 1fr minmax(280px, 42%);
  gap: 2rem;
  align-items: end;
}
.facade-copy h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.4rem, 10vw, 7.2rem);
  line-height: 0.82;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0 0 1rem;
  max-width: 11ch;
}
.tube {
  color: var(--glow);
  text-shadow:
    0 0 8px var(--glow),
    0 0 28px rgba(255, 92, 173, 0.7);
}
.electrode {
  color: var(--electrode);
  text-shadow: 0 0 10px var(--electrode);
}
.facade-copy p {
  max-width: 42ch;
  color: var(--muted);
  font-size: 1.12rem;
  margin: 0 0 1.4rem;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }

.switch {
  appearance: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--glow);
  color: var(--night);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 1.05rem;
  padding: 0.85rem 1.15rem 0.75rem;
  box-shadow: 0 8px 24px rgba(255, 92, 173, 0.28);
}
.switch:hover { filter: brightness(1.06); color: var(--night); }
.switch-knob {
  width: 1.35rem;
  height: 0.7rem;
  border-radius: 99px;
  background: var(--night);
  position: relative;
}
.switch-knob::after {
  content: "";
  position: absolute;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--electrode);
  top: 0.08rem;
  right: 0.08rem;
  box-shadow: 0 0 8px var(--electrode);
}
.switch-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  border: 1px solid var(--line);
}
.switch-ghost:hover { color: var(--glow-soft); }

.window {
  background: #07060a;
  border: 10px solid #24202c;
  box-shadow:
    0 0 0 1px #3a3144,
    0 30px 80px rgba(0, 0, 0, 0.45),
    inset 0 0 40px rgba(255, 92, 173, 0.08);
  min-height: 420px;
  position: relative;
}
.window::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,0.07), transparent 32%, transparent 60%, rgba(255,92,173,0.08));
  z-index: 2;
}
.window iframe, .window-frame {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  background: #fff;
  display: block;
}
.window-label {
  position: absolute;
  left: 12px;
  bottom: -28px;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.strip {
  padding: 3rem var(--pad);
  border-top: 1px solid var(--line);
}
.strip h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin: 0 0 0.4rem;
  line-height: 0.95;
}
.strip > p { color: var(--muted); margin: 0 0 1.4rem; max-width: 50ch; }

.tube-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.tube-list a {
  display: grid;
  grid-template-columns: minmax(8rem, 18%) 1fr auto;
  gap: 1rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  align-items: baseline;
}
.tube-list a:hover .tube-name { color: var(--glow); text-shadow: 0 0 10px rgba(255,92,173,0.45); }
.tube-name {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}
.tube-list p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.tube-go { color: var(--electrode); font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; }

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.guide-grid article a {
  text-decoration: none;
  color: inherit;
  display: block;
  min-height: 100%;
  padding-top: 0.4rem;
  border-top: 2px solid var(--glow);
}
.guide-grid h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 1.45rem;
  margin: 0.5rem 0 0.35rem;
  line-height: 0.95;
}
.guide-grid p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.page-hero {
  padding: 2.2rem var(--pad) 1.2rem;
}
.page-hero h1 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(2.6rem, 8vw, 5rem);
  line-height: 0.86;
  margin: 0 0 0.6rem;
}
.page-hero p { color: var(--muted); max-width: 48ch; margin: 0; }

.tool-shell, .studio-shell {
  padding: 0 var(--pad) 3rem;
}

/* Studio */
.studio {
  display: grid;
  grid-template-columns: minmax(280px, 38%) 1fr;
  gap: 1.25rem;
  align-items: stretch;
  min-height: 70vh;
}
.studio-form {
  background: var(--acm);
  border: 1px solid var(--line);
  padding: 1rem;
  max-height: calc(100svh - 7rem);
  overflow: auto;
}
.studio-form h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 1.2rem;
  margin: 1.2rem 0 0.6rem;
}
.studio-form h2:first-child { margin-top: 0; }
.field { display: flex; flex-direction: column; gap: 0.25rem; margin: 0 0 0.75rem; }
.field label { font-size: 0.82rem; color: var(--muted); }
.field input, .field textarea, .field select {
  background: var(--night);
  border: 1px solid #3a3144;
  border-radius: var(--radius);
  padding: 0.5rem 0.6rem;
  width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--glow);
  outline: none;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.8rem; }
.chip {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 0.35rem 0.65rem;
  cursor: pointer;
}
.chip.is-on, .chip[aria-pressed="true"] {
  border-color: var(--glow);
  color: var(--ink);
  box-shadow: 0 0 12px rgba(255,92,173,0.25);
}
.studio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: sticky;
  bottom: 0;
  background: linear-gradient(transparent, var(--acm) 30%);
  padding-top: 1rem;
}
.studio-window { min-height: 70vh; display: flex; flex-direction: column; gap: 0.5rem; }
.studio-window .window, .studio-window iframe { min-height: 70vh; height: 100%; }
.studio-canvas {
  --gjs-main-color: #16131c;
  --gjs-primary-color: #16131c;
  --gjs-secondary-color: #f6eef3;
  --gjs-tertiary-color: #ff5cad;
  --gjs-quaternary-color: #ff8ac4;
  --gjs-font-color: #f6eef3;
  --gjs-font-color-active: #ffffff;
  --gjs-color-blue: #ff5cad;
  --gjs-color-highlight: #ff8ac4;
  --gjs-main-font: "Red Hat Text", "Segoe UI", sans-serif;
  --gjs-left-width: 17%;
  flex: 1;
  min-height: 70vh;
  height: calc(100svh - 8.5rem);
  border: 1px solid var(--line);
  background: var(--acm);
  position: relative;
}
.studio-canvas .gjs-editor { height: 100%; }
.studio-canvas .gjs-cv-canvas { background: #f7f3ee; }
.studio-jump { display: none; }
#gjs { scroll-margin-top: 0.6rem; }
.studio-check {
  list-style: none;
  padding: 0;
  margin: 0 0 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.studio-check li {
  font-size: 0.78rem;
  border: 1px solid var(--line);
  padding: 0.2rem 0.5rem;
  color: var(--muted);
}
.studio-check li.is-on {
  border-color: var(--glow);
  color: var(--ink);
}

.svc-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 0.4rem; margin-bottom: 0.4rem; }
.svc-row button { background: transparent; border: 1px solid var(--line); cursor: pointer; color: var(--muted); }

.status {
  font-size: 0.88rem;
  color: var(--muted);
  min-height: 1.2em;
}
.status.is-ok { color: var(--glow-soft); }
.status.is-err { color: var(--electrode); }

.tool-app {
  display: grid;
  grid-template-columns: minmax(240px, 40%) 1fr;
  gap: 1.25rem;
}
.panel {
  background: var(--acm);
  border: 1px solid var(--line);
  padding: 1rem;
}
.preview-box {
  background: #07060a;
  border: 1px solid var(--line);
  min-height: 280px;
  padding: 1rem;
  overflow: auto;
}
.preview-box.light { background: #f4f1ea; color: #1a1614; }
.mono {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.82rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.palette-row { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.swatch {
  width: 3.2rem;
  height: 3.2rem;
  border: 1px solid #000;
  cursor: pointer;
}

.menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.35rem 0.6rem;
  cursor: pointer;
}
@media (max-width: 860px) {
  .facade, .studio, .tool-app { grid-template-columns: 1fr; }
  .facade { min-height: auto; }
  .site-header { flex-wrap: wrap; }
  .nav { display: none; width: 100%; }
  .nav.is-open {
    display: flex;
    width: 100%;
    padding: 0.4rem 0 0.2rem;
  }
  .menu-btn { display: inline-flex; }
  .studio-form { max-height: none; }
  .studio-window, .studio-window .window, .studio-window iframe, .studio-canvas { min-height: 58vh; height: 70vh; }
  .studio-jump { display: inline-flex; margin-bottom: 0.8rem; }
  .tube-list a { grid-template-columns: 1fr; }
  .svc-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tube { text-shadow: none; }
}
