/* hootform's generated pages: templates, comparisons and free tools (seo/index.ts). Loaded after
   landing.css (tokens, buttons, wordmark, the dark finale and footer) and docs.css (the sticky top
   bar and the `.doc__body` prose), so everything here is these pages' own layout. Every colour is
   a landing.css token, so light and dark both follow from there. */

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

/* ---- Top bar: the docs' bar, with the site's sections in it ---- */
.site-nav .docs-nav__links a[aria-current] {
  color: var(--ink);
}

/* ---- Hero ---- */
.site-hero {
  padding-top: clamp(28px, 5vw, 56px);
  padding-bottom: clamp(24px, 4vw, 40px);
}
.site-hero--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.site-hero__words {
  padding-top: 8px;
}
.site-h1 {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.site-lede {
  margin-top: 18px;
  max-width: 58ch;
  font-size: clamp(17px, 1.6vw, 19px);
  color: var(--ink-2);
}
.site-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.site-hero__note {
  margin-top: 14px;
  font-size: 14px;
  color: var(--ink-3);
}
.site-hero__note a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  color: var(--ink-3);
}
.crumbs li + li::before {
  content: "›";
  margin-right: 6px;
}
.crumbs a:hover {
  color: var(--ink);
}
.crumbs [aria-current] {
  color: var(--ink-2);
}

/* The facts row under a template's title: all derived from its definition. */
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.facts li {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  background: var(--surface);
}
.facts .facts__premium {
  border-color: color-mix(in oklch, var(--accent) 55%, var(--line));
  color: var(--accent-ink);
}

/* A template running for real, framed from /templates/<slug>/try. Framed, like the landing
   page's hero, because a form page styles its whole document. Its height is fixed because a
   frame can't size itself; the tallest step of any template fits. */
.preview {
  position: sticky;
  top: 88px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  scroll-margin-top: 88px;
}
.preview__chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-2);
  background: var(--bg-2);
}
.preview__chrome .dots {
  display: flex;
  gap: 6px;
}
.preview__chrome .dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}
.preview__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview__frame {
  display: block;
  width: 100%;
  height: 700px;
  border: 0;
  background: #fff;
}

/* ---- Sections ---- */
.site-content {
  padding-bottom: clamp(48px, 7vw, 96px);
}
.site-section {
  padding-top: clamp(40px, 6vw, 72px);
  scroll-margin-top: 88px;
}
.site-h2 {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.site-h2 a:hover {
  color: var(--brand);
}
.site-h3 {
  margin: 28px 0 12px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.site-section__lede {
  margin: -8px 0 22px;
  max-width: 68ch;
  color: var(--ink-2);
}
.site-section__lede a,
.site-more a,
.site-callout a {
  color: var(--brand);
  font-weight: 600;
}
.site-prose {
  max-width: 72ch;
}
.site-prose > :first-child {
  margin-top: 0;
}
.site-more {
  margin-top: 20px;
}

/* "What's in this template": every question as plain, crawlable HTML. */
.question-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.question-card {
  padding: 18px 20px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.question-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.question-card__number {
  color: var(--ink-3);
}
.question-card__type {
  color: var(--brand);
}
.question-card__type:hover {
  text-decoration: underline;
}
.question-card__required {
  margin-left: auto;
  color: var(--ink-3);
}
.question-card__title {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.question-card__description,
.question-card__detail {
  margin-top: 6px;
  font-size: 14.5px;
  color: var(--ink-2);
}
.question-card__options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.question-card__options li {
  padding: 4px 10px;
  font-size: 13.5px;
  border-radius: var(--r-sm);
  background: var(--bg-2);
  color: var(--ink-2);
}
.question-card__followup {
  margin-top: 12px;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: var(--r-sm);
  border: 1px dashed var(--line);
  color: var(--ink-2);
}
.question-card__followup span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.rule-list,
.fits-list {
  display: grid;
  gap: 10px;
  max-width: 76ch;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rule-list li,
.fits-list li {
  position: relative;
  padding: 14px 18px 14px 44px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--surface);
}
.rule-list li::before,
.fits-list li::before {
  position: absolute;
  left: 18px;
  top: 14px;
  color: var(--brand);
  font-weight: 700;
}
.rule-list li::before {
  content: "↳";
}
.fits-list li::before {
  content: "✓";
}

/* Cards: related templates, features, comparisons, tools. */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.card-grid > li {
  display: flex;
}
.site-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  transition:
    border-color 0.2s var(--ease),
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}
.site-card:hover {
  border-color: var(--ink-3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.site-card__eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.site-card__title {
  font-weight: 700;
  line-height: 1.3;
}
.site-card__text {
  font-size: 14.5px;
  color: var(--ink-2);
}
.site-card__meta {
  margin-top: auto;
  padding-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
}

.site-callout {
  margin-top: clamp(32px, 5vw, 56px);
  padding: 18px 22px;
  border-radius: var(--r-md);
  background: var(--brand-soft);
  color: var(--ink);
}

.site-callout--warning {
  background: color-mix(in oklch, var(--accent) 16%, var(--surface));
}

/* Hub filters: plain links, so crawlers follow them. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--surface);
}
.chip span {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-3);
}
.chip:hover {
  border-color: var(--ink-3);
  color: var(--ink);
}
.chip[aria-current] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.chip[aria-current] span {
  color: inherit;
  opacity: 0.7;
}

/* A hub's filters: one row per facet, every entry a plain link. */
.filters {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}
.filters__row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
}
.filters__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.filters .chips {
  margin-top: 0;
}
.also-in {
  margin-top: 10px;
  font-size: 14.5px;
  color: var(--ink-3);
}
.also-in a {
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 640px) {
  .filters__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
}

/* ---- FAQ ---- */
.faq {
  display: grid;
  gap: 10px;
  max-width: 80ch;
}
.faq__item {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.faq__item > summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq__item > summary::-webkit-details-marker {
  display: none;
}
.faq__item > summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--ink-3);
}
.faq__item[open] > summary::after {
  content: "−";
}
.faq__answer {
  padding: 0 20px 16px;
}
.faq__answer > :first-child {
  margin-top: 0;
}

/* ---- Comparison tables ---- */
.compare-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 15px;
}
.compare-table th,
.compare-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line-2);
  vertical-align: top;
}
.compare-table thead th {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
.compare-table tbody th {
  font-weight: 600;
}
.compare-table tbody th a {
  color: var(--brand);
}
.compare-table td:nth-child(2) {
  color: var(--ink);
}
.table-note {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--ink-3);
}

/* ---- Calculators (public/tools.js) ---- */
.calc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 32px);
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.calc__inputs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  align-content: start;
}
.calc__field {
  display: grid;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.calc__field--wide {
  grid-column: 1 / -1;
}
.calc__field input,
.calc__field select,
.calc__field textarea {
  width: 100%;
  padding: 11px 13px;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.calc__field textarea {
  resize: vertical;
  font-size: 14.5px;
}
.calc__field input:focus,
.calc__field select:focus,
.calc__field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--brand) 25%, transparent);
}
.calc__check {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  cursor: pointer;
}
.calc__check input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-fill);
}
.calc__results {
  display: grid;
  gap: 12px;
  align-content: start;
}
.calc__result {
  display: grid;
  gap: 2px;
  padding: 18px 20px;
  border-radius: var(--r-md);
  background: var(--bg-2);
}
.calc__result--ours {
  background: var(--brand-soft);
}
.calc__product {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.calc__price {
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.calc__plan {
  font-size: 14px;
  color: var(--ink-2);
}
.calc__bars {
  display: grid;
  gap: 8px;
}
.calc__bar {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.calc__bar > span:last-child {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 13px;
}
.calc__track {
  height: 10px;
  border-radius: 999px;
  background: var(--bg-2);
  overflow: hidden;
}
.calc__track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 0.35s var(--ease);
}
.calc__bar--good .calc__track span {
  background: #22a06b;
}
.calc__bar--mid .calc__track span {
  background: var(--ink-3);
}
.calc__bar--bad .calc__track span {
  background: #d9534f;
}
.calc__note {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--ink-3);
}

/* A tool's hand-off to the template that collects its numbers. */
.handoff {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 28px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.handoff__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
}
.handoff__text {
  margin-top: 4px;
  max-width: 60ch;
  color: var(--ink-2);
}
.handoff__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---- Footer ---- */
.site-finale {
  padding-block: clamp(64px, 9vw, 110px);
}
.ask-ai {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}
.ask-ai span {
  color: var(--dk-ink-3);
}
.ask-ai a {
  color: var(--dk-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- Narrower screens ---- */
@media (max-width: 980px) {
  .site-hero--split {
    grid-template-columns: minmax(0, 1fr);
  }
  .preview {
    position: relative;
    top: 0;
  }
  .calc {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* docs.css hides the top bar's links on a phone behind its contents menu, which these pages
   don't have, so they wrap onto a scrolling row of their own. */
@media (max-width: 900px) {
  .site-nav .docs-nav__inner {
    flex-wrap: wrap;
    height: auto;
    padding-block: 10px;
    row-gap: 6px;
  }
  .site-nav .docs-nav__links {
    display: flex;
    order: 3;
    width: 100%;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 4px;
    font-size: 14.5px;
    scrollbar-width: none;
  }
  .site-nav .docs-nav__links a {
    white-space: nowrap;
  }
}
@media (max-width: 560px) {
  .preview__frame {
    height: 600px;
  }
  .calc__bar {
    grid-template-columns: 80px minmax(0, 1fr) 40px;
  }
}
