@import url("https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@100..125,400..900&family=Newsreader:ital,opsz,wght@0,6..72,400..700;1,6..72,400..600&family=IBM+Plex+Mono:wght@400;500;600&display=swap");

/* Solar Panels SA: component styles. Every value comes from tokens.css. */
body { background: var(--paper); color: var(--ink); font-family: var(--font-serif); margin: 0; }
.sp-root *, .sp-root *::before, .sp-root *::after { box-sizing: border-box; }
.sp-root *, .sp-root *::before, .sp-root *::after { box-sizing: border-box; }
.sp-wrap { max-width: 1200px; margin: 0 auto; padding-inline: var(--space-6); }
.sp-measure { max-width: 680px; }
.sp-display, .sp-h1, .sp-h2, .sp-h3, .sp-h4 { font-family: var(--font-display); color: var(--ink); text-wrap: balance; margin: 0; }
.sp-display { font-size: 64px; line-height: 64px; font-weight: 800; letter-spacing: -0.025em; font-stretch: 112%; }
.sp-h1 { font-size: 46px; line-height: 50px; font-weight: 800; letter-spacing: -0.02em; font-stretch: 108%; }
.sp-h2 { font-size: 32px; line-height: 38px; font-weight: 750; letter-spacing: -0.015em; }
.sp-h3 { font-size: 23px; line-height: 29px; font-weight: 700; letter-spacing: -0.01em; }
.sp-h4 { font-size: 18px; line-height: 24px; font-weight: 700; }
.sp-lede { font-family: var(--font-serif); font-size: 22px; line-height: 33px; color: var(--ink-soft); margin: 0; }
.sp-body { font-size: 18px; line-height: 30px; }
.sp-label, .sp-meta { font-family: var(--font-display); font-size: 14px; line-height: 20px; font-weight: 500; color: var(--muted); margin: 0; }
.sp-caption { font-family: var(--font-display); font-size: 14px; line-height: 20px; color: var(--muted); margin-top: var(--space-2); }
.sp-data { font-family: var(--font-mono); font-size: 14px; line-height: 20px; font-variant-numeric: tabular-nums; }
.sp-ui { font-family: var(--font-display); font-size: 15px; line-height: 22px; font-weight: 600; }
a.sp-link, .sp-prose a { color: var(--cell); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a.sp-link:hover, .sp-prose a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--cell); outline-offset: 2px; }

/* Buttons */
.sp-btn { display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 20px; padding: 13px 22px; border-radius: var(--radius-md); border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.sp-btn--sun { background: var(--sun); color: var(--on-sun); }
.sp-btn--sun:hover { background: var(--sun-hover); }
.sp-btn--amber { background: var(--amber); color: var(--ink); }
.sp-btn--amber:hover { background: var(--amber-hover); }
.sp-btn--ink { background: var(--ink); color: var(--on-night); }
.sp-btn--ink:hover { background: var(--night-raised); }
.sp-btn--line { background: transparent; color: var(--ink); border-color: var(--ink); }
.sp-btn--line:hover { background: var(--ink); color: var(--on-night); }
.sp-btn--sm { font-size: 14px; padding: 8px 14px; }

.sp-tag { font-family: var(--font-display); font-size: 14px; line-height: 20px; font-weight: 600; color: var(--cell); text-decoration: none; }
a.sp-tag:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Header */
.sp-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.sp-header__bar { display: flex; align-items: center; gap: var(--space-6); min-height: 76px; }
.sp-header__logo img { height: 34px; width: auto; display: block; }
.sp-nav { display: flex; gap: var(--space-5); margin-left: auto; flex-wrap: wrap; }
.sp-nav a { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--ink); text-decoration: none; padding-block: 6px; border-bottom: 2px solid transparent; }
.sp-nav a:hover, .sp-nav a[aria-current] { border-bottom-color: var(--amber); }

/* Image slots: stand-ins for Elementor image widgets */
.sp-img { position: relative; background-color: var(--night-raised); background-image: repeating-linear-gradient(90deg, transparent 0 46px, var(--ink) 46px 49px), repeating-linear-gradient(0deg, transparent 0 70px, var(--ink) 70px 73px); border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 16 / 9; max-width: 100%; }
.sp-img::after { content: attr(data-label); position: absolute; left: 12px; bottom: 10px; font-family: var(--font-display); font-size: 12px; color: var(--on-night-muted); background: var(--ink); padding: 3px 7px; border-radius: var(--radius-sm); }
.sp-img--sq { aspect-ratio: 4 / 3; }
.sp-img--tall { aspect-ratio: 4 / 5; }

/* Post cards */
.sp-card { display: flex; flex-direction: column; gap: var(--space-3); text-decoration: none; color: inherit; }
.sp-card__title { font-family: var(--font-display); font-weight: 700; font-size: 21px; line-height: 27px; letter-spacing: -0.01em; color: var(--ink); margin: 0; text-wrap: balance; }
.sp-card:hover .sp-card__title { text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.sp-card__excerpt { font-size: 16.5px; line-height: 26px; color: var(--ink-soft); margin: 0; }
.sp-card__by { font-family: var(--font-display); font-size: 14px; line-height: 20px; color: var(--muted); }
.sp-card--row { flex-direction: row; gap: var(--space-4); align-items: flex-start; }
.sp-card--row .sp-img { width: 132px; flex: none; aspect-ratio: 4 / 3; }
.sp-card--row .sp-card__title { font-size: 17px; line-height: 23px; }
.sp-card--feature .sp-card__title { font-size: 30px; line-height: 36px; font-weight: 800; }

/* Article prose (full-length posts) */
.sp-prose { font-family: var(--font-serif); font-size: 19px; line-height: 31px; color: var(--ink); }
.sp-prose > * { margin-block: 0; }
.sp-prose > * + * { margin-top: var(--space-5); }
.sp-prose h2 { font-family: var(--font-display); font-size: 28px; line-height: 34px; font-weight: 750; letter-spacing: -0.015em; text-wrap: balance; }
.sp-prose > h2 { margin-top: var(--space-8); }
.sp-prose > h2 + * , .sp-prose > h3 + * { margin-top: var(--space-3); }
.sp-prose h3 { font-family: var(--font-display); font-size: 21px; line-height: 27px; font-weight: 700; }
.sp-prose > h3 { margin-top: var(--space-6); }
.sp-prose > h2:first-child { margin-top: 0; }
.sp-prose ul, .sp-prose ol { padding-left: 1.3em; }
.sp-prose li + li { margin-top: var(--space-2); }
.sp-prose ol li::marker { font-family: var(--font-display); font-weight: 800; color: var(--sun); }
.sp-prose ul li::marker { color: var(--amber); font-size: 1.2em; }
.sp-prose blockquote { margin-inline: 0; padding: 0 0 0 var(--space-5); border-left: 4px solid var(--amber); font-style: italic; font-size: 22px; line-height: 33px; }
.sp-prose code { font-family: var(--font-mono); font-size: 15px; background: var(--cell-tint); padding: 1px 5px; border-radius: var(--radius-sm); }
.sp-prose figure { margin-inline: 0; }
.sp-prose figcaption { font-family: var(--font-display); font-size: 14px; line-height: 20px; color: var(--muted); margin-top: var(--space-2); }

/* Sum card: worked calculations */
.sp-sum { background: var(--amber-tint); border-radius: var(--radius-md); padding: var(--space-5); display: grid; gap: var(--space-4); }
.sp-sum__title { font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 22px; color: var(--ink); margin: 0; }
.sp-sum__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.sp-sum__t { background: var(--surface); border-radius: var(--radius-md); padding: 10px 16px; display: grid; gap: 2px; min-width: 96px; }
.sp-sum__l { font-family: var(--font-display); font-size: 13px; line-height: 18px; font-weight: 500; color: var(--muted); }
.sp-sum__v { font-family: var(--font-display); font-size: 22px; line-height: 28px; font-weight: 750; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sp-sum__t--result { background: var(--sun); }
.sp-sum__t--result .sp-sum__l, .sp-sum__t--result .sp-sum__v { color: var(--on-sun); }
.sp-sum__op { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--amber-deep); }
.sp-sum__note { font-family: var(--font-serif); font-size: 16px; line-height: 25px; color: var(--ink-soft); margin: 0; }

/* Callout */
.sp-callout { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2) var(--space-4); padding: var(--space-5); border-radius: var(--radius-md); background: var(--amber-tint); font-family: var(--font-serif); font-size: 17px; line-height: 27px; }
.sp-callout__k { font-family: var(--font-display); font-size: 15px; font-weight: 700; padding-top: 2px; }
.sp-callout p { margin: 0; }
.sp-callout--rule { background: var(--cell-tint); }
.sp-callout--rule .sp-callout__k { color: var(--cell); }
.sp-callout--warn { background: var(--surface); border: 2px solid var(--stage-red); }
.sp-callout--warn .sp-callout__k { color: var(--stage-red); }

/* Spec table */
.sp-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.sp-table { width: 100%; border-collapse: collapse; font-family: var(--font-display); font-size: 15px; line-height: 21px; }
.sp-table th { font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--muted); text-align: left; padding: 12px 16px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.sp-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sp-table tr:last-child td { border-bottom: 0; }
.sp-table td.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.sp-table th.num { text-align: right; }
.sp-table tbody tr:hover { background: var(--paper); }

/* Load shedding stage meter */
.sp-stages { background: var(--ink); color: var(--on-night); border-radius: var(--radius-lg); padding: var(--space-6); display: grid; gap: var(--space-5); }
.sp-stages__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); flex-wrap: wrap; }
.sp-stages__title { font-family: var(--font-display); font-size: 22px; font-weight: 750; margin: 0; }
.sp-stages__grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; align-items: end; }
.sp-stage { display: grid; gap: 8px; }
.sp-stage__bar { background: var(--night-raised); border-radius: var(--radius-sm); transform: skewX(-8deg); }
.sp-stage__bar.is-amber { background: var(--amber); }
.sp-stage__bar.is-red { background: var(--sun); }
.sp-stage.is-now .sp-stage__bar { outline: 3px solid var(--on-night); outline-offset: 2px; }
.sp-stage.is-now .sp-stage__n { color: var(--on-night); }
.sp-stages__dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--grid-green-bright); margin-right: 8px; }
.sp-stages__now { font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--on-night); display: inline-flex; align-items: center; }
.sp-stage__n { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--on-night-muted); }
.sp-stage__mw { font-family: var(--font-mono); font-size: 11px; color: var(--on-night-muted); font-variant-numeric: tabular-nums; }
.sp-stages__foot { font-family: var(--font-display); font-size: 13px; line-height: 19px; color: var(--on-night-muted); margin: 0; }

/* Peak sun hours strip */
.sp-sun { display: grid; gap: var(--space-3); }
.sp-sun__row { display: grid; grid-template-columns: 130px 1fr 56px; gap: var(--space-4); align-items: center; }
.sp-sun__city { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.sp-sun__track { height: 14px; background: var(--amber-tint); border-radius: var(--radius-sm); overflow: hidden; }
.sp-sun__fill { height: 100%; background: var(--amber); border-right: 4px solid var(--sun); }
.sp-sun__val { font-family: var(--font-mono); font-size: 14px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* Newsletter + forms */
.sp-news { background: var(--amber); color: var(--ink); border-radius: var(--radius-lg); padding: var(--space-7); display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--space-6); align-items: center; }
.sp-news h3 { color: var(--ink); }
.sp-news p { color: var(--ink); margin: var(--space-2) 0 0; font-size: 17px; line-height: 27px; }
.sp-field { display: grid; gap: 6px; }
.sp-field label { font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--ink); }
.sp-input, .sp-select, .sp-textarea { font-family: var(--font-display); font-size: 16px; line-height: 22px; padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); width: 100%; }
.sp-input:focus, .sp-select:focus, .sp-textarea:focus { outline: 3px solid var(--cell); outline-offset: 1px; border-color: var(--cell); }
.sp-textarea { min-height: 150px; resize: vertical; }
.sp-news .sp-inline { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.sp-news .sp-input { flex: 1 1 200px; border-color: var(--ink); }
.sp-hint { font-family: var(--font-display); font-size: 13px; line-height: 19px; color: var(--muted); }

/* Author box */
.sp-author { display: grid; grid-template-columns: 64px 1fr; gap: var(--space-4); padding: var(--space-5); border-top: 2px solid var(--ink); }
.sp-author__pic { width: 64px; height: 64px; border-radius: 50%; background: var(--amber-tint); display: grid; place-items: center; }
.sp-author__pic img { width: 40px; }
.sp-author p { margin: var(--space-1) 0 0; font-size: 16px; line-height: 25px; color: var(--ink-soft); }

/* Footer */
.sp-footer { background: var(--ink); color: var(--on-night-muted); padding-block: var(--space-8) var(--space-6); font-family: var(--font-display); font-size: 15px; line-height: 22px; }
.sp-footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--space-6); }
.sp-footer h4 { font-family: var(--font-display); font-size: 15px; color: var(--amber); margin: 0 0 var(--space-3); font-weight: 700; }
.sp-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.sp-footer a { color: var(--on-night-muted); text-decoration: none; }
.sp-footer a:hover { color: var(--amber); }
.sp-footer__base { margin-top: var(--space-7); padding-top: var(--space-4); border-top: 1px solid var(--night-raised); display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; font-size: 13px; }

/* Page sections */
.sp-section { padding-block: var(--space-9); }
.sp-section--tight { padding-block: var(--space-7); }
.sp-section--white { background: var(--surface); }
.sp-section--amber { background: var(--amber-tint); }
.sp-suncard { background: var(--surface); border-radius: var(--radius-md); padding: var(--space-5); }
.sp-principle { border-top: 4px solid var(--amber); padding-top: var(--space-4); }
.sp-principle .sp-body { margin: var(--space-3) 0 0; color: var(--ink-soft); }
.sp-principles { gap: var(--space-7) var(--space-8); }
.sp-section--night { background: var(--ink); color: var(--on-night); }
.sp-section--night .sp-h1, .sp-section--night .sp-h2, .sp-section--night .sp-h3, .sp-section--night .sp-display { color: var(--on-night); }
.sp-section--night .sp-lede, .sp-section--night .sp-label { color: var(--on-night-muted); }
.sp-rule { height: 0; border: 0; border-top: 2px solid var(--ink); margin: 0; }
.sp-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-7) var(--space-6); }
.sp-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
.sp-hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--space-8); align-items: center; }
.sp-half { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-8); align-items: center; }
.sp-feature-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--space-7); align-items: start; }
.sp-burger { display: none; margin-left: auto; width: 44px; height: 44px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); align-items: center; justify-content: center; }
.sp-burger span, .sp-burger span::before, .sp-burger span::after { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; content: ""; }
.sp-burger span::before { position: absolute; top: -6px; } .sp-burger span::after { position: absolute; top: 6px; }
.sp-split > *, .sp-split > * > *, .sp-prose, .sp-stack { min-width: 0; }
.sp-split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--space-8); align-items: start; }
.sp-stack > * + * { margin-top: var(--space-5); }
.sp-sec-head { display: flex; justify-content: space-between; align-items: end; gap: var(--space-4); margin-bottom: var(--space-6); padding-bottom: var(--space-3); border-bottom: 2px solid var(--ink); flex-wrap: wrap; }
.sp-chips { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.sp-chip { font-family: var(--font-display); font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line-strong); color: var(--ink); background: var(--surface); text-decoration: none; }
.sp-chip[aria-current] { background: var(--ink); color: var(--on-night); border-color: var(--ink); }
.sp-chip:hover { border-color: var(--ink); }
.sp-pager { display: flex; gap: var(--space-2); font-family: var(--font-display); font-weight: 600; font-size: 14px; flex-wrap: wrap; }
.sp-pager a { min-width: 40px; height: 40px; display: grid; place-items: center; border: 1.5px solid var(--line-strong); border-radius: var(--radius-md); color: var(--ink); text-decoration: none; padding-inline: 10px; }
.sp-pager a[aria-current] { background: var(--ink); color: var(--on-night); border-color: var(--ink); }
.sp-toc { border-top: 4px solid var(--amber) !important; position: sticky; top: var(--space-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-5); }
.sp-toc ol { margin: var(--space-3) 0 0; padding-left: 1.2em; font-family: var(--font-display); font-size: 15px; line-height: 22px; display: grid; gap: var(--space-2); }
.sp-toc a { color: var(--ink); text-decoration: none; }
.sp-toc a:hover { color: var(--cell); }

@media (max-width: 900px) {
  .sp-display { font-size: 44px; line-height: 46px; }
  .sp-h1 { font-size: 36px; line-height: 40px; }
  .sp-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-split, .sp-news, .sp-footer__grid, .sp-hero-grid, .sp-half, .sp-feature-grid { grid-template-columns: 1fr; }
  .sp-split aside { position: static !important; }
  .sp-toc { position: static; }
}
@media (max-width: 600px) {
  .sp-wrap { padding-inline: var(--space-4); }
  .sp-display { font-size: 36px; line-height: 39px; }
  .sp-h1 { font-size: 30px; line-height: 34px; }
  .sp-h2 { font-size: 26px; line-height: 31px; }
  .sp-grid-3, .sp-grid-2 { grid-template-columns: 1fr; }
  .sp-nav { display: none; }
  .sp-burger { display: inline-flex; }
  .sp-header .sp-btn { display: none; }
  .sp-stages__grid { gap: 3px; }
  .sp-sun__row { grid-template-columns: 96px 1fr 48px; gap: var(--space-2); }
  .sp-section { padding-block: var(--space-7); }
}
@media (prefers-reduced-motion: reduce) { .sp-btn { transition: none; } }
