/* Shared site styles. Tool-only styles live beside their tool. */
:root {
  --ink: #20231f;
  --muted: #646a60;
  --border: #e0e4dc;
  --paper: #fff;
  --canvas: #fff;
  --sage: #dce7d5;
  --sage-dark: #35462e;
  --radius: 12px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}
main { flex: 1; }
a { color: inherit; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
input, textarea { min-width: 0; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #526747; outline-offset: 4px; }
button:disabled { cursor: not-allowed; opacity: .55; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.025em; }
h1 { font-size: 2rem; font-weight: 600; }
h2 { font-size: 1.25rem; font-weight: 600; }
h3 { font-size: 1.1rem; font-weight: 600; }
.container { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--border); background: var(--paper); }
.header-inner { display: flex; justify-content: space-between; align-items: center; min-height: 76px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 600; letter-spacing: -.035em; text-decoration: none; white-space: nowrap; }
.brand img { display: block; width: 200px; height: auto; }
.site-header nav { display: flex; gap: 24px; }
.site-header nav a { text-decoration: none; font-size: .85rem; padding: 12px 0; }
.site-header nav [aria-current] { font-weight: 600; }
.site-header nav a:hover, .site-footer a:hover { text-decoration: underline; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid transparent; background: var(--sage); color: var(--sage-dark); padding: 12px 20px; min-height: 44px; text-decoration: none; font-weight: 600; font-size: .85rem; border-radius: 8px; line-height: 1.4; }
.button:hover { background: #cfddc5; }
.button-secondary { background: var(--paper); border-color: var(--border); color: var(--ink); }
.button-secondary:hover { background: #f0f3ed; }
.muted { color: var(--muted); }
.catalog { padding-block: 44px 64px; }
.catalog h1 { margin-bottom: 24px; }
.catalog-controls { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.search-box { flex: 1; max-width: 410px; }
.search-box input { width: 100%; border: 1px solid var(--border); background: var(--paper); padding: 11px 14px; border-radius: 8px; color: var(--ink); }
.catalog-count { font-size: .75rem; margin: 18px 0 14px; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tool-card { display: block; background: var(--paper); border: 1px solid var(--border); border-radius: 10px; padding: 22px; text-decoration: none; }
.tool-card:hover { border-color: #91a286; }
.tool-card h2 { font-size: 1.05rem; margin-bottom: 8px; }
.tool-card p { font-size: .85rem; color: var(--muted); margin: 0; }
.empty-state { padding: 24px 0; }
.site-footer { border-top: 1px solid var(--border); background: var(--paper); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 64px; font-size: .75rem; color: var(--muted); }
.footer-inner nav { display: flex; gap: 20px; }
.footer-inner nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.skip-link { position: absolute; left: 16px; top: -90px; padding: 12px; background: white; z-index: 10; }
.skip-link:focus { top: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.prose { max-width: 740px; padding-block: 44px 64px; }
.prose h2 { margin-top: 28px; }
.prose p { color: var(--muted); }
.prose a { color: var(--sage-dark); }
.breadcrumb { font-size: .8rem; color: var(--muted); display: flex; gap: 10px; margin-bottom: 24px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .container { width: calc(100% - 32px); }
  .header-inner { min-height: 68px; }
  .brand { font-size: 1.1rem; gap: 8px; }
  .brand img { width: 172px; height: auto; }
  .site-header nav { gap: 16px; }
  .site-header nav a { font-size: .8rem; }
  .catalog { padding-block: 32px 48px; }
  .catalog-controls { align-items: stretch; flex-direction: column; }
  .search-box { max-width: none; }
  .tool-grid { grid-template-columns: 1fr; }
  .footer-inner { font-size: .7rem; }
  .footer-inner nav { gap: 16px; }
  .prose { padding-top: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
