/* Stavice landing page layout and components
   Source of truth: docs/LANDING_PAGE_DESIGN_SPEC.md (Sections 3, 4, 5) */

/* =========================================================================
   1. Container, 12-column grid, and vertical datum line
   ========================================================================= */

.stv-container {
  width: 100%;
  max-width: calc(var(--stv-container) + 2 * var(--stv-margin));
  margin-inline: auto;
  padding-inline: var(--stv-margin);
}

.stv-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--stv-gutter);
}

/* Band carrying the vertical datum line between columns 2 and 3 (x=312 at 1440) */
.stv-datum-band {
  position: relative;
}

.stv-datum-band > .stv-container {
  position: relative;
}

.stv-datum-band > .stv-container::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  /* Exact center of the 24px gutter between col 2 and col 3 */
  left: calc(
    var(--stv-margin) +
    ((100% - 2 * var(--stv-margin) - 11 * var(--stv-gutter)) / 12) * 2 +
    var(--stv-gutter) * 1.5
  );
  width: 1px;
  background-color: var(--stv-scribe);
  pointer-events: none;
}

.stv-content-col {
  grid-column: 3 / 13;
}

.stv-margin-col {
  grid-column: 1 / 3;
  text-align: right;
  padding-right: 12px; /* + 12px half-gutter = 24px left of datum line */
}

/* =========================================================================
   2. Header (not sticky)
   ========================================================================= */

.stv-header {
  border-bottom: var(--stv-rule-hair);
  background-color: var(--stv-dial);
}

.stv-header__inner {
  min-height: 72px;
  align-items: center;
}

.stv-header__brand {
  grid-column: 1 / 3;
  display: flex;
  align-items: center;
}

.stv-header__nav-bar {
  grid-column: 3 / 13;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.stv-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.stv-nav__link {
  font-family: var(--stv-font-text);
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: var(--stv-ink);
  text-decoration: none;
  padding: 6px 0;
}

.stv-nav__link:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.stv-nav__link[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.stv-header__cta {
  flex-shrink: 0;
  min-height: 40px;
  padding: 0 20px;
  font-size: 14px;
}

.stv-menu-toggle {
  display: none;
  font-family: var(--stv-font-text);
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: var(--stv-ink);
  min-height: 44px;
  min-width: 44px;
  padding: 0 4px;
  align-items: center;
  justify-content: flex-end;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.stv-mobile-drawer {
  display: none;
  border-top: var(--stv-rule-hair);
  background-color: var(--stv-dial);
}

.stv-mobile-drawer.is-open {
  display: block;
}

.stv-mobile-drawer__list {
  display: flex;
  flex-direction: column;
}

.stv-mobile-drawer__item {
  border-bottom: var(--stv-rule-hair);
}

.stv-mobile-drawer__link {
  display: flex;
  align-items: center;
  min-height: 56px;
  font-weight: 500;
  font-size: 16px;
  text-decoration: none;
}

.stv-mobile-drawer__cta-wrap {
  padding: 16px 0 20px;
}

.stv-mobile-drawer__cta-wrap .stv-btn {
  width: 100%;
}

/* =========================================================================
   3. Hero
   ========================================================================= */

.stv-hero {
  padding-top: var(--stv-space-9);
  padding-bottom: var(--stv-space-8);
}

.stv-hero__title {
  grid-column: 3 / 12;
  max-width: 24ch;
}

.stv-hero__lede {
  grid-column: 3 / 9;
  margin-top: var(--stv-space-5);
  color: var(--stv-ink);
  max-width: 58ch;
}

.stv-hero__actions {
  grid-column: 3 / 13;
  margin-top: var(--stv-space-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--stv-space-4);
}

/* =========================================================================
   4. Centerpiece: Model Integrity Ledger (spans all 12 cols, crosses datum)
   ========================================================================= */

.stv-ledger-section {
  background-color: var(--stv-dial);
}

.stv-ledger-frame {
  border-top: var(--stv-rule-heavy);
  border-bottom: var(--stv-rule-hair);
}

/* Zone A: Head */
.stv-ledger-head {
  padding: 20px 0 18px;
  border-bottom: var(--stv-rule-hair);
}

.stv-ledger-head__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
}

.stv-ledger-head__title-group {
  min-width: 0;
}

.stv-ledger-head__title {
  font-family: var(--stv-font-text);
  font-weight: 600;
  font-size: 20px;
  line-height: 28px;
  letter-spacing: -0.005em;
}

.stv-tally {
  display: flex;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
}

.stv-tally__item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.stv-tally__num {
  font-family: var(--stv-font-data);
  font-weight: 500;
  font-size: 20px;
  line-height: 28px;
  letter-spacing: -0.01em;
}

.stv-tally__label {
  font-family: var(--stv-font-text);
  font-weight: 400;
  font-size: 14px;
  line-height: 22px;
  color: var(--stv-graphite);
}

.stv-tally__item--exception .stv-tally__num,
.stv-tally__item--exception .stv-tally__label {
  color: var(--stv-minium);
}

.stv-ledger-head__desc {
  margin-top: 4px;
  color: var(--stv-graphite);
}

.stv-noscript-note {
  margin-top: 12px;
  padding: 10px 14px;
  background-color: var(--stv-plate);
  border-left: 2px solid var(--stv-ink);
  color: var(--stv-ink);
}

/* Main two-zone body (Zone B left 5 cols, Zone C right 7 cols) */
.stv-ledger-body {
  display: grid;
  grid-template-columns: minmax(0, 5fr) 1px minmax(0, 7fr);
  column-gap: 12px;
  position: relative;
}

.stv-ledger-divider {
  background-color: var(--stv-scribe);
  width: 1px;
  height: 100%;
}

/* Zone B: Specimen */
.stv-specimen-zone {
  padding: 20px 12px 20px 0;
  min-width: 0;
}

.stv-switches-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.stv-switches-intro {
  margin-top: 4px;
  color: var(--stv-graphite);
}

.stv-switches-list {
  margin-top: 12px;
  border-top: var(--stv-rule-hair);
}

.stv-switch-row {
  width: 100%;
  min-height: 56px;
  padding: 10px 0;
  border-bottom: var(--stv-rule-hair);
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 14px;
  align-items: start;
  text-align: left;
  background-color: transparent;
}

.stv-switch-row:hover {
  background-color: var(--stv-plate);
}

.stv-switch-track {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 24px;
  margin-top: 1px;
  border: 1px solid var(--stv-graphite);
  background-color: transparent;
  flex-shrink: 0;
}

.stv-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background-color: var(--stv-graphite);
}

.stv-switch-row[aria-checked="true"] .stv-switch-track {
  border-color: var(--stv-ink);
  background-color: var(--stv-ink);
}

.stv-switch-row[aria-checked="true"] .stv-switch-thumb {
  left: auto;
  right: 3px;
  background-color: var(--stv-dial);
}

.stv-switch-title {
  display: block;
  font-weight: 500;
  font-size: 15px;
  line-height: 20px;
  color: var(--stv-ink);
}

.stv-switch-desc {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  line-height: 18px;
  color: var(--stv-graphite);
}

.stv-restore-wrap {
  margin-top: 8px;
  min-height: 28px;
}

.stv-restore-wrap[hidden] {
  display: none;
}

/* Sheet tabs + formula bar + grid */
.stv-sheet-block {
  margin-top: 20px;
}

.stv-sheet-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: var(--stv-rule-hair);
}

.stv-tabs {
  display: flex;
  gap: 20px;
}

.stv-tab {
  font-family: var(--stv-font-text);
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: var(--stv-graphite);
  padding: 8px 0 9px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
}

.stv-tab:hover {
  color: var(--stv-ink);
}

.stv-tab[aria-selected="true"] {
  color: var(--stv-ink);
  border-bottom-color: var(--stv-ink);
}

.stv-unit-note {
  color: var(--stv-graphite);
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
}

.stv-formula-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 32px;
  padding: 4px 10px;
  background-color: var(--stv-plate);
  border-bottom: var(--stv-rule-hair);
  overflow-x: auto;
}

.stv-formula-bar__addr {
  flex-shrink: 0;
  min-width: 66px;
}

.stv-formula-bar__expr {
  color: var(--stv-ink);
  white-space: nowrap;
}

.stv-specimen-scroll {
  overflow-x: auto;
}

.stv-specimen-table {
  width: 100%;
  min-width: 440px;
  table-layout: fixed;
}

.stv-specimen-table th,
.stv-specimen-table td {
  height: var(--stv-row);
  padding: 4px 4px;
  border-bottom: 1px solid var(--stv-plate);
  vertical-align: middle;
}

.stv-specimen-table thead th {
  background-color: var(--stv-plate);
  border-bottom: var(--stv-rule-firm);
  font-family: var(--stv-font-data);
  font-weight: 500;
  font-size: 12px;
  line-height: 18px;
  color: var(--stv-ink);
}

.stv-specimen-table th.col-row,
.stv-specimen-table td.col-row {
  width: 26px;
  text-align: right;
  padding-right: 6px;
  color: var(--stv-graphite);
  font-family: var(--stv-font-data);
  font-size: 11px;
}

.stv-specimen-table th.col-label,
.stv-specimen-table td.col-label {
  width: 136px;
  text-align: left;
  font-family: var(--stv-font-text);
  font-size: 12.5px;
  line-height: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stv-specimen-table th.col-period,
.stv-specimen-table td.col-period {
  width: 56px;
  text-align: right;
  padding: 0;
}

.stv-specimen-table tr.is-total td,
.stv-specimen-table tr.is-total th {
  border-top: var(--stv-rule-firm);
}

.stv-specimen-table tr.is-total .col-label {
  font-weight: 500;
}

.stv-cell-btn {
  display: block;
  width: 100%;
  height: 28px;
  padding: 0 5px;
  text-align: right;
  font-family: var(--stv-font-data);
  font-weight: 400;
  font-size: 12.5px;
  line-height: 28px;
  color: var(--stv-ink);
  border: 2px solid transparent;
}

.stv-cell-btn:hover {
  background-color: var(--stv-plate);
}

.stv-specimen-table tr.is-total .stv-cell-btn {
  font-weight: 500;
}

.stv-cell-btn.is-moved {
  font-weight: 500;
}

.stv-cell-btn.is-selected {
  outline: 1px solid var(--stv-ink);
  outline-offset: -1px;
  background-color: var(--stv-plate);
}

.stv-cell-btn.is-finding {
  border: 2px solid var(--stv-minium);
  color: var(--stv-minium);
  font-weight: 500;
}

.stv-specimen-key {
  margin-top: 10px;
  color: var(--stv-graphite);
  font-size: 12.5px;
  line-height: 18px;
}

/* Zone C: Ledger (32 checks) */
.stv-ledger-zone {
  padding: 20px 0 20px 12px;
  min-width: 0;
  position: relative;
}

.stv-ledger-zone__bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.stv-filter-group {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  border: 0;
  padding: 0;
  margin: 0;
}

.stv-filter-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 20px;
  color: var(--stv-graphite);
  cursor: pointer;
}

.stv-filter-opt input[type="radio"] {
  accent-color: var(--stv-ink);
  width: 14px;
  height: 14px;
  margin: 0;
}

.stv-filter-opt:has(input:checked) {
  color: var(--stv-ink);
  font-weight: 500;
}

.stv-ledger-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
  position: relative;
}

.stv-ledger-subhead {
  font-family: var(--stv-font-text);
  font-weight: 500;
  font-size: 13px;
  line-height: 20px;
  padding: 6px 0;
  border-top: var(--stv-rule-hair);
  border-bottom: var(--stv-rule-firm);
  background-color: var(--stv-plate);
  padding-inline: 6px;
  display: flex;
  justify-content: space-between;
}

.stv-ledger-table {
  width: 100%;
  table-layout: fixed;
}

.stv-ledger-table td {
  padding: 0;
  border-bottom: 1px solid var(--stv-plate);
}

.stv-check-row {
  width: 100%;
  min-height: 28px;
  padding: 4px 6px 4px 8px;
  border-left: 2px solid transparent;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 12px 76px;
  column-gap: 6px;
  align-items: center;
  text-align: left;
  background-color: transparent;
}

.stv-check-row:hover {
  background-color: var(--stv-plate);
}

.stv-check-row[aria-pressed="true"] {
  background-color: var(--stv-plate);
  border-left-color: var(--stv-ink);
}

.stv-check-row.is-exception {
  color: var(--stv-minium);
}

.stv-check-row.is-exception[aria-pressed="true"] {
  border-left-color: var(--stv-minium);
}

.stv-check-id {
  font-family: var(--stv-font-data);
  font-weight: 500;
  font-size: 12.5px;
  line-height: 18px;
}

.stv-check-name {
  font-family: var(--stv-font-text);
  font-weight: 400;
  font-size: 12.5px;
  line-height: 16px;
  color: var(--stv-ink);
}

.stv-check-row.is-exception .stv-check-name {
  color: var(--stv-minium);
  font-weight: 500;
}

.stv-check-mark {
  width: 12px;
  height: 12px;
  display: block;
  flex-shrink: 0;
}

.stv-check-status {
  font-family: var(--stv-font-text);
  font-size: 12px;
  line-height: 16px;
  text-align: right;
  color: var(--stv-graphite);
  white-space: nowrap;
}

.stv-check-row.is-exception .stv-check-status {
  color: var(--stv-minium);
  font-weight: 500;
}

.stv-check-row.is-not-tested .stv-check-status {
  color: var(--stv-graphite);
}

.stv-ledger-empty {
  padding: 20px 8px;
  color: var(--stv-graphite);
  border-bottom: var(--stv-rule-hair);
}

/* Mark legend seated in the 4 spare rows below Financial */
.stv-mark-legend {
  margin-top: 16px;
  padding: 12px 8px;
  border-top: var(--stv-rule-hair);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stv-mark-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 18px;
  color: var(--stv-graphite);
}

/* Mobile-only exception & disclosure wrapper */
.stv-mobile-ledger {
  display: none;
}

/* The single orchestrated motion: 320ms linear Ink scan line */
.ledger-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background-color: var(--stv-ink);
  pointer-events: none;
  z-index: 5;
  animation: stv-scan var(--stv-scan) both;
}

@keyframes stv-scan {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(var(--ledger-height, 520px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .ledger-scan {
    display: none;
  }
}

/* Zone D: Finding strip */
.stv-finding-strip {
  padding: 16px 0;
  border-top: var(--stv-rule-hair);
  background-color: var(--stv-dial);
  min-height: 104px;
}

.stv-finding-strip__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.stv-finding-strip__title {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.stv-finding-strip__id {
  font-family: var(--stv-font-data);
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
}

.stv-finding-strip.is-exception .stv-finding-strip__id {
  color: var(--stv-minium);
}

.stv-finding-strip__name {
  font-weight: 600;
  font-size: 15px;
  line-height: 22px;
}

.stv-finding-pager {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stv-finding-pager--inline {
  margin-bottom: 8px;
}

.stv-muted {
  color: var(--stv-graphite);
}

.is-minium {
  color: var(--stv-minium);
}

.stv-finding-fields {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.stv-finding-field {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.stv-finding-field__k {
  font-size: 13px;
  line-height: 20px;
  color: var(--stv-graphite);
}

.stv-finding-field__v {
  font-family: var(--stv-font-data);
  font-weight: 500;
  font-size: 13px;
  line-height: 20px;
  color: var(--stv-ink);
}

.stv-finding-field--diff .stv-finding-field__v {
  color: var(--stv-minium);
}

.stv-finding-note {
  margin-top: 8px;
  font-size: 14px;
  line-height: 22px;
  color: var(--stv-ink);
  max-width: 82ch;
}

/* Zone E: Foot */
.stv-ledger-foot {
  padding: 18px 0 22px;
  border-top: var(--stv-rule-hair);
}

.stv-reading-line {
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  color: var(--stv-ink);
  max-width: 72ch;
}

.stv-hash-line {
  margin-top: 8px;
  color: var(--stv-graphite);
  word-break: break-word;
}

.stv-hash-val {
  color: var(--stv-ink);
  font-family: var(--stv-font-data);
  font-weight: 500;
}

.stv-evidence-line {
  margin-top: 6px;
  color: var(--stv-graphite);
}

.stv-ledger-foot__bottom {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.stv-ledger-foot__actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.stv-ledger-disclaimer {
  color: var(--stv-graphite);
  max-width: 60ch;
}

.stv-selftest-fail {
  padding: 32px 0;
  color: var(--stv-minium);
  font-weight: 500;
}

/* =========================================================================
   5. Sections 1, 2, 3 (numbered in left margin along the datum line)
   ========================================================================= */

.stv-section {
  padding-top: var(--stv-space-9);
  padding-bottom: var(--stv-space-9);
}

.stv-section--compact-bottom {
  padding-bottom: var(--stv-space-8);
}

.stv-section__intro {
  margin-top: var(--stv-space-5);
}

.stv-inline-clause {
  display: none;
  font-family: var(--stv-font-data);
  font-weight: 500;
  font-size: 14px;
  color: var(--stv-graphite);
  margin-right: 10px;
}

/* Section 1: Ruled schedule for the three instruments */
.stv-schedule {
  width: 100%;
  margin-top: var(--stv-space-7);
}

.stv-schedule thead th {
  background-color: var(--stv-plate);
  border-top: var(--stv-rule-hair);
  border-bottom: var(--stv-rule-heavy);
  padding: 12px 16px 12px 0;
  text-align: left;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: var(--stv-ink);
}

.stv-schedule thead th:first-child {
  padding-left: 8px;
}

.stv-schedule thead th:last-child {
  padding-right: 8px;
}

.stv-schedule tbody tr {
  border-bottom: var(--stv-rule-hair);
}

.stv-schedule tbody td {
  padding: 32px 24px 32px 0;
  vertical-align: top;
}

.stv-schedule tbody td:first-child {
  padding-left: 8px;
  width: 8%;
}

.stv-schedule tbody td:nth-child(2) {
  width: 28%;
}

.stv-schedule tbody td:nth-child(3) {
  width: 44%;
}

.stv-schedule tbody td:last-child {
  width: 20%;
  padding-right: 0;
}

.stv-schedule__num {
  font-family: var(--stv-font-data);
  font-weight: 500;
  font-size: 14px;
  line-height: 28px;
  color: var(--stv-graphite);
}

.stv-schedule__evidence {
  margin-top: 12px;
  color: var(--stv-ink);
}

.stv-schedule__link-wrap {
  margin-top: 16px;
}

.stv-schedule__link {
  font-weight: 500;
  font-size: 15px;
  line-height: 22px;
}

.stv-schedule__note {
  margin-top: 12px;
  color: var(--stv-graphite);
}

/* Section 2: Method and data privacy */
.stv-steps {
  margin-top: var(--stv-space-7);
  padding-top: var(--stv-space-5);
  border-top: var(--stv-rule-hair);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--stv-gutter);
}

.stv-step__num {
  display: block;
  font-family: var(--stv-font-data);
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: var(--stv-graphite);
  margin-bottom: 10px;
}

.stv-step__body {
  margin-top: 10px;
  font-size: 15px;
  line-height: 24px;
  color: var(--stv-ink);
}

.stv-prop-table {
  width: 100%;
  margin-top: var(--stv-space-7);
}

.stv-prop-table thead th {
  background-color: var(--stv-plate);
  border-top: var(--stv-rule-hair);
  border-bottom: var(--stv-rule-heavy);
  padding: 12px 16px 12px 8px;
  text-align: left;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
}

.stv-prop-table tbody tr {
  border-bottom: var(--stv-rule-hair);
}

.stv-prop-table tbody th,
.stv-prop-table tbody td {
  padding: 14px 16px 14px 8px;
  text-align: left;
  vertical-align: top;
  font-weight: 400;
}

.stv-prop-table tbody th {
  width: 38%;
  color: var(--stv-graphite);
  font-weight: 500;
}

/* Section 3: Founder anchor */
.stv-credentials {
  margin-top: var(--stv-space-4);
  color: var(--stv-graphite);
}

.stv-record-list {
  margin-top: var(--stv-space-6);
  border-top: var(--stv-rule-hair);
}

.stv-record-row {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 7fr);
  column-gap: var(--stv-gutter);
  padding: 18px 0;
  border-bottom: var(--stv-rule-hair);
  align-items: baseline;
}

.stv-record-row__fig {
  font-family: var(--stv-font-data);
  font-weight: 500;
  font-size: 20px;
  line-height: 28px;
  letter-spacing: -0.01em;
  color: var(--stv-ink);
}

.stv-record-row__text {
  font-size: 16px;
  line-height: 26px;
  color: var(--stv-ink);
}

.stv-founder-link {
  display: inline-block;
  margin-top: var(--stv-space-6);
  font-weight: 500;
}

/* =========================================================================
   6. Section 4: Institutional inquiries (full-bleed Plate band)
   ========================================================================= */

.stv-inquiries {
  background-color: var(--stv-plate);
  padding-top: var(--stv-space-8);
  padding-bottom: var(--stv-space-8);
}

.stv-inquiries__note {
  margin-top: var(--stv-space-4);
  color: var(--stv-graphite);
  max-width: var(--stv-measure);
}

.stv-inquiries__cta {
  margin-top: var(--stv-space-6);
}

/* =========================================================================
   7. Footer (full-bleed Ink ground)
   ========================================================================= */

.stv-footer {
  background-color: var(--stv-ink);
  color: var(--stv-dial);
  padding-top: var(--stv-space-8);
  padding-bottom: var(--stv-space-7);
}

.stv-footer a {
  color: var(--stv-dial);
  text-decoration: none;
}

.stv-footer a:visited {
  color: var(--stv-dial);
}

.stv-footer a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.stv-footer :focus-visible {
  outline: 2px solid var(--stv-dial);
  outline-offset: 2px;
}

.stv-footer__id {
  grid-column: 1 / 3;
}

.stv-footer__meta {
  margin-top: 14px;
  color: var(--stv-plate);
  font-size: 14px;
  line-height: 22px;
}

.stv-footer__cols {
  grid-column: 3 / 13;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--stv-gutter);
}

.stv-footer__col-head {
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: var(--stv-plate);
  margin-bottom: 12px;
}

.stv-footer__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stv-footer__list a {
  font-size: 14px;
  line-height: 22px;
}

.stv-footer__legal {
  grid-column: 3 / 13;
  margin-top: var(--stv-space-7);
  padding-top: var(--stv-space-5);
  border-top: 1px solid var(--stv-scribe);
  color: var(--stv-scribe);
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 72ch;
}

/* =========================================================================
   8. Sub-page utilities (/about, /tools/*, /privacy, /terms, /disclaimer)
   ========================================================================= */

.stv-sub-hero {
  padding-top: var(--stv-space-8);
  padding-bottom: var(--stv-space-7);
  border-bottom: var(--stv-rule-hair);
}

.stv-prose-stack > * + * {
  margin-top: var(--stv-space-4);
}

.stv-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  margin-top: 24px;
}

.stv-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stv-input,
.stv-select,
.stv-textarea {
  min-height: 44px;
  padding: 8px 12px;
  background-color: var(--stv-dial);
  border: 1px solid var(--stv-graphite);
  color: var(--stv-ink);
  font-family: var(--stv-font-data);
  font-size: 14px;
}

.stv-textarea {
  min-height: 140px;
  font-family: var(--stv-font-data);
  line-height: 22px;
  resize: vertical;
}

.stv-input:focus,
.stv-select:focus,
.stv-textarea:focus {
  outline: 2px solid var(--stv-ink);
  outline-offset: 2px;
  border-color: var(--stv-ink);
}

/* =========================================================================
   9. Responsive breakpoints (1024, 768, 390)
   ========================================================================= */

@media (max-width: 1279px) {
  :root {
    --stv-margin: 48px;
  }

  .stv-nav {
    gap: 20px;
  }
}

@media (max-width: 1023px) {
  :root {
    --stv-margin: 32px;
    --stv-gutter: 20px;
  }

  .stv-datum-band > .stv-container::before {
    display: none;
  }

  .stv-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .stv-header__inner {
    min-height: 56px;
  }

  .stv-header__brand {
    grid-column: 1 / 6;
  }

  .stv-header__nav-bar {
    display: none;
  }

  .stv-menu-toggle {
    display: inline-flex;
    grid-column: 6 / 9;
    justify-self: end;
  }

  .stv-margin-col {
    display: none;
  }

  .stv-inline-clause {
    display: inline;
  }

  .stv-content-col,
  .stv-hero__title,
  .stv-hero__lede,
  .stv-hero__actions,
  .stv-footer__id,
  .stv-footer__cols,
  .stv-footer__legal {
    grid-column: 1 / 9;
  }

  .stv-ledger-body {
    display: flex;
    flex-direction: column;
    column-gap: 0;
  }

  .stv-ledger-divider {
    display: none;
  }

  .stv-specimen-zone {
    display: contents;
  }

  .stv-switches-block {
    order: 1;
    padding: 20px 0;
    border-bottom: var(--stv-rule-hair);
  }

  .stv-ledger-zone {
    order: 2;
    padding: 20px 0;
    border-bottom: var(--stv-rule-hair);
  }

  .stv-sheet-block {
    order: 3;
    margin-top: 0;
    padding: 20px 0;
  }

  /* Switch to mobile stacked ledger below 1024px */
  .stv-desktop-ledger {
    display: none;
  }

  .stv-mobile-ledger {
    display: block;
  }

  .stv-mobile-group {
    border-top: var(--stv-rule-hair);
  }

  .stv-mobile-group__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 8px 0;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    list-style: none;
  }

  .stv-mobile-group__summary::-webkit-details-marker {
    display: none;
  }

  .stv-mobile-group__action {
    font-size: 13px;
    color: var(--stv-graphite);
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .stv-mobile-group .stv-check-row {
    min-height: 44px;
    grid-template-columns: 38px minmax(0, 1fr) 12px;
    padding: 8px 4px 8px 8px;
  }

  .stv-mobile-inline-finding {
    padding: 12px 12px 14px 14px;
    background-color: var(--stv-plate);
    border-left: 2px solid var(--stv-ink);
    border-bottom: var(--stv-rule-hair);
  }

  .stv-mobile-inline-finding.is-exception {
    border-left-color: var(--stv-minium);
  }

  .stv-mobile-inline-finding dl {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 6px 12px;
    margin-bottom: 8px;
  }

  .stv-mobile-inline-finding dt {
    font-size: 13px;
    color: var(--stv-graphite);
  }

  .stv-mobile-inline-finding dd {
    font-family: var(--stv-font-data);
    font-weight: 500;
    font-size: 13px;
  }

  /* Hide desktop finding strip on narrow viewports where finding shows inline */
  .stv-finding-strip {
    display: none;
  }

  .stv-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 32px;
  }

  .stv-footer__cols {
    margin-top: 32px;
  }
}

@media (max-width: 767px) {
  :root {
    --stv-margin: 20px;
    --stv-gutter: 16px;
  }

  .stv-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .stv-header__brand {
    grid-column: 1 / 4;
  }

  .stv-menu-toggle {
    grid-column: 4 / 5;
  }

  .stv-content-col,
  .stv-hero__title,
  .stv-hero__lede,
  .stv-hero__actions,
  .stv-footer__id,
  .stv-footer__cols,
  .stv-footer__legal {
    grid-column: 1 / 5;
  }

  .stv-hero {
    padding-top: var(--stv-space-8);
    padding-bottom: var(--stv-space-7);
  }

  .stv-hero__actions {
    flex-direction: column;
  }

  .stv-hero__actions .stv-btn {
    width: 100%;
  }

  .stv-section {
    padding-top: var(--stv-space-8);
    padding-bottom: var(--stv-space-8);
  }

  .stv-tally {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
    width: 100%;
    margin-top: 12px;
  }

  /* Responsive stacked schedule table */
  .stv-schedule thead {
    display: none;
  }

  .stv-schedule tbody {
    display: block;
    width: 100%;
  }

  .stv-schedule tbody tr {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 12px;
    align-items: baseline;
    padding: 24px 0;
    border-top: var(--stv-rule-hair);
    border-bottom: 0;
  }

  .stv-schedule tbody tr:last-child {
    border-bottom: var(--stv-rule-hair);
  }

  .stv-schedule tbody td {
    display: block;
    width: auto !important;
    padding: 0;
  }

  .stv-schedule tbody td:first-child {
    grid-column: 1;
    padding-left: 0;
  }

  .stv-schedule tbody td:nth-child(2) {
    grid-column: 2;
  }

  .stv-schedule tbody td:nth-child(3) {
    grid-column: 1 / -1;
    margin-top: 12px;
  }

  .stv-schedule tbody td:last-child {
    grid-column: 1 / -1;
    margin-top: 12px;
    font-weight: 500;
  }

  /* Responsive steps & property table */
  .stv-steps {
    grid-template-columns: 1fr;
    row-gap: 28px;
  }

  .stv-prop-table thead {
    display: none;
  }

  .stv-prop-table tbody,
  .stv-prop-table tr,
  .stv-prop-table th,
  .stv-prop-table td {
    display: block;
    width: 100%;
    padding: 0;
  }

  .stv-prop-table tbody tr {
    padding: 14px 0;
    border-top: var(--stv-rule-hair);
    border-bottom: 0;
  }

  .stv-prop-table tbody tr:last-child {
    border-bottom: var(--stv-rule-hair);
  }

  .stv-prop-table tbody td {
    margin-top: 4px;
  }

  /* Founder record rows */
  .stv-record-row {
    grid-template-columns: 1fr;
    row-gap: 4px;
  }

  .stv-ledger-foot__bottom .stv-btn,
  .stv-inquiries__cta .stv-btn {
    width: 100%;
  }

  .stv-footer__cols {
    grid-template-columns: 1fr;
    row-gap: 28px;
  }

  .stv-input-grid {
    grid-template-columns: 1fr;
  }
}
