@charset "UTF-8";
/* =========================================================================
   Signal — adapted from the "Three House Styles / System B" reference.
   Dark tokens are verbatim from that reference. Light tokens: ground,
   surface-1, surface-2, ink, rule and accent are verbatim from its light
   swap; body, muted, surface-3 and rule-strong are extrapolated here.
   Checked for WCAG AA: light body >= 9.0:1 and muted >= 5.0:1 on every
   light surface; white on the CTA gradient stops is 5.99:1 and 4.89:1.
   ========================================================================= */
:root {
  color-scheme: light;
  --ground:#F7F8FA;
  --surface-1:#FFFFFF;
  --surface-2:#EEF0F4;
  --surface-3:#E3E6EC;
  --ink:#14171C;
  --body:#3A414C;
  --muted:#5E6776;
  --rule:rgba(20,23,28,.11);
  --rule-strong:rgba(20,23,28,.22);
  --accent:#5B4FD6;
  --focus:#5B4FD6;
  --cta:linear-gradient(122deg,#5F4FCF 0%,#9C4FC0 100%);
  --cta-shadow:0 8px 20px -12px rgba(95,79,207,.55);
  --font:"Manrope",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-mono:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --hero:2.875rem;
  --hero-track:-.032em;
  --h1:2rem;
  --h1-track:-.025em;
  --title:1.0625rem;
  --title-track:-.015em;
  --text:1rem;
  --leading:1.6;
  --read:1.0625rem;
  --read-leading:1.65;
  --kicker-size:.6875rem;
  --kicker-track:.15em;
  --measure:680px;
  --shell:1140px;
  --gap:24px;
  --radius:10px;
  --radius-lg:14px;
}

/* Defaults to the OS/browser's prefers-color-scheme; the header toggle sets
   data-theme explicitly (light or dark) and that choice persists and wins. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    color-scheme: dark;
    --ground:#0E1013;
    --surface-1:#15181E;
    --surface-2:#1C2027;
    --surface-3:#262B33;
    --ink:#E9EDF2;
    --body:#BEC7D3;
    --muted:#949FB0;
    --rule:rgba(233,237,242,.11);
    --rule-strong:rgba(233,237,242,.28);
    --accent:#8E8CF5;
    --focus:#8E8CF5;
    --cta-shadow:0 8px 24px -10px rgba(95,79,207,.85);
  }
}
:root[data-theme=dark] {
  color-scheme: dark;
  --ground:#0E1013;
  --surface-1:#15181E;
  --surface-2:#1C2027;
  --surface-3:#262B33;
  --ink:#E9EDF2;
  --body:#BEC7D3;
  --muted:#949FB0;
  --rule:rgba(233,237,242,.11);
  --rule-strong:rgba(233,237,242,.28);
  --accent:#8E8CF5;
  --focus:#8E8CF5;
  --cta-shadow:0 8px 24px -10px rgba(95,79,207,.85);
}

:root[data-theme=light] {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--body);
  font-family: var(--font);
  font-size: var(--text);
  line-height: var(--leading);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.15s ease, color 0.15s ease;
}

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

h1, h2, h3 {
  margin: 0;
  text-wrap: balance;
  color: var(--ink);
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent);
}

a.page-link, .wordmark, .btn {
  text-decoration: none;
}

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

/* ---------- skip link: hidden until focused, first element in the tab order ---------- */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1000;
  transform: translateY(-100%);
  background: var(--surface-1);
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  padding: 14px 20px;
  border-radius: 0 0 var(--radius) 0;
  box-shadow: inset 0 0 0 1px var(--rule-strong);
}

.skip-link:focus {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
.wrap, .wrapper {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

.page-content {
  padding: 48px 0 72px;
}

/* ---------- kicker + meta ---------- */
.kicker, .feed-kicker {
  display: inline-block;
  font-family: var(--font);
  font-size: var(--kicker-size);
  font-weight: 600;
  letter-spacing: var(--kicker-track);
  text-transform: uppercase;
  color: var(--accent);
}

.kicker.muted {
  color: var(--muted);
}

a.kicker {
  text-decoration: none;
  padding: 14px 0;
  margin: -14px 0;
}

a.kicker:hover {
  text-decoration: underline;
}

.feed-meta, .post-meta, .section-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- buttons: one gradient, everything else flat ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 11px 20px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  line-height: 1.2;
  transition: box-shadow 0.15s ease, color 0.15s ease, filter 0.15s ease;
}

.btn-cta {
  background: var(--cta);
  color: #FFFFFF;
  box-shadow: var(--cta-shadow);
}

.btn-cta:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--rule-strong);
}

.btn-ghost:hover {
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

/* ---------- masthead ---------- */
.masthead {
  border-bottom: 1px solid var(--rule);
}

.masthead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 24px;
  flex-wrap: wrap;
}

.wordmark {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--ink);
}

.wordmark .eyebrow {
  font-size: var(--kicker-size);
  font-weight: 600;
  letter-spacing: var(--kicker-track);
  text-transform: uppercase;
  color: var(--muted);
}

.wordmark .site-title {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.site-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.masthead-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav {
  display: flex;
  gap: 12px;
}

.site-nav.lang-switch {
  gap: 0;
}

/* 44px minimum tap target; the text stays the same size */
.site-nav .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}

.site-nav .page-link:hover {
  color: var(--ink);
}

.site-nav [aria-current] {
  color: var(--ink);
}

/* ---------- theme toggle + menu button ---------- */
.theme-toggle, .menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  border: 0;
  box-shadow: inset 0 0 0 1px var(--rule-strong);
  background: var(--surface-1);
  color: var(--ink);
  cursor: pointer;
  padding: 0;
}

.theme-toggle:hover, .menu-toggle:hover {
  box-shadow: inset 0 0 0 1px var(--accent);
}

.menu-toggle {
  display: none;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.theme-toggle .icon-moon {
  display: none;
}

:root[data-theme=dark] .theme-toggle .icon-sun {
  display: none;
}

:root[data-theme=dark] .theme-toggle .icon-moon {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) .theme-toggle .icon-sun {
    display: none;
  }
  :root:not([data-theme=light]) .theme-toggle .icon-moon {
    display: block;
  }
}
/* ---------- Spanish suggestion bar (English pages, Spanish-first browsers) ---------- */
.lang-suggest {
  background: var(--surface-2);
  border-bottom: 1px solid var(--rule);
}

.lang-suggest[hidden] {
  display: none;
}

.lang-suggest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 2px;
}

.lang-suggest-text {
  margin: 0;
  font-size: 0.875rem;
  color: var(--body);
}

.lang-suggest-cta {
  display: inline-block;
  padding: 12px 0;
  margin: -12px 0 -12px 4px;
  font-weight: 600;
}

.lang-suggest-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.lang-suggest-close:hover {
  color: var(--ink);
}

/* ---------- home: hero ---------- */
.hero {
  padding: 40px 0 120px;
  max-width: var(--measure);
}

.hero-title {
  font-size: var(--hero);
  font-weight: 800;
  letter-spacing: var(--hero-track);
  line-height: 1.05;
  margin-top: 14px;
}

.hero-pitch {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 40ch;
  margin-top: 16px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

/* ---------- home: latest feed (flat: weight + color carry hierarchy) ---------- */
.sec-head {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 10px;
}

.home-sections {
  margin-top: 72px;
}

.feed {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: var(--measure);
}

.feed-post {
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}

.feed-post:last-child {
  border-bottom: 0;
}

.feed-title {
  font-size: var(--title);
  font-weight: 600;
  letter-spacing: var(--title-track);
  line-height: 1.3;
  margin-top: 6px;
}

.feed-title a {
  display: block;
  padding: 11px 0;
  margin: -11px 0;
  color: var(--ink);
  text-decoration: none;
}

.feed-title a:hover {
  color: var(--accent);
}

.feed-dek {
  font-size: 0.90625rem;
  color: var(--body);
  margin: 6px 0 0;
  max-width: 64ch;
}

.feed-meta {
  display: block;
  margin-top: 8px;
}

/* ---------- home: section cards ---------- */
.section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 20px;
}

@media (min-width: 45em) {
  .section-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.section-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface-1);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 24px;
}

.section-title {
  margin: 0;
  line-height: 1.4;
}

.section-desc {
  font-size: 0.90625rem;
  color: var(--body);
  margin: 0;
}

.section-empty {
  font-size: 0.875rem;
  color: var(--muted);
  margin: auto 0 0;
}

.section-count {
  margin-top: 4px;
}

.section-posts {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.section-posts li {
  border-bottom: 1px solid var(--rule);
}

.section-posts li:last-child {
  border-bottom: 0;
}

.section-posts a {
  display: block;
  padding: 12px 0;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
}

.section-posts a:hover {
  color: var(--accent);
}

.rss-subscribe {
  margin-top: 40px;
  font-size: 0.875rem;
  color: var(--muted);
}

.rss-subscribe a {
  color: var(--accent);
}

/* ---------- post / page article ---------- */
.post {
  max-width: var(--measure);
  margin: 0 auto;
}

.post-header {
  margin-bottom: 32px;
}

.post-title {
  font-size: var(--h1);
  font-weight: 800;
  letter-spacing: var(--h1-track);
  line-height: 1.15;
  margin-top: 10px;
}

.post-meta {
  margin-top: 12px;
}

.post-content {
  font-size: var(--read);
  line-height: var(--read-leading);
}

.post-content h1, .post-content h2, .post-content h3 {
  margin: 1.6em 0 0.6em;
}

.post-content h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.post-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.post-content h3 {
  font-size: 1.0625rem;
  font-weight: 700;
}

.post-content pre, .post-content code {
  font-family: var(--font-mono);
  font-size: 0.84375rem;
  background: var(--surface-2);
  border: 1px solid var(--rule);
}

.post-content code {
  padding: 2px 6px;
  border-radius: 6px;
}

.post-content pre {
  padding: 16px 18px;
  overflow-x: auto;
  line-height: 1.6;
  border-radius: var(--radius);
}

.post-content pre code {
  background: none;
  border: 0;
  padding: 0;
  border-radius: 0;
}

.post-content figure {
  margin: 1.4em 0;
}

.post-content blockquote {
  margin: 1.4em 0;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
  color: var(--muted);
}

.post-content hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2em 0;
}

.post-content ul, .post-content ol {
  padding-left: 1.3em;
}

.post-content del {
  color: var(--muted);
}

.post-content img {
  display: block;
  margin: 1.4em auto;
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--rule);
}

/* Kramdown/GFM emit a bare <table>; post.html wraps it the same way it wraps overflowing
   <pre> blocks, so a wide table scrolls in its own box instead of the whole page. */
.post-content .table-scroll {
  overflow-x: auto;
  margin: 1.4em 0;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--rule);
}

.post-content table {
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.post-content th, .post-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  min-width: 6em;
}

/* Wide (6+ column) comparison tables keep the row-label column a bit roomier, so it wraps
   into a few words per line instead of one word per line; short tables never match this. */
.post-content table:has(th:nth-child(6)) th:first-child,
.post-content table:has(th:nth-child(6)) td:first-child {
  min-width: 10em;
}

.post-content thead th {
  background: var(--surface-2);
  font-weight: 700;
  color: var(--ink);
}

.post-content tr:last-child td {
  border-bottom: 0;
}

.back-link {
  margin-top: 48px;
}

/* ---------- series ---------- */
.series-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 48px;
}

.series-nav a {
  display: block;
  padding: 16px 18px;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--rule-strong);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.4;
}

.series-nav a:hover {
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.series-next {
  grid-column: 2;
  text-align: right;
}

.series-dir {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.series h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.series + .series {
  margin-top: 40px;
}

.series-list {
  padding-left: 1.3em;
}

.series-list a {
  display: inline-block;
  padding: 10px 0;
}

.page-article .post-header {
  margin-bottom: 24px;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 32px 0 48px;
  margin-top: 64px;
}

.footer-line {
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-name {
  color: var(--ink);
  font-weight: 600;
}

.footer-line a {
  color: var(--muted);
}

.footer-line a:hover {
  color: var(--accent);
}

.footer-desc {
  font-size: 0.84375rem;
  color: var(--muted);
  max-width: 60ch;
  margin-top: 6px;
}

.social-media-list {
  list-style: none;
  display: flex;
  gap: 14px;
  padding: 0;
  margin: 16px 0 0;
}

.social-media-list li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8125rem;
}

.social-media-list li a:hover {
  color: var(--accent);
}

.social-media-list .svg-icon {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.social-media-list .x-icon {
  width: 15px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 0.8125rem;
  line-height: 1;
  text-align: center;
}

/* Breakpoints are in em so a larger default text size also switches to the phone layout. */
@media (max-width: 40em) {
  .wrap, .wrapper {
    padding: 0 16px;
  }
  :root {
    --hero:2rem;
    --h1:1.625rem;
  }
  .masthead-row {
    padding-block: 14px;
    gap: 12px;
  }
  .wordmark {
    flex: 1 1 0;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .masthead-actions {
    order: 2;
  }
  /* Mobile menu: one full-width row under the header (pages left, languages right).
     It wraps only if large text leaves no room. Without JS it simply stays open. */
  .site-menu {
    order: 3;
    flex-basis: 100%;
    margin-left: 0;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0 16px;
    border-top: 1px solid var(--rule);
    padding-top: 4px;
  }
  .site-menu .site-nav {
    gap: 4px;
  }
  .site-menu .site-nav:first-child {
    margin-left: -10px;
  }
  .site-menu .site-nav .page-link {
    padding: 0 10px;
    font-size: 1rem;
  }
  .site-menu .lang-switch {
    margin-left: auto;
    margin-right: -10px;
  }
  .js .menu-toggle {
    display: inline-flex;
  }
  .js .site-menu {
    display: none;
  }
  .js .masthead.menu-open .site-menu {
    display: flex;
  }
  .hero {
    padding: 24px 0 64px;
  }
  .home-sections {
    margin-top: 56px;
  }
  .series-nav {
    grid-template-columns: 1fr;
  }
  .series-next {
    grid-column: auto;
  }
}