#history-root { min-width: 0; padding: 36px 0 60px; color: #dfe5d5; }
.ah-heading { max-width: 850px; margin-bottom: 25px; }
.ah-eyebrow { margin: 0 0 12px; color: #b9a875; font-size: 11px; letter-spacing: .16em; }
.ah-heading h1 { margin: 0 0 15px; font-size: clamp(28px, 4vw, 42px); line-height: 1.2; font-weight: 550; }
.ah-heading > p:not(.ah-eyebrow) { margin: 10px 0; color: #a9b69d; font-size: 14px; line-height: 1.9; }
.ah-heading > p.ah-small { color: #84947e; font-size: 12px; }
.ah-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 15px; margin: 24px 0; }
.ah-toolbar > span { color: #a9b69d; font-size: 13px; }
.ah-toolbar > div, .ah-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ah-button { display: inline-flex; justify-content: center; align-items: center; gap: 6px; min-height: 38px; padding: 9px 13px; border: 1px solid #655d40; border-radius: 5px; background: #292b20; color: #ded4ad; font: inherit; font-size: 12px; font-weight: 500; line-height: 1.4; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
.ah-button:hover { background: #353829; border-color: #b9a875; }
.ah-button:focus-visible, .ah-check input:focus-visible, .ah-rename input:focus-visible, .ah-table-scroll:focus-visible { outline: 2px solid #d9c690; outline-offset: 3px; }
.ah-button:disabled { opacity: .42; cursor: default; }
.ah-button.ah-quiet { background: transparent; border-color: #3b4536; color: #bdc7b1; }
.ah-button.ah-danger { background: transparent; border-color: #604b43; color: #dbb2a2; }
.ah-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.ah-card { min-width: 0; padding: 20px; border: 1px solid #35402f; border-radius: 8px; background: #151d14; }
.ah-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.ah-pill { display: inline-block; max-width: 72%; padding: 4px 7px; border: 1px solid #4f5136; border-radius: 3px; color: #bdb58b; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.ah-check { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; color: #a6b298; font-size: 12px; cursor: pointer; }
.ah-check input { width: 16px; height: 16px; margin: 0; accent-color: #c4b275; }
.ah-card h2 { margin: 0 0 8px; color: #e0e5d4; font-size: 18px; line-height: 1.5; overflow-wrap: anywhere; }
.ah-time { margin: 0 0 12px; color: #84947d; font-size: 11px; }
.ah-strategy { min-height: 37px; margin: 0 0 16px; color: #a6b398; font-size: 11px; line-height: 1.75; overflow-wrap: anywhere; }
.ah-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 10px; }
.ah-metrics > div { min-width: 0; }
.ah-metrics dt { margin: 0 0 7px; color: #8e9e83; font-size: 10px; }
.ah-metrics dd { margin: 0; color: #dfdcc8; font-size: 18px; line-height: 1.4; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ah-metrics dd.ah-positive { color: #b8cf9e; }
.ah-metrics dd.ah-negative { color: #dfaa9f; }
.ah-spark { display: block; width: 100%; height: 62px; margin: 13px 0 16px; color: #b9c38b; }
.ah-detail { margin: 0 0 12px; color: #99a88b; font-size: 11px; line-height: 1.9; overflow-wrap: anywhere; }
.ah-details { margin: 12px 0 18px; font-size: 11px; }
.ah-details summary { color: #b9b28e; cursor: pointer; line-height: 1.6; }
.ah-details p { margin: 9px 0; color: #8f9f81; line-height: 1.85; overflow-wrap: anywhere; }
.ah-details code { white-space: normal; overflow-wrap: anywhere; font-size: 10px; }
.ah-card-actions { margin-top: 15px; padding-top: 15px; border-top: 1px solid #2e3928; }
.ah-card-actions .ah-button { flex: 1 1 auto; min-height: 36px; padding: 7px 10px; font-size: 11px; }
.ah-callout { padding: 16px 18px; border: 1px solid #41482f; border-radius: 5px; background: #1d2619; color: #b1bea0; font-size: 12px; line-height: 1.9; }
.ah-callout strong { color: #d7dcc5; }
.ah-callout p { margin: 7px 0 0; }
.ah-callout .ah-button { margin-top: 12px; }
.ah-callout.ah-warning { border-color: #816543; background: #2b2519; color: #d3bc96; }
.ah-callout.ah-warning strong { color: #efdbac; }
.ah-undo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 15px 0; padding: 14px 17px; border: 1px solid #54623f; border-radius: 5px; background: #202c1c; color: #bac9a6; font-size: 12px; line-height: 1.7; }
.ah-inline-notice { color: #b8c5a3; font-size: 12px; line-height: 1.8; }
.ah-empty { padding: 60px 22px; border: 1px solid #35402f; border-radius: 8px; background: #141c13; text-align: center; }
.ah-empty > span { display: block; margin-bottom: 18px; color: #b5ac7e; font-size: 46px; }
.ah-empty h2 { margin: 0 0 12px; color: #d7dfca; font-size: 23px; }
.ah-empty p { max-width: 550px; margin: 0 auto 25px; color: #96a588; font-size: 13px; line-height: 1.9; }
.ah-rename { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 10px; }
.ah-rename input { flex: 1 1 100%; width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid #646447; border-radius: 4px; background: #10170f; color: #e2e6d8; font: inherit; font-size: 14px; }
.ah-rename .ah-button { min-height: 32px; padding: 6px 11px; }
.ah-comparison { margin: 30px 0; }
.ah-comparison > h2 { margin: 0 0 15px; font-size: 23px; font-weight: 500; scroll-margin-top: 25px; }
.ah-comparison .ah-callout { margin-bottom: 16px; }
.ah-table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid #3f4934; border-radius: 5px; -webkit-overflow-scrolling: touch; }
.ah-table { width: 100%; min-width: 650px; border-collapse: collapse; table-layout: fixed; font-size: 12px; line-height: 1.75; }
.ah-table th, .ah-table td { padding: 13px 15px; border-right: 1px solid #34402d; border-bottom: 1px solid #34402d; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.ah-table tr > :last-child { border-right: 0; }
.ah-table tbody tr:last-child > * { border-bottom: 0; }
.ah-table thead th { background: #293022; color: #dedcc2; font-weight: 500; }
.ah-table thead th:first-child { width: 175px; }
.ah-table tbody th { background: #192116; color: #b7c5a5; font-weight: 400; }
.ah-table tbody td { background: #141d12; color: #c8d1bb; font-variant-numeric: tabular-nums; }
.ah-toast { position: fixed; z-index: 145; top: 110px; right: 20px; max-width: min(420px, calc(100vw - 36px)); padding: 15px 18px; border: 1px solid #887044; border-radius: 6px; background: #2c281b; color: #e5d5af; box-shadow: 0 8px 35px #0007; font-size: 12px; line-height: 1.8; }
.ah-toast[hidden] { display: none; }
.ah-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 1100px) { .ah-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) {
  #history-root { padding-top: 25px; }
  .ah-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .ah-heading > p:not(.ah-eyebrow) { font-size: 12px; }
  .ah-toolbar { align-items: flex-start; }
  .ah-toolbar > div { width: 100%; }
  .ah-toolbar .ah-button { flex: 1 1 auto; min-height: 40px; }
  .ah-card { padding: 18px; }
  .ah-card h2 { font-size: 17px; }
  .ah-metrics dd { font-size: 19px; }
  .ah-table { min-width: 620px; }
  .ah-table thead th:first-child { width: 145px; }
  .ah-toast { top: 92px; right: 12px; max-width: calc(100vw - 24px); }
}
@media (prefers-reduced-motion: reduce) { .ah-button { transition: none; } }
@media print { .ah-toolbar, .ah-card-actions, .ah-check, .ah-undo, .ah-toast { display: none !important; } .ah-grid { display: block; } .ah-card { break-inside: avoid; margin: 0 0 15px; } }
