/* Create By Asking: hurricane simulator (projects/hurricane-simulator.html).
   Loaded after style.css, tools.css and advanced.css; reuses .adv-shell, .adv-label, .adv-group, .adv-range and .chip-dark. */

.hs { gap: 12px; }
.hs-basins { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hs-pill { border: 0; cursor: pointer; border-radius: 999px; padding: 8px 13px; background: rgba(255, 255, 255, 0.08); color: #E5E4E2; font: 600 var(--step--1)/1 var(--body); white-space: nowrap; transition: background 0.15s; }
.hs-pill:hover { background: rgba(255, 255, 255, 0.16); }
.hs-pill[aria-pressed="true"] { background: #FFC93C; color: #1F1E1C; }
.hs-pill:focus-visible { outline: 2px solid #FFC93C; outline-offset: 2px; }

/* the map: every ocean view is twice as wide as it is tall */
.hs-stage { position: relative; aspect-ratio: 2 / 1; border-radius: 14px; overflow: hidden; background: #0a2238; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 18px 40px -18px rgba(0, 0, 0, 0.7); touch-action: none; user-select: none; -webkit-user-select: none; }
.hs-stage canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; -webkit-tap-highlight-color: transparent; }
#hs-fx { cursor: crosshair; outline: none; }
#hs-fx:focus-visible { box-shadow: inset 0 0 0 3px #FFC93C; }

.hs-hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); font: 700 0.85rem/1.25 var(--body); color: #fff; background: rgba(14, 13, 11, 0.78); padding: 8px 14px; border-radius: 99px; pointer-events: none; text-align: center; transition: opacity 0.6s; }
.hs-hint::before { content: "👆 "; }
.hs-readout { position: absolute; left: 10px; top: 10px; font: 600 0.72rem/1.5 var(--mono); color: rgba(255, 255, 255, 0.9); background: rgba(14, 13, 11, 0.6); padding: 5px 9px; border-radius: 8px; pointer-events: none; white-space: pre; }
.hs-toast { position: absolute; left: 50%; top: 14px; transform: translate(-50%, -8px); width: max-content; max-width: calc(100% - 200px); margin: 0; font: 800 0.9rem/1.3 var(--body); color: #1F1E1C; background: #FFC93C; padding: 8px 14px; border-radius: 12px; pointer-events: none; text-align: center; opacity: 0; transition: opacity 0.3s, transform 0.3s; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); }
.hs-toast.on { opacity: 1; transform: translate(-50%, 0); }
.hs-legend { position: absolute; right: 10px; bottom: 10px; display: grid; gap: 4px; width: 190px; font: 600 0.66rem/1.2 var(--mono); color: #fff; background: rgba(14, 13, 11, 0.7); padding: 7px 9px; border-radius: 8px; pointer-events: none; }
.hs-legend[hidden] { display: none; }
.hs-legend i { display: block; height: 8px; border-radius: 3px; background: linear-gradient(90deg, rgb(32, 80, 155) 0%, rgb(90, 190, 210) 45%, rgb(235, 235, 160) 55%, rgb(250, 170, 60) 73%, rgb(235, 70, 40) 91%, rgb(200, 40, 50) 100%); }
.hs-legend span { display: flex; justify-content: space-between; }
.hs-legend em { font-style: normal; color: #CDCCCA; font-family: var(--body); font-size: 0.68rem; }
.hs-corner { position: absolute; right: 10px; top: 10px; display: flex; gap: 6px; z-index: 3; }
.hs-cbtn { border: 0; cursor: pointer; border-radius: 999px; padding: 7px 12px; background: rgba(14, 13, 11, 0.72); color: #fff; font: 700 0.8rem/1 var(--body); white-space: nowrap; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14); }
.hs-cbtn:hover { background: rgba(14, 13, 11, 0.9); }
.hs-cbtn:focus-visible { outline: 2px solid #FFC93C; outline-offset: 2px; }
.hs-cbtn[aria-expanded="true"] { background: #FFC93C; color: #1F1E1C; }
.hs-optbtn { display: none; }

/* under the map: the storm card and the controls */
.hs-side { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 12px 18px; align-items: start; }
.hs-side > .adv-note { grid-column: 1 / -1; }
.hs-card { background: rgba(255, 255, 255, 0.06); border-radius: 12px; padding: 12px 14px; font-size: var(--step--1); color: #CDCCCA; box-sizing: border-box; }
.hs-empty { margin: 0; }
.hs-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hs-card-top b { font: 800 1.05rem/1.2 var(--body); color: #fff; }
.hs-cat { font: 800 0.78rem/1 var(--body); color: #1F1E1C; padding: 5px 9px; border-radius: 99px; white-space: nowrap; }
.hs-stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 4px 22px; margin: 10px 0 6px; }
.hs-stats small { display: block; font: 600 0.64rem/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: #A9A8A6; }
.hs-stats b { font: 700 0.95rem/1.3 var(--body); color: #fff; font-variant-numeric: tabular-nums; }
.hs-why { margin: 0 0 10px; color: #FFC93C; font-weight: 600; }
.hs-scale { position: relative; display: flex; gap: 2px; height: 18px; margin-bottom: 10px; }
.hs-scale i { display: grid; place-items: center; background: var(--c); color: #1F1E1C; font: 800 0.62rem/1 var(--body); font-style: normal; border-radius: 3px; opacity: 0.85; }
.hs-marker { position: absolute; top: -4px; bottom: -4px; width: 4px; margin-left: -2px; background: #fff; border-radius: 2px; box-shadow: 0 0 0 2px #1F1E1C; transition: left 0.3s; }
.hs-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font: 500 0.76rem/1.4 var(--mono); color: #A9A8A6; }
.hs-ctrls { display: grid; gap: 14px; align-content: start; }
.hs-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.hs .chip-dark { padding: 8px 12px; white-space: nowrap; }
.hs .chip-dark:hover { background: rgba(255, 255, 255, 0.16); }
.hs .chip-dark[aria-pressed="true"]:hover { background: #FFD766; }
.hs .adv-range output { min-width: 4em; }

.hs-steps { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }

/* the link to the weather simulator beside the facts under the title */
.fact-link { display: inline-block; line-height: 1.35; border-radius: 14px; text-decoration: none; color: var(--ink); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.fact-link:hover, .fact-link:focus-visible { background: var(--accent); color: #fff; }
.fact-link span { white-space: nowrap; }

/* full screen: the map fills the screen, the oceans sit down the left, Controls opens the rest */
.hs:fullscreen, .hs.cba-fs { display: block; padding: 0; border-radius: 0; background: #000; width: 100vw; height: 100vh; height: 100dvh; }
.hs:fullscreen .hs-stage, .hs.cba-fs .hs-stage { position: absolute; inset: 0; margin: auto; aspect-ratio: auto; width: min(100vw, 200dvh); height: min(50vw, 100dvh); border-radius: 0; box-shadow: none; }
.hs:fullscreen .hs-optbtn, .hs.cba-fs .hs-optbtn { display: block; }
.hs:fullscreen .hs-basins, .hs.cba-fs .hs-basins { position: absolute; z-index: 4; left: max(8px, env(safe-area-inset-left)); top: 8px; flex-direction: column; align-items: flex-start; gap: 4px; }
.hs:fullscreen .hs-basins .adv-label, .hs.cba-fs .hs-basins .adv-label { display: none; }
.hs:fullscreen .hs-pill, .hs.cba-fs .hs-pill { padding: 6px 10px; font-size: 0.76rem; background: rgba(14, 13, 11, 0.72); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12); }
.hs:fullscreen .hs-pill[aria-pressed="true"], .hs.cba-fs .hs-pill[aria-pressed="true"] { background: #FFC93C; }
.hs:fullscreen .hs-corner, .hs.cba-fs .hs-corner { position: fixed; right: max(8px, env(safe-area-inset-right)); top: 8px; }
.hs:fullscreen .hs-readout, .hs.cba-fs .hs-readout { left: 8px; right: auto; top: auto; bottom: 8px; }
.hs:fullscreen .hs-side, .hs.cba-fs .hs-side { display: none; }
.hs.hs-open:fullscreen .hs-side, .hs.hs-open.cba-fs .hs-side { display: grid; grid-template-columns: 1fr; position: absolute; z-index: 5; right: max(8px, env(safe-area-inset-right)); top: 48px; bottom: 8px; width: min(340px, calc(100vw - 150px)); overflow-y: auto; overscroll-behavior: contain; padding: 12px; border-radius: 14px; background: #181715; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 12px 30px rgba(0, 0, 0, 0.5); }
.hs.hs-open .hs-side .adv-note { display: none; }
.hs.hs-open .hs-side { align-content: start; grid-auto-rows: max-content; gap: 12px; }

@media (max-width: 720px) {
  .hs-side { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hs-stage { border-radius: 10px; }
  .hs-basins .adv-label { display: none; }
  .hs-pill { padding: 7px 10px; }
  .hs-hint { font-size: 0.7rem; padding: 5px 10px; bottom: 6px; }
  .hs-readout { font-size: 0.6rem; left: 6px; top: 6px; padding: 3px 6px; }
  .hs-toast { font-size: 0.72rem; padding: 5px 10px; top: 34px; max-width: calc(100% - 20px); }
  .hs-legend { width: 120px; font-size: 0.54rem; right: 6px; bottom: auto; top: 36px; padding: 4px 6px; }
  .hs-legend em { display: none; }
  .hs-corner { right: 6px; top: 6px; }
  .hs-cbtn { padding: 6px 10px; font-size: 0.72rem; }
  .hs-stats { gap: 4px 14px; }
}

/* type over the name to rename your storm */
.hs-namebox { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; cursor: text; }
.hs-namebox input { font: 800 1.05rem/1.2 var(--body); color: #fff; background: transparent; border: 0; border-bottom: 2px dashed rgba(255, 201, 60, 0.7); padding: 0 2px; width: 7em; min-width: 0; }
.hs-namebox input:focus { outline: none; border-bottom-style: solid; background: rgba(255, 255, 255, 0.06); }
.hs-report { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.hs-report p { margin: 4px 0 0; color: #E5E4E2; line-height: 1.45; }
