/* Shared styles for the Kelvin wave Discover article's interactive figures (one page per figure, shown in an iframe). */
@font-face{font-family:SG;src:url("../../fonts/SpaceGrotesk-Regular.woff2") format("woff2");font-weight:400}
@font-face{font-family:SG;src:url("../../fonts/SpaceGrotesk-Medium.woff2") format("woff2");font-weight:500}
@font-face{font-family:SG;src:url("../../fonts/SpaceGrotesk-SemiBold.woff2") format("woff2");font-weight:600}
@font-face{font-family:SG;src:url("../../fonts/SpaceGrotesk-Bold.woff2") format("woff2");font-weight:700}
:root{--bg:#0b1020;--panel:rgba(11,16,32,.92);--panel2:#141b33;--fg:#f4f5fa;--muted:#c9cce0;--dim:#8a90aa;--grid:#2a3150;
  --accent:#ffb547;--red:#ff5a52;--blue:#4f8fe0;--violet:#c58cff;--teal:#7fd1c7;--grey:#59607a}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--bg);color:var(--fg);font-family:SG,system-ui,sans-serif}
body{display:flex;flex-direction:column;overflow:hidden}
header.kw{padding:12px 14px 6px}
header.kw h1{font-size:19px;line-height:1.2;margin:0;font-weight:700}
header.kw p{margin:4px 0 0;font-size:13px;color:var(--muted);line-height:1.35}
.controls{display:flex;flex-wrap:wrap;gap:6px;align-items:center;padding:4px 14px 6px;font-size:13px}
.controls .lab{color:var(--muted);margin-right:2px}
button.kb{font:inherit;font-size:13px;background:#232a44;color:var(--fg);border:0;border-radius:6px;padding:6px 10px;cursor:pointer}
button.kb[aria-pressed="true"]{background:var(--accent);color:#0b1020;font-weight:600}
button.kb:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.sw{display:inline-block;width:14px;height:4px;border-radius:2px;margin-right:6px;vertical-align:middle}
button.kb.leg[aria-pressed="true"]{background:#232a44;color:var(--fg);font-weight:500;box-shadow:inset 0 0 0 1px #3a4370}
button.kb.leg[aria-pressed="false"]{opacity:.55;text-decoration:line-through}
input[type=range]{accent-color:var(--accent);flex:1;min-width:120px}
main.kw{position:relative;flex:1;min-height:0}
.chart{position:absolute;inset:0}
.chart svg{display:block;width:100%;height:100%;overflow:visible}
.chart text{font-family:SG,system-ui,sans-serif;fill:var(--muted);font-size:12px}
.chart .gl{stroke:var(--grid);stroke-width:1}
.chart .zero{stroke:var(--dim);stroke-width:1}
.tip{position:absolute;pointer-events:none;background:var(--panel2);border:1px solid #2f375a;border-radius:8px;padding:8px 10px;
  font-size:12.5px;line-height:1.45;color:var(--fg);min-width:190px;max-width:290px;box-shadow:0 4px 18px rgba(0,0,0,.4);z-index:5}
.tip b{font-weight:600}
.tip .row{display:flex;justify-content:space-between;gap:10px}
.tip .k{display:flex;align-items:center;gap:6px}
.tip .note{color:var(--muted);font-size:11.5px;margin-top:2px}
.readout{font-size:14px;line-height:1.4}
.readout .big{font-size:24px;font-weight:700;color:var(--accent)}
footer.kw{padding:4px 14px 8px;font-size:11px;color:var(--dim);line-height:1.35}
footer.kw a{color:inherit}
.panel{position:absolute;background:var(--panel);border-radius:10px;padding:10px 12px}
.legend{font-size:12px;line-height:1.5}
.legend .bar{height:10px;border-radius:3px;width:180px;margin:4px 0 2px}
.legend .ticks{display:flex;justify-content:space-between;width:180px;color:var(--muted)}
.maplibregl-ctrl-attrib{font-size:10px}
.static .controls,.static .maplibregl-ctrl-bottom-right{display:none}
[hidden]{display:none!important}
@media (max-width:560px){#eq{top:6px!important;right:6px!important;max-width:150px!important;padding:6px 8px;font-size:11.5px}#eq .big{font-size:18px}
  .panel.legend,.panel.dotkey{bottom:34px!important}
  header.kw h1{font-size:16px}header.kw p{font-size:12px}button.kb{padding:5px 8px;font-size:12px}
  .legend .bar,.legend .ticks{width:130px}.readout .big{font-size:20px}}
