  * { box-sizing: border-box; margin: 0; padding: 0; }
  .skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: #1f6feb;
    color: #fff;
    padding: 4px 12px;
    z-index: 100;
    font-size: 12px;
  }
  .skip-link:focus { left: 8px; top: 8px; }
  body {
    background: #0d1117;
    color: #c9d1d9;
    font-family: 'Segoe UI', system-ui, sans-serif;
    overflow: hidden;
    height: 100vh;
  }
  .site-bar {
    background: #161819;
    border-bottom: 1px solid #303438;
    padding: 6px 16px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace;
    flex-shrink: 0;
  }
  .site-bar a {
    color: #8E96A2;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 2px;
  }
  .site-bar a:hover { color: #A8BDD0; background: rgba(168,189,208,0.08); }
  .site-bar .site-name { color: #A8BDD0; font-weight: 700; margin-right: auto; }
  .site-bar nav { display: contents; }
  .header {
    text-align: center;
    padding: 10px 20px 6px;
    background: #0d1117;
    z-index: 20;
    border-bottom: 1px solid #21262d;
  }
  h1 { color: #c4b07b; font-size: 20px; margin-bottom: 4px; }
  .subtitle { color: #8b949e; font-size: 13px; }
  .controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
    flex-wrap: wrap;
    align-items: center;
  }
  .controls label { font-size: 12px; color: #9ca5b0; }
  .controls button {
    background: #21262d;
    color: #c9d1d9;
    border: 1px solid #30363d;
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 11px;
    cursor: pointer;
  }
  .controls button:hover { background: #30363d; }
  .controls button.active { background: #1f6feb; border-color: #1f6feb; }
  .chart-area {
    position: relative;
    flex: 1;
    overflow: hidden;
  }
  canvas {
    display: block;
    cursor: crosshair;
  }
  .scroll-track {
    height: 16px;
    background: #161b22;
    position: relative;
    border-top: 1px solid #21262d;
  }
  .scroll-thumb {
    height: 100%;
    background: #30363d;
    border-radius: 3px;
    position: absolute;
    top: 0;
    cursor: grab;
    min-width: 30px;
  }
  .scroll-thumb:hover, .scroll-thumb.dragging { background: #484f58; }
  .year-readout {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 4px;
    padding: 2px 10px;
    font-size: 12px;
    color: #c4b07b;
    z-index: 10;
    pointer-events: none;
  }
  .tooltip {
    position: fixed;
    background: #161b22;
    border: 1px solid #c4b07b;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 12px;
    pointer-events: none;
    display: none;
    color: #c9d1d9;
    z-index: 30;
    max-width: 300px;
    line-height: 1.5;
  }
  .legend-panel {
    position: fixed;
    right: 12px;
    top: 90px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 11px;
    z-index: 25;
    max-height: 75vh;
    overflow-y: auto;
    width: 200px;
  }
  .legend-panel h4 { color: #c4b07b; margin-bottom: 6px; font-size: 12px; }
  .legend-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 3px 0;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
  }
  .legend-row:hover { background: #21262d; }
  .legend-row.dimmed { opacity: 0.3; }
  .legend-swatch { width: 14px; height: 3px; border-radius: 1px; flex-shrink: 0; }
  .legend-label { color: #9ca5b0; }
  .legend-cat {
    color: #8b949e;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
    margin-bottom: 2px;
    border-top: 1px solid #21262d;
    padding-top: 6px;
  }
  .main-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
  }
  .sep { color: #8b949e; font-size: 12px; }
  .tooltip-desc { color: #8b949e; }
  .help-link { color: #58a6ff; text-decoration: none; }
  .help-link:hover { text-decoration: underline; }
  .tooltip-nearby { color: #c4b07b; }
