/* Toft public site. One stylesheet for every page.
   Colours are the app's palette from lib/theme.ts; keep the two in step.
   No external fonts or requests: system faces only. */

:root {
  --navy: #0D1B2A;       /* theme.colors.navy */
  --green: #16A34A;      /* theme.colors.green (decoration only: 2.9:1 on cream, not for text) */
  --cream: #F5F1EA;      /* theme.colors.cream */
  --sand: #E7DED1;       /* theme.colors.sand */
  --charcoal: #2F3A45;   /* theme.colors.charcoal */
  --mist: #D8D4CD;       /* theme.colors.mistGrey */
  --soft-white: #FCFAF7; /* theme.colors.softWhite */
  --terracotta: #C97A5A; /* theme.colors.terracotta (decoration only) */
  --muted: #55606B;      /* navy at 70% on soft white, as textSecondary in the app */

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure: 34rem;
  --page: 68rem;
  --gutter: 1.25rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--soft-white);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 1.875rem; }
h3 { font-family: var(--sans); font-size: 1.0625rem; font-weight: 650; line-height: 1.35; letter-spacing: 0; }

p { margin: 0 0 1rem; }

a { color: var(--navy); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 2px; }
.band-navy :focus-visible { outline-color: var(--cream); }

.skip {
  position: absolute; left: var(--gutter); top: -4rem;
  background: var(--navy); color: var(--cream); padding: 0.6rem 1rem; border-radius: 6px; z-index: 10;
}
.skip:focus { top: 0.75rem; }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--mist); background: var(--soft-white); }
/* One header on every page (functions/_lib/site-shell.js). Narrow screens:
   logo and button on the first row, the links wrap on the rows below. No
   script. Wide screens: one row. */
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding-top: 0.9rem; padding-bottom: 0.6rem; }
.brand { display: inline-block; line-height: 0; }
.brand img { width: 107px; height: 40px; }
.site-nav { order: 3; flex: 1 1 100%; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 1.1rem; margin: 0; padding: 0; }
.site-nav a { font-size: 0.9375rem; font-weight: 550; text-decoration: none; padding: 0.45rem 0; display: inline-block; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.3em; }
.header-cta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; }
.button-small { font-size: 0.9375rem; padding: 0.5rem 0.9rem; border-radius: 8px; }

/* ---------- hero ---------- */
.hero { padding: 3rem 0 3.5rem; }
.hero-grid { display: grid; gap: 2.25rem; }
.eyebrow {
  font-size: 0.8125rem; font-weight: 650; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--charcoal); margin: 0 0 1rem;
}
.eyebrow::before {
  content: ""; display: inline-block; width: 0.6rem; height: 0.6rem; background: var(--green);
  margin-right: 0.6rem; vertical-align: 0.02em;
}
.lede { font-size: 1.1875rem; line-height: 1.55; max-width: var(--measure); margin: 1.25rem 0 1.75rem; }
.hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin: 0; }
.hero-webapp { margin-top: 1rem; }
.hero-art { margin: 0; }
.hero-art img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 70%; border-radius: 14px; background: var(--sand); }

.button {
  display: inline-block; background: var(--navy); color: var(--cream); font-weight: 600;
  padding: 0.85rem 1.4rem; border-radius: 10px; text-decoration: none; font-size: 1rem; line-height: 1.2;
  border: 2px solid var(--navy);
}
.button:hover { background: #1B2D42; border-color: #1B2D42; }
.button-light { background: var(--cream); color: var(--navy); border-color: var(--cream); }
.button-light:hover { background: #FFFFFF; border-color: #FFFFFF; }
.button-big { font-size: 1.125rem; padding: 1rem 1.75rem; }

/* ---------- sections ---------- */
.section { padding: 3.5rem 0; }
.band-cream { background: var(--cream); }
.band-navy { background: var(--navy); color: var(--cream); }
.band-navy h2, .band-navy a { color: var(--cream); }
.section-head { max-width: var(--measure); margin-bottom: 2rem; }
.section-head p { margin: 0.9rem 0 0; }
.kicker { font-size: 0.8125rem; font-weight: 650; letter-spacing: 0.09em; text-transform: uppercase; margin: 0 0 0.75rem; color: var(--charcoal); }
.band-navy .kicker { color: var(--cream); }

.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.points li { padding: 1.15rem 0; border-top: 1px solid var(--mist); }
.band-cream .points li { border-top-color: #CFC8BB; }
.points li:last-child { padding-bottom: 0; }
.points p { margin: 0.3rem 0 0; color: var(--charcoal); }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 1.75rem; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: block; font-family: var(--serif); font-size: 2.5rem; line-height: 1;
  color: var(--navy); margin-bottom: 0.6rem; padding-bottom: 0.6rem; border-bottom: 2px solid var(--green); width: 2.5rem;
}
.steps p { margin: 0.3rem 0 0; }

.plain { max-width: var(--measure); }
.plain ul { padding-left: 1.1rem; margin: 0; }
.plain li { margin-bottom: 0.6rem; }
.plain li::marker { color: var(--charcoal); }

.launch { text-align: left; }
.launch h2 { font-size: 2.125rem; }
.launch p { max-width: var(--measure); }
.store-status {
  display: inline-block; border: 1.5px solid var(--cream); border-radius: 10px; padding: 0.8rem 1.2rem;
  font-weight: 600; margin: 0.75rem 1rem 0.75rem 0;
}
.launch .fine { font-size: 0.9375rem; margin-top: 1.25rem; }

/* ---------- documents (privacy, terms, support) ---------- */
.doc { padding: 2.75rem 0 4rem; }
.doc .wrap { max-width: 44rem; }
.doc h1 { margin-bottom: 0.75rem; }
.doc h2 { font-family: var(--sans); font-size: 1.1875rem; font-weight: 650; letter-spacing: 0; line-height: 1.35; margin: 2.25rem 0 0.6rem; }
.doc .effective { color: var(--muted); font-size: 0.9375rem; margin-bottom: 1.5rem; }
.doc ol, .doc ul { padding-left: 1.3rem; }
.doc li { margin-bottom: 0.5rem; }
.doc address { font-style: normal; }
.doc .toc { list-style: none; padding: 0; margin: 0 0 1rem; border-top: 1px solid var(--mist); }
.doc .toc li { margin: 0; border-bottom: 1px solid var(--mist); }
.doc .toc a { display: block; padding: 0.7rem 0; text-decoration: none; font-weight: 550; }
.doc .toc a:hover { text-decoration: underline; }

/* ---------- bridge pages (open in app) ---------- */
.bridge { padding: 3rem 0 4rem; }
.bridge .wrap { max-width: 34rem; }
.bridge h1 { font-size: 2rem; margin-bottom: 1rem; }
.bridge .actions { margin: 1.75rem 0; }
.bridge .note { border-top: 1px solid var(--mist); padding-top: 1.25rem; margin-top: 1.5rem; }
[hidden] { display: none !important; }

/* ---------- rentals and listing pages (rendered by functions/) ---------- */
.rentals-page, .listing-page { padding: 2rem 0 4rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; margin: 0 0 1.25rem; padding: 0; font-size: 0.9375rem; }
.crumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--muted); }
.rentals-head { margin-bottom: 1.5rem; }
.rentals-head h1, .listing-head h1 { font-size: 2.125rem; overflow-wrap: anywhere; }

.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 1rem; align-items: end; padding: 1.1rem 0 1.25rem; margin-bottom: 1.75rem; border-top: 1px solid var(--mist); border-bottom: 1px solid var(--mist); }
.filters p { margin: 0; }
.filters label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--navy); margin-bottom: 0.3rem; }
.filters select, .filters input[type="number"] {
  width: 100%; font: inherit; color: var(--navy); background: #FFFFFF; border: 1px solid #8A939C; border-radius: 8px;
  padding: 0.55rem 0.65rem; min-height: 2.75rem;
}
.filters .check { display: flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; }
.filters .check label { margin: 0; font-size: 1rem; font-weight: 500; }
.filters .check input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--navy); }
.filters-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
button.button { font-family: inherit; cursor: pointer; }
.button-quiet { background: transparent; color: var(--navy); }
.button-quiet:hover { background: var(--cream); border-color: var(--navy); }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem; }
.card { position: relative; background: #FFFFFF; border: 1px solid var(--mist); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.card:hover { border-color: #8A939C; }
.card:focus-within { outline: 3px solid var(--navy); outline-offset: 3px; }
.card-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--sand); }
.card-photo-none { background: var(--sand); }
.card-body { padding: 1rem 1.1rem 1.15rem; }
.card-body p { margin: 0; }
.card-area { font-size: 0.8125rem; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); overflow-wrap: anywhere; }
/* Paid boost (migration 0051): the words carry the meaning; the border is extra. */
.card-body .card-featured { display: inline-block; font-size: 0.8125rem; color: var(--navy); border: 1px solid var(--navy); border-radius: 999px; padding: 0.1rem 0.6rem; margin-bottom: 0.4rem; }
.card-featured strong { font-weight: 650; }
.card-title { font-family: var(--sans); font-size: 1.0625rem; font-weight: 650; line-height: 1.35; letter-spacing: 0; margin: 0.25rem 0 0.4rem; overflow-wrap: anywhere; }
.card-title a { text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card-title a:focus-visible { outline: none; }
.card:hover .card-title a { text-decoration: underline; }
.card-rent { color: var(--navy); }
.card-rent strong { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; }
.card-facts, .card-available { font-size: 0.9375rem; color: var(--charcoal); }

.empty { background: var(--cream); border-radius: 12px; padding: 1.5rem 1.25rem; max-width: 44rem; }
.empty p:last-child { margin-bottom: 0; }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; margin: 2.25rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--mist); font-size: 0.9375rem; }
.pager a { font-weight: 600; padding: 0.5rem 0; }
.pager > :last-child { text-align: right; }
.city-index { margin-top: 3rem; }
.city-index h2 { font-family: var(--sans); font-size: 1.1875rem; font-weight: 650; letter-spacing: 0; margin-bottom: 0.75rem; }
.city-index ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.city-index a { display: inline-block; padding: 0.35rem 0; }
.landlord-line { margin: 2.5rem 0 0; color: var(--charcoal); }

.listing-head { margin-bottom: 1.5rem; }
.listing-head .eyebrow { margin-bottom: 0.6rem; overflow-wrap: anywhere; }
.listing-rent { margin: 0.75rem 0 0; font-size: 1.0625rem; color: var(--navy); }
.listing-rent strong { font-family: var(--serif); font-size: 2rem; font-weight: 600; }
.listing-photos { margin-bottom: 2rem; }
.listing-photo-main { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 14px; background: var(--sand); }
.photo-grid { list-style: none; margin: 0.6rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
.photo-grid img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; background: var(--sand); }
.listing-cols { display: grid; gap: 2.25rem; }
.listing-main { min-width: 0; max-width: 44rem; }
.listing-main h2, .listing-cta h2 { font-family: var(--sans); font-size: 1.1875rem; font-weight: 650; letter-spacing: 0; line-height: 1.35; margin: 2rem 0 0.6rem; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin: 0; border-top: 1px solid var(--mist); }
.facts div { padding: 0.8rem 0; border-bottom: 1px solid var(--mist); }
.facts dt { font-size: 0.8125rem; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0.15rem 0 0; font-size: 1.125rem; font-weight: 600; color: var(--navy); }
.listing-description { white-space: pre-line; overflow-wrap: anywhere; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tags li { border: 1px solid #8A939C; border-radius: 999px; padding: 0.3rem 0.85rem; font-size: 0.9375rem; font-weight: 550; color: var(--navy); background: #FFFFFF; }
.listing-main address { font-style: normal; overflow-wrap: anywhere; }
.listed-by { margin: 2rem 0 0; color: var(--charcoal); overflow-wrap: anywhere; }
.listing-cta { background: var(--cream); border-radius: 14px; padding: 1.5rem 1.25rem; align-self: start; }
.listing-cta h2 { margin-top: 0; }
.listing-cta .actions { margin: 0 0 0.9rem; }
.listing-cta .button { display: block; text-align: center; }
.listing-cta p:last-child { margin-bottom: 0; }
.fine { font-size: 0.9375rem; }
.listing-foot { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--mist); }

@media (min-width: 44rem) {
  .rentals-head h1, .listing-head h1 { font-size: 2.75rem; }
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)) auto auto; }
  .filters-actions { grid-column: 1 / -1; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .facts { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 60rem) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .listing-cols { grid-template-columns: minmax(0, 1fr) 20rem; gap: 3.5rem; }
  .listing-cta { position: sticky; top: 1.5rem; }
}

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--mist); padding: 2.25rem 0 3rem; font-size: 0.9375rem; color: var(--charcoal); background: var(--soft-white); }
.footer-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2rem; margin: 0 0 1.75rem; }
.footer-title { font-family: var(--sans); font-size: 0.8125rem; font-weight: 650; letter-spacing: 0.09em; text-transform: uppercase; color: var(--charcoal); margin: 0 0 0.5rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a { display: inline-block; padding: 0.3rem 0; overflow-wrap: anywhere; }
.site-footer p { margin: 0 0 0.35rem; }

/* ---------- wider screens ---------- */
@media (min-width: 44rem) {
  :root { --gutter: 2rem; }
  h1 { font-size: 3.25rem; }
  h2 { font-size: 2.25rem; }
  .brand img { width: 118px; height: 44px; }
  .footer-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .section { padding: 5rem 0; }
  .points { grid-template-columns: 1fr 1fr; column-gap: 3rem; }
  .points li:last-child { padding-bottom: 1.15rem; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .launch h2 { font-size: 2.75rem; }
}
@media (min-width: 60rem) {
  .site-header .wrap { padding-bottom: 0.9rem; }
  .site-nav { order: 0; flex: 0 1 auto; margin-left: auto; }
  .site-nav ul { gap: 0 1.25rem; }
  h1 { font-size: 3.75rem; }
  .hero { padding: 4.5rem 0 5rem; }
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 4rem; }
  .split { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 4rem; align-items: start; }
  .split .section-head { margin-bottom: 0; position: sticky; top: 2rem; }
}

@media print {
  .site-header nav, .header-cta, .footer-nav, .skip, .hero-art, .filters, .pager, .listing-cta { display: none; }
  body { background: #fff; }
}

/* Home page: the second "How it works" list */
.how-second { margin-top: 2.5rem; }
