/* =====================================================================
   PTG SOLAR - LEARN GUIDES + SHARE BAR (2026-11-29)
   Styles for learn.html, the learn-*.html guides, the homepage "Learn"
   teaser and the share bar (js/share.js). Works with or without the
   refined look (css/refine.css).
   ===================================================================== */

/* ---------- Share bar ---------- */
.share-bar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.share-label { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate-light); margin-right: 4px; }
.share-btn {
  display: inline-flex; align-items: center; padding: 9px 16px; border: 1.5px solid var(--line);
  border-radius: 999px; font-size: 0.88rem; font-weight: 600; color: var(--ink); background: #fff;
  cursor: pointer; text-decoration: none; transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}
.share-btn:hover { border-color: var(--amber); background: rgba(245,185,60,0.12); transform: translateY(-1px); }
.share-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
/* on dark sections (calculator hero) */
.calc-hero .share-btn, .on-dark .share-btn { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.28); color: #fff; }
.calc-hero .share-btn:hover, .on-dark .share-btn:hover { background: rgba(245,185,60,0.2); border-color: var(--amber); }
.calc-hero .share-label, .on-dark .share-label { color: rgba(255,255,255,0.62); }
.calc-share-row { margin-top: 26px; }

/* ---------- Guides: article ---------- */
.article-wrap { max-width: 760px; margin: 0 auto; }
.article { font-size: 1.08rem; line-height: 1.8; color: #2b3a46; }
.article p { color: #2b3a46; margin: 0 0 20px; font-size: 1.08rem; line-height: 1.8; }
.article h2 { font-size: clamp(1.55rem, 2.6vw, 2rem); margin: 56px 0 16px; letter-spacing: -0.02em; line-height: 1.15; }
.article h3 { font-size: 1.2rem; margin: 30px 0 10px; }
.article ul, .article ol { margin: 0 0 22px; padding-left: 1.3em; }
.article ul { list-style: disc; }
.article ol { list-style: decimal; }
.article li { margin-bottom: 10px; color: #2b3a46; }
.article strong { color: var(--ink); }
.article a { color: var(--amber-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.article-meta { font-size: 0.88rem; color: var(--slate-light); margin: 0 0 36px; }

.keypoints {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--amber);
  border-radius: 16px; padding: 26px 30px; margin: 0 0 44px; box-shadow: var(--shadow-sm);
}
.keypoints .kp-title { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber-dark); display: block; margin-bottom: 12px; }
.keypoints ul { margin: 0; }
.keypoints li { margin-bottom: 8px; }

.note-box { background: var(--paper-dim, #F3F0E8); border-radius: 14px; padding: 20px 24px; margin: 0 0 24px; font-size: 0.98rem; }
.note-box p { margin: 0; font-size: 0.98rem; }

.example-box { background: #fff; border: 1px dashed rgba(217,138,30,0.55); border-radius: 14px; padding: 22px 26px; margin: 0 0 24px; }
.example-box .ex-title { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber-dark); display: block; margin-bottom: 8px; }
.example-box p { margin: 0 0 8px; font-size: 1rem; }
.example-box p:last-child { margin-bottom: 0; }

.article-cta { background: var(--ink); border-radius: 28px; padding: 46px 42px; margin: 64px 0 0; position: relative; overflow: hidden; }
.article-cta::after { content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(245,185,60,0.2), transparent 70%); pointer-events: none; }
.article .article-cta h2, .article-cta h2 { color: #fff; margin: 0 0 12px; font-size: 1.7rem; position: relative; }
.article-cta p { color: rgba(255,255,255,0.78); margin: 0 0 24px; position: relative; font-size: 1.02rem; }
.article-cta .cta-row { display: flex; flex-wrap: wrap; gap: 14px; position: relative; }
.article .article-cta a.btn { text-decoration: none; font-weight: 700; }
.article .article-cta a.btn-primary { color: var(--ink); }
.article .article-cta a.btn-outline-light { color: #fff; }

.share-section { margin: 52px 0 0; padding-top: 26px; border-top: 1px solid var(--line); }

/* ---------- Guide cards (learn.html + homepage teaser + related) ---------- */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.guide-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 30px 28px; box-shadow: var(--shadow-sm); text-decoration: none; color: inherit;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.guide-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(245,185,60,0.6); }
.guide-card .guide-tag { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber-dark); }
.guide-card h3 { font-size: 1.22rem; margin: 10px 0 10px; line-height: 1.25; }
.guide-card p { font-size: 0.95rem; margin: 0; }
.guide-card .guide-go { margin-top: auto; padding-top: 18px; color: var(--amber-dark); font-weight: 600; font-size: 0.95rem; }
.related-title { font-size: 1.4rem; margin: 64px 0 22px; }

/* ---------- Homepage: "What this website is for" (2026-11-30) ---------- */
.pillar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.pillar-card {
  position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: 24px; padding: 34px 28px 30px; box-shadow: var(--shadow-sm); text-decoration: none; color: inherit; overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.pillar-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--gradient-gold); opacity: 0; transition: opacity 0.35s var(--ease); }
.pillar-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: rgba(245,185,60,0.6); }
.pillar-card:hover::before { opacity: 1; }
.pillar-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.pillar-icon { width: 52px; height: 52px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; background: var(--ink); color: var(--amber); }
.pillar-num { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.12em; color: var(--slate-light); }
.pillar-tag { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber-dark); margin-bottom: 8px; }
.pillar-card h3 { font-size: 1.3rem; line-height: 1.2; letter-spacing: -0.015em; margin-bottom: 12px; }
.pillar-card p { font-size: 0.95rem; line-height: 1.65; margin: 0; }
.pillar-go { margin-top: auto; padding-top: 24px; color: var(--ink); font-weight: 700; font-size: 0.95rem; }
.pillar-card:hover .pillar-go { color: var(--amber-dark); }
@media (max-width: 1100px) { .pillar-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .pillar-grid { grid-template-columns: 1fr; } .pillar-card { padding: 28px 24px 26px; } }

/* ---------- Featured card (Learn hub + homepage) and diagram callout (2026-11-30) ---------- */
.feature-card {
  display: grid; grid-template-columns: 1.1fr 0.9fr; background: var(--ink); border-radius: 28px; overflow: hidden;
  box-shadow: var(--shadow-lg); text-decoration: none; color: #fff; position: relative;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 6px 12px rgba(6,15,28,0.08), 0 40px 80px -30px rgba(6,15,28,0.5); }
.feature-media { position: relative; display: block; background: #faf9f5; min-height: 280px; }
.feature-media img { width: 100%; height: 100%; object-fit: cover; object-position: left top; display: block; transition: transform 0.9s var(--ease); }
.feature-card:hover .feature-media img { transform: scale(1.03); }
.feature-badge { position: absolute; left: 18px; top: 18px; background: var(--gradient-gold); color: var(--ink); font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow-gold); }
.feature-copy { display: flex; flex-direction: column; justify-content: center; padding: 44px 44px; gap: 14px; }
.feature-copy .guide-tag { color: var(--amber); }
.feature-title { font-family: var(--font-display); font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; color: #fff; }
.feature-text { color: rgba(255,255,255,0.75); font-size: 1.02rem; line-height: 1.65; }
.feature-go { margin-top: 8px; display: inline-flex; align-self: flex-start; background: var(--gradient-gold); color: var(--ink); font-weight: 700; padding: 15px 28px; border-radius: 999px; box-shadow: var(--shadow-gold); }
@media (max-width: 860px) { .feature-card { grid-template-columns: 1fr; } .feature-media { min-height: 220px; } .feature-copy { padding: 30px 26px 34px; } }

.diagram-callout { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 0; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; margin: 8px 0 36px; box-shadow: var(--shadow-sm); }
.article .diagram-callout h3 { margin: 8px 0 10px; font-size: 1.3rem; }
.diagram-callout img { width: 100%; height: 100%; object-fit: cover; object-position: left top; display: block; }
.diagram-callout > div { padding: 28px 30px; }
.diagram-callout p { margin: 0 0 18px; font-size: 1rem; }
.article .diagram-callout .btn { text-decoration: none; }
.article .diagram-callout .btn-primary { color: var(--ink); }
@media (max-width: 640px) { .diagram-callout { grid-template-columns: 1fr; } }

.diagram-hero { max-width: 1180px; margin: 0 auto; }
.diagram-tip { color: var(--slate); }

/* ---------- Interactive diagram cards (below the guides) + compare controls (2026-11-30) ---------- */
.trio-head { margin: 76px 0 30px; max-width: 640px; }
.trio-head h2 { margin-bottom: 10px; }
.diagram-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.diagram-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  box-shadow: var(--shadow-sm); text-decoration: none; color: inherit;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.diagram-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: rgba(245,185,60,0.6); }
.diagram-card .dc-media { position: relative; display: block; aspect-ratio: 10 / 7; background: #faf9f5; overflow: hidden; }
.diagram-card .dc-media img { width: 100%; height: 100%; object-fit: cover; object-position: left top; display: block; transition: transform 0.9s var(--ease); }
.diagram-card:hover .dc-media img { transform: scale(1.04); }
.diagram-card .dc-body { display: flex; flex-direction: column; gap: 8px; padding: 24px 26px 26px; flex: 1; }
.diagram-card .guide-tag { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber-dark); }
.dc-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; color: var(--ink); }
.dc-text { font-size: 0.95rem; line-height: 1.6; color: var(--slate); }
.dc-go { margin-top: auto; padding-top: 12px; color: var(--amber-dark); font-weight: 700; font-size: 0.95rem; }
@media (max-width: 960px) { .diagram-trio { grid-template-columns: 1fr; } .trio-head { margin-top: 56px; } }

.cmp-bar { position: sticky; top: 92px; z-index: 40; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; margin: 0 auto 22px; max-width: 1180px; background: rgba(251,250,247,0.93); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); }
.cmp-label { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--slate-light); margin-right: 6px; }
.cmp-bar button { font: inherit; font-size: 0.92rem; font-weight: 600; padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: border-color 0.2s var(--ease), background 0.2s var(--ease); }
.cmp-bar button:hover { border-color: var(--amber); }
.cmp-bar button.on { background: var(--ink); border-color: var(--ink); color: var(--amber-light); }
.cmp-note { max-width: 1180px; margin: -8px auto 18px; padding: 12px 18px; border-radius: 12px; background: #fff7e6; border: 1px solid rgba(217,138,30,0.4); font-size: 0.96rem; color: var(--ink); }
.cmp-title { max-width: 1180px; margin: 34px auto 14px; font-size: clamp(1.3rem, 2.2vw, 1.7rem); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cmp-chip { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; background: var(--ink); color: var(--amber); padding: 7px 14px; border-radius: 999px; }
@media (max-width: 760px) { .cmp-bar { top: 78px; padding: 10px 12px; } .cmp-bar button { padding: 8px 14px; } }

/* ---------- Wide guide layout + embedded diagram (2026-11-30) ---------- */
.article-wrap.article-wide { max-width: 1120px; }
.article-wide .article > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.article-wide .article > .diagram-frame { max-width: 1120px; }
.diagram-frame { margin-top: 12px; margin-bottom: 36px; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: #faf9f5; box-shadow: var(--shadow-md); }
.diagram-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.diagram-scroll iframe { display: block; width: 100%; min-width: 900px; border: 0; height: 800px; background: #faf9f5; }
.diagram-frame .diagram-open { margin: 0; padding: 12px 18px; font-size: 0.92rem; border-top: 1px solid var(--line); background: #fff; text-align: right; }
.diagram-frame .diagram-open a { text-decoration: none; }

@media (max-width: 560px) {
  .article-cta { padding: 34px 26px; }
  .keypoints { padding: 22px 22px; }
}

@media print {
  .no-print { display: none !important; }
  .site-header, .site-footer, .chat-fab, .article-cta, .share-section, .related-block, .page-hero .lede, .cta-banner { display: none !important; }
  body { background: #fff !important; }
  .page-hero { background: #fff !important; padding: 0 0 12px !important; }
  .page-hero h1 { color: #000 !important; font-size: 26px !important; }
  .page-hero .eyebrow { color: #666 !important; }
  .article, .article p, .article li { color: #000 !important; font-size: 12pt; }
  .keypoints, .note-box, .example-box { break-inside: avoid; box-shadow: none; }
  section { padding: 0 !important; }
}
