/* ==========================================================================
   dsp_site.css -- Site-wide styles for diysolarpirate.com
   Applies to every page in every section.
   Page-specific CSS lives in separate files (e.g. ps_compare.css).
   ========================================================================== */

/* ── CSS CUSTOM PROPERTIES (design tokens) ── */
:root {
  /* Backgrounds */
  --bg:       #e8eef4;
  --surf:     #ffffff;
  --surf2:    #f0f4f8;

  /* Borders */
  --bdr:      #b8cedd;
  --bdr-lt:   #d4e7f5;

  /* Text */
  --txt:      #1a2c3d;
  --muted:    #5a7a96;
  --muted-lt: #8aaabb;

  /* Brand colors */
  --gold:     #e07d1a;   /* orange -- action buttons, highlights */
  --green:    #2e8b57;

  /* Blue scale */
  --blue:     #1e6fa8;
  --blue-bg:  #daedf8;
  --blue-bdr: #8ec4e0;
  --blue-dk:  #144f7a;

  /* Navy scale */
  --navy:     #1a2c3d;
  --navy-bg:  #dce8f0;
  --navy-bdr: #8aaabb;

  /* Fonts */
  --fh: 'Syne', sans-serif;
  --fb: 'IBM Plex Sans', sans-serif;
  --fm: 'IBM Plex Mono', monospace;

  /* Power estimator tier colors */
  --est-must:   #198754;
  --est-good:   #ffc107;
  --est-luxury: #dc3545;
}

/* ── RESET ── */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* ── BASE ── */
body {
  background:  var(--bg);
  font-family: var(--fb);
  font-size:   15px;
  color:       var(--txt);
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── HEADER ── */
.site-header {
  background:    linear-gradient(160deg, #1a2c3d 0%, #1e4a6e 60%, #1e6fa8 100%);
  border-bottom: 3px solid #1e6fa8;
  padding:       18px 28px;
  display:       flex;
  align-items:   center;
  gap:           16px;
}
.logo-wrap {
  display:     flex;
  align-items: center;
  gap:         12px;
  text-decoration: none;
}
.logo-img {
  height:        62px;
  width:         auto;
  background:    #fff;
  border-radius: 9px;
  padding:       4px;
}
.site-title {
  font-family:  var(--fh);
  font-size:    24px;
  font-weight:  800;
  color:        #fff;
  line-height:  1.1;
}
.site-subtitle {
  font-family:    var(--fm);
  font-size:      11.5px;
  color:          #fff;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-top:     3px;
}
.header-nav {
  margin-left: auto;
  display:     flex;
  gap:         6px;
}
.header-nav a {
  font-family:    var(--fm);
  font-size:      11.5px;
  color:          #fff;
  padding:        6px 12px;
  border-radius:  4px;
  border:         1px solid rgba(255,255,255,.55);
  transition:     all .15s;
}
.header-nav a:hover  { background: rgba(255,255,255,.15); text-decoration: none; }
.header-nav a.active { background: rgba(255,255,255,.2); }

.report-band {
  background:     #144f7a;
  padding:        9px 28px;
  display:        flex;
  align-items:    center;
  gap:            10px;
  font-family:    var(--fm);
  font-size:      12px;
  color:          #fff;
  letter-spacing: .06em;
}
.rb-bold { font-weight: 700; }

/* ── FOOTER ── */
.site-footer {
  background: linear-gradient(160deg, #1a2c3d 0%, #1e4a6e 60%, #1e6fa8 100%);
  padding:    36px 28px 24px;
  margin-top: 40px;
}
.footer-inner {
  max-width:             1080px;
  margin:                0 auto;
  display:               grid;
  grid-template-columns: auto 1fr auto;
  gap:                   36px;
  align-items:           start;
}
.footer-logo img   { height: 150px; width: auto; filter: brightness(1.1); }
.footer-logo-txt   { font-family: var(--fh); font-size: 22px; font-weight: 800; color: #e07d1a; }
.footer-nav-title  { font-family: var(--fm); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.32); margin-bottom: 12px; }
.footer-links      { display: flex; flex-direction: column; gap: 9px; }
.footer-links a    { font-size: 14.5px; color: rgba(255,255,255,.82); display: flex; align-items: center; gap: 8px; }
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-links a svg   { flex-shrink: 0; opacity: .75; }
.footer-meta {
  font-family: var(--fm);
  font-size:   10.5px;
  color:       rgba(255,255,255,.3);
  text-align:  right;
  line-height: 2;
}
.footer-copy {
  max-width:    1080px;
  margin:       20px auto 0;
  padding-top:  16px;
  border-top:   1px solid rgba(255,255,255,.12);
  font-family:  var(--fm);
  font-size:    10.5px;
  color:        rgba(255,255,255,.2);
  text-align:   center;
  letter-spacing: .04em;
}

/* ── TIPPY TOOLTIP THEME (sp) ── */
[data-tippy-root] { z-index: 9999 !important; }
.tippy-box[data-theme~="sp"] {
  background:   #fff;
  color:        #1a2c3d;
  font-family:  'IBM Plex Sans', sans-serif;
  font-size:    12px;
  line-height:  1.6;
  border-radius: 8px;
  box-shadow:   0 4px 18px rgba(0,0,0,.16), 0 0 0 1px rgba(0,0,0,.06);
  padding:      2px;
}
.tippy-box[data-theme~="sp"] .tippy-content { padding: 8px 12px; }
.tippy-box[data-theme~="sp"][data-placement^="top"]    > .tippy-arrow::before { border-top-color:    #fff; }
.tippy-box[data-theme~="sp"][data-placement^="bottom"] > .tippy-arrow::before { border-bottom-color: #fff; }
.tippy-box[data-theme~="sp"][data-placement^="right"]  > .tippy-arrow::before { border-right-color:  #fff; }

/* ── RESPONSIVE (header/footer chrome only) ── */
@media (max-width: 720px) {
  .site-header { padding: 12px 16px; flex-wrap: wrap; }
  .header-nav  { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-meta  { text-align: left; }
}
