/* Boomtown Tycoon — "land office plat" theme.
   Cyanotype blue drafting sheet, paper-white linework, survey red for actions, brass for prime land. */

@font-face { font-family: 'Big Shoulders Display'; font-weight: 800; font-display: swap; src: url(../fonts/big-shoulders-display-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'Big Shoulders Display'; font-weight: 900; font-display: swap; src: url(../fonts/big-shoulders-display-latin-900-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 400; font-display: swap; src: url(../fonts/barlow-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-display: swap; src: url(../fonts/barlow-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 700; font-display: swap; src: url(../fonts/barlow-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url(../fonts/barlow-condensed-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 500; font-style: italic; font-display: swap; src: url(../fonts/barlow-condensed-latin-500-italic.woff2) format('woff2'); }

:root {
  --blue: #163E66;      /* the drafting sheet */
  --deep: #0F2D4C;      /* ink wells: page edges, input fields */
  --paper: #E8F1F7;     /* linework and text */
  --soft: #CFE0EE;      /* body copy */
  --line: #9CC0DE;      /* secondary lines, muted text */
  --rule: rgba(156, 192, 222, .32);
  --red: #D6453D;       /* survey red: actions, sold marks */
  --brass: #C9A45C;     /* prime land, auctions, rewards */
  --good: #8FD3A8;
  --display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --body: Barlow, 'Segoe UI', sans-serif;
  --cond: 'Barlow Condensed', 'Arial Narrow', sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--blue);
  background-image: linear-gradient(rgba(232,241,247,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(232,241,247,.055) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--soft); font: 400 17px/1.55 var(--body);
}
a { color: var(--paper); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 900; color: var(--paper); line-height: 1; letter-spacing: .3px; }
h1 { font-size: 2.7rem; margin: .1em 0 .45em; }
h2 { font-size: 1.85rem; margin: 1.3em 0 .5em; font-weight: 800; }
h3 { font-size: 1.35rem; font-weight: 800; }

/* Top bar: the drawing's border strip */
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding: 14px 24px; background: var(--deep); border-bottom: 2px solid var(--paper); }
.topbar a { color: var(--paper); text-decoration: none; }
.brand { font: 900 1.6rem var(--display); letter-spacing: .5px; }
.mainnav { display: flex; gap: 4px; flex-wrap: wrap; }
.mainnav a { padding: 5px 11px; font-weight: 600; border: 1.5px solid transparent; }
.mainnav a.on { border-color: var(--paper); }
.mainnav a:hover { border-color: var(--line); }
.bal { margin-left: auto; display: flex; gap: 16px; align-items: center; font-size: .95rem; flex-wrap: wrap; }
.bal b { color: var(--brass); font-weight: 700; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 26px 20px 48px; }
.foot { text-align: center; color: var(--line); font-size: .85rem; padding: 22px 16px 34px; border-top: 1px solid var(--rule); }

.flash { padding: 11px 14px; margin-bottom: 16px; border: 1.5px solid; background: var(--deep); }
.flash.error { border-color: var(--red); color: #FFD9D5; }
.flash.ok { border-color: var(--good); color: #DDF5E6; }
.flash.info { border-color: var(--brass); color: #F6E7C6; }

/* Panels are outlined areas on the sheet, not floating cards */
.panel { border: 1.5px solid var(--paper); padding: 18px 20px; margin-bottom: 18px; background: rgba(15,45,76,.35); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
.muted { color: var(--line); }
.small { font-size: .88rem; }
.right { text-align: right; }

.btn, button { display: inline-block; border: 2px solid var(--red); border-radius: 3px; padding: 9px 18px; background: var(--red); color: #fff; font: 700 1rem var(--body); cursor: pointer; text-decoration: none; }
.btn:hover, button:hover { filter: brightness(1.1); }
.btn.alt, button.alt { background: transparent; border-color: var(--paper); color: var(--paper); }
.btn.warn, button.warn { background: transparent; border-color: var(--red); color: #FFB9B3; }
.btn.gold, button.gold { background: var(--brass); border-color: var(--brass); color: var(--deep); }
.btn.small, button.small { padding: 5px 11px; font-size: .88rem; }
button:disabled { opacity: .45; cursor: default; filter: none; }

form.stack label { display: block; margin: 12px 0 5px; font-weight: 600; font-size: .92rem; color: var(--paper); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 2px; background: var(--deep); font: inherit; color: var(--paper);
}
input:focus { border-color: var(--paper); outline: none; }
form.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form.inline input { width: auto; flex: 1 1 140px; }
form.stack button { margin-top: 16px; }
.cf-turnstile { margin-top: 12px; }

table.list { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.list th, table.list td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
table.list th { font: 600 .92rem var(--cond); color: var(--line); letter-spacing: .3px; }
.tablewrap { overflow-x: auto; }

/* Figures read like entries in a plat's title block */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border: 1.5px solid var(--paper); }
.stat { padding: 12px 16px; border-right: 1px solid var(--rule); }
.stat:last-child { border-right: 0; }
.stat .n { font: 800 1.75rem/1.1 var(--display); color: var(--paper); }
.stat .l { color: var(--line); font-size: .86rem; }

/* Town plat */
.mapbox { position: relative; border: 1.5px solid var(--paper); overflow: hidden; touch-action: none; height: min(72vh, 760px); background: var(--blue); }
.mapbox svg.town { width: 100%; height: 100%; display: block; cursor: grab; }
.mapbox.drag svg.town { cursor: grabbing; }
.mapctl { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; }
.mapctl button { width: 36px; height: 36px; padding: 0; font-size: 1.2rem; background: var(--deep); border-color: var(--paper); color: var(--paper); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .86rem; color: var(--line); margin: 10px 0 0; }
.town { color: var(--paper); }
.t-lot { fill: none; stroke: var(--paper); stroke-width: 1.6; pointer-events: all; }
.town a { cursor: pointer; }
.t-lot.prime { fill: url(#hatch); }
.t-no { font: 600 12px var(--cond); fill: var(--line); }
.t-owner { font: 500 italic 14px var(--cond); fill: var(--paper); }
.t-street { font: 600 12px var(--cond); fill: var(--line); letter-spacing: 2px; }
.t-sold { fill: var(--red); }
.t-bldg { color: var(--paper); }
.lot.vacant .t-bldg { opacity: .45; }
.t-mine { fill: none; stroke: var(--red); stroke-width: 3; }
.town a .lot:hover .t-lot { stroke-width: 3; }
.town a:focus-visible .t-lot { stroke: var(--brass); stroke-width: 3; }

/* Lot page / claim list icons: small framed elevations */
.lothead { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.lothead svg { width: 120px; height: 120px; flex: none; border: 1.5px solid var(--paper); color: var(--paper); }
.lothead.prime svg { background: repeating-linear-gradient(45deg, rgba(201,164,92,.28) 0 2px, transparent 2px 9px); }
dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 5px 16px; margin: 0; }
dl.facts dt { color: var(--line); }
dl.facts dd { margin: 0; font-weight: 600; color: var(--paper); }
.stars { color: var(--brass); letter-spacing: 1px; }

.claimrow { display: flex; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.claimrow:last-child { border-bottom: 0; }
.claimrow svg { width: 50px; height: 50px; flex: none; border: 1.5px solid var(--line); color: var(--paper); }
.claimrow.prime svg { background: repeating-linear-gradient(45deg, rgba(201,164,92,.28) 0 2px, transparent 2px 8px); }
.claimrow .info { flex: 1; min-width: 0; }
.claimrow .info .t { font-weight: 600; color: var(--paper); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.claimrow.done { opacity: .45; }

.timer { text-align: center; }
.timer .count { font: 900 4rem/1 var(--display); color: var(--paper); margin: 10px 0; }
.bar { height: 10px; border: 1.5px solid var(--line); }
.bar > span { display: block; height: 100%; background: var(--brass); }
.rate { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.rate button { background: transparent; color: var(--brass); border: 1.5px solid var(--line); font-size: 1.05rem; padding: 6px 10px; }
.rate button:hover { border-color: var(--brass); }

.steps ol { margin: 12px 0 0; padding: 0; list-style: none; counter-reset: st; display: grid; gap: 14px; }
.steps li { counter-increment: st; position: relative; padding-left: 44px; margin: 0; max-width: 78ch; }
.steps li::before { content: counter(st); position: absolute; left: 0; top: -1px; width: 28px; height: 28px; border: 1.5px solid var(--paper); display: grid; place-items: center; font: 800 1rem var(--display); color: var(--paper); }
.steps li.done { color: var(--line); }
.steps li.done::before { content: "✓"; border-color: var(--good); color: var(--good); }
.steps li.done b { text-decoration: line-through; text-decoration-color: var(--good); }
.steps li .bar { margin-top: 8px; max-width: 420px; }
.intro { color: var(--soft); max-width: 82ch; margin: 0 0 16px; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
label.check input { width: auto; }
.codes { columns: 2; list-style: none; padding: 12px 16px; margin: 0 0 14px; border: 1.5px dashed var(--brass); font: 600 1.05rem var(--cond); letter-spacing: .04em; max-width: 360px; }
.qr { width: 200px; height: 200px; background: #fff; padding: 0; margin: 8px 0 10px; }
.qr svg { width: 100%; height: 100%; display: block; }
.guidepage { max-width: 78ch; }
.guidepage h2 { font-size: 1.6rem; }
.guidepage ul { padding-left: 1.2em; }
.guidepage li { margin-bottom: 6px; }
.lp-how > p { grid-column: 2; margin: 0; }

/* Offers */
.tabs { display: flex; gap: 0; flex-wrap: wrap; margin: 6px 0 18px; border-bottom: 1.5px solid var(--paper); }
.tabs a { padding: 9px 18px; text-decoration: none; color: var(--line); font-weight: 600; border: 1.5px solid transparent; border-bottom: 0; margin-bottom: -1.5px; }
.tabs a.on { color: var(--paper); border-color: var(--paper); background: var(--blue); }
.offergrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-bottom: 18px; }
.offer { border: 1.5px solid var(--paper); padding: 14px; display: flex; flex-direction: column; gap: 10px; background: rgba(15,45,76,.35); }
.offer-top { display: flex; gap: 12px; align-items: center; }
.offer-top img, .offer-noimg { width: 50px; height: 50px; object-fit: cover; flex: none; border: 1.5px solid var(--line); background: var(--deep); }
.offer-noimg { display: flex; align-items: center; justify-content: center; font: 900 1.4rem var(--display); color: var(--paper); }
.offer-head { min-width: 0; }
.offer-title { font-weight: 700; color: var(--paper); line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.offer-kind { font: 600 .86rem var(--cond); color: var(--line); margin-top: 2px; }
.offer-desc { margin: 0; font-size: .9rem; color: var(--line); }
.offer-meta { display: flex; flex-wrap: wrap; gap: 6px; font: 600 .84rem var(--cond); }
.offer-meta span { border: 1px solid var(--line); padding: 1px 8px; color: var(--soft); }
.offer-meta:empty { display: none; }
.offer-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.offer-reward { font: 800 1.45rem var(--display); color: var(--brass); }

/* Billboard visit countdown: a title block pinned to the bottom of the sheet */
.claimrun { position: fixed; inset: auto 0 0 0; z-index: 50; display: flex; justify-content: center; padding: 0 12px 12px; pointer-events: none; }
.claimrun-card { pointer-events: auto; position: relative; width: min(440px, 100%); background: var(--deep); border: 2px solid var(--paper); padding: 16px 18px; text-align: center; box-shadow: 0 0 0 6px rgba(15,45,76,.6); }
.claimrun-x { position: absolute; top: 8px; right: 8px; }
.claimrun-title { font-weight: 700; color: var(--paper); padding: 0 34px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.claimrun .count { font: 900 3rem/1 var(--display); color: var(--paper); margin: 8px 0; }
.claimrun-msg { margin: 8px 0 0; min-height: 1.2em; }
.claimrun-actions { margin-top: 8px; }

/* ---------------- Landing page ---------------- */
.landing .topbar { background: transparent; border-bottom: 0; padding: 22px 40px 0; max-width: 1320px; margin: 0 auto; }
.lp-hero { max-width: 1320px; margin: 0 auto; padding: 34px 40px 56px; display: grid; grid-template-columns: 5fr 6fr; gap: 48px; align-items: center; }
.lp-hero h1 { font-size: clamp(2.2rem, 3.7vw, 3.5rem); line-height: .92; margin: 0 0 24px; }
.lp-lede { font-size: 1.22rem; max-width: 30em; margin: 0 0 30px; }
.lp-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.lp-cta .btn { font-size: 1.12rem; padding: 14px 24px; }
.lp-note { margin-top: 22px; font-size: .95rem; color: var(--line); }
.lp-plat { position: relative; }
.lp-plat .mapbox { height: auto; aspect-ratio: 1 / 1; border: 0; background: transparent; }
.titleblock { position: absolute; right: 0; bottom: 0; background: var(--blue); border: 2px solid var(--paper); font: 600 .9rem/1.4 var(--cond); padding: 10px 14px; min-width: 230px; color: var(--soft); }
.titleblock b { display: block; font: 900 1.45rem/1 var(--display); color: var(--paper); margin-bottom: 4px; }
.lp-band { background: var(--deep); border-top: 1.5px solid var(--paper); border-bottom: 1.5px solid var(--paper); }
.lp-ledger { max-width: 1320px; margin: 0 auto; padding: 44px 40px; display: grid; grid-template-columns: 1fr 2fr; gap: 48px; }
.lp-ledger h2, .lp-how h2 { margin: 0; font-size: 2.2rem; }
.lp-ledger ul { list-style: none; margin: 0; padding: 0; }
.lp-ledger li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); color: var(--paper); }
.lp-ledger li span:last-child { color: var(--line); white-space: nowrap; }
.lp-how { max-width: 1320px; margin: 0 auto; padding: 52px 40px; display: grid; grid-template-columns: 1fr 2fr; gap: 48px; }
.lp-how ol { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 36px; }
.lp-how li { counter-increment: s; position: relative; padding-left: 46px; }
.lp-how li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border: 1.5px solid var(--paper); display: grid; place-items: center; font: 800 1.1rem var(--display); color: var(--paper); }
.lp-how li b { display: block; color: var(--paper); font-size: 1.05rem; margin-bottom: 2px; }
.lp-rules { max-width: 1320px; margin: 0 auto; padding: 0 40px 56px; display: grid; grid-template-columns: 1fr 2fr; gap: 48px; }
.lp-rules h2 { margin: 0; font-size: 2.2rem; }
.lp-rules ul { margin: 0; padding-left: 20px; columns: 2; column-gap: 40px; }
.lp-rules li { margin-bottom: 9px; break-inside: avoid; }
@media (max-width: 900px) {
  .landing .topbar { padding: 16px 20px 0; }
  .lp-hero, .lp-ledger, .lp-how, .lp-rules { grid-template-columns: 1fr; gap: 26px; padding-left: 20px; padding-right: 20px; }
  .lp-how ol { grid-template-columns: 1fr; }
  .lp-how > p { grid-column: auto; }
  .lp-rules ul { columns: 1; }
  .titleblock { position: static; margin-top: 10px; }
  .lp-ledger li { flex-direction: column; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* Records and stats */
.h2link { font: 600 .95rem var(--body); margin-left: 12px; letter-spacing: 0; }
.boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.board { margin: 0; padding: 14px 16px; }
.board header { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.board h3 { margin: 0; font-size: 1.35rem; }
.list.rank td { padding: 7px 6px; }
.list.rank td.n { width: 2.2em; color: var(--line); font: 700 1rem var(--cond); }
.list.rank tr.me td { background: rgba(201,164,92,.14); }
.list.rank tr.me td:first-child { box-shadow: inset 3px 0 0 var(--brass); }
.board .you { margin: 8px 0 0; color: var(--brass); }
.chart { margin: 0; }
.chart figcaption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; font-size: .9rem; margin-bottom: 6px; }
.chart figcaption span:first-child { color: var(--paper); font-weight: 600; }
.chart figcaption span:last-child { color: var(--line); }
.bars { width: 100%; height: auto; display: block; overflow: visible; }
.bars .col { fill: var(--brass); }
.bars .hit { fill: transparent; }
.bars g:hover .col { fill: var(--paper); }
.bars .base { stroke: var(--line); stroke-width: 1; }
.bars .ax { fill: var(--line); font: 500 9px var(--cond); }
.lotstats h3 { margin: 0 0 10px; font-size: 1.4rem; }
.lotstats h3 .small { font-family: var(--body); font-weight: 400; letter-spacing: 0; }
.loanbox { margin-top: 16px; padding: 14px 16px; border: 1.5px dashed var(--brass); }
.loanbox h3 { margin: 0 0 6px; font-size: 1.35rem; color: var(--brass); }
.loanbox p { margin: 0 0 12px; max-width: 80ch; }

/* Landing: terms of sale, printed in blue ink on paper like a deed among blueprints */
.lp-terms { max-width: 1320px; margin: 0 auto; padding: 0 40px 60px; }
.lp-terms h2 { margin: 0 0 20px; font-size: 2.2rem; }
.deed { background: var(--paper); color: var(--deep); display: grid; grid-template-columns: repeat(3, 1fr); border: 2px solid var(--paper); outline: 1.5px solid var(--paper); outline-offset: 5px; }
.deed.two { grid-template-columns: 1fr 1fr; }
.deed .term { padding: 26px 28px 24px; }
.deed .term + .term { border-left: 1.5px solid var(--line); }
.deed h3 { color: var(--blue); font-size: clamp(1.9rem, 2.6vw, 2.5rem); line-height: .95; margin: 0 0 14px; }
.deed p { margin: 0 0 12px; font-size: 1.05rem; line-height: 1.55; color: var(--deep); max-width: 52ch; }
.deed .figure { font-weight: 700; color: var(--blue); }
.deed .fine { font-size: .9rem; color: #3E6286; margin: 0; }
@media (max-width: 900px) {
  .lp-terms { padding-left: 20px; padding-right: 20px; }
  .deed, .deed.two { grid-template-columns: 1fr; }
  .deed .term + .term { border-left: 0; border-top: 1.5px solid var(--line); }
}
.lp-hero h1 .hl { display: block; }
@media (max-width: 520px) { .lp-hero h1 { font-size: 2.2rem; } }

/* town news */
.news { list-style: none; margin: 0; padding: 0; }
.news li { padding: 6px 0; border-bottom: 1px solid var(--line, rgba(0,0,0,.08)); }
.news li:last-child { border-bottom: 0; }
.news li .muted { display: inline-block; min-width: 7.5em; }
