:root {
  --bg: #f7f7f2;
  --paper: #fffefa;
  --ink: #151512;
  --muted: #65655d;
  --line: #d8d7cb;
  --line-strong: #b7b5a5;
  --green: #0f6b4f;
  --green-dark: #0a4434;
  --blue: #164f8f;
  --orange: #c85f1f;
  --yellow: #f4c84a;
  --code: #111816;
  --code-soft: #1d2925;
  --shadow: 0 18px 50px rgba(35, 35, 25, 0.12);
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(21, 21, 18, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(21, 21, 18, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: ui-sans-serif, "Avenir Next", "Segoe UI", system-ui, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--ink);
  color: var(--yellow);
  border-radius: 6px;
  font-size: 13px;
  box-shadow: 5px 5px 0 var(--yellow);
}

.nav-links,
.language-links,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a:hover,
.language-links a:hover,
.site-footer a:hover {
  color: var(--green);
}

.language-links {
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
}

.language-links a {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 5px 7px;
  color: var(--muted);
}

.language-links a[aria-current="page"] {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--paper);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.home-hero,
.tool-hero {
  min-height: min(660px, calc(100vh - 72px));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.95fr);
  align-items: center;
  gap: 40px;
  padding: 58px 0 38px;
}

.hero-copy h1 {
  margin: 0;
  max-width: 820px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.96;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.tool-hero .hero-copy h1 {
  font-size: clamp(44px, 6vw, 76px);
}

.home-hero .hero-copy h1 {
  font-size: clamp(52px, 5.2vw, 72px);
  line-height: 1.02;
}

.hero-copy p {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
  overflow-wrap: anywhere;
}

.hero-copy,
.hero-panel,
.search-panel {
  min-width: 0;
  max-width: 100%;
}

.hero-note {
  margin: 0 0 18px;
  color: var(--orange) !important;
  font-size: 14px !important;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-actions,
.tool-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
}

.button,
.small-button {
  min-height: 42px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  padding: 11px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
  text-align: center;
  white-space: normal;
}

.button:hover,
.small-button:hover {
  transform: translateY(-1px);
}

.primary {
  background: var(--green);
  color: #fff;
  box-shadow: 4px 4px 0 var(--ink);
}

.secondary,
.ghost,
.small-button {
  background: var(--paper);
  color: var(--ink);
}

.secondary:hover,
.ghost:hover,
.small-button:hover {
  box-shadow: 4px 4px 0 var(--yellow);
}

.search-panel,
.hero-panel {
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.search-panel {
  padding: 24px;
}

.search-panel h2 {
  margin: 0 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}

.search-panel p {
  margin: 14px 0 0;
  color: var(--muted);
}

.search-box {
  display: grid;
  gap: 8px;
}

.search-box span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.search-box input {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: #fff;
  padding: 0 16px;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  box-shadow: 4px 4px 0 var(--yellow);
}

.quick-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.quick-searches button {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  padding: 8px 10px;
  color: var(--green-dark);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.quick-searches button:hover {
  border-color: var(--green);
  box-shadow: 3px 3px 0 var(--yellow);
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 4px 0 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.proof-strip div {
  min-height: 108px;
  padding: 20px;
  border-right: 1px solid var(--line);
}

.proof-strip div:last-child {
  border-right: 0;
}

.proof-strip strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  line-height: 1;
}

.proof-strip span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 700;
}

.hero-panel {
  overflow: hidden;
}

.preview-bar {
  display: flex;
  gap: 7px;
  align-items: center;
  height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #ecebdd;
}

.preview-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
}

.preview-bar span:nth-child(2) {
  background: var(--yellow);
}

.preview-bar span:nth-child(3) {
  background: var(--green);
}

.hero-panel pre {
  min-height: 330px;
  margin: 0;
  padding: 22px;
  overflow: auto;
  background: var(--code);
  color: #d9f1df;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ad-slot {
  display: none;
}

.ad-slot:not(:empty) {
  display: grid;
  place-items: center;
  min-height: 96px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 254, 250, 0.72);
  color: var(--muted);
  text-align: center;
}

.ad-slot span {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ad-slot strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 14px;
}

.ad-top {
  margin: 6px 0 32px;
}

.ad-inline {
  margin: 26px 0;
}

.ad-side {
  min-height: 560px;
  position: sticky;
  top: 18px;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 28px;
  align-items: start;
  padding-bottom: 40px;
}

.content-main {
  min-width: 0;
}

.tool-shell,
.content-section,
.rail-card,
.tool-index,
.featured-tools,
.workflow-index,
.tool-directory,
.home-band {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.tool-shell {
  border-color: var(--ink);
  box-shadow: 6px 6px 0 rgba(21, 21, 18, 0.09);
}

.tool-title-row,
.section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.tool-title-row h2,
.content-section h2,
.section-head h2,
.home-band h2,
.rail-card h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.05;
  letter-spacing: 0;
}

.tool-title-row p,
.section-head p,
.rail-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.tool-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 14px;
}

.tool-controls label,
.control-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.tool-controls input,
.tool-controls select {
  min-height: 38px;
  min-width: 220px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  padding: 8px 10px;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.editor-card {
  display: grid;
  gap: 8px;
}

.editor-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

textarea {
  width: 100%;
  min-height: 360px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 14px;
  background: var(--code);
  color: #d9f1df;
  font: 14px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

textarea[readonly] {
  background: var(--code-soft);
}

#status {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.content-section {
  margin-top: 18px;
}

.content-section p,
.content-section li,
.faq-list p {
  color: var(--muted);
}

.check-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 24px;
  margin: 10px 0;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 10px;
  height: 10px;
  background: var(--green);
  border-radius: 2px;
  transform: rotate(45deg);
}

.related-links,
.compact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.related-links a,
.compact-links a {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 9px 11px;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 800;
}

.related-links a:hover,
.compact-links a:hover {
  border-color: var(--green);
  box-shadow: 3px 3px 0 var(--yellow);
}

.faq-list {
  display: grid;
  gap: 10px;
}

details {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 13px 14px;
}

summary {
  cursor: pointer;
  font-weight: 800;
}

.tool-index,
.featured-tools,
.workflow-index,
.tool-directory {
  margin: 24px 0;
}

.tool-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.tool-card {
  display: grid;
  min-height: 150px;
  align-content: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 18px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
  box-shadow: 5px 5px 0 var(--yellow);
}

.tool-card span {
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tool-card strong {
  font-size: 19px;
  line-height: 1.15;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.tool-card em {
  align-self: end;
  color: var(--green-dark);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.workflow-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 18px;
}

.workflow-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
}

.tool-row-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tool-row {
  display: grid;
  grid-template-columns: minmax(100px, 0.4fr) minmax(140px, 0.55fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 12px 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.tool-row:hover {
  transform: translateY(-1px);
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--yellow);
}

.tool-row span {
  color: var(--orange);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-row strong {
  font-size: 15px;
  line-height: 1.18;
}

.tool-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.search-empty {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 14px;
  color: var(--muted);
  font-weight: 800;
}

.searchable-tool[hidden] {
  display: none !important;
}

.home-band {
  margin: 18px 0;
}

.home-band h2 {
  margin-bottom: 14px;
}

.home-band p {
  margin: -6px 0 14px;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0 42px;
  border-top: 1px solid var(--line);
}

.site-footer p {
  max-width: 620px;
  margin: 6px 0 0;
  color: var(--muted);
}

@media (max-width: 980px) {
  .home-hero,
  .tool-hero,
  .page-grid {
    grid-template-columns: 1fr;
  }

  .home-hero,
  .tool-hero {
    min-height: auto;
  }

  .side-rail {
    display: none;
  }

  .tool-card-grid,
  .workflow-grid,
  .tool-row-list,
  .proof-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

@media (max-width: 720px) {
  .site-header,
  .site-footer,
  main {
    width: min(100% - 22px, 1180px);
  }

  .site-header,
  .site-footer,
  .tool-title-row,
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links {
    display: none;
  }

  .home-hero,
  .tool-hero {
    padding: 34px 0 22px;
    gap: 22px;
  }

  .hero-copy h1,
  .tool-hero .hero-copy h1 {
    font-size: clamp(38px, 12vw, 54px);
  }

  .proof-strip,
  .editor-grid,
  .tool-card-grid,
  .workflow-grid,
  .tool-row-list {
    grid-template-columns: 1fr;
  }

  .proof-strip div {
    min-height: 120px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .proof-strip div:last-child {
    border-bottom: 0;
  }

  textarea {
    min-height: 280px;
  }

  .button,
  .small-button {
    width: 100%;
  }
}

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