/* throughthewire.dev — the product site. No build step: plain CSS, served as is.
   Palette: magenta is the brand accent, amber the second accent, red what
   the sandbox refused, all on a deep blue-black. Green appears only where
   it means something: inside the terminal and on secrets, where it reads
   as "allowed" next to red. */

:root {
  --ink: #04121b;
  --surface: #0a1c27;
  --raised: #12283a;
  --edge: #1d3443;
  --text: #dde4ea;
  --dim: #8b9aa8;
  --accent: #d65cc6; /* magenta, softened from the palette's #d65cc6: present, not neon */
  --coral: #ea332f; /* red: refused */
  --green: #98c379;
  --amber: #f2ac3c; /* amber: the second accent */

  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* A perfect fourth from a 17px base. */
  --step-0: 1.0625rem;
  --step-1: 1.4rem;
  --step-2: 1.85rem;
  --step-3: 2.45rem;
  --step-4: clamp(2.6rem, 1.6rem + 3.4vw, 4.1rem);

  --gutter: clamp(1.25rem, 0.6rem + 2.6vw, 3rem);
  --measure: 60ch;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: var(--step-0)/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; max-width: var(--measure); text-wrap: pretty; }
a { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: 0.75rem;
  z-index: 10;
  background: var(--raised);
  padding: 0.6rem 1rem;
  border-radius: 6px;
}

/* ---- masthead ---------------------------------------------------------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
}

.wordmark {
  font: 700 1.0625rem/1 var(--mono);
  letter-spacing: -0.03em;
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
/* The mark: the name and a steady cursor block. */
.wordmark::after {
  content: "";
  width: 0.5rem;
  height: 1.05rem;
  background: var(--accent);
}
@keyframes blink { 50% { opacity: 0; } }

.masthead nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.95rem;
}
.masthead nav a {
  color: var(--dim);
  text-decoration: none;
}
.masthead nav a:hover { color: var(--text); }

/* ---- hero -------------------------------------------------------------- */

.hero {
  display: grid;
  gap: clamp(2.5rem, 1rem + 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 1rem + 5vw, 5rem) clamp(3rem, 1rem + 6vw, 6rem);
}
@media (min-width: 62rem) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); }
}

/* Three lines, broken where the sentence turns, sized so "not your
   machine." stays whole in the hero column on a laptop. */
.hero h1 {
  font-size: clamp(2.2rem, 1rem + 2.4vw, 3rem);
  line-height: 1.12;
}
.hero h1 span { display: block; }
.hero h1 .turn { color: var(--accent); }
.hero-lede {
  margin-top: 1.5rem;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--text);
  max-width: 34ch;
}
.hero-sub {
  margin-top: 1.1rem;
  color: var(--dim);
  max-width: 44ch;
}

.actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border-radius: 7px;
  font: 600 0.98rem/1 var(--sans);
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: #04121b;
}
.btn-primary:hover { background: #e07fd3; }
.btn-ghost {
  border-color: var(--edge);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--dim); }
/* A quiet duration after a label: "Watch the explainer 1:18". */
.btn-meta {
  margin-left: 0.4rem;
  font: 500 0.85em/1 var(--mono);
  color: var(--dim);
}

/* ---- the terminal proof ------------------------------------------------ */

.term {
  background: #061620;
  border: 1px solid var(--edge);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.75);
}
/* A browser window around the terminal: the product is used in a tab. */
.browser-tabs {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem 0;
  background: #020c13;
}
.lights { display: flex; gap: 0.45rem; align-self: center; margin: 0 0.6rem 0.4rem 0.15rem; }
.lights i { width: 0.68rem; height: 0.68rem; border-radius: 50%; background: #ea332f; }
.lights i:nth-child(2) { background: #f2ac3c; }
.lights i:nth-child(3) { background: #4fae55; }
.tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 11rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px 8px 0 0;
  background: #0b1d28;
  font: 0.78rem/1 var(--sans);
  color: var(--text);
}
.tab img { border-radius: 3px; }
.tab b { margin-left: auto; font-weight: 400; color: #627384; }
.tab-new { padding: 0 0.5rem 0.5rem; color: #627384; font: 1rem/1 var(--sans); }
.browser-toolbar {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.8rem;
  background: #0b1d28;
  border-bottom: 1px solid #18303f;
}
.browser-toolbar .nav {
  width: 0.95rem;
  height: 0.95rem;
  flex: none;
  fill: none;
  stroke: #8b9aa8;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.browser-toolbar .nav.off { stroke: #2a4152; }
.url {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  margin-left: 0.2rem;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  background: #03101a;
  font: 0.78rem/1 var(--sans);
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
}
.url svg { width: 0.75rem; height: 0.75rem; flex: none; margin-right: 0.5rem; color: #8b9aa8; }
.url b { font-weight: 400; color: var(--dim); }
.tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 0.6rem;
  padding: 0.5rem 1.6rem 0.5rem 0.75rem;
  border-radius: 7px 7px 0 0;
  background: #071823;
  font: 500 0.75rem/1 var(--mono);
  color: var(--text);
}
.tab-icon {
  width: 0.4rem;
  height: 0.8rem;
  background: var(--accent);
}
.browser-url {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem 0.55rem;
  background: #071823;
  border-bottom: 1px solid #18303f;
  color: #627384;
  font: 0.75rem/1 var(--mono);
}
.browser-url > span {
  flex: 1;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: #0a1c27;
  color: var(--dim);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.browser-url b { font-weight: 500; color: var(--text); }
/* tmux's status line, the way a workspace terminal really looks. */
.tmux {
  display: flex;
  gap: 0.7rem;
  padding: 0.3rem 0.9rem;
  background: #2a3a2a;
  color: #c8d6bd;
  font: 0.72rem/1.4 var(--mono);
}
.tmux-session { color: #e8f2df; font-weight: 500; }
.tmux-right { margin-left: auto; color: #9fb393; }

.term-body {
  margin: 0;
  padding: 1.1rem 1.2rem 1.4rem;
  font: 0.86rem/1.75 var(--mono);
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 27rem; /* the whole story, so the box doesn't jump as it types */
}
@media (max-width: 30rem) {
  .term-body { font-size: 0.76rem; min-height: 24rem; }
}

.term-body .u { color: var(--green); }      /* the prompt + what was typed */
.term-body .c { color: #e8edf5; }
.term-body .no { color: var(--coral); }     /* refused */
.term-body .ok { color: var(--green); }     /* allowed */
.term-body .mute { color: #627384; }
.term-body .past { opacity: 0.6; transition: opacity 0.6s; } /* the previous workspace's scrollback */

.caret {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  background: var(--green);
  vertical-align: -0.18em;
}
.caret.done { animation: blink 1.2s steps(1) infinite; }

/* ---- the three claims -------------------------------------------------- */

.claims {
  display: grid;
  gap: 1px;
  background: var(--edge);
  border-block: 1px solid var(--edge);
}
@media (min-width: 48rem) {
  .claims { grid-template-columns: repeat(3, 1fr); }
}
.claim {
  background: var(--ink);
  padding: 2rem var(--gutter);
}
.claim b {
  display: block;
  font: 700 var(--step-1)/1.15 var(--mono);
  letter-spacing: -0.03em;
  color: #fff;
}
.claim span {
  display: block;
  margin-top: 0.6rem;
  color: var(--dim);
  font-size: 0.97rem;
  max-width: 32ch;
}
/* Stacked on a phone, the claims run edge to edge with the gutter inside.
   In a row they sit within the same edges as everything else, the first
   one's text lined up with the headings. */
.claims-wrap { max-width: 76rem; margin-inline: auto; }
@media (min-width: 48rem) {
  .claims-wrap { padding-inline: var(--gutter); }
  .claim { padding: 2rem 1.75rem; }
  .claim:first-child { padding-left: 0; }
}

/* ---- generic section --------------------------------------------------- */

.section { padding-block: clamp(3rem, 1.5rem + 4vw, 5rem); }
/* Straight after the claims strip, which already carries its own rule. */
.section-film { padding-bottom: 0; }
.section h2 { font-size: clamp(1.9rem, 1.2rem + 1.6vw, 2.45rem); }

/* Heading and its intro: stacked on a phone, side by side on a wide screen,
   so the text spans the same width as the boxes and pictures below it. */
.section-head p { margin-top: 1.1rem; color: var(--dim); }
@media (min-width: 62rem) {
  .section-head {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 4rem;
    align-items: start;
  }
  .section-head p { margin-top: 0.35rem; max-width: none; }
}

.shot {
  margin: 2.5rem 0 0; /* figure's default 40px side margins would indent it */
  border: 1px solid var(--edge);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.8);
}
.shot img, .shot video { display: block; width: 100%; height: auto; }
.shot video { background: #000; }
.shot figcaption {
  padding: 0.9rem 1.1rem;
  border-top: 1px solid var(--edge);
  background: var(--surface);
  color: var(--dim);
  font-size: 0.9rem;
}

/* ---- the two features, linking to their full story -------------------- */

.section-features { padding-bottom: 0; }
.features { display: grid; gap: 1rem; }
@media (min-width: 52rem) {
  .features { grid-template-columns: 1fr 1fr; }
}
.feature {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: var(--surface);
  padding: 1.6rem 1.7rem;
  text-decoration: none;
  color: inherit;
}
.feature:hover { border-color: var(--dim); }
.feature h3 { font: 700 var(--step-1)/1.15 var(--mono); letter-spacing: -0.03em; color: #fff; }
.feature p { margin-top: 0.75rem; color: var(--dim); max-width: none; }
/* Who gets what: one line for managers, one for developers. */
.feature-for {
  margin: 1.1rem 0 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem 0.9rem;
  padding-top: 1rem;
  border-top: 1px solid var(--edge);
  font-size: 0.93rem;
}
.feature-for dt { font: 600 0.75rem/1.9 var(--mono); color: var(--amber); text-transform: uppercase; letter-spacing: 0.04em; }
.feature-for dd { margin: 0; color: var(--text); }
.feature-more { margin-top: auto; padding-top: 1.1rem; font: 600 0.92rem/1 var(--sans); color: var(--text); }
.feature:hover .feature-more { color: var(--accent); }

/* ---- contact ----------------------------------------------------------- */

.contact {
  border-top: 1px solid var(--edge);
  padding-block: clamp(3.5rem, 2rem + 5vw, 5.5rem);
}
.contact h2 { font-size: var(--step-2); }
.contact p { margin-top: 1.1rem; color: var(--dim); }

/* ---- the two ways, side by side ---------------------------------------- */

.swap {
  margin-top: 2.25rem;
  display: grid;
  gap: 1px;
  background: var(--edge);
  border: 1px solid var(--edge);
  border-radius: 10px;
  overflow: hidden;
}
@media (min-width: 46rem) {
  .swap { grid-template-columns: 1fr 1fr; }
}
.swap-col {
  background: var(--surface);
  padding: 1.5rem;
}
/* Ours carries the accent edge; the other stays neutral rather than being
   painted as the villain. */
.swap-col.is-ours { background: #0e2230; box-shadow: inset 3px 0 0 var(--accent); }
.swap-col h3 {
  font: 700 0.95rem/1.2 var(--mono);
  letter-spacing: -0.01em;
  color: #fff;
}
.swap-col > p { margin-top: 0.6rem; font-size: 0.97rem; color: var(--dim); max-width: none; }

.keylist {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.keylist li {
  font: 500 0.86rem/1 var(--mono);
  padding: 0.42rem 0.6rem;
  border-radius: 6px;
}
.keylist .no { background: rgba(234, 51, 47, 0.16); color: var(--coral); }
.keylist .yes { background: rgba(152, 195, 121, 0.14); color: var(--green); }

/* Profiles a workspace carries: a name, then what's in it. Secrets in
   green, plain variables neutral. */
.profiles { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.profiles li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--edge);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.12);
}
.profiles b { font: 600 0.88rem/1 var(--mono); color: #fff; margin-right: 0.35rem; }
.profiles span { font: 500 0.8rem/1 var(--mono); padding: 0.32rem 0.5rem; border-radius: 5px; }
.profiles .yes { background: rgba(152, 195, 121, 0.14); color: var(--green); }
.profiles .var { background: rgba(139, 154, 168, 0.12); color: var(--dim); }

/* Image + devtools = workspace: three parts in a row on a wide screen,
   stacked with the operators between them on a phone. */
.compose {
  margin-top: 2.25rem;
  display: grid;
  gap: 0.75rem;
  align-items: stretch;
}
@media (min-width: 52rem) {
  .compose { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); }
}
.compose-part {
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: var(--surface);
  padding: 1.4rem 1.5rem;
}
.compose-part.is-ours { background: #0e2230; border-color: var(--accent); }
.compose-part h3 { font: 700 0.95rem/1.2 var(--mono); letter-spacing: -0.01em; color: #fff; }
.compose-value { margin-top: 0.9rem; color: var(--text); font-size: 1rem; overflow-wrap: break-word; }
.compose-value.mono { font-size: 0.86rem; color: var(--accent); }
.compose-part.is-ours .compose-value { font: 700 1.15rem/1.2 var(--mono); color: var(--green); }
.compose-note { margin-top: 0.9rem; font-size: 0.92rem; color: var(--dim); max-width: none; }
.compose-op {
  align-self: center;
  justify-self: center;
  font: 500 1.6rem/1 var(--mono);
  color: var(--dim);
}
.keylist .tool { background: rgba(242, 172, 60, 0.14); color: var(--amber); }

.swap-note { margin-top: 1.1rem; font-size: 0.92rem; color: var(--dim); max-width: none; }
.mono { font-family: var(--mono); }

/* ---- contact form ------------------------------------------------------ */

.contact-form {
  margin-top: 1.75rem;
  max-width: 38rem;
}
.contact-form label {
  display: block;
  margin-top: 1rem;
}
.contact-form label > span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: var(--dim);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: 7px;
  border: 1px solid var(--edge);
  background: var(--surface);
  color: var(--text);
  font: var(--step-0)/1.5 var(--sans);
  resize: vertical;
}
.contact-form input:hover,
.contact-form textarea:hover { border-color: var(--dim); }
.contact-form .actions { margin-top: 1.5rem; }
.contact-form button { cursor: pointer; font-family: var(--sans); }
.contact-form button[disabled] { opacity: 0.6; cursor: default; }

/* Option chips: where it would run. */
.choice {
  border: 0;
  padding: 0;
  margin: 1.25rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  scroll-margin-top: 6rem;
}
.choice legend {
  padding: 0;
  width: 100%;
  margin-bottom: 0.5rem;
  color: var(--dim);
  font-size: 0.9rem;
}
.choice legend i { font-style: normal; font-size: 0.85em; margin-left: 0.3rem; }
.contact-form .choice label { display: block; margin: 0; position: relative; }
.contact-form .choice input { position: absolute; inset: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.contact-form .choice label > span {
  display: inline-block;
  margin: 0;
  padding: 0.6rem 1rem;
  border: 1px solid var(--edge);
  border-radius: 7px;
  color: var(--dim);
  font: 600 0.95rem/1 var(--sans);
  cursor: pointer;
}
.choice label:hover > span { border-color: var(--dim); color: var(--text); }
.choice input:checked + span { border-color: var(--accent); color: var(--text); background: rgba(214, 92, 198, 0.13); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice-help { width: 100%; margin-top: 0; font-size: 0.85rem; color: #627384; }
.contact-form label > span i { font-style: normal; color: var(--dim); font-weight: 400; margin-left: 0.3rem; font-size: 0.85em; }

.field-row { display: grid; gap: 0 1rem; }
@media (min-width: 34rem) {
  .field-row { grid-template-columns: 1fr 1fr; }
}

/* The honeypot. Off-screen rather than display:none, which some bots skip. */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  margin-top: 1rem;
  font-size: 0.95rem;
  min-height: 1.5rem;
}
.form-note.ok { color: var(--green); }
.form-note.bad { color: var(--coral); }

footer {
  border-top: 1px solid var(--edge);
  padding-block: 2rem;
  color: var(--dim);
  font-size: 0.9rem;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  align-items: center;
  justify-content: space-between;
}
footer a { color: var(--dim); }

/* ---- detail page ------------------------------------------------------- */

.lede-block { padding-block: clamp(2.5rem, 1rem + 4vw, 4rem) 1rem; }
.lede-block h1 { font-size: var(--step-3); }
.lede-block p { margin-top: 1.25rem; color: var(--dim); font-size: var(--step-1); line-height: 1.5; max-width: 62ch; }

/* Each topic: heading, its text, then anything wide (diagram, table, note).
   On a wide screen the heading sits left of the text, so lines run the full
   width instead of stopping halfway, and the wide parts span both. */
.topic {
  scroll-margin-top: 1.5rem;
  margin-top: 3.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--edge);
}
.prose { padding-bottom: clamp(2.5rem, 1rem + 3vw, 3.5rem); }
.prose h2 { font-size: var(--step-2); }
.topic-body > :first-child { margin-top: 1.1rem; }
@media (min-width: 62rem) {
  .topic {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    column-gap: 4rem;
    align-items: start;
  }
  .topic > h2 { grid-column: 1; }
  .topic-body { grid-column: 2; }
  .topic-body > :first-child { margin-top: 0.3rem; }
  .topic-body p, .topic-body ul { max-width: none; }
  .topic > :not(h2):not(.topic-body) { grid-column: 1 / -1; }
}
.topic-body h3 {
  font-size: 1.15rem;
  margin-top: 2.25rem;
  color: #fff;
}
.topic-body p, .topic-body ul { margin-top: 1.1rem; }
.topic-body ul { padding-left: 1.1rem; max-width: var(--measure); }
.topic-body li { margin-top: 0.5rem; }
.topic-body li::marker { color: var(--dim); }
.prose code {
  font: 0.88em/1 var(--mono);
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 4px;
  padding: 0.15em 0.4em;
}

.flow {
  margin-top: 2rem;
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: var(--surface);
  padding: 1.5rem;
  overflow-x: auto;
}
/* Capped: stretched to a wide container the boxes balloon and the diagram
   stops reading as a diagram. */
.flow svg { display: block; min-width: 40rem; width: 100%; max-width: 52rem; height: auto; margin-inline: auto; }

table {
  margin-top: 1.5rem;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.85rem 1rem 0.85rem 0;
  border-bottom: 1px solid var(--edge);
}
th {
  font: 600 0.8rem/1.3 var(--sans);
  color: var(--dim);
  letter-spacing: 0.01em;
}
td:first-child { color: #fff; width: 34%; padding-right: 2rem; }


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* In-page links glide instead of jumping, unless motion is turned down. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
