@font-face { font-family: "Qanelas"; src: url("./fonts/Qanelas-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Qanelas"; src: url("./fonts/Qanelas-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Qanelas"; src: url("./fonts/Qanelas-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Qanelas"; src: url("./fonts/Qanelas-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Qanelas"; src: url("./fonts/Qanelas-ExtraBold.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Qanelas"; src: url("./fonts/Qanelas-Heavy.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }

:root {
  --bg: #fff9f8;
  --surface: #ffffff;
  --surface-2: #fff4f7;
  --text: #241d21;
  --muted: #7b6f74;
  --line: #eadde2;
  --accent: #df5e89;
  --accent-strong: #cd4f7a;
  --accent-soft: #fbdbe6;
  --accent-pale: #fdf0f5;
  --green: #3a9b78;
  --red: #d85b67;
  --blue: #3274d9;
  --shadow: 0 20px 56px rgba(123, 89, 100, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 82% 6%, rgba(223, 94, 137, .13), transparent 32rem),
    radial-gradient(circle at 8% 30%, rgba(251, 218, 229, .42), transparent 26rem),
    var(--bg);
  font-family: "Qanelas", "Avenir Next", Avenir, "Century Gothic", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button { color: inherit; }
.app-shell { min-height: 0; }
main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding-top: 92px; }
.hero { padding: clamp(34px, 6vw, 74px) 0 68px; display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(42px, 7vw, 90px); align-items: center; }
.eyebrow { margin: 0 0 18px; font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; color: var(--accent-strong); }
.eyebrow i { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(223,94,137,.10); }
h1 { margin: 0; display: grid; row-gap: 0; font-size: clamp(44px, 5.4vw, 70px); line-height: .82; letter-spacing: 0; font-weight: 900; }
h1 .headline-line { display: block; white-space: nowrap; }
h1 .headline-action { font-size: inherit; }
h1 .headline-last { display: block; margin: 0; color: var(--accent); }
h1 .highlight { position: relative; z-index: 0; }
h1 .highlight { color: var(--accent); }
h1 .highlight::after { content: none; }
h1 .headline-comma { font-size: inherit; font-weight: inherit; letter-spacing: inherit; vertical-align: baseline; }
.subtitle {
  margin: 18px 0 0;
  max-width: 680px;
  color: #565656;
  font-family: "Qanelas", Montserrat, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.45;
  font-weight: 500;
}
.search-panel { background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 28px; padding: clamp(24px, 3vw, 34px); box-shadow: var(--shadow); }
.search-panel > label { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 750; margin-bottom: 10px; }
.search-panel > label span { color: var(--muted); font-weight: 500; }
.query-input { width: 100%; height: 58px; padding: 0 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); color: var(--text); outline: none; font-size: 17px; font-weight: 650; transition: .2s; }
.query-input::-webkit-search-cancel-button { cursor: pointer; }
.query-input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(223,94,137,.14); }
.query-note { margin: 8px 2px 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.demand-badge { display: inline-flex; margin-left: 7px; padding: 5px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); letter-spacing: .04em; vertical-align: middle; }
.filters { margin-top: 16px; display: grid; grid-template-columns: minmax(170px, .75fr) 1.25fr; gap: 12px; align-items: end; }
.field { font-size: 11px; color: var(--muted); font-weight: 700; }
select { margin-top: 7px; width: 100%; padding: 11px 36px 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); outline: none; }
.region-field { position: relative; }
.region-field > span { display: block; margin-bottom: 7px; }
.region-button { width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; text-align: left; }
.region-button span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.region-button b { color: var(--muted); font-size: 14px; transition: transform .18s; }
.region-button[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(223,94,137,.14); }
.region-button[aria-expanded="true"] b { transform: rotate(180deg); }
.region-popover { position: absolute; z-index: 30; left: 0; top: calc(100% + 8px); width: min(480px, calc(100vw - 48px)); max-height: 500px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 24px 60px rgba(123,89,100,.18); }
.region-popover-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 14px 8px; }
.region-popover-head strong { color: var(--text); font-size: 12px; }
.region-popover-head div { display: grid; gap: 2px; }
.region-popover-head small { color: var(--muted); font-size: 9px; }
.region-popover-head button { border: 0; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
.region-search { width: calc(100% - 28px); height: 38px; margin: 0 14px 9px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--text); outline: none; font-size: 11px; }
.region-search:focus { border-color: var(--accent); }
.region-list { max-height: 375px; overflow-y: auto; padding: 0 8px 10px; }
.region-tree-row { min-width: max-content; display: grid; grid-template-columns: 22px minmax(220px, 1fr); align-items: center; padding-left: calc(var(--depth) * 16px); }
.region-toggle { width: 22px; height: 30px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 19px; line-height: 1; transform: rotate(0deg); transition: transform .15s; }
.region-toggle.open { transform: rotate(90deg); }
.region-toggle-spacer { width: 22px; }
.region-branch-label { padding: 8px 7px; color: var(--text); font-size: 11px; font-weight: 750; }
.region-option { min-width: 0; display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: center; padding: 7px; border: 0; border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; text-align: left; font-size: 11px; }
.region-option:hover { background: var(--surface-2); }
.region-option .query-check { width: 17px; height: 17px; }
.region-option.active .query-check { border-color: var(--accent-strong); background: var(--accent); color: #fff; }
.region-empty { padding: 20px 12px; color: var(--muted); text-align: center; font-size: 11px; }
.region-badge { background: rgba(50, 116, 217, .1); color: var(--blue); }
.primary-button { border: 0; border-radius: 999px; min-height: 46px; padding: 0 20px; background: var(--accent); color: #fff; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 10px 24px rgba(223,94,137,.24); transition: .2s; }
.primary-button:hover { background: var(--accent-strong); transform: translateY(-1px); box-shadow: 0 14px 28px rgba(223,94,137,.28); }
.primary-button:disabled { cursor: wait; opacity: .72; }
.analysis-message { margin: 14px 0 0; color: var(--muted); font-size: 15px; }
.analysis-message.success { color: #34755c; }
.analysis-message.error { color: #b8405f; }
.quick-examples { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); }
.quick-examples button { border: 0; background: var(--surface-2); border-radius: 999px; padding: 7px 11px; cursor: pointer; color: var(--muted); }
.quick-examples button:hover { color: var(--accent-strong); background: var(--accent-soft); }
.dashboard { padding: 35px 0 3cm; scroll-margin-top: 70px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 22px; }
h2 { margin: 0; font-size: clamp(30px, 4vw, 46px); letter-spacing: .005em; font-weight: 900; }
.heading-actions { display: flex; gap: 8px; }
.result-explainer { max-width: 660px; margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.secondary-button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 10px 15px; font-size: 12px; font-weight: 700; cursor: pointer; }
.secondary-button:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-pale); }
.query-selection-card { margin-bottom: 12px; overflow: hidden; }
.query-count { flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: 10px; font-weight: 800; }
.query-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 14px 16px 16px; }
.query-option { min-width: 0; min-height: 70px; display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: start; padding: 12px; text-align: left; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); cursor: pointer; transition: .18s; }
.query-option:hover { border-color: var(--accent); }
.query-option:not(.active) { opacity: .48; filter: grayscale(.7); }
.query-check { width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: transparent; font-size: 11px; font-weight: 900; }
.query-option.active .query-check { border-color: var(--accent-strong); background: var(--accent); color: #fff; }
.query-option b { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 11px; line-height: 1.3; }
.query-option small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.25; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.metric { background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: 0 10px 30px rgba(123,89,100,.05); }
.metric:nth-child(1) { background: linear-gradient(135deg, #fff 35%, var(--accent-pale)); }
.metric-label { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.metric-value { margin-top: 11px; font-size: 30px; font-weight: 900; letter-spacing: 0; }
.metric-caption { margin-top: 4px; font-size: 11px; color: var(--muted); }
.metric .up { color: var(--green); }
.metric .down { color: var(--red); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 12px; }
.card { background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 14px 40px rgba(123,89,100,.05); }
.card-head { min-height: 74px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.card-head h3 { margin: 0; font-size: 17px; font-weight: 800; }
.card-head p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; font-size: 10px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend i { width: 16px; height: 3px; border-radius: 3px; }
.chart-tools { display: grid; justify-items: end; gap: 8px; }
.chart-wrap { padding: 12px 14px 2px; position: relative; min-height: 350px; }
#seasonChart { width: 100%; height: auto; overflow: visible; }
.grid-line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 5; }
.axis-label { fill: var(--muted); font-size: 10px; }
.area-path { opacity: .12; }
.line-path { fill: none; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.point { stroke: var(--surface); stroke-width: 3; cursor: pointer; }
.average-line { stroke: #a99aa0; stroke-width: 1; stroke-dasharray: 7 6; }
.tooltip { position: absolute; z-index: 5; pointer-events: none; padding: 9px 11px; border-radius: 10px; background: var(--text); color: #fff; font-size: 11px; box-shadow: 0 8px 24px rgba(36,29,33,.2); transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; }
.recommendation-card { overflow: hidden; }
#recommendations { padding: 5px 20px 18px; }
.recommendation { display: grid; grid-template-columns: 33px 1fr; gap: 11px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.recommendation:last-child { border-bottom: 0; }
.rec-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); font-size: 14px; font-weight: 800; }
.recommendation h4 { margin: 0 0 4px; font-size: 12px; }
.recommendation p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.table-card { margin-top: 12px; overflow: hidden; }
.segmented { display: flex; padding: 4px; border-radius: 999px; background: var(--surface-2); }
.segmented button { border: 0; background: transparent; color: var(--muted); font-size: 10px; padding: 7px 12px; border-radius: 999px; cursor: pointer; }
.segmented button.active { background: var(--surface); color: var(--accent-strong); box-shadow: 0 3px 12px rgba(123,89,100,.10); }
.budget-planner { display: flex; align-items: end; gap: 18px; padding: 15px 20px; border-bottom: 1px solid var(--line); background: var(--accent-pale); }
.budget-planner[hidden] { display: none; }
.budget-field { flex: 0 0 auto; display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 750; }
.budget-input-shell { width: 190px; height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.budget-input-shell:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(223,94,137,.14); }
.budget-input-shell input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 15px; font-weight: 600; }
.budget-input-shell b { color: var(--muted); font-size: 13px; }
.budget-planner > p { margin: 0 0 8px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.month-table { display: grid; grid-template-columns: repeat(12, minmax(70px, 1fr)); overflow-x: auto; padding: 18px 16px 20px; }
.month-cell { min-width: 70px; padding: 0 8px; border-right: 1px solid var(--line); text-align: center; }
.month-cell:last-child { border-right: 0; }
.month-name { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.month-value { margin: 8px 0; font-size: 16px; font-weight: 500; }
.month-value.money { font-size: 14px; font-weight: 500; white-space: nowrap; }
.mini-bar { height: 4px; background: var(--line); border-radius: 5px; overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: var(--accent-strong); border-radius: inherit; }
.source-note { margin-top: 12px; border: 1px dashed #ddb8c5; border-radius: 18px; padding: 15px 17px; display: flex; gap: 12px; align-items: flex-start; background: var(--accent-pale); }
.source-note > span { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 900; font-size: 12px; }
.source-note p { margin: 1px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { max-width: 720px; }
  .content-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .query-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  main { width: min(100% - 24px, 1180px); padding-top: 78px; }
  .hero { padding-top: 42px; gap: 32px; }
  .dashboard { padding-bottom: 1.5cm; }
  .filters { grid-template-columns: 1fr; }
  .region-popover { width: 100%; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .heading-actions { width: 100%; }
  .heading-actions button { flex: 1; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .query-list { grid-template-columns: 1fr; }
  .metric { padding: 14px; }
  .metric-value { font-size: 22px; }
  .card-head { align-items: flex-start; }
  .budget-planner { align-items: stretch; flex-direction: column; gap: 9px; }
  .budget-input-shell { width: 100%; }
  .budget-planner > p { margin: 0; }
  .chart-card .card-head { flex-direction: column; }
  .chart-tools { width: 100%; justify-items: stretch; }
  .legend { justify-content: flex-start; }
  .chart-wrap { padding-left: 2px; padding-right: 2px; min-height: 260px; }
}
