/* ============================================================================
   AP ELECTRON — shared site stylesheet
   ----------------------------------------------------------------------------
   Used by:  index.html · about.html · contact.html · privacy.html · terms.html
             tools/index.html
   Sections: 1. Tokens
             2. Reset & base
             3. Layout helpers
             4. Buttons & links
             5. Header / navigation
             6. Hero
             7. Sections (eyebrows, titles)
             8. Intro
             9. Tool cards
            10. Projects (beyond tools)
            11. Sub-page header
            12. Prose (about / legal)
            13. Footer
            14. Responsive
   ========================================================================== */

/* ---------- 1. TOKENS ---------------------------------------------------- */
:root {
  /* Surfaces */
  --paper:        #f7f7f4;
  --paper-raised: #ffffff;
  --paper-sunk:   #f1f1ed;
  --ink:          #0c0c0d;
  --dark:         #0b0b0c;
  --dark-raised:  #131315;
  --dark-line:    #26262a;

  /* Text */
  --ink-2:   #2c2c31;
  --muted:   #5b5b63;
  --faint:   #6b6b75;
  --on-dark:     #f3f3f0;
  --on-dark-2:   #a8a8b0;
  --on-dark-3:   #7e7e88;

  /* Lines */
  --line:        #e4e4de;
  --line-strong: #cfcfc7;

  /* Accent — warm copper */
  --accent:        #b45309;
  --accent-deep:   #8a3f06;
  --accent-on-dark: #e8945c;

  /* Type */
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Metrics */
  --wrap: 1160px;
  --gutter: clamp(20px, 5vw, 40px);
  --radius: 14px;
  --radius-sm: 9px;
  --header-h: 72px;
  --header-h-compact: 60px;

  --shadow-card: 0 14px 32px -22px rgba(12, 12, 13, 0.5);
}

/* ---------- 2. RESET & BASE --------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h-compact) + 16px);
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-dark :focus-visible,
.site-header :focus-visible,
.site-footer :focus-visible,
.hero :focus-visible,
.page-head :focus-visible { outline-color: var(--accent-on-dark); }

::selection { background: rgba(180, 83, 9, 0.18); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 11px 18px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 8px 8px;
  transition: top 0.18s ease;
}
.skip-link:focus { top: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- 3. LAYOUT HELPERS ------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(56px, 8vw, 104px); }
.section--raised {
  background: var(--paper-raised);
  border-block: 1px solid var(--line);
}

/* Faint technical grid — used on dark surfaces only */
.grid-texture {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(115% 85% at 12% 6%, #000 0%, transparent 72%);
  mask-image: radial-gradient(115% 85% at 12% 6%, #000 0%, transparent 72%);
}

/* ---------- 4. BUTTONS & LINKS ------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease,
              color 0.16s ease, transform 0.16s ease;
}
.btn:active { transform: translateY(1px); }

.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-deep); }

.btn--ghost-dark {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--on-dark);
}
.btn--ghost-dark:hover { border-color: rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.06); }

.btn--outline {
  border-color: var(--line-strong);
  color: var(--ink);
  background: transparent;
}
.btn--outline:hover { border-color: var(--ink); background: var(--paper-raised); }

.btn--sm { min-height: 40px; padding: 9px 17px; font-size: 14px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--accent-deep);
  text-decoration: none;
  border-bottom: 1px solid rgba(138, 63, 6, 0.3);
  padding-bottom: 2px;
  transition: border-color 0.16s ease, color 0.16s ease;
}
.link-arrow:hover { color: var(--accent); border-bottom-color: var(--accent); }
.link-arrow .arw { transition: transform 0.16s ease; }
.link-arrow:hover .arw { transform: translateX(3px); }

/* ---------- 5. HEADER / NAVIGATION -------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--dark);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-compact { border-bottom-color: var(--dark-line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-h);
  transition: min-height 0.2s ease;
}
.site-header.is-compact .header-inner { min-height: var(--header-h-compact); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--on-dark);
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border: 1px solid var(--dark-line);
  border-radius: 8px;
  background: var(--dark-raised);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent-on-dark);
  transition: border-color 0.16s ease;
}
.brand:hover .brand__mark { border-color: var(--accent-on-dark); }
.brand__name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.nav-panel { display: flex; align-items: center; gap: 8px; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}
.nav-list a {
  display: block;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 14.5px;
  color: var(--on-dark-2);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav-list a:hover { color: var(--on-dark); background: rgba(255, 255, 255, 0.055); }
.nav-list a[aria-current="page"] { color: var(--on-dark); }

.nav-cta {
  min-height: 40px;
  margin-left: 8px;
  padding: 9px 18px;
  font-size: 14px;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
}
.nav-cta:hover { background: var(--accent-deep); }
.nav-cta[aria-current="page"] { background: var(--accent-deep); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--dark-line);
  border-radius: 9px;
  color: var(--on-dark);
  cursor: pointer;
}
.nav-toggle:hover { border-color: rgba(255, 255, 255, 0.35); }
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 17px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -5.5px; }
.nav-toggle__bars::after { top: 5.5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-5.5px) rotate(-45deg); }

/* ---------- 6. HERO ------------------------------------------------------ */
.hero {
  position: relative;
  background: var(--dark);
  color: var(--on-dark);
  overflow: hidden;
  border-bottom: 1px solid var(--dark-line);
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(36px, 5vw, 68px);
  align-items: start;
  padding-block: clamp(54px, 8.5vw, 104px) clamp(54px, 8vw, 96px);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark-3);
}
.kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-on-dark);
  flex: none;
}

.hero__title {
  margin-top: 22px;
  max-width: 15ch;
  font-size: clamp(2.35rem, 5.4vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.038em;
  font-weight: 600;
  color: #f7f7f4;
}

.hero__lead {
  margin-top: 22px;
  max-width: 52ch;
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.68;
  color: var(--on-dark-2);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

/* Hero index panel — a live directory of what actually exists */
.index-panel {
  border: 1px solid var(--dark-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.028);
  overflow: hidden;
}
.index-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--dark-line);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--on-dark-3);
}
.index-list { list-style: none; padding: 6px; }
.index-list li + li { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.index-list a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--on-dark);
  transition: background-color 0.15s ease;
}
.index-list a:hover { background: rgba(255, 255, 255, 0.055); }
.index-list a:hover .index-list__name { color: var(--accent-on-dark); }
.index-list__num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--on-dark-3);
}
.index-list__name {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  transition: color 0.15s ease;
}
.index-list__cat {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-dark-3);
  white-space: nowrap;
}
.index-panel__foot {
  display: block;
  padding: 14px 18px;
  border-top: 1px solid var(--dark-line);
  font-size: 13.5px;
  color: var(--on-dark-2);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.index-panel__foot:hover { color: var(--accent-on-dark); background: rgba(255, 255, 255, 0.04); }

/* ---------- 7. SECTIONS -------------------------------------------------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::after {
  content: "";
  flex: 1;
  max-width: 130px;
  height: 1px;
  background: var(--line-strong);
}

.section-title {
  margin-top: 20px;
  font-size: clamp(1.75rem, 3.4vw, 2.55rem);
  line-height: 1.14;
  letter-spacing: -0.032em;
  max-width: 20ch;
}
.section-lead {
  margin-top: 16px;
  max-width: 62ch;
  font-size: clamp(15.5px, 1.35vw, 17px);
  line-height: 1.7;
  color: var(--muted);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.section-head__aside { padding-bottom: 6px; }

/* ---------- 8. INTRO ----------------------------------------------------- */
.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.intro-body p {
  font-size: clamp(16px, 1.4vw, 17.5px);
  line-height: 1.75;
  color: var(--muted);
}
.intro-body p + p { margin-top: 20px; }
.intro-body strong { color: var(--ink-2); font-weight: 600; }
.intro-body .link-arrow { margin-top: 30px; }

/* ---------- 9. TOOL CARDS ------------------------------------------------ */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 42px;
}
/* No heading above it (tools index page) — no extra breathing room needed. */
.tool-grid:first-child { margin-top: 0; }

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 26px 24px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.tool-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
  transform: translateY(-3px);
}
.tool-card:focus-within { border-color: var(--accent); }

.tool-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.tool-card__cat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tool-card__cat::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.tool-card__title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.022em;
}
.tool-card__title a { text-decoration: none; }
/* Stretched link: the whole card is one clear, honest target.
   The focus ring therefore lands on the title text itself. */
.tool-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}
.tool-card__title a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}
.tool-card__desc {
  font-size: 15px;
  line-height: 1.68;
  color: var(--muted);
}
.tool-card__cta {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
  text-decoration: none;
}
.tool-card:hover .tool-card__cta .arw { transform: translateX(3px); }
.tool-card__cta .arw { transition: transform 0.16s ease; }

/* ---------- 10. PROJECTS / BEYOND TOOLS --------------------------------- */
.beyond-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(26px, 4vw, 56px);
  align-items: start;
  padding: clamp(28px, 4vw, 44px);
  background: var(--paper-sunk);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.beyond-panel .eyebrow { color: var(--faint); }
.beyond-panel .eyebrow::after { background: var(--line-strong); }
.beyond-panel .section-title { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.beyond-note {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--muted);
}
.beyond-note + .beyond-note { margin-top: 14px; }

.domain-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin-top: 22px;
}
.domain-list li {
  padding: 6px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper-raised);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* ---------- 11. SUB-PAGE HEADER ----------------------------------------- */
.page-head {
  position: relative;
  overflow: hidden;
  background: var(--dark);
  color: var(--on-dark);
  border-bottom: 1px solid var(--dark-line);
  padding-block: clamp(44px, 6.5vw, 80px);
}
.page-head .wrap { position: relative; }
.page-head .kicker { color: var(--on-dark-3); }
.page-title {
  margin-top: 20px;
  max-width: 18ch;
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: #f7f7f4;
}
.page-lead {
  margin-top: 18px;
  max-width: 58ch;
  font-size: clamp(15.5px, 1.4vw, 17.5px);
  line-height: 1.7;
  color: var(--on-dark-2);
}

/* ---------- 12. PROSE ---------------------------------------------------- */
.prose { max-width: 74ch; }
.prose > * + * { margin-top: 18px; }
.prose h2 {
  margin-top: 46px;
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  letter-spacing: -0.024em;
}
.prose h3 { margin-top: 30px; font-size: 1.05rem; }
.prose p, .prose li {
  font-size: 16px;
  line-height: 1.78;
  color: var(--muted);
}
.prose strong { color: var(--ink-2); font-weight: 600; }
/* :not(.btn) keeps button colours out of the prose link rule */
.prose a:not(.btn) { color: var(--accent-deep); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:not(.btn):hover { color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin-top: 9px; }
.prose li::marker { color: var(--accent); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 44px; }

.note {
  padding: 16px 20px;
  border-left: 2px solid var(--accent);
  background: var(--paper-raised);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}

/* .prose .meta-line beats `.prose p` so the mono style survives inside prose */
.meta-line,
.prose .meta-line {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--faint);
}

/* Small spacing utilities — keeps one-off margins out of the HTML */
.mt-sm { margin-top: 22px; }
.mt-lg { margin-top: 34px; }

.link-list { list-style: none; padding: 0; }
.link-list li { margin-top: 12px; }

/* ---------- 13. FOOTER --------------------------------------------------- */
.site-footer {
  background: var(--dark);
  color: var(--on-dark-2);
  padding-block: clamp(48px, 6vw, 76px) 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px);
}
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand p {
  max-width: 34ch;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--on-dark-3);
}
.footer-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--on-dark-3);
}
.footer-links { list-style: none; margin-top: 18px; }
.footer-links li + li { margin-top: 11px; }
.footer-links a {
  font-size: 14.5px;
  color: var(--on-dark-2);
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-links a:hover { color: var(--accent-on-dark); }
.footer-links a[aria-current="page"] { color: var(--on-dark); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: 22px;
  border-top: 1px solid var(--dark-line);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--on-dark-3);
}

/* ---------- 14. RESPONSIVE ---------------------------------------------- */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero__title { max-width: 17ch; }
  .index-panel { max-width: 560px; }
  .intro-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .beyond-panel { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  /* Nothing to toggle without JavaScript, so the button is not shown. */
  html:not(.js) .nav-toggle { display: none; }

  .nav-panel {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  /* WITH JS — the menu becomes a dropdown beneath the header. */
  .js .nav-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    padding: 12px var(--gutter) 20px;
    background: var(--dark);
    border-bottom: 1px solid var(--dark-line);
    box-shadow: 0 22px 40px -26px rgba(0, 0, 0, 0.9);
  }
  .js .nav-panel.is-open { display: flex; }

  /* WITHOUT JS — the menu stays in normal flow, so it is always reachable. */
  html:not(.js) .header-inner { flex-wrap: wrap; padding-bottom: 6px; }
  html:not(.js) .nav-panel { flex-basis: 100%; padding-top: 6px; }

  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-list a {
    padding: 13px 12px;
    font-size: 16px;
    border-radius: var(--radius-sm);
  }
  .nav-list a:hover { background: rgba(255, 255, 255, 0.06); }
  .nav-cta {
    margin: 8px 0 0;
    min-height: 48px;
    justify-content: center;
    font-size: 15.5px;
  }

  .tool-grid { grid-template-columns: minmax(0, 1fr); }
  .section-head { align-items: flex-start; }
  .section-head__aside { padding-bottom: 0; }
}

@media (max-width: 620px) {
  :root { --header-h: 64px; --header-h-compact: 56px; }

  .hero__title { font-size: clamp(2.1rem, 9vw, 2.7rem); max-width: none; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }

  .index-list a { grid-template-columns: auto minmax(0, 1fr); gap: 12px; }
  .index-list__cat { display: none; }

  .tool-card { padding: 22px 20px 20px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- MOTION PREFERENCES ------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .tool-card:hover { transform: none; }
}

/* ---------- PRINT -------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .grid-texture, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  .hero, .page-head { background: #fff; color: #000; border: 0; }
  .hero__title, .page-title { color: #000; }
  .hero__lead, .page-lead, .kicker { color: #333; }
}
