/* Headgate OS — Small Producer Studio (Zero-CDN Agrarian Editorial Styles) */

:root {
  --canvas: #F5F1E8;
  --surface: #FDFBF7;
  --surface-alt: #ECE6D9;
  --surface-hover: #E5DEC9;
  --ink: #1C1917;
  --ink-secondary: #4B463F;
  --ink-muted: #766F64;
  --line: #DDD5C4;
  --line-strong: #C5BBA7;
  --brand: #1E3D2F;
  --brand-hover: #152D22;
  --brand-soft: #E4EDE8;
  --brand-ink: #FDFBF7;
  --rust: #9A4D2A;
  --rust-soft: #F5E6DE;
  --sage: #2E6B47;
  --sage-soft: #E2F0E7;
  --amber: #A16207;
  --amber-soft: #FEF3C7;
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.05);
  --shadow-md: 0 10px 26px -8px rgba(28, 25, 23, 0.1), 0 2px 6px -2px rgba(28, 25, 23, 0.04);
}

html.dark-theme {
  --canvas: #141311;
  --surface: #1D1B18;
  --surface-alt: #26231F;
  --surface-hover: #302C26;
  --ink: #F2EDE4;
  --ink-secondary: #CBC3B5;
  --ink-muted: #938A7C;
  --line: #312D27;
  --line-strong: #464038;
  --brand: #6EB48C;
  --brand-hover: #83C69F;
  --brand-soft: rgba(110, 180, 140, 0.14);
  --brand-ink: #111A15;
  --rust: #D9855F;
  --rust-soft: rgba(217, 133, 95, 0.15);
  --sage: #74C495;
  --sage-soft: rgba(116, 196, 149, 0.15);
  --amber: #E4B255;
  --amber-soft: rgba(228, 178, 85, 0.15);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 28px -8px rgba(0, 0, 0, 0.45);
}

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

body {
  margin: 0;
  background-color: var(--canvas);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
}

/* Subtle tactile paper-linen grain texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

.app-shell { position: relative; z-index: 1; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.font-editorial {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  letter-spacing: -0.02em;
}

.font-mono {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  padding: 12px 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--brand-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
}

.brand-sub {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 6px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-links a:hover {
  background: var(--surface-alt);
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.context-ribbon {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-secondary);
}

.ribbon-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 8px 0;
}

/* Surfaces & Buttons */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.card-elevated {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 16px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.1s ease;
  line-height: 1.25;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--brand);
  color: var(--brand-ink);
}
.btn-primary:hover { background: var(--brand-hover); }

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-secondary:hover { background: var(--surface-alt); }

.btn-sm {
  font-size: 12.5px;
  padding: 6px 12px;
}

.btn-xs {
  font-size: 12px;
  padding: 4px 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.badge-sage { background: var(--sage-soft); color: var(--sage); }
.badge-rust { background: var(--rust-soft); color: var(--rust); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-neutral { background: var(--surface-alt); color: var(--ink-secondary); }

/* Layout Sections */
.section {
  padding: 52px 0;
  border-bottom: 1px solid var(--line);
}
.section:last-of-type { border-bottom: none; }

.eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--rust);
  margin: 0 0 8px;
}

.eyebrow-brand { color: var(--brand); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
  gap: 36px;
  align-items: center;
}

.hero-title {
  font-size: clamp(32px, 4.4vw, 48px);
  line-height: 1.08;
  margin: 0 0 16px;
  font-weight: 700;
}

.hero-lead {
  font-size: 16px;
  color: var(--ink-secondary);
  margin: 0 0 24px;
  max-width: 600px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* Two-Sides Architecture Stack */
.sides-stack {
  display: grid;
  gap: 14px;
}

.side-card {
  padding: 20px;
}

.side-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.side-card h2, .side-card h3 {
  margin: 0;
  font-size: 19px;
}

.side-card p {
  margin: 0 0 12px;
  font-size: 13.5px;
  color: var(--ink-secondary);
}

.side-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-muted);
}

.side-meta span {
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--surface-alt);
}

/* Section Headers */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}

.section-title {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
  margin: 0;
  font-weight: 700;
}

.section-sub {
  margin: 6px 0 0;
  font-size: 14.5px;
  color: var(--ink-secondary);
  max-width: 680px;
}

/* White-Label Controls & Preview */
.controls-card {
  padding: 18px;
  margin-bottom: 18px;
}

.controls-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
}

.control-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 6px;
}

.preset-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.preset-btn {
  padding: 8px 6px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  background: var(--canvas);
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}
.preset-btn.active {
  background: var(--brand);
  color: var(--brand-ink);
  border-color: var(--brand);
}

.field-input {
  width: 100%;
  background: var(--canvas);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 8px 11px;
  font-size: 13.5px;
  outline: none;
}
.field-input:focus { border-color: var(--brand); }

.swatch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
}

.swatch-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  cursor: pointer;
  transition: transform 0.14s ease;
}
.swatch-btn.active {
  transform: scale(1.14);
  border: 3px solid var(--ink);
}

.wl-shell { overflow: hidden; }

.wl-topbar {
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #FDFBF7;
  transition: background-color 0.2s ease;
}

.wl-id {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wl-monogram {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}

.wl-body {
  padding: 20px;
  background: var(--canvas);
  display: grid;
  gap: 18px;
}

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

.kpi-card {
  padding: 14px 16px;
}

.kpi-label { font-size: 12px; color: var(--ink-muted); }
.kpi-value { font-size: 21px; font-weight: 700; margin: 3px 0; }
.kpi-sub { font-size: 12px; color: var(--ink-secondary); }

.wl-split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.95fr);
  gap: 18px;
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  background: var(--surface-alt);
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
.text-right { text-align: right; }

.order-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-alt);
}

.margin-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: var(--surface-alt);
  overflow: hidden;
}
.margin-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.25s ease, background-color 0.2s ease;
}

/* Full Demo Callout Banner */
.demo-banner {
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
  gap: 28px;
  align-items: center;
}

.demo-checklist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
  font-size: 13.5px;
  color: var(--ink-secondary);
}

/* Comparison & Modules Grids */
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.compare-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  font-size: 13.5px;
  color: var(--ink-secondary);
}

.compare-list li {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.compare-list li:last-child { padding-bottom: 0; border-bottom: none; }

.module-card { padding: 20px; }
.module-num { font-size: 11.5px; font-weight: 700; color: var(--rust); margin-bottom: 6px; }
.module-card h3 { margin: 0 0 6px; font-size: 18px; }
.module-card p { margin: 0; font-size: 13px; color: var(--ink-secondary); }

/* Pricing & Brief Generator */
.pricing-controls {
  padding: 18px 20px;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) auto;
  gap: 18px 24px;
  align-items: center;
}

.scale-slider-wrap { display: grid; gap: 6px; }
.scale-slider-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.scale-range {
  width: 100%;
  accent-color: var(--brand);
  cursor: pointer;
}
.scale-gutcheck {
  font-size: 12.5px;
  color: var(--ink-secondary);
}

.billing-toggle {
  display: inline-flex;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
}
.billing-btn {
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.billing-btn.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-secondary);
}

.tier-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.tier-card.featured {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}
.tier-price { font-size: 32px; font-weight: 700; }
.tier-cap {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--surface-alt);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.tier-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-secondary);
}

.brief-card { padding: 24px; margin-top: 24px; }
.brief-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.95fr);
  gap: 24px;
}
.form-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}
.chip-btn {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  background: var(--canvas);
  color: var(--ink-secondary);
  cursor: pointer;
}
.chip-btn.active {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: var(--brand);
}
.brief-output {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}
.brief-pre {
  margin: 0;
  padding: 12px;
  border-radius: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-secondary);
  white-space: pre-wrap;
  min-height: 195px;
}

/* AEO / GEO Quick Facts Strip */
.facts-strip {
  margin-top: 28px;
  padding: 20px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 18px 24px;
  align-items: center;
}

.facts-lead {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.55;
}

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

.fact-cell {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
}

.fact-cell dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  font-weight: 700;
}

.fact-cell dd {
  margin: 3px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--brand);
}

/* Comparison Table & Use-Case Grid */
.compare-table-card {
  overflow: hidden;
  margin-bottom: 24px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.compare-table th,
.compare-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.compare-table thead th {
  background: var(--surface-alt);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-secondary);
  font-weight: 700;
}

.compare-table tbody th {
  font-weight: 700;
  color: var(--ink);
  width: 22%;
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: none;
}

.compare-table .col-highlight {
  background: var(--brand-soft);
  color: var(--ink);
}

.compare-table thead .col-highlight {
  background: var(--brand);
  color: var(--brand-ink);
}

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

.use-case-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.use-case-card h3 {
  margin: 2px 0 0;
  font-size: 18px;
  line-height: 1.2;
}

.use-case-card p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-secondary);
}

/* FAQ Accordion */
.faq-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.faq-item {
  padding: 0;
  overflow: hidden;
}

.faq-q {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-q::-webkit-details-marker { display: none; }

.faq-q::after {
  content: "+";
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--brand);
  flex-shrink: 0;
}

.faq-item[open] .faq-q {
  border-bottom: 1px solid var(--line);
  background: var(--surface-alt);
}

.faq-item[open] .faq-q::after {
  content: "\2212";
}

.faq-a {
  margin: 0;
  padding: 14px 18px 18px;
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.6;
}

/* Footer & Toast */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 22px 0;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--ink);
  color: var(--canvas);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  z-index: 60;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 960px) {
  .hero-grid, .controls-grid, .wl-split, .demo-banner, .brief-grid, .three-col, .pricing-controls, .facts-strip, .faq-list {
    grid-template-columns: 1fr;
  }
  .kpi-grid, .use-case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .two-col, .form-two-col, .use-case-grid, .facts-grid { grid-template-columns: 1fr; }
  .preset-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section { padding: 36px 0; }
  .nav-links {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links a { white-space: nowrap; flex-shrink: 0; }
}

/* Public records page */
.section[id] { scroll-margin-top: 5rem; }
.section-title + .three-col, .section-title + .two-col, .section-title + .table-wrap,
.section-title + .faq-list, .section-sub + .three-col { margin-top: 1.4rem; }
.glance, .setup-form { padding: clamp(20px, 3vw, 36px); }
.glance h2, .tier-card h3 { margin: 0; font-size: 1.55rem; }
.glance p, .legal p { line-height: 1.65; }
.preview-title { margin-top: 2.25rem; font-size: 1.65rem; }
.setup-form { max-width: 54rem; margin-top: 1rem; }
.setup-form label { display: grid; gap: 6px; font-weight: 600; }
.setup-form .consent-choice { display: flex; align-items: flex-start; gap: 0.625rem; margin-top: 1rem; }
.setup-form .form-two-col { margin-bottom: 12px; }
.setup-form textarea { resize: vertical; }
.setup-form button:disabled { opacity: .65; cursor: default; }
.legal { max-width: 52rem; padding-block: 3rem; }
.legal h2 { margin: 1.75rem 0 .4rem; }
@media (max-width: 840px) {
  .header-inner { gap: 6px; }
  .header-actions { margin-left: auto; }
  .nav-links { order: 3; width: 100%; }
  .section[id] { scroll-margin-top: 7rem; }
}
@media (max-width: 480px) {
  .brand-sub { display: none; }
  .nav-links { justify-content: space-between; }
  .nav-links a { padding-inline: 5px; }
  .header-inner { padding-block: 8px; }
}

/* Public ranch imagery: synthetic illustration, separate from all demo records. */
.glance.photo-glance { overflow: hidden; padding: 0; }
.ranch-photo { display: block; width: 100%; height: 245px; object-fit: cover; object-position: 50% 52%; }
.glance-inner { padding: 23px 27px; }
.glance-guides { margin-bottom: 0; }
.glance-guides a { display: inline-flex; align-items: center; min-height: 24px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.glance-guides a:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
@media (max-width: 620px) {
  .ranch-photo { height: 212px; }
  .glance-inner { padding: 20px; }
}

.deal-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(10rem,1fr));gap:.8rem;align-items:end}
.deal-fields label{display:grid;gap:.2rem}
.deal-fields input{min-width:0;width:100%}
#cattle-deal-demo article{margin-block:.85rem}

.deal-next{margin:1rem 0 1.5rem;padding:clamp(1rem,3vw,1.5rem);background:var(--brand-soft);border:1px solid var(--line-strong);border-radius:16px}
.deal-next[hidden]{display:none}
.deal-next-label{margin:0;font-size:.78rem;font-weight:750;text-transform:uppercase;letter-spacing:.12em;color:var(--brand)}
.deal-next h3{margin:.35rem 0;font-size:clamp(1.25rem,2.8vw,1.65rem);line-height:1.2}
.deal-next p:not(.deal-next-label){margin:0 0 .85rem}
.deal-next .cta-row{margin:0;row-gap:.6rem}
.deal-next .btn{min-height:44px}

/* Funnel review locally: keep secondary tools available, not in the main decision path. */
.job-details{margin:14px 0 0}.job-details dt{font-weight:700}.job-details dd{margin:3px 0 12px}.setup-form details{border-top:1px solid var(--line,#c4c6b8);padding:12px 0}.setup-form details .form-two-col{margin-top:12px}.setup-form summary,#cattle-deal-demo summary{cursor:pointer;font-weight:700}.site-footer nav{display:flex;gap:8px;flex-wrap:wrap}.hero-grid .photo-glance{overflow:hidden}.hero-grid .ranch-photo{display:block;width:100%;object-fit:cover}.hero-grid .cta-row{align-items:center}

/* Public ranch decision examples use the same palette as plans and setup. */
.ranch-decisions .top {
  position: relative; isolation: isolate; overflow: hidden; border-radius: 8px;
  padding: clamp(32px, 5vw, 72px); margin: 16px 0 34px;
  color: #fff; background: #172e25;
}
.ranch-decisions .top .ranch-photo { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; object-position: 66% 48%; }
.ranch-decisions .top::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, #14271df5, #14271de8 30%, #14271d99 56%, #14271d16 85%);
}
.ranch-decisions h1, .ranch-decisions h2, .ranch-decisions h3 { font-family: Georgia, serif; font-weight: 400; letter-spacing: -.045em; line-height: 1.05; }
.ranch-decisions h1 { color: #fff; font-size: clamp(44px, 5.6vw, 84px); margin: 16px 0; max-width: 15ch; }
.ranch-decisions .top em { color: #e9cba5; }
.ranch-decisions .lead { max-width: 42ch; font-size: clamp(16px, 1.4vw, 20px); color: #f6f3e9; }
.ranch-decisions .kicker, .ranch-decisions .tag { font: 650 12px/1.5 ui-monospace, monospace; text-transform: uppercase; letter-spacing: .08em; }
.ranch-decisions .top .kicker { color: #f0d7ac; }
.ranch-decisions .links, .ranch-decisions .bottom-actions, .ranch-decisions .switches { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; align-items: center; }
.ranch-decisions .top .btn-primary { background: #f0d9ae; color: #22372d; border-color: #f0d9ae; }
.ranch-decisions .top .btn-secondary { color: white; background: #23372bcc; border-color: #9ba695; }
.ranch-decisions h2 { font-size: clamp(32px, 3.4vw, 48px); margin: 5px 0; }
.ranch-decisions h3 { font-size: clamp(26px, 3vw, 39px); margin: 0 0 10px; }
.ranch-decisions #decisions { scroll-margin-top: 90px; }
.ranch-decisions .switches button { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 5px; padding: 10px 14px; font: inherit; cursor: pointer; }
.ranch-decisions .switches button[aria-pressed=true] { background: var(--brand); color: var(--brand-ink); }
.ranch-decisions .panel { display: grid; grid-template-columns: 1.12fr .88fr; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; overflow: hidden; }
.ranch-decisions .panel[hidden] { display: none; }
.ranch-decisions .inputs, .ranch-decisions .results { padding: clamp(20px, 3vw, 42px); min-width: 0; }
.ranch-decisions .fields { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin: 18px 0; }
.ranch-decisions .fields.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.ranch-decisions label { font-size: 13px; font-weight: 650; }
.ranch-decisions input, .ranch-decisions select { display: block; width: 100%; margin-top: 6px; padding: 9px; background: var(--canvas); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 4px; font: 600 18px/1.4 ui-monospace, monospace; }
.ranch-decisions .small, .ranch-decisions .hint { color: var(--ink-secondary); font-size: 14px; }
.ranch-decisions .results { display: flex; flex-direction: column; justify-content: center; background: linear-gradient(110deg,#14332a,#27503f); color: white; }
.ranch-decisions .results .tag, .ranch-decisions .results p { color: #d3e0cc; }
.ranch-decisions .results a { color: #f0d9ae; text-decoration: underline; }
.ranch-decisions output { color: white; font: 400 clamp(38px,4vw,65px)/1.15 Georgia,serif; letter-spacing: -.045em; overflow-wrap: anywhere; }
.ranch-decisions .figure { display: flex; align-items: center; gap: 14px; }
.ranch-decisions .calc-note { border-top: 1px solid #638273; margin: 14px 0 9px; padding-top: 10px; }
.ranch-decisions .quadrants { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; width: 68px; flex: none; }
.ranch-decisions .quadrants i { height: 30px; border: 1px dashed #afc0b1; border-radius: 3px; }
.ranch-decisions .quadrants .held { background: #d7b17e; border-style: solid; }
.ranch-decisions .bin { position: relative; width: 60px; height: 86px; flex: none; background: #839181; clip-path: polygon(50% 0,100% 16%,100% 82%,65% 94%,65% 100%,35% 100%,35% 94%,0 82%,0 16%); }
.ranch-decisions .bin::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg,transparent 0 7px,#16382b50 7px 9px); }
.ranch-decisions .grain { position: absolute; bottom: 0; width: 100%; height: 50%; background: #efc583; }
.ranch-decisions .rail { display: grid; grid-template-columns: repeat(3,1fr); margin: 24px 0; border-block: 1px solid var(--line); }
.ranch-decisions .rail a { display: block; padding: 18px 14px; color: var(--ink); text-decoration: none; }
.ranch-decisions .rail a:hover { background: var(--surface-hover); }
.ranch-decisions .rail strong { display: block; font: normal 23px/1.15 Georgia,serif; margin-bottom: 6px; }
.ranch-decisions .rail span { font-size: 14px; }
.ranch-decisions .lower { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.ranch-decisions .lower > div:first-child { max-width: 60ch; }
@media (max-width: 760px) {
  .ranch-decisions .top { padding: 26px 18px 64px; }
  .ranch-decisions .top::before { background: linear-gradient(90deg,#162d23f5,#162d23b0 80%); }
  .ranch-decisions .panel, .ranch-decisions .rail { grid-template-columns: 1fr; }
  .ranch-decisions .fields { gap: 6px; }
  .ranch-decisions .switches button { font-size: 14px; padding: 9px; }
  .ranch-decisions .lower { display: block; }
}

/* Conversion and landing-page layer: hero trust bar, pain mirror, proof strip, four-tier pricing, guides. */
.ranch-decisions .trust-bar { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 18px 0 0; padding: 0; list-style: none; font-size: 14px; color: #e6eddc; }
.ranch-decisions .trust-bar li::before { content: "✓ "; color: #f0d9ae; font-weight: 700; }
.pain-card { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.pain-card h3 { margin: 0; font-size: 1.3rem; line-height: 1.2; }
.pain-card p { margin: 0; font-size: 14px; color: var(--ink-secondary); }
.pain-card .pain-label, .pain-card .fix-label { font: 700 11.5px/1.4 ui-monospace, monospace; text-transform: uppercase; letter-spacing: .08em; }
.pain-card .pain-label { color: var(--rust); }
.pain-card .fix-label { color: var(--sage); }
.pain-card .fix { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.proof-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 1.4rem; }
.proof-strip div { padding: 20px; border-left: 3px solid var(--brand); background: var(--surface); border-radius: 0 8px 8px 0; }
.proof-strip strong { display: block; font: 400 clamp(30px, 3.4vw, 44px)/1.05 Georgia, serif; letter-spacing: -.03em; color: var(--brand); }
.proof-strip span { font-size: 14px; color: var(--ink-secondary); }
.four-col { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.four-col .tier-card { padding: 20px; }
.four-col .tier-price { font-size: 30px; }
.tier-flag { display: inline-block; margin-bottom: 8px; padding: 3px 9px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font: 700 11px/1.5 ui-monospace, monospace; text-transform: uppercase; letter-spacing: .06em; }
.tier-card .btn { text-align: center; justify-content: center; }
.plan-matrix { margin-top: 20px; }
.plan-matrix summary { cursor: pointer; font-weight: 700; padding: 14px 18px; }
.plan-matrix .compare-table tbody th { width: 20%; }
.table-wrap { overflow-x: auto; }
.table-wrap .compare-table { min-width: 720px; }
.fine-print { font-size: 12.5px; color: var(--ink-muted); }
.guide { max-width: 60rem; padding-block: 2.5rem 3rem; }
.guide .eyebrow { margin-bottom: 10px; }
.guide h1 { margin-bottom: 14px; }
.guide h2 { margin: 2.2rem 0 .5rem; font-family: Georgia, serif; font-weight: 400; font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -.03em; line-height: 1.15; }
.guide h3 { margin: 1.2rem 0 .3rem; font-size: 17px; }
.guide p, .guide li { line-height: 1.65; }
.guide .lede { font-size: 18px; color: var(--ink-secondary); max-width: 46rem; }
.guide .answer { padding: 14px 18px; border-left: 3px solid var(--brand); background: var(--surface); border-radius: 0 8px 8px 0; }
.guide .cta-row { margin: 1.4rem 0; }
.guide .card { padding: 20px; }
.guide ol.checklist { padding-left: 1.3rem; }
.guide ol.checklist li { margin-bottom: .7rem; }
.math-box { display: grid; grid-template-columns: 1.1fr .9fr; gap: 0; overflow: hidden; padding: 0 !important; margin: 1.2rem 0; }
.math-box > div { padding: 22px; }
.math-box .math-out { background: linear-gradient(110deg,#14332a,#27503f); color: #fff; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.math-box .math-out span { color: #d3e0cc; font-size: 13.5px; }
.math-box .math-out output { font: 400 clamp(32px, 4vw, 52px)/1.1 Georgia, serif; letter-spacing: -.04em; }
.calc-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.calc-fields label { display: grid; gap: 5px; font-size: 13px; font-weight: 650; }
.calc-fields input[type=number] { width: 100%; padding: 9px; background: var(--canvas); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 4px; font: 600 17px/1.4 ui-monospace, monospace; }
.calc-fields .check { display: flex; align-items: center; gap: 8px; align-self: end; padding-bottom: 10px; }
.calc-results { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 18px; }
.calc-results dt { font-size: 12px; color: #d3e0cc; text-transform: uppercase; letter-spacing: .06em; }
.calc-results dd { margin: 0 0 6px; font: 600 18px/1.3 ui-monospace, monospace; }
.source-note { font-size: 12.5px; color: var(--ink-muted); margin-top: .6rem; }
@media (max-width: 1080px) { .four-col { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .four-col, .proof-strip, .math-box { grid-template-columns: 1fr; }
}

/* Free tools, printable sheets and objection cards */
.hero-next { margin: 12px 0 0; font-size: 14px; color: #e8efe2; max-width: 34rem; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 1.4rem 0; }
.tool-card { display: block; padding: 20px; color: var(--ink); text-decoration: none; }
.tool-card h2, .tool-card h3 { margin: 6px 0; font-size: 22px; font-weight: 400; letter-spacing: -.02em; }
.tool-card p { margin: 0; color: var(--ink-secondary); }
.tool-card:hover, .tool-card:focus-visible { border-color: var(--brand); }
.print-sheet { margin: 1.4rem 0; padding: 24px !important; background: #fff; color: #1b1b1b; }
.print-sheet .sheet-head h2 { margin: 0 0 4px; font-size: 26px; color: #1b1b1b; }
.print-sheet .sheet-head p { margin: 0 0 12px; color: #333; }
.table-scroll { overflow-x: auto; }
.sheet-table { width: 100%; border-collapse: collapse; font-size: 14.5px; color: #1b1b1b; }
.sheet-table th, .sheet-table td { border: 1px solid #9a9a9a; padding: 8px 10px; text-align: left; vertical-align: top; }
.sheet-table thead th { background: #ece7dc; }
.sheet-table .sheet-total th, .sheet-table .sheet-total td { font-weight: 700; border-top: 2px solid #1b1b1b; }
.sheet-compact { font-size: 13px; }
.sheet-compact th, .sheet-compact td { padding: 5px 7px; }
.sheet-grid td { min-width: 3.2rem; }
.sheet-log td { height: 2rem; }
.sheet-notes { margin: 12px 0 0; padding-left: 1.1rem; font-size: 13px; color: #333; line-height: 1.5; }
p.sheet-notes { padding-left: 0; }
.sheet-contact { margin: 10px 0 0; font-weight: 700; }
.sheet-contact:empty { display: none; }
@media (max-width: 700px) {
  /* Field use: every control is big enough for a thumb or a gloved finger. */
  .btn, .btn-sm { min-height: 44px; }
  .site-header .nav-links a { display: inline-flex; align-items: center; min-height: 44px; }
}
@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff !important; color: #000; }
  .guide { max-width: none; padding: 0; }
  .print-sheet { border: 0 !important; box-shadow: none !important; margin: 0; padding: 0 !important; break-after: page; }
  .print-sheet:last-of-type { break-after: auto; }
  .table-scroll { overflow: visible; }
  .sheet-table { font-size: 11.5pt; }
  .sheet-compact { font-size: 9.5pt; }
  .sheet-log td { height: 2.1rem; }
}
@page wide { size: landscape; }
@media print { .print-landscape { page: wide; } }
