/* ToolShelf — shared design system */
:root {
  --paper: #f5f1e8;
  --paper-2: #efe9dd;
  --card: #fffdf8;
  --ink: #171614;
  --ink-2: #2a2824;
  --muted: #6f6a61;
  --muted-2: #938d82;
  --line: #ded7ca;
  --line-strong: #cdc4b4;
  --accent: #ff5a36;
  --accent-soft: #ffe4dc;
  --lime: #d9f99d;
  --radius: 24px;
  --radius-sm: 14px;
  --shadow: 0 18px 50px rgba(23, 22, 20, 0.08);
  --shadow-soft: 0 8px 24px rgba(23, 22, 20, 0.06);
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 78% -8%, rgba(255, 90, 54, 0.08), transparent 60%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }
body.dialog-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; text-decoration: none; }
[hidden] { display: none !important; }

::selection { background: var(--accent); color: #fff; }

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: translateY(0); }

.container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Announcement */
.announcement {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12.5px;
  letter-spacing: 0.01em;
}
.announcement .container {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}
.announcement strong { color: #fff; font-weight: 600; }
.announcement a {
  color: var(--accent-soft);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  white-space: nowrap;
}
.announcement a:hover { color: #fff; border-color: #fff; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  -webkit-font-smoothing: subpixel-antialiased;
  transition: box-shadow 0.2s ease;
}
.site-header.is-scrolled { box-shadow: 0 8px 30px rgba(23, 22, 20, 0.06); }
.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: 0 0 auto;
}
.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: var(--ink);
  border-radius: 11px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-name {
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 18px;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
}
.primary-nav a {
  padding: 8px 10px;
  color: #59554d;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}
.primary-nav a:hover { color: var(--ink); background: rgba(23, 22, 20, 0.05); }
.primary-nav a[aria-current="page"] { color: var(--ink); background: var(--accent-soft); }
.nav-more { position: relative; }
.nav-more summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  color: #59554d;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.005em;
  border-radius: 999px;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more summary:hover,
.nav-more[open] summary,
.nav-more.is-current summary { color: var(--ink); background: var(--accent-soft); }
.nav-more summary svg { width: 13px; height: 13px; transition: transform 0.15s ease; }
.nav-more[open] summary svg { transform: rotate(180deg); }
.nav-more-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 3;
  width: 232px;
  padding: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 46px rgba(23, 22, 20, 0.14);
}
.nav-more-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
}
.nav-more-menu a + a { margin-top: 2px; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.7);
  border-radius: 50%;
  color: var(--ink);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.icon-button:hover { background: var(--card); border-color: var(--line-strong); transform: translateY(-1px); }
.icon-button svg { width: 17px; height: 17px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.button:hover { transform: translateY(-1px); }
.button-ink { background: var(--ink); color: var(--paper); }
.button-ink:hover { background: #000; }
.button-accent { background: var(--accent); color: #fff; }
.button-accent:hover { filter: brightness(0.94); }
.button-ghost { border-color: var(--line); background: transparent; color: var(--ink); }
.button-ghost:hover { background: var(--card); border-color: var(--line-strong); }
.button-small { min-height: 38px; padding: 9px 14px; font-size: 12.5px; }

.menu-toggle { display: none; }

/* Mobile nav */
.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 2;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 14px 20px 22px;
  box-shadow: 0 20px 40px rgba(23, 22, 20, 0.08);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}
.mobile-nav.is-open { display: block; }
.mobile-nav a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-weight: 600;
}
.mobile-nav a span { color: var(--muted-2); font-size: 12px; font-weight: 500; }
.mobile-nav .button { width: 100%; margin-top: 16px; }

/* Hero */
.hero { padding: 24px 0 0; }
.hero-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
  gap: 28px;
  min-height: 540px;
  padding: clamp(30px, 4.4vw, 58px);
  color: var(--paper);
  background: var(--ink);
  border-radius: 30px;
  box-shadow: 0 30px 80px rgba(23, 22, 20, 0.18);
}
.hero-panel::before {
  content: "";
  position: absolute;
  inset: -30% -20% auto auto;
  width: 720px;
  height: 720px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 65%, transparent) 0%, transparent 62%);
  opacity: 0.48;
  pointer-events: none;
}
.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  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: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 75%);
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; }
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 26px;
  color: rgba(245, 241, 232, 0.56);
  font-size: 12.5px;
}
.breadcrumbs a { color: rgba(245, 241, 232, 0.72); text-decoration: none; }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs span { color: rgba(245, 241, 232, 0.34); }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  color: var(--accent-soft);
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
.hero h1 {
  margin: 0;
  max-width: 780px;
  font-family: var(--display);
  font-size: clamp(48px, 6.1vw, 86px);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.hero-deck {
  max-width: 640px;
  margin: 24px 0 0;
  color: rgba(245, 241, 232, 0.7);
  font-size: clamp(16px, 1.55vw, 19px);
  line-height: 1.55;
  text-wrap: pretty;
}

.hero-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(100%, 640px);
  margin-top: 28px;
  padding: 7px;
  background: var(--paper);
  border-radius: 15px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}
.hero-search input {
  min-width: 0;
  flex: 1;
  padding: 11px 12px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
}
.hero-search input::placeholder { color: var(--muted-2); }
.hero-search button { flex: 0 0 auto; border: 0; min-height: 42px; padding-inline: 20px; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin-top: 14px;
  color: rgba(245, 241, 232, 0.56);
  font-size: 12.5px;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid rgba(245, 241, 232, 0.18);
  border-radius: 999px;
  color: rgba(245, 241, 232, 0.78);
  font-size: 12.5px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.chip:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(245, 241, 232, 0.36); color: #fff; }

/* Home directory cards */
.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.category-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.category-card::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -50px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--category-accent, var(--accent)) 13%, transparent);
  pointer-events: none;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.category-card-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 34px; }
.category-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--category-accent, var(--accent)) 24%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--category-accent, var(--accent)) 11%, var(--card));
  color: var(--category-accent, var(--accent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: transform 0.18s ease, background 0.18s ease;
}
.category-icon { width: 28px; height: 28px; }
.category-card:hover .category-mark {
  transform: translateY(-1px) scale(1.04);
  background: color-mix(in srgb, var(--category-accent, var(--accent)) 16%, var(--card));
}
.category-count { color: var(--muted); font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.category-card h3 { position: relative; z-index: 1; margin: 0 0 9px; font-family: var(--display); font-size: 28px; line-height: 1.06; letter-spacing: -0.03em; }
.category-card p { position: relative; z-index: 1; margin: 0 0 24px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.category-card .text-link { position: relative; z-index: 1; align-self: flex-start; margin-top: auto; }

.hero-art { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; min-height: 360px; }
.shelf-stack { position: relative; width: 300px; height: 360px; }
.stack-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 250px;
  padding: 17px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 18px;
  box-shadow: 0 28px 50px rgba(0, 0, 0, 0.3);
  transform-origin: center;
}
.stack-card-1 { transform: translate(-50%, -50%) translate(-38px, -68px) rotate(-7deg); z-index: 1; }
.stack-card-2 { transform: translate(-50%, -50%) translate(28px, 0) rotate(4deg); z-index: 2; }
.stack-card-3 { transform: translate(-50%, -50%) translate(-20px, 72px) rotate(-2deg); z-index: 3; }
.stack-card .tool-mark { width: 42px; height: 42px; flex: 0 0 auto; }
.stack-card strong { display: block; font-size: 14px; line-height: 1.2; }
.stack-card small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.stack-card .stack-arrow { margin-left: auto; color: var(--muted-2); font-size: 16px; }
.hero-orbit {
  position: absolute;
  width: 420px;
  height: 420px;
  border: 1px dashed rgba(245, 241, 232, 0.16);
  border-radius: 50%;
  animation: orbit 32s linear infinite;
}
.hero-orbit::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 16%, transparent);
}
@keyframes orbit { to { transform: rotate(360deg); } }

/* Sections */
.section { padding: 78px 0; }
.section-tight { padding: 28px 0; }
.section-alt {
  background: var(--paper-2);
  border-block: 1px solid var(--line);
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}
.section-head > div { max-width: 700px; }
.section-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.section-head p { max-width: 390px; margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Quick answer */
.answer-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}
.answer-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 50%;
  font-size: 22px;
  font-weight: 700;
}
.answer-card .kicker { margin-bottom: 4px; }
.answer-text { margin: 0; max-width: 820px; font-size: 16.5px; line-height: 1.55; }
.answer-text strong { font-weight: 750; }

/* Picks */
.picks-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.pick-card {
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.pick-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.pick-card.is-featured { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pick-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.tool-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f1ece2;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
}
@supports (background: color-mix(in srgb, red 10%, white)) {
  .tool-mark {
    background: color-mix(in srgb, var(--tool-color, var(--accent)) 13%, #fffdf8);
    color: color-mix(in srgb, var(--tool-color, var(--accent)) 88%, #171614);
    border-color: color-mix(in srgb, var(--tool-color, var(--accent)) 26%, transparent);
  }
  .pick-card.is-featured .tool-mark { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: rgba(255, 255, 255, 0.18); }
}
.tool-mark.has-logo {
  padding: 7px;
  background: #fffdf8;
  border-color: color-mix(in srgb, var(--tool-color, var(--accent)) 22%, var(--line));
}
.tool-mark.has-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pick-card.is-featured .tool-mark.has-logo { background: #fffdf8; border-color: rgba(255, 255, 255, 0.22); }
.stack-card .tool-mark.has-logo { padding: 6px; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pick-card.is-featured .badge { background: var(--accent); color: #fff; }
.pick-card h3 { margin: 0 0 7px; font-family: var(--display); font-size: 27px; line-height: 1.1; letter-spacing: -0.025em; }
.pick-best { margin: 0 0 10px; color: var(--accent); font-size: 13px; font-weight: 750; line-height: 1.4; }
.pick-card p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.pick-card.is-featured p { color: rgba(245, 241, 232, 0.68); }
.pick-card.is-featured .pick-best { color: var(--accent-soft); }
.pick-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.pick-card.is-featured .pick-meta { border-color: rgba(245, 241, 232, 0.16); color: rgba(245, 241, 232, 0.56); }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 750;
  font-size: 13px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
.text-link:hover { border-color: currentColor; }
.text-link svg, .button svg { width: 15px; height: 15px; flex: 0 0 auto; }
.pick-card.is-featured .text-link { color: var(--accent-soft); }

/* Tool directory */
.tool-toolbar {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}
.tool-search-row { display: flex; gap: 10px; }
.tool-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted-2);
}
.tool-search svg { width: 16px; height: 16px; flex: 0 0 auto; }
.tool-search input { width: 100%; min-height: 44px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; }
.tool-search input::placeholder { color: var(--muted-2); }
.filter-row { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-chip {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.filter-chip:hover { border-color: var(--line-strong); color: var(--ink); }
.filter-chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.tool-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.toggle { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; cursor: pointer; }
.toggle input { width: 16px; height: 16px; accent-color: var(--accent); }
.select {
  min-height: 38px;
  padding: 8px 30px 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-size: 12.5px;
}
.results-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 18px 0 14px; color: var(--muted); font-size: 12.5px; }
.clear-button { padding: 0; border: 0; background: transparent; color: var(--accent); font-size: 12.5px; font-weight: 700; }
.clear-button:hover { color: var(--ink); text-decoration: none; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tool-card {
  display: flex;
  flex-direction: column;
  min-height: 265px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); border-color: var(--line-strong); }
.tool-card.is-hidden { display: none; }
.tool-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.tool-card-tags { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.tool-card-tags .badge { padding: 5px 8px; font-size: 10px; }
.tool-category { padding: 5px 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.tool-card h3 { margin: 0 0 7px; font-family: var(--display); font-size: 25px; line-height: 1.08; letter-spacing: -0.02em; }
.tool-card h3 a { text-decoration: none; }
.tool-card h3 a:hover { color: var(--accent); }
.tool-best { margin: 0 0 9px; color: var(--accent); font-size: 12.5px; font-weight: 750; line-height: 1.4; }
.tool-desc { margin: 0 0 16px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.tool-why { margin: 0 0 16px; padding-top: 12px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 12px; line-height: 1.55; }
.tool-why strong { color: var(--ink); font-weight: 750; }
.tool-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-size: 11.5px; }
.pill { padding: 5px 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-weight: 700; }
.pill-link { text-decoration: none; transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease; }
.pill-link:hover { color: var(--accent); background: var(--accent-soft); border-color: currentColor; text-decoration: none; }
.price-note { color: var(--muted); text-align: right; }
.empty-state { padding: 52px 24px; border: 1px dashed var(--line-strong); border-radius: 18px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; margin-bottom: 4px; color: var(--ink); font-family: var(--display); font-size: 24px; }
.editorial-note { color: var(--muted); font-size: 13px; line-height: 1.6; }

/* Comparison table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow-soft); }
.compare-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 13.5px; }
.compare-table th { padding: 13px 16px; background: var(--ink); color: rgba(245, 241, 232, 0.7); font-size: 10.5px; font-weight: 750; letter-spacing: 0.08em; text-align: left; text-transform: uppercase; }
.compare-table td { padding: 16px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--muted); line-height: 1.5; }
.compare-table tr:last-child td { border-bottom: 0; }
.compare-table tr:hover td { background: rgba(255, 253, 248, 0.72); }
.compare-table td:first-child { color: var(--ink); font-weight: 750; white-space: nowrap; }
.compare-table td strong { color: var(--ink); font-weight: 700; }

/* Workflow */
.workflow-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.workflow-step { padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; }
.step-number { display: block; margin-bottom: 28px; color: var(--accent); font-family: var(--display); font-size: 44px; line-height: 0.8; letter-spacing: -0.05em; }
.workflow-step h3 { margin: 0 0 8px; font-family: var(--display); font-size: 23px; line-height: 1.1; letter-spacing: -0.02em; }
.workflow-step p { margin: 0 0 16px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.tool-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tool-chips span { padding: 5px 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-size: 10.5px; font-weight: 650; }

/* Guide */
.guide-layout { display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); gap: 48px; align-items: start; }
.guide-layout h2, .faq-layout h2 { margin: 0; font-family: var(--display); font-size: clamp(34px, 4vw, 52px); font-weight: 600; line-height: 1; letter-spacing: -0.035em; text-wrap: balance; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.guide-card { padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.guide-card > span { display: block; margin-bottom: 16px; color: var(--accent); font-family: var(--mono); font-size: 11px; font-weight: 700; }
.guide-card h3 { margin: 0 0 7px; font-size: 17px; line-height: 1.25; letter-spacing: -0.01em; }
.guide-card p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }

/* FAQ */
.faq-layout { display: grid; grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr); gap: 48px; align-items: start; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.4;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex: 0 0 auto; color: var(--accent); font-size: 22px; font-weight: 400; line-height: 1; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0; padding: 0 32px 20px 0; color: var(--muted); font-size: 14px; line-height: 1.65; }

/* Related */
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.related-card { display: block; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; text-decoration: none; transition: transform 0.15s ease, border-color 0.15s ease; }
.related-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.related-card .kicker { margin-bottom: 6px; }
.related-card h3 { margin: 0 0 6px; font-family: var(--display); font-size: 25px; line-height: 1.1; letter-spacing: -0.02em; }
.related-card p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }

/* Newsletter */
.newsletter { padding: 76px 0; }
.newsletter-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 36px;
  align-items: center;
  padding: clamp(28px, 4vw, 50px);
  background: var(--ink);
  color: var(--paper);
  border-radius: 28px;
}
.newsletter-panel::before {
  content: "";
  position: absolute;
  right: -18%;
  top: -55%;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 65%, transparent), transparent 68%);
  opacity: 0.42;
  pointer-events: none;
}
.newsletter-copy { position: relative; z-index: 1; }
.newsletter h2 { margin: 0; font-family: var(--display); font-size: clamp(32px, 4vw, 52px); font-weight: 600; line-height: 1; letter-spacing: -0.035em; }
.newsletter p { max-width: 480px; margin: 14px 0 0; color: rgba(245, 241, 232, 0.64); font-size: 14px; line-height: 1.55; }
.newsletter-form { position: relative; z-index: 1; }
.newsletter-row { display: flex; gap: 7px; padding: 7px; background: var(--paper); border-radius: 14px; }
.newsletter-row input { min-width: 0; flex: 1; padding: 10px 12px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; }
.newsletter-row button { flex: 0 0 auto; border: 0; }
.form-note { margin: 10px 0 0; color: rgba(245, 241, 232, 0.44); font-size: 11.5px; }
.form-status { min-height: 20px; margin: 10px 0 0; color: var(--accent-soft); font-size: 12.5px; }
.form-status.is-error { color: #ffb39f; }
.form-status.is-success { color: #d9f99d; }
.submit-dialog .form-status.is-error { color: #b42318; }
.submit-dialog .form-status.is-success { color: #16704d; }
.honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Footer */
.site-footer { padding: 54px 0 24px; background: var(--paper-2); border-top: 1px solid var(--line); }
.footer-top { display: grid; grid-template-columns: 1.7fr repeat(3, 1fr); gap: 34px; }
.footer-brand p { max-width: 330px; margin: 14px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.footer-col h3 { margin: 2px 0 12px; color: var(--muted-2); font-size: 10.5px; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; }
.footer-col a { display: block; padding: 5px 0; color: var(--ink); font-size: 13.5px; text-decoration: none; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-top: 38px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: inherit; text-decoration: none; }
.footer-bottom a:hover { color: var(--ink); }

/* Dialogs */
.search-dialog, .submit-dialog {
  width: min(660px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 40px));
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.3);
}
.search-dialog::backdrop, .submit-dialog::backdrop { background: rgba(23, 22, 20, 0.58); backdrop-filter: blur(4px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-family: var(--display); font-size: 27px; letter-spacing: -0.02em; }
.dialog-close { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); font-size: 20px; line-height: 1; }
.dialog-close:hover { background: var(--paper); }
.dialog-body { padding: 18px 22px 22px; }
.dialog-input { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font-size: 15px; }
.dialog-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.search-results { max-height: 360px; overflow: auto; margin-top: 12px; border-top: 1px solid var(--line); }
.search-result { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 13px 2px; border-bottom: 1px solid var(--line); text-decoration: none; }
.search-result:hover { background: var(--paper); }
.search-result:hover strong { color: var(--accent); }
.search-result strong { display: block; font-size: 14px; }
.search-result span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.result-type { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 9.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.dialog-hint { margin: 12px 0 0; color: var(--muted-2); font-size: 12px; }
.search-empty { margin: 0; padding: 28px 4px; color: var(--muted); font-size: 13px; text-align: center; }

.submit-form { display: grid; gap: 14px; padding: 18px 22px 24px; }
.field { display: grid; gap: 6px; }
.field label { color: var(--ink); font-size: 12px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font-size: 14px; }
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-success { display: grid; justify-items: start; gap: 12px; padding: 24px 22px 28px; }
.form-success[hidden] { display: none; }
.form-success h3 { margin: 0; font-family: var(--display); font-size: 30px; line-height: 1.05; letter-spacing: -0.025em; }
.form-success p { margin: 0; max-width: 520px; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
button:disabled { cursor: wait; opacity: 0.7; transform: none !important; }

/* Simple and legal pages */
.simple-hero {
  padding: 62px 0 46px;
  background:
    radial-gradient(700px 340px at 82% 0%, rgba(255, 90, 54, 0.12), transparent 68%),
    var(--paper-2);
  border-bottom: 1px solid var(--line);
}
.simple-hero .breadcrumbs { margin-bottom: 24px; color: var(--muted); }
.simple-hero .breadcrumbs a { color: var(--muted); }
.simple-hero .breadcrumbs a:hover { color: var(--ink); }
.simple-hero h1 { max-width: 850px; margin: 0; font-family: var(--display); font-size: clamp(46px, 6vw, 76px); font-weight: 600; line-height: 0.96; letter-spacing: -0.04em; }
.simple-hero > .container > p:last-child { max-width: 670px; margin: 22px 0 0; color: var(--muted); font-size: 17px; line-height: 1.55; }
.legal-page { max-width: 820px; padding: clamp(24px, 4vw, 46px); background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-soft); }
.legal-page > :first-child { margin-top: 0; }
.legal-page h2 { margin: 34px 0 10px; font-family: var(--display); font-size: 28px; line-height: 1.1; letter-spacing: -0.02em; }
.legal-page p, .legal-page li { color: var(--muted); font-size: 14.5px; line-height: 1.7; }
.legal-page a { color: var(--accent); font-weight: 650; }
.not-found-code { margin: 0 0 12px; color: var(--accent); font-family: var(--display); font-size: 100px; line-height: 0.8; letter-spacing: -0.06em; }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.55s ease, transform 0.55s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1080px) {
  .primary-nav { display: none; }
  .menu-toggle { display: inline-grid; }
  .hero-panel { grid-template-columns: 1fr; min-height: auto; }
  .hero-art { display: none; }
  .picks-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pick-card:last-child { grid-column: 1 / -1; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-layout, .faq-layout { grid-template-columns: 1fr; gap: 28px; }
  .newsletter-panel { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .container { width: calc(100% - 28px); }
  .announcement .container { min-height: 34px; font-size: 11px; }
  .announcement .container span { display: none; }
  .header-inner { height: 64px; gap: 12px; }
  .brand-name { font-size: 17px; }
  .header-actions .button { display: none; }
  .hero { padding-top: 14px; }
  .hero-panel { padding: 28px 22px 30px; border-radius: 22px; }
  .breadcrumbs { margin-bottom: 20px; }
  .hero h1 { font-size: clamp(42px, 12vw, 62px); }
  .hero-deck { font-size: 15.5px; }
  .hero-search { flex-direction: column; align-items: stretch; padding: 7px; }
  .hero-search button { width: 100%; }
  .hero-chips { margin-top: 20px; }
  .section { padding: 54px 0; }
  .section-tight { padding: 18px 0; }
  .section-head { display: block; margin-bottom: 24px; }
  .section-head p { margin-top: 12px; }
  .answer-card { grid-template-columns: 42px 1fr; gap: 14px; padding: 18px; }
  .answer-icon { width: 42px; height: 42px; font-size: 18px; }
  .answer-card .text-link { grid-column: 2; }
  .answer-text { font-size: 14.5px; }
  .picks-grid, .tool-grid, .related-grid, .category-grid { grid-template-columns: 1fr; }
  .category-card { min-height: 0; }
  .pick-card:last-child { grid-column: auto; }
  .pick-card { min-height: 0; }
  .workflow-grid { grid-template-columns: 1fr; }
  .guide-grid { grid-template-columns: 1fr; }
  .tool-search-row { flex-direction: column; }
  .tool-controls { align-items: stretch; flex-direction: column; }
  .select { width: 100%; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { display: block; }
  .footer-bottom p + p { margin-top: 8px; }
  .newsletter-row { flex-direction: column; }
  .newsletter-row button { width: 100%; }
  .form-row { grid-template-columns: 1fr; }
  .simple-hero { padding: 42px 0 34px; }
  .simple-hero > .container > p:last-child { font-size: 15px; }
  .legal-page { padding: 22px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 40px; }
  .hero-meta { gap: 7px 12px; font-size: 11.5px; }
  .chip { font-size: 11.5px; padding: 7px 10px; }
  .compare-table { min-width: 680px; }
}

@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; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Print */
@media print {
  .announcement, .site-header, .mobile-nav, .hero-art, .tool-toolbar, .newsletter, .site-footer, .dialog-close { display: none !important; }
  body { background: #fff; color: #111; }
  .hero-panel { background: #fff; color: #111; box-shadow: none; border: 1px solid #ddd; }
  .hero h1, .hero-deck, .hero-meta, .chip { color: #111; }
  .section-alt { background: #fff; }
  .tool-card, .pick-card, .workflow-step, .guide-card, .answer-card { break-inside: avoid; box-shadow: none; }
  a { text-decoration: none; }
}
