/*!
 * Toronto Cold Dip Map — styles
 * (c) 2026 DIVELUX Inc. MIT License.
 * Mobile first. Light paper, dark ink, lake blues for the data.
 */
.dvx {
  --paper: #f6f3ee;
  --card: #fffdf9;
  --ink: #1c110b;
  --ink-2: #4a3a30;
  --muted: #66564b;
  --line: #d9cfc1;
  --wood: #7a4e2d;
  --spruce: #1d5c45;
  --lake: #1f5f8b;
  --b0: #9a9187;
  --b1: #2f7fb5;
  --b2: #d99a1e;
  --b3: #b3261e;
  --r: 6px;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --text: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
html { background: #f6f3ee; -webkit-text-size-adjust: 100%; }
body.dvx { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--text); font-size: 16px; line-height: 1.55; }
.dvx *, .dvx *::before, .dvx *::after { box-sizing: border-box; }
:where(.dvx) :where(h1, h2, h3, p, ul, ol, dl, dd, dt, fieldset, legend, figure) { margin: 0; padding: 0; border: 0; min-width: 0; }
:where(.dvx) :where(input, button, select) { font: inherit; color: inherit; }
.dvx a { color: var(--spruce); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.dvx a:hover { text-decoration-thickness: 2px; }
.dvx :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 2px; }
.dvx [hidden] { display: none !important; }
.dvx-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dvx-wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.dvx-skip { position: absolute; left: -999px; top: 8px; padding: 10px 14px; background: var(--ink); color: #fff !important; border-radius: var(--r); z-index: 1000; }
.dvx-skip:focus { left: 8px; }

/* ---------- hero ---------- */
.dvx-hero { padding-top: 40px; padding-bottom: 24px; }
.dvx-kicker { font-size: 14px; font-weight: 600; letter-spacing: .02em; color: var(--lake); margin-bottom: 10px; }
.dvx h1 { font-family: var(--display); font-weight: 700; font-size: clamp(40px, 7vw + 12px, 84px); line-height: .98; letter-spacing: -0.03em; max-width: 11ch; }
.dvx-lead { margin-top: 16px; font-size: clamp(17px, .5vw + 15px, 20px); line-height: 1.5; color: var(--ink-2); max-width: 56ch; }
.dvx-h { font-family: var(--display); font-weight: 700; font-size: clamp(24px, 2.2vw + 16px, 34px); line-height: 1.12; letter-spacing: -0.015em; margin-bottom: 10px; }
.dvx-hint { font-size: 14px; line-height: 1.45; color: var(--muted); }
.cdm-warn { padding: 14px 16px; border-left: 4px solid var(--b3); background: var(--card); font-size: 15px; line-height: 1.55; color: var(--ink-2); max-width: 80ch; margin-bottom: 24px; }
.cdm-warn strong { color: var(--ink); }

/* ---------- tool ---------- */
.cdm-tool { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-bottom: 56px; }
.cdm-tool > * { min-width: 0; }
.cdm-bar { display: grid; gap: 12px; }
.cdm-status { font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.cdm-live { display: inline-block; margin-right: 6px; padding: 2px 8px; border-radius: 3px; background: var(--spruce); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; vertical-align: 1px; }
.cdm-live--off { background: var(--muted); }
.cdm-layers { display: flex; flex-wrap: wrap; gap: 8px; }
.cdm-tog { position: relative; display: block; cursor: pointer; }
.cdm-tog input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.cdm-tog span { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; font-size: 15px; font-weight: 500; color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.cdm-tog input:checked + span { border-color: var(--ink); color: var(--ink); text-decoration: none; box-shadow: inset 0 0 0 1px var(--ink); }
.cdm-tog input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.cdm-k { display: inline-block; width: 14px; height: 14px; flex: none; }
.cdm-k--beach { border-radius: 50%; background: var(--b1); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ink); }
.cdm-k--sauna { border-radius: 3px; background: var(--wood); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ink); }
.cdm-k--pool { border-radius: 3px; background: #fff; box-shadow: inset 0 0 0 3px var(--spruce), 0 0 0 1px var(--ink); }

/* map */
.cdm-mapbox { display: grid; gap: 10px; }
.cdm-map { position: relative; height: clamp(360px, 64vh, 560px); border: 1px solid var(--line); border-radius: var(--r); background: #e6e1d8; overflow: hidden; z-index: 0; }
.cdm-noscript { padding: 24px; color: var(--ink-2); }
.cdm-map--off { display: flex; align-items: center; justify-content: center; text-align: center; }
.dvx .cdm-map.cdm-map--notiles { background: repeating-linear-gradient(0deg, transparent 0 39px, rgba(28, 17, 11, .06) 39px 40px), repeating-linear-gradient(90deg, #ece7de 0 39px, rgba(28, 17, 11, .06) 39px 40px); }
.cdm-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-size: 14px; line-height: 1.35; color: var(--ink-2); }
.cdm-legend span { display: inline-flex; align-items: center; gap: 7px; }
.cdm-legend .cdm-legend-t { flex-basis: 100%; font-weight: 600; color: var(--ink); }
.cdm-sw { display: inline-block; width: 14px; height: 14px; border-radius: 50%; }
.cdm-b0 { background: var(--b0); } .cdm-b1 { background: var(--b1); } .cdm-b2 { background: var(--b2); } .cdm-b3 { background: var(--b3); }
.cdm-b0f { fill: var(--b0); } .cdm-b1f { fill: var(--b1); } .cdm-b2f { fill: var(--b2); } .cdm-b3f { fill: var(--b3); }

.dvx .leaflet-container { font-family: var(--text); font-size: 14px; line-height: 1.4; background: #aad3df; }
.dvx .leaflet-container a { color: var(--spruce); }
.cdm-pin { background: none; border: 0; display: flex !important; align-items: center; justify-content: center; cursor: pointer; }
.cdm-pin:focus-visible { outline: 3px solid var(--ink); outline-offset: 1px; border-radius: 50%; }
.cdm-dot { display: block; width: 18px; height: 18px; border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ink), 0 1px 4px 3px rgba(0, 0, 0, .25); transition: transform .12s; }
.cdm-sq { display: block; width: 13px; height: 13px; border-radius: 3px; transition: transform .12s; }
.cdm-sq--sauna { background: var(--wood); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ink), 0 1px 3px 2px rgba(0, 0, 0, .2); }
.cdm-sq--pool { background: #fff; box-shadow: inset 0 0 0 3px var(--spruce), 0 0 0 1px var(--ink), 0 1px 3px 2px rgba(0, 0, 0, .2); }
.cdm-pin:hover .cdm-dot, .cdm-pin:hover .cdm-sq { transform: scale(1.2); }
.dvx .leaflet-popup-content-wrapper { border-radius: var(--r); box-shadow: 0 3px 14px rgba(28, 17, 11, .28); }
.dvx .leaflet-popup-content { margin: 14px 18px 12px 16px; }
.cdm-pop p { margin: 0; }
.cdm-pop-k { font-size: 12px; font-weight: 600; color: var(--muted); }
.cdm-pop-n { font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1.2; color: var(--ink); margin: 2px 0 4px !important; }
.cdm-pop-c { font-size: 14px; color: var(--ink-2); margin-top: 3px !important; }
.cdm-pop-l { display: flex; flex-wrap: wrap; gap: 0 16px; margin-top: 6px !important; }
.cdm-pop-l a { display: inline-flex; align-items: center; min-height: 36px; font-size: 14px; font-weight: 600; }
.dvx .leaflet-container a.leaflet-popup-close-button { width: 32px; height: 32px; font-size: 22px; line-height: 30px; color: var(--ink-2); }
.dvx .leaflet-bar a { width: 40px; height: 40px; line-height: 40px; font-size: 22px; color: var(--ink); }
.dvx .leaflet-bar { border-radius: var(--r); }
.dvx .leaflet-control-attribution { font-size: 12px; background: rgba(255, 253, 249, .9); }

/* temperatures */
.cdm-season { padding-top: 20px; border-top: 1px solid var(--line); }
.cdm-season-sub, .cdm-intro { font-size: 16px; color: var(--ink-2); max-width: 70ch; margin-bottom: 14px !important; }
.dvx-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dvx table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 15px; font-variant-numeric: tabular-nums; }
.dvx caption { text-align: left; font-size: 14px; color: var(--muted); padding-bottom: 8px; }
.dvx th, .dvx td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); }
.dvx thead th { border-top: 2px solid var(--ink); font-weight: 600; font-size: 14px; }
.dvx tbody th { font-weight: 600; }
.cdm-t { display: inline-block; min-width: 48px; padding: 3px 8px; border-radius: 3px; text-align: right; font-weight: 600; color: var(--ink);
  background: rgba(47, 127, 181, calc(.55 - var(--t) * .45)); }

/* cards */
.cdm-listbox { padding-top: 20px; border-top: 1px solid var(--line); scroll-margin-top: 12px; }
.cdm-listbox .dvx-h:focus { outline: none; }
.cdm-listhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; }
.dvx-check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; color: var(--ink-2); cursor: pointer; }
.dvx-check input { width: 22px; height: 22px; margin: 0; accent-color: var(--ink); }
.cdm-cards { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-items: start; list-style: none; padding: 0; margin: 0; }
.cdm-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px 8px; min-width: 0; scroll-margin-top: 16px; }
.cdm-card:focus { outline: none; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cdm-tag { align-self: flex-start; font-size: 12px; font-weight: 600; line-height: 1.2; padding: 4px 8px; border-radius: 3px; color: #fff; background: var(--b0); }
.cdm-tag--b1 { background: var(--b1); } .cdm-tag--b2 { background: var(--b2); color: var(--ink); } .cdm-tag--b3 { background: var(--b3); }
.cdm-tag--sauna { background: var(--wood); } .cdm-tag--pool { background: transparent; color: var(--spruce); box-shadow: inset 0 0 0 1.5px var(--spruce); }
.cdm-name { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.2; letter-spacing: -0.01em; margin-top: 10px !important; overflow-wrap: anywhere; }
.cdm-facts { display: grid; grid-template-columns: 1fr 1fr; margin-top: 12px !important; border-top: 1px solid var(--line); }
.cdm-facts > div { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.cdm-facts dt { font-size: 12px; color: var(--muted); line-height: 1.3; }
.cdm-facts dd { font-size: 15px; font-weight: 600; line-height: 1.35; margin-top: 2px; font-variant-numeric: tabular-nums; }
.cdm-facts small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.cdm-fig { margin-top: 12px !important; }
.cdm-spark { display: block; width: 100%; height: 56px; background: #f1ece4; border-radius: 3px; }
.cdm-ref { stroke: rgba(28, 17, 11, .3); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.cdm-fig figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.cdm-sites, .cdm-obs, .cdm-addr, .cdm-k2 { font-size: 14px; line-height: 1.5; color: var(--ink-2); margin-top: 10px !important; }
.cdm-sites span, .cdm-k2 { color: var(--muted); }
.cdm-k2 { font-size: 13px; font-weight: 600; }
.cdm-addr { margin-top: 2px !important; }
.cdm-inslist { list-style: none; padding: 0; margin: 4px 0 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.cdm-inslist li { padding: 5px 0; border-bottom: 1px dashed var(--line); }
.cdm-inslist small { color: var(--muted); }
.cdm-inslist--s { font-size: 13px; margin-top: 6px; }
.cdm-ins { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 12px; font-weight: 600; background: #e7f1ea; color: var(--spruce); }
.cdm-ins--conditional-pass { background: #fbf0d9; color: #6b4a07; }
.cdm-ins--closed { background: #f8e1df; color: #8a1f17; }
.cdm-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; padding: 10px 0 6px; margin-top: auto !important; }
.cdm-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 600; }
.dvx-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; margin: 0; border: 1px solid var(--ink); border-radius: var(--r); background: transparent; color: var(--ink); font-family: var(--display); font-size: 15px; font-weight: 700; line-height: 1.2; cursor: pointer; transition: background-color .15s, color .15s; }
.dvx-btn:hover { background: var(--ink); color: #fff; }

/* ---------- method + footer ---------- */
.dvx-method { border-top: 1px solid var(--line); padding-top: 48px; padding-bottom: 56px; }
.dvx-method p, .dvx-method li { font-size: 16px; color: var(--ink-2); max-width: 70ch; }
.dvx-method p + p { margin-top: 12px; }
.dvx-method ul.dvx-plain { padding-left: 20px; margin: 16px 0; }
.dvx-method li { margin-top: 8px; }
.dvx-method h3 { font-family: var(--display); font-size: 20px; line-height: 1.2; margin: 32px 0 8px; }
.dvx-callout { padding: 14px 16px; border-left: 3px solid var(--ink); background: var(--card); font-size: 15px; line-height: 1.55; margin-top: 24px !important; }
.dvx-callout strong { color: var(--ink); }
.dvx-foot { background: var(--ink); color: #e9dccb; padding: 32px 0 40px; font-size: 15px; }
.dvx-foot p { margin: 0 0 8px; max-width: 70ch; }
.dvx-foot a { color: #fff; font-family: var(--display); font-weight: 700; font-size: 18px; }
.dvx-foot a:focus-visible { outline-color: #fff; }

@media (min-width: 720px) {
  .cdm-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cdm-bar { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .cdm-legend .cdm-legend-t { flex-basis: auto; }
}
@media (min-width: 900px) {
  .dvx-hero { padding-top: 64px; padding-bottom: 32px; }
  .cdm-map { height: 600px; }
}
@media (min-width: 1100px) {
  .cdm-cards--c { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .dvx *, .dvx *::before, .dvx *::after { transition: none !important; animation: none !important; }
}
