:root {
  color-scheme: light;
  --canvas: #f7f8fa;
  --surface: #fff;
  --subtle: #f1f4f7;
  --ink: #17212f;
  --muted: #596779;
  --line: #d9e0e8;
  --action: #1456d8;
  --action-hover: #0f43ad;
  --trust: #087e73;
  --trust-bg: #e6f5f2;
  --trust-line: #d5e6e4;
  --soft-blue: #e9efff;
  --danger: #b42318;
  --focus: #1456d8;
  --radius-control: 8px;
  --radius-card: 12px;
  --radius-panel: 16px;
  --page: 1120px;
  --nav-h: 64px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img, svg { display: block; }
a { color: var(--action); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.wrap { width: min(100% - 48px, var(--page)); margin-inline: auto; }

/* Nav */
.site-nav {
  position: sticky; top: 0; z-index: 20;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 max(24px, calc((100% - var(--page)) / 2));
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-size: 18px; font-weight: 700; letter-spacing: -.035em; white-space: nowrap;
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--soft-blue); color: var(--action);
  display: grid; place-items: center; font-size: 14px; font-weight: 800;
}
.brand-accent { color: var(--trust); }
.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #fff; color: var(--ink);
  min-width: 44px; min-height: 44px; padding: 0;
}
.menu-bars { display: grid; gap: 4px; justify-items: center; }
.menu-bars i { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 1px; }
.nav-links { display: flex; align-items: center; gap: 18px; font-size: 13px; }
.nav-links a {
  color: #344255; text-decoration: none; font-weight: 600;
  min-height: 32px; display: inline-flex; align-items: center;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--action); }
.lang-switch {
  margin-left: 6px;
  border: 1px solid var(--line);
  background: #fff; color: var(--ink);
  border-radius: var(--radius-control);
  min-height: 36px; padding: 6px 11px;
  font-size: 13px; font-weight: 650;
}
.lang-switch:hover { background: var(--subtle); }

/* Buttons / forms */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 11px 16px;
  border-radius: var(--radius-control);
  background: var(--action); color: #fff;
  font-weight: 650; text-decoration: none;
  border: 1px solid var(--action);
}
.button:hover { background: var(--action-hover); border-color: var(--action-hover); }
.button.secondary {
  background: #fff; border-color: #b9c5d3; color: var(--ink);
}
.button.secondary:hover { background: var(--subtle); border-color: #8796a8; }
input[type=search], input[type=text], select {
  min-height: 44px; width: 100%;
  border: 1px solid #bfcad7; border-radius: var(--radius-control);
  background: #fff; color: var(--ink); padding: 10px 12px;
}
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.eyebrow {
  color: var(--trust);
  font-size: 12px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  margin: 0 0 8px;
}
.muted { color: var(--muted); }
.section { padding: 56px 0; }
.section-head { max-width: 680px; margin-bottom: 24px; }
.section-head h2 {
  margin: 0 0 8px; font-size: 28px; line-height: 1.28;
  letter-spacing: -.025em;
}
.section-head p { margin: 0; }

/* Home hero */
.home-hero { padding: 56px 0 36px; }
.home-hero h1 {
  margin: 0 0 12px;
  max-width: 18ch;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.1; letter-spacing: -.045em; font-weight: 700;
}
.home-hero .lede {
  margin: 0; max-width: 650px;
  color: var(--muted); font-size: 18px; line-height: 1.55;
}
.home-search { display: flex; gap: 10px; margin: 28px 0 16px; max-width: 680px; }
.home-search input { flex: 1; min-width: 0; min-height: 52px; }
.home-search .button { min-height: 52px; flex: 0 0 auto; }
.home-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Trust */
.trust-band {
  background: #eef5f5;
  border-block: 1px solid var(--trust-line);
  padding: 36px 0;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.trust-item {
  background: #fff;
  border: 1px solid var(--trust-line);
  border-radius: var(--radius-card);
  padding: 18px 20px;
}
.trust-item h2, .trust-item h3 {
  margin: 0 0 6px; font-size: 16px; letter-spacing: -.02em;
}
.trust-item p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.trust-foot { margin: 20px 0 0; }

/* Cards / grids */
.domain-grid, .topic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.feature-grid, .tool-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 20px;
  min-width: 0;
}
.card h3 { margin: 0 0 7px; font-size: 17px; line-height: 1.35; letter-spacing: -.02em; }
.card p { margin: 0 0 14px; color: var(--muted); font-size: 14px; line-height: 1.5; flex: 1; }
.card a.card-link, .card .card-link {
  color: var(--action); font-size: 14px; font-weight: 650; text-decoration: none;
  margin-top: auto;
}
.card a.card-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.card:hover { border-color: #b9c5d3; }
.domain-card .badge {
  display: inline-flex; align-items: center;
  min-height: 24px; padding: 3px 9px; margin-bottom: 10px;
  border-radius: 999px; background: var(--soft-blue); color: var(--action);
  font-size: 12px; font-weight: 650;
}

/* Tools hub */
.hub-hero { padding: 40px 0 8px; }
.breadcrumb {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 0 20px; color: var(--muted); font-size: 13px;
}
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: var(--action); }
.hub-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15; letter-spacing: -.04em;
}
.hub-hero .lede { margin: 0; max-width: 680px; }
.featured-row {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 20px 0 0;
}
.featured-chip {
  display: inline-flex; align-items: center;
  min-height: 36px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink);
  text-decoration: none; font-size: 13px; font-weight: 650;
}
.featured-chip:hover { border-color: var(--action); color: var(--action); }

.hub-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(150px, .4fr) minmax(150px, .4fr);
  gap: 12px;
  margin: 8px 0 18px;
  position: sticky; top: calc(var(--nav-h) + 0px);
  z-index: 10;
  background: var(--canvas);
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--line);
}
.hub-controls label {
  display: grid; gap: 5px;
  color: var(--muted); font-size: 12px; font-weight: 650;
}
#tool-count { margin: 0 0 20px; font-size: 14px; }
.group { margin: 0 0 32px; }
.group-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 0 0 12px;
}
.group-head h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.group-head .group-count { color: var(--muted); font-size: 13px; }
.empty-state {
  background: #fff; border: 1px dashed var(--line); border-radius: var(--radius-card);
  padding: 28px 20px; text-align: center; color: var(--muted);
}
.empty-state strong { display: block; color: var(--ink); margin-bottom: 6px; }

/* Privacy */
.privacy-hero { padding: 40px 0 12px; }
.privacy-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15; letter-spacing: -.04em;
}
.privacy-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px;
  padding: 12px 0 64px;
  align-items: start;
}
.privacy-toc {
  position: sticky; top: calc(var(--nav-h) + 16px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 16px 18px;
}
.privacy-toc h2 { margin: 0 0 10px; font-size: 13px; color: var(--muted); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.privacy-toc ol { margin: 0; padding: 0; list-style: none; }
.privacy-toc a {
  display: block; padding: 6px 0;
  color: #344255; text-decoration: none; font-size: 14px; font-weight: 600;
}
.privacy-toc a:hover, .privacy-toc a[aria-current="location"] { color: var(--action); }
.privacy-doc {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 32px 36px 40px;
  max-width: 760px;
}
.privacy-doc h2 {
  margin: 28px 0 10px;
  font-size: 20px; letter-spacing: -.02em;
}
.privacy-doc h2:first-child { margin-top: 0; }
.privacy-doc p { margin: 0 0 12px; color: var(--ink); font-size: 16px; line-height: 1.65; }
.privacy-doc .lede { color: var(--muted); font-size: 17px; }

/* Footer */
.footer {
  margin-top: auto;
  background: var(--subtle);
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 20px max(24px, calc((100% - var(--page)) / 2));
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  font-size: 13px;
}

/* Cookie — Golden-aligned, same structure as site notice */
.cookie#cookie {
  position: fixed; left: 24px; right: auto; bottom: 24px; z-index: 30;
  width: min(656px, calc(100% - 48px));
  margin: 0; padding: 18px 20px 16px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  box-shadow: 0 4px 18px #17212f0a;
  color: var(--muted); font-size: 15px; line-height: 1.65;
  max-height: calc(100dvh - 48px); overflow: auto;
}
.cookie#cookie .cookie-copy { padding: 0 34px 0 0; margin: 0 0 16px; }
.cookie#cookie a { color: var(--ink); text-underline-offset: 3px; }
.cookie#cookie button {
  min-height: 38px; margin: 0; padding: 6px 16px;
  border-radius: 999px; border: 1px solid #d4d4d4;
  background: #fff; color: var(--ink); font-weight: 600;
}
.cookie#cookie .cookie-close {
  position: absolute; top: 8px; right: 8px;
  width: 40px; height: 40px; padding: 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); font-size: 22px; font-weight: 400;
}
.cookie#cookie .cookie-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.cookie#cookie .cookie-accept { background: var(--action); border-color: var(--action); color: #fff; }
.cookie#cookie .cookie-preferences { border-top: 1px solid var(--line); margin: 0 0 16px; padding-top: 16px; }
.cookie#cookie .cookie-preferences[hidden] { display: none; }
.cookie#cookie .cookie-preferences h2 { font-size: 17px; margin: 0 0 10px; color: var(--ink); letter-spacing: 0; text-transform: none; }
.cookie#cookie .cookie-preferences label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
.cookie#cookie .cookie-preferences input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); }
.cookie#cookie .cookie-preferences p { font-size: 14px; margin: 8px 0 0; }

@media (max-width: 900px) {
  .domain-grid, .topic-grid, .feature-grid, .workflow-grid, .trust-grid, .tool-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .privacy-layout { grid-template-columns: 1fr; gap: 20px; }
  .privacy-toc { position: static; }
}
@media (max-width: 720px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a, .lang-switch { min-height: 44px; }
  .lang-switch { margin: 8px 0 0; width: 100%; }
  .home-search, .hub-controls { grid-template-columns: 1fr; display: grid; }
  .home-search { max-width: none; }
  .domain-grid, .topic-grid, .feature-grid, .workflow-grid, .trust-grid, .tool-cards {
    grid-template-columns: 1fr;
  }
  .home-hero h1 { max-width: none; }
  .privacy-doc { padding: 24px 20px 32px; }
  .cookie#cookie { left: 12px; bottom: 12px; width: calc(100% - 24px); }
  .cookie#cookie .cookie-actions { flex-direction: column; }
  .cookie#cookie .cookie-actions button { width: 100%; min-height: 42px; }
}

/* Official hub footer: compact, matches accepted tool chrome. */
body.hub-page .footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
  padding: 20px max(24px, calc((100% - var(--page)) / 2));
  font-size: 13px;
  background: var(--subtle);
  border-top: 1px solid var(--line);
  color: var(--muted);
}
body.hub-page .footer a { display: inline; margin: 0; color: inherit; }
body.hub-page { display: flex; flex-direction: column; min-height: 100vh; }
body.hub-page main { flex: 1 0 auto; }
