/* cattlemarketpulse.com — the sale-sheet look.
   Light, daylight-legible, ledger-ruled; serif masthead over tabular figures.
   One stylesheet, no framework. Big type on purpose: read in a truck cab. */

:root {
  --paper: #FCFBF7;   /* warm sale-sheet white */
  --ink:   #20261F;   /* green-cast reading black */
  --pen:   #175136;   /* stockyard green — brand, links */
  --gain:  #1D7A46;   /* up vs last sale */
  --rust:  #A84B2A;   /* down vs last sale (barn-metal rust, not alarm red) */
  --fence: #E3DFD2;   /* ruled ledger lines */
  --dust:  #676D64;   /* secondary text */
  --field: #F3F1E8;   /* tinted panels (receipts, comments) */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
}
.wrap { max-width: 900px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 8px; padding-bottom: 48px; }

a { color: var(--pen); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--pen); color: #fff; padding: 8px 14px; }
.skip:focus { left: 8px; z-index: 10; }

/* ---- masthead ---- */
.masthead { border-bottom: 3px double var(--ink); background: var(--paper); }
.masthead-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 12px; flex-wrap: wrap; }
.wordmark {
  font-family: var(--serif);
  font-size: 1.45rem; font-weight: 700; letter-spacing: .02em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 10px;
}
.logo { width: 34px; height: 34px; }
.cta-icon { width: 48px; height: 48px; border-radius: 11px; border: 1px solid var(--fence); flex: 0 0 auto; }
.hero-appicon { width: 90px; height: 90px; border-radius: 20px; border: 1px solid var(--fence); display: block; margin-bottom: 14px; }
.wordmark span { color: var(--pen); }
.masthead nav { display: flex; gap: 20px; align-items: baseline; }
.masthead nav a { text-decoration: none; font-size: .97rem; color: var(--ink); }
.masthead nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }
.nav-cta { color: #fff !important; background: var(--pen); padding: 7px 14px; border-radius: 4px; font-weight: 600; }

/* ---- headings & hero ---- */
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .35em; }
h1 { font-size: clamp(1.9rem, 4.6vw, 2.7rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; }
.hero { padding: 34px 0 10px; }
.hero .lede { font-size: 1.12rem; max-width: 46em; color: var(--ink); margin: .4em 0 0; }
.eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--pen); margin: 0 0 10px;
}
.section-label {
  font-family: var(--sans); font-size: .82rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--dust);
  border-bottom: 1px solid var(--fence); padding-bottom: 6px; margin: 36px 0 12px;
}

/* ---- the date stamp (signature element) ---- */
.stamp {
  display: inline-block; font-family: var(--mono); font-size: .82rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--pen);
  border: 1.5px solid var(--pen); border-radius: 3px; padding: 4px 10px;
  transform: rotate(-.6deg); background: transparent; margin: 6px 0 2px;
}
.report-head { padding: 30px 0 6px; }
.report-head .locale { color: var(--dust); margin: 2px 0 8px; font-size: 1.02rem; }
.report-head .headfacts { margin: 10px 0 0; color: var(--ink); font-size: 1.02rem; }
.report-head .headfacts strong { font-size: 1.15rem; }

/* ---- lists ---- */
.report-list { list-style: none; margin: 0; padding: 0; }
.report-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 9px 2px; border-bottom: 1px solid var(--fence); flex-wrap: wrap;
}
.report-list a { font-weight: 600; text-decoration: none; }
.report-list a:hover { text-decoration: underline; }
.report-list-meta { color: var(--dust); font-size: .93rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

.state-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 22px; }
.state-grid li { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--fence); padding: 7px 2px; }
.state-grid a { text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 9px; }
.state-grid a:hover { text-decoration: underline; }
.state-grid .count { color: var(--dust); font-size: .9rem; font-variant-numeric: tabular-nums; }

/* State silhouettes — the app's own shapes, tinted stockyard green via mask
   (the SVGs stay black; CSS owns the color). Decorative: aria-hidden. */
.state-ico {
  display: inline-block; width: 22px; height: 22px; flex: 0 0 auto;
  background: var(--pen);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
.state-ico-hero { width: 44px; height: 44px; display: block; margin-bottom: 10px; }
.state-ico-video {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 6a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2Zm20 1.5v9l-5-3.2v-2.6Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 6a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2Zm20 1.5v9l-5-3.2v-2.6Z'/%3E%3C/svg%3E");
}

/* ---- benchmark strip: the numbers a price-seeker came for ---- */
.bench {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px 30px;
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--fence);
  padding: 16px 2px 14px; margin: 20px 0 6px;
}
.bench-item { display: flex; flex-direction: column; gap: 2px; }
.bench-label { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dust); }
.bench-price { font-family: var(--serif); font-weight: 700; font-size: 1.9rem; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.bench-price small { font-family: var(--sans); font-weight: 400; font-size: .95rem; color: var(--dust); margin-left: 2px; }
.bench-sub { font-size: .9rem; color: var(--dust); font-variant-numeric: tabular-nums; }
.bench-sub .up, .bench-sub .down, .bench-sub .flat { font-family: var(--mono); font-size: .85rem; font-weight: 600; }

/* ---- data tables (the report body) ---- */
.tablewrap { overflow-x: auto; }
/* Wide tables (age/stage/dressing columns) can overflow on phones; the hint
   is server-set so it needs no JS and never shows for tables that fit. */
.tablewrap.wide { position: relative; }
.tablewrap.wide::before {
  content: "swipe for more →"; display: none;
  font-size: .75rem; color: var(--dust); letter-spacing: .04em;
  position: sticky; left: 0; float: right;
}
@media (max-width: 700px) { .tablewrap.wide::before { display: block; } }
table.quotes { border-collapse: collapse; width: 100%; margin: 4px 0 20px; font-variant-numeric: tabular-nums; }
table.quotes caption { text-align: left; font-family: var(--serif); font-weight: 700; font-size: 1.06rem; padding: 10px 0 6px; }
table.quotes caption .unit { font-family: var(--sans); font-weight: 400; color: var(--dust); font-size: .88rem; }
table.quotes th {
  font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--dust); text-align: right; padding: 4px 10px; border-bottom: 2px solid var(--ink);
}
table.quotes th:first-child, table.quotes td:first-child { text-align: left; padding-left: 2px; }
table.quotes td { text-align: right; padding: 7px 10px; border-bottom: 1px solid var(--fence); }
/* The biggest run in each class — "the market" — gets the one emphasis. */
table.quotes tr.lead td { background: var(--field); }
table.quotes tr.lead td:first-child { box-shadow: inset 3px 0 0 var(--pen); }
table.quotes td.avg { font-weight: 700; }
td.delta { font-family: var(--mono); font-size: .88rem; white-space: nowrap; }
.up { color: var(--gain); } .down { color: var(--rust); } .flat { color: var(--dust); }
.tags { color: var(--dust); font-size: .82rem; }

/* receipts strip */
table.receipts { border-collapse: collapse; width: 100%; margin: 8px 0 4px; font-variant-numeric: tabular-nums; }
table.receipts th { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--dust); text-align: right; padding: 4px 10px; border-bottom: 2px solid var(--ink); }
table.receipts td { text-align: right; padding: 6px 10px; border-bottom: 1px solid var(--fence); }
table.receipts th:first-child, table.receipts td:first-child { text-align: left; padding-left: 2px; }
table.receipts td.now { font-weight: 700; }

/* commentary & insight */
.insight {
  border-left: 4px solid var(--pen); background: var(--field);
  padding: 12px 16px; margin: 18px 0; font-size: 1.05rem;
}
.insight .whom { display: block; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--dust); margin-top: 6px; }
.comments { background: var(--field); border: 1px solid var(--fence); border-radius: 4px; padding: 14px 16px; margin: 10px 0; }
.comments p { margin: .4em 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; padding: 0; list-style: none; }
.chips li { border: 1px solid var(--fence); border-radius: 999px; padding: 4px 12px; font-size: .88rem; background: #fff; }
.chips .dir { font-weight: 700; }

/* sparkline */
.spark { margin: 8px 0 4px; }
.spark svg { width: 100%; height: auto; display: block; }
.spark-caption { color: var(--dust); font-size: .85rem; margin: 4px 0 0; }

/* breadcrumbs */
.crumbs { font-size: .9rem; color: var(--dust); margin: 18px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs li + li::before { content: "›"; margin: 0 6px; color: var(--dust); }
.crumbs a { color: var(--dust); }

/* explainer accordions */
details.explain { border-top: 1px solid var(--fence); padding: 10px 2px; }
details.explain:last-of-type { border-bottom: 1px solid var(--fence); }
details.explain summary { font-weight: 600; cursor: pointer; }
details.explain p { color: var(--ink); margin: 8px 0 4px; max-width: 60em; }

/* ---- CTA ---- */
.cta {
  border: 2px solid var(--pen); border-radius: 6px; background: #fff;
  padding: 18px 20px; margin: 34px 0;
  display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.cta-copy { flex: 1 1 320px; }
.cta-heading { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; margin: 0 0 4px; }
.cta-note { margin: 0; color: var(--dust); font-size: .97rem; }
.cta-form { flex: 1 1 300px; }
.cta-label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.cta-row { display: flex; gap: 8px; flex-wrap: wrap; }
.cta-row input[type="email"] {
  flex: 1 1 180px; font: inherit; padding: 10px 12px;
  border: 1.5px solid var(--ink); border-radius: 4px; background: var(--paper);
}
.button {
  font: inherit; font-weight: 700; color: #fff; background: var(--pen);
  border: none; border-radius: 4px; padding: 10px 18px; cursor: pointer;
  text-decoration: none; display: inline-block;
}
.button:hover { background: #0F3D28; }
.hp { position: absolute !important; left: -9999px !important; height: 1px; overflow: hidden; }

.search-form { display: flex; gap: 8px; margin: 10px 0 6px; max-width: 560px; }
.search-form input[type="search"] {
  flex: 1 1 auto; font: inherit; padding: 10px 14px;
  border: 1.5px solid var(--ink); border-radius: 4px; background: #fff;
}

.notice { border: 1.5px solid var(--fence); border-radius: 6px; padding: 4px 18px; margin: 18px 0; background: #fff; }
.notice-ok { border-color: var(--gain); }
.notice-archive { border-color: var(--fence); background: var(--field); }

/* ---- prose & footer ---- */
.prose { max-width: 46em; }
.prose h2 { margin-top: 1.4em; }
.prose li { margin: .35em 0; }
.policy h1 { font-size: 1.9rem; margin-top: 34px; }
.policy h2 { font-size: 1.2rem; }
.policy table { border-collapse: collapse; }
.policy td, .policy th { border: 1px solid var(--fence); padding: 6px 10px; text-align: left; }

.strip { margin-top: 8px; }

.footer { border-top: 3px double var(--ink); margin-top: 30px; padding: 26px 0 40px; font-size: .93rem; }
.footer-states { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px 18px; margin-bottom: 22px; }
.footer-states a { text-decoration: none; color: var(--pen); }
.footer-states a:hover { text-decoration: underline; }
.footer-meta nav { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; }
.attribution, .copyright { color: var(--dust); margin: 6px 0; max-width: 60em; }

/* nearby markets */
.nearby { list-style: none; margin: 0; padding: 0; }
.nearby li { display: flex; justify-content: space-between; gap: 14px; padding: 8px 2px; border-bottom: 1px solid var(--fence); flex-wrap: wrap; }
.nearby .dist { color: var(--dust); font-size: .9rem; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* archive year groups */
.year-label { font-family: var(--serif); font-size: 1.15rem; margin: 26px 0 6px; }
.date-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 22px; }
.date-grid li { display: flex; justify-content: space-between; border-bottom: 1px solid var(--fence); padding: 6px 2px; font-variant-numeric: tabular-nums; }
.date-grid a { text-decoration: none; font-weight: 600; }
.date-grid a:hover { text-decoration: underline; }
.date-grid .heads { color: var(--dust); font-size: .9rem; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.nowrap { white-space: nowrap; }
.table-help { font-size: .9rem; margin: 2px 0 0; }
.to-top { text-align: right; font-size: .85rem; margin: -8px 0 0; }
.to-top a { color: var(--dust); text-decoration: none; }
.to-top a:hover { color: var(--pen); text-decoration: underline; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  table.quotes th, table.quotes td { padding: 6px 6px; }
  .cta { padding: 16px; }
  /* The 6-column table fits a phone exactly; the ≈ $/hd estimate is the one
     to yield — phones still get per-head math in the benchmark strip. */
  .hd-col { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
