:root {
  color-scheme: dark;
  --bg: #09090b;
  --panel: #151518;
  --surface: #1c1c21;
  --ink: #fafafa;
  --muted: #aaaab2;
  --line: #2d2d34;
  --accent: #fbbf24;
  --accent-text: #fcd56e;
  --header: #09090bf5;
  --hero: radial-gradient(ellipse at 48% 0%, #33240e 0%, #141116 44%, #09090b 82%);
  font: 15px/1.55 Inter, Arial, sans-serif;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fafafa;
  --panel: #fff;
  --surface: #f2f2f4;
  --ink: #19191c;
  --muted: #595960;
  --line: #dddde2;
  --accent-text: #785300;
  --header: #fafafaf5;
  --hero: radial-gradient(ellipse at 48% 0%, #ffedc1 0%, #fff9ee 44%, #fafafa 82%);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, select, input { font: inherit; }
button, summary, select { cursor: pointer; }
button:disabled { cursor: default; opacity: .58; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.wrap { width: min(calc(100% - 48px), 1232px); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 2; background: var(--header); border-bottom: 1px solid var(--line); }
.header-inner, .header-actions, .brand, .site-header nav, .footer-inner { display: flex; align-items: center; }
.header-inner { min-height: 64px; gap: 26px; }
.brand { gap: 9px; font-weight: 750; white-space: nowrap; }
.brand img { border-radius: 8px; }
.site-header nav { gap: 2px; font-size: 14px; }
.site-header nav a, .menu a { padding: 7px 10px; border-radius: 8px; color: var(--muted); }
.site-header nav :is([aria-current], .sponsor), .site-header a:hover { color: var(--accent-text); }
.site-header nav [aria-current] { background: color-mix(in srgb, var(--accent) 13%, transparent); }
.header-actions { gap: 12px; margin-left: auto; }
.platforms { position: relative; }
.platforms summary { list-style: none; white-space: nowrap; font-size: 13px; padding: 5px 12px; color: var(--accent-text); background: color-mix(in srgb, var(--accent) 9%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: 100px; }
.platforms summary::-webkit-details-marker { display: none; }
.menu { position: absolute; z-index: 1; top: calc(100% + 8px); right: 0; display: grid; width: 230px; background: var(--panel); padding: 8px; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 36px #0004; }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-size: 19px; }
.icon-button:hover { background: var(--surface); }
.nav-toggle { display: none; }
.hero { text-align: center; padding: 62px 0 44px; background: var(--hero); border-bottom: 1px solid var(--line); }
.hero h1 { margin: 0; font-size: clamp(42px, 6vw, 76px); line-height: 1.05; letter-spacing: -.055em; }
.hero h1 span { color: var(--accent-text); }
:root[data-theme="dark"] .hero h1 span { background: linear-gradient(115deg, #fde68a, #f59e0b); background-clip: text; color: transparent; }
.hero p { margin: 16px 0 27px; color: var(--muted); font-size: 17px; }
.search-box { margin: 0 auto; max-width: 680px; display: flex; gap: 5px; align-items: center; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.search-box input { min-width: 0; flex: 1; border: 0; border-radius: 7px; background: transparent; color: var(--ink); padding: 11px 13px; }
.search-box input::placeholder { color: var(--muted); }
.primary { border: 1px solid var(--accent); border-radius: 8px; background: var(--accent); color: #201605; font-weight: 700; padding: 10px 17px; }
.primary:hover { background: #fcd34d; }
.quick-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 15px; }
.quick-filters button, .secondary, select { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); padding: 7px 11px; }
.quick-filters button { font-size: 13px; color: var(--muted); }
.quick-filters button[aria-pressed="true"], .secondary:not(:disabled):hover, .quick-filters button:hover { color: var(--accent-text); border-color: var(--accent-text); }
.directory { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 25px; align-items: start; padding-block: 32px 65px; }
.filters { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--panel); }
.filter-title, .results-header, .results-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.filters h2, .results h2, .dialog-title h2 { margin: 0; font-size: 23px; letter-spacing: -.02em; }
.filter-title h2 { font-size: 17px; }
.filter-title button { color: var(--accent-text); background: transparent; border: 0; padding: 0; font-size: 12px; }
.filters label { display: block; margin: 16px 0 6px; font-weight: 650; font-size: 13px; }
.filters select { width: 100%; }
.field-note, #results-status { color: var(--muted); font-size: 13px; }
.field-note { margin-bottom: 0; }
.results-header { margin-bottom: 15px; }
#results-status { margin: 2px 0 0; }
.grid, .compare-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.tool { display: flex; flex-direction: column; min-width: 0; min-height: 215px; gap: 10px; border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: linear-gradient(140deg,var(--panel),var(--bg)); }
.tool-browse { position: relative; isolation: isolate; }
.tool:hover { border-color: color-mix(in srgb,var(--accent-text) 55%,var(--line)); }
.tool-top { display: flex; gap: 10px; align-items: center; }
.tool-icon { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 9px; background: var(--surface); color: var(--accent-text); font-size: 15px; font-weight: 750; }
.tool-icon:has(img) { background: #fafafa; }
.tool-icon img { width: 24px; height: 24px; object-fit: contain; }
.tool h3 { margin: 0; overflow-wrap: anywhere; line-height: 1.25; font-size: 16px; }
.tool-category, .tool-description { color: var(--muted); margin: 0; font-size: 13px; }
.tool-description { line-height: 1.5; }
.price { align-self: flex-start; padding: 2px 7px; border-radius: 6px; background: var(--surface); color: var(--muted); font-size: 11px; }
.price.free { color: var(--accent-text); }
.tool-links { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 8px; margin-top: auto; font-size: 12px; }
.tool-links a:not(.primary, .tool-visit-link), .footer-inner a:hover { color: var(--accent-text); }
.tool-links a:not(.primary, .tool-visit-link):hover { text-decoration: underline; }
.tool-card-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tool-guide-link, .tool-visit-link { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 7px 8px; font-size: 13px; font-weight: 700; text-align: center; }
.tool-guide-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 14px; }
.tool-card-links :is(.tool-visit-link, .compare-check) { position: relative; z-index: 2; }
.tool-card-links .compare-check { grid-column: 1 / -1; justify-self: start; }
.compare-check { display: flex; align-items: center; gap: 4px; color: var(--muted); cursor: pointer; }
.compare-check input { accent-color: var(--accent); }
.next-page { display: block; margin: 23px auto 0; }
.empty { grid-column: 1/-1; padding: 27px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); }
.directory-index, .directory-summary { padding-block: 36px; border-top: 1px solid var(--line); }
.directory-index-header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.directory-index-header h2, .directory-summary h2 { margin: 0; font-size: 23px; letter-spacing: -.02em; }
.directory-index-header p, .directory-summary p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.category-directory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.category-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--panel); }
.category-card h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; font-size: 15px; }
.category-card h3 span { color: var(--muted); font-size: 12px; font-weight: 500; }
.category-tool-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.category-tool-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.category-tool-list a { color: var(--ink); font-weight: 550; }
.category-tool-list a:hover { color: var(--accent-text); text-decoration: underline; }
.category-tool-list small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.summary-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--panel); }
.summary-card h3 { margin: 0 0 6px; font-size: 15px; color: var(--accent-text); }
.summary-card p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 85px; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: 13px; }
.footer-inner .brand { color: var(--ink); margin-right: auto; }
dialog { width: min(880px, calc(100% - 24px)); padding: 20px; max-height: 90vh; overflow: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
dialog::backdrop { background: #000b; }
.dialog-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
@media (max-width: 1070px) {
  .site-header nav { display: none; }
  .site-header nav.open { display: flex; flex-wrap: wrap; position: absolute; top: 100%; left: 0; right: 0; padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--header); }
  .nav-toggle { display: grid; }
  .grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .category-directory-grid, .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .wrap { width: calc(100% - 30px); }
  .header-inner { gap: 8px; }
  .header-actions { gap: 3px; }
  .platforms { display: none; }
  .hero { padding-block: 41px 28px; }
  .hero p { font-size: 15px; }
  .quick-filters button { font-size: 12px; }
  .directory { grid-template-columns: minmax(0,1fr); gap: 19px; padding-block: 18px 40px; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; }
  .filter-title, .field-note { grid-column: 1/-1; }
  .filters label[for="pricing"] { grid-column: 2; grid-row: 2; }
  .filters #category, .filters #pricing { grid-row: 3; }
  .results-controls { flex-wrap: wrap; justify-content: flex-end; font-size: 12px; gap: 6px; }
  .results h2 { font-size: 19px; }
  .grid, .compare-grid, .category-directory-grid, .summary-grid { grid-template-columns: minmax(0,1fr); }
  .tool { min-height: 185px; }
  .footer-inner { padding-block: 16px; }
}
