:root {
  --ink: #18332e;
  --muted: #667a75;
  --line: #dce6e2;
  --surface: #ffffff;
  --canvas: #f3f7f5;
  --green: #0f7b63;
  --green-dark: #0a5d4c;
  --mint: #dff4ed;
  --amber: #f2b74d;
  --danger: #a53b3b;
  --shadow: 0 18px 50px rgba(24, 51, 46, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 90% 8%, #e1f2ec 0, transparent 28rem), var(--canvas); }
button, input, select { font: inherit; }
.app-header { height: 68px; padding: 0 max(24px, calc((100vw - 1320px) / 2)); display: flex; align-items: center; gap: 11px; background: rgba(255,255,255,.88); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--green); box-shadow: 0 8px 18px rgba(15,123,99,.22); }
.brand-mark svg { width: 25px; fill: none; stroke: white; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.app-header h1 { font-size: 18px; margin: 1px 0 0; letter-spacing: -.02em; }
.eyebrow { margin: 0; color: var(--green); text-transform: uppercase; font-weight: 750; font-size: 10px; letter-spacing: .13em; }
.local-badge { margin-left: auto; display: inline-flex; gap: 7px; align-items: center; padding: 7px 11px; border: 1px solid #cce1da; border-radius: 999px; color: var(--green-dark); background: #f5fbf8; font-size: 12px; font-weight: 650; }
.local-badge span { width: 7px; height: 7px; border-radius: 50%; background: #31a882; box-shadow: 0 0 0 4px #d9f2e9; }
main { max-width: 1320px; margin: 0 auto; padding: 18px 24px 38px; }
.compact-intro { min-height: 42px; display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 14px; }
.compact-intro > p { margin: 0; color: var(--green); text-transform: uppercase; font-weight: 750; font-size: 10px; letter-spacing: .13em; }
.privacy-note { min-width: 225px; display: flex; align-items: center; gap: 9px; padding: 8px 12px; background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 11px; }
.privacy-note svg { width: 21px; fill: none; stroke: var(--green); stroke-width: 1.7; }
.privacy-note div { display: grid; gap: 2px; }
.privacy-note strong { font-size: 12px; }
.privacy-note span { color: var(--muted); font-size: 11px; }
.workspace { display: grid; grid-template-columns: minmax(420px, .88fr) minmax(520px, 1.35fr); gap: 24px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.form-panel { padding: 20px 22px; }
.panel-heading, .section-label { display: flex; align-items: center; gap: 12px; }
.panel-heading { margin-bottom: 16px; }
.panel-heading h3, .results-panel h3 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.panel-heading p, .section-label small { color: var(--muted); margin: 3px 0 0; font-size: 12px; }
.step, .mini-step { display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: white; background: var(--green); font-weight: 700; }
.step { width: 32px; height: 32px; }
.mini-step { width: 25px; height: 25px; font-size: 11px; }
.section-label strong { display: block; font-size: 14px; }
.field { display: grid; gap: 7px; }
.field + .field.full, .field-grid, .segmented-field, .weekday-field { margin-top: 12px; }
.field > span, fieldset legend { color: #2b4842; font-size: 12px; font-weight: 700; }
.field small, fieldset small { color: var(--muted); font-size: 10.5px; line-height: 1.4; }
.workbook-note, .mode-hint { display: block; margin-top: 5px; color: var(--muted); font-size: 9.5px; line-height: 1.35; }
input, select { width: 100%; height: 39px; padding: 0 11px; color: var(--ink); border: 1px solid #cfdbd7; border-radius: 9px; outline: none; background: #fff; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(15,123,99,.11); }
input::placeholder { color: #9aa9a5; }
select:disabled { background: #f4f6f5; color: #879792; }
.field-grid { display: grid; gap: 10px; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.profile-fields { margin-top: 0; }
.consumption-fields { margin-top: 10px; }
.consumption-fields .segmented-field { margin-top: 0; }
.divider { height: 1px; margin: 17px 0 14px; background: var(--line); }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 50px; }
.input-suffix span { position: absolute; top: 0; right: 13px; height: 39px; display: flex; align-items: center; color: var(--muted); font-size: 11px; font-weight: 650; }
fieldset { padding: 0; border: 0; margin-left: 0; margin-right: 0; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; margin: 7px 0 5px; border: 1px solid #cfdbd7; background: #f2f5f4; border-radius: 10px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { height: 34px; display: grid; place-items: center; border-radius: 7px; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 650; }
.segmented input:checked + span { color: var(--green-dark); background: #fff; box-shadow: 0 2px 7px rgba(24,51,46,.1); }
.weekday-field { margin-bottom: 13px; }
.calendar-fields { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 10px; margin-top: 10px; align-items: start; }
.calendar-fields .weekday-field { margin-top: 0; margin-bottom: 0; }
.weekday-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin: 8px 0 6px; }
.weekday-grid input { position: absolute; opacity: 0; }
.weekday-grid span { height: 33px; display: grid; place-items: center; border: 1px solid #cfdbd7; border-radius: 8px; cursor: pointer; color: var(--muted); font-size: 11px; font-weight: 700; }
.weekday-grid input:checked + span { border-color: var(--green); color: white; background: var(--green); }
.primary-button, .download-button { width: 100%; border: 0; cursor: pointer; }
.primary-button { height: 45px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 10px; color: white; background: var(--green); box-shadow: 0 9px 18px rgba(15,123,99,.2); font-weight: 750; }
.primary-button:hover { background: var(--green-dark); }
.primary-button:disabled { cursor: not-allowed; opacity: .55; box-shadow: none; }
.primary-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.results-panel { min-height: 660px; padding: 24px; }
.empty-results { display: grid; align-content: center; justify-items: center; text-align: center; padding: 80px; }
.empty-graphic { width: 190px; height: 150px; display: grid; place-items: center; margin-bottom: 20px; border-radius: 50%; background: #eff8f5; }
.empty-graphic svg { width: 140px; }
.empty-graphic .grid { fill: none; stroke: #d2e7e0; stroke-width: 1; }
.empty-graphic .wave { fill: none; stroke: var(--green); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.empty-graphic circle { fill: var(--amber); }
.empty-results p { max-width: 440px; margin: 10px 0 22px; color: var(--muted); line-height: 1.65; font-size: 13px; }
.empty-features { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.empty-features span { padding: 7px 10px; border-radius: 7px; color: var(--green-dark); background: var(--mint); font-size: 10px; font-weight: 700; }
.result-topline { display: flex; justify-content: space-between; align-items: center; padding-bottom: 23px; border-bottom: 1px solid var(--line); }
.result-topline h3 { margin-top: 5px; font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-weight: 500; }
.success-pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 999px; color: var(--green-dark); background: var(--mint); font-size: 10px; font-weight: 750; }
.success-pill svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.metric-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 10px; margin: 19px 0; }
.metric { padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfc; }
.metric.hero { background: var(--ink); border-color: var(--ink); color: white; }
.metric span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 650; }
.metric.hero span, .metric.hero small { color: #b7cbc5; }
.metric strong { display: block; font-size: 20px; letter-spacing: -.025em; }
.metric small { color: var(--muted); font-size: 9px; }
.result-detail-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 13px; }
.chart-card, .summary-card { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 13px; }
.card-title { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.card-title h4, .summary-card h4 { margin: 0; font-size: 12px; }
.card-title p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.chart-toolbar { min-width: 150px; display: grid; justify-items: end; gap: 5px; }
.chart-toolbar > strong { color: var(--green); font-size: 9px; }
.chart-switch { display: flex; padding: 2px; border-radius: 7px; background: #eef3f1; }
.chart-switch button { min-width: 57px; height: 25px; padding: 0 8px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; cursor: pointer; font-size: 9px; font-weight: 700; }
.chart-switch button.active { color: white; background: var(--green); box-shadow: 0 2px 5px rgba(15,123,99,.18); }
.chart-switch button:disabled { cursor: not-allowed; opacity: .45; }
.hourly-selectors { display: flex; gap: 4px; }
.hourly-selectors select { width: 150px; height: 27px; padding: 0 6px; border-radius: 6px; font-size: 8.5px; }
.chart-wrap { height: 225px; margin-top: 10px; }
#monthlyChart { width: 100%; height: 100%; }
.summary-card dl { margin: 10px 0 0; }
.summary-card dl div { display: grid; grid-template-columns: 42% 58%; gap: 8px; padding: 8px 0; border-bottom: 1px solid #edf1ef; font-size: 9.5px; }
.summary-card dl div:last-child { border-bottom: 0; }
.summary-card dt { color: var(--muted); }
.summary-card dd { margin: 0; text-align: right; font-weight: 650; overflow-wrap: anywhere; }
.reconcile-strip { display: flex; gap: 10px; align-items: center; margin: 15px 0; padding: 12px 14px; border: 1px solid #cce7dd; border-radius: 11px; background: #f1faf7; }
.reconcile-strip svg { width: 25px; flex: 0 0 auto; fill: none; stroke: var(--green); stroke-width: 1.7; }
.reconcile-strip div { display: grid; gap: 2px; }
.reconcile-strip strong { color: var(--green-dark); font-size: 10.5px; }
.reconcile-strip span { color: var(--muted); font-size: 9px; }
.download-button { min-height: 55px; display: flex; justify-content: center; align-items: center; gap: 10px; padding: 8px; color: white; background: var(--ink); border-radius: 11px; }
.download-button:hover { background: #244a43; }
.download-button svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.download-button span { display: grid; gap: 2px; text-align: left; }
.download-button strong { font-size: 12px; }
.download-button small { color: #bed0cb; font-size: 8.5px; }
.alert { margin: 14px 0; padding: 11px 13px; border-radius: 9px; font-size: 11px; line-height: 1.45; }
.alert.error { color: #7e2929; border: 1px solid #edc6c6; background: #fff2f2; }
.hidden { display: none !important; }
footer { max-width: 1320px; margin: 0 auto; padding: 0 28px 30px; display: flex; justify-content: space-between; color: #82938f; font-size: 10px; }
@media (max-width: 980px) {
  .workspace { grid-template-columns: 1fr; }
  .results-panel { min-height: 500px; }
  .privacy-note { display: none; }
}
@media (max-width: 620px) {
  main { padding: 14px 15px 40px; }
  .app-header { padding: 0 15px; }
  .local-badge { font-size: 0; padding: 9px; }
  .compact-intro { min-height: 26px; margin-bottom: 10px; }
  .form-panel, .results-panel { padding: 20px; border-radius: 15px; }
  .field-grid.two, .metric-grid, .result-detail-grid { grid-template-columns: 1fr; }
  .calendar-fields { grid-template-columns: 1fr; }
  .weekday-grid { grid-template-columns: repeat(4, 1fr); }
  .empty-results { padding: 55px 25px; }
  footer { gap: 20px; }
}
