/* Shared styles for the Ski Resort Study visualizations.
   Pages are designed to sit inside a Weebly iframe, so they size to their container. */
:root {
  --surface-1: #ffffff;
  --surface-2: #f5f7fa;
  --text-primary: #1b1f24;
  --text-secondary: #5f6670;
  --grid: #e3e6ea;
  --axis: #b9bfc7;
  --epic: #e8833a;      /* Epic: orange (brand) */
  --ikon: #2b4f8a;      /* Ikon: navy (brand) */
  --epic-text: #b85e1c; /* darker orange for text on white */
  --muted-dot: #d3d8de;
  --focus: #1b1f24;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-primary);
  background: var(--surface-1);
}

* { box-sizing: border-box; }
body { margin: 0; padding: 16px 18px 20px; background: var(--surface-1); }

h1 { font-size: 1.25rem; margin: 0 0 4px; line-height: 1.3; }
.subtitle { margin: 0 0 14px; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.4; }

/* one row of filters above the chart */
.controls {
  display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: flex-end;
  margin-bottom: 12px;
}
.control { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; color: var(--text-secondary); }
.control label, .control .label { font-weight: 600; color: var(--text-primary); font-size: 0.8rem; }
select, button {
  font: inherit; font-size: 0.85rem; padding: 6px 10px; border: 1px solid var(--axis);
  border-radius: 6px; background: var(--surface-1); color: var(--text-primary); cursor: pointer;
}
button:hover, select:hover { border-color: var(--text-secondary); }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.segmented { display: inline-flex; border: 1px solid var(--axis); border-radius: 6px; overflow: hidden; }
.segmented button { border: 0; border-radius: 0; border-right: 1px solid var(--axis); }
.segmented button:last-child { border-right: 0; }
.segmented button[aria-pressed="true"] { background: var(--text-primary); color: #fff; }

.legend { display: flex; gap: 16px; font-size: 0.82rem; color: var(--text-primary); align-items: center; }
.legend .key { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.swatch.epic { background: var(--epic); }
.swatch.ikon { background: var(--ikon); }

.tooltip {
  position: fixed; pointer-events: none; z-index: 10;
  background: var(--surface-1); color: var(--text-primary);
  border: 1px solid var(--grid); border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  padding: 8px 10px; font-size: 0.8rem; line-height: 1.45; max-width: 260px;
  opacity: 0; transition: opacity 0.08s;
}
.tooltip.show { opacity: 1; }
.tooltip .tt-title { font-weight: 700; margin-bottom: 2px; }
.tooltip .tt-muted { color: var(--text-secondary); }

.note { font-size: 0.75rem; color: var(--text-secondary); margin-top: 8px; line-height: 1.4; }

details.table-view { margin-top: 10px; font-size: 0.8rem; }
details.table-view summary { cursor: pointer; color: var(--text-secondary); }
details.table-view table { border-collapse: collapse; margin-top: 6px; width: 100%; }
details.table-view th, details.table-view td { text-align: right; padding: 4px 8px; border-bottom: 1px solid var(--grid); }
details.table-view th:first-child, details.table-view td:first-child { text-align: left; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
