:root {
  color-scheme: light;
  --paper: #f7f7f2;
  --surface: #fff;
  --ink: #172d26;
  --muted: #53655d;
  --line: #dce3dc;
  --pine: #103c30;
  --mint: #c9f282;
  --focus: #267a51;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --ease: 180ms ease;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  background: var(--paper);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, ul { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.sprite, .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; top: 12px; left: 12px; z-index: 2; padding: 10px 16px; border-radius: 8px; background: var(--surface); transform: translateY(-150%); }
.skip:focus { transform: none; }
.shell { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }

.header { border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; font-size: 26px; font-weight: 800; line-height: 1; letter-spacing: -.065em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; margin-right: 10px; border-radius: 9px; background: var(--pine); color: var(--mint); }
.brand-mark .icon { width: 19px; height: 19px; }
.brand-dot { color: var(--focus); }
.nav-active, .site-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.nav-active { padding-inline: 14px; background: #eaf1e8; border-radius: 8px; }
.site-link { gap: 6px; color: var(--muted); }
.site-link .icon { width: 16px; height: 16px; }
.site-link:hover { color: var(--focus); }

.hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); align-items: center; margin-top: 30px; padding: 49px 56px 43px; min-height: 375px; overflow: hidden; border-radius: 24px; background: radial-gradient(ellipse at 82% 55%, #24644b 0%, #124334 44%, #10382d 78%); color: #fbfff6; }
.hero-content { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 4.35rem); line-height: 1.13; font-weight: 800; letter-spacing: -.065em; text-wrap: balance; }
.hero h1 span { color: var(--mint); }
.hero p { margin-top: 14px; color: #d4e7db; font-size: 16px; line-height: 1.75; }
.search { display: flex; align-items: center; max-width: 478px; min-height: 54px; margin-top: 23px; padding: 4px 10px 4px 16px; gap: 10px; border: 1px solid #cfdbc9; border-radius: 12px; background: #fffefa; color: var(--ink); box-shadow: 0 6px 18px #0a291e44; }
.search:focus-within { outline: 2px solid var(--mint); outline-offset: 3px; }
.search-icon { color: var(--focus); width: 20px; height: 20px; }
.search input { min-width: 0; flex: 1; min-height: 44px; padding: 0; border: 0; outline: none; background: transparent; color: inherit; }
.search input::-webkit-search-cancel-button { display: none; }
.search input::placeholder { color: var(--muted); }
.search kbd { display: grid; place-items: center; min-width: 24px; height: 25px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); color: var(--muted); font: 13px var(--mono); }
.clear-search { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--ink); }
.clear-search:hover { background: #eaf1e8; }
.clear-search .icon { width: 17px; height: 17px; }
.quick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.quick > span { margin-right: 3px; color: #c3dbcc; font-size: 12px; }
.quick button { padding: 0 10px; min-height: 44px; border: 0; border-radius: 8px; color: #eefbe5; background: transparent; font-size: 12px; }
.quick button:hover { background: #ffffff1d; }
.quick button:focus-visible { outline-color: var(--mint); }

/* Decorative artwork keeps the same proportions as the hero changes width. */
.hero-art { position: relative; align-self: center; justify-self: center; width: min(100%, 490px); aspect-ratio: 1.4; }
.art-plane { position: absolute; inset: -13% -17%; background-image: radial-gradient(#b3dfaa60 1px, transparent 1px); background-size: 16px 16px; mask-image: radial-gradient(ellipse, #000 12%, transparent 69%); }
.art-ring { position: absolute; left: 13%; top: 17%; width: 76%; height: 64%; border: 1px solid #bce7ad44; border-radius: 50%; transform: rotate(-23deg); }
.art-ring-inner { left: 19%; top: 24%; width: 64%; height: 50%; border-style: dashed; }
.art-tile { position: absolute; display: grid; place-items: center; aspect-ratio: 1; border-radius: 22%; box-shadow: 0 14px 27px #05261f6b, inset 0 1px #ffffff8c; }
.art-tile .icon { width: 46%; height: 46%; }
.tile-main { left: 35%; top: 24%; width: 34%; transform: rotate(-11deg); color: #15392b; background: linear-gradient(145deg, #e0ffab, #a7d964); border: 1px solid #e8ffb6; }
.tile-main .icon { width: 54%; height: 54%; stroke-width: 1.4; }
.tile-code { left: 11%; top: 21%; width: 19%; transform: rotate(12deg); color: #cef7aa; background: #265d49; border: 1px solid #86bd905f; }
.tile-file { left: 71%; top: 12%; width: 21%; transform: rotate(14deg); color: #284d3a; background: #e9f3da; border: 1px solid #efffde; }
.tile-photo { left: 17%; top: 69%; width: 18%; transform: rotate(-13deg); color: #204c3b; background: #9fd3be; border: 1px solid #ccf3d3; }
.tile-grid { left: 74%; top: 66%; width: 17%; transform: rotate(13deg); background: #21513f; color: #c7e8b7; border: 1px solid #86bd905f; }
.art-cross, .art-spark { position: absolute; color: #c7ef9c; font: 22px var(--mono); }
.art-cross-top { left: 43%; top: 8%; }
.art-cross-bottom { left: 56%; top: 85%; }
.art-spark-top { left: 94%; top: 45%; }
.art-spark-bottom { left: 4%; top: 57%; }

.directory { margin-top: 44px; padding-bottom: 64px; scroll-margin-top: 20px; }
.directory-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.directory h2 { font-size: 36px; line-height: 1.2; letter-spacing: -.055em; }
.result-count, .group-count { color: var(--muted); font-size: 13px; white-space: nowrap; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.filters button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 6px 15px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface); font-size: 14px; font-weight: 650; transition: background var(--ease), border-color var(--ease); }
.filters .icon { width: 16px; height: 16px; }
.filters button:hover { background: #eaf1e8; }
.filters button[aria-pressed="true"] { background: var(--pine); border-color: var(--pine); color: #fff; }
.filters button[aria-pressed="true"] .icon { color: var(--mint); }
.tool-group { --tile: #e8f2ed; --tile-ink: #236049; margin-top: 28px; }
.tool-group.media { --tile: #e7eefb; --tile-ink: #38548e; }
.tool-group.files { --tile: #f8eed9; --tile-ink: #765019; }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.group-head h3 { display: flex; align-items: center; gap: 9px; font-size: 20px; }
.group-head .icon { width: 19px; height: 19px; color: var(--tile-ink); }
.tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding-left: 0; list-style: none; }
.tool-card { position: relative; display: grid; grid-template-columns: 40px minmax(0,1fr) 16px; grid-template-rows: auto auto; align-content: center; column-gap: 12px; row-gap: 4px; height: 100%; min-height: 112px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); transition: border-color var(--ease), background var(--ease); overflow-wrap: anywhere; }
.tool-card:hover { border-color: #83aa96; background: #fcfefb; }
.card-icon { grid-column: 1; grid-row: 1 / 3; align-self: start; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--tile, #e8f2ed); color: var(--tile-ink, var(--pine)); }
.card-icon .icon { width: 21px; height: 21px; }
.tool-card > .icon { grid-column: 3; grid-row: 1; align-self: center; width: 16px; height: 16px; color: #718278; }
.tool-card:hover > .icon { color: var(--focus); }
.tool-card h4 { grid-column: 2; grid-row: 1; margin: 0; font-size: 15px; line-height: 1.5; font-weight: 650; }
.tool-card p { grid-column: 2 / 4; grid-row: 2; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.brand-mark img { width: 100%; height: 100%; display: block; }
@media(max-width:600px) { .tool-card { grid-template-columns: minmax(0,1fr) 16px; padding: 14px; gap: 5px; } .card-icon { grid-row: 1; margin-bottom: 5px; } .tool-card > .icon { grid-column: 2; grid-row: 1; } .tool-card h4 { grid-column: 1 / 3; grid-row: 2; } .tool-card p { grid-column: 1 / 3; grid-row: 3; } }
.empty-state { display: grid; justify-items: center; gap: 8px; margin-top: 26px; padding: 35px 16px; text-align: center; border: 1px dashed var(--line); border-radius: 14px; }
.empty-state p { color: var(--muted); }
.empty-state button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 8px; color: white; background: var(--pine); }
.empty-state button .icon { width: 18px; height: 18px; }
.footer { border-top: 1px solid var(--line); }
.footer .brand { font-size: 20px; }
.footer .brand-mark { width: 28px; height: 28px; }
.footer .brand-mark .icon { width: 15px; height: 15px; }

@media (max-width: 950px) {
  .hero { padding-inline: 36px; }
  .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .shell { width: calc(100% - 32px); }
  .hero { margin-top: 18px; grid-template-columns: minmax(0, 1fr); padding: 26px 23px 20px; min-height: auto; }
  .hero-art { width: min(100%, 286px); margin-top: 6px; }
  .directory { margin-top: 31px; }
  .directory h2 { font-size: 29px; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 400px) {
  .header-inner { min-height: 60px; }
  .header .brand { font-size: 21px; }
  .header .brand-mark { width: 28px; height: 28px; margin-right: 6px; }
  .nav-active { padding-inline: 8px; }
  .hero h1 { font-size: clamp(1.85rem, 9vw, 2.3rem); }
  .search { padding-left: 9px; gap: 6px; }
  .search input { font-size: 14px; }
  .filters { gap: 6px; }
  .filters button { padding-inline: 9px; }
}
@media (pointer: coarse) { .search kbd { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
