:root {
  color-scheme: light;
  --paper: #f6f5ef;
  --white: #fffefa;
  --ink: #14251e;
  --muted: #4b5c53;
  --line: #d7ded5;
  --lime: #dafa7d;
  --green: #245c3f;
  font: 16px/1.55 system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #2d754e; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  z-index: 1;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  background: var(--lime);
  transform: translateY(calc(-100% - 16px));
}
.skip-link:focus { transform: none; }

.shell { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.site-header, .site-footer, .brand, nav { display: flex; align-items: center; }
.site-header, .site-footer { justify-content: space-between; gap: 20px; }
.site-header { min-height: 78px; border-bottom: 1px solid var(--line); }
.brand { gap: 10px; font-size: 1.14rem; font-weight: 780; letter-spacing: -.035em; text-decoration: none; }
nav { gap: clamp(18px, 3vw, 36px); }
nav a, .site-footer > a:last-child { padding-block: 10px; font-size: .9rem; font-weight: 650; text-decoration: none; }
nav a:hover, .site-footer > a:last-child:hover { text-decoration: underline; text-underline-offset: .3em; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
  align-items: center;
  gap: clamp(32px, 6vw, 84px);
  padding-block: clamp(48px, 8vw, 102px);
}
.eyebrow {
  color: var(--green);
  font: 720 .72rem/1.3 ui-monospace, Consolas, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.indicator {
  display: inline-block;
  vertical-align: .1em;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-radius: 50%;
  background: currentColor;
}
h1 {
  margin-block: 16px 21px;
  font-size: clamp(2.85rem, 7.5vw, 5.85rem);
  line-height: .96;
  font-weight: 800;
  letter-spacing: -.08em;
}
h1 span { color: #387753; }
.intro { max-width: 39ch; color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.2rem); }
.primary {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  margin-top: 26px;
  padding: 11px 16px;
  min-height: 46px;
  background: var(--ink);
  color: var(--lime);
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}
.primary:hover { background: var(--green); color: var(--white); }
.hero-art { display: block; width: 100%; height: auto; }

.catalog { border-top: 1px solid var(--line); padding-block: 46px 62px; }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px 32px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
h2 { margin-top: 8px; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.04; letter-spacing: -.055em; }
.section-heading > p { max-width: 32ch; color: var(--muted); }
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding-inline: 16px;
  border: 1px solid #aebdb2;
  border-radius: 9px;
  background: var(--white);
  cursor: text;
}
.search-box:focus-within { outline: 2px solid #2d754e; outline-offset: 2px; }
.search-box svg { flex: 0 0 21px; height: 21px; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; }
.search-box input { flex: 1; min-width: 0; min-height: 48px; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-box input::placeholder { color: var(--muted); }
.filter-row { display: flex; align-items: center; gap: 10px 20px; flex-wrap: wrap; justify-content: space-between; margin-block: 13px 22px; }
.filters { display: flex; gap: 7px; flex-wrap: wrap; }
.filters button, .empty button {
  min-height: 40px;
  padding: 6px 13px;
  border: 1px solid #b6c4b8;
  border-radius: 7px;
  color: var(--ink);
  background: transparent;
  font-size: .86rem;
  font-weight: 660;
}
.filters button:hover, .empty button:hover { background: #e7eee2; }
.filters button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--lime); }
.tool-count { color: var(--muted); font: 650 .77rem/1.2 ui-monospace, Consolas, monospace; }

.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 0; margin: 0; list-style: none; }
.tool {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(17px, 2.4vw, 25px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}
.tool:focus-within, .tool:hover { border-color: #9baa9e; }
.category {
  margin-bottom: 13px;
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--green);
  background: #e8efe2;
  font: 700 .68rem/1.25 ui-monospace, Consolas, monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.tool h3, .empty h3 { font-size: 1.2rem; line-height: 1.22; letter-spacing: -.028em; }
.tool > p:not(.category) { margin-block: 8px 12px; color: var(--muted); font-size: .94rem; }
.tool a { display: inline-flex; gap: 10px; align-items: center; min-height: 44px; margin-top: auto; color: var(--green); font-size: .91rem; font-weight: 750; text-decoration: none; }
.tool a:hover { text-decoration: underline; text-underline-offset: .22em; }
.empty { padding: 32px 18px; border: 1px dashed #aebdb2; border-radius: 12px; text-align: center; }
.empty p { margin-block: 7px 14px; color: var(--muted); }

.about {
  display: grid;
  grid-template-columns: 1fr .85fr;
  align-items: center;
  gap: 16px 40px;
  padding: clamp(24px, 6vw, 58px);
  border-radius: 17px;
  background: var(--ink);
  color: var(--white);
}
.about .eyebrow { color: var(--lime); }
.about > p { max-width: 45ch; color: #dce8df; }
.site-footer { min-height: 109px; flex-wrap: wrap; font-size: .88rem; }
.site-footer > span { color: var(--muted); }

@media (max-width: 850px) {
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
  .shell { width: calc(100% - 36px); }
  .site-header { min-height: 66px; }
  .hero, .about { grid-template-columns: 1fr; }
  .hero { padding-block: 42px; }
  .hero-art { max-width: 460px; }
  .catalog { padding-block: 36px 46px; }
  .site-footer { padding-block: 22px; gap: 8px 16px; }
  .site-footer > span { width: 100%; order: 1; }
}

@media (max-width: 480px) {
  .tool-grid { grid-template-columns: 1fr; }
}
