/* Nieto Properties portal theme: black ground, gold as accent only (matches nietoproperties.com). */
:root {
--ground: #0B0B0D; --ground-warm: #14141A; --surface: #131316; --surface-2: #1A1A1F; --line: #26242A;
--gold: #BCA480; --gold-lift: #E0C58F; --gold-deep: #8F7220;
--text: #F5F0E6; --muted: #9A958C; --field: #0F0F12; --field-line: #3A373F;
--good: #8FD0A8; --good-bg: #13261B; --watch: #E0C58F; --watch-bg: #2A2112;
--stop: #F0A0A0; --stop-bg: #2E1717; --info: #A9BEE6; --unknown: #8A857C;
--serif: "Playfair Display", "Iowan Old Style", Georgia, serif;
--sans: "Jost", "Avenir Next", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ground); color-scheme: dark; }
body {
margin: 0; color: var(--text); font-family: var(--sans); font-weight: 300; font-size: 17px; line-height: 1.65;
-webkit-font-smoothing: antialiased; background-color: var(--ground);
background-image: radial-gradient(90% 55% at 50% 0%, rgba(188,164,128,.07) 0%, transparent 62%), linear-gradient(100deg, rgba(188,164,128,.05) 0%, transparent 52%);
background-repeat: no-repeat; background-size: 100% 1200px; background-position: center top;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--text); line-height: 1.18; margin: 0 0 .6rem; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 5.2vw, 3.1rem); }
h2 { font-size: clamp(1.35rem, 3.2vw, 1.75rem); }
h3 { font-size: 1.1rem; margin-top: .4rem; }
h2 .sub { color: var(--muted); font-style: italic; }
p { margin: 0 0 .8rem; }
a { color: var(--gold); }
a:hover { color: var(--gold-lift); }
strong, b { font-weight: 500; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; background: var(--field); border: 1px solid var(--line); padding: .1rem .4rem; }
code.break { word-break: break-all; display: inline-block; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .na { color: var(--muted); font-style: italic; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }

.topbar { border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 12px; }
.wordmark { display: flex; align-items: baseline; gap: 14px; font-size: 11px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.wordmark .mark { font-family: var(--serif); font-size: 21px; letter-spacing: .15em; text-transform: uppercase; color: var(--text); font-weight: 400; }
.wordmark .sep { align-self: center; width: 1px; height: 16px; background: var(--gold); }
.who { display: flex; align-items: center; gap: 18px; font-size: .9rem; }
.who form { margin: 0; }
button.link, a.link { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); text-decoration: none; cursor: pointer; border-bottom: 1px solid transparent; letter-spacing: .06em; }
button.link:hover, a.link:hover { color: var(--gold); border-bottom-color: var(--gold); }

.banner { padding: 10px 20px; text-align: center; font-size: .9rem; font-weight: 400; }
.banner.sample { background: var(--stop-bg); color: var(--stop); border-bottom: 1px solid #5a2a2a; }
.banner.preview { background: var(--watch-bg); color: var(--watch); border-bottom: 1px solid #5a4a22; }
.notice { padding: 12px 16px; margin: 18px 0 0; border: 1px solid; }
.auth-card .notice { margin: 14px 0; background: var(--good-bg); color: var(--good); border-color: #24503a; }
.notice.ok { background: var(--good-bg); color: var(--good); border-color: #24503a; }
.notice.bad { background: var(--stop-bg); color: var(--stop); border-color: #5a2a2a; }

.hero { padding: 56px 0 22px; }
.eyebrow { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); font-weight: 500; margin: 0 0 .7rem; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 20px 0 22px; }
.chips li { border: 1px solid var(--line); padding: 4px 14px; font-size: .82rem; letter-spacing: .06em; color: var(--muted); background: var(--surface); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }

.btn { display: inline-block; font-family: var(--sans); font-size: 13px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; padding: 13px 26px; border: 1px solid rgba(188,164,128,.42); border-radius: 0; background: none; color: var(--gold); text-decoration: none; cursor: pointer; transition: border-color .2s, filter .2s; }
.btn:hover { border-color: var(--gold); color: var(--gold-lift); }
.btn.primary { color: var(--ground); border-color: var(--gold); background: linear-gradient(180deg, var(--gold-lift) 0%, var(--gold) 100%); }
.btn.primary:hover { filter: brightness(1.09); color: var(--ground); }
.btn.wide { width: 100%; margin-top: 16px; }
.btn[disabled] { opacity: .6; cursor: progress; }
:focus-visible { outline: 2px solid var(--gold-lift); outline-offset: 3px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 8px 0 24px; overflow-x: auto; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; font: inherit; font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); padding: 14px 18px; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--gold-lift); border-bottom-color: var(--gold); }

.card { background-color: var(--surface); background-image: linear-gradient(100deg, rgba(188,164,128,.055) 0%, transparent 58%); border: 1px solid var(--line); padding: 26px 28px; margin-bottom: 18px; }
.grid { display: grid; gap: 18px; align-items: start; margin-bottom: 18px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid > .card { margin-bottom: 0; }
.panel[hidden] { display: none; }
.stack { display: grid; gap: 12px; }

.kv { margin: 0; }
.kv-row { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv-row:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); font-size: .86rem; letter-spacing: .04em; }
.kv dd { margin: 0; font-weight: 400; overflow-wrap: anywhere; }
.kv.compact .kv-row { padding: 5px 0; border-bottom: 0; }

.glance { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.glance li { display: flex; gap: 12px; align-items: flex-start; }
.dot { flex: none; width: 9px; height: 9px; border-radius: 50%; margin-top: 10px; background: var(--unknown); }
.tone-good .dot { background: var(--good); } .tone-watch .dot { background: var(--watch); } .tone-info .dot { background: var(--info); }

.pill { display: inline-block; font-family: var(--sans); font-size: 10.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; padding: 4px 12px; border: 1px solid; }
.pill.good { background: var(--good-bg); color: var(--good); border-color: #24503a; }
.pill.watch { background: var(--watch-bg); color: var(--watch); border-color: #5a4a22; }
.pill.stop { background: var(--stop-bg); color: var(--stop); border-color: #5a2a2a; }
.uses { margin: 10px 0 0; padding-left: 1.1rem; display: grid; gap: 6px; color: var(--text); }
.uses li::marker { color: var(--gold); }
.plain { margin: 6px 0 0; padding-left: 1.1rem; }
.history { padding-left: 1.2rem; margin: 0 0 1rem; display: grid; gap: 14px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.stat { background: var(--surface); padding: 16px 18px; display: grid; gap: 4px; }
.stat-label { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); font-weight: 500; }
.stat-value { font-family: var(--serif); font-size: 1.55rem; color: var(--text); }
.stat-value.na { font-family: var(--sans); font-size: 1rem; color: var(--muted); font-style: italic; }

.permit { border: 1px solid var(--line); background: var(--ground-warm); padding: 14px 18px; }
.permit header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }

.chat-log { display: grid; gap: 12px; max-height: 420px; overflow-y: auto; padding: 4px 2px 12px; }
.chat-log.static { max-height: none; }
.msg { max-width: 88%; padding: 10px 16px; background: var(--ground-warm); border: 1px solid var(--line); }
.msg.mine { justify-self: end; background: linear-gradient(180deg, var(--gold-lift) 0%, var(--gold) 100%); color: var(--ground); border-color: var(--gold); }
.msg .who { font-size: .74rem; letter-spacing: .06em; opacity: .8; margin-bottom: 2px; display: block; }
.msg .text { white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-form { display: grid; gap: 10px; margin-top: 8px; }
.chat-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
label { display: block; font-size: .8rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
input[type=text], input[type=tel], input[type=email], input[type=password], select, textarea { width: 100%; font: inherit; font-weight: 300; padding: 11px 14px; border: 1px solid var(--field-line); border-radius: 0; background: var(--field); color: var(--text); }
input::placeholder, textarea::placeholder { color: #6f6a62; }
textarea { resize: vertical; }

.toast { position: sticky; top: 8px; z-index: 5; background: var(--surface-2); color: var(--gold-lift); border: 1px solid var(--gold); padding: 12px 18px; margin-bottom: 14px; }
.disclaimer { font-size: .8rem; color: var(--muted); padding: 22px 0 48px; border-top: 1px solid var(--line); margin-top: 32px; line-height: 1.7; }
.datum { height: 1px; border: 0; margin: 0; background: linear-gradient(90deg, var(--gold) 0%, rgba(188,164,128,.22) 60%, transparent 100%); }

body.auth { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.auth-card { width: 100%; max-width: 440px; padding: 36px 34px; margin-bottom: 0; }
.error { background: var(--stop-bg); color: var(--stop); border: 1px solid #5a2a2a; padding: 10px 14px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--gold); font-weight: 500; font-size: 10px; text-transform: uppercase; letter-spacing: .2em; }
body.admin main { padding-bottom: 40px; }
body.admin .card { margin-top: 18px; }

@media (max-width: 560px) {
body { font-size: 16px; }
.card { padding: 20px 18px; } .kv-row { grid-template-columns: 1fr; gap: 2px; } .msg { max-width: 96%; }
.wordmark .sep, .wordmark span:last-child { display: none; }
.who .muted { display: none; }
.who button.link { white-space: nowrap; }
.hero { padding-top: 40px; }
}
@media print {
:root { --ground: #fff; --ground-warm: #fff; --surface: #fff; --surface-2: #fff; --line: #cfcfcf; --text: #111; --muted: #444; --gold: #7a5f2a; --gold-lift: #5f4a1f; --good: #1f5c3a; --good-bg: #fff; --watch: #7a5200; --watch-bg: #fff; --stop: #8a1f1f; --stop-bg: #fff; --info: #1f3a6a; --field: #fff; }
html, body { background: #fff !important; background-image: none !important; color-scheme: light; }
.topbar, .tabs, .actions, .chat, .toast, .banner.preview { display: none !important; }
.panel[hidden] { display: block !important; }
.card { break-inside: avoid; background-image: none; }
.stat, .permit { background: #fff; }
}

/* v2.2 additions: site links, remember box, what's next, lead forms */
.sitelinks a, .mark { color: inherit; text-decoration: none; }
.sitelinks a { font-size: 13px; opacity: .85; }
.sitelinks a:hover, a.mark:hover { text-decoration: underline; }
.topbar .bar { gap: 16px; flex-wrap: wrap; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 12px 0 4px; }
.check input { width: auto; margin: 0; }
.home-link { margin-top: 18px; }
.whatsnext { margin: 40px 0 8px; }
.whatsnext .grid.next { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 14px; }
.next-card { display: flex; flex-direction: column; gap: 8px; }
.next-card h3 { margin: 0; }
.next-card .btn { margin-top: auto; text-align: center; text-decoration: none; display: inline-block; }
.whatsnext .back { margin-top: 18px; }
.pwcard { margin-top: 18px; }
.pwcard summary { cursor: pointer; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.wide-card { max-width: 560px; }
.lead textarea { width: 100%; box-sizing: border-box; }
.auth-card a { color: inherit; }
body.auth.lead { display: block; padding: 0; }
body.auth.lead .topbar { margin-bottom: 40px; }
body.auth.lead .auth-card { margin: 0 auto 60px; }
.whatsnext .grid.next { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 640px) { .whatsnext .grid.next { grid-template-columns: 1fr; } }
label.check { text-transform: none; letter-spacing: 0; font-size: 14px; }
.agent-card { display: flex; gap: 24px; align-items: center; }
.agent-card .agent-photo { width: 150px; height: auto; flex: 0 0 auto; border-bottom: 1px solid var(--gold); }
.agent-card h2 { margin: 4px 0 6px; }
.agent-card .agent-line { margin: 4px 0; font-size: 1.05rem; }
.agent-card .agent-line a { color: var(--gold); text-decoration: none; }
.panel .table td { overflow-wrap: anywhere; }
.report-figure { margin: 6px 0 14px; }
.report-figure img { display: block; width: 100%; max-width: 900px; height: auto; border: 1px solid var(--line); }
.report-figure figcaption { margin-top: 8px; }
@media (max-width: 560px) { .agent-card { flex-direction: column; align-items: flex-start; } }

/* ---- client Tools tab: Add It Up (v2.3.0) ---- */
.aiu-top { display: flex; justify-content: flex-end; margin: 0 0 14px; }
.aiu-lang { display: flex; border: 1px solid var(--field-line); overflow: hidden; }
.aiu-lang button { background: none; border: 0; color: var(--muted); padding: 7px 16px; font: inherit; font-size: 12px; font-weight: 500; letter-spacing: .12em; cursor: pointer; }
.aiu-lang button[aria-pressed="true"] { background: var(--gold); color: var(--ground); }
.aiu-board { border: 1px solid var(--line); background: var(--surface); padding: 22px; margin: 0 0 20px; }
.aiu-board h3 { font-family: var(--sans); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 500; margin: 0 0 18px; }
.aiu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px 30px; }
.aiu-ctl { min-width: 0; }
.aiu-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.aiu-row label { font-size: .92rem; text-transform: none; letter-spacing: normal; font-weight: 300; color: var(--text); margin: 0; }
.aiu-val { font-weight: 500; color: var(--gold-lift); white-space: nowrap; font-variant-numeric: tabular-nums; }
.aiu-hint { font-size: .8rem; color: var(--muted); margin: 6px 0 0; line-height: 1.4; }
.aiu input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 8px; margin: 14px 0 0; outline: none; cursor: pointer; background: linear-gradient(90deg, var(--gold) var(--p, 0%), #2a2a30 var(--p, 0%)); }
.aiu input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; background: linear-gradient(135deg, var(--gold-lift), var(--gold)); transform: rotate(45deg) scale(.72); border: 2px solid #2b2418; box-shadow: 0 0 12px rgba(241,228,200,.3); }
.aiu input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 0; background: linear-gradient(135deg, var(--gold-lift), var(--gold)); transform: rotate(45deg); border: 2px solid #2b2418; }
.aiu-verdict { border-left: 3px solid var(--gold); background: var(--surface-2); padding: 16px 20px; margin: 0 0 20px; }
.aiu-verdict b { color: var(--gold-lift); font-weight: 500; }
.aiu-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin: 0 0 20px; }
.aiu-card { position: relative; border: 1px solid var(--line); background: var(--surface); padding: 20px; min-width: 0; }
.aiu-card.hi { border-color: var(--gold-lift); box-shadow: 0 0 26px rgba(188,164,128,.16); }
.aiu-card h3 { font-style: italic; font-size: 1.35rem; margin: 0 0 8px; }
.aiu-badge { position: absolute; top: 14px; right: 14px; background: var(--gold-lift); color: var(--ground); font-size: 10px; font-weight: 500; letter-spacing: .16em; padding: 4px 9px; }
.aiu-li { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.aiu-li span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.aiu-li.big { font-weight: 500; color: var(--gold-lift); }
.aiu-li.good span:last-child { color: var(--good); }
.aiu-li.bad span:last-child { color: var(--stop); }
.aiu-note { font-size: .8rem; color: var(--muted); max-width: 90ch; }
.aiu-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; border: 1px solid var(--gold); padding: 16px 20px; margin-top: 14px; }
@media print { .aiu-lang { display: none; } }
