/* The home page of business.otrecord.news (otr_biz/sections/home.py), in On the record's manner
   (bizsite/DESIGN.md): white page, 5px ink rules opening sections, 1px rail rows, square corners,
   weights 400/600/800. Everything is scoped to .hp; tokens are set here so the page holds its look
   whatever state the shared stylesheet is in. */

.hp {
  --ink: #000; --paper: #fff; --cite: #1F48B8; --quiet: #6B6B6B; --rail: #E9E9E6; --faint: #CFCFCA; --wash: #F4F4F1;
  --hl: #FFE45C; --up: #0B6B2E; --up-bg: #E3F4E8; --down: #B00020; --down-bg: #FBE5E8;
  line-height: 1.5; padding-bottom: 40px;
}
.hp :is(h2, h3) { margin: 0; }
.hp small { font-size: inherit; }
.hp .chg.up { color: var(--up); }
.hp .chg.down { color: var(--down); }
.hp :is(h1, h2, h3, b, .hp-dn, td, .v, .hp-px, .hp-pct, .hp-dw) { font-variant-numeric: tabular-nums; }
.hp a { text-underline-offset: 3px; }

/* ---------- section heads ---------- */
.hp-s { border-top: 5px solid var(--ink); padding-top: 14px; margin-bottom: 56px; }
.hp-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.hp-h h2 { font-size: clamp(32px, 3.6vw, 48px); line-height: 1; letter-spacing: -0.045em; font-weight: 800; }
.hp-all { font-size: 15px; font-weight: 800; text-decoration: underline; text-decoration-thickness: 1px; white-space: nowrap; }
.hp-all:hover { text-decoration-thickness: 2px; }
.hp-sub { margin: 8px 0 20px; font-size: 16px; color: var(--quiet); max-width: 70ch; }
.hp-h3 { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.hp-src { margin: 18px 0 0; font-size: 13px; color: var(--quiet); max-width: 90ch; }
.hp-src a, .hp-more span a { color: var(--cite); }
.hp-asof { margin: 0 0 12px; font-size: 13px; color: var(--quiet); }
.hp-old { display: inline-block; font-size: 12px; font-weight: 800; line-height: 1.4; padding: 1px 6px; background: var(--down-bg); color: var(--down); vertical-align: 1px; }
.hp-none { font-size: 15px; color: var(--quiet); }

/* ---------- 1. Today ---------- */
.hp-today { margin: 32px 0 44px; border-top: 5px solid var(--ink); padding-top: 12px; }
.hp-today-h { display: flex; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; margin-bottom: 6px; }
.hp-today-h h2 { font-size: 26px; line-height: 1.1; letter-spacing: -0.02em; font-weight: 800;
  background: linear-gradient(transparent 58%, var(--hl) 58%, var(--hl) 92%, transparent 92%); padding: 0 2px; }
.hp-today-h p { margin: 0; font-size: 14px; color: var(--quiet); }
.hp-today ol { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.hp-today li { position: relative; padding: 11px 0 11px 34px; border-bottom: 1px solid var(--rail); font-size: 19px; line-height: 1.4; max-width: 62ch; }
.hp-today li::before { counter-increment: t; content: counter(t); position: absolute; left: 0; top: 13px; font-size: 14px; font-weight: 800; }
.hp-today li a { font-weight: 600; }
.hp-today-note { margin: 10px 0 0; font-size: 14px; color: var(--quiet); max-width: 80ch; }
.hp-today-note a { color: var(--ink); }

/* ---------- 2. Lead ---------- */
.hp-lead { margin-bottom: 56px; }
.hp-lead-g { display: grid; grid-template-columns: minmax(0, 7fr) minmax(260px, 5fr); gap: 40px; align-items: start; }
.hp-k { font-size: 14px; color: var(--quiet); margin: 0 0 10px; }
.hp-k a { color: var(--cite); }
.hp-lead-h { font-size: clamp(34px, 4vw, 52px); line-height: 1; letter-spacing: -0.045em; font-weight: 800; max-width: 17ch; }
.hp-lead-h a { text-decoration: none; }
.hp-lead-h a:hover { text-decoration: underline; text-decoration-thickness: 3px; }
.hp-dek { margin: 16px 0 0; font-size: 20px; line-height: 1.4; max-width: 44ch; }
.hp-why { margin: 18px 0 0; font-size: 14px; color: var(--quiet); max-width: 52ch; }
.hp-sides a { display: inline-block; border: 1px solid var(--ink); padding: 0 8px; margin-left: 4px; color: var(--ink); text-decoration: none; font-weight: 600; }
.hp-sides a:hover { background: var(--ink); color: var(--paper); }
.hp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.hp-heads .hp-chips { margin-top: 8px; }
.hp-chip { display: inline-flex; gap: 8px; align-items: baseline; border: 1px solid var(--ink); padding: 3px 8px; font-size: 14px; text-decoration: none; }
.hp-chip b { font-weight: 800; }
.hp-chip:hover { background: var(--wash); }
.hp-behind { border-top: 5px solid var(--ink); padding-top: 12px; }
.hp-behind h3 { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 4px; }
.hp-behind ul { list-style: none; margin: 0 0 14px; padding: 0; }
.hp-behind li { padding: 10px 0; border-bottom: 1px solid var(--rail); }
.hp-behind li > span { display: block; font-size: 13px; color: var(--quiet); }
.hp-behind li > b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.hp-behind li > b a { text-decoration: none; }
.hp-behind li > b a:hover { text-decoration: underline; }
.hp-behind li > b .chg { font-size: 15px; margin-left: 6px; }
.hp-behind small { display: block; font-size: 13px; color: var(--quiet); }
.hp-news { margin-top: 40px; }
.hp-news-h { display: flex; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; border-top: 2px solid var(--ink); padding-top: 10px; margin-bottom: 4px; }
.hp-news-h h3 { font-size: 19px; font-weight: 800; }
.hp-news-h p { margin: 0; font-size: 14px; color: var(--quiet); flex: 1; }
.hp-heads { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 24px; }
.hp-heads li { padding: 12px 0 14px; border-bottom: 1px solid var(--rail); }
.hp-heads li > a { display: block; text-decoration: none; }
.hp-heads .hp-k { display: block; font-size: 13px; margin-bottom: 4px; }
.hp-heads b { display: block; font-size: 17px; line-height: 1.25; letter-spacing: -0.01em; font-weight: 800; }
.hp-heads li > a:hover b { text-decoration: underline; }

/* ---------- 3. The record desk ---------- */
.hp-desk { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.hp-desk li { display: grid; grid-template-columns: 56px 76px minmax(0, 1fr) 120px; gap: 14px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--rail); }
.hp-dw { font-size: 14px; color: var(--quiet); }
.hp-dk { justify-self: start; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; border: 1px solid var(--faint); padding: 1px 5px; color: var(--quiet); white-space: nowrap; }
.hp-dt { font-size: 17px; line-height: 1.3; }
.hp-dt b { font-weight: 800; }
.hp-dt b a { text-decoration: none; }
.hp-dt b a:hover { text-decoration: underline; }
.hp-dt small { display: block; font-size: 13px; color: var(--quiet); margin-top: 2px; }
.hp-dt small a { color: var(--cite); }
.hp-dn { text-align: right; }
.hp-dn b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; }
.hp-dn small { display: block; font-size: 12px; color: var(--quiet); }

/* ---------- 4. Markets ---------- */
.hp-mapw { margin-bottom: 32px; }
.hp-seg { display: inline-flex; margin-bottom: 12px; }
.hp-seg button { font: 600 14px var(--sans, "Public Sans", sans-serif); padding: 6px 11px; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); border-radius: 0; cursor: pointer; }
.hp-seg button + button { border-left: 0; }
.hp-seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.hp-map { position: relative; width: 100%; height: 440px; background: #1a1a1a; overflow: hidden; border-radius: 0; }
.hp .hp-map.mmap { height: 440px; border-radius: 0; }
.hp-cap { margin: 8px 0 0; font-size: 13px; color: var(--quiet); }
.mmap-tip { border-radius: 0 !important; box-shadow: none !important; border: 1px solid #000; }
.hp-mk3 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; margin-bottom: 32px; }
.hp-mk3 > div { min-width: 0; }
.hp-mk3 h3, .hp-mv h3 { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.hp-t { width: 100%; border-collapse: collapse; font-size: 15px; border-top: 2px solid var(--ink); }
.hp-t th, .hp-t td { padding: 8px 10px 8px 0; text-align: left; border-bottom: 1px solid var(--rail); vertical-align: baseline; }
.hp-t th:last-child, .hp-t td:last-child { padding-right: 0; }
.hp-t thead th { font-size: 13px; font-weight: 600; color: var(--quiet); border-bottom: 1px solid var(--ink); white-space: nowrap; }
.hp-t tbody th { font-weight: 600; }
.hp-t tbody th a { text-decoration: none; display: inline-flex; align-items: flex-start; }
.hp-t tbody th a .lg { margin-top: -1px; vertical-align: 0; }
.hp-t tbody th a:hover { text-decoration: underline; }
.hp-t .n { text-align: right; white-space: nowrap; }
.hp-t td.hp-bar { width: 26%; padding-right: 12px; vertical-align: middle; }
.hp-bar i { display: block; height: 6px; background: var(--ink); }
.hp-bar i.up { background: var(--up); }
.hp-bar i.down { background: var(--down); }
.hp-movers { margin-bottom: 8px; }
.hp-mv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.hp-mv > div { min-width: 0; }
.hp-mv h3 { font-size: 14px; color: var(--quiet); font-weight: 600; }
.hp-movers > .hp-h3 { margin-bottom: 12px; }
.hp-ml { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.hp-ml li { display: grid; grid-template-columns: minmax(0, 1fr) auto 72px; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--rail); font-size: 15px; }
.hp-ml a { font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-ml a:hover { text-decoration: underline; }
.hp-px { color: var(--quiet); font-size: 14px; }
.hp-pct { justify-self: end; font-size: 14px; font-weight: 800; padding: 2px 6px; white-space: nowrap; }
.hp-pct.up { background: var(--up-bg); color: var(--up); }
.hp-pct.down { background: var(--down-bg); color: var(--down); }

/* ---------- 5. Week ahead ---------- */
.hp-week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.hp-week > div { min-width: 0; border-top: 2px solid var(--ink); padding-top: 8px; }
.hp-week h3 { font-size: 16px; font-weight: 800; }
.hp-week h3 span { font-weight: 400; color: var(--quiet); font-size: 14px; margin-left: 6px; }
.hp-week ul { list-style: none; margin: 6px 0 0; padding: 0; }
.hp-week li { padding: 8px 0; border-bottom: 1px solid var(--rail); font-size: 15px; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }
.hp-week li a { text-decoration: none; }
.hp-week li a:hover { text-decoration: underline; }
.hp-week li small { display: block; font-size: 13px; font-weight: 400; color: var(--quiet); margin-top: 2px; }
.hp-tag { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; border: 1px solid var(--ink); padding: 0 4px; margin-right: 6px; vertical-align: 1px; }
.hp-week li.hp-wk-more { border-bottom: 0; }
.hp-wk-more a { font-weight: 800; text-decoration: underline !important; font-size: 14px; }

/* ---------- 6, 7. Money moves and the dataset blocks ---------- */
.hp-g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; }
.hp-b { min-width: 0; border-top: 2px solid var(--ink); padding-top: 10px; display: flex; flex-direction: column; }
.hp-b h3 { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.hp-b h3 a { text-decoration: none; }
.hp-b h3 a:hover { text-decoration: underline; }
.hp-fig { margin: 8px 0 4px; font-size: 14px; line-height: 1.4; color: var(--quiet); }
.hp-fig b { display: block; font-size: 34px; line-height: 1.05; letter-spacing: -0.04em; font-weight: 800; color: var(--ink); margin-bottom: 2px; }
.hp-isold .hp-fig b { color: var(--quiet); }
.hp-l { list-style: none; margin: 0; padding: 0; flex: 1; }
.hp-l li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--rail); font-size: 15px; line-height: 1.3; }
.hp-l .nm { min-width: 0; overflow-wrap: anywhere; }
.hp-l .nm > a { font-weight: 600; text-decoration: none; }
.hp-l .nm > a:hover { text-decoration: underline; }
.hp-l small { display: block; font-size: 13px; color: var(--quiet); margin-top: 2px; }
.hp-l small a { color: var(--ink); }
.hp-l .v { font-weight: 600; white-space: nowrap; text-align: right; }
.hp-l .v .chg { font-size: 13px; margin-left: 4px; }
.hp-more { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 10px 0 0; font-size: 14px; }
.hp-more > a { font-weight: 800; }
.hp-more span { font-size: 13px; color: var(--quiet); text-align: right; flex: none; }

/* ---------- 8. Look something up ---------- */
.hp-q { position: relative; max-width: 680px; margin-bottom: 28px; }
.hp-q input { width: 100%; box-sizing: border-box; font: 400 18px var(--sans, "Public Sans", sans-serif); padding: 14px 16px; border: 2px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); -webkit-appearance: none; }
.hp-q input:focus { outline: 3px solid var(--cite); outline-offset: 0; }
.hp-q ul { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--ink); border-top: 0; }
.hp-q li a { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding: 10px 14px; text-decoration: none; border-bottom: 1px solid var(--rail); }
.hp-q li a:hover, .hp-q li a:focus { background: var(--wash); }
.hp-q li b { font-weight: 800; }
.hp-q li span { grid-column: 1; font-size: 13px; color: var(--quiet); }
.hp-q li small { grid-column: 2; grid-row: 1; font-size: 13px; color: var(--quiet); }
.hp-q li.none { padding: 12px 14px; font-size: 15px; color: var(--quiet); }
.hp-lk { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
.hp-lk a { display: block; padding: 12px 0 16px; border-top: 2px solid var(--ink); text-decoration: none; }
.hp-lk b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.hp-lk span { display: block; font-size: 15px; color: var(--quiet); margin-top: 2px; }
.hp-lk a:hover b { text-decoration: underline; }

/* ---------- 9. Freshness table ---------- */
.hp-fresh { max-width: 900px; }
.hp-fresh tbody th { width: 40%; }
.hp-fresh tr.hp-isold td:nth-child(3) { color: var(--down); }
.hp-fresh td { white-space: nowrap; }

/* ---------- 404 ---------- */
.hp-nf { margin-top: 48px; }
.hp-nf-h { font-size: clamp(40px, 6vw, 80px); line-height: .95; letter-spacing: -0.05em; font-weight: 800; max-width: 14ch; margin: 0 0 12px; }

/* ---------- narrower ---------- */
@media (max-width: 1099px) {
  .hp-heads { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .hp-lead-g, .hp-mk3 { grid-template-columns: minmax(0, 1fr); }
  .hp-g3, .hp-lk { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hp-week { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hp-week > div:nth-child(n+4) { display: none; }
}
@media (max-width: 640px) {
  .hp-s { margin-bottom: 44px; }
  .hp-today { margin-top: 20px; }
  .hp-today li { font-size: 17px; padding-left: 26px; }
  .hp-dek { font-size: 18px; }
  .hp-heads, .hp-g3, .hp-lk, .hp-mv { grid-template-columns: minmax(0, 1fr); }
  .hp-mv { gap: 24px; }
  .hp-week { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .hp-week > div:nth-child(n+3) { display: none; }
  .hp-desk li { grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; }
  .hp-dt { grid-column: 1 / 3; grid-row: 2; font-size: 16px; }
  .hp-dn { grid-column: 3; grid-row: 2; }
  .hp-dw { grid-row: 1; }
  .hp-dk { grid-row: 1; grid-column: 2; }
  .hp-map, .hp .hp-map.mmap { height: 320px; }
  .hp-2nd { display: none; }
  .hp-fresh td, .hp-fresh td.n { white-space: normal; }
  .hp-fresh tbody th { width: auto; }
}
