@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');
:root {
    --ink: #332a20;
    --muted: #756c61;
    --ivory: #fcfaf5;
    --gold: #b4813b;
    --border: #e9dfce;
    --deep: #754923
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    background: var(--ivory);
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--ink)
}

button,
input,
select {
    font: inherit
}

button {
    cursor: pointer
}

button:disabled {
    opacity: .45;
    cursor: not-allowed
}

.top {
    height: 78px;
    background: #f5ead5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 27px;
    border-bottom: 1px solid #dccbad;
    gap: 20px
}

.brand {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -1.5px;
    color: #94631f
}

.spark {
    font-size: 14px;
    vertical-align: top;
    padding-left: 5px
}

.slogan {
    font-size: 11px;
    color: #7b674a;
    display: block
}

.mode {
    display: flex;
    gap: 6px;
    padding: 5px;
    background: #eadbc0;
    border-radius: 12px
}

.mode button {
    padding: 11px 17px;
    border: 0;
    border-radius: 8px;
    color: #6e492b;
    background: transparent;
    font-size: 13px;
    font-weight: 700
}

.mode button.active {
    background: white;
    color: #764821;
    box-shadow: 0 2px 8px #a5815726
}

.data-pill,
.tag {
    background: #fff9ed;
    padding: 8px 11px;
    border: 1px solid #e7d7b9;
    border-radius: 999px;
    color: #89652f;
    font-size: 11px
}

.shell {
    display: grid;
    grid-template-columns: 350px minmax(0, 1fr);
    height: calc(100vh - 78px)
}

.sidebar {
    overflow-y: auto;
    padding: 26px 24px;
    background: #fcfaf5;
    border-right: 1px solid var(--border)
}

.eyebrow {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.6px;
    color: #a27e48
}

.sidebar h1 {
    font-size: 29px;
    line-height: 1.13;
    letter-spacing: -1.2px;
    margin: 10px 0 8px
}

.sub {
    font-size: 13px;
    line-height: 1.65;
    color: var(--muted)
}

label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin: 18px 0 7px
}

input,
select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #dfd1ba;
    background: white;
    border-radius: 9px;
    color: #493c2c
}

input:focus,
select:focus,
button:focus-visible {
    outline: 2px solid #bf8b46;
    outline-offset: 2px
}

.primary,
.secondary,
.ghost {
    border-radius: 9px;
    padding: 12px 15px;
    font-size: 12px;
    font-weight: 750
}

.primary {
    background: #8b592d;
    color: white;
    border: 1px solid #8b592d
}

.secondary {
    background: white;
    border: 1px solid #dcc8a9;
    color: #764821
}

.ghost {
    border: 1px solid #e3d7c7;
    background: #fff;
    color: #775532
}

.sidebar button {
    width: 100%;
    margin-top: 12px
}

.budget-card,
.info,
.legend,
.forecast,
.ai {
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: white;
    margin-top: 18px
}

.budget-card strong {
    font-size: 27px;
    display: block;
    color: #9c6b2e;
    margin: 5px 0
}

.budget-card small,
.disclaimer {
    font-size: 11px;
    line-height: 1.6;
    color: #806e5a
}

.disclaimer {
    background: #fbf3e5;
    border-left: 3px solid #d4a14a;
    padding: 11px;
    margin: 16px 0
}

.sidebar hr {
    border: 0;
    border-top: 1px solid #e8dccb;
    margin: 25px 0
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    margin: 10px 0
}

.swatch {
    width: 23px;
    height: 15px;
    border: 1px solid #b6a79065;
    border-radius: 3px
}

.metric {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #eee6dc;
    font-size: 12px;
    padding: 9px 0;
    gap: 15px
}

.metric strong {
    text-align: right
}

.status {
    font-size: 11px;
    color: #796c59;
    margin: 15px 0
}

.content {
    min-width: 0;
    overflow: auto;
    background: #fff
}

.map-wrap {
    height: min(62vh, 690px);
    position: relative
}

#map {
    height: 100%;
    width: 100%
}

.map-tip {
    position: absolute;
    bottom: 19px;
    left: 18px;
    background: #fffef3e8;
    border: 1px solid #ead7b8;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 11px;
    z-index: 1
}

.below {
    padding: 28px;
    max-width: 1200px;
    margin: auto
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px
}

.section-head h2 {
    margin: 0 0 14px;
    font-size: 22px;
    letter-spacing: -.5px
}

.compare-select,
.forecast-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px
}

.forecast-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr))
}

.comparison-placeholder {
    padding: 22px;
    background: #fbf8f2;
    border: 1px dashed #d9c8a7;
    border-radius: 10px;
    color: var(--muted);
    font-size: 13px
}

.compare-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    border: 1px solid #eaddc8;
    border-radius: 10px;
    overflow: hidden
}

.compare-grid div {
    padding: 12px;
    border-bottom: 1px solid #efe5d6;
    font-size: 12px
}

.compare-grid div:nth-child(3n+2) {
    background: #fcf2de
}

.compare-grid div:nth-child(3n) {
    background: #eef4f5
}

.forecast {
    margin: 24px 0
}

.ai {
    margin: 24px 0
}

#ai-result {
    white-space: normal;
    line-height: 1.7;
    font-size: 13px;
    color: #493c2e
}

footer {
    border-top: 1px solid #e6ddcf;
    margin-top: 30px;
    padding: 22px 0;
    color: #797167;
    font-size: 11px;
    line-height: 1.6
}

footer a {
    color: #906330
}

button.primary:hover {
    background: #71441f
}

@media(max-width:900px) {
    .shell {
        display: block;
        height: auto
    }

    .sidebar {
        max-height: none
    }

    .map-wrap {
        height: 440px
    }

    .top {
        height: auto;
        flex-wrap: wrap
    }

    .compare-select,
    .forecast-grid {
        grid-template-columns: 1fr
    }

    .data-pill {
        display: none
    }
}

[hidden] {
    display: none !important
}
/* Gemini insights: action beside report and readable generated Markdown */
.ai-action-panel { margin: 18px 0 8px; padding: 18px 20px; background: #fbf6eb; border: 1px solid #e6d6bd; border-radius: 13px; }
.ai-action-copy { margin: 0 0 12px; color: var(--muted); line-height: 1.55; font-size: 13px; }
.ai-action-button { display: inline-block; min-height: 44px; }
.ai-scenario-summary { padding: 12px 14px; background: white; border-radius: 8px; border: 1px solid var(--border); font-size: 12px; line-height: 1.6; }
.ai { scroll-margin-top: 22px; }
.ai:focus { outline: none; }
#ai-result { overflow-wrap: anywhere; }
#ai-result h3 { margin: 23px 0 8px; font-size: 17px; letter-spacing: -.2px; }
#ai-result h4 { margin: 18px 0 7px; font-size: 14px; }
#ai-result p { margin: 10px 0; }
#ai-result ul, #ai-result ol { margin: 8px 0 14px; padding-left: 23px; }
#ai-result li { margin: 6px 0; }
#ai-result strong { color: var(--ink); }
#ai-result .ai-message { color: var(--muted); }
#ai-result .ai-error { color: #945a36; }
@media(max-width:900px) { .ai-action-button { width: 100%; } }

/* 2025 Edition: editorial typography, clear provenance, modern cards */
body,button,input,select {font-family:'DM Sans',Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;}
h1,h2,h3,.brand,.market-card strong {font-family:'Manrope','DM Sans',sans-serif;}
body {font-size:15px;}
.sidebar h1 {font-size:31px;letter-spacing:-1.35px;line-height:1.16;}
.section-head h2 {font-size:25px;letter-spacing:-.9px;line-height:1.25;}
.sub {font-size:14px;}
label {font-size:13px;}
input,select {font-size:14px;min-height:44px;}
.primary,.secondary,.ghost {font-size:13px;transition:background .18s ease,transform .18s ease,box-shadow .18s ease;}
.primary:hover {transform:translateY(-1px);box-shadow:0 6px 20px #70401f29;}
.market-section,.trend-panel {margin:25px 0;padding:26px;border-radius:16px;border:1px solid #e8dac4;background:linear-gradient(145deg,#fffefa,#fcf8f0);}
.market-section .section-head,.trend-panel .section-head {flex-wrap:wrap;}
.market-cards {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:18px 0 9px;}
.market-card {min-height:145px;background:#fff;border:1px solid #e9dfce;border-radius:13px;padding:20px;box-shadow:0 4px 16px #69441c09;}
.market-card-label {color:#766653;font-size:12px;line-height:1.45;font-weight:700;}
.market-card strong {display:block;margin:10px 0 5px;font-size:clamp(23px,2.2vw,33px);color:#8f5d2f;letter-spacing:-1px;}
.market-card-note {font-size:11px;color:#8c7b69;line-height:1.55;}
.market-footnote {font-size:12px;line-height:1.7;color:#756e62;margin:15px 0 0;}
.market-footnote a {color:#8a5829;}
.trend-toolbar {display:flex;align-items:center;gap:16px;margin:12px 0 8px;flex-wrap:wrap;}
.trend-toolbar label {margin:0;}
.trend-toolbar select {width:auto;min-width:260px;}
.trend-chart {min-height:265px;border:1px solid #eee5d9;background:white;border-radius:13px;padding:12px;display:flex;align-items:center;justify-content:center;}
.trend-chart svg {width:100%;max-height:280px;}
.ai {background:linear-gradient(155deg,#fffefa,#fff);padding:25px;border-radius:16px;}
#ai-result {font-size:14px;line-height:1.85;}
#ai-result h3 {font-size:19px;letter-spacing:-.5px;}
.top {box-shadow:0 1px 8px #684f2810;}
@media(max-width:1000px) {.market-cards {grid-template-columns:1fr 1fr;}}
@media(max-width:650px) {.market-cards {grid-template-columns:1fr;}.market-section,.trend-panel,.ai {padding:18px;}.trend-toolbar select {width:100%;min-width:0;}.below {padding:16px;}}
