:root {
  --ink: #12201e; --ink-2: #44524f; --muted: #6b7774;
  --bg: #f6f5f1; --surface: #ffffff; --line: #e3e1da;
  --brand: #123b36; --brand-2: #1d5a52; --accent: #e0a43b;
  --ok: #1c7c54; --ok-bg: #e5f4ec; --err: #b3261e; --err-bg: #fbe9e7; --live: #6d28d9; --live-bg: #f1eafe;
  --radius: 14px; --shadow: 0 1px 2px rgb(18 32 30 / .06), 0 8px 24px rgb(18 32 30 / .06);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand-2); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.inline { display: inline; margin: 0; }
.opt, .hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
.hint { display: block; }

/* Top bar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; color: var(--brand); text-decoration: none; font-weight: 700; font-size: 1.35rem; letter-spacing: -.02em; }
.logo-mark { width: 28px; height: 28px; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav a:not(.btn), .linkish { color: var(--ink-2); text-decoration: none; font: inherit; font-size: .95rem; background: none; border: 0; padding: 0; cursor: pointer; }
.nav a:not(.btn):hover, .linkish:hover { color: var(--ink); text-decoration: underline; }
.demo-bar { background: var(--accent); color: #2b1d04; text-align: center; padding: 8px 16px; font-size: .9rem; }
.demo-bar a { color: inherit; font-weight: 600; }
.main { padding: 32px 0 56px; min-height: calc(100vh - 160px); }
.footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 24px 0 32px; color: var(--muted); font-size: .875rem; border-top: 1px solid var(--line); }
.footer a { color: inherit; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--brand); color: #fff; border: 1px solid var(--brand);
  border-radius: 10px; padding: 10px 18px; font: 600 .95rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background .15s, transform .05s; }
.btn:hover { background: var(--brand-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--line); }
.btn-ghost:hover { background: #eef1ee; }
.btn-sm { padding: 7px 12px; font-size: .85rem; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.danger { color: var(--err) !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }

/* Forms */
.stack { display: grid; gap: 16px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
input, select, textarea { width: 100%; font: 400 1rem/1.45 var(--font); color: var(--ink); background: #fff; border: 1px solid #d3d1c8; border-radius: 10px; padding: 10px 12px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgb(29 90 82 / .15); }
input[type=file] { padding: 8px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.check input { width: auto; }
.field-error { color: var(--err); font-weight: 500; font-size: .85rem; }
fieldset { border: 0; padding: 0; margin: 0 0 8px; display: grid; gap: 14px; }
legend { font-weight: 700; font-size: 1.05rem; margin-bottom: 10px; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 14px; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 2fr 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
.tone-picker { display: flex; flex-wrap: wrap; gap: 10px; }
.tone input { position: absolute; opacity: 0; }
.tone span { display: block; padding: 9px 14px; border: 1px solid #d3d1c8; border-radius: 999px; background: #fff; font-weight: 500; cursor: pointer; }
.tone input:checked + span { background: var(--brand); color: #fff; border-color: var(--brand); }
.tone input:focus-visible + span { outline: 3px solid var(--accent); }
.form-actions { padding-top: 8px; }
.current-photo { display: flex; align-items: center; gap: 14px; }
.current-photo img { border-radius: 8px; object-fit: cover; }
.danger-zone { margin-top: 18px; text-align: right; }

/* Cards & layout */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.narrow { max-width: 560px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin-bottom: .15em; }
.page-head p { margin: 0; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.back { display: inline-block; color: var(--muted); text-decoration: none; font-size: .9rem; margin-bottom: 6px; }
.empty { text-align: center; padding: 48px 24px; }
.auth-card { max-width: 440px; margin: 24px auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.flash { border-radius: 10px; padding: 12px 16px; margin-bottom: 20px; background: var(--ok-bg); color: var(--ok); font-weight: 500; }
.flash-error { background: var(--err-bg); color: var(--err); }
.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: #eceae3; color: var(--ink-2); }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-live { background: var(--live-bg); color: var(--live); }

/* Dashboard */
.listing-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.listing-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.listing-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgb(18 32 30 / .12); }
.thumb { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--brand), var(--brand-2)) center / cover; display: grid; place-items: center; color: rgb(255 255 255 / .75); font-weight: 600; }
.listing-card-body { padding: 16px; display: grid; gap: 4px; }
.price { font-weight: 700; color: var(--brand); }
.badges { display: flex; gap: 6px; margin-top: 6px; }

/* Kit */
.kit-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; font-size: .9rem; }
.kit { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .kit { grid-template-columns: 1fr 1fr; }
  .kit-headline, .kit-mls_description, .kit-email_body { grid-column: 1 / -1; }
}
.kit-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.kit-item header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.kit-item h3 { margin: 0; }
.kit-tools { display: flex; align-items: center; gap: 10px; }
.count { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.count.over { color: var(--err); font-weight: 700; }
.kit-text { border-color: transparent; background: #fafaf7; padding: 10px 12px; field-sizing: content; min-height: 2.6em; }
.kit-text:hover { border-color: var(--line); }
.kit-headline .kit-text { font: 600 1.3rem/1.3 var(--serif); }
.kit-text.saved { box-shadow: 0 0 0 2px var(--ok-bg); }
.compliance { background: #fff8e8; border: 1px solid #f1dca7; border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px; font-size: .95rem; }
.compliance ul { margin: 6px 0 0; padding-left: 20px; }
.gen-status { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
.gen-status[hidden], .gen-error[hidden] { display: none; }
.spinner { width: 20px; height: 20px; border: 3px solid #d9e5e2; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.publish { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 24px; }
.publish p { margin: 0; word-break: break-all; }

/* Landing */
.hero { display: grid; gap: 40px; align-items: center; padding: 24px 0 56px; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.1fr .9fr; padding-top: 40px; } }
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--brand-2); margin-bottom: 12px; }
.hero h1 { font: 600 clamp(2.3rem, 5.5vw, 3.6rem)/1.05 var(--serif); letter-spacing: -.02em; color: var(--brand); }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 10px; }
.fineprint { font-size: .85rem; color: var(--muted); }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px rgb(18 59 54 / .18); overflow: hidden; transform: rotate(1deg); }
.mock-head { display: flex; gap: 6px; padding: 12px 14px; background: #f0efe9; }
.mock-head .dot { width: 10px; height: 10px; border-radius: 50%; background: #d6d3c9; }
.mock-body { padding: 20px 22px; font-size: .92rem; color: var(--ink-2); }
.mock-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; color: var(--ink); }
.mock-chip { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-2); margin-bottom: 4px; }
.mock-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.mock-chips span { background: var(--ok-bg); color: var(--ok); border-radius: 999px; padding: 3px 10px; font-size: .78rem; font-weight: 600; }
.features { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); padding: 8px 0 48px; }
.features article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.features p { color: var(--ink-2); margin: 0; font-size: .95rem; }
.roadmap { padding: 8px 0 24px; }
.steps { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); counter-reset: s; }
.steps li { border: 1px dashed #cfccc2; border-radius: 12px; padding: 14px 16px; display: grid; gap: 2px; counter-increment: s; }
.steps li::before { content: "Phase " counter(s); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.steps li span { font-size: .88rem; color: var(--muted); }
.steps .is-live { border: 1px solid var(--brand); background: var(--surface); }
.steps .is-live span { color: var(--ok); font-weight: 600; }

/* Public property page */
.property-page { background: #fff; }
.prop-hero { min-height: 56vh; background: var(--brand) center / cover; display: flex; align-items: flex-end; position: relative; color: #fff; }
.prop-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(10 24 22 / .85), rgb(10 24 22 / .1) 60%); }
.prop-hero.no-photo { min-height: 38vh; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.prop-hero.no-photo::before { display: none; }
.prop-hero-inner { position: relative; padding: 48px 0 36px; }
.prop-hero .eyebrow { color: var(--accent); }
.prop-hero h1 { font: 600 clamp(2rem, 5vw, 3.2rem)/1.1 var(--serif); max-width: 18em; }
.prop-hero p { font-size: 1.1rem; opacity: .9; margin: 0; }
.prop-main { padding: 32px 0 56px; }
.prop-facts { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 36px; }
.prop-facts div { border: 1px solid var(--line); border-radius: 12px; padding: 14px 20px; display: grid; min-width: 110px; }
.prop-facts b { font-size: 1.4rem; color: var(--brand); }
.prop-facts span { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.prop-cols { display: grid; gap: 32px; }
@media (min-width: 860px) { .prop-cols { grid-template-columns: 1fr 320px; align-items: start; } }
.prop-desc { font-size: 1.08rem; color: var(--ink-2); }
.prop-highlights { padding-left: 20px; }
.prop-highlights li { margin-bottom: 6px; }
.agent-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 8px; position: sticky; top: 24px; box-shadow: var(--shadow); }
.agent-card b { font-size: 1.2rem; }
.agent-card .btn { margin-top: 6px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: 1.5s !important; } }
