:root {
  color-scheme: dark;
  --bg: #111923;
  --panel: #192430;
  --panel-hover: #20323e;
  --line: #30414f;
  --text: #edf3f7;
  --muted: #a8bac8;
  --accent: #73e1cd;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.6; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a, input, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
.wrap { width: min(1200px, calc(100% - 4rem)); margin-inline: auto; }
.accent { color: var(--accent); }
.skip-link { position: absolute; left: 1rem; top: -6rem; z-index: 10; padding: 1rem; background: var(--accent); color: var(--bg); border-radius: .5rem; }
.skip-link:focus { top: 1rem; }
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1.6rem; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; font-size: .9rem; font-weight: 800; letter-spacing: .08em; }
.brand-mark { width: 42px; height: 42px; margin-right: .8rem; display: flex; align-items: center; justify-content: center; border: 1px solid #4f8b83; border-radius: 12px; color: var(--accent); font-size: 1rem; letter-spacing: -.08em; }
.brand-mark span { font-size: .65rem; padding-top: .2rem; }
.header-link { font-size: .85rem; color: var(--muted); padding-block: .5rem; }
.header-link span { margin-left: .75rem; color: var(--accent); }
.header-link:hover, .site-footer a:hover { color: var(--accent); }
.hero { position: relative; padding: 4.5rem 0 4rem; background: radial-gradient(ellipse at 90% 40%, #1c38394d, transparent 60%); }
.eyebrow { color: var(--accent); font-size: .7rem; font-weight: 750; text-transform: uppercase; letter-spacing: .15em; margin-bottom: .65rem; }
h1 { font-size: clamp(2.5rem, 5.5vw, 4.5rem); line-height: 1.12; letter-spacing: -.055em; font-weight: 750; }
h1 span { color: var(--accent); }
.hero-description { color: var(--muted); margin-top: 1.4rem; font-size: 1.1rem; line-height: 1.8; }
.hero-bottom { display: flex; align-items: center; gap: 1.5rem; margin-top: 2rem; }
.primary-link { background: var(--accent); color: #102c2b; padding: .8rem 1.1rem; border-radius: .6rem; font-size: .85rem; font-weight: 750; }
.primary-link:hover { background: #a2f1e3; }
.primary-link span { margin-left: 1rem; }
.hero-note, .section-note { font-size: .8rem; color: var(--muted); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.section-heading .eyebrow { margin-bottom: .3rem; }
h2 { font-size: 1.6rem; letter-spacing: -.035em; line-height: 1.3; }
.featured-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.feature-card { display: flex; align-items: center; gap: .9rem; border: 1px solid var(--line); background: linear-gradient(120deg, #1e303b, var(--panel)); padding: 1.15rem; border-radius: .8rem; transition: border-color .15s, background .15s; }
.feature-card strong { display: block; font-size: .9rem; font-weight: 650; }
.feature-card small { display: block; color: var(--muted); font-size: .75rem; margin-top: .2rem; }
.tool-icon, .category-symbol { display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; color: var(--accent); background: #73e1cd12; border: 1px solid #73e1cd22; border-radius: .7rem; font-size: 1.5rem; }
.code-icon { font-size: .85rem; font-weight: 700; }
.arrow { color: var(--accent); margin-left: auto; }
.directory { margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid var(--line); }
.search-controls { margin-block: 1.5rem; }
.search-controls label { display: block; margin-bottom: .5rem; font-size: .85rem; font-weight: 650; }
.search-row { display: flex; gap: .75rem; }
.search-row input { min-width: 0; flex: 1; width: 100%; padding: .9rem 1rem; border: 1px solid #4b6171; border-radius: .6rem; background: #16212c; color: var(--text); }
.search-row input::placeholder { color: var(--muted); opacity: 1; }
button { padding: .8rem 1rem; border: 1px solid #4b6171; border-radius: .6rem; color: var(--text); background: var(--panel); }
button:hover { border-color: var(--accent); background: var(--panel-hover); }
.search-hint { font-size: .75rem; color: var(--muted); margin-top: .5rem; }
.category-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: 1.5rem 2.25rem; }
.category-nav a { border: 1px solid var(--line); border-radius: 999px; padding: .55rem .9rem; font-size: .8rem; color: var(--muted); }
.category-nav a:hover { color: var(--text); border-color: #6e8795; }
.category-nav a[aria-current="true"] { color: var(--accent); background: #73e1cd12; border-color: #4f8b83; }
.tool-section { margin-bottom: 2.6rem; }
.category-heading { display: flex; gap: .9rem; align-items: center; margin-bottom: 1rem; }
.category-symbol { width: 38px; height: 38px; font-size: 1.2rem; }
.category-symbol.code-icon { font-size: .8rem; }
h3 { font-size: 1.1rem; font-weight: 650; letter-spacing: -.015em; }
.category-heading p { font-size: .8rem; color: var(--muted); margin-top: .15rem; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.tool-card { position: relative; padding: 1.15rem 2.5rem 1.15rem 1.15rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--panel); transition: background .15s, border-color .15s; overflow-wrap: anywhere; }
.tool-card::after { content: "↗"; position: absolute; top: 1.15rem; right: 1rem; color: #91a6b4; }
.tool-card:hover, .feature-card:hover { border-color: #4f8b83; background: var(--panel-hover); }
.tool-card:hover h4, .feature-card:hover strong { color: var(--accent); }
h4 { font-size: .9rem; font-weight: 650; }
.tool-card p { font-size: .78rem; color: var(--muted); margin-top: .35rem; }
.alternates { margin-top: .8rem; }
.alternates summary { width: fit-content; padding: .45rem .2rem; cursor: pointer; color: var(--muted); font-size: .8rem; }
.alternates .tool-grid { margin-top: .65rem; }
.notice { border: 1px dashed #425c6b; padding: 1.25rem; border-radius: .7rem; background: #16232d; }
.notice p { color: var(--muted); font-size: .85rem; max-width: 75ch; margin-top: .4rem; }
.badge { display: inline-block; color: #f1d298; background: #f1d29810; border-radius: .3rem; padding: .2rem .5rem; font-size: .7rem; margin-bottom: .75rem; }
.empty-state { text-align: center; border: 1px dashed var(--line); border-radius: .8rem; padding: 3rem 1rem; }
.empty-state p { color: var(--muted); margin-block: .5rem 1.2rem; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-top: 1px solid var(--line); padding-block: 2rem; margin-top: 3rem; color: var(--muted); font-size: .75rem; }
.site-footer strong { color: var(--text); display: block; font-size: .85rem; margin-bottom: .25rem; }
.site-footer a { flex-shrink: 0; padding-block: .75rem; }
@media (min-width: 1500px) { .hero { padding-block: 5.5rem; } }
@media (max-width: 950px) {
  .featured-grid, .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-note { max-width: 24ch; }
}
@media (max-width: 600px) {
  .wrap { width: calc(100% - 2rem); }
  .site-header { padding-block: 1rem; }
  .header-link { font-size: .75rem; }
  .header-link span { margin-left: .2rem; }
  .brand { font-size: .75rem; }
  .brand-mark { margin-right: .5rem; width: 35px; height: 35px; }
  .hero { padding-block: 3rem; }
  .hero-description { font-size: 1rem; }
  .hero-bottom { align-items: flex-start; flex-direction: column; gap: .8rem; }
  .hero-note { max-width: none; font-size: .7rem; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: .5rem; }
  .featured-grid, .tool-grid { grid-template-columns: minmax(0, 1fr); }
  .feature-card { padding: 1rem; }
  .directory { margin-top: 2.5rem; padding-top: 2rem; }
  .search-row { flex-direction: column; }
  .search-row button { align-self: flex-start; font-size: .8rem; }
  .category-nav { gap: .4rem; }
  .category-nav a { padding: .6rem .8rem; }
  .site-footer { align-items: flex-start; flex-direction: column; margin-top: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
