/* TitleWatch — one stylesheet for every page.
   System fonts only: no third-party font service sees visitors. */

:root {
  color-scheme: light;
  --paper: #f3f4f1;
  --surface: #ffffff;
  --ink: #15212b;
  --muted: #56626c;
  --line: #dcdfdb;
  --line-strong: #c3c8c3;
  --accent: #1c5a47;
  --accent-hover: #144537;
  --accent-soft: #e2ede8;
  --admin: #7d4c00;   --admin-bg: #fbefd8;
  --comp: #972131;    --comp-bg: #f8e3e6;
  --cvl: #235782;     --cvl-bg: #e2ebf5;
  --decoy: #c7ccc7;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }
img { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid #8fc1ad; outline-offset: 2px; border-radius: 2px; }
[hidden] { display: none !important; }

.wrap { max-width: 1140px; margin: 0 auto; padding-inline: 20px; }
.narrow { max-width: 720px; }

/* ---- header ---------------------------------------------------------- */

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding-block: 14px;
}
.wordmark {
  font-family: var(--serif); font-weight: 700; font-size: 1.35rem;
  color: var(--ink); text-decoration: none; letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 10px;
}
.wordmark::before {
  /* a small title-plan mark: a parcel outline */
  content: ""; width: 18px; height: 18px;
  border: 2.5px solid var(--accent); border-radius: 2px;
  box-shadow: inset 6px -6px 0 -3px var(--accent-soft);
}
.wordmark:hover { color: var(--ink); }
.nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 0.95rem; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { color: var(--accent); text-decoration: underline; }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }

/* ---- type ------------------------------------------------------------ */

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.2vw, 3rem); margin: 0 0 16px; letter-spacing: -0.015em; max-width: 22ch; }
h2 { font-size: clamp(1.45rem, 2.4vw, 1.8rem); margin: 0 0 12px; }
h3 { font-size: 1.15rem; margin: 0 0 6px; }
p { margin: 0 0 14px; max-width: 68ch; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.eyebrow {
  font: 600 0.75rem/1 var(--sans); letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 12px;
}
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.mono { font-family: var(--mono); font-size: 0.92em; }

/* ---- sections -------------------------------------------------------- */

.hero { padding-block: 56px 36px; }
.section { padding-block: 40px; }
.section + .section { border-top: 1px solid var(--line); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; margin-top: 32px;
}
.stat { background: var(--surface); padding: 16px 18px; }
.stat .value {
  font: 600 1.6rem/1.1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.stat .label { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 20px 32px; margin-top: 20px; }
.features > div { border-left: 3px solid var(--accent-soft); padding-left: 14px; }
.features p { color: var(--muted); margin: 0; }

.region-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 6px; max-width: 560px; }
.region-list li { display: grid; grid-template-columns: 11rem 1fr 3.5rem; align-items: center; gap: 10px; font-size: 0.92rem; }
.region-list .bar { height: 8px; background: var(--accent-soft); border-radius: 4px; overflow: hidden; }
.region-list .bar span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.region-list .n { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }

.price-card {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 24px; max-width: 420px;
}
.price-card .price { font: 700 2rem/1.1 var(--serif); margin: 6px 0 14px; }
.price-card ul { padding-left: 1.2rem; margin: 0 0 20px; }
.price-card li { margin-bottom: 4px; }

/* ---- buttons & forms --------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 0.95rem/1 var(--sans); padding: 12px 18px; border-radius: var(--radius);
  border: 1.5px solid var(--accent); background: var(--accent); color: #fff;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-secondary { background: transparent; color: var(--accent); }
.btn-secondary:hover { background: var(--accent-soft); color: var(--accent-hover); }
.btn-small { padding: 8px 12px; font-size: 0.875rem; }
.btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; max-width: 440px; margin: 48px auto;
}
.card h1 { font-size: 1.7rem; }
label { display: block; font-weight: 600; font-size: 0.9rem; margin: 14px 0 6px; }
input[type="email"], input[type="password"], input[type="text"], input[type="search"],
input[type="date"], select {
  width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: #fff; color: var(--ink);
}
.card .btn { width: 100%; margin-top: 20px; }
.form-note { font-size: 0.875rem; color: var(--muted); margin-top: 16px; }
.alert { border-radius: var(--radius); padding: 12px 14px; margin: 16px 0 0; font-size: 0.92rem; }
.alert-error { background: var(--comp-bg); color: var(--comp); }
.alert-ok { background: var(--accent-soft); color: var(--accent-hover); }

/* ---- tables ------------------------------------------------------------ */

.table-scroll {
  overflow-x: auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius);
}
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th {
  text-align: left; font: 600 0.72rem/1.2 var(--sans); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); padding: 12px 14px;
  border-bottom: 1px solid var(--line-strong); white-space: nowrap; background: #fafbf9;
}
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: #f8faf8; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table .nowrap { white-space: nowrap; }
.data-table .company { font-weight: 600; min-width: 14rem; }
.data-table .company a { color: var(--ink); text-decoration: none; }
.data-table .company a:hover { color: var(--accent); text-decoration: underline; }
.data-table .sub { display: block; font-weight: 400; color: var(--muted); font-size: 0.8rem; font-family: var(--mono); }

a.title-no {
  font-family: var(--mono); font-weight: 600; white-space: nowrap;
  padding: 2px 6px; border-radius: 4px; background: var(--accent-soft); text-decoration: none;
}
a.title-no::after { content: " ↗"; font-family: var(--sans); font-weight: 400; font-size: 0.8em; }
a.title-no:hover { background: var(--accent); color: #fff; }

.badge {
  display: inline-block; font: 600 0.75rem/1 var(--sans); padding: 5px 8px;
  border-radius: 999px; white-space: nowrap;
}
.badge-admin { color: var(--admin); background: var(--admin-bg); }
.badge-comp { color: var(--comp); background: var(--comp-bg); }
.badge-cvl { color: var(--cvl); background: var(--cvl-bg); }

/* ---- the locked preview ------------------------------------------------
   Real teaser rows first, then decoy rows made of grey bars. The decoys and
   the blurred cells are never real data: a blur is only paint, and anything
   real sent to the page could be read with developer tools. */

.locked { position: relative; }
.bar-decoy {
  display: inline-block; height: 0.8em; border-radius: 3px; background: var(--decoy);
  vertical-align: middle; filter: blur(2.5px);
}
.locked tr.decoy td { filter: blur(3px); }
.locked tr.decoy .bar-decoy { filter: none; }
/* covers the decoy rows only; common.js sets its top edge to the first decoy */
.locked .fade {
  position: absolute; left: 0; right: 0; bottom: 0; top: 40%;
  background: linear-gradient(to bottom, rgba(243, 244, 241, 0.15) 0%, rgba(243, 244, 241, 0.9) 45%, var(--paper) 75%);
  display: flex; align-items: flex-end; justify-content: center; padding: 0 16px 28px;
  pointer-events: none;
}
.unlock {
  pointer-events: auto; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: 22px 24px; max-width: 460px; text-align: center;
  box-shadow: 0 10px 30px rgba(21, 33, 43, 0.08);
}
.unlock .more { font: 700 1.35rem/1.25 var(--serif); margin: 0 0 6px; max-width: none; }
.unlock p { margin: 0 auto 16px; color: var(--muted); }
.unlock .cta-row { justify-content: center; margin-top: 0; }

/* ---- listings controls ------------------------------------------------- */

.filters {
  display: grid; gap: 12px 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 14px;
}
.filters label { margin: 0 0 5px; font-size: 0.8rem; color: var(--muted); }
.filters .span-2 { grid-column: span 2; }
.results-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  flex-wrap: wrap; margin: 6px 0 12px;
}
.results-bar .cta-row { margin-top: 0; }
.fine-print { margin-top: 18px; max-width: 80ch; }
.show-more { display: flex; justify-content: center; margin: 16px 0 0; }

.gate {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; margin-bottom: 24px;
}
.gate h2 { margin-bottom: 8px; }

/* ---- guide / legal ----------------------------------------------------- */

.steps { counter-reset: step; list-style: none; padding: 0; margin: 24px 0; }
.steps li { counter-increment: step; position: relative; padding-left: 52px; margin-bottom: 22px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff;
  font: 700 1rem/34px var(--serif); text-align: center;
}
.prose h2 { margin-top: 32px; }
.prose ul { padding-left: 1.3rem; max-width: 68ch; }
.prose li { margin-bottom: 6px; }
.notice {
  border-left: 4px solid var(--admin); background: var(--admin-bg); color: #4d3200;
  padding: 12px 16px; border-radius: 0 var(--radius) var(--radius) 0; margin: 20px 0;
}

/* ---- footer ------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--line); background: var(--surface); margin-top: 56px;
  padding-block: 28px; font-size: 0.85rem; color: var(--muted);
}
.site-footer p { max-width: 90ch; }
.site-footer .links { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.site-footer .sources { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }

/* ---- toast ------------------------------------------------------------- */

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%); z-index: 50;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--radius);
  font-size: 0.92rem; max-width: min(92vw, 520px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.loading { color: var(--muted); padding: 24px 0; }

@media (max-width: 640px) {
  .hero { padding-block: 36px 24px; }
  .filters .span-2 { grid-column: auto; }
  .region-list li { grid-template-columns: 8rem 1fr 3rem; }
  .card { margin: 24px auto; padding: 22px; }
}
