:root {
  color-scheme: light;
  --bg: #fff;
  --panel: #fff;
  --panel2: #f6f6f6;
  --line: #d4d4d4;
  --text: #292929;
  --muted: #505050;
  --blue: #17577d;
  --orange: #8a5100;
  --green: #166534;
  --red: #a52330;
}
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 Consolas, "Liberation Mono", monospace;
}
.schronpro-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  padding: 14px max(18px, calc((100% - 1240px) / 2));
  border-bottom: 1px solid var(--line);
  background: white;
}
.schronpro-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}
.schronpro-brand img { width: 44px; height: 44px; object-fit: contain; }
.schronpro-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.schronpro-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 13px;
  border: 2px solid #333;
  color: #333;
  background: white;
  text-decoration: none;
  font-weight: 700;
}
.schronpro-nav a:hover, .schronpro-nav a:focus-visible { background: #efefef; }
.schronpro-nav .schronpro-tools { border-color: var(--line); }
.dashboard { max-width: 1288px; padding: 32px 24px 48px; }
.dashboard .hero { max-width: none; padding: 22px; margin-bottom: 20px; border: 1px solid var(--line); }
.dashboard .hero h1 { font-size: clamp(25px, 3vw, 34px); line-height: 1.2; margin: 0 0 12px; }
.dashboard .hero p { font-size: 15px; margin: 0; }
.tiles { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.tile { background: white; min-height: 190px; padding: 18px; border-radius: 8px; color: var(--text); }
.tile.active::before { content: none; }
.tile.active:hover, .tile.active:focus-visible { transform: none; border-color: var(--blue); box-shadow: 0 6px 18px #00000012; }
.tile h2 { margin: 0 0 9px; padding-right: 36px; padding-bottom: 7px; border-bottom: 1px solid var(--line); font-size: 17px; }
.tile p { margin: 0 0 14px; }
.tile .icon { color: var(--blue); font-size: 23px; top: 14px; right: 17px; }
.tile .open { color: var(--blue); letter-spacing: normal; text-decoration: underline; }
footer { border-color: var(--line); color: var(--muted); }
.wrap, .module { padding-top: 28px; }
.hero h1, .module-head h1 { color: var(--text); font-size: clamp(24px, 3.4vw, 34px); }
.eyebrow { color: var(--blue); }
.module-head p, .caption, .limits, .legend, .source, .result-panel p, label { color: var(--muted); }
.card, .result-panel, .metric, .muted-card {
  color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: none;
}
.card h2 { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.metric strong, .big-result strong, .result-value, .metric em, .big-result span, .big-result em { color: var(--text); }
input, select, textarea { background: white; color: var(--text); border: 1px solid #a8a8a8; border-radius: 2px; }
button, .button, .primary, .ghost, .secondary, .presets button {
  color: var(--text); background: white; border: 2px solid #333; border-radius: 2px; font: 700 13px/1.4 Consolas, monospace;
}
button:hover, .button:hover, .primary:hover, .ghost:hover, .secondary:hover { background-color: #efefef; }
.calc, .calculations, .formula, .audit, .details, .rule, .assumption, th, .mini, .mode, .tab {
  color: var(--text); background: #f6f6f6; border-color: var(--line);
}
.mode small, .rule p { color: var(--muted); }
.mode.active, .tab.active, .info { background: #eaf4fa; color: #164d68; border-color: #9cbcd0; }
.ok, .success, .status.green { background: #eaf7ed; color: #176036; border-color: #a5c6ad; }
.warn, .warning, .legal-warning, .status.yellow { background: #fff7e4; color: #684600; border-color: #d4b564; }
.bad, .danger, .status.red { background: #ffedef; color: #8a1e2c; border-color: #dbabb2; }
.source a { color: var(--blue); }
@media (max-width:620px) {
  .dashboard { padding: 20px 14px 36px; }
  .schronpro-nav { justify-content: flex-start; }
}
@media print {
  .schronpro-header { display: none; }
}

/* Keep labels, controls and their neighbouring panels inside their columns. */
[hidden] { display: none !important; }
.layout > *, .card, .result-panel, .module-head > *, .section-head > *, .grid > *, .mode-grid > * { min-width: 0; }
.module-head, .section-head { flex-wrap: wrap; }
.module-head > div:first-child { flex: 1 1 320px; }
.card h2, .hero h1, .result-panel h2, .mode b, .mode small, .metric strong { overflow-wrap: anywhere; }
.card h2:has(> .section-number) { display: flex; align-items: flex-start; gap: 10px; }
.card h2 > .section-number {
  display: inline-grid;
  flex: 0 0 30px;
  place-items: center;
  width: 30px;
  min-height: 30px;
  margin-right: 0;
  border-radius: 6px;
  background: #eaf4fa;
  color: #164d68;
}
.grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)); }
.module .grid:not(.two):not(.building-data-grid) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
}
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.mode-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr)); }
.grid > label:not(.check) { justify-content: space-between; }
label > .field-text { display: block; line-height: 1.45; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea { min-width: 0; max-width: 100%; }
.mode { height: 100%; }
.table-wrap { max-width: 100%; overflow-x: auto; }
.module .result-icon:not(.ok):not(.bad) { background: #eef4f7; color: #164d68; }
@media screen and (max-width: 760px) {
  .module-head { gap: 12px; }
  .module-head h1 { font-size: clamp(24px, 7vw, 32px); }
  .result-panel { position: static; }
}
