:root {
  --navy: #081728;
  --navy-2: #10283d;
  --ink: #132436;
  --muted: #66788b;
  --line: #dfe7ee;
  --surface: #ffffff;
  --bg: #f3f6f8;
  --amber: #ffb31a;
  --amber-2: #ffd166;
  --cyan: #18b7cd;
  --blue: #2563eb;
  --green: #16a36a;
  --danger: #dc3d4b;
  --shadow: 0 12px 30px rgba(23, 42, 61, .08);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { font-size: 16px; overflow-x: hidden; }
body { margin: 0; overflow-x: hidden; color: var(--ink); background: var(--bg); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: 232px; color: #fff; background: var(--navy); display: flex; flex-direction: column; padding: 24px 16px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 30px; text-transform: uppercase; letter-spacing: .04em; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--amber); color: var(--navy); font-weight: 900; font-size: 1.35rem; transform: skew(-6deg); }
.brand strong { display: block; font-size: 1.15rem; letter-spacing: .02em; }
.brand small { display: block; font-size: .62rem; color: #91a3b4; letter-spacing: .28em; margin-top: 2px; }
.nav-list { display: grid; gap: 7px; }
.nav-item { width: 100%; border: 0; color: #aebdcc; background: transparent; padding: 13px 14px; border-radius: 11px; display: flex; align-items: center; gap: 12px; text-align: left; font-size: .9rem; font-weight: 650; transition: .18s ease; }
.nav-item span { width: 23px; font-size: 1.1rem; text-align: center; }
.nav-item:hover { color: #fff; background: #132c43; }
.nav-item.active { color: var(--navy); background: var(--amber); }
.sidebar-footer { margin-top: auto; border-top: 1px solid #20394e; padding: 20px 8px 0; display: flex; align-items: center; gap: 9px; color: #8ea3b4; font-size: .72rem; line-height: 1.4; }
.status-dot { width: 8px; height: 8px; background: #35d48d; border-radius: 50%; box-shadow: 0 0 0 4px rgba(53, 212, 141, .13); flex: none; }
main { grid-column: 2; min-width: 0; padding: 0 32px 46px; }
.topbar { height: 102px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.eyebrow { margin: 0 0 6px; font-size: .67rem; font-weight: 800; letter-spacing: .16em; color: #7d8ea0; }
.eyebrow.light { color: #9eb6c8; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 1.55rem; letter-spacing: -.035em; }
h2 { margin: 0; font-size: 1.08rem; letter-spacing: -.02em; }
.top-actions, .panel-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.btn { border: 1px solid transparent; border-radius: 10px; padding: 10px 15px; font-size: .82rem; font-weight: 750; transition: .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: var(--navy); background: var(--amber); border-color: #eda20e; box-shadow: 0 8px 18px rgba(255, 179, 26, .25); }
.btn-ghost { color: var(--ink); background: #fff; border-color: var(--line); }
.btn-danger { color: #fff; background: var(--danger); }
.view { display: none; }
.view.active { display: block; animation: rise .22s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } }
.card { background: var(--surface); border: 1px solid #e6edf2; border-radius: var(--radius); box-shadow: var(--shadow); }
.project-strip { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 18px; padding: 16px 20px; align-items: center; margin-bottom: 18px; }
.project-identity { display: flex; align-items: center; gap: 12px; }
.project-icon { width: 40px; height: 40px; flex: none; border-radius: 10px; background: #e7f6f9; color: #07879a; display: grid; place-items: center; font-size: .76rem; font-weight: 900; }
label { display: grid; gap: 6px; color: var(--muted); font-size: .7rem; font-weight: 700; }
input, select { width: 100%; color: var(--ink); background: #fff; border: 1px solid #d8e2e9; border-radius: 9px; padding: 10px 11px; font-size: .84rem; outline: none; }
input:focus, select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(24, 183, 205, .12); }
.project-strip input, .project-strip select { border: 0; background: transparent; padding: 0; font-weight: 750; border-radius: 0; }
.project-strip input:focus, .project-strip select:focus { box-shadow: none; border-bottom: 1px solid var(--cyan); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .8fr); gap: 18px; margin-bottom: 18px; }
.summary-hero { min-height: 215px; overflow: hidden; position: relative; color: #fff; background: linear-gradient(120deg, #092039 0%, #0b3656 63%, #07546a 100%); border-radius: var(--radius); padding: 30px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 16px 35px rgba(8, 23, 40, .18); }
.summary-hero::after { content: ""; position: absolute; width: 290px; height: 290px; border-radius: 50%; right: -70px; top: -82px; border: 1px solid rgba(255,255,255,.11); box-shadow: 0 0 0 34px rgba(255,255,255,.03), 0 0 0 72px rgba(255,255,255,.025); }
.hero-number { display: flex; align-items: baseline; gap: 9px; margin: 14px 0 12px; }
.hero-number span { font-size: clamp(2.8rem, 5vw, 4.7rem); line-height: .9; font-weight: 850; letter-spacing: -.07em; }
.hero-number small { font-size: 1.2rem; font-weight: 750; color: var(--amber); }
.summary-hero p:last-child { max-width: 460px; margin: 0; color: #b7cada; font-size: .84rem; line-height: 1.6; }
.sun-gauge { position: relative; z-index: 2; width: 150px; height: 150px; flex: none; display: grid; place-items: center; }
.sun-gauge::before { content: ""; position: absolute; inset: 7px; border: 9px solid rgba(255,255,255,.09); border-top-color: var(--amber); border-right-color: var(--amber); border-radius: 50%; transform: rotate(18deg); }
.sun-gauge span { font-size: 2.4rem; color: var(--amber); }
.sun-gauge b { position: absolute; bottom: 8px; background: #fff; color: var(--navy); padding: 5px 9px; border-radius: 99px; font-size: .66rem; }
.quick-status { padding: 22px; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.pill { padding: 5px 8px; border-radius: 99px; font-size: .62rem; font-weight: 850; }
.pill.success { color: #0a7c4e; background: #dff8ec; }
.check-list { display: grid; gap: 14px; margin-top: 19px; }
.check-list > div { display: flex; gap: 11px; align-items: center; }
.check-list > div > span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: #0b8b59; background: #e5f8ef; font-weight: 900; font-size: .76rem; }
.check-list p { margin: 0; display: grid; gap: 2px; }
.check-list strong { font-size: .78rem; }
.check-list small { color: var(--muted); font-size: .68rem; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.metric-card { background: #fff; border: 1px solid #e4ebf0; border-radius: 15px; padding: 18px; box-shadow: 0 7px 20px rgba(23,42,61,.05); position: relative; }
.metric-card p { margin: 11px 0 4px; color: var(--muted); font-size: .72rem; font-weight: 700; }
.metric-card strong { display: block; font-size: 1.48rem; letter-spacing: -.04em; }
.metric-card small { color: #91a0ae; font-size: .67rem; }
.metric-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; font-weight: 900; }
.metric-icon.amber { color: #a66a00; background: #fff1ce; }
.metric-icon.cyan { color: #087e8e; background: #def6f9; }
.metric-icon.blue { color: #1d55b8; background: #e5edff; }
.metric-icon.green { color: #087348; background: #ddf6ea; }
.dashboard-lower { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; }
.dashboard-lower > * { min-width: 0; }
.energy-card, .next-steps { padding: 22px; }
.energy-card { overflow: hidden; }
.period-label { font-size: .66rem; color: var(--muted); background: #f0f4f6; border-radius: 8px; padding: 6px 8px; }
.bar-chart { height: 130px; display: flex; align-items: end; gap: 13px; padding: 18px 5px 0; border-bottom: 1px solid var(--line); }
.chart-month { flex: 1; height: 100%; display: flex; align-items: end; justify-content: center; gap: 3px; position: relative; padding-bottom: 19px; }
.chart-month i { width: 8px; min-height: 3px; border-radius: 4px 4px 0 0; transition: height .3s ease; }
.chart-month i:first-child { background: #b8c5d0; }
.chart-month i:nth-child(2) { background: var(--amber); }
.chart-month small { position: absolute; bottom: 0; color: #8b99a6; font-size: .58rem; }
.chart-legend { display: flex; gap: 15px; margin-top: 12px; color: var(--muted); font-size: .65rem; }
.chart-legend i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 5px; }
.chart-legend .consumption { background: #b8c5d0; }
.chart-legend .generation { background: var(--amber); }
.next-steps > button { width: 100%; display: grid; grid-template-columns: 31px 1fr auto; gap: 10px; align-items: center; background: transparent; border: 0; border-top: 1px solid var(--line); padding: 13px 0; text-align: left; color: var(--ink); }
.next-steps > button:first-of-type { margin-top: 15px; }
.next-steps > button > span { color: #8ca0b0; font-size: .66rem; font-weight: 800; }
.next-steps p { margin: 0; display: grid; }
.next-steps strong { font-size: .78rem; }
.next-steps small { color: var(--muted); font-size: .67rem; }
.next-steps b { color: var(--cyan); }
.section-intro { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-intro h2 { font-size: 1.5rem; }
.section-intro p:last-child { margin: 6px 0 0; color: var(--muted); font-size: .82rem; }
.metrics-grid.compact .metric-card p { margin-top: 0; }
.table-card { overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 920px; border-collapse: collapse; }
th { background: #f7f9fb; color: #76889a; text-align: left; font-size: .65rem; letter-spacing: .04em; text-transform: uppercase; padding: 13px 12px; border-bottom: 1px solid var(--line); }
td { padding: 10px 12px; border-bottom: 1px solid #ecf1f4; }
td input { min-width: 70px; padding: 8px; font-size: .78rem; }
td:first-child input { min-width: 170px; font-weight: 700; }
td.output { white-space: nowrap; font-size: .75rem; font-weight: 800; }
.row-delete { border: 0; background: #fff0f1; color: var(--danger); width: 30px; height: 30px; border-radius: 8px; }
.table-footer { display: flex; justify-content: space-between; padding: 14px 18px; color: var(--muted); font-size: .73rem; background: #fbfcfd; }
.table-footer strong { color: var(--ink); }
.formula-chip, .warning-chip { align-self: center; background: #e2f5f8; color: #087f91; border: 1px solid #c4ebf0; padding: 8px 11px; border-radius: 9px; font-size: .72rem; font-weight: 800; }
.warning-chip { color: #8a5b00; background: #fff4d9; border-color: #ffe3a0; }
.form-result-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .72fr); gap: 18px; align-items: start; }
.form-column { display: grid; gap: 15px; }
.form-card { padding: 21px; }
.form-card .card-heading { margin-bottom: 17px; }
.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.field-grid.three { grid-template-columns: repeat(3, 1fr); }
.field-grid.four { grid-template-columns: repeat(4, 1fr); }
.result-column { display: grid; gap: 15px; position: sticky; top: 15px; }
.result-panel { border-radius: var(--radius); padding: 24px; }
.result-panel.dark { color: #fff; background: linear-gradient(145deg, #0a1b2d, #113d56); box-shadow: 0 15px 35px rgba(8,23,40,.18); }
.result-power { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 21px; }
.result-power strong { font-size: 3.2rem; letter-spacing: -.07em; }
.result-power span { color: var(--amber); font-weight: 800; }
.result-line { display: flex; justify-content: space-between; gap: 15px; border-top: 1px solid rgba(255,255,255,.12); padding: 12px 0; font-size: .74rem; }
.result-line span { color: #a9bdcc; }
.string-card { padding: 21px; }
.string-diagram { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0; }
.string-row { width: 100%; display: flex; align-items: center; gap: 5px; }
.module-dot { width: 18px; height: 25px; border-radius: 3px; background: #123d60; border: 2px solid #3c6b89; box-shadow: inset 0 0 0 1px #081b2c; }
.string-row b { margin-left: 6px; font-size: .65rem; color: var(--muted); }
.validation-list { display: grid; gap: 8px; }
.validation-list > div { padding: 9px 10px; border-radius: 9px; background: #eef9f4; color: #12704c; font-size: .68rem; line-height: 1.45; }
.validation-list > div.warn { background: #fff3df; color: #8b5b00; }
.inline-settings { margin-bottom: 17px; }
.electrical-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 17px; }
.circuit-card { background: #fff; border: 1px solid #e1e9ee; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.circuit-head { padding: 19px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.circuit-head > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; font-weight: 900; }
.circuit-card.dc .circuit-head > span { color: #a56600; background: #fff0cb; }
.circuit-card.ac .circuit-head > span { color: #1555bf; background: #e7efff; }
.circuit-card.ground .circuit-head > span { color: #08794d; background: #e0f7ec; }
.circuit-head p { margin: 0 0 2px; color: var(--muted); font-size: .64rem; }
.circuit-head h3 { margin: 0; font-size: .89rem; }
.spec-list { padding: 8px 19px 17px; }
.spec-row { display: flex; justify-content: space-between; gap: 15px; padding: 11px 0; border-bottom: 1px solid #edf1f4; font-size: .73rem; }
.spec-row:last-child { border: 0; }
.spec-row span { color: var(--muted); }
.spec-row strong { text-align: right; }
.bom-card { padding: 21px; }
.bom-list { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 28px; margin-top: 15px; }
.bom-item { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 9px; padding: 10px 0; border-top: 1px solid #edf1f4; }
.bom-item > span { width: 28px; height: 28px; display: grid; place-items: center; background: #edf4f7; border-radius: 7px; font-size: .72rem; font-weight: 900; }
.bom-item p { margin: 0; display: grid; }
.bom-item strong { font-size: .74rem; }
.bom-item small { color: var(--muted); font-size: .64rem; }
.bom-item > b { font-size: .72rem; }
.technical-note { color: #687b8d; font-size: .7rem; line-height: 1.6; padding: 13px 3px; }
.editor-shell { display: grid; grid-template-columns: 190px minmax(500px, 1fr) 220px; min-height: 655px; border: 1px solid #dfe7ed; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.component-palette, .properties-panel { background: #f8fafb; padding: 17px 13px; }
.component-palette { border-right: 1px solid var(--line); }
.properties-panel { border-left: 1px solid var(--line); }
.palette-title { display: grid; gap: 2px; padding: 0 3px 12px; }
.palette-title strong { font-size: .8rem; }
.palette-title small { color: var(--muted); font-size: .62rem; }
#palette-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.palette-item { border: 1px solid #dce6ec; background: #fff; border-radius: 10px; min-height: 73px; padding: 8px 5px; display: grid; place-items: center; gap: 4px; color: var(--ink); box-shadow: 0 4px 10px rgba(23,42,61,.04); }
.palette-item:hover { border-color: var(--cyan); transform: translateY(-1px); }
.palette-item span { font-size: 1.2rem; }
.palette-item small { font-size: .57rem; font-weight: 750; text-align: center; }
.wire-help { margin-top: 16px; border-radius: 10px; background: #e8f6f8; padding: 10px; display: flex; gap: 8px; align-items: flex-start; color: #08798a; }
.wire-help > span { font-size: .7rem; margin-top: 2px; }
.wire-help p { margin: 0; display: grid; gap: 2px; }
.wire-help strong { font-size: .65rem; }
.wire-help small { font-size: .58rem; line-height: 1.4; }
.canvas-wrap { min-width: 0; display: flex; flex-direction: column; }
.canvas-toolbar { height: 53px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 15px; }
.canvas-toolbar > div { display: flex; align-items: center; gap: 8px; }
.canvas-toolbar input { border: 0; padding: 6px; width: 240px; font-weight: 750; }
.canvas-toolbar button { width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line); background: #fff; }
.canvas-toolbar span:last-child { color: var(--muted); font-size: .64rem; }
.canvas-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.panel-canvas { position: relative; flex: 1; min-height: 600px; overflow: hidden; background-color: #eef4f7; background-image: linear-gradient(#dbe5eb 1px, transparent 1px), linear-gradient(90deg, #dbe5eb 1px, transparent 1px); background-size: 22px 22px; outline: none; }
#wire-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.wire { fill: none; stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 1px 1px rgba(0,0,0,.12)); }
.canvas-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 7px; color: #8193a2; text-align: center; pointer-events: none; }
.canvas-empty span { font-size: 2rem; color: #9fb1be; }
.canvas-empty strong { font-size: .9rem; }
.canvas-empty small { font-size: .68rem; max-width: 260px; line-height: 1.5; }
.panel-component { position: absolute; width: 92px; min-height: 108px; user-select: none; touch-action: none; background: #fff; border: 2px solid #bcc9d2; border-radius: 10px; box-shadow: 0 8px 16px rgba(19,36,54,.15); display: grid; grid-template-rows: 1fr auto; cursor: grab; transform-origin: center; }
.panel-component.selected { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(24,183,205,.15), 0 8px 16px rgba(19,36,54,.15); }
.panel-component.rotated { transform: rotate(90deg); }
.component-face { display: grid; place-items: center; padding: 12px 7px 7px; text-align: center; background: linear-gradient(#fff,#eef3f6); border-radius: 8px 8px 0 0; }
.component-face .symbol { font-size: 1.55rem; font-weight: 900; color: #17354c; }
.component-face strong { font-size: .65rem; line-height: 1.15; margin-top: 4px; }
.component-face small { color: #647789; font-size: .56rem; line-height: 1.2; }
.component-tag { padding: 4px; text-align: center; color: #fff; background: #163951; border-radius: 0 0 7px 7px; font-size: .53rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.terminal { position: absolute; z-index: 3; width: 13px; height: 13px; border: 2px solid #fff; background: #273c4d; border-radius: 50%; box-shadow: 0 0 0 1px #526a7b; }
.terminal.in { left: 50%; top: -7px; transform: translateX(-50%); }
.terminal.out { left: 50%; bottom: -7px; transform: translateX(-50%); }
.terminal:hover, .terminal.active { background: var(--amber); box-shadow: 0 0 0 4px rgba(255,179,26,.25); }
.properties-empty { color: var(--muted); font-size: .68rem; line-height: 1.55; border: 1px dashed #cad5dd; border-radius: 10px; padding: 14px; }
#properties-form { display: grid; gap: 12px; }
#properties-form[hidden] { display: none; }
.property-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.project-summary-mini { margin-top: 20px; padding: 13px; color: #fff; background: var(--navy); border-radius: 11px; display: grid; gap: 3px; }
.project-summary-mini span { color: #90a8bb; font-size: .58rem; text-transform: uppercase; letter-spacing: .08em; }
.project-summary-mini strong { color: var(--amber); font-size: .8rem; }
.project-summary-mini small { color: #bed0dd; font-size: .62rem; }
#toast { position: fixed; right: 26px; bottom: 24px; z-index: 100; color: #fff; background: #122b3e; padding: 11px 15px; border-radius: 10px; font-size: .76rem; font-weight: 700; box-shadow: 0 12px 30px rgba(0,0,0,.2); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease; }
#toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 82px minmax(0,1fr); }
  .sidebar { width: 82px; align-items: center; }
  .brand { padding-left: 0; padding-right: 0; }
  .brand > span:last-child, .nav-item:not(.active)::after, .nav-item { font-size: 0; }
  .nav-item { justify-content: center; padding: 13px; }
  .nav-item span { font-size: 1.15rem; }
  .sidebar-footer { display: none; }
  main { grid-column: 2; padding-inline: 22px; }
  .project-strip { grid-template-columns: repeat(2,1fr); }
  .editor-shell { grid-template-columns: 165px minmax(460px,1fr); }
  .properties-panel { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 190px 1fr 200px; gap: 15px; }
}
@media (max-width: 820px) {
  .app-shell { display: block; padding-bottom: 72px; }
  .sidebar { width: 100%; height: 66px; inset: auto 0 0; padding: 8px; flex-direction: row; align-items: center; }
  .brand, .sidebar-footer { display: none; }
  .nav-list { width: 100%; display: flex; justify-content: space-around; gap: 3px; }
  .nav-item, .nav-item.active { width: auto; display: grid; place-items: center; padding: 8px 10px; background: transparent; color: #aec0ce; }
  .nav-item.active { color: var(--amber); }
  .nav-item span { font-size: 1.2rem; }
  main { padding: 0 14px 30px; }
  .topbar { height: auto; min-height: 92px; align-items: flex-start; padding: 18px 0; }
  .top-actions { justify-content: end; }
  .top-actions .btn { padding: 8px 10px; }
  .top-actions #import-btn { display: none; }
  .project-strip, .hero-grid, .dashboard-lower, .form-result-grid, .electrical-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: repeat(2,1fr); }
  .sun-gauge { width: 112px; height: 112px; }
  .field-grid.three, .field-grid.four { grid-template-columns: repeat(2,1fr); }
  .result-column { position: static; }
  .bom-list { grid-template-columns: 1fr; }
  .editor-shell { grid-template-columns: 1fr; }
  .component-palette { border-right: 0; border-bottom: 1px solid var(--line); }
  #palette-list { grid-template-columns: repeat(4,1fr); }
  .properties-panel { grid-column: auto; grid-template-columns: 1fr; border-left: 0; border-top: 1px solid var(--line); }
  .panel-canvas { min-height: 520px; }
}
@media (max-width: 560px) {
  h1 { font-size: 1.2rem; }
  .topbar { display: grid; }
  .top-actions { justify-content: start; }
  .project-strip, .metrics-grid, .field-grid, .field-grid.three, .field-grid.four { grid-template-columns: 1fr; }
  .project-identity { align-items: end; }
  .summary-hero { padding: 22px; }
  .bar-chart { gap: 6px; padding-inline: 0; }
  .sun-gauge { display: none; }
  .section-intro { align-items: flex-start; flex-direction: column; }
  .editor-shell { margin-inline: -14px; border-radius: 0; }
  #palette-list { grid-template-columns: repeat(3,1fr); }
  .canvas-toolbar input { width: 180px; }
}
@media print {
  body { background: #fff; }
  .sidebar, .top-actions, .nav-list, .panel-actions, .component-palette, .properties-panel, .technical-note, #toast { display: none !important; }
  .app-shell { display: block; }
  main { padding: 0; }
  .topbar { height: auto; padding: 0 0 15px; }
  .view { display: block !important; break-before: page; }
  #view-dashboard { break-before: auto; }
  .card, .metric-card, .circuit-card, .summary-hero, .result-panel { box-shadow: none; break-inside: avoid; }
  .editor-shell { display: block; min-height: 0; }
  .canvas-wrap { height: 720px; border: 1px solid #ccd7df; }
  .panel-canvas { min-height: 660px; }
}
