:root {
  color-scheme: light;
  --hd-canvas: #f4f7fa;
  --hd-surface: #ffffff;
  --hd-surface-muted: #eaf0f5;
  --hd-ink: #102033;
  --hd-muted: #617083;
  --hd-line: #d7e1ea;
  --hd-brand: #0b6e5a;
  --hd-brand-dark: #075346;
  --hd-blue: #215fc6;
  --hd-soft-brand: #e1f1ec;
  --hd-focus: #1b73d1;
  --hd-shadow: 0 18px 44px rgba(16, 32, 51, .10);
  --hd-radius-lg: 24px;
  --hd-radius-md: 16px;
  --hd-radius-sm: 10px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --hd-canvas: #0d141c;
  --hd-surface: #15202b;
  --hd-surface-muted: #1b2a37;
  --hd-ink: #edf5fa;
  --hd-muted: #aab9c6;
  --hd-line: #2c3b49;
  --hd-brand: #41ae91;
  --hd-brand-dark: #55c6a7;
  --hd-blue: #79a8ff;
  --hd-soft-brand: #173a35;
  --hd-focus: #8ab7ff;
  --hd-shadow: 0 20px 48px rgba(0, 0, 0, .27);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.hd-site { margin: 0; background: var(--hd-canvas); color: var(--hd-ink); font-family: ui-rounded, "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif; line-height: 1.5; }
body.hd-site a { color: inherit; }
body.hd-site button, body.hd-site input { font: inherit; }
body.hd-site :focus-visible { outline: 3px solid var(--hd-focus); outline-offset: 3px; }
.hd-skip-link { position: fixed; z-index: 100; left: 16px; top: -64px; padding: 10px 14px; border-radius: var(--hd-radius-sm); background: var(--hd-ink); color: var(--hd-surface); font-weight: 750; text-decoration: none; transition: top .18s ease; }
.hd-skip-link:focus { top: 16px; }
.hd-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.hd-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid color-mix(in srgb, var(--hd-line) 82%, transparent); background: color-mix(in srgb, var(--hd-canvas) 88%, transparent); backdrop-filter: blur(16px); }
.hd-header__inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.hd-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--hd-ink); font-weight: 800; letter-spacing: -.035em; text-decoration: none; }
.hd-brand img { width: 37px; height: 37px; object-fit: contain; }
.hd-nav { display: flex; align-items: center; gap: 4px; }
.hd-nav a { padding: 8px 11px; color: var(--hd-muted); border-radius: 8px; font-size: .93rem; font-weight: 700; text-decoration: none; }
.hd-nav a:hover, .hd-nav a[aria-current="page"] { color: var(--hd-ink); background: var(--hd-surface-muted); }
.hd-theme { display: inline-grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border: 1px solid var(--hd-line); border-radius: 50%; background: var(--hd-surface); color: var(--hd-ink); cursor: pointer; }

.hd-page-main { overflow: hidden; }
.hd-hero { padding: clamp(48px, 8vw, 92px) 0 clamp(56px, 8vw, 104px); }
.hd-hero__grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(420px, 1.15fr); align-items: center; gap: clamp(30px, 6vw, 78px); }
.hd-kicker { margin: 0 0 16px; color: var(--hd-brand); font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.hd-hero h1, .hd-section-heading { margin: 0; color: var(--hd-ink); font-weight: 820; letter-spacing: -.06em; text-wrap: balance; }
.hd-hero h1 { max-width: 650px; font-size: clamp(3.1rem, 6.7vw, 5.8rem); line-height: .93; }
.hd-hero__lede { max-width: 38rem; margin: 24px 0 0; color: var(--hd-muted); font-size: clamp(1.02rem, 1.8vw, 1.18rem); }
.hd-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hd-button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 0 18px; border: 1px solid transparent; border-radius: 10px; font-weight: 800; text-decoration: none; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.hd-button:hover { transform: translateY(-2px); }
.hd-button:active { transform: translateY(0); }
.hd-button--primary { background: var(--hd-brand); color: #fff; }
.hd-button--primary:hover { background: var(--hd-brand-dark); }
.hd-button--secondary { border-color: var(--hd-line); background: var(--hd-surface); color: var(--hd-ink); }
.hd-button--secondary:hover { background: var(--hd-surface-muted); }
.hd-hero__visual { position: relative; min-height: 390px; }
.hd-hero__photo { width: 100%; height: min(40vw, 540px); min-height: 390px; display: block; object-fit: cover; object-position: 64% center; border: 1px solid var(--hd-line); border-radius: 30px; box-shadow: var(--hd-shadow); }
.hd-hero__caption { position: absolute; right: 20px; bottom: 20px; max-width: 230px; padding: 13px 15px; border: 1px solid color-mix(in srgb, #fff 36%, transparent); border-radius: 12px; background: rgba(12, 25, 38, .82); color: #f8fbff; font-size: .88rem; font-weight: 650; backdrop-filter: blur(10px); }

.hd-section { padding: clamp(54px, 8vw, 100px) 0; }
.hd-section--surface { background: var(--hd-surface); }
.hd-section--soft { background: var(--hd-surface-muted); }
.hd-section-heading { max-width: 760px; font-size: clamp(2rem, 4.2vw, 3.75rem); line-height: .98; }
.hd-section-copy { max-width: 600px; margin: 16px 0 0; color: var(--hd-muted); font-size: 1.03rem; }
.hd-tool-feature-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 16px; margin-top: 36px; }
.hd-feature-link { min-height: 244px; display: flex; flex-direction: column; justify-content: space-between; padding: 24px; border: 1px solid var(--hd-line); border-radius: var(--hd-radius-lg); background: var(--hd-surface); color: var(--hd-ink); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.hd-feature-link:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--hd-brand) 46%, var(--hd-line)); box-shadow: var(--hd-shadow); }
.hd-feature-link--lead { background: var(--hd-brand); border-color: var(--hd-brand); color: #fff; }
.hd-feature-link--blue { background: #e8effb; color: #153d82; }
:root[data-theme="dark"] .hd-feature-link--blue { background: #172a4d; color: #dfeaff; }
.hd-feature-link__kind { margin: 0; font-size: .78rem; font-weight: 800; letter-spacing: .07em; opacity: .76; text-transform: uppercase; }
.hd-feature-link h3 { max-width: 14ch; margin: 0; font-size: clamp(1.35rem, 2.4vw, 2rem); letter-spacing: -.04em; line-height: 1; }
.hd-feature-link__arrow { font-size: 1.3rem; font-weight: 800; }
.hd-principles { display: grid; grid-template-columns: .78fr 1.22fr; gap: 48px; align-items: start; }
.hd-principle-list { display: grid; gap: 0; border-top: 1px solid var(--hd-line); }
.hd-principle { display: grid; grid-template-columns: 42px 1fr; gap: 12px; padding: 20px 0; border-bottom: 1px solid var(--hd-line); }
.hd-principle__number { color: var(--hd-brand); font-size: .82rem; font-weight: 850; }
.hd-principle h3 { margin: 0; font-size: 1.08rem; letter-spacing: -.02em; }
.hd-principle p { margin: 5px 0 0; color: var(--hd-muted); }

.hd-directory-hero { padding: clamp(46px, 7vw, 82px) 0 32px; }
.hd-directory-hero h1 { max-width: 760px; margin: 0; font-size: clamp(2.8rem, 6vw, 5rem); letter-spacing: -.06em; line-height: .94; text-wrap: balance; }
.hd-directory-hero p { max-width: 590px; margin: 18px 0 0; color: var(--hd-muted); font-size: 1.08rem; }
.hd-tool-finder { margin: 18px 0 0; padding: 20px; border: 1px solid var(--hd-line); border-radius: var(--hd-radius-lg); background: var(--hd-surface); box-shadow: 0 10px 28px rgba(16, 32, 51, .06); }
.hd-search { display: flex; align-items: center; gap: 12px; padding: 0 14px; border: 1px solid var(--hd-line); border-radius: 12px; background: var(--hd-canvas); }
.hd-search svg { width: 20px; height: 20px; fill: none; stroke: var(--hd-muted); stroke-width: 2; }
.hd-search input { width: 100%; min-height: 51px; border: 0; outline: 0; background: transparent; color: var(--hd-ink); }
.hd-search input::placeholder { color: var(--hd-muted); opacity: .8; }
.hd-filter-row { display: flex; align-items: center; gap: 9px; margin-top: 16px; }
.hd-filter-label { flex: 0 0 auto; color: var(--hd-muted); font-size: .84rem; font-weight: 750; }
.hd-filter-scroller { display: flex; gap: 8px; min-width: 0; overflow-x: auto; padding: 2px 1px 8px; scrollbar-width: thin; }
.hd-filter-chip { flex: 0 0 auto; min-height: 36px; padding: 0 12px; border: 1px solid var(--hd-line); border-radius: 9px; background: var(--hd-surface); color: var(--hd-muted); cursor: pointer; font-size: .84rem; font-weight: 750; transition: background .16s ease, color .16s ease, border-color .16s ease; }
.hd-filter-chip:hover { color: var(--hd-ink); border-color: var(--hd-brand); }
.hd-filter-chip[aria-pressed="true"] { border-color: var(--hd-brand); background: var(--hd-soft-brand); color: var(--hd-brand-dark); }
.hd-filter-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 6px; color: var(--hd-muted); font-size: .9rem; }
.hd-clear { padding: 5px 0; border: 0; background: transparent; color: var(--hd-brand-dark); cursor: pointer; font-size: .9rem; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.hd-clear[hidden] { display: none; }
.hd-tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 34px 0 clamp(54px, 8vw, 90px); }
.hd-tool-card { min-height: 260px; display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--hd-line); border-radius: var(--hd-radius-md); background: var(--hd-surface); color: var(--hd-ink); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.hd-tool-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--hd-brand) 52%, var(--hd-line)); box-shadow: 0 13px 28px rgba(16, 32, 51, .09); }
.hd-tool-card[hidden] { display: none; }
.hd-tool-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; background: var(--hd-soft-brand); color: var(--hd-brand-dark); font-size: .78rem; font-weight: 850; letter-spacing: -.02em; }
.hd-tool-icon--blue { background: #e8effb; color: #1a55ad; }
.hd-tool-icon--orange { background: #fff0dd; color: #a34f00; }
:root[data-theme="dark"] .hd-tool-icon--blue { background: #1d3156; color: #b8d1ff; }
:root[data-theme="dark"] .hd-tool-icon--orange { background: #432d17; color: #ffc889; }
.hd-tool-card h2 { margin: 22px 0 0; font-size: 1.27rem; letter-spacing: -.035em; line-height: 1.08; }
.hd-tool-card p { margin: 10px 0 0; color: var(--hd-muted); font-size: .94rem; }
.hd-tool-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 22px; }
.hd-tool-tag { padding: 4px 8px; border-radius: 6px; background: var(--hd-surface-muted); color: var(--hd-muted); font-size: .75rem; font-weight: 750; }
.hd-empty { margin: 24px 0 64px; padding: 42px 20px; border: 1px dashed var(--hd-line); border-radius: var(--hd-radius-lg); text-align: center; color: var(--hd-muted); }
.hd-empty h2 { margin: 0; color: var(--hd-ink); font-size: 1.35rem; }
.hd-empty p { margin: 8px 0 0; }

.hd-footer { border-top: 1px solid var(--hd-line); background: var(--hd-surface); }
.hd-footer__inner { display: grid; grid-template-columns: 1.2fr repeat(2, .7fr); gap: 34px; padding: 48px 0 28px; }
.hd-footer__intro { max-width: 360px; color: var(--hd-muted); }
.hd-footer__intro .hd-brand { margin-bottom: 13px; }
.hd-footer h2 { margin: 0 0 12px; color: var(--hd-muted); font-size: .77rem; letter-spacing: .07em; text-transform: uppercase; }
.hd-footer nav { display: grid; gap: 9px; }
.hd-footer nav a { color: var(--hd-muted); font-size: .93rem; text-decoration: none; }
.hd-footer nav a:hover { color: var(--hd-brand-dark); }
.hd-footer__bottom { display: flex; justify-content: space-between; gap: 18px; padding: 18px 0 26px; border-top: 1px solid var(--hd-line); color: var(--hd-muted); font-size: .88rem; }

@media (max-width: 900px) {
  .hd-hero__grid { grid-template-columns: 1fr; }
  .hd-hero__visual { order: -1; min-height: auto; }
  .hd-hero__photo { height: clamp(270px, 60vw, 440px); min-height: 0; }
  .hd-tool-feature-grid { grid-template-columns: 1fr 1fr; }
  .hd-feature-link--lead { grid-column: 1 / -1; min-height: 220px; }
  .hd-principles { grid-template-columns: 1fr; gap: 30px; }
  .hd-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .hd-shell { width: min(100% - 28px, 1180px); }
  .hd-header__inner { min-height: 64px; gap: 10px; }
  .hd-nav { display: none; }
  .hd-hero { padding-top: 30px; }
  .hd-hero h1 { font-size: clamp(2.7rem, 13vw, 4rem); }
  .hd-hero__caption { right: 12px; bottom: 12px; max-width: 205px; }
  .hd-tool-feature-grid, .hd-tool-grid { grid-template-columns: 1fr; }
  .hd-feature-link--lead { grid-column: auto; }
  .hd-filter-row { align-items: flex-start; flex-direction: column; }
  .hd-filter-scroller { width: 100%; }
  .hd-tool-finder { padding: 14px; }
  .hd-footer__inner { grid-template-columns: 1fr 1fr; gap: 28px 18px; }
  .hd-footer__intro { grid-column: 1 / -1; }
  .hd-footer__bottom { display: grid; }
}

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