/*
 * Foldsmith — landing page.
 *
 * Metaphor: a forge. Cold navy steel, one hot-metal hue, hard edges softened only where a hand would
 * touch them. Type does the shouting, not colour: a single accent with an actual job (the thing you
 * can click, or the thing that changed), never decoration.
 *
 * Committed to one world — dark. No light variant, because a forge is not a bright room.
 * Zero external requests: no web fonts, no CDN, no analytics. The page has to hold itself to the
 * same standard the product claims.
 */

:root {
  /* Steel */
  --ink-900: #0b0f14;
  --ink-800: #0f141b;
  --ink-700: #141b24;
  --ink-600: #1b2330;
  --ink-500: #253040;
  --line: #202b39;
  --line-bright: #2e3d50;

  /* Paper */
  --fg: #e8edf3;
  --fg-muted: #93a1b3;
  --fg-dim: #6b7a8d;

  /* Hot metal — the only accent. Its job: interactive, or "this is the change". */
  --ember: #f0862b;
  --ember-hot: #ff9d47;
  --ember-deep: #b4581a;
  --ember-glow: rgb(240 134 43 / 18%);

  --s1: 0.5rem;
  --s2: 1rem;
  --s3: 1.75rem;
  --s4: 3rem;
  --s5: 5.5rem;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;

  --shadow-lift: 0 1px 0 rgb(255 255 255 / 4%) inset, 0 12px 30px -12px rgb(0 0 0 / 70%);
  --shadow-deep: 0 30px 60px -30px rgb(0 0 0 / 85%);

  /* Sharp out-easing: an instrument responding, not a bubble floating. */
  --ease: cubic-bezier(0.16, 0.84, 0.32, 1);

  --measure: 68ch;
  --page: 1240px;

  --font-text:
    ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(70rem 40rem at 78% -10%, rgb(240 134 43 / 8%), transparent 60%),
    radial-gradient(50rem 30rem at 0% 0%, rgb(37 48 64 / 55%), transparent 55%),
    var(--ink-900);
  color: var(--fg);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--ember);
  text-decoration-color: rgb(240 134 43 / 35%);
  text-underline-offset: 3px;
  transition: color 140ms var(--ease);
}

a:hover {
  color: var(--ember-hot);
}

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

::selection {
  background: var(--ember-deep);
  color: #fff;
}

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  color: var(--fg);
  background: rgb(255 255 255 / 4%);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.1em 0.36em;
  white-space: nowrap;
}

pre {
  margin: var(--s2) 0 0;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  background: var(--ink-900);
  border: 1px solid var(--line);
  border-left: 2px solid var(--ember-deep);
  border-radius: var(--r-sm);
}

pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--fg);
  white-space: pre;
}

.c-dim {
  color: var(--fg-dim);
}
.c-accent {
  color: var(--ember);
}
.c-key {
  color: #8ab4f8;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.022em;
  font-weight: 650;
  text-wrap: balance;
}

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

.muted {
  color: var(--fg-muted);
  font-size: 0.94rem;
}

.small {
  font-size: 0.86rem;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.7rem 1rem;
  background: var(--ink-600);
  z-index: 20;
}

.skip:focus {
  left: 0.5rem;
  top: 0.5rem;
}

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

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  background: rgb(11 15 20 / 72%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--fg);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.brand__mark {
  border-radius: 7px;
}

.brand__name {
  font-size: 1.05rem;
}

.masthead__nav {
  display: flex;
  gap: clamp(0.75rem, 2.5vw, 1.75rem);
  font-size: 0.94rem;
}

.masthead__nav a {
  color: var(--fg-muted);
  text-decoration: none;
}

.masthead__nav a:hover {
  color: var(--fg);
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, var(--s5));
  align-items: center;
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, var(--s5)) clamp(1rem, 4vw, 2.5rem) var(--s4);
}

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: var(--s2);
}

.hero__title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin-bottom: var(--s2);
}

.hero__title em {
  font-style: normal;
  color: var(--ember);
  /* The strike is the problem being named; the fold is the fix. */
  text-decoration: line-through;
  text-decoration-color: rgb(240 134 43 / 45%);
  text-decoration-thickness: 3px;
}

.lede {
  font-size: 1.1rem;
  color: var(--fg-muted);
  margin-bottom: var(--s3);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  --btn-bg: var(--ink-600);
  --btn-border: var(--line-bright);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.3rem;
  border: 1px solid var(--btn-border);
  border-radius: var(--r-md);
  background: var(--btn-bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    transform 140ms var(--ease),
    border-color 140ms var(--ease),
    box-shadow 140ms var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--ember);
  box-shadow: 0 8px 24px -14px var(--ember-glow);
  color: var(--fg);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  --btn-bg: linear-gradient(180deg, var(--ember-hot), var(--ember));
  --btn-border: var(--ember-deep);
  color: #1a1206;
}

.btn--primary:hover {
  color: #1a1206;
}

.btn--block {
  width: 100%;
}

/* "Coming soon" has to look unavailable without vanishing. */
.btn[data-soon] {
  position: relative;
  filter: saturate(0.55);
  opacity: 0.75;
  cursor: not-allowed;
}

.btn[data-soon]::after {
  content: 'soon';
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.1rem 0.4rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  opacity: 0.7;
}

.btn[data-soon]:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--btn-border);
}

.cta__note {
  margin-top: 0.9rem;
  font-size: 0.92rem;
  color: var(--fg-dim);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: var(--s3) 0 0;
  padding: 0;
  list-style: none;
}

.badges li {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
  padding: 0.28rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(255 255 255 / 2%);
}

/* ----------------------------------------------------------- before/after */

.compare {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.75rem, 2vw, 1.25rem);
}

.compare__pane {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--ink-800);
  overflow: hidden;
  box-shadow: var(--shadow-deep);
}

/* The "after" pane is the payoff — it sits forward and carries the hot edge. */
.compare__pane--after {
  border-color: var(--ember-deep);
  box-shadow:
    var(--shadow-deep),
    0 0 0 1px rgb(240 134 43 / 18%);
}

.compare__pane img {
  /* Crop tall screenshots to a consistent window; the fade says "it keeps going". */
  max-height: 27rem;
  object-fit: cover;
  object-position: top center;
  mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
}

.compare__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 2%);
}

.compare__count {
  font-size: 0.76rem;
  color: var(--fg-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compare__pane--after .compare__head {
  border-bottom-color: rgb(240 134 43 / 25%);
}

.compare__tag {
  flex: none;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.compare__tag--before {
  background: var(--ink-600);
  border: 1px solid var(--line-bright);
  color: var(--fg-muted);
}

.compare__tag--after {
  background: var(--ember);
  color: #1a1206;
}

.compare figcaption {
  grid-column: 1 / -1;
  font-size: 0.86rem;
  color: var(--fg-dim);
  text-align: center;
}

/* ---------------------------------------------------------------- sections */

.section {
  max-width: var(--page);
  margin: 0 auto;
  padding: var(--s5) clamp(1rem, 4vw, 2.5rem);
  border-top: 1px solid var(--line);
}

.section__head {
  margin-bottom: var(--s4);
}

.section__head h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  margin-bottom: var(--s2);
}

.section__head h2::after {
  content: '';
  display: block;
  width: 2.5rem;
  height: 2px;
  margin-top: 0.9rem;
  background: linear-gradient(90deg, var(--ember), transparent);
}

.section__lede {
  font-size: 1.05rem;
  color: var(--fg-muted);
}

.section__lede em {
  font-style: normal;
  color: var(--fg);
}

/* ------------------------------------------------------------------- steps */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: var(--s2);
}

.step {
  position: relative;
  padding: var(--s3) var(--s2) var(--s2);
  background: linear-gradient(180deg, var(--ink-700), var(--ink-800));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color 160ms var(--ease);
}

.step:hover {
  border-color: var(--line-bright);
}

.step__n {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ink-500);
}

.step h3 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}

.step p {
  color: var(--fg-muted);
  font-size: 0.96rem;
}

/* ------------------------------------------------------------------ splits */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.5rem, 4vw, var(--s4));
  align-items: center;
  margin-top: var(--s5);
}

.split--reverse {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

.split--reverse .split__copy {
  order: 2;
}

.split__copy,
.step,
.card,
.privacy__stored,
.facts li {
  min-width: 0;
}

.split__copy h3 {
  font-size: 1.35rem;
  margin-bottom: var(--s2);
}

.split__copy p + p,
.split__copy p + table,
.split__copy table + p {
  margin-top: var(--s2);
}

.shot {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--ink-800);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}

.shot img {
  max-height: 30rem;
  object-fit: cover;
  object-position: top center;
  mask-image: linear-gradient(180deg, #000 80%, transparent 100%);
}

.shot--narrow {
  max-width: 21rem;
  justify-self: center;
}

.shot--narrow img {
  mask-image: none;
  max-height: none;
}

/* ---------------------------------------------------------------- patterns */

.patterns {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  display: block;
  overflow-x: auto;
}

.patterns th {
  text-align: left;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  font-weight: 600;
  padding: 0 0.75rem 0.5rem 0;
}

.patterns td {
  padding: 0.45rem 0.75rem 0.45rem 0;
  border-top: 1px solid var(--line);
  white-space: nowrap;
}

/* ------------------------------------------------------------------- facts */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--s3) var(--s2);
  margin: var(--s5) 0 0;
  padding: 0;
  list-style: none;
}

.facts li {
  padding-left: var(--s2);
  border-left: 2px solid var(--ember-deep);
}

.facts h4 {
  font-size: 1rem;
  margin-bottom: 0.45rem;
}

.facts p {
  color: var(--fg-muted);
  font-size: 0.94rem;
}

/* ----------------------------------------------------------------- privacy */

.section--privacy {
  background: linear-gradient(180deg, rgb(20 27 36 / 55%), transparent);
}

.privacy {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: var(--s3);
}

.privacy__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
  align-content: start;
}

.privacy__list li {
  position: relative;
  padding-left: 1.9rem;
  color: var(--fg);
  font-size: 0.98rem;
}

.privacy__list--no li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  border: 1.5px solid var(--ember-deep);
  background:
    linear-gradient(45deg, transparent 45%, var(--ember) 45%, var(--ember) 55%, transparent 55%);
}

.privacy__stored {
  padding: var(--s3);
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.privacy__stored h3 {
  font-size: 1.05rem;
  margin-bottom: var(--s2);
}

.privacy__stored dl {
  margin: 0 0 var(--s2);
}

.privacy__stored dt {
  font-weight: 650;
  font-size: 0.95rem;
  margin-top: var(--s2);
}

.privacy__stored dt:first-child {
  margin-top: 0;
}

.privacy__stored dd {
  margin: 0.25rem 0 0;
  color: var(--fg-muted);
  font-size: 0.93rem;
}

.callout {
  margin-top: var(--s4);
  padding: var(--s2) var(--s3);
  max-width: none;
  background: rgb(240 134 43 / 6%);
  border: 1px solid rgb(240 134 43 / 22%);
  border-radius: var(--r-md);
  color: var(--fg);
  font-size: 0.96rem;
}

/* ----------------------------------------------------------------- install */

.install {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--s2);
}

.card {
  padding: var(--s3);
  background: linear-gradient(180deg, var(--ink-700), var(--ink-800));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  align-items: start;
}

.card h3 {
  font-size: 1.1rem;
}

.card--wide {
  grid-column: 1 / -1;
}

.card p {
  color: var(--fg-muted);
  font-size: 0.95rem;
}

.card pre {
  width: 100%;
  margin: 0;
}

/* --------------------------------------------------------------------- faq */

.faq {
  display: grid;
  gap: 0.6rem;
  max-width: var(--measure);
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--ink-800);
  transition: border-color 160ms var(--ease);
}

.faq details[open] {
  border-color: var(--line-bright);
}

.faq summary {
  cursor: pointer;
  padding: 0.85rem 1rem;
  font-weight: 600;
  font-size: 0.98rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before {
  content: '';
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 1.5px solid var(--ember);
  border-bottom: 1.5px solid var(--ember);
  transform: rotate(-45deg);
  transition: transform 160ms var(--ease);
}

.faq details[open] summary::before {
  transform: rotate(45deg);
}

.faq p {
  padding: 0 1rem 1rem 2.15rem;
  color: var(--fg-muted);
  font-size: 0.95rem;
}

/* ------------------------------------------------------------------ footer */

.footer {
  max-width: var(--page);
  margin: 0 auto;
  padding: var(--s4) clamp(1rem, 4vw, 2.5rem) var(--s5);
  border-top: 1px solid var(--line);
}

.footer__grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
  justify-content: space-between;
  margin-bottom: var(--s4);
}

.brand--footer {
  margin-bottom: 0.6rem;
}

.footer h4 {
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 0.7rem;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
  font-size: 0.94rem;
}

.footer ul a {
  color: var(--fg-muted);
  text-decoration: none;
}

.footer ul a:hover {
  color: var(--fg);
}

.disclaimer {
  max-width: none;
  padding: var(--s2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgb(255 255 255 / 2%);
  color: var(--fg-muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.disclaimer strong {
  color: var(--fg);
}

.footer .small {
  margin-top: var(--s2);
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 940px) {
  .hero,
  .split,
  .split--reverse {
    grid-template-columns: 1fr;
  }

  .split--reverse .split__copy {
    order: 0;
  }

  .shot--narrow {
    justify-self: start;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

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

  .compare__pane img {
    max-height: 20rem;
  }

  .masthead__nav {
    font-size: 0.86rem;
  }

  .section {
    padding-top: var(--s4);
    padding-bottom: var(--s4);
  }

  .privacy__stored,
  .card {
    padding: var(--s2);
  }
}

@media (max-width: 400px) {
  .masthead__nav a:first-child {
    display: none;
  }
}

/* --------------------------------------------------------- scrollbar chrome */

@supports selector(::-webkit-scrollbar) {
  ::-webkit-scrollbar {
    width: 12px;
    height: 12px;
  }

  ::-webkit-scrollbar-track {
    background: var(--ink-900);
  }

  ::-webkit-scrollbar-thumb {
    background: var(--ink-500);
    border: 3px solid var(--ink-900);
    border-radius: 999px;
  }

  ::-webkit-scrollbar-thumb:hover {
    background: var(--ember-deep);
  }
}

* {
  scrollbar-color: var(--ink-500) var(--ink-900);
  scrollbar-width: thin;
}

/* ----------------------------------------------------------- reduced motion */

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

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

/* ============================================================== live demo ==
 * A working sidebar, not a picture of one. It borrows the extension's own
 * proportions — 22px of indent per level, a guide line in the gutter — so what
 * you fiddle with here matches what you get on GitHub.
 */

.sim {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: var(--s2);
  /* Both panes share a height so the pair reads as one instrument, not two boxes. */
  align-items: stretch;
}

.sim__controls,
.sim__preview {
  display: flex;
  flex-direction: column;
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.sim__controls {
  padding: var(--s2);
  display: grid;
  gap: var(--s2);
}

.sim__label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--fg);
  margin-bottom: 0.45rem;
}

.sim__hint {
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--fg-dim);
}

.sim__hint code {
  font-size: 0.9em;
}

.sim__input {
  display: block;
  width: 100%;
  padding: 0.7rem 0.8rem;
  background: var(--ink-900);
  border: 1px solid var(--line-bright);
  border-radius: var(--r-sm);
  color: var(--fg);
  font-family: var(--font-mono);
  /* 16px minimum or iOS zooms the page on focus. */
  font-size: 16px;
  line-height: 1.7;
  resize: vertical;
}

.sim__input:focus-visible {
  border-color: var(--ember);
  outline: 2px solid var(--ember-glow);
  outline-offset: 0;
}

.sim__input[aria-invalid='true'] {
  border-color: #d0563a;
}

.sim__input--line {
  line-height: 1.4;
}

.sim__field {
  display: grid;
  gap: 0.4rem;
}

.sim__error {
  margin: 0;
  font-size: 0.82rem;
  color: #ff8a6a;
}

.sim__error[hidden] {
  display: none;
}

.sim__switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.sim__switch input {
  accent-color: var(--ember);
  width: 1rem;
  height: 1rem;
}

.sim__reset {
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ember);
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
}

.sim__reset:hover {
  text-decoration: underline;
}

/* --- preview pane --- */

.sim__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 2%);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}

.sim__modes {
  display: inline-flex;
  padding: 2px;
  gap: 2px;
  background: var(--ink-900);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.sim__mode input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sim__mode span {
  display: block;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fg-muted);
  cursor: pointer;
  transition:
    background 140ms var(--ease),
    color 140ms var(--ease);
}

.sim__mode input:checked + span {
  background: var(--ember);
  color: #1a1206;
}

.sim__mode input:focus-visible + span {
  outline: 2px solid var(--ember-hot);
  outline-offset: 2px;
}

.sim__summary {
  margin: 0;
  font-size: 0.8rem;
  color: var(--fg-dim);
  font-variant-numeric: tabular-nums;
}

.sim__view {
  flex: 1;
  padding: 0.5rem 0.4rem 0.75rem;
  min-height: 20rem;
  max-height: 30rem;
  overflow-y: auto;
}

.sim__empty {
  padding: var(--s3) var(--s2);
  color: var(--fg-dim);
  font-size: 0.92rem;
}

.sim__list,
.sim__children {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Same 22px total offset the extension uses, guide line under the parent chevron. */
.sim__children {
  margin-left: 15px;
  padding-left: 7px;
  border-left: 1px solid var(--line-bright);
}

.sim__children[hidden] {
  display: none;
}

.sim__item {
  padding: 0.36rem 0.5rem;
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  color: var(--fg);
  /* Long workflow names truncate here exactly as they do in a real sidebar. */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sim__item--flat {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--fg-muted);
}

.sim__item--unmatched {
  color: var(--fg-muted);
}

.sim__toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.36rem 0.5rem;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--fg-muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.sim__toggle:hover {
  background: rgb(255 255 255 / 4%);
  color: var(--fg);
}

.sim__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sim__count {
  margin-left: auto;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 5%);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--fg-dim);
  font-variant-numeric: tabular-nums;
}

.sim__chevron {
  flex: none;
  width: 13px;
  height: 13px;
  fill: none;
  stroke: var(--ember);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 140ms var(--ease);
}

.sim__toggle[aria-expanded='true'] .sim__chevron {
  transform: rotate(90deg);
}

/* --- setup guide --- */

.setup {
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
}

.setup h3 {
  font-size: 1.35rem;
  margin-bottom: var(--s2);
}

.setup__steps {
  counter-reset: step;
  list-style: none;
  margin: var(--s3) 0 0;
  padding: 0;
  display: grid;
  gap: var(--s3);
}

.setup__steps > li {
  position: relative;
  padding-left: 2.6rem;
  min-width: 0;
}

.setup__steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--ember-deep);
  border-radius: 50%;
  background: rgb(240 134 43 / 8%);
  color: var(--ember);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
}

.setup__steps p {
  color: var(--fg-muted);
}

@media (max-width: 940px) {
  .sim {
    grid-template-columns: 1fr;
  }
}

/* ============================================================ prose page ==
 * The standalone privacy policy. Same tokens, narrower measure — it is meant to
 * be read, not scanned.
 */

.prose {
  max-width: 46rem;
  border-top: 0;
}

.prose h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin-bottom: var(--s2);
}

.prose h2 {
  font-size: 1.2rem;
  margin: var(--s4) 0 var(--s2);
  padding-top: var(--s2);
  border-top: 1px solid var(--line);
}

.prose p,
.prose ul,
.prose table {
  margin-bottom: var(--s2);
}

.prose p {
  color: var(--fg-muted);
}

.prose .lede {
  color: var(--fg);
}

.prose strong {
  color: var(--fg);
}

.prose .patterns td {
  white-space: normal;
  vertical-align: top;
  padding-right: 1rem;
  color: var(--fg-muted);
}
