/* ==========================================================================
   AWPower Learn — shared design system for the public education pages
   (learn/index.html, hybrid-inverter.html, backup-time.html, your-quote.html,
   faq.html). Standalone: no build step, no src/ imports, no auth, no
   network calls other than Google Fonts + the two logo PNGs.

   Tokens mirror src/styles.css :root and core/report-theme.js — forest
   carries authority, lime is the single energising accent (rules / edges /
   ticks only, never a fill), sage greys + off-whites for everything else.
   Prefixed `--l-` / `.learn-` throughout to avoid any collision with the
   app's own `--aw-` / `.aw-` tokens should this file ever be loaded
   alongside them (it never is, but the app CSS is a shared, fragile file —
   this one deliberately keeps its own namespace).
   ========================================================================== */

:root {
  --l-forest: #14271a;
  --l-lime: #84bd2d;
  --l-green: #2f7a3c;
  --l-sage: #9aa099;
  --l-sage-2: #6c726a;
  --l-sage-3: #4a4f49;
  --l-off-1: #f3f5f0;
  --l-off-2: #eef0ec;
  --l-off-3: #fbfdf7;
  --l-amber: #e0902a;
  --l-amber-dk: #8a5a06;
  --l-amber-tint: #faf1de;
  --l-amber-line: #e6c98f;
  --l-brick: #b3402a;
  --l-brick-tint: #f3e3de;
  --l-line: #e2e7de;
  --l-line-strong: #d3dacd;

  --l-mono: "JetBrains Mono", Consolas, "Courier New", monospace;
  --l-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --l-display: "Sora", var(--l-sans);

  --l-bg: var(--l-off-1);
  --l-card: #ffffff;
  --l-text: var(--l-forest);
  --l-muted: var(--l-sage-2);
  --l-link: var(--l-green);
  --l-shadow: 0 8px 30px rgba(20, 39, 26, 0.08);
}


* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--l-bg);
  color: var(--l-text);
  font-family: var(--l-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

a {
  color: var(--l-link);
}

.learn-shell {
  max-width: 520px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

@media (min-width: 640px) {
  .learn-shell {
    padding: 44px 16px 64px;
  }
}

/* ---- header ------------------------------------------------------------ */
.learn-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.learn-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.learn-logo {
  height: 32px;
  width: auto;
  display: block;
}


.learn-wordmark {
  font-family: var(--l-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--l-green);
  border-left: 1px solid var(--l-line-strong);
  padding-left: 10px;
  white-space: nowrap;
}


.learn-back {
  font-family: var(--l-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--l-muted);
  text-decoration: none;
  white-space: nowrap;
  flex: none;
}

.learn-back:hover {
  color: var(--l-green);
}

/* ---- eyebrow (house section label) -------------------------------------- */
.learn-eyebrow {
  position: relative;
  display: inline-block;
  font-family: var(--l-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--l-green);
  padding-bottom: 9px;
  margin: 0 0 8px;
}


.learn-eyebrow::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: var(--l-lime);
}

/* ---- type ---------------------------------------------------------------*/
h1,
h2,
h3 {
  font-family: var(--l-display);
  color: var(--l-text);
  margin: 0 0 8px;
  line-height: 1.25;
}

h1 {
  font-size: 25px;
  font-weight: 700;
}

h2 {
  font-size: 17px;
  font-weight: 700;
  margin-top: 20px;
}

h3 {
  font-size: 15px;
  font-weight: 600;
}

p {
  margin: 0 0 12px;
}

.learn-lead {
  color: var(--l-muted);
  font-size: 14.5px;
}

/* ---- card -----------------------------------------------------------------*/
.learn-card {
  background: var(--l-card);
  border: 1px solid var(--l-line);
  border-radius: 16px;
  padding: 20px 18px 22px;
  box-shadow: var(--l-shadow);
}

.learn-card + .learn-card {
  margin-top: 16px;
}

/* ---- hub topic cards --------------------------------------------------- */
.learn-intro {
  margin-bottom: 22px;
}

.learn-topics {
  display: grid;
  gap: 12px;
}

.learn-topic {
  display: block;
  background: var(--l-card);
  border: 1px solid var(--l-line);
  border-radius: 14px;
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
  box-shadow: var(--l-shadow);
}

.learn-topic:hover {
  border-color: var(--l-green);
  transform: translateY(-1px);
}

.learn-topic-title {
  font-family: var(--l-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--l-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.learn-topic-title .learn-arrow {
  color: var(--l-lime);
  font-weight: 700;
  flex: none;
}

.learn-topic-teaser {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: var(--l-muted);
}

/* ---- segmented control (mode switch / battery size / etc.) --------------*/
.learn-seg {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 4px;
}

.learn-seg button {
  flex: 1;
  min-width: 78px;
  border: 1px solid var(--l-line-strong);
  background: var(--l-card);
  color: var(--l-muted);
  padding: 10px 8px;
  border-radius: 11px;
  font-size: 13.5px;
  font-family: var(--l-sans);
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.learn-seg button.is-on {
  background: var(--l-off-1);
  border-color: var(--l-green);
  color: var(--l-forest);
}


/* ---- pills ----------------------------------------------------------------*/
.learn-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--l-mono);
  font-size: 11px;
  font-weight: 700;
}

.learn-pill.is-on {
  background: #e1f5ee;
  border: 1px solid var(--l-green);
  color: #0f6e56;
}

.learn-pill.is-off {
  background: var(--l-brick-tint);
  border: 1px solid var(--l-brick);
  color: var(--l-brick);
}

.learn-pill.is-export {
  background: var(--l-amber-tint);
  border: 1px solid var(--l-amber);
  color: var(--l-amber-dk);
}

/* ---- footer / CTA ---------------------------------------------------------*/
.learn-footer {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--l-line);
  text-align: center;
}

.learn-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.learn-cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.learn-cta-btn {
  display: inline-block;
  background: var(--l-forest);
  color: #ffffff;
  font-family: var(--l-sans);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 24px;
  border: 1.5px solid var(--l-forest);
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.learn-cta-btn:hover {
  opacity: 0.9;
}

.learn-cta-btn--outline {
  background: transparent;
  color: var(--l-forest);
}


.learn-cta-contact {
  font-size: 12.5px;
  color: var(--l-muted);
}

.learn-cta-contact a {
  color: var(--l-green);
  font-weight: 600;
  text-decoration: none;
}


.learn-fineprint {
  margin-top: 16px;
  font-size: 11px;
  color: var(--l-sage);
}

/* ---- FAQ / details ---------------------------------------------------------*/
.learn-faq details {
  border-bottom: 1px solid var(--l-line);
  padding: 14px 0;
}

.learn-faq details:first-child {
  padding-top: 0;
}

.learn-faq details:last-child {
  border-bottom: none;
}

.learn-faq summary {
  cursor: pointer;
  font-family: var(--l-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--l-text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.learn-faq summary::-webkit-details-marker {
  display: none;
}

.learn-faq summary::after {
  content: "+";
  font-family: var(--l-mono);
  color: var(--l-lime);
  font-size: 19px;
  flex: none;
  line-height: 1;
}

.learn-faq details[open] summary::after {
  content: "\2212";
}

.learn-faq details p {
  margin: 10px 0 0;
  color: var(--l-muted);
  font-size: 14px;
}

/* ---- misc utility -----------------------------------------------------------*/
.learn-note {
  font-size: 12.5px;
  color: var(--l-sage);
}

.learn-box {
  background: var(--l-off-1);
  border: 1px solid var(--l-line);
  border-radius: 12px;
  padding: 14px 16px;
}


.hidden {
  display: none !important;
}

/* ---- enquiry modal -------------------------------------------------------
   Shared in-page contact form (replaces the mailto: CTAs). Light-only, forest
   authority + lime accent, matching the rest of the learn pages. Built by
   learn.js; opened from the footer CTA and the solar-options option buttons. */
.learn-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(20, 39, 26, 0.55);
}

.learn-modal-backdrop[hidden] {
  display: none !important;
}

.learn-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow: auto;
  background: var(--l-card);
  border: 1px solid var(--l-line);
  border-radius: 16px;
  padding: 26px 22px 24px;
  box-shadow: 0 18px 50px rgba(20, 39, 26, 0.28);
}

.learn-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 16px;
  line-height: 1;
  color: var(--l-sage-2);
  background: transparent;
  border: 1px solid var(--l-line);
  border-radius: 9px;
  cursor: pointer;
  transition: 0.15s ease;
}

.learn-modal-close:hover {
  color: var(--l-forest);
  border-color: var(--l-line-strong);
}

.learn-modal-title {
  font-family: var(--l-display);
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 6px;
  padding-right: 34px;
}

.learn-modal-intro {
  font-size: 13.5px;
  color: var(--l-muted);
  margin: 0 0 16px;
}

.learn-modal-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.learn-modal-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.learn-modal-label {
  font-family: var(--l-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--l-sage-2);
}

.learn-modal-help {
  font-size: 12px;
  color: var(--l-sage);
}

.learn-modal-input {
  width: 100%;
  font-family: var(--l-sans);
  font-size: 15px;
  color: var(--l-text);
  background: var(--l-off-3);
  border: 1px solid var(--l-line-strong);
  border-radius: 10px;
  padding: 11px 13px;
  transition: border-color 0.15s ease;
}

.learn-modal-input:focus {
  outline: none;
  border-color: var(--l-green);
}

.learn-modal-textarea {
  resize: vertical;
  min-height: 92px;
  line-height: 1.5;
}

/* Honeypot — kept in the DOM (bots fill it) but pushed off-screen for humans. */
.learn-hp {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.learn-modal-error {
  font-size: 13px;
  color: var(--l-brick);
  margin: 0;
}

.learn-modal-error[hidden] {
  display: none !important;
}

.learn-modal-error a {
  color: var(--l-green);
  font-weight: 600;
}

.learn-modal-actions {
  margin-top: 4px;
}

.learn-modal-submit {
  width: 100%;
  cursor: pointer;
}

.learn-modal-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.learn-modal-thanks[hidden] {
  display: none !important;
}

.learn-modal-thanks {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.learn-modal-thanks .learn-modal-submit {
  margin-top: 14px;
}
