:root {
  color-scheme: light;
  --page: #f5f8fa;
  --surface: #ffffff;
  --surface-soft: #edf3f5;
  --ink: #10232b;
  --muted: #60727a;
  --line: #dce5e8;
  --accent: #126d78;
  --accent-strong: #0b5863;
  --accent-soft: #e1f3f2;
  --blue: #2876a5;
  --warning: #9a4b20;
  --shadow: 0 16px 40px rgb(31 67 78 / 7%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--page);
  color: var(--ink);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #10191e;
  --surface: #19252b;
  --surface-soft: #202f35;
  --ink: #ecf4f5;
  --muted: #a1b3b8;
  --line: #32454c;
  --accent: #72c8ca;
  --accent-strong: #91dbdc;
  --accent-soft: #1c383c;
  --blue: #85c8ee;
  --warning: #ffb58c;
  --shadow: 0 18px 50px rgb(0 0 0 / 22%);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--page); color: var(--ink); }
a { color: var(--accent-strong); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select { font: inherit; }
button, select, input { color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.site-header { width: min(1180px, calc(100% - 48px)); min-height: 76px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: .96rem; font-weight: 750; letter-spacing: -.025em; }
.wordmark-mark { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: var(--accent); color: #fff; font-size: .84rem; font-weight: 800; }
.header-note { color: var(--muted); font-size: .82rem; }
.header-links { display: flex; align-items: center; gap: 22px; font-size: .86rem; }
.header-links a { color: var(--muted); font-weight: 650; text-decoration: none; }
.header-links a:hover { color: var(--accent-strong); }

.hub-main { width: min(1060px, calc(100% - 48px)); margin: 0 auto; }
.hub-hero { padding: clamp(70px, 11vw, 128px) 0 78px; max-width: 790px; }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-size: .73rem; font-weight: 780; letter-spacing: .12em; line-height: 1.35; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
.hub-hero h1 { margin: 0; font-size: clamp(2.7rem, 6.5vw, 5.1rem); letter-spacing: -.065em; line-height: 1.02; }
.hub-hero h1 span { color: var(--muted); }
.hero-copy { max-width: 620px; margin: 23px 0 0; color: var(--muted); font-size: clamp(1rem, 1.7vw, 1.15rem); line-height: 1.7; }
.catalog-section { padding-bottom: 68px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-heading h2 { margin-bottom: 0; font-size: 1.55rem; letter-spacing: -.035em; }
.catalog-count { margin: 0 0 4px; color: var(--muted); font-size: .83rem; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 16px; }
.tool-card { display: flex; min-height: 245px; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: var(--shadow); transition: transform .18s ease, border-color .18s ease; }
.tool-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.tool-card-top { display: flex; min-height: 28px; align-items: center; gap: 8px; margin-bottom: 23px; }
.tool-icon { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 1rem; font-weight: 700; }
.tag { padding: 5px 9px; border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: .69rem; font-weight: 700; }
.tool-card h3 { margin: 0 0 10px; font-size: 1.24rem; letter-spacing: -.035em; }
.tool-card h3 a { color: var(--ink); text-decoration: none; }
.tool-card h3 a:hover { color: var(--accent-strong); }
.tool-card p { margin: 0 0 22px; color: var(--muted); font-size: .9rem; line-height: 1.6; }
.tool-card-action { margin-top: auto; color: var(--accent-strong); font-size: .82rem; font-weight: 750; }
.catalog-message { margin: 0; padding: 18px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); }
.catalog-error { color: var(--warning); }
.privacy-note { display: flex; gap: 16px; max-width: 700px; padding: 23px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-soft); }
.privacy-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 11px; background: var(--surface); color: var(--accent); }
.privacy-note h2 { margin: 1px 0 7px; font-size: .95rem; }
.privacy-note p { max-width: 590px; margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.55; }
.site-footer { width: min(1180px, calc(100% - 48px)); min-height: 84px; margin: 55px auto 0; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: .79rem; }
.site-footer a { color: inherit; }

@media (max-width: 600px) {
  .site-header, .site-footer { width: calc(100% - 32px); }
  .header-note { display: none; }
  .hub-main { width: calc(100% - 32px); }
  .hub-hero { padding-top: 72px; padding-bottom: 60px; }
  .section-heading { align-items: center; }
  .privacy-note { padding: 18px; }
  .site-footer { min-height: 72px; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
