.kairos-page { color: #111; background: #f7f8f9; padding: 140px 24px 72px; }
.kairos-page .kairos-wrap { max-width: 1180px; margin: auto; }
.kairos-page h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.08; font-weight: 750; letter-spacing: -.03em; margin: 16px 0 22px; }
.kairos-page h2 { font-size: 26px; font-weight: 700; margin: 0 0 16px; }
.kairos-page h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.kairos-page p, .kairos-page li { line-height: 1.65; }
.kairos-page p + p { margin-top: 12px; }
.kairos-page a {  text-underline-offset: 3px; }
.kairos-page .kairos-intro { max-width: 790px; font-size: 19px; }
.kairos-page .kairos-tag { display: inline-block; border: 1px solid #c7ccd2; border-radius: 30px; padding: 6px 13px; font-size: 13px; }
.kairos-page .kairos-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 32px; }
.kairos-page .kairos-button { display: inline-block; padding: 12px 18px; border: 1px solid #111; border-radius: 8px; text-decoration: none; background: white; }
.kairos-page .kairos-button-primary { background: #176b98; color: white; border-color: #176b98; }
.kairos-page .kairos-card { background: white; border: 1px solid #dde1e5; border-radius: 14px; padding: 26px; margin-top: 24px; }
.kairos-page .kairos-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.kairos-page .kairos-grid > div { border-left: 3px solid #176b98; padding-left: 16px; }
.kairos-page .kairos-map { height: 480px; background: #e8eef1; border-radius: 10px; margin-top: 20px; z-index: 0; }
.kairos-page label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.kairos-page select { max-width: 100%; border: 1px solid #adb5bd; border-radius: 6px; padding: 10px; background: white; color: #111; }
.kairos-page input[type="range"] { width: 180px; accent-color: #176b98; }
.kairos-page .kairos-note { font-size: 14px; margin-top: 12px; margin-bottom: 12px;}
.kairos-page .kairos-simulation-note { max-width: 790px; font-size: 15.5px; background: #fff7e8; border: 1px solid #f0dcb4; border-left: 4px solid #b88a20; border-radius: 8px; padding: 12px 16px; margin: 20px 0 4px; }
.kairos-page figure { margin-top: 20px; }
.kairos-page details summary { cursor: pointer; font-weight: 600; }
.kairos-page .kairos-sources { list-style: disc; padding-left: 20px; }
.kairos-page .kairos-sources li { margin-bottom: 10px; }
.kairos-page :focus-visible { outline: 3px solid #176b98; outline-offset: 4px; }
@media (max-width: 700px) {
  .kairos-page { padding: 115px 16px 40px; }
  .kairos-page .kairos-card { padding: 20px; }
  .kairos-page .kairos-grid { grid-template-columns: 1fr; }
  .kairos-page .kairos-map { height: 360px; }
}
/* WaterWarden marine modelling workspace. */
.kairos-page { background: var(--color-background, #f7f9fb); color: var(--color-on-surface, #191c1e); }
.kairos-page .kairos-wrap { max-width: 1400px; }
.kairos-page .kairos-headline { font-family: var(--font-manrope, sans-serif); font-size: clamp(24px, 3vw, 38px); font-weight: 700; color: var(--color-secondary, #006a6a); margin-bottom: 16px; }
.kairos-page .kairos-tag { color: var(--color-secondary, #006a6a); background: var(--color-surface-container, #f0f4f8); border-color: transparent; }
.kairos-page .kairos-button-primary { background: var(--color-primary, #0085ff); border-color: var(--color-primary, #0085ff); }
.kairos-page .kairos-card { border-color: var(--color-outline-variant, #dde1e5); box-shadow: 0 10px 30px rgba(5,67,109,.04); }
.kairos-page .kairos-grid > div { border-color: var(--color-primary, #0085ff); }
.kairos-page .kairos-workspace { margin-top: 28px; }
.kairos-page .kairos-model-layout { display: grid; grid-template-columns: minmax(0,1fr); gap: 18px; margin-top: 20px; }
.kairos-page .kairos-model-panel { background: var(--color-surface-container-low, #f8fafc); border-radius: 12px; padding: 20px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 18px; align-items: start; }
.kairos-page .kairos-panel-item { min-width: 0; }
.kairos-page .kairos-panel-item .kairos-note { margin-top: 8px; max-width: none; }
.kairos-page .kairos-panel-lead { margin-top: 0; font-size: 15px; font-weight: 600; }
.kairos-page .kairos-model-panel select { width: 100%; }
.kairos-page input { accent-color: var(--color-primary, #0085ff); }
.kairos-page .kairos-model-assumption { padding: 12px 14px; margin: 0; background: #e8f4ff; border-radius: 8px; font-size: 14px; }
.kairos-page .kairos-scenario-map { height: 580px; margin-top: 0; }
.kairos-page .kairos-playback { display: flex; gap: 18px; align-items: end; padding: 18px 0; flex-wrap: wrap; }
.kairos-page .kairos-currents-toggle { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 13.5px; font-weight: 600; cursor: pointer; user-select: none; }
.kairos-page .kairos-currents-toggle input { width: 16px; height: 16px; cursor: pointer; }
.kairos-page .kairos-time-control { flex: 1; }
.kairos-page .kairos-time-control input { display: block; width: 100%; }
.kairos-page .kairos-time-control output { font-size: 13px; }
.kairos-page .kairos-comparison { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin: 20px 0; }
.kairos-page .kairos-result-card { padding: 20px; background: var(--color-surface-container-low, #f8fafc); border-radius: 12px; border-top: 3px solid var(--color-secondary, #006a6a); }
.kairos-page .kairos-result-card strong { font-size: 25px; display: block; margin: 8px 0; }
.kairos-page .kairos-current-canvas { position: absolute; top: 0; left: 0; z-index: 450; pointer-events: none; }
/* Slick layer, map legend and drift rose. */
.kairos-page .kairos-oil-canvas { position: absolute; top: 0; left: 0; z-index: 460; pointer-events: none; }
.kairos-page .kairos-map-frame { position: relative; }
.kairos-page .kairos-map-legend { position: absolute; top: 10px; right: 10px; z-index: 470; background: rgba(255,255,255,.92); border: 1px solid #d6dde4; border-radius: 8px; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #333; pointer-events: none; }
.kairos-page .kairos-legend-item { display: flex; align-items: center; gap: 7px; }
.kairos-page .kairos-trail-slow { background: rgb(103,232,249); }
.kairos-page .kairos-trail-medium { background: rgb(253,224,71); }
.kairos-page .kairos-trail-fast { background: rgb(251,146,60); }
.kairos-page .kairos-legend-source { border-top: 1px solid #dfe6ee; margin-top: 5px; padding-top: 5px; font-size: 11px; color: #5b6570; max-width: 220px; line-height: 1.45; }
.kairos-page .kairos-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.kairos-page .kairos-dot-active { background: #b88a20; }
.kairos-page .kairos-dot-stranded { background: #b85050; }
.kairos-page .kairos-dot-drifter { background: #3b69b2; }
.kairos-page .kairos-drifter-canvas { position: absolute; top: 0; left: 0; z-index: 440; pointer-events: none; }
.kairos-page .kairos-trail { width: 26px; height: 3px; box-shadow: 0 0 0 1px #020617; display: inline-block; flex: none; }
.kairos-page .kairos-drift { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 18px; align-items: start; margin-top: 18px; padding: 16px; background: var(--color-surface-container-low, #f8fafc); border: 1px solid #dfe6ee; border-radius: 12px; }
.kairos-page .kairos-drift h3 { margin: 0 0 6px; }
.kairos-page .kairos-drift-rose { display: grid; gap: 8px; justify-items: center; }
.kairos-page .kairos-drift-rose svg { width: 220px; max-width: 100%; height: auto; }
.kairos-page .kairos-drift-rose dl { margin: 0; width: 100%; }
.kairos-page .kairos-drift-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; padding: 2px 0; }
.kairos-page .kairos-drift-row dt { display: flex; align-items: center; gap: 7px; margin: 0; color: #4b5561; }
.kairos-page .kairos-drift-row dd { margin: 0; font-weight: 600; }
.kairos-page .kairos-drift-row-total { border-top: 1px solid #dfe6ee; margin-top: 4px; padding-top: 6px; }
.kairos-page .kairos-drift-row-total dt { color: #111; }
.kairos-page .kairos-drift-wind { margin: 0; font-size: 12.5px; color: #4b5561; }
.kairos-page .kairos-chip { width: 11px; height: 11px; border-radius: 3px; display: inline-block; flex: none; }
.kairos-page .kairos-compass { fill: #8a939c; font-size: 11px; }
.kairos-page .kairos-ring { fill: none; stroke: #dfe6ee; stroke-width: 1; }
.kairos-page .kairos-time-control output { font-size: 13.5px; font-weight: 600; display: block; }
.kairos-page .kairos-scenario-control label { margin-bottom: 4px; font-size: 12px; }
.kairos-page .kairos-scenario-control select { max-width: 320px; padding: 8px 10px; }
.kairos-page .kairos-ship-icon { background: none; border: none; }
.kairos-page .kairos-ship-icon svg { display: block; filter: drop-shadow(0 1px 2px rgba(17,24,32,.45)); }
.kairos-page .kairos-counts { color: #5b6570; font-weight: 500; font-size: 13px; }
.kairos-page .kairos-budget { margin-top: 8px; padding-top: 16px; border-top: 1px solid #eef1f4; }
.kairos-page .kairos-budget h3, .kairos-page .kairos-comparison-block h3 { font-size: 17px; margin-bottom: 10px; }
.kairos-page .kairos-comparison-block { margin-top: 22px; }
.kairos-page .kairos-chart { position: relative; width: 100%; }
.kairos-page .kairos-budget-svg { width: 100%; height: auto; display: block; }
.kairos-page .kairos-grid { stroke: #eef1f4; stroke-width: 1; }
.kairos-page .kairos-axis { stroke: #c3ccd4; stroke-width: 1; }
.kairos-page .kairos-tick { fill: #5b6570; font-size: 11px; }
.kairos-page .kairos-mark { stroke: #8a6d3b; stroke-dasharray: 4 3; stroke-width: 1.2; }
.kairos-page .kairos-mark-label { fill: #8a6d3b; font-size: 10.5px; }
.kairos-page .kairos-cursor { stroke: #111; stroke-width: 1.4; }
.kairos-page .kairos-cursor-dot { fill: #111; }
.kairos-page .kairos-chart-hitbox { cursor: crosshair; }
.kairos-page .kairos-chart-tooltip { position: absolute; z-index: 5; background: rgba(17,24,32,.94); color: #fff; border-radius: 8px; padding: 8px 10px; font-size: 12px; pointer-events: none; max-width: 210px; }
.kairos-page .kairos-chart-tooltip div { display: flex; align-items: center; gap: 6px; padding: 1px 0; }
.kairos-page .kairos-chart-tooltip .kairos-chip { width: 9px; height: 9px; }
.kairos-page .kairos-result-card strong { margin: 4px 0 2px; }
.kairos-page .kairos-result-value-label { display: block; font-size: 13px; color: #5b6570; margin-bottom: 6px; }
.kairos-page .kairos-mass-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px 14px; margin: 12px 0; font-size: 13px; }
.kairos-page .kairos-mass-grid div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dotted #d9e0e7; padding-bottom: 4px; }
.kairos-page .kairos-mass-grid dt { color: #4b5561; }
.kairos-page .kairos-mass-grid dd { margin: 0; font-weight: 600; }
@media(max-width: 900px) {
  .kairos-page .kairos-drift { grid-template-columns: 1fr; }
}
@media(max-width: 900px) {
  .kairos-page .kairos-model-layout { grid-template-columns: 1fr; }
  .kairos-page .kairos-model-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kairos-page .kairos-scenario-map { height: 420px; }
}
@media(max-width: 600px) {
  .kairos-page .kairos-model-panel { grid-template-columns: 1fr; }
  .kairos-page .kairos-workspace {  margin-top: 18px; }
  .kairos-page .kairos-comparison { grid-template-columns: 1fr; }
  .kairos-page .kairos-playback { align-items: start; }
}


/* KAIROS map legend swatches.
   Colours mirror the map layers. Keep them in sync with:
   - KairosOilLayer.js   (OIL_COLORS, DRIFTER_COLORS)
   - KairosCurrents.js   (SPEED_CLASSES)
   Everything is scoped under .kairos-map-legend, so this block wins over the
   old .kairos-dot-* / .kairos-trail-* rules even if you leave them in place. */

.kairos-map-legend {
  --legend-outline: rgba(4, 12, 24, 0.75);
  --legend-floating: rgb(250, 170, 40);
  --legend-shore: rgb(240, 84, 72);
  --legend-drifter: rgb(232, 121, 249);
  --legend-weak: rgb(103, 232, 249);
  --legend-medium: rgb(253, 224, 71);
  --legend-strong: rgb(251, 146, 60);
}

/* Same look as on the map: bright fill + dark outline (the white "strong"
   swatch would be invisible on a light legend without it). */
.kairos-map-legend .kairos-dot,
.kairos-map-legend .kairos-trail {
  display: inline-block;
  flex: none;
  vertical-align: middle;
  margin-right: 0.45rem;
  box-shadow: 0 0 0 1.5px var(--legend-outline);
}

.kairos-map-legend .kairos-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
}

.kairos-map-legend .kairos-dot-active { background: var(--legend-floating); }
.kairos-map-legend .kairos-dot-stranded { background: var(--legend-shore); }

/* Drifters are drawn smaller than the oil on the map. */
.kairos-map-legend .kairos-dot-drifter {
  width: 0.55rem;
  height: 0.55rem;
  background: var(--legend-drifter);
}

/* Current trails: short streaks, brighter = faster. */
.kairos-map-legend .kairos-trail {
  width: 1.5rem;
  height: 0.22rem;
  border-radius: 999px;
}

.kairos-map-legend .kairos-trail-slow { background: var(--legend-weak); }
.kairos-map-legend .kairos-trail-medium { background: var(--legend-medium); }
.kairos-map-legend .kairos-trail-fast { background: var(--legend-strong); }




.kairos-scenario-map .leaflet-control-zoom a::before,
.kairos-scenario-map .leaflet-control-zoom a::after {
  content: none;
}

.leaflet-control-zoom-in, .leaflet-control-zoom-out {
  text-decoration: none;
}