.history-public-body{display:grid;grid-template-rows:auto 1fr auto;min-height:100vh}
.public-history-main{display:grid;gap:12px;padding:10px 0 24px}
.public-history-crumb{display:flex;gap:8px;align-items:center;color:var(--muted);font-size:.84rem}
.public-history-crumb a{color:var(--blue-dark)}
.public-history-intro h2{margin:0;color:var(--blue-dark);font-size:clamp(1.6rem,4vw,2.4rem)}
.public-history-intro p{margin:5px 0 0;color:var(--muted)}
.history-card{padding:16px;border:1px solid var(--line);border-radius:15px;background:var(--surface);box-shadow:var(--shadow)}
.history-tabs,.history-navigation,.history-metrics{display:flex;gap:8px;flex-wrap:wrap}
.history-tabs a,.history-metrics a{padding:9px 16px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--blue-dark);font-weight:500;text-decoration:none}
.history-tabs a[aria-current="page"],.history-metrics a[aria-current="page"]{background:var(--blue);border-color:var(--blue);color:#fff}
.history-tabs a:focus-visible,.history-metrics a:focus-visible,.history-navigation a:focus-visible{outline:3px solid rgba(243,108,45,.55);outline-offset:2px}
.history-navigation .is-disabled{opacity:.45;cursor:not-allowed}
.history-filter{display:flex;align-items:end;gap:12px;flex-wrap:wrap}
.history-filter label{display:grid;gap:5px;min-width:180px;color:var(--blue-dark);font-weight:500}
.history-filter input,.history-filter select{width:100%;min-height:42px;padding:8px 10px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink);font:inherit}
.history-message{padding:12px 14px;border-radius:10px;font-weight:500}
.history-message.warning{border:1px solid rgba(243,108,45,.4);background:#fff7f2;color:#783719}
.history-message.error{border:1px solid rgba(174,37,37,.4);background:#fff0f0;color:#801f1f}
.history-chart-heading{display:flex;justify-content:space-between;gap:16px;align-items:start}
.history-chart-heading h2{margin:0;color:var(--blue-dark)}
.history-chart-heading p{margin:4px 0;color:var(--muted)}
.history-chart{width:100%;min-height:330px;margin-top:12px;overflow:visible}
.history-chart svg{display:block;width:100%;height:auto;overflow:visible}
.history-grid{stroke:#ccdce6;stroke-width:1}
.history-axis-label{fill:#4d6574;font-size:12px}
.history-line-min{fill:none;stroke:#087bbd;stroke-width:3}
.history-line-max{fill:none;stroke:#d85f22;stroke-width:3;stroke-dasharray:8 5}
.history-line-temp{fill:none;stroke:#064b78;stroke-width:3}
.history-point{stroke:#fff;stroke-width:2}
.history-point-min{fill:#087bbd}.history-point-max{fill:#d85f22}.history-point-temp{fill:#064b78}
.history-point:focus{outline:none;stroke:#111827;stroke-width:4}
.history-legend{display:flex;gap:18px;flex-wrap:wrap;margin-top:8px;font-weight:500}
.history-legend span::before{content:"";display:inline-block;width:24px;margin-right:7px;border-top:3px solid #087bbd;vertical-align:middle}
.history-legend .max::before{border-color:#d85f22;border-top-style:dashed}
.history-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.history-summary .history-card{display:grid;gap:5px}
.history-summary span,.history-summary small{color:var(--muted)}
.history-summary strong{color:var(--blue-dark);font-size:1.2rem}
.history-table-card summary{cursor:pointer;color:var(--blue-dark);font-weight:600}
.history-table-wrap{overflow-x:auto;margin-top:12px}
.history-table-wrap table{width:100%;border-collapse:collapse}
.history-table-wrap th,.history-table-wrap td{padding:9px 10px;border-bottom:1px solid var(--line);text-align:left;white-space:nowrap}
.history-table-wrap th{font-weight:600}
.history-table-wrap td{font-weight:400}
.history-empty{text-align:center;padding:36px}.history-last-reading{color:var(--muted);font-size:.9rem}
@media(max-width:760px){
  .history-public-body .header-layout{grid-template-columns:auto 1fr}.history-public-body .header-layout>.button{grid-column:1/-1}
  .history-filter{display:grid;grid-template-columns:1fr}.history-filter label,.history-filter .button{width:100%}
  .history-chart-heading{display:grid}.history-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .history-axis-label{font-size:13px}
}
@media(max-width:430px){.history-summary{grid-template-columns:1fr}.history-navigation .button{width:100%}}
@media(prefers-reduced-motion:reduce){.history-chart *{animation:none!important;transition:none!important}}
