/* ============================================================
   Quick read / full study (js/read-mode.js)
   ============================================================
   One article, two versions. The page <head> sets html.read-quick before
   anything paints, so these three rules decide what shows and neither version
   flashes on the way in. Tokens come from style.css. */
.read-quick-only { display: none; }
html.read-quick .read-quick-only { display: block; }
html.read-quick .read-full-only { display: none; }

/* ---------- the switch ---------- */
.read-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 6px 0 30px;
  padding: 4px;
  border: 2px solid var(--gold, #caa200);
  border-radius: 14px;
  background: rgba(202, 162, 0, 0.07);
}
.read-mode-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-height: 58px;
  padding: 9px 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft, #555);
  font: inherit;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.read-mode-opt:hover { background: rgba(202, 162, 0, 0.14); }
.read-mode-opt:focus-visible { outline: 2px solid var(--ink, #222); outline-offset: 2px; }
.read-mode-name { font-size: 1.02rem; font-weight: 600; color: var(--ink, #222); }
.read-mode-name i { margin-right: 4px; color: var(--gold-strong, #b08e00); }
.read-mode-sub { font-size: 0.78rem; }
/* The chosen side comes straight from the html class, so it is right before
   any script has run. */
html:not(.read-quick) .read-mode-opt[data-mode="full"],
html.read-quick .read-mode-opt[data-mode="quick"] {
  background: var(--gold, #caa200);
  color: #fff;
  box-shadow: 0 2px 8px rgba(202, 162, 0, 0.35);
  cursor: default;
}
html:not(.read-quick) .read-mode-opt[data-mode="full"] .read-mode-name,
html:not(.read-quick) .read-mode-opt[data-mode="full"] .read-mode-name i,
html.read-quick .read-mode-opt[data-mode="quick"] .read-mode-name,
html.read-quick .read-mode-opt[data-mode="quick"] .read-mode-name i { color: #fff; }

/* ---------- the quick read ---------- */
.about-section .qr-lede { font-size: 1.12em; line-height: 1.65; }

.qr-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 14px 0 8px;
}
.qr-card {
  padding: 14px 16px 10px;
  border: 1px solid var(--border, #e2e2e2);
  border-top: 4px solid var(--gold, #caa200);
  border-radius: 12px;
  background: rgba(202, 162, 0, 0.04);
}
.about-section .qr-card p { margin: 0 0 8px; font-size: 0.9rem; line-height: 1.55; }
.about-section .qr-card .qr-stat {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--gold-strong, #b08e00);
}
.qr-stat span { font-size: 0.9rem; font-weight: 400; color: var(--ink-soft, #666); }
.about-section .qr-card .qr-card-title {
  margin: 4px 0 6px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink, #222);
}
body.dark-mode .about-section .qr-card .qr-stat { color: var(--gold, #caa200); }
body.dark-mode .about-section .qr-card .qr-card-title { color: #f4f4f4; }

.about-section .qr-list { padding-left: 22px; }
.about-section .qr-list li { margin-bottom: 8px; }

.qr-compare {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0 16px;
  font-size: 0.92rem;
  line-height: 1.5;
}
.qr-compare th,
.qr-compare td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(128, 128, 128, 0.25);
  text-align: left;
  vertical-align: top;
}
.qr-compare th { width: 46%; font-weight: 500; }
.qr-compare tr:first-child th,
.qr-compare tr:first-child td { font-weight: 600; background: rgba(202, 162, 0, 0.09); }
.qr-compare td span { font-size: 0.82rem; font-weight: 400; opacity: 0.75; }
body.dark-mode .qr-compare th,
body.dark-mode .qr-compare td { color: #ccc; }
body.dark-mode .qr-compare tr:first-child th,
body.dark-mode .qr-compare tr:first-child td { color: #f4f4f4; }

.qr-pitch {
  margin: 12px 0;
  padding: 12px 16px;
  border-left: 4px solid var(--gold, #caa200);
  border-radius: 0 10px 10px 0;
  background: rgba(128, 128, 128, 0.07);
}
.about-section .qr-pitch p { margin: 0 0 6px; }
.about-section .qr-pitch p:last-child { margin-bottom: 0; }
.about-section .qr-pitch .qr-said { font-style: italic; font-weight: 500; color: var(--ink-soft, #555); }
.qr-said i { margin-right: 6px; font-size: 0.8em; color: var(--gold, #caa200); }

.about-section .qr-checks { counter-reset: qr; list-style: none; padding-left: 0; }
.qr-checks li { position: relative; margin-bottom: 12px; padding-left: 36px; }
.qr-checks li::before {
  counter-increment: qr;
  content: counter(qr);
  position: absolute;
  top: 2px;
  left: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold, #caa200);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
}
body.dark-mode .about-section .qr-checks li { color: #ccc; }

.about-section .qr-switch { font-weight: 600; color: var(--gold-strong, #b08e00); }
body.dark-mode .about-section .qr-switch { color: var(--gold, #caa200); }

.qr-glossary {
  margin: 22px 0;
  padding: 12px 16px;
  border: 1px solid var(--border, #e2e2e2);
  border-radius: 10px;
}
.qr-glossary summary { font-weight: 600; cursor: pointer; }
.qr-glossary dl { margin: 12px 0 0; font-size: 0.9rem; line-height: 1.55; }
.qr-glossary dt { margin-top: 10px; font-weight: 600; }
.qr-glossary dd { margin: 2px 0 0; }
body.dark-mode .qr-glossary dd { color: #ccc; }

.qr-cta {
  margin: 28px 0 8px;
  padding: 20px;
  border: 2px solid var(--gold, #caa200);
  border-radius: 14px;
  background: rgba(202, 162, 0, 0.07);
  text-align: center;
}
.about-section .qr-cta p { margin: 0 0 10px; }
.about-section .qr-cta .qr-cta-title { font-size: 1.2rem; font-weight: 600; color: var(--ink, #222); }
body.dark-mode .about-section .qr-cta .qr-cta-title { color: #f4f4f4; }
.qr-cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 6px 0 10px; }
.qr-btn {
  display: inline-block;
  padding: 10px 18px;
  border: 2px solid var(--gold, #caa200);
  border-radius: 999px;
  background: var(--gold, #caa200);
  color: #fff;
  font: inherit;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
}
.about-section a.qr-btn { color: #fff; }
.qr-btn:hover { border-color: var(--gold-strong, #b08e00); background: var(--gold-strong, #b08e00); }
.qr-btn.qr-btn-ghost { background: transparent; color: var(--ink, #222); }
.qr-btn.qr-btn-ghost:hover { border-color: var(--gold, #caa200); background: rgba(202, 162, 0, 0.14); }
.about-section .qr-cta .qr-cta-note { margin: 0; font-size: 0.8rem; opacity: 0.75; }

@media (max-width: 520px) {
  .read-mode-name { font-size: 0.95rem; }
  .read-mode-sub { font-size: 0.72rem; }
  .qr-compare th { width: 42%; }
}
@media print { .read-mode { display: none; } }

/* ---------- byline, above both versions ---------- */
.about-section .post-byline {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin: -8px 0 18px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-soft, #666);
}
.post-byline i { color: var(--gold, #caa200); }
body.dark-mode .about-section .post-byline { color: #b6b6b6; }

/* ---------- the fine print ---------- */
.qr-faq { margin: 6px 0 14px; }
.qr-faq dt { margin-top: 14px; font-weight: 600; color: var(--ink, #222); }
.qr-faq dd { margin: 4px 0 0; line-height: 1.6; }
body.dark-mode .qr-faq dt { color: #f4f4f4; }
body.dark-mode .qr-faq dd { color: #ccc; }

/* ---------- takeaway tiles: what they are ---------- */
.about-section .qr-kicker {
  margin: 20px 0 8px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  opacity: 0.6;
}
.about-section .qr-card .qr-card-tag {
  margin: 0 0 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-strong, #b08e00);
}
body.dark-mode .about-section .qr-card .qr-card-tag { color: var(--gold, #caa200); }

/* ---------- which California study is yours ----------
   Sits above the read-mode switch on all four California studies. The PG&E
   study is the landing page for every California ad, so a Southern California
   reader arrives on the wrong utility; this is how they find the right one.
   Two axes, laid out as a grid so they read at a glance: utility down the
   side, situation across the top. */
.study-chooser {
  margin: 4px 0 22px;
  padding: 14px 16px 12px;
  border: 1px solid var(--line, #e2e2e2);
  border-radius: 14px;
  background: rgba(202, 162, 0, 0.04);
}
body.dark-mode .study-chooser { border-color: #4a4a4a; background: rgba(202, 162, 0, 0.06); }
.study-chooser .sc-head { margin: 0 0 10px; font-size: .92rem; line-height: 1.45; }
.study-chooser .sc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.study-chooser .sc-cell {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "util tag" "title title" "n n";
  gap: 1px 8px;
  padding: 10px 12px;
  border: 1px solid var(--line, #e2e2e2);
  border-radius: 10px;
  background: var(--card, #fff);
  color: inherit;
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}
body.dark-mode .study-chooser .sc-cell { background: #343434; border-color: #4a4a4a; }
a.sc-cell:hover, a.sc-cell:focus-visible { border-color: var(--gold, #caa200); transform: translateY(-1px); }
a.sc-cell:focus-visible { outline: 2px solid var(--gold, #caa200); outline-offset: 2px; }
/* The current study is marked, not linked: it is where the reader already is. */
.study-chooser .sc-cell.is-here { border: 2px solid var(--gold, #caa200); background: rgba(202, 162, 0, 0.10); }
.sc-util { grid-area: util; font-size: .7rem; font-weight: 700; letter-spacing: .08em;
           text-transform: uppercase; color: var(--gold, #caa200); }
.sc-title { grid-area: title; font-weight: 600; font-size: .95rem; line-height: 1.3; }
.sc-n { grid-area: n; font-size: .78rem; opacity: .7; }
.sc-here, .sc-go { grid-area: tag; justify-self: end; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.sc-here { color: var(--gold, #caa200); }
.sc-go { opacity: .75; }
.study-chooser .sc-note { margin: 10px 0 0; font-size: .76rem; line-height: 1.5; opacity: .75; }
@media (max-width: 420px) {
  .study-chooser .sc-cell { padding: 9px 10px; }
  .sc-title { font-size: .88rem; }
}
