:root {
  color-scheme: light;
  --base-light: #f5f6f0; --base-white: #fffefa; --base-dark: #101e19;
  --base-green: #175b42; --base-sage: #b9cbc0; --base-lime: #c9f597;
  --canvas: var(--base-light); --surface: var(--base-white); --ink: var(--base-dark);
  --muted: color-mix(in srgb,var(--base-dark) 63%,var(--base-sage));
  --line: color-mix(in srgb,var(--base-sage) 45%,var(--base-white));
  --link: var(--base-green); --tint: color-mix(in srgb,var(--base-green) 10%,var(--base-white)); --inverse: var(--base-dark);
  --hero-ink: var(--base-white); --hero-sub: color-mix(in srgb,var(--base-sage),var(--base-white)); --hero-accent: var(--base-lime);
  --shadow: 0 12px 32px color-mix(in srgb,var(--base-dark) 7%,transparent); --focus: var(--link);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: var(--base-dark);
  --surface: color-mix(in srgb,var(--base-dark) 82%,var(--base-sage));
  --ink: var(--base-white); --muted: var(--base-sage);
  --line: color-mix(in srgb,var(--base-dark) 70%,var(--base-sage));
  --link: color-mix(in srgb,var(--base-lime),var(--base-sage));
  --tint: color-mix(in srgb,var(--base-dark) 69%,var(--base-sage));
  --shadow: 0 12px 32px color-mix(in srgb,var(--base-dark) 50%,transparent); --focus: var(--base-lime);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --canvas: var(--base-dark);
    --surface: color-mix(in srgb,var(--base-dark) 82%,var(--base-sage));
    --ink: var(--base-white); --muted: var(--base-sage);
    --line: color-mix(in srgb,var(--base-dark) 70%,var(--base-sage));
    --link: color-mix(in srgb,var(--base-lime),var(--base-sage));
    --tint: color-mix(in srgb,var(--base-dark) 69%,var(--base-sage));
    --shadow: 0 12px 32px color-mix(in srgb,var(--base-dark) 50%,transparent); --focus: var(--base-lime);
  }
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 16px/1.58 system-ui, sans-serif; }
a { color: inherit; text-underline-offset: .22em; }
a:focus-visible, summary:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.skip { position: absolute; top: 1rem; left: 1rem; transform: translateY(-220%); z-index: 2; background: var(--surface); padding: .6rem; }
.skip:focus { transform: none; }
.wrap { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.masthead, .footer { background: var(--surface); }
.masthead { border-bottom: 1px solid var(--line); }
.masthead-inner, .footer-inner { display: flex; align-items: center; gap: 1rem 1.5rem; min-height: 72px; padding: .7rem 0; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 770; text-decoration: none; letter-spacing: -.02em; white-space: nowrap; }
.brand img { width: 32px; height: 32px; border-radius: .4rem; }
.masthead nav { margin-left: auto; }
.masthead nav, .footer nav { display: flex; flex-wrap: wrap; gap: .55rem 1.3rem; }
.masthead nav a, .footer nav a { font-size: .92rem; font-weight: 640; text-decoration: none; color: var(--muted); }
.masthead nav a:hover, .footer nav a:hover { color: var(--link); text-decoration: underline; }
.theme-switch { display: inline-flex; gap: .45rem; align-items: center; justify-content: center; min-height: 44px; padding: .45rem .8rem; background: var(--tint); color: var(--ink); border: 1px solid var(--line); border-radius: .65rem; font: 650 .85rem/1.3 system-ui, sans-serif; cursor: pointer; }
.theme-switch:hover { border-color: var(--link); }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; letter-spacing: -.035em; line-height: 1.04; }
h1 { font-size: clamp(2.6rem, 6.2vw, 5.25rem); }
h2 { font-size: clamp(1.95rem, 3.6vw, 3.2rem); }
h3 { font-size: 1.18rem; line-height: 1.2; letter-spacing: -.018em; }
.directory-hero {
  position: relative;
  display: grid; grid-template-columns: 1.45fr 1fr; align-items: center;
  gap: clamp(1.25rem, 4vw, 4rem); margin-top: 2rem;
  padding: clamp(1.75rem, 5.7vw, 5rem); border-radius: 1.35rem;
  color: var(--hero-ink); background:
    radial-gradient(ellipse at 100% 0%, color-mix(in srgb,var(--base-sage) 24%,transparent), transparent 61%),
    linear-gradient(115deg, var(--inverse), color-mix(in srgb,var(--base-green) 62%,var(--base-dark)));
}
.directory-hero :focus-visible { outline-color: var(--hero-accent); }
.hero-copy h1 { max-width: 13ch; }
.hero-copy p { margin: 1.2rem 0 1.55rem; max-width: 45ch; color: var(--hero-sub); font-size: clamp(1rem, 1.8vw, 1.16rem); }
.button { display: inline-flex; gap: .7rem; align-items: center; min-height: 45px; padding: .63rem .9rem; font-weight: 760; border-radius: .52rem; text-decoration: none; background: var(--hero-accent); color: var(--base-dark); }
.button:hover { background: color-mix(in srgb,var(--base-lime),var(--base-white)); }
.hero-index { border: 1px solid color-mix(in srgb,var(--base-sage) 65%,var(--base-green)); border-radius: .85rem; padding: 1rem 1.15rem .4rem; background: color-mix(in srgb,var(--base-dark) 24%,transparent); }
.hero-index h2 { margin: .2rem 0 .8rem; font: 730 1.06rem/1.25 system-ui, sans-serif; letter-spacing: -.02em; }
.hero-index a { display: flex; justify-content: space-between; gap: 1rem; padding: .72rem 0; border-top: 1px solid color-mix(in srgb,var(--base-sage) 58%,var(--base-green)); text-decoration: none; }
.hero-index a:hover { text-decoration: underline; }
.platform-count { color: var(--hero-accent); display: inline-flex; gap: .72rem; font-variant-numeric: tabular-nums; }
.section { margin: clamp(2.7rem, 6vw, 5rem) 0; scroll-margin-top: 1rem; }
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .65rem; margin-bottom: 1.2rem; }
.text-link { color: var(--link); font-size: .91rem; font-weight: 700; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.feature-card { min-width: 0; position: relative; display: block; padding: 1.23rem 1.25rem 2.3rem; border: 1px solid var(--line); border-radius: .95rem; background: var(--surface); text-decoration: none; box-shadow: var(--shadow); }
.feature-card h3 { margin: .65rem 0 .55rem; font-size: 1.27rem; }
.feature-card p, .guide-row p, .guide-notes p, .footer p { color: var(--muted); }
.feature-card p, .guide-row p { font-size: .93rem; }
.feature-card:hover, .guide-row:hover { background: var(--tint); }
.feature-card:hover h3, .guide-row:hover h3 { text-decoration: underline; }
.label, .eyebrow { font-size: .72rem; letter-spacing: .085em; font-weight: 770; text-transform: uppercase; color: var(--link); }
.card-arrow { position: absolute; right: 1rem; bottom: .65rem; color: var(--link); font-weight: 800; }
.guide-search { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; margin-bottom: 1rem; }
.guide-search label { font-weight: 720; }
.guide-search input { width: min(100%, 27rem); min-height: 45px; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: .55rem; padding: .4rem .7rem; }
.guide-search input::placeholder { color: var(--muted); }
.search-empty { margin: 1rem 0; color: var(--muted); }
.catalog { display: grid; gap: .8rem; }
.platform { border: 1px solid var(--line); border-radius: .9rem; background: var(--surface); scroll-margin-top: 1rem; }
.platform > summary, .genre > summary { cursor: pointer; padding: .85rem 1rem; font-weight: 760; }
.platform > summary small { display: inline-block; margin-left: .7rem; font-weight: 550; color: var(--muted); }
.genre { margin: 0 .7rem .7rem; background: var(--canvas); border: 1px solid var(--line); border-radius: .65rem; }
.genre > summary { font-size: .91rem; }
.guide-list { list-style: none; padding: 0; margin: 0 .6rem .6rem; display: grid; gap: .35rem; }
.guide-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem .95rem; border-radius: .45rem; background: var(--surface); text-decoration: none; }
.guide-row p { margin-top: .3rem; }
.guide-row > span { color: var(--link); }
.guide-notes { padding: 1.4rem 1.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: .85rem; }
.guide-notes h2 { font-size: 1.65rem; margin-bottom: .55rem; }
.guide-notes p { max-width: 75ch; }
.footer { border-top: 1px solid var(--line); }
.footer-inner { justify-content: space-between; font-size: .9rem; }
.guide { max-width: 850px; padding-top: 1.55rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: .55rem; color: var(--muted); font-size: .9rem; }
.guide-hero { margin: 1.2rem 0; padding: clamp(1.4rem, 4vw, 3.05rem); border: 1px solid var(--line); border-top: 4px solid var(--link); border-radius: .9rem; background: var(--surface); }
.guide h1 { font-size: clamp(2.15rem, 5.6vw, 4.15rem); max-width: 19ch; }
.guide .eyebrow { margin-bottom: .7rem; }
.intro { font-size: 1.12rem; max-width: 58ch; margin: 1.1rem 0; color: var(--muted); }
.credit { font-size: .88rem; color: var(--muted); margin-top: .8rem; }
.article-body { max-width: 74ch; padding: 0 .25rem; overflow-wrap: anywhere; }
.article-body h2 { margin: 1.75rem 0 .65rem; font-size: 1.86rem; }
.article-body h3 { margin-top: 1.2rem; }
.article-body p, .article-body li { margin: .55rem 0; }
.article-body a, .back a { color: var(--link); }
.article-body ul, .article-body ol { padding-inline-start: 1.55rem; }
.back { margin: 1.5rem 0 2.7rem; font-weight: 700; }
@media (max-width: 760px) {
  .wrap { width: calc(100% - 32px); }
  .directory-hero { grid-template-columns: 1fr; margin-top: 1rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-wrap: wrap; }
}
@media (max-width: 500px) {
  .masthead-inner { flex-wrap: wrap; gap: .4rem .7rem; }
  .masthead nav { order: 3; width: 100%; margin: 0 0 .1rem; gap: .9rem; }
  .theme-switch { margin-left: auto; padding-inline: .5rem; font-size: .75rem; }
  .brand { font-size: .94rem; }
  .guide h1 { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.guide-figure { max-width: 74ch; margin: 1.45rem 0; }
.guide-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: .85rem; background: var(--surface); }
.guide-figure figcaption { margin-top: .4rem; color: var(--muted); font-size: .82rem; }
.article-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1rem 0; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: .55rem .7rem; text-align: left; }
.article-body th { background: var(--tint); }
