/* ==========================================================================
   It’s Fully Online — Base UI
   Minimal, dark, AI-vibe. Reset, type, header, footer, layout, components.
   ========================================================================== */

/* ── Reset ─────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--bg);
  color: var(--ink-1);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: var(--lh-base);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
svg {
  display: block;
  fill: currentColor;
}

/* ── Icon system (restrained, 1.75 stroke) ─────────────────────────── */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--icon-size, 18px);
  height: var(--icon-size, 18px);
  flex-shrink: 0;
  vertical-align: middle;
}
.icon svg {
  width: 100%;
  height: 100%;
  stroke-width: var(--icon-stroke, 1.75);
}
.icon--sm {
  width: var(--icon-size-sm, 14px);
  height: var(--icon-size-sm, 14px);
}
.icon--lg {
  width: var(--icon-size-lg, 22px);
  height: var(--icon-size-lg, 22px);
}
.icon--accent {
  color: var(--accent);
}
.icon--muted {
  color: var(--ink-3);
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── Typography ────────────────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  color: var(--ink-1);
  font-weight: 500;
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
}
h1 {
  font-size: var(--t-h1);
}
h2 {
  font-size: var(--t-h2);
}
h3 {
  font-size: var(--t-h3);
}
h4 {
  font-size: var(--t-h4);
  font-weight: 500;
}
p {
  color: var(--ink-2);
  margin-bottom: 1em;
  line-height: var(--lh-base);
}
p:last-child {
  margin-bottom: 0;
}
strong {
  color: var(--ink-1);
  font-weight: 500;
}
em {
  font-style: italic;
}
/* Accent emphasis is a display-heading device only — prose <em> stays italic. */
h1 em,
h2 em,
h3 em {
  font-style: normal;
  color: var(--accent);
}

.text-link {
  color: var(--ink-1);
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition:
    color var(--d-fast) var(--ease),
    text-decoration-color var(--d-fast) var(--ease);
}
.text-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent-line);
}

ul,
ol {
  padding-left: 1.4em;
  margin-bottom: 1em;
}
li {
  margin-bottom: 0.35em;
  color: var(--ink-2);
}
li::marker {
  color: var(--ink-3);
}

code {
  font-family: var(--font-mono);
  background: var(--bg-3);
  border: 1px solid var(--line-1);
  border-radius: var(--r-1);
  padding: 1px 5px;
  font-size: 0.85em;
  color: var(--ink-1);
}
pre {
  background: var(--bg-2);
  color: var(--ink-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-3);
  padding: var(--s-5) var(--s-6);
  overflow-x: auto;
  margin-bottom: 1.5em;
  line-height: 1.7;
  font-size: 0.82rem;
  /* Visible thin scrollbar: overflow-x:auto is useless when the native
     scrollbar renders invisible on the dark theme and content looks cut. */
  scrollbar-width: thin;
  scrollbar-color: var(--line-3) transparent;
}
pre::-webkit-scrollbar {
  height: 8px;
}
pre::-webkit-scrollbar-track {
  background: transparent;
}
pre::-webkit-scrollbar-thumb {
  background: var(--line-3);
  border-radius: var(--r-full);
}
pre::-webkit-scrollbar-thumb:hover {
  background: var(--ink-4);
}
pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
blockquote {
  border-left: 1px solid var(--accent-line);
  padding: var(--s-2) var(--s-5);
  margin: var(--s-6) 0;
  color: var(--ink-2);
  font-style: normal;
}

/* ── Tables ────────────────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5em;
  font-size: 0.9rem;
}
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-scroll table {
  margin-bottom: 0;
}
th {
  text-align: left;
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--line-2);
  color: var(--ink-3);
  font-weight: 500;
  font-size: var(--t-tag);
  text-transform: uppercase;
  letter-spacing: var(--ls-tag);
}
td {
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--line-1);
  color: var(--ink-1);
}
tr:hover td {
  background: var(--bg-1);
}

/* ── Layout shell ──────────────────────────────────────────────────── */
.shell {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.shell--narrow {
  max-width: var(--content-narrow);
}
main {
  min-height: 60vh;
  padding-top: var(--header-height);
}

/* ── Section padding ───────────────────────────────────────────────── */
.section {
  padding: var(--s-12) 0;
}
.section--alt {
  background: var(--bg-1);
}
.section--bordered {
  border-top: 1px solid var(--line-1);
  border-bottom: 1px solid var(--line-1);
}

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line-1);
  transition:
    background var(--d-base) var(--ease),
    border-color var(--d-base) var(--ease);
}
.site-header.is-stuck {
  background: rgba(10, 10, 10, 0.92);
  border-bottom-color: var(--line-2);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
  height: var(--header-height);
}

/* Brand */
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none !important;
  color: var(--ink-1);
  flex-shrink: 0;
  position: relative;
  z-index: 101;
}
.brand-mark {
  width: 22px;
  height: 22px;
  display: block;
}
.brand-name {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-1);
}
.brand-name .dot {
  color: var(--accent);
}

/* Nav */
.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--s-1);
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}
.main-nav a {
  display: inline-block;
  padding: 5px 11px;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--ink-2);
  text-decoration: none !important;
  border-radius: var(--r-1);
  transition: color var(--d-fast) var(--ease);
}
.main-nav a:hover {
  color: var(--ink-1);
}
.main-nav a.active {
  color: var(--ink-1);
}
.main-nav .manifest-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-3);
  border: 1px solid var(--line-2);
  padding: 4px 9px;
  border-radius: var(--r-1);
}
.main-nav .manifest-link:hover {
  color: var(--accent);
  border-color: var(--accent-line);
}
/* Mobile nav is horizontally scrollable; a native scrollbar that hides
   itself against the dark theme hides the scroll affordance with it. */
.main-nav {
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.main-nav::-webkit-scrollbar {
  height: 4px;
}
.main-nav::-webkit-scrollbar-track {
  background: transparent;
}
.main-nav::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: var(--r-full);
}

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line-1);
  background: var(--bg);
  margin-top: var(--s-12);
}
.footer-inner {
  padding: var(--s-9) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  text-align: center;
}
.footer-copy {
  color: var(--ink-3);
  font-size: 0.8rem;
  margin: 0;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 10px;
  font-size: 0.8rem;
}
.footer-nav a {
  color: var(--ink-3);
  text-decoration: none !important;
  padding: 2px 4px;
  transition: color var(--d-fast) var(--ease);
}
.footer-nav a:hover {
  color: var(--ink-1);
}
.footer-nav span {
  color: var(--line-3);
}
.footer-note {
  font-size: 0.78rem;
  color: var(--ink-3);
  margin: 0;
  max-width: 540px;
  line-height: var(--lh-base);
}
.footer-note a {
  color: var(--ink-2);
  border-bottom: 1px dotted var(--line-3);
}
.footer-note a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent-line);
}

/* ── Cards (flat, thin border) ─────────────────────────────────────── */
.card {
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-3);
  padding: var(--s-6) var(--s-7);
  margin-bottom: var(--s-5);
  transition: border-color var(--d-base) var(--ease);
}
.card:hover {
  border-color: var(--line-2);
}

/* ── Buttons (minimal, outline or filled) ──────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--r-2);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-sans);
  letter-spacing: 0;
  text-decoration: none !important;
  cursor: pointer;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-1);
  line-height: 1;
  white-space: nowrap;
  transition:
    background var(--d-fast) var(--ease),
    color var(--d-fast) var(--ease),
    border-color var(--d-fast) var(--ease);
}
.btn:hover {
  border-color: var(--line-3);
}
.btn-primary {
  background: var(--accent);
  color: var(--ink-inverse);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: #ff8466;
  border-color: #ff8466;
  color: var(--ink-inverse);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-1);
  border-color: var(--line-2);
}
.btn-ghost:hover {
  color: var(--ink-1);
  border-color: var(--line-2);
}
.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* ── Section labels (uppercase tag with hairline) ──────────────────── */
.section-label,
h2.section-label {
  font-size: var(--t-tag);
  font-weight: 500;
  letter-spacing: var(--ls-tag);
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--s-5);
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.section-label::before,
h2.section-label::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}
.section-label--center {
  justify-content: center;
}

/* ── Tool directory grid (slim cards, bottom-border hover) ────────── */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1px;
  margin-bottom: var(--s-9);
  background: var(--line-1); /* hairline grid via bg */
  border: 1px solid var(--line-1);
  border-radius: var(--r-3);
  overflow: hidden;
}
.tool-card {
  background: var(--bg);
  border: 0;
  padding: var(--s-5) var(--s-5);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background var(--d-base) var(--ease);
  text-decoration: none !important;
  color: inherit;
  position: relative;
}
.tool-card:hover {
  background: var(--bg-1);
}
.tool-card h3 {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-1);
  margin: 0;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-card p {
  font-size: 0.82rem;
  color: var(--ink-3);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}
.tool-card .tool-meta {
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--line-1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.tool-card .tool-arrow {
  color: var(--ink-3);
  transition:
    color var(--d-fast) var(--ease),
    transform var(--d-fast) var(--ease);
}
.tool-card:hover .tool-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

.tool-card .tool-icon {
  display: inline-flex;
  margin: 0;
  color: var(--ink-3);
}
.tool-card:hover .tool-icon {
  color: var(--accent);
}

/* ── Category block ─────────────────────────────────────────────────── */
.category-block {
  margin-bottom: var(--s-9);
}
.category-title {
  font-family: var(--font-sans);
  font-size: var(--t-tag);
  font-weight: 500;
  letter-spacing: var(--ls-tag);
  text-transform: uppercase;
  color: var(--ink-3);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--line-1);
  margin: 0 0 var(--s-5) 0;
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.category-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-1);
}
.category-count {
  color: var(--ink-4);
  font-weight: 500;
}

/* ── Blog post (thin border, no shadow) ────────────────────────────── */
.blog-post {
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-3);
  padding: var(--s-6) var(--s-7);
  margin-bottom: var(--s-4);
  transition: border-color var(--d-base) var(--ease);
}
.blog-post:hover {
  border-color: var(--line-2);
}
.blog-post .post-icon {
  display: inline-block;
  margin-right: var(--s-2);
  vertical-align: middle;
  color: var(--accent);
}
.blog-post h2 {
  font-size: 1.15rem;
  margin-bottom: 6px;
  display: inline;
}
.blog-post h2 a {
  color: var(--ink-1);
  text-decoration: none !important;
}
.blog-post h2 a:hover {
  color: var(--accent);
}
.post-meta {
  font-size: 0.78rem;
  color: var(--ink-3);
  margin-bottom: var(--s-2);
}
.post-excerpt {
  font-size: 0.95rem;
  color: var(--ink-2);
  line-height: 1.6;
  margin: 0;
}

/* ── Blog article (detail view) — long-form reading surface ───────── */
.blog-article {
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-3);
  padding: var(--s-6) var(--s-7);
}
.post-content {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink-2);
}
.post-content h2,
.post-content h3 {
  font-family: var(--font-display);
  color: var(--ink-1);
  font-weight: 500;
  letter-spacing: var(--ls-snug);
  line-height: var(--lh-snug);
  margin: 1.8em 0 0.6em;
}
.post-content h2 {
  font-size: 1.35rem;
}
.post-content h3 {
  font-size: 1.12rem;
}
.post-content p {
  margin-bottom: 1em;
}
.post-content ul,
.post-content ol {
  margin-bottom: 1em;
}
.post-content img {
  border: 1px solid var(--line-1);
  border-radius: var(--r-2);
  margin: var(--s-5) 0;
}
.post-content a {
  color: var(--ink-1);
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition:
    color var(--d-fast) var(--ease),
    text-decoration-color var(--d-fast) var(--ease);
}
.post-content a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent-line);
}

/* ── Code syntax highlighting (shared: home hero + how-to + tool pages) ── */
.c-kw {
  color: var(--accent);
}
.c-fn {
  color: var(--ink-1);
}
.c-st {
  color: var(--ink-2);
}
.c-nm {
  color: var(--ink-2);
}
.c-cm {
  color: var(--ink-3);
  font-style: italic;
}

/* ── Ebook promo card ─────────────────────────────────────────────── */
.ebook-card {
  display: flex;
  flex-direction: row;
  gap: var(--s-5);
  align-items: flex-start;
  text-decoration: none;
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-3);
  padding: var(--s-5);
  transition: border-color var(--d-base) var(--ease);
  max-width: 640px;
}
.ebook-card:hover {
  border-color: var(--line-2);
}

.ebook-cover {
  flex-shrink: 0;
  width: 120px;
  height: 160px;
  border-radius: var(--r-1);
  overflow: hidden;
  background: var(--bg-3);
  border: 1px solid var(--line-1);
}
.ebook-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* never crop a book cover */
  display: block;
}
.ebook-cover-fallback {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
}

.ebook-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ebook-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--s-2);
}
.ebook-badge {
  font-family: var(--font-mono);
  font-size: var(--t-tag);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ebook-size {
  font-family: var(--font-mono);
  font-size: var(--t-tag);
  color: var(--ink-3);
}
.ebook-card h3 {
  margin: 0 0 var(--s-1);
  color: var(--ink-1);
  font-size: var(--t-h3);
  font-weight: 500;
}
.ebook-desc {
  color: var(--ink-3);
  font-size: var(--t-small);
  margin: 0 0 var(--s-2);
  line-height: var(--lh-base);
}
.ebook-publisher {
  color: var(--ink-3);
  font-size: var(--t-micro);
  margin: 0 0 var(--s-3);
}
.ebook-price-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.ebook-price {
  font-weight: 500;
  color: var(--ink-1);
  font-size: var(--t-body);
}
.ebook-cta {
  font-size: var(--t-small);
  color: var(--accent);
}

@media (max-width: 520px) {
  .ebook-card {
    flex-direction: column;
    align-items: stretch;
  }
  .ebook-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 1241 / 1754;
    max-height: 340px;
  }
}

/* ── Toolkit promo card (Digital Workflow Toolkit — Gumroad) ──────── */
.toolkit-card {
  display: flex;
  flex-direction: row;
  gap: var(--s-5);
  align-items: flex-start;
  text-decoration: none;
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-3);
  padding: var(--s-5);
  transition: border-color var(--d-base) var(--ease);
  max-width: 640px;
}
.toolkit-card:hover {
  border-color: var(--accent-line);
}
.toolkit-cover {
  flex-shrink: 0;
  width: 112px;
  height: 112px;
  border-radius: var(--r-1);
  overflow: hidden;
  background: var(--bg-3);
  border: 1px solid var(--line-1);
}
.toolkit-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.toolkit-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.toolkit-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--s-2);
}
.toolkit-badge {
  font-family: var(--font-mono);
  font-size: var(--t-tag);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.toolkit-size {
  font-family: var(--font-mono);
  font-size: var(--t-tag);
  color: var(--ink-3);
}
.toolkit-card h3 {
  margin: 0 0 var(--s-1);
  color: var(--ink-1);
  font-size: var(--t-h3);
  font-weight: 500;
}
.toolkit-desc {
  color: var(--ink-3);
  font-size: var(--t-small);
  margin: 0 0 var(--s-3);
  line-height: var(--lh-base);
}
.toolkit-price-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-top: auto;
}
.toolkit-price {
  font-weight: 500;
  color: var(--ink-1);
  font-size: var(--t-body);
}
.toolkit-cta {
  font-size: var(--t-small);
  color: var(--accent);
}

/* Desktop shop grid (homepage Publication section): covers on top, two up. */
.shop-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
}
@media (min-width: 721px) {
  .shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .shop-grid .ebook-card,
  .shop-grid .toolkit-card {
    flex-direction: column;
    max-width: none;
  }
  .shop-grid .ebook-cover,
  .shop-grid .toolkit-cover {
    width: 100%;
    height: auto;
  }
  .shop-grid .toolkit-cover {
    aspect-ratio: 1 / 1;
  }
  .shop-grid .ebook-cover {
    aspect-ratio: 3 / 4;
  }
}

/* Mobile: compact row card — square cover shrinks instead of going full-width. */
@media (max-width: 520px) {
  .toolkit-card {
    flex-direction: row;
  }
  .toolkit-cover {
    width: 96px;
    height: 96px;
  }
}

/* ── Toolkit in-article promo (blog detail) ───────────────────────── */
.toolkit-inline {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin: var(--s-6) 0 0;
  padding: var(--s-4) var(--s-5);
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-3);
  text-decoration: none;
  transition: border-color var(--d-base) var(--ease);
}
.toolkit-inline:hover {
  border-color: var(--accent-line);
}
.toolkit-inline img {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: var(--r-1);
  border: 1px solid var(--line-1);
  background: var(--bg-3);
  display: block;
}
.toolkit-inline-body {
  flex: 1;
  min-width: 0;
}
.toolkit-inline strong {
  display: block;
  color: var(--ink-1);
  font-size: var(--t-body);
  font-weight: 500;
  margin-bottom: 2px;
}
.toolkit-inline p {
  margin: 0;
  color: var(--ink-3);
  font-size: var(--t-small);
  line-height: var(--lh-base);
}
.toolkit-inline-cta {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: var(--t-small);
  color: var(--accent);
  white-space: nowrap;
  align-self: center;
}
@media (max-width: 480px) {
  .toolkit-inline {
    flex-wrap: wrap;
  }
  .toolkit-inline-cta {
    flex-basis: 100%;
    align-self: flex-start;
  }
}

/* ── Steps (flat rows) ─────────────────────────────────────────────── */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5em;
}
.steps li {
  counter-increment: step;
  padding: var(--s-5) var(--s-5) var(--s-5) 60px;
  position: relative;
  margin-bottom: 1px;
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-3);
  font-size: 0.95rem;
  color: var(--ink-2);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: var(--s-5);
  top: var(--s-5);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 400;
  letter-spacing: 0.05em;
}

/* ── Heading utilities ─────────────────────────────────────────────── */
.h1,
.h2,
.h3,
.h4 {
  font-family: var(--font-display);
  color: var(--ink-1);
  font-weight: 500;
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
}
.h1 {
  font-size: var(--t-h1);
}
.h2 {
  font-size: var(--t-h2);
}
.h3 {
  font-size: var(--t-h3);
}
.h4 {
  font-size: var(--t-h4);
}

/* ── Utility ───────────────────────────────────────────────────────── */
.text-center {
  text-align: center;
}
.text-muted {
  color: var(--ink-2) !important;
}
.text-dim {
  color: var(--ink-3) !important;
}
.text-accent {
  color: var(--accent) !important;
}
.text-ink {
  color: var(--ink-1) !important;
}
.text-inverse {
  color: var(--ink-inverse) !important;
}

.mt-2 {
  margin-top: var(--s-2);
}
.mt-3 {
  margin-top: var(--s-3);
}
.mt-4 {
  margin-top: var(--s-4);
}
.mt-6 {
  margin-top: var(--s-6);
}
.mt-8 {
  margin-top: var(--s-7);
}
.mt-12 {
  margin-top: var(--s-9);
}
.mb-2 {
  margin-bottom: var(--s-2);
}
.mb-3 {
  margin-bottom: var(--s-3);
}
.mb-4 {
  margin-bottom: var(--s-4);
}
.mb-6 {
  margin-bottom: var(--s-6);
}
.mb-8 {
  margin-bottom: var(--s-7);
}
.mb-12 {
  margin-bottom: var(--s-9);
}

/* ── Responsive nav ────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .header-inner {
    gap: var(--s-3);
  }
  .main-nav {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .main-nav ul {
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
  .main-nav a {
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 8px 9px;
  }
  .main-nav .manifest-link {
    padding: 8px 9px;
  }
  .tool-grid {
    grid-template-columns: 1fr;
  }
  .brand-name {
    display: none;
  }
}
@media (max-width: 480px) {
  .blog-post,
  .card {
    padding: var(--s-5);
  }
}

/* ── Remain Valuable inline promo (slim box; sibling of .toolkit-inline) ─ */
.remval-inline {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin: var(--s-6) 0 0;
  padding: var(--s-4) var(--s-5);
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-3);
  text-decoration: none;
  transition: border-color var(--d-base) var(--ease);
}
.remval-inline:hover {
  border-color: var(--accent-line);
}
.remval-inline img {
  flex-shrink: 0;
  width: 48px;
  height: 64px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px var(--line-2, var(--line-1));
  background: #f6f2e8;
  display: block;
}
.remval-inline-body {
  flex: 1;
  min-width: 0;
}
.remval-inline-body strong {
  display: block;
  color: var(--ink-1);
  font-size: var(--t-body);
  font-weight: 500;
  margin-bottom: 2px;
}
.remval-inline-body span {
  display: block;
  color: var(--ink-3);
  font-size: var(--t-small);
  line-height: var(--lh-base);
}
.remval-inline-cta {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: var(--t-small);
  color: var(--accent);
  white-space: nowrap;
  align-self: center;
}
@media (max-width: 480px) {
  .remval-inline {
    flex-wrap: wrap;
  }
  .remval-inline-cta {
    flex-basis: 100%;
    align-self: flex-start;
  }
}

/* ── Remain Valuable mid-article aside (editorial paragraph, blog detail) */
.remval-context {
  margin: var(--s-6) 0;
  padding-top: var(--s-4);
  border-top: 1px solid var(--line-1);
  color: var(--ink-2);
  font-size: var(--t-small);
  line-height: var(--lh-base);
}
.remval-context em {
  color: var(--ink-1);
  font-style: normal;
  font-weight: 500;
}

/* ── Remain Valuable awareness strip (homepage, below header) ────────── */
.remval-strip {
  border-bottom: 1px solid var(--line-1);
  background: var(--bg-1);
}
.remval-strip-inner {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding-top: var(--s-2);
  padding-bottom: var(--s-2);
}
.remval-strip-link {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
  color: var(--ink-2);
  font-size: var(--t-small);
  line-height: var(--lh-base);
}
.remval-strip-link:hover .remval-strip-text {
  color: var(--ink-1);
}
.remval-strip-tag {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: var(--t-tag);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  white-space: nowrap;
}
.remval-strip-text strong {
  color: var(--ink-1);
  font-weight: 500;
}
.remval-strip-dismiss {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-1);
  color: var(--ink-3);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: color var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease);
}
.remval-strip-dismiss:hover {
  color: var(--ink-1);
  border-color: var(--line-2);
}
@media (max-width: 560px) {
  .remval-strip-link {
    font-size: var(--t-micro);
  }
}

/* ── Publication grid: three products (ebook, toolkit, remain-valuable) ─ */
@media (min-width: 1024px) {
  .shop-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.remval-strip-cover{width:24px;height:32px;object-fit:cover;border-radius:2px;flex-shrink:0;box-shadow:0 0 0 1px var(--line-2,var(--line-1))}

/* ── Utilities ─────────────────────────────────────────────────────── */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* display weight/width must win over the shared heading rule above */
h1, .hero-title, .directory-head h2, .how h2, .promise h2 { font-stretch: var(--stretch-display); font-weight: 800; }
h1 { letter-spacing: -0.005em; }

/* ── Tool page ─────────────────────────────────────────────────────── */
.tool-intro { padding-top: var(--s-10); padding-bottom: var(--s-6); }
.crumbs { display: flex; gap: var(--s-2); font-family: var(--font-mono); font-size: var(--t-micro); color: var(--ink-3); margin-bottom: var(--s-5); }
.crumbs a:hover { color: var(--accent); }
.tool-h1 { font-size: clamp(2.2rem, 6vw, 4rem); line-height: 0.98; margin: 0 0 var(--s-4); max-width: 18ch; text-transform: uppercase; }
.tool-lede { font-size: 1.125rem; color: var(--ink-2); max-width: 60ch; }
.tool-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-5); }
.chip { font-family: var(--font-mono); font-size: var(--t-micro); color: var(--ink-3); border: 1px solid var(--line-2); border-radius: var(--r-full); padding: 3px 12px; }
.chip.is-local { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }

.try { padding-bottom: var(--s-8); }
.try-form { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-4); padding: var(--s-6); display: grid; gap: var(--s-5); }
.try-field { display: grid; gap: var(--s-2); }
.try-field label { font-size: var(--t-small); font-weight: 600; color: var(--ink-1); }
.try-req { color: var(--accent); }
.try-field input[type=text], .try-field input[type=number], .try-field select, .try-field textarea {
  width: 100%; font: inherit; color: var(--ink-1); background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-2); padding: 10px 12px;
}
.try-field textarea { font-family: var(--font-mono); font-size: 0.875rem; line-height: 1.5; resize: vertical; min-height: 96px; }
.try-field input[type=file] { color: var(--ink-2); font: inherit; font-size: var(--t-small); }
.try-field input:focus, .try-field select:focus, .try-field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.try-check { display: flex; align-items: center; gap: var(--s-3); font-weight: 400 !important; }
.try-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.try-hint { color: var(--ink-3); font-size: var(--t-micro); }
.try-actions { display: flex; align-items: center; gap: var(--s-4); }
.try-status { color: var(--ink-3); font-size: var(--t-small); font-family: var(--font-mono); }
.try-out { margin-top: var(--s-5); background: var(--bg-1); border: 1px solid var(--line-2); border-left: 3px solid var(--ok); border-radius: var(--r-3); overflow: hidden; }
.try-out.is-error { border-left-color: var(--err); }
.try-out-head { display: flex; justify-content: space-between; align-items: center; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line-1); }
.try-out-head h3 { font-size: var(--t-small); margin: 0; font-weight: 600; }
.try-out-head > div { display: flex; gap: var(--s-4); }
.try-copy, .try-dl { font: inherit; font-size: var(--t-micro); color: var(--accent); background: none; border: 0; cursor: pointer; padding: 0; }
.try-img { display: block; max-width: 100%; max-height: 360px; margin: var(--s-4) auto 0; border-radius: var(--r-2); }
.try-pre { margin: 0; padding: var(--s-4); max-height: 460px; overflow: auto; font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.55; color: var(--ink-1); white-space: pre-wrap; word-break: break-word; }

.related-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; background: var(--line-1); border: 1px solid var(--line-1); border-radius: var(--r-3); overflow: hidden; }
.related-list a { display: grid; gap: 2px; padding: var(--s-4) var(--s-5); background: var(--bg-1); transition: background var(--d-fast) var(--ease); }
.related-list a:hover { background: var(--bg-3); }
.related-list strong { color: var(--ink-1); font-weight: 600; }
.related-list span { color: var(--ink-3); font-size: var(--t-small); }
@media (max-width: 600px) { .try-form { padding: var(--s-4); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.tool-col { max-width: var(--content-narrow); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.try-run { font: inherit; font-weight: 600; font-size: 0.95rem; color: var(--ink-inverse); background: var(--accent); border: 1px solid var(--accent); border-radius: var(--r-2); padding: 12px 22px; cursor: pointer; transition: background var(--d-fast) var(--ease); }
.try-run:hover:not(:disabled) { background: #ff8466; border-color: #ff8466; }
.try-run:disabled { opacity: .6; cursor: progress; }
.tool-intro { padding-top: var(--s-10); padding-bottom: var(--s-6); }
.tool-col pre { overflow-x: auto; max-width: 100%; }
@media (max-width: 560px) {
  .manifest-link { display: none; }
  .tool-h1 { font-size: 2.2rem; }
}

/* ── Video card: links to a watch page (poster, duration, copy) ───────
   Two shapes: .vcard--wide (poster beside copy; wide containers) and
   .vcard--inline (slim row; the 680px reading column). Accent is spent
   on the play affordance and the call-to-action only. */
.vcard {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-4);
  overflow: hidden;
  text-decoration: none;
  transition: border-color var(--d-base) var(--ease);
}
.vcard:hover { border-color: var(--accent-line); }
.vcard-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #090c15;
  border-right: 1px solid var(--line-1);
}
.vcard-poster img { width: 100%; height: 100%; object-fit: cover; }
.vcard-play {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  background: var(--accent);
  color: var(--ink-inverse);
  border-radius: var(--r-3);
  transition: background var(--d-fast) var(--ease);
}
.vcard-play svg { width: 22px; height: 22px; translate: 1px 0; }
.vcard:hover .vcard-play { background: #ff8466; }
.vcard-time {
  position: absolute;
  right: var(--s-3);
  bottom: var(--s-3);
  padding: 1px 7px;
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  line-height: 1.5;
  color: var(--ink-1);
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r-1);
}
.vcard-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s-3);
  min-width: 0;
  padding: var(--s-7);
}
.vcard-kicker {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: 0.02em;
  color: var(--accent);
}
.vcard-title {
  display: block;
  margin: 0;
  color: var(--ink-1);
  font-family: var(--font-display);
}
.vcard--wide .vcard-title {
  font-size: clamp(1.55rem, 2.7vw, 2.15rem);
  font-weight: 800;
  font-stretch: var(--stretch-display);
  line-height: 1.04;
  letter-spacing: var(--ls-display);
}
.vcard-text {
  display: block;
  max-width: 46ch;
  color: var(--ink-2);
  font-size: var(--t-small);
  line-height: var(--lh-base);
}
.vcard-cta {
  display: block;
  margin-top: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--t-small);
  color: var(--accent);
}

.vcard--inline {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  margin: var(--s-6) 0 0;
  border-radius: var(--r-3);
}
/* The thumbnail keeps its 16:9 frame inside the card instead of cropping to the copy's height */
.vcard--inline .vcard-poster {
  width: 148px;
  margin: var(--s-4) 0 var(--s-4) var(--s-4);
  border: 1px solid var(--line-2);
  border-radius: var(--r-2);
  overflow: hidden;
}
.vcard--inline .vcard-play { width: 30px; height: 30px; border-radius: var(--r-2); }
.vcard--inline .vcard-play svg { width: 12px; height: 12px; }
.vcard--inline .vcard-time { display: none; }
.vcard--inline .vcard-body { gap: 2px; padding: var(--s-4) var(--s-5); }
.vcard--inline .vcard-title { font-size: var(--t-body); font-weight: 500; line-height: var(--lh-snug); letter-spacing: var(--ls-snug); }
.vcard--inline .vcard-text { color: var(--ink-3); max-width: none; }
.vcard--inline .vcard-cta { margin-top: 4px; }

@media (max-width: 759px) {
  .vcard--wide { grid-template-columns: 1fr; }
  .vcard--wide .vcard-poster { border-right: 0; border-bottom: 1px solid var(--line-1); }
  .vcard--wide .vcard-body { padding: var(--s-5); }
}
@media (max-width: 480px) {
  .vcard--inline .vcard-poster { width: 104px; margin: var(--s-3) 0 var(--s-3) var(--s-3); }
  .vcard--inline .vcard-text { display: none; }
  .vcard--inline .vcard-body { padding: var(--s-3) var(--s-4); }
}
