/* Alchemist — human workshop look (not purple SaaS, not cream serif kit) */
:root {
  --ink: #1a1f16;
  --ink-soft: #3e4638;
  --muted: #6b7264;
  --line: #c9cfc4;
  --paper: #e9ece8;
  --surface: #f7f8f5;
  --accent: #b33a2b;
  --accent-deep: #8f2e22;
  --accent-soft: #f3e2de;
  --mark: #2f5d50;
  --mark-soft: #dce8e3;
  --radius: 3px;
  --max: 1040px;
  /* Lexend = easier on the eyes than condensed display fonts */
  --font-display: "Lexend", "Source Sans 3", sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(90deg, rgba(26,31,22,.03) 1px, transparent 1px),
    linear-gradient(rgba(26,31,22,.03) 1px, transparent 1px);
  background-size: 28px 28px;
  line-height: 1.55;
}

img { max-width: 100%; display: block; }
a { color: var(--mark); text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }

.site-wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header — solid, no glass */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface);
  border-bottom: 2px solid var(--ink);
}

.site-header__inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: .55rem;
  text-decoration: none;
  color: inherit;
}

.brand__mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -.01em;
  text-transform: none;
}

.brand__mark span { color: var(--accent); }

.brand__tag {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav { display: none; align-items: center; gap: 1.1rem; }
.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: .92rem;
  font-weight: 600;
}
.nav a:hover { color: var(--accent); }

.nav-toggle {
  width: 40px; height: 40px;
  border: 2px solid var(--ink);
  background: var(--surface);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
}

.nav-mobile {
  display: none;
  border-top: 2px solid var(--ink);
  padding: .75rem 1rem 1rem;
  background: var(--surface);
}
.nav-mobile.is-open { display: block; }
.nav-mobile a {
  display: block;
  padding: .5rem 0;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
}

@media (min-width: 768px) {
  .nav { display: flex; }
  .nav-toggle { display: none; }
  .nav-mobile { display: none !important; }
}

/* Hero — brand first, asymmetric */
.hero {
  padding: 2.5rem 0 1.75rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--ink);
  display: grid;
  gap: 1rem;
}

@media (min-width: 800px) {
  .hero {
    grid-template-columns: 1.4fr .8fr;
    align-items: end;
  }
}

.hero__stamp {
  display: inline-block;
  border: 2px solid var(--accent);
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .35rem .55rem;
  transform: rotate(-2deg);
  margin-bottom: .75rem;
  background: var(--accent-soft);
}

.hero__brand {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.08;
  text-transform: none;
  margin: 0 0 .75rem;
}

.hero__brand em {
  font-style: normal;
  color: var(--accent);
}

.hero__lead {
  margin: 0;
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.hero__aside {
  border: 2px solid var(--ink);
  background: var(--mark-soft);
  padding: .9rem 1rem;
  font-size: .9rem;
  color: var(--ink-soft);
}

.hero__aside strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: none;
  letter-spacing: -.01em;
  color: var(--ink);
  margin-bottom: .35rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1.15rem;
  grid-column: 1 / -1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .7rem 1rem;
  border-radius: var(--radius);
  border: 2px solid var(--ink);
  font-family: inherit;
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent-deep);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-deep); color: #fff; }

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--mark-soft); color: var(--ink); }

/* Search / filters */
.toolbar { display: grid; gap: .75rem; margin-bottom: 1rem; }
.search { position: relative; }
.search input {
  width: 100%;
  padding: .8rem 1rem .8rem 2.5rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  font: inherit;
}
.search input:focus {
  outline: 3px solid rgba(179,58,43,.25);
  border-color: var(--accent);
}
.search__icon {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  appearance: none;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: .35rem .75rem;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
}
.chip.is-active, .chip:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

/* Tool list — ledger style */
.tool-list {
  border: 2px solid var(--ink);
  background: var(--surface);
  margin-bottom: 1.5rem;
}

.tool-row {
  display: grid;
  gap: .35rem;
  padding: 1rem 1.1rem;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.tool-row:first-child { border-top: 0; }
.tool-row:hover { background: #eef2ea; }

.tool-row__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
}

.tool-row__title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.35;
}

.tool-row__cat {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--mark);
  background: var(--mark-soft);
  padding: .15rem .45rem;
  border: 1px solid var(--mark);
}

.tool-row__desc {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
  max-width: 62ch;
}

.tool-row__go {
  font-size: .85rem;
  font-weight: 700;
  color: var(--accent-deep);
  text-transform: none;
  letter-spacing: 0;
}

@media (min-width: 720px) {
  .tool-row {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.empty-state { text-align: center; color: var(--muted); padding: 2rem 1rem; }

.panel {
  background: var(--surface);
  border: 2px solid var(--ink);
  padding: 1.2rem 1.25rem 1.35rem;
  margin-bottom: 1rem;
}

.panel h2 {
  margin: 0 0 .7rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: -.01em;
}

.panel h3 {
  margin: 0 0 .3rem;
  font-size: .98rem;
  font-weight: 700;
}

.panel p, .panel li { color: var(--ink-soft); font-size: .95rem; }
.panel ol, .panel ul { padding-left: 1.15rem; }

.split-3 { display: grid; gap: 1rem; }
@media (min-width: 800px) { .split-3 { grid-template-columns: repeat(3, 1fr); } }

.faq details { border-top: 1px solid var(--line); padding: .75rem 0; }
.faq details:first-of-type { border-top: 0; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.faq details p { margin: .45rem 0 0; }

.ad-slot {
  margin: 1.1rem 0;
  padding: .7rem;
  border: 2px dashed var(--muted);
  background: #e2e6df;
  text-align: center;
  color: var(--muted);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .35rem;
}

.ad-slot__box {
  width: min(100%, 728px);
  min-height: 90px;
  background: #d5dbd0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7a8274;
  font-size: .8rem;
  letter-spacing: 0;
  text-transform: none;
}

/* Legal pages */
.page-main { width: min(100% - 2rem, 700px); margin: 2rem auto 3rem; }
.page-card {
  background: var(--surface);
  border: 2px solid var(--ink);
  padding: clamp(1.2rem, 3vw, 2rem);
}
.page-card h1 {
  margin: 0 0 .65rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.5vw, 2rem);
  font-weight: 700;
  text-transform: none;
  letter-spacing: -.01em;
  line-height: 1.2;
}
.page-card h2 {
  margin: 1.5rem 0 .5rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: -.01em;
}
.page-card p, .page-card li { color: var(--ink-soft); font-size: .97rem; }
.page-meta { color: var(--muted); font-size: .82rem; margin-bottom: 1rem; }
.back-link {
  display: inline-flex;
  text-decoration: none;
  color: var(--accent-deep);
  font-weight: 700;
  font-size: .9rem;
}

.form-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }

label {
  display: block;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .35rem;
}

input[type="text"],
input[type="email"],
input[type="search"],
textarea {
  width: 100%;
  padding: .7rem .85rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font: inherit;
  color: var(--ink);
}
input:focus, textarea:focus {
  outline: 3px solid rgba(179,58,43,.22);
  border-color: var(--accent);
}

.form-note { margin-top: 1rem; font-size: .85rem; color: var(--muted); }
.success {
  display: none;
  margin-top: 1rem;
  padding: .8rem 1rem;
  border: 2px solid var(--mark);
  background: var(--mark-soft);
  color: var(--ink);
  font-weight: 700;
  font-size: .92rem;
}
.success.is-visible { display: block; }

.focus-list { display: grid; gap: .75rem; margin: 1rem 0; }
@media (min-width: 640px) { .focus-list { grid-template-columns: 1fr 1fr; } }
.focus-item {
  border-left: 4px solid var(--accent);
  padding: .25rem 0 .25rem .8rem;
}
.focus-item h3 { margin: 0 0 .2rem; font-size: .95rem; }
.focus-item p { margin: 0; font-size: .88rem; }

.site-footer {
  margin-top: auto;
  border-top: 2px solid var(--ink);
  background: var(--ink);
  color: #d7ddd0;
  padding: 1.75rem 0;
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: #f3c7c0; }
.site-footer__inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 768px) {
  .site-footer__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.site-footer .brand__mark { color: #fff; }
.site-footer .brand__mark span { color: #f0a59c; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: .75rem 1.1rem; }
.site-footer__links a { font-size: .9rem; font-weight: 600; }
.site-footer__copy { margin: 0; font-size: .78rem; color: #9aa392; }
