/* Landlord Grid. Tokens from 02_BRAND.md. Muted, border and surface values are
   derived; their contrast is computed in tools/check_contrast.py. */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/newsreader.woff2) format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/publicsans.woff2) format("woff2");
}

:root {
  --bg: #F6F4EF;
  --text: #15222E;
  --accent: #0B6B63;
  --fee: #9A4A06;
  --muted: #4A5764;
  --border: #CFC9BB;
  --surface: #ECE8DE;
  --focus: #0B6B63;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10181F;
    --text: #EDEAE3;
    --accent: #5CC4B8;
    --fee: #F0A862;
    --muted: #A8B3BC;
    --border: #2C3A46;
    --surface: #18232C;
    --focus: #5CC4B8;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  font-feature-settings: "tnum" 1;
}
.wrap { width: 100%; max-width: 54rem; margin: 0 auto; padding-left: 1rem; padding-right: 1rem; }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; transition: color 150ms; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.skip { position: absolute; left: 0; top: 0; transform: translateY(-120%); background: var(--text); color: var(--bg); padding: 0.5rem 1rem; z-index: 20; }
.skip:focus { transform: none; }

.site-header { border-bottom: 1px solid var(--border); }
.bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1.5rem; padding-top: 1rem; padding-bottom: 0.75rem; }
.wordmark { overflow-wrap: anywhere; max-width: 100%; font: 600 1.5rem/1.2 var(--serif); color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; font-size: 0.9375rem; }
nav a { color: var(--muted); text-decoration: none; padding: 0.35rem 0; }
nav a:hover { color: var(--accent); }
nav a[aria-current="page"] { color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }

main { padding-top: 2rem; padding-bottom: 4rem; }
.prose { overflow-wrap: anywhere; }
.prose h1 { font: 600 clamp(1.9rem, 5vw, 2.75rem)/1.15 var(--serif); letter-spacing: -0.015em; margin: 0 0 0.75rem; text-wrap: balance; }
.prose h2 { font: 600 clamp(1.4rem, 3.5vw, 1.75rem)/1.25 var(--serif); margin: 2.5rem 0 0.75rem; text-wrap: balance; }
.prose h3 { font: 600 1.1875rem/1.35 var(--sans); margin: 1.75rem 0 0.5rem; }
.prose p, .prose ul, .prose ol { max-width: 40rem; margin: 0 0 1rem; }
.prose li { margin-bottom: 0.4rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.lede { font-size: 1.1875rem; max-width: 40rem; }
.byline { color: var(--muted); font-size: 0.9375rem; margin: 0 0 1.5rem; }
.caption { color: var(--muted); font-size: 0.9375rem; margin: 0.5rem 0; }
.note { background: var(--surface); border-left: 3px solid var(--accent); padding: 0.75rem 1rem; font-size: 0.9375rem; max-width: 40rem; }
strong { font-weight: 650; }

.go { display: inline-block; font-weight: 600; padding: 0.4rem 0.9rem; border: 1px solid var(--accent); border-radius: 4px; text-decoration: none; margin: 0.1rem 0; }
.go:hover { background: var(--accent); color: var(--bg); }

/* Tables are the main design object */
.table-wrap { overflow-x: auto; margin: 1rem 0 0.5rem; border: 1px solid var(--border); border-radius: 4px; background: var(--bg); }
table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; line-height: 1.45; }
caption { text-align: left; }
th, td { padding: 0.6rem 0.8rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
thead th { background: var(--surface); font-weight: 650; position: sticky; top: 0; white-space: nowrap; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 600; background: var(--bg); position: sticky; left: 0; min-width: 8.5rem; box-shadow: 1px 0 0 var(--border); }
td { min-width: 9rem; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td strong { color: var(--fee); }
.table-wrap:focus-visible { outline-offset: 0; }

/* Calculator form */
.calc { display: grid; gap: 0.9rem; max-width: 40rem; margin: 1rem 0; }
.calc .field { display: grid; gap: 0.3rem; }
.calc label { font-weight: 600; font-size: 0.9375rem; }
.calc input[type="number"] { font: inherit; font-size: 1rem; min-height: 2.75rem; padding: 0.5rem 0.75rem; color: var(--text); background: var(--bg); border: 1px solid var(--muted); border-radius: 4px; width: 100%; max-width: 14rem; }
.calc .check { display: flex; align-items: center; gap: 0.6rem; }
.calc .check input { width: 1.4rem; height: 1.4rem; accent-color: var(--accent); }
.calc .check label { font-weight: 400; font-size: 1rem; }

/* Home guide list */
.prose .guides { list-style: none; padding: 0; max-width: none; margin: 1rem 0 0; display: grid; gap: 0.75rem; align-items: stretch; }
.guides li { margin: 0; }
.guides .guide { height: 100%; }
.guide { display: block; padding: 1rem 1.1rem; border: 1px solid var(--border); border-radius: 4px; text-decoration: none; color: var(--text); background: var(--surface); transition: border-color 150ms; }
.guide:hover { border-color: var(--accent); }
.g-title { display: block; font: 600 1.25rem/1.3 var(--serif); color: var(--accent); margin-bottom: 0.25rem; }
.g-desc { display: block; font-size: 0.9375rem; color: var(--muted); }

.site-footer { border-top: 1px solid var(--border); padding: 1.5rem 0 6rem; color: var(--muted); font-size: 0.9375rem; }
.site-footer p { margin: 0 0 0.5rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }

/* Scroll dock (built by site.js). Owns its own corner, never covers the footer text. */
.dock { position: fixed; right: 0.75rem; bottom: 0.75rem; z-index: 10; display: flex; align-items: center; gap: 0.15rem; padding: 0.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: 0 2px 10px rgba(0,0,0,0.12); }
.dock .pct { min-width: 3rem; text-align: center; font-size: 0.8125rem; font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; }
.dock button { all: unset; box-sizing: border-box; width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border-radius: 50%; color: var(--text); cursor: pointer; }
.dock button:hover { background: var(--bg); color: var(--accent); }
.dock button:focus-visible { outline: 3px solid var(--focus); outline-offset: -2px; }
.dock button[disabled] { opacity: 0.35; cursor: default; }
.dock svg { width: 1.25rem; height: 1.25rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (min-width: 40rem) {
  .wrap { padding-left: 1.5rem; padding-right: 1.5rem; }
  main { padding-top: 3rem; }
  .guides { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  * { transition: none !important; }
}
@media print {
  .dock, .site-header nav, .skip { display: none; }
}
