/* SolarCalc — single stylesheet, no framework. */

:root {
  --bg: #f7fafc;
  --card: #ffffff;
  --ink: #10222e;
  --ink-soft: #4a6070;
  --brand: #0b3d5c;
  --brand-2: #0e7bb5;
  --sun: #f5a623;
  --line: #dde7ee;
  --ok: #1c7d4f;
  --radius: 12px;
  --wrap: 1080px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-head {
  background: var(--brand);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(0,0,0,.15);
}
.head-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; min-height: 62px; flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  color: #fff; text-decoration: none; font-weight: 700; font-size: 1.16rem;
}
.brand-mark { font-size: 1.3rem; line-height: 1; }
.brand-thin { font-weight: 300; opacity: .85; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  color: #dce9f2; text-decoration: none; padding: 7px 11px;
  border-radius: 7px; font-size: .94rem;
}
.site-nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.site-nav a.active { background: rgba(255,255,255,.16); color: #fff; }

/* ---------- hero ---------- */
.hero { padding: 42px 0 10px; }
.hero h1 {
  font-size: clamp(1.85rem, 4.6vw, 2.7rem);
  line-height: 1.18; margin: 0 0 14px; letter-spacing: -.02em;
}
.hero h1 em { color: var(--brand-2); font-style: normal; }
.lede { font-size: 1.08rem; color: var(--ink-soft); max-width: 62ch; margin: 0 0 8px; }
.crumb { font-size: .9rem; color: var(--ink-soft); margin: 0 0 8px; }
.crumb a { color: var(--brand-2); }

/* ---------- panels ---------- */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  margin: 22px 0;
}
.panel.alt { background: #eef6fb; border-color: #cfe3f0; }
.panel h2 { font-size: 1.35rem; margin: 0 0 12px; letter-spacing: -.01em; }
.panel h3 { font-size: 1.06rem; margin: 22px 0 8px; }
.panel p { max-width: 74ch; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-weight: 600; font-size: .93rem; }
.field-hint { font-size: .82rem; color: var(--ink-soft); }
.field select, .field input {
  font: inherit; font-size: 1rem; padding: 11px 12px;
  border: 1px solid #c3d4de; border-radius: 9px; background: #fff; color: var(--ink);
  width: 100%; min-height: 46px;
}
.field select:focus, .field input:focus {
  outline: 2px solid var(--brand-2); outline-offset: 1px; border-color: var(--brand-2);
}

.btn {
  display: inline-block; margin-top: 22px;
  background: var(--brand-2); color: #fff; border: 0;
  font: inherit; font-weight: 600; font-size: 1.02rem;
  padding: 13px 26px; border-radius: 9px; cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: #0a6a9c; }
.btn.inline { margin-top: 6px; }

/* ---------- results ---------- */
.results { margin: 26px 0; }
.results-title { font-size: 1.3rem; margin: 0 0 16px; }
.stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 12px; margin-bottom: 22px;
}
.stat {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px 14px;
  display: flex; flex-direction: column; gap: 3px;
}
.stat-num {
  font-size: 1.5rem; font-weight: 700; line-height: 1.15;
  color: var(--brand); word-break: break-word;
}
.stat-lab { font-size: .82rem; color: var(--ink-soft); }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 18px;
}
.card h3 { margin-top: 0; }
.muted { color: var(--ink-soft); font-size: .92rem; }
.bullets { padding-left: 20px; margin: 10px 0; }
.bullets li { margin-bottom: 6px; font-size: .94rem; }
.textlink { color: var(--brand-2); font-weight: 600; }

/* ---------- tables ---------- */
table { border-collapse: collapse; width: 100%; margin: 12px 0 6px; font-size: .94rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
tbody tr:hover { background: #f3f9fd; }
.month-table td:not(:first-child), .data-table td:not(:first-child) { text-align: right; }
.month-table th:not(:first-child) { text-align: right; }
.table-scroll { overflow-x: auto; }

.city-links {
  list-style: none; padding: 0; margin: 12px 0 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.city-links li { margin: 0; }
.city-links a {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  background: #e6f1f8; color: var(--brand); text-decoration: none;
  font-size: .9rem; border: 1px solid #cfe3f0;
}
.city-links a:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- footer ---------- */
.site-foot {
  background: #0a2c42; color: #b9cfdd; margin-top: 40px;
  padding: 34px 0 22px; font-size: .91rem;
}
.foot-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}
.foot-grid p { margin: 4px 0; }
.foot-brand { color: #fff; font-weight: 700; font-size: 1.05rem; }
.foot-h { color: #fff; font-weight: 600; text-transform: uppercase; font-size: .78rem; letter-spacing: .06em; }
.site-foot a { color: #8fc4e0; text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.foot-note {
  margin-top: 26px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12);
  font-size: .84rem; color: #90a9b9;
}

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .panel { padding: 20px 16px; }
  .stat-row { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); }
  .stat-num { font-size: 1.28rem; }
  th, td { padding: 8px 7px; font-size: .89rem; }
  .btn { width: 100%; text-align: center; }
}

@media print {
  .site-head, .site-foot, .btn { display: none; }
  body { background: #fff; }
  .panel { border: 1px solid #ccc; break-inside: avoid; }
}
