/* Tax Foreclosures NC — shared stylesheet for the PUBLIC pages: the landing
   page and the four sign-in-family pages (login, signup, forgot, reset).
   The signed-in app keeps css/styles.css; nothing here is precached by the
   service worker. Direction D of the 2026-09 redesign: deep teal leads,
   Newsreader for headlines, IBM Plex Sans for text, IBM Plex Mono for money.

   Fonts are self-hosted (the security policy allows fonts from this origin
   only). Three latin files, all SIL Open Font License — see fonts/OFL-*.txt. */

@font-face {
    font-family: "Newsreader";
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("../fonts/newsreader-latin.woff2?v=1") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("../fonts/ibm-plex-sans-latin.woff2?v=1") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/ibm-plex-mono-latin.woff2?v=1") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --paper: #faf9f6;
    --ink: #111827;
    --text: #374151;
    --muted: #6b7280;
    --faint: #9ca3af;
    --border: #e5e7eb;
    --field-border: #d1d5db;
    --teal: #0d9488;
    --teal-dark: #0f766e;
    --teal-deep: #134e4a;
    --teal-tint: #f0fdfa;
    --teal-line: #ccfbf1;
    --teal-light: #99f6e4;
    --teal-ghost: #d5f2ee;
    --amber-bg: #fffbeb;
    --amber-text: #92400e;
    --amber: #d97706;
    --amber-dark: #b45309;
    --green: #16a34a;
    --green-text: #15803d;
    --green-bg: #f0fdf4;
    --err: #b91c1c;
    --serif: "Newsreader", Georgia, "Times New Roman", serif;
    --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --mono: "IBM Plex Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
/* The hidden attribute wins over every display rule below (.stat is flex,
   .listing-card is block): js/public.js hides and shows with it. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--paper); color: var(--ink);
    font-family: var(--sans); font-size: 17px; line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { color: var(--teal-deep); text-decoration: underline; }
p { margin: 0; }
h1, h2, h3, .serif {
    font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; margin: 0;
}
.mono { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.eyebrow {
    font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--teal-dark); margin: 0;
}
.eyebrow.on-dark { color: var(--teal-light); }

/* ---------- brand mark: house icon in a white square + serif wordmark ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; text-decoration: none; }
.brand-mark {
    display: inline-flex; width: 30px; height: 30px; border-radius: 8px; background: #fff;
    align-items: center; justify-content: center; flex: none;
}
.brand-mark svg { display: block; width: 18px; height: 18px; }
.brand-name { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.brand.compact .brand-mark { width: 26px; height: 26px; border-radius: 7px; }
.brand.compact .brand-mark svg { width: 15px; height: 15px; }
.brand.compact .brand-name { font-size: 18px; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 50px; padding: 0 22px; border-radius: 10px; border: 0;
    font-family: var(--sans); font-size: 16px; font-weight: 600; line-height: 1;
    text-decoration: none; white-space: nowrap; cursor: pointer;
    transition: background-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible { outline: 3px solid var(--teal-dark); outline-offset: 2px; }
/* On the teal surfaces the dark ring vanishes; the light one is 7.5:1 there. */
.on-teal .btn:focus-visible { outline-color: var(--teal-light); }
.btn-white { background: #fff; color: var(--teal-dark); box-shadow: 0 1px 2px rgba(17,24,39,.18), 0 8px 24px rgba(0,0,0,.18); }
.btn-white:hover { background: var(--teal-tint); color: var(--teal-deep); }
/* --teal-dark, not --teal: white on #0d9488 is 3.7:1, short of AA for button text. */
.btn-primary { background: var(--teal-dark); color: #fff; box-shadow: 0 1px 2px rgba(17,24,39,.12), 0 6px 18px rgba(13,148,136,.28); }
.btn-primary:hover { background: var(--teal-deep); color: #fff; }
.btn-outline { background: transparent; color: var(--teal-dark); border: 1.5px solid var(--teal); }
.btn-outline:hover { background: var(--teal-tint); color: var(--teal-deep); }
.btn-sm { height: 42px; padding: 0 18px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: default; }

/* ---------- small parts ---------- */
.pill {
    display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px;
    border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.pill-live { background: var(--green-bg); color: var(--green-text); }
.pill-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); display: inline-block; }
.pill-teal { background: var(--teal-tint); color: var(--teal-dark); }
.pill-strong { background: var(--teal-dark); color: #fff; }
.pill-grey { background: #f3f4f6; color: var(--text); }
.pill-white { background: #fff; color: var(--teal-dark); }

.row {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    padding: 9px 0; border-top: 1px solid var(--border);
}
.row-label { font-size: 13px; color: var(--muted); }
.row-val { font-family: var(--mono); font-weight: 500; font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- live stats (mono number over a small label) ---------- */
.stats { display: flex; gap: 36px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.22); }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; font-size: 26px; color: #fff; line-height: 1.15; }
.stat-label { font-size: 13px; color: var(--teal-light); line-height: 1.3; }

/* ---------- the live listing card ----------
   Filled by js/public.js from /api/featured-listing (textContent only) and
   hidden until that succeeds, so nothing on it is ever a placeholder. */
.listing-card {
    background: #fff; color: var(--ink); border: 1px solid var(--field-border); border-radius: 14px;
    padding: 20px 22px 18px; box-shadow: 0 24px 60px rgba(0,0,0,.30);
}
.listing-card-badges { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.listing-card .listing-address { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; font-size: 23px; line-height: 1.2; }
.listing-card .listing-county { font-size: 13.5px; color: var(--muted); margin: 2px 0 12px; }
.listing-card .listing-rows { border-bottom: 1px solid var(--border); }
.listing-card .row-next {
    align-items: center; padding: 9px 12px; margin: 0 -12px; background: var(--amber-bg);
    border-radius: 8px; border-top: 0;
}
.listing-card .row-next .row-label { color: var(--amber-text); display: flex; flex-direction: column; gap: 1px; }
.listing-card .row-next .row-note { font-size: 11.5px; color: var(--amber-text); }
.listing-card .row-next .row-val { font-size: 20px; color: var(--amber-text); }
.listing-card-note { font-size: 13px; text-align: center; font-style: italic; color: var(--teal-line); margin-top: 10px; }

/* ---------- forms (sign-in family) ---------- */
.field-group { display: flex; flex-direction: column; gap: 8px; }
.field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.field-head a { font-size: 13.5px; font-weight: 500; }
.field {
    width: 100%; height: 50px; padding: 0 14px; border: 1px solid var(--field-border);
    border-radius: 10px; background: #fff; font-family: var(--sans); font-size: 16px; color: var(--ink);
    outline: none; transition: border-color .15s, box-shadow .15s;
}
.field:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(13,148,136,.16); }
.field-wrap { position: relative; }
.field-wrap .field { padding-right: 68px; }
.field-toggle {
    position: absolute; top: 0; right: 0; height: 50px; padding: 0 14px; border: 0; background: transparent;
    font-family: var(--sans); font-size: 13.5px; font-weight: 600; color: var(--teal-dark); cursor: pointer;
}
.field-toggle:hover { color: var(--teal-deep); text-decoration: underline; }
.field-toggle:focus-visible { outline: 3px solid var(--teal-dark); outline-offset: -4px; border-radius: 8px; }
/* An inline, link-looking button. `.field-toggle` is the other text button
   on these pages but it is absolutely positioned inside a field wrap, so it
   cannot be reused in a sentence. */
.textlink {
    border: 0; padding: 0; background: transparent; font-family: var(--sans);
    font-size: inherit; font-weight: 600; color: var(--teal-dark); cursor: pointer;
}
.textlink:hover { color: var(--teal-deep); text-decoration: underline; }
.textlink:focus-visible { outline: 3px solid var(--teal-dark); outline-offset: 2px; border-radius: 4px; }
.textlink[disabled] { color: var(--muted); cursor: default; text-decoration: none; }
/* The line and its status message are ONE flex item, and the message keeps
   no height until it has something to say — otherwise every visitor who never
   presses the button pays ~40px of blank space for it. Same idea as the
   `.turnstile:not(:empty)` rule above. It stays in the DOM (rather than
   display:none) so role="status" still announces the text when it arrives. */
.resend-line > p { margin: 0; }
#resend-msg:empty { min-height: 0; }
.hint { font-size: 13px; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; flex: none; accent-color: var(--teal); }
.check label { font-size: 13.5px; font-weight: 400; color: var(--text); line-height: 1.5; }
.msg { font-size: 13.5px; min-height: 20px; margin: 0; }
.msg.error { color: var(--err); }
.msg.info { color: var(--muted); }
.msg.ok { color: var(--green-text); }
/* The verification check (Cloudflare Turnstile, interaction-only) renders
   into this slot ONLY when a challenge is needed; empty, it takes no room. */
.turnstile:not(:empty) { margin: 2px 0; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.invite-banner {
    border: 1px solid var(--teal); background: var(--teal-tint); border-radius: 10px;
    padding: 14px 16px; font-size: 14px; color: var(--text);
}
.invite-banner p { margin: 0; }
.invite-banner .invite-alt { margin-top: 8px; font-size: 13px; }
.invite-banner a { font-weight: 600; }

/* ---------- auth page shells ---------- */
.auth-top {
    display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 20px;
    background: var(--teal-deep);
}
.auth-top a { color: #fff; font-size: 13.5px; font-weight: 500; }
.auth-top a:hover { color: #fff; }
/* The form column is capped at every width: without this the stacked
   layout let the fields run the full width of a tablet. */
.auth-body { width: 100%; max-width: 440px; margin: 0 auto; padding: 32px 20px 24px;
    display: flex; flex-direction: column; gap: 20px; flex: 1; }
.auth-form { display: flex; flex-direction: column; gap: 20px; }
.auth-heading h1 { font-size: 32px; line-height: 1.1; }
.auth-heading { display: flex; flex-direction: column; gap: 4px; }
.auth-footnote { font-size: 12.5px; text-align: center; color: var(--muted); }
.auth-counts {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px;
    width: 100%; max-width: 480px; margin: 0 auto;
    padding: 18px 20px 24px; background: var(--teal-tint); border-top: 1px solid var(--teal-line);
}
.auth-counts .stat-num { color: var(--teal-dark); font-size: 20px; }
.auth-counts .stat-label { color: var(--muted); font-size: 11.5px; }

/* Phone-first: one column, form first, live counts underneath. */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; background: #fff; }
.auth-panel { display: none; }

/* Desktop split (the sign-in board): teal panel left, form right. */
@media (min-width: 1024px) {
    .auth-page.split { flex-direction: row; }
    .auth-page.split .auth-top, .auth-page.split .auth-counts { display: none; }
    .auth-panel {
        display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
        flex: 1.15 1 0; padding: 40px 56px; color: #fff;
        background: radial-gradient(900px 700px at 15% 110%, var(--teal-dark) 0%, var(--teal-deep) 60%);
    }
    .auth-panel-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: center; }
    .auth-panel .auth-panel-title { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; font-size: 44px; line-height: 1.08; color: #fff; text-wrap: balance; }
    .auth-panel .lede { font-size: 17px; color: var(--teal-line); max-width: 380px; }
    .auth-panel .stats { gap: 30px; padding-top: 16px; }
    .auth-panel .stat-num { font-size: 24px; }
    .auth-panel .stat-label { font-size: 12.5px; }
    .auth-panel .listing-card { box-shadow: 0 18px 44px rgba(17,24,39,.10); }
    .auth-panel .listing-card .listing-address { font-size: 22px; }
    .auth-panel-foot { font-size: 13.5px; color: var(--teal-line); }
    .auth-panel-foot a { color: #fff; text-decoration: underline; }
    /* min-width holds the board's 400px form at the narrow end of the split;
       above ~1130px the ratio governs and the panel keeps its share. */
    .auth-main { flex: 0.85 1 0; min-width: 480px; display: flex; align-items: center; justify-content: center; padding: 40px; }
    .auth-main .auth-body { width: 100%; max-width: 400px; padding: 0; gap: 22px; }
    .auth-heading h1 { font-size: 34px; }
}
/* Centered card (create account / forgot / reset): brand bar, then the form. */
.auth-page.card-page .auth-main { display: flex; justify-content: center; padding: 0 20px 40px; }
.auth-page.card-page .auth-body { width: 100%; max-width: 440px; }
@media (min-width: 1024px) {
    .auth-page.card-page { background: var(--paper); }
    .auth-page.card-page .auth-main { padding: 48px 20px 64px; }
    .auth-page.card-page .auth-body {
        background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 36px 36px 32px;
        box-shadow: 0 18px 44px rgba(17,24,39,.08);
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn, .field, .field-toggle { transition: none; }
}
