/* pf-case-study-heritage.css — S681 D-S681-CASEHERITAGE. Sample case study for heritage houses.
   Every color is a theme token (AAA rule). Loaded after pf-landing.css. */
.cs-page { max-width: 880px; }
.cs-hero { text-align: left; }
.cs-hero .pf-lead { margin-left: 0; max-width: 680px; }
.cs-hero .pf-cta-row { justify-content: flex-start; }

.cs-notice { border: 1px solid var(--color-border-strong); border-left: 4px solid var(--color-accent-c); border-radius: 10px; background: var(--color-surface); padding: 16px 20px; margin: 0 0 32px; font-size: .9rem; color: var(--color-text-mid); line-height: 1.6; }
.cs-notice strong { color: var(--color-text); }

.cs-toc { border: 1px solid var(--color-border); border-radius: 12px; padding: 20px 24px; margin: 0 0 44px; }
.cs-toc ol { margin: 0; padding-left: 22px; columns: 2; column-gap: 32px; }
.cs-toc li { font-size: .9rem; line-height: 1.5; margin-bottom: 6px; break-inside: avoid; color: var(--color-text-dim); }
.cs-toc a { color: var(--color-accent-c); text-decoration: none; }
.cs-toc a:hover, .cs-toc a:focus-visible { text-decoration: underline; }

.cs-sec { margin: 0 0 48px; scroll-margin-top: 80px; }
.cs-num { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--color-text-dim); margin-bottom: 6px; }
.cs-h2 { font-family: var(--font-display); font-weight: 900; font-size: clamp(1.3rem, 3vw, 1.7rem); line-height: 1.2; color: var(--color-text); margin: 0 0 14px; }
.cs-h3 { font-weight: 700; font-size: 1rem; color: var(--color-text); margin: 24px 0 10px; }
.cs-p { font-size: .95rem; color: var(--color-text-mid); line-height: 1.65; margin: 0 0 14px; }
.cs-p strong { color: var(--color-text); }
.cs-list { margin: 0 0 14px; padding-left: 20px; }
.cs-list li { font-size: .92rem; color: var(--color-text-mid); line-height: 1.6; margin-bottom: 6px; }
.cs-list li strong { color: var(--color-text); }
.cs-link { color: var(--color-accent-c); text-decoration: underline; text-underline-offset: 3px; }

.cs-table { width: 100%; border-collapse: collapse; margin: 6px 0 18px; font-size: .88rem; }
.cs-table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-dim); border-bottom: 2px solid var(--color-border-strong); padding: 8px 10px; }
.cs-table td { vertical-align: top; color: var(--color-text-mid); line-height: 1.55; border-bottom: 1px solid var(--color-border); padding: 10px; }
.cs-table td:first-child { color: var(--color-text); font-weight: 700; width: 28%; }
.cs-table tr { break-inside: avoid; }

.cs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 8px 0 18px; }
.cs-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 18px; break-inside: avoid; }
.cs-card-title { font-weight: 700; font-size: .95rem; color: var(--color-text); margin-bottom: 6px; }
.cs-card-body { font-size: .86rem; color: var(--color-text-mid); line-height: 1.55; margin: 0; }
.cs-card-eg { font-size: .82rem; color: var(--color-text-dim); line-height: 1.5; margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--color-border); }

.cs-moment { border-left: 3px solid var(--color-accent-g); padding: 4px 0 4px 16px; margin: 0 0 18px; break-inside: avoid; }
.cs-moment-when { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--color-text-dim); margin-bottom: 4px; }

.cs-callout { border: 1px solid var(--color-border); border-radius: 10px; padding: 16px 20px; background: var(--color-surface); font-size: .92rem; color: var(--color-text-mid); line-height: 1.6; margin: 8px 0 18px; }
.cs-callout strong { color: var(--color-text); }

.cs-print-foot { display: none; }

@media (max-width: 640px) {
  .cs-toc ol { columns: 1; }
  .cs-table thead { display: none; }
  .cs-table, .cs-table tbody, .cs-table tr, .cs-table td { display: block; width: 100%; }
  .cs-table tr { border-bottom: 1px solid var(--color-border); padding: 8px 0; }
  .cs-table td { border-bottom: none; padding: 4px 0; }
  .cs-table td:first-child { width: 100%; }
  .cs-table td[data-label]:not(:first-child)::before { content: attr(data-label) ": "; font-weight: 700; color: var(--color-text-dim); }
}

@media print {
  @page { margin: 16mm 14mm; }
  #eco-header, #eco-theme-selector, .eco-header, .cs-noprint, .pf-cta-row { display: none !important; }
  html, body { background: var(--color-white) !important; }
  body, .cs-page { color: var(--color-black) !important; }
  .cs-page { max-width: none; padding: 0; }
  .pf-hero { padding: 0 0 16px; margin-bottom: 16px; }
  .pf-h1, .cs-h2, .cs-h3, .cs-card-title, .cs-table td:first-child, .cs-notice strong, .cs-callout strong { color: var(--color-black) !important; }
  .pf-lead, .cs-p, .cs-list li, .cs-table td, .cs-card-body, .cs-card-eg, .cs-notice, .cs-callout, .cs-toc li, .cs-num, .cs-table th, .pf-tag { color: var(--color-black) !important; }
  .cs-card, .cs-notice, .cs-callout, .pf-tag { background: var(--color-white) !important; }
  .cs-link, .cs-toc a { color: var(--color-black) !important; }
  .cs-sec { margin-bottom: 24px; }
  .cs-h2 { break-after: avoid; }
  .cs-grid { grid-template-columns: 1fr 1fr; }
  .cs-print-foot { display: block; font-size: .75rem; margin-top: 24px; color: var(--color-black); }
}

/* S681 D-S681-CASEHERITAGE-LIVE: figures from the House of Kesarmer demonstration network */
.hh-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 8px 0 24px; }
.hh-kpi { border: 1px solid var(--color-border); border-radius: 10px; padding: 14px 16px; background: var(--color-surface); }
.hh-kpi-n { display: block; font-family: var(--font-display); font-weight: 900; font-size: 1.7rem; color: var(--color-accent-c); line-height: 1.1; }
.hh-kpi-t { display: block; font-size: .82rem; color: var(--color-text-mid); line-height: 1.4; margin-top: 4px; }
.hh-hbars { margin: 6px 0 22px; }
.hh-hrow { display: grid; grid-template-columns: minmax(110px, 190px) 1fr 32px; align-items: center; gap: 10px; margin-bottom: 7px; font-size: .86rem; color: var(--color-text-mid); }
.hh-htrack { height: 12px; border-radius: 6px; background: var(--color-border); overflow: hidden; }
.hh-hbar { display: block; height: 100%; background: var(--color-accent-c); border-radius: 6px; }
.hh-hval { text-align: right; color: var(--color-text); font-weight: 700; }
.hh-chart { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 18px; margin: 6px 0 26px; border-bottom: 1px solid var(--color-border-strong); }
.hh-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.hh-bar { width: 100%; max-width: 38px; background: var(--color-accent-c); border-radius: 4px 4px 0 0; }
.hh-val { font-size: .72rem; color: var(--color-text-mid); margin-bottom: 3px; }
.hh-lbl { position: absolute; bottom: -20px; font-size: .72rem; color: var(--color-text-dim); }
.hh-chart + .cs-h3 { margin-top: 34px; }
@media print { .hh-kpi, .hh-hbar, .hh-bar { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.hh-h70 { height: 70%; }
.hh-h80 { height: 80%; }
.hh-h83 { height: 83%; }
.hh-h87 { height: 87%; }
.hh-h97 { height: 97%; }
.hh-h100 { height: 100%; }
.hh-w7 { width: 7%; }
.hh-w9 { width: 9%; }
.hh-w11 { width: 11%; }
.hh-w100 { width: 100%; }
