/* ---------------------------------------------------------------------------
   Avanatro Tools — Indigo Studio
   tools.avanatro.com
   Deep-indigo paper, off-white ink, iris + lavender as committed dual accent.
   No build step. Drop in, deploy via rsync.
   --------------------------------------------------------------------------- */

@import url('fonts.css');

/* ===========================================================================
   Tokens
   ----------------------------------------------------------------------- */
:root {
  color-scheme: dark;

  /* surfaces — dark indigo, layered up */
  --paper:        oklch(0.18 0.04 280);    /* deep indigo — page background */
  --paper-elev:   oklch(0.22 0.05 280);    /* lifted ink for hover / hero tint */
  --paper-deep:   oklch(0.26 0.05 280);    /* code-ink wells, slightly brighter */
  --paper-edge:   oklch(0.34 0.05 280);    /* code-block border */

  /* ink — off-white, indigo-tinted greys for hierarchy */
  --ink:          oklch(0.94 0.01 280);    /* primary text */
  --ink-soft:     oklch(0.80 0.02 280);    /* secondary body */
  --muted:        oklch(0.62 0.03 280);    /* meta text */
  --dim:          oklch(0.48 0.03 280);    /* eyebrows, footer */

  /* rules */
  --rule:         oklch(0.32 0.04 280);    /* hairline */
  --rule-strong:  oklch(0.42 0.05 280);    /* heavier */

  /* committed dual accent — iris primary, lavender secondary */
  --accent:       oklch(0.72 0.15 270);    /* iris — shipping, links, primary pop */
  --accent-hi:    oklch(0.82 0.13 270);    /* hover */
  --accent-soft:  oklch(0.72 0.15 270 / 0.12);
  --warm:         oklch(0.72 0.18 310);    /* lavender — submit-imminent, strings, second pop */
  --warm-soft:    oklch(0.72 0.18 310 / 0.12);
  --success:      oklch(0.72 0.13 175);    /* teal — "shipping" pill if needed */
  --danger:       oklch(0.70 0.18 25);     /* breaking warnings (rare) */

  /* legacy aliases — sub-pages still reference --ss-* tokens; remap them
     to the editorial palette so old HTML keeps rendering cleanly. */
  --ss-bg:           var(--paper);
  --ss-bg-elev:      var(--paper-elev);
  --ss-bg-code:      var(--paper-elev);
  --ss-fg:           var(--ink);
  --ss-fg-muted:     var(--muted);
  --ss-fg-dim:       var(--dim);
  --ss-border:       var(--rule);
  --ss-border-strong:var(--rule-strong);
  --ss-accent:       var(--accent);
  --ss-accent-warm:  var(--warm);
  --ss-accent-green: var(--success);
  --ss-accent-red:   var(--danger);
  --ss-mono:         var(--mono);
  --ss-sans:         var(--sans-body);
}

/* ===========================================================================
   Reset (minimal — Pico is gone, we own the box model now)
   ----------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; }

/* ===========================================================================
   Page
   ----------------------------------------------------------------------- */
html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans-body);
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: "ss01", "cv11";   /* Inter alt forms — quiet, more grown-up */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body > main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 2rem 2.5rem 3.5rem;
}
/* Sub-page reading width (for prose-heavy pages) */
body.is-doc > main { max-width: 880px; }

/* ===========================================================================
   Top bar
   ----------------------------------------------------------------------- */
.ss-nav {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  padding: 0.85rem 0;
  margin-bottom: 1.75rem;
}
.ss-nav-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 2.5rem;
  display: flex;
  align-items: baseline;
  gap: 2rem;
  flex-wrap: wrap;
}
.ss-logo {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  color: var(--ink);
  text-decoration: none;
  background-image: none;
  line-height: 1;
  /* Fallback rendering for sub-pages that wrap their logo text directly
     in .ss-logo without a nested .ss-logo-name span. */
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: 1.15rem;
  font-style: italic;
  letter-spacing: -0.01em;
}
.ss-logo::before { content: none; }   /* drop the ▦ dev-marker */
.ss-logo-name {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: 1.15rem;
  font-style: italic;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.ss-logo-edition {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}
.ss-logo:hover .ss-logo-edition { color: var(--muted); }

/* Back-to-hub crumb — sits before the tool logo on SaveStack sub-pages
   (and any future sub-section that has its own logo). */
.ss-back {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  background-image: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.ss-back:hover { color: var(--ink); background-image: none; }
.ss-back-arrow {
  display: inline-block;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.ss-back:hover .ss-back-arrow { transform: translateX(-3px); }

.ss-nav-links {
  display: flex;
  gap: 1.5rem;
  font-family: var(--sans-body);
  font-size: 0.92rem;
  margin-left: auto;
}
.ss-nav-links a {
  color: var(--muted);
  text-decoration: none;
  position: relative;
  transition: color 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}
.ss-nav-links a:hover { color: var(--ink); }
.ss-nav-links a.current {
  color: var(--ink);
}
.ss-nav-links a.current::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--accent);
}

/* ===========================================================================
   Hero (typographic, no image)
   ----------------------------------------------------------------------- */
.ss-hero {
  padding: 0.5rem 0 2.25rem;
  margin-bottom: 2.25rem;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 18rem);
  gap: 1.75rem 3rem;
  align-items: end;
}
.ss-hero h1 {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin: 0;
  grid-column: 1 / -1;
  max-width: 22ch;
}
.ss-hero .ss-tagline {
  font-family: var(--sans-body);
  font-weight: 400;
  font-style: normal;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
  max-width: 48ch;
  grid-column: 1;
}
.ss-hero .ss-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0;
  grid-column: 2;
  align-self: end;
  border-top: 1px solid var(--accent);
  padding-top: 0.9rem;
}
.ss-hero .ss-meta span {
  display: flex;
  align-items: baseline;
  gap: 0.6em;
  padding: 0;
  margin: 0;
  border: 0;
}
.ss-hero .ss-meta span::before { content: none; }
.ss-hero .ss-meta span + span { border-left: 0; padding-left: 0; }
.ss-hero .ss-meta strong {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0;
  color: var(--ink);
  min-width: 1.6em;
  font-feature-settings: "tnum";
}

/* ===========================================================================
   Sections + general headings
   ----------------------------------------------------------------------- */
section { margin-bottom: 2.5rem; }

h2 {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.2vw, 1.95rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 1.1rem;
  padding-bottom: 0;
  border-bottom: 0;
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
}
h2::before {
  content: "";
  display: inline-block;
  width: 1.6rem;
  height: 2px;
  background: var(--accent);
  flex-shrink: 0;
  transform: translateY(-0.4em);
}
h2::after { content: none; }

h3 {
  font-family: var(--sans-body);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 1.75rem 0 0.6rem;
}

h4 {
  font-family: var(--sans-body);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 1.5rem 0 0.6rem;
}

p {
  margin: 0 0 1rem;
  color: var(--ink);
}
p.lead {
  font-family: var(--serif-display);
  font-variation-settings: "opsz" 24;
  font-style: italic;
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 56ch;
  margin: 0 0 1.5rem;
}

ul, ol {
  margin: 0 0 1.25rem;
  padding-left: 1.4rem;
  color: var(--ink);
}
li { margin: 0.35rem 0; }
li::marker { color: var(--accent); }

strong { font-weight: 600; color: var(--ink); }
em { font-style: italic; }

/* ===========================================================================
   Links
   ----------------------------------------------------------------------- */
a {
  color: var(--accent);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              color 0.15s ease;
}
a:hover {
  background-size: 100% 1px;
  color: var(--accent-hi);
}

/* ===========================================================================
   Editorial tool-index (replaces .tool-grid / .tool-card on the hub)
   ----------------------------------------------------------------------- */
.index-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule-strong);
}
.index-list > li { margin: 0; }
.index-list > li::marker { content: none; }
.index-row {
  display: grid;
  grid-template-columns: 4rem 1fr minmax(8rem, auto);
  align-items: start;
  gap: 1rem 2rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  background-image: none;
  position: relative;
  transition: background-color 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.index-row::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 0;
  background: var(--accent);
  transition: height 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.index-row:hover::before { height: 2px; }
.index-row:hover { background-color: var(--accent-soft); }
.index-row.is-planned { color: var(--ink-soft); }
.index-row.is-planned:hover { background-color: var(--paper-elev); }
.index-row.is-planned:hover::before { background: var(--rule-strong); }

/* "is-soon" — the submit-imminent tier between shipping and planned.
   Uses the sepia/warm accent so it visually pops without stealing the
   committed Tinten-Blau accent reserved for shipping. */
.index-row.is-soon { color: var(--ink); }
.index-row.is-soon .index-num { color: var(--warm); }
.index-row.is-soon .index-name { color: var(--ink); }
.index-row.is-soon .index-status {
  color: var(--warm);
  font-weight: 600;
}
.index-row.is-soon .index-arrow { color: var(--warm); }
.index-row.is-soon::before { background: var(--warm); }
.index-row.is-soon:hover { background-color: var(--warm-soft); }
.index-row.is-soon:hover::before { height: 2px; }

/* ===========================================================================
   Compact secondary index — "in the workshop" drafting tier
   ----------------------------------------------------------------------- */
.index-subhead {
  font-family: var(--sans-body);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 2rem 0 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.index-subhead::before,
.index-subhead::after {
  content: "";
  flex: 0 0 1.4rem;
  height: 1px;
  background: var(--rule-strong);
}
.index-subhead::after { flex: 1; }

.index-list-compact {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 1.75rem;
}
.index-list-compact > li { margin: 0; }
.index-list-compact > li::marker { content: none; }

.index-row-compact {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  align-items: baseline;
  gap: 0.85rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink-soft);
  background-image: none;
  position: relative;
  transition: color 0.15s ease,
              background-color 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.index-row-compact::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 0;
  background: var(--rule-strong);
  transition: height 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.index-row-compact:hover {
  color: var(--ink);
  background-color: var(--paper-elev);
}
.index-row-compact:hover::before { height: 1px; }

.index-num-compact {
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1;
  color: var(--dim);
  letter-spacing: -0.02em;
}
.index-name-compact {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: -0.015em;
}
.index-status-compact {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  text-align: right;
}

.index-num {
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.02em;
  padding-top: 0.35rem;
}
.is-planned .index-num { color: var(--muted); }

.index-body { min-width: 0; }

.index-name {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 0.35rem;
  line-height: 1.05;
}
.is-planned .index-name { color: var(--ink-soft); }

.index-desc {
  font-family: var(--sans-body);
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  max-width: 60ch;
}

.index-status {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 0.85rem;
  text-align: right;
  align-self: start;
}
.index-status.is-shipping {
  color: var(--accent);
  font-weight: 600;
}
.index-status.is-shipping::before { content: none; }

.index-row .index-arrow {
  font-family: var(--serif-display);
  margin-left: 0.4rem;
  color: var(--accent);
  font-style: italic;
  font-weight: 400;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  display: inline-block;
}
.index-row:hover .index-arrow { transform: translateX(6px); }

/* ===========================================================================
   Principles grid (replaces H4-uppercase rule list on hub)
   ----------------------------------------------------------------------- */
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 1.75rem;
  margin: 1rem 0 0;
  padding: 1.25rem 0 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}
.principle {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.principle-num {
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.35rem;
  color: var(--accent);
  line-height: 1;
}
.principle-title {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}
.principle-body {
  font-family: var(--sans-body);
  font-size: 0.96rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* ===========================================================================
   Code (inline + blocks)
   ----------------------------------------------------------------------- */
code, kbd, samp, pre {
  font-family: var(--mono);
  font-size: 0.92em;
}
:not(pre) > code {
  background: transparent;
  color: var(--accent);
  padding: 0 0.15em;
  border-radius: 0;
  border: 0;
  border-bottom: 1px dotted var(--accent);
  font-size: 0.88em;
  white-space: nowrap;
  font-weight: 500;
}
pre {
  background: var(--paper-deep) !important;
  border: 1px solid var(--paper-edge);
  border-radius: 3px;
  padding: 1.1rem 1.25rem !important;
  margin: 1rem 0 1.5rem;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--ink);
}
pre[class*="language-"] {
  background: var(--paper-deep) !important;
}
pre > code {
  background: transparent !important;
  border: 0;
  color: var(--ink);
  padding: 0;
  white-space: pre;
  font-size: inherit;
}

/* Prism tokens — editorial palette, not GitHub-dark */
.token.comment, .token.prolog, .token.doctype, .token.cdata {
  color: var(--dim);
  font-style: italic;
}
.token.keyword     { color: var(--accent); font-weight: 500; }
.token.string      { color: var(--warm); }
.token.number      { color: var(--accent); }
.token.function    { color: var(--ink); font-weight: 500; }
.token.class-name  { color: var(--ink); font-weight: 500; }
.token.builtin     { color: var(--warm); }
.token.operator,
.token.punctuation { color: var(--muted); }
.token.boolean     { color: var(--accent); }
.token.namespace   { opacity: 0.7; }
.token.variable    { color: var(--ink); }
.token.attr-name   { color: var(--accent); }
.token.attr-value  { color: var(--warm); }
.token.tag         { color: var(--ink); font-weight: 500; }

/* ===========================================================================
   API listing — kept the .api-group/.api-row structure, restyled editorial
   ----------------------------------------------------------------------- */
.api-group {
  margin-bottom: 2.5rem;
  border: 0;
  border-top: 1px solid var(--rule-strong);
  background: transparent;
  border-radius: 0;
  overflow: visible;
}
.api-group-header {
  padding: 1rem 0 0.85rem;
  background: transparent;
  border-bottom: 1px solid var(--rule);
}
.api-group-header h3 {
  margin: 0 0 0.2rem;
  font-family: var(--sans-body);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.api-group-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-family: var(--sans-body);
}
.api-row {
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  background: transparent;
}
.api-row:last-child { border-bottom: 0; }
.api-row .api-sig {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
}
.api-row .api-sig .api-name { color: var(--ink); font-weight: 600; }
.api-row .api-sig .api-kw   { color: var(--accent); font-weight: 500; }
.api-row .api-sig .api-type { color: var(--warm); }
.api-row .api-desc {
  font-size: 0.96rem;
  color: var(--muted);
  margin: 0;
  font-family: var(--sans-body);
  max-width: 60ch;
}
.api-row .api-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--dim);
  letter-spacing: 0.02em;
}
.badge {
  display: inline-block;
  padding: 0.1em 0.5em;
  border-radius: 2px;
  border: 1px solid var(--rule-strong);
  margin-right: 0.45em;
  background: var(--paper);
  color: var(--muted);
  font-weight: 500;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  vertical-align: 0.05em;
}
.badge.async      { color: var(--accent);  border-color: var(--accent); }
.badge.events     { color: var(--success); border-color: var(--success); }
.badge.throws     { color: var(--danger);  border-color: var(--danger); }
.badge.sideeffect { color: var(--warm);    border-color: var(--warm); }
.badge.editor     { color: var(--ink);     border-color: var(--rule-strong); }

/* ===========================================================================
   Examples — was: heavy dark cards. Now: numbered editorial sections.
   ----------------------------------------------------------------------- */
.example {
  margin: 0 0 3rem;
  border: 0;
  background: transparent;
  border-radius: 0;
  overflow: visible;
}
.example-header {
  padding: 0 0 0.65rem;
  background: transparent;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1rem;
}
.example-header h3 {
  margin: 0 0 0.25rem;
  font-family: var(--serif-display);
  font-variation-settings: "opsz" 24;
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.example-header .when {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0;
  font-family: var(--sans-body);
  font-style: italic;
}
.example-body { padding: 0; }
.example-body p {
  margin: 0.5rem 0 0.85rem;
  font-size: 1rem;
  color: var(--ink);
}

/* ===========================================================================
   Callouts — full border + tint, never a side-stripe
   ----------------------------------------------------------------------- */
.callout {
  border: 1px solid var(--rule-strong);
  background: var(--paper-elev);
  padding: 0.95rem 1.1rem;
  border-radius: 3px;
  margin: 1.25rem 0;
  font-size: 0.95rem;
  color: var(--ink);
}
.callout.warn {
  border-color: oklch(0.50 0.10 50 / 0.5);
  background: var(--warm-soft);
}
.callout.danger {
  border-color: oklch(0.50 0.16 25 / 0.4);
  background: oklch(0.50 0.16 25 / 0.06);
}
.callout strong {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.72rem;
  font-family: var(--sans-body);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}
.callout.warn strong   { color: var(--warm); }
.callout.danger strong { color: var(--danger); }

/* ===========================================================================
   Quick-start steps — kept structure, restyled editorial-quiet
   ----------------------------------------------------------------------- */
.qs-step {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 1rem;
  margin: 1.4rem 0;
  align-items: start;
}
.qs-step .qs-num {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid var(--accent);
  width: 1.8rem;
  height: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--paper);
}
.qs-step .qs-body h4 {
  margin: 0 0 0.4rem;
  font-family: var(--sans-body);
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: -0.005em;
}
.qs-step .qs-body p {
  margin: 0 0 0.6rem;
  font-size: 0.97rem;
  color: var(--ink);
}

/* ===========================================================================
   Tables
   ----------------------------------------------------------------------- */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1rem 0 1.5rem;
}
thead th {
  text-align: left;
  font-family: var(--sans-body);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1px solid var(--rule-strong);
  padding: 0.7rem 0.9rem 0.7rem 0;
}
tbody td {
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  padding: 0.8rem 0.9rem 0.8rem 0;
  vertical-align: top;
}
tbody td:first-child {
  font-family: var(--sans-body);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

/* ===========================================================================
   Footer
   ----------------------------------------------------------------------- */
footer {
  border-top: 1px solid var(--rule);
  margin-top: 2.5rem;
  padding-top: 1.1rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--dim);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
footer a {
  color: var(--muted);
  background-image: linear-gradient(var(--muted), var(--muted));
  background-size: 0 1px;
}
footer a:hover { color: var(--ink); background-size: 100% 1px; }

/* ===========================================================================
   Bento Studio — landing-page-only layout system.
   Uses sans-serif Inter for headings (sub-pages keep the Fraunces serif).
   Two card sizes (Featured + Tile) drive the visual hierarchy without
   needing hero imagery on each tool.
   ----------------------------------------------------------------------- */

/* Hero — statement headline + iris/lavender corner wash */
.hero {
  position: relative;
  padding: 2.5rem 0 2.5rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 16rem);
  gap: 1.75rem 3rem;
  align-items: end;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -1.75rem -2.5rem auto;
  height: 18rem;
  background:
    radial-gradient(ellipse 55% 90% at 92% 0%,
      oklch(0.36 0.16 295 / 0.55) 0%,
      transparent 65%),
    radial-gradient(ellipse 45% 70% at 100% 30%,
      oklch(0.40 0.18 270 / 0.30) 0%,
      transparent 60%);
  pointer-events: none;
  z-index: -1;
}
.hero-content { grid-column: 1; }
.hero h1 {
  font-family: var(--sans-body);
  font-weight: 700;
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  line-height: 1.0;
  letter-spacing: -0.045em;
  font-feature-settings: "ss01", "cv11", "cv05";
  color: var(--ink);
  margin: 0;
  max-width: 14ch;
}
.hero-tagline {
  font-family: var(--sans-body);
  font-weight: 400;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 1.1rem 0 0;
  max-width: 48ch;
}
.hero-meta {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  grid-column: 2;
  align-self: end;
  border-top: 1px solid var(--accent);
  padding-top: 0.95rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-meta li {
  display: flex;
  align-items: baseline;
  gap: 0.7em;
  margin: 0;
}
.hero-meta li::marker { content: none; }
.hero-meta-num {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  min-width: 1.6em;
  font-feature-settings: "tnum";
  letter-spacing: 0;
}
.hero-meta-label { font-weight: 400; }

/* Eyebrow headings for catalog + rules — quiet, mono-uppercase */
.catalog-eyebrow {
  font-family: var(--sans-body);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 1.1rem;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  border: 0;
}
.catalog-eyebrow::before {
  content: "";
  display: inline-block;
  width: 1.4rem;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

.catalog { margin-bottom: 3rem; }
.rules { margin-bottom: 1rem; }

/* Bento containers */
.bento { display: grid; }
.bento-featured {
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}
.bento-tiles {
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
}

/* Cards (shared) */
.bento-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  background-image: none;
  position: relative;
  transition:
    background-color 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.2s ease,
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 4px;
}
.bento-card:hover { transform: translateY(-1px); }

/* Featured cards — big, padded, with Description and prominent name */
.bento-card--featured {
  background: var(--paper-elev);
  border: 1px solid var(--rule);
  padding: 1.5rem 1.5rem 1.35rem;
  min-height: 12rem;
  gap: 0.35rem;
  overflow: hidden;
}
.bento-card--featured::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--rule);
  transition: height 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.bento-card--featured:hover {
  background: oklch(0.245 0.055 280);
  border-color: var(--rule-strong);
}
.bento-card--featured:hover::after { height: 3px; }
.bento-card--featured .bento-card-num {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--dim);
  font-feature-settings: "tnum";
  text-transform: uppercase;
}
.bento-card--featured .bento-card-name {
  font-family: var(--sans-body);
  font-weight: 700;
  font-size: 1.75rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0.15rem 0 0;
  line-height: 1.0;
}
.bento-card--featured .bento-card-desc {
  font-family: var(--sans-body);
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0.6rem 0 auto;
  max-width: 36ch;
}
.bento-card--featured .bento-card-status {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.bento-card--featured .bento-card-status::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
}
.bento-card--shipping .bento-card-status { color: var(--accent); }
.bento-card--shipping::after { background: var(--accent); }
.bento-card--soon .bento-card-status { color: var(--warm); }
.bento-card--soon::after { background: var(--warm); }

/* Tile cards — small, transparent bg, no description */
.bento-card--tile {
  background: transparent;
  border: 1px solid var(--rule);
  padding: 0.9rem 1rem 0.85rem;
  min-height: 5.5rem;
  gap: 0.25rem;
}
.bento-card--tile:hover {
  background: var(--paper-elev);
  border-color: var(--rule-strong);
}
.bento-card--tile .bento-card-num {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--dim);
  text-transform: uppercase;
}
.bento-card--tile .bento-card-name {
  font-family: var(--sans-body);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin: 0.1rem 0 0;
  line-height: 1.15;
}
.bento-card--tile .bento-card-status {
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dim);
  margin-top: auto;
  padding-top: 0.5rem;
}

/* ===========================================================================
   Workshop page — long-form prose + anti-list
   ----------------------------------------------------------------------- */
.workshop-prose {
  font-family: var(--sans-body);
  font-size: 1rem;
  line-height: 1.62;
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 0 0 1.1rem;
}
.workshop-prose code {
  font-family: var(--mono);
  font-size: 0.92em;
}

.workshop-anti {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  max-width: 64ch;
}
.workshop-anti li {
  padding-left: 1.7rem;
  position: relative;
  margin: 0.4rem 0 0.65rem;
  color: var(--ink-soft);
  font-size: 0.96rem;
  line-height: 1.58;
}
.workshop-anti li::marker { content: none; }
.workshop-anti li::before {
  content: "\00d7";
  position: absolute;
  left: 0.15rem;
  top: 0;
  color: var(--warm);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.55;
}

/* ===========================================================================
   Mobile
   ----------------------------------------------------------------------- */
@media (max-width: 880px) {
  body > main { padding: 1.5rem 1.4rem 3rem; }
  .ss-nav-inner { padding: 0 1.4rem; gap: 1.25rem; }
  .ss-hero {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 0.25rem 0 1.75rem;
    margin-bottom: 1.75rem;
  }
  .ss-hero .ss-meta { grid-column: 1; padding-top: 0.75rem; }
  .principles { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .hero {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.5rem 0 2rem;
  }
  .hero h1 { font-size: clamp(2.1rem, 7vw, 3.2rem); max-width: 18ch; }
  .hero-meta { grid-column: 1; }
  .hero::before { inset: -1rem -1.4rem auto; height: 16rem; }
  .bento-tiles { grid-template-columns: repeat(3, 1fr); }
  .bento-card--featured { min-height: 10rem; padding: 1.25rem 1.25rem 1.1rem; }
  .bento-card--featured .bento-card-name { font-size: 1.5rem; }
}
@media (max-width: 640px) {
  html, body { font-size: 16px; }
  body > main { padding: 1.25rem 1.1rem 2.5rem; }
  .ss-nav-inner { padding: 0 1.2rem; gap: 1rem; }
  .ss-nav-links { gap: 1rem; font-size: 0.88rem; }
  .ss-hero h1 { letter-spacing: -0.03em; }
  .principles { grid-template-columns: 1fr; gap: 1.5rem; }
  h2 { gap: 0.85rem; }
  h2::before { width: 1.1rem; }
  .index-row {
    grid-template-columns: 2.4rem 1fr;
    grid-template-areas:
      "num    body"
      "status status";
    row-gap: 0.45rem;
    column-gap: 0.9rem;
    padding: 1.1rem 0;
  }
  .index-num    { grid-area: num; font-size: 1.25rem; padding-top: 0.3rem; }
  .index-body   { grid-area: body; }
  .index-status { grid-area: status; text-align: left; padding-top: 0; }
  .index-name { font-size: 1.25rem; }
  .index-list-compact { grid-template-columns: 1fr; gap: 0; }
  pre { font-size: 0.78rem; padding: 0.85rem !important; }
  table { font-size: 0.88rem; }
  .bento-featured { grid-template-columns: 1fr; gap: 0.7rem; }
  .bento-tiles { grid-template-columns: repeat(2, 1fr); }
  .bento-card--featured { min-height: 8.5rem; }
  .bento-card--featured .bento-card-name { font-size: 1.35rem; }
  .hero h1 { letter-spacing: -0.04em; font-size: clamp(2rem, 8vw, 2.6rem); }
}

/* ===========================================================================
   v1.1 marketing additions — quick-stats + feature-grid
   ----------------------------------------------------------------------- */
.quick-stats-section {
  margin-bottom: 2rem;
}
.quick-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 0 0 0.5rem;
  text-align: center;
}
.quick-stats .stat {
  padding: 1rem;
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  background: var(--paper-elev);
}
.quick-stats .stat strong {
  display: block;
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-feature-settings: "tnum";
}
.quick-stats .stat span {
  display: block;
  font-size: 0.78rem;
  font-family: var(--sans-body);
  color: var(--muted);
  margin-top: 0.3rem;
}

#v1-1-features {
  margin-bottom: 2.5rem;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 0;
}
.feature-card {
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--rule);
  border-left-width: 3px;
  border-left-color: var(--accent);
  background: var(--paper-elev);
  border-radius: 0 3px 3px 0;
}
.feature-card.security    { border-left-color: oklch(0.65 0.18 25); }
.feature-card.performance { border-left-color: oklch(0.75 0.17 85); }
.feature-card.ux          { border-left-color: var(--accent); }
.feature-card.quality     { border-left-color: var(--success); }
.feature-card h3 {
  margin: 0 0 0.85rem;
  font-family: var(--sans-body);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.feature-card ul {
  margin: 0;
  padding-left: 1.1rem;
}
.feature-card li {
  margin-bottom: 0.45rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.feature-card li strong {
  color: var(--ink);
}

.release-summary {
  font-style: italic;
  color: var(--ink-soft);
  opacity: 0.9;
}

@media (max-width: 880px) {
  .quick-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .quick-stats {
    grid-template-columns: 1fr;
  }
  .quick-stats .stat strong {
    font-size: 1.65rem;
  }
}

/* ===========================================================================
   Initial fade — subtle, motion-respecting
   ----------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  body {
    animation: page-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  @keyframes page-in {
    from { opacity: 0; transform: translateY(2px); }
    to   { opacity: 1; transform: none; }
  }
}

/* ===========================================================================
   Reveal-Pattern (added 2026-05-16)
   Self-contained — no token vars, hardcoded values so tools-subdomain
   stays decoupled from main-domain tokens.css.
   Activated by motion.js via IntersectionObserver adding .is-visible.
   ----------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 700ms cubic-bezier(0.2, 0, 0, 1),
    transform 700ms cubic-bezier(0.2, 0, 0, 1);
  transition-delay: var(--delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===========================================================================
   Hover-Polish — Bento-Cards (Hub)
   Subtler lift + shadow than before. The base .bento-card rule already
   defines transform + background-color transitions; we extend the property
   list to include box-shadow and add a slightly deeper translateY at hover.
   ----------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .bento-card {
    box-shadow: 0 1px 0 transparent;
    transition:
      background-color 0.25s cubic-bezier(0.22, 1, 0.36, 1),
      border-color 0.2s ease,
      transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
      box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .bento-card--featured:hover {
    transform: translateY(-3px);
    box-shadow:
      0 14px 32px -18px oklch(0.10 0.04 280 / 0.65),
      0 2px 6px -2px oklch(0.10 0.04 280 / 0.40);
  }
  .bento-card--tile:hover {
    transform: translateY(-2px);
    box-shadow:
      0 8px 18px -12px oklch(0.10 0.04 280 / 0.55),
      0 1px 3px -1px oklch(0.10 0.04 280 / 0.30);
  }
}

/* === Skip-Link (added 2026-05-16, a11y-pass) === */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 12px 16px;
  background: var(--paper-elev, oklch(0.22 0.05 280));
  color: var(--ink, oklch(0.94 0.01 280));
  text-decoration: none;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

/* === Focus-Indicators (added 2026-05-16, a11y-pass) === */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent, oklch(0.72 0.15 270));
  outline-offset: 2px;
  border-radius: 4px;
}
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* === Mobile Touch-Targets + Breakpoint (added 2026-05-16, mobile-pass) === */
@media (max-width: 768px) {
  .ss-nav-links a,
  .ss-logo,
  .bento-card,
  .plugin-card,
  .ss-hero a,
  .ss-cta {
    min-height: 44px;
  }
  body {
    overflow-x: hidden;
  }
}
