/* Katy Guide — shared styles. Phone-first, one column; list left / map right at >=860px. */
:root {
  color-scheme: light;
  --ink: #1f2933;
  --muted: #52606d;
  --rule: #d9d4cb;
  --paper: #f6f3ee;
  --card: #fffdf9;
  --accent: #0f5f5c;
  --accent-soft: #e3eeec;
  --warn: #8a5a12;
  --warn-bg: #fbf1dc;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
a { color: var(--accent); }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.site-bar { border-bottom: 1px solid var(--rule); background: var(--card); }
.site-bar-inner {
  max-width: 60rem; margin: 0 auto; padding: 0.7rem 1.35rem;
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.wordmark {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.wordmark span { color: var(--accent); }
.site-nav { font-size: 0.9rem; display: flex; gap: 1rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 0.15em; }

main { max-width: 40rem; margin: 0 auto; padding: 1.75rem 1.35rem 3.5rem; }
.crumbs { font-size: 0.85rem; color: var(--muted); margin: 0 0 0.9rem; }
.crumbs a { color: var(--muted); }

.layout { display: flex; flex-direction: column; gap: 1.35rem; margin: 0 0 2.5rem; }
.primary { min-width: 0; }
.page-head { margin-bottom: 1.2rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--rule); }
h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.15rem); line-height: 1.15; letter-spacing: -0.025em;
  font-weight: 700; margin: 0 0 0.75rem;
}
h2 { font-size: 1.2rem; letter-spacing: -0.015em; margin: 0 0 0.85rem; line-height: 1.25; }
.lede { margin: 0; color: var(--muted); font-size: 1.05rem; max-width: 36em; }
.updated { margin: 0 0 0.9rem; font-size: 0.85rem; color: var(--muted); }
.page-head .updated { margin: 0.6rem 0 0; }
.primary > h2 { margin-top: 0.2rem; }
.prose { max-width: 40rem; }
.prose p { margin: 0 0 0.8rem; }

.banner {
  background: var(--warn-bg); color: var(--warn); border: 1px solid #ecd6a8;
  border-radius: 2px; padding: 0.6rem 0.85rem; font-size: 0.92rem; font-weight: 600; margin: 0 0 1rem;
}

.listings, .trades, .city-links {
  display: flex; flex-direction: column; gap: 0.9rem; margin: 0; padding: 0; list-style: none;
}
.card {
  background: var(--card); border: 1px solid var(--rule); border-top: 3px solid var(--ink);
  border-radius: 2px; padding: 1.1rem 1.2rem 1.15rem;
}
.phone {
  display: block; font-size: clamp(1.6rem, 4.2vw, 1.9rem); font-weight: 700; letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums; line-height: 1.2; margin: 0 0 0.3rem;
  text-decoration: none; color: var(--ink);
}
a.phone:hover, a.phone:focus-visible { color: var(--accent); text-decoration: underline; text-underline-offset: 0.12em; }
.phone.is-placeholder { color: #9aa5b1; }
.name { margin: 0 0 0.55rem; font-size: 1.08rem; font-weight: 600; letter-spacing: -0.01em; }
.name a { color: inherit; }
.facts { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.2rem 0.85rem; font-size: 0.92rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.facts .na { color: #9aa5b1; }

.trades .card a.trade, .city-links a {
  display: block; font-size: clamp(1.2rem, 3.5vw, 1.4rem); font-weight: 700; letter-spacing: -0.015em;
  line-height: 1.25; text-decoration: none; color: var(--ink);
}
.trades .card a.trade:hover, .city-links a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 0.12em; }
.trades .note, .city-links .note { margin: 0.3rem 0 0; font-size: 0.92rem; color: var(--muted); }
.trades .soon { border-top-color: var(--rule); background: transparent; }
.trades .soon .trade { color: #8b96a1; font-size: clamp(1.2rem, 3.5vw, 1.4rem); font-weight: 700; display: block; line-height: 1.25; }
.tag {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 0.1rem 0.45rem; border-radius: 2px; vertical-align: middle; margin-left: 0.4rem;
}
.tag-live { background: var(--accent-soft); color: var(--accent); }
.tag-soon { background: #ebe7e0; color: #6b7682; }

.map-section { margin: 0; min-width: 0; }
.map-label { margin: 0 0 0.45rem; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.map-note { margin: 0.45rem 0 0; font-size: 0.82rem; color: var(--muted); }
.map { width: 100%; height: 240px; background: var(--card); border: 1px solid var(--rule); border-radius: 2px; z-index: 0; }
.khp-marker { background: transparent !important; border: none !important; }
.khp-pin { display: block; width: 32px; height: 32px; filter: drop-shadow(0 1px 1px rgba(31, 41, 51, 0.3)); }
.leaflet-container { font: inherit; background: var(--card); }
.leaflet-popup-content-wrapper { border-radius: 2px; box-shadow: 0 2px 8px rgba(31, 41, 51, 0.14); }
.leaflet-popup-content { margin: 0.55rem 0.75rem; font-size: 0.92rem; line-height: 1.35; color: var(--ink); }
.leaflet-popup-content a { color: var(--accent); font-weight: 600; }

.section { border-top: 1px solid var(--rule); padding-top: 1.6rem; margin-top: 2rem; }
.section p { margin: 0 0 0.8rem; }
.cost-figure { font-size: 1.05rem; }
.cost-figure strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.source { font-size: 0.85rem; color: var(--muted); }

.faq details { background: var(--card); border: 1px solid var(--rule); border-radius: 2px; padding: 0.9rem 1.1rem; margin-bottom: 0.6rem; }
.faq summary { font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--muted); font-weight: 500; margin-left: 0.5rem; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0.65rem 0 0; color: var(--muted); font-size: 0.98rem; }
.faq ul { margin: 0.5rem 0 0; padding-left: 1.2rem; color: var(--muted); font-size: 0.98rem; }

footer { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: 0.82rem; color: var(--muted); }
footer p { margin: 0 0 0.5rem; }

@media (min-width: 640px) {
  main { padding: 2.25rem 1.75rem 4rem; }
  .site-bar-inner { padding: 0.75rem 1.75rem; }
  .card { padding: 1.2rem 1.4rem 1.3rem; }
  .map { height: 300px; }
  .city-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 860px) {
  main { max-width: 60rem; }
  .layout {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
    gap: 1.5rem 1.75rem; align-items: start;
  }
  .map-section { position: sticky; top: 1.25rem; }
  .map { height: 420px; }
  .city-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Listing notes, Sugar Land compact list */
.list-note { margin: -0.4rem 0 0.9rem; font-size: 0.85rem; color: var(--muted); }
.compact { list-style: none; margin: 0.6rem 0 0; padding: 0; border-top: 1px solid var(--rule); }
.compact li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.2rem 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
.sl-name { font-weight: 600; }
.sl-phone { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); text-decoration: none; white-space: nowrap; }
.sl-phone:hover { color: var(--accent); text-decoration: underline; }
@media (min-width: 860px) { .compact { columns: 2; column-gap: 2rem; } .compact li { break-inside: avoid; } }

/* Foundation cracks guide */
.guide-link { margin: 1.6rem 0 0; padding: 0.75rem 0.9rem; border-left: 3px solid var(--accent); background: var(--card); font-size: 0.98rem; }
.quick p { margin: 0; font-size: 1.05rem; }
.crack-cards { margin-top: 0.9rem; }
.crack-card h3, .when h3 { margin: 0 0 0.55rem; font-size: 1.08rem; letter-spacing: -0.01em; }
.when { display: flex; flex-direction: column; gap: 0.9rem; }
.when p { margin: 0; }
.chart { margin: 0 0 1rem; }
.chart img { display: block; max-width: 100%; height: auto; border: 1px solid var(--rule); }
.todo { display: inline-block; background: var(--warn-bg); color: var(--warn); border: 1px dashed #d9b46a; padding: 0.05rem 0.4rem; font-size: 0.85rem; font-weight: 600; border-radius: 2px; }
.todo-block { background: var(--warn-bg); color: var(--warn); border: 1px dashed #d9b46a; padding: 0.7rem 0.9rem; border-radius: 2px; margin: 0 0 0.6rem; font-size: 0.92rem; }
@media (min-width: 860px) { .when { flex-direction: row; } .when .card { flex: 1; } .guide { max-width: 44rem; } }
.checker { margin: 1.6rem 0 0; }
.checker ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.checker a { display: inline-block; padding: 0.55rem 0.8rem; min-height: 44px; border: 1px solid var(--rule); border-radius: 2px; background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; line-height: 1.3; }
.checker a:hover, .checker a:focus-visible { border-color: var(--accent); color: var(--accent); }
.crack-card:target { border-top-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.chart figcaption { font-size: 0.8rem; color: var(--muted); margin-top: 0.4rem; }
.chart { margin: 1.4rem 0 0; }
.doubt { margin: 1rem 0 0; font-weight: 600; }
.crack-illus { margin: 0 0 0.8rem; position: relative; max-width: 100%; }
.crack-illus img { display: block; width: 100%; height: 100%; object-fit: cover; border: 1px solid var(--rule); border-radius: 2px; background: var(--paper); }
.crack-illus figcaption { position: absolute; left: 0.4rem; bottom: 0.4rem; font-size: 0.72rem; background: rgba(255,253,249,0.9); color: var(--muted); padding: 0.05rem 0.35rem; border-radius: 2px; }
@media (min-width: 860px) { .crack-illus { max-width: 26rem; } }
