/* HouseDisBlock — shared design system. Page-specific rules live beside each page. */

:root {
  --bg: #f5f3ed;
  --surface: #ffffff;
  --sunken: #ebe8df;
  --ink: #13262a;
  --ink-2: #33474a;
  --muted: #56666a;
  --line: #dedacd;
  --line-strong: #c3beae;
  --jade: #0a6558;
  --jade-deep: #0c3a35;
  --jade-tint: #e1eee7;
  --clay: #b0501a;
  --clay-tint: #f8e9dd;
  --focus: #c97a10;
  /* chart series (validated for colour-vision separation on white) */
  --series-block: #0b8a73;
  --series-town: #c2571a;

  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --shadow: 0 1px 2px #13262a0f, 0 6px 20px #13262a0d;
  --shadow-pop: 0 14px 40px #0c2a2c33;

  font: 16px/1.5 var(--sans);
  color: var(--ink);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.025em; line-height: 1.12; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); font-weight: 680; }
h3 { font-size: 1.08rem; font-weight: 650; letter-spacing: -.012em; }
a { color: var(--jade); text-underline-offset: 3px; }
a:hover { color: var(--jade-deep); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 100; top: 10px; left: 10px; padding: 10px 14px; background: var(--surface); border-radius: var(--r-sm); box-shadow: var(--shadow-pop); }
.num { font-variant-numeric: tabular-nums; }

.wrap { width: min(100% - 48px, 1180px); margin-inline: auto; }
.page { padding-block: 22px 64px; }
.muted { color: var(--muted); }

/* ---------- Header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 30; }
.mast { display: flex; align-items: center; gap: 28px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); font: 800 1.32rem/1 var(--display); letter-spacing: -.045em; flex-shrink: 0; }
.brand > span:last-child { font-weight: 450; color: var(--jade); }
.mark { display: flex; align-items: flex-end; gap: 3px; margin-right: 9px; width: 25px; height: 25px; transform: skewY(-9deg); }
.mark i { width: 6px; background: var(--jade); height: 14px; border-radius: 1px; }
.mark i:nth-child(2) { height: 24px; }
.mark i:last-child { height: 19px; background: var(--clay); }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a { padding: 8px 12px; border-radius: 999px; font-size: .92rem; font-weight: 600; text-decoration: none; color: var(--ink-2); white-space: nowrap; }
.main-nav a:hover { background: var(--sunken); color: var(--ink); }
.main-nav a[aria-current="page"] { background: var(--jade-tint); color: var(--jade-deep); }
.mast .search { margin-left: auto; width: min(100%, 340px); }

/* ---------- Search combobox ---------- */
.search { position: relative; }
.search input { width: 100%; height: 42px; padding: 0 14px 0 40px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--bg); color: var(--ink); font-size: .93rem; }
.search input::placeholder { color: #66777a; }
.search input:hover { border-color: #9aa69f; }
.search input:focus { background: var(--surface); border-color: var(--jade); outline: 3px solid #0a655833; outline-offset: 0; }
.search::before { content: ""; position: absolute; left: 15px; top: 50%; width: 15px; height: 15px; margin-top: -8px; pointer-events: none; z-index: 1;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230a6558' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 4 4'/%3E%3C/svg%3E"); }
.search-lg input { height: 60px; padding-left: 52px; border-radius: var(--r); border-color: transparent; background: var(--surface); font-size: 1.05rem; box-shadow: 0 10px 30px #04201d55; }
.search-lg::before { left: 20px; width: 18px; height: 18px; margin-top: -9px; }
.listbox { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0; min-width: 300px; max-height: min(62vh, 420px); overflow: auto; padding: 6px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-pop); text-align: left; }
.mast .listbox { left: auto; width: 400px; max-width: calc(100vw - 32px); }
.opt-group { padding: 9px 10px 4px; font-size: .7rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.opt { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); font-size: .95rem; cursor: pointer; }
.opt b { font-weight: 700; }
.opt small { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.opt:hover, .opt[aria-selected="true"] { background: var(--jade-tint); color: var(--ink); }
.opt-empty { padding: 14px 12px; font-size: .92rem; color: var(--muted); }
.opt-empty a { font-weight: 600; }

/* ---------- Common pieces ---------- */
.eyebrow { font-size: .74rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; color: var(--jade); margin-bottom: 8px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 20px; font-size: .88rem; color: var(--muted); min-height: 24px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--jade); text-decoration: underline; }
.crumbs > * + *::before { content: "›"; margin-right: 8px; color: #94a09b; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); font-size: .92rem; font-weight: 600; text-decoration: none; color: var(--ink); white-space: nowrap; }
.btn:hover { border-color: var(--jade); background: var(--jade-tint); color: var(--ink); }
.btn-primary { background: var(--jade); border-color: var(--jade); color: #fff; }
.btn-primary:hover { background: var(--jade-deep); border-color: var(--jade-deep); color: #fff; }
.link-arrow { font-weight: 600; text-decoration: none; white-space: nowrap; }
.link-arrow::after { content: " →"; }
.link-arrow:hover { text-decoration: underline; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.panel-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 6px 20px; padding: 20px 24px 14px; }
.panel-head p { color: var(--muted); font-size: .9rem; margin-top: 4px; max-width: 62ch; }
.panel-foot { padding: 12px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .86rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--sunken); border-radius: var(--r); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; padding: 7px 13px; border-radius: 7px; font-size: .88rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.seg span small { font-weight: 500; color: var(--muted); margin-left: 4px; font-size: .78rem; }
.seg label:hover span { color: var(--ink); background: #ffffff8c; }
.seg input:checked + span { background: var(--surface); color: var(--jade-deep); box-shadow: 0 1px 3px #13262a2e; }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.field-label { display: block; font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }

.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; font-variant-numeric: tabular-nums; }
th, td { padding: 12px 24px; border-top: 1px solid var(--line); font-size: .92rem; white-space: nowrap; }
thead th { font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: #faf9f5; }
.r { text-align: right; }

.notice { padding: 14px 16px; border-radius: var(--r); background: var(--clay-tint); border: 1px solid #ecc9ae; color: #5c2b0d; font-size: .93rem; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.notice button { border: 0; background: none; padding: 0; color: #7a3408; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.state { padding: 56px 0; max-width: 560px; }
.state h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.state p { margin-top: 12px; color: var(--muted); }
.state .actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.skeleton { display: grid; gap: 14px; padding-top: 6px; }
.skeleton i { display: block; height: 20px; border-radius: 8px; background: linear-gradient(90deg, var(--sunken) 25%, #f3f1ea 50%, var(--sunken) 75%) 0 0 / 200% 100%; animation: shimmer 1.3s linear infinite; }
.skeleton i:nth-child(1) { width: 46%; height: 46px; }
.skeleton i:nth-child(2) { width: 30%; }
.skeleton i:nth-child(3) { height: 120px; margin-top: 12px; }
.skeleton i:nth-child(4) { height: 260px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Ad slots ---------- */
/* Fixed boxes reserve the space before an ad loads, so nothing on the page jumps. */
.ad { display: flex; flex-direction: column; align-items: center; margin-block: 32px; }
.ad-label { display: block; margin-bottom: 6px; font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #7f8b86; }
.ad-box { display: flex; align-items: center; justify-content: center; max-width: 100%; overflow: hidden; }
.ad-box ins { display: inline-block; width: 100%; height: 100%; }
.ad[data-format="leaderboard"] .ad-box { width: 728px; height: 90px; }
.ad[data-format="rectangle"] .ad-box { width: 300px; height: 250px; }
.ad-preview .ad-box { border: 1px dashed var(--line-strong); border-radius: var(--r-sm); color: var(--muted); font: 600 .78rem var(--sans); font-variant-numeric: tabular-nums;
  background: repeating-linear-gradient(135deg, transparent 0 10px, #13262a08 10px 20px); }
.ad:has(ins[data-ad-status="unfilled"]) { display: none; }
@media (max-width: 780px) { .ad[data-format="leaderboard"] .ad-box { width: 320px; height: 100px; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--jade-deep); color: #cfe2da; margin-top: auto; }
.foot { display: grid; grid-template-columns: 1.3fr 1fr 1.6fr; gap: 32px; padding: 40px 0 34px; font-size: .88rem; line-height: 1.6; }
.site-footer .brand { color: #fff; }
.site-footer .brand > span:last-child { color: #9fdcc0; }
.site-footer a { color: #e6f3ed; }
.site-footer a:hover { color: #fff; }
.foot h2 { font: 700 .72rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #9fc9b9; margin-bottom: 10px; }
.foot li + li { margin-top: 6px; }
.foot li a { text-decoration: none; }
.foot li a:hover { text-decoration: underline; }
.foot .tagline { margin-top: 12px; max-width: 30ch; }

@media (max-width: 900px) {
  .mast { flex-wrap: wrap; gap: 6px 14px; padding-block: 10px; }
  .main-nav { margin-left: auto; }
  .mast .search { order: 3; width: 100%; flex-basis: 100%; margin: 2px 0 2px; }
  .mast .listbox { left: 0; right: 0; width: auto; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .wrap { width: calc(100% - 32px); }
  .page { padding-block: 16px 44px; }
  .brand { font-size: 1.08rem; }
  .mark { margin-right: 7px; width: 21px; height: 21px; }
  .mark i { width: 5px; height: 12px; } .mark i:nth-child(2) { height: 20px; } .mark i:last-child { height: 16px; }
  .mast { column-gap: 6px; }
  .main-nav { gap: 0; }
  .main-nav a { padding: 8px 6px; font-size: .84rem; }
  .main-nav a.nav-home { display: none; }
  th, td { padding: 11px 16px; }
  .panel-head { padding: 18px 16px 12px; }
  .panel-foot { padding: 12px 16px; }
  .foot { grid-template-columns: 1fr; gap: 24px; padding: 30px 0 26px; }
  .listbox { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .skeleton i { animation: none; }
}
