/* Key Biscayne Guide — homepage components (Horizon design).
   Loaded only by /index.html, after style.css. Tokens come from style.css. */

body.home { --wrap: 1160px; }
.home-wrap { max-width: 1160px; padding: 0 16px 48px; gap: 0; display: block; }
.home-wrap > * + * { margin-top: 16px; }

.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.sec-head h2 { font-size: 24px; letter-spacing: -0.035em; line-height: 1.1; }
.sdot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--c-mute); display: inline-block; }
.s-ok .sdot, .sdot.s-ok { background: var(--c-green); }
.s-warn .sdot, .sdot.s-warn { background: var(--c-yellow); }
.s-bad .sdot, .sdot.s-bad { background: var(--c-coral); }
.s-unk .sdot, .sdot.s-unk { background: transparent; box-shadow: inset 0 0 0 2px var(--c-mute); }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wx-ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; display: block; }

/* ----- Hero ----- */
.home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 6px -8px 0;
  min-height: 366px;
  border-radius: var(--r-xl);
  background: #C9DDD6;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px 20px 20px;
}
.home-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; z-index: -2; }
.home-hero::after {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(6,24,20,.24) 0%, rgba(6,24,20,0) 24%, rgba(6,24,20,0) 38%, rgba(6,24,20,.8) 100%);
}
.hero-when {
  position: absolute; left: 14px; top: 14px;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 13px 7px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: 13px; font-weight: 600; color: var(--c-ink);
  max-width: calc(100% - 28px);
  white-space: nowrap;
}
.hero-when h1 { font: inherit; letter-spacing: 0; margin: 0; }
.hero-when .hero-when-date::before { content: '· '; }
.hero-photo-tag { text-decoration: none; position: absolute; right: 14px; bottom: 12px; font-size: 10.5px; font-weight: 600; color: rgba(255,255,255,.82); text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.hero-verdict {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.05em;
  font-size: clamp(44px, 12.4vw, 88px);
  line-height: 0.98;
  margin: 0 0 10px;
  color: #fff;
  text-wrap: balance;
  text-shadow: 0 2px 30px rgba(0,0,0,.25);
}
.hero-sub { margin: 0; color: rgba(255,255,255,.95); font-size: 16.5px; line-height: 1.45; max-width: 34ch; font-weight: 500; text-shadow: 0 1px 12px rgba(0,0,0,.3); }
.hero-meta { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13.5px; font-weight: 600; color: rgba(255,255,255,.92); text-shadow: 0 1px 10px rgba(0,0,0,.35); padding-right: 64px; }
.hero-meta .dot { opacity: .6; }
.hero-credit { margin: 8px 2px 0; font-size: 11.5px; line-height: 1.45; color: var(--c-mute); }
.foot .page-dates { margin: 4px 0; font-size: inherit; font-weight: inherit; letter-spacing: 0; }
.foot #photo-credit a { color: inherit; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }

/* ----- Ask ----- */
.ask { margin-top: 14px; position: relative; }
.ask-field {
  display: flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 8px 0 18px;
  border-radius: 18px;
  background: var(--c-bg);
  border: 1.5px solid transparent;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.ask-field:focus-within { background: #fff; border-color: var(--c-primary); box-shadow: 0 8px 30px rgba(15,31,27,.10); }
.ask-field .ico { width: 20px; height: 20px; color: var(--c-mute); }
.ask-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 17px; color: var(--c-ink); height: 100%; -webkit-appearance: none; appearance: none; }
.ask-field input::placeholder { color: var(--c-mute); }
.ask-field input::-webkit-search-cancel-button { display: none; }
.ask-clear { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--c-mute); }
.ask-clear[hidden] { display: none; }
.ask-chips { display: flex; gap: 8px; overflow-x: auto; margin: 12px -16px 0; padding: 0 16px 2px; scrollbar-width: none; }
.ask-chips::-webkit-scrollbar { display: none; }
.ask-chip {
  flex: none; display: inline-flex; align-items: center;
  height: 38px; padding: 0 15px;
  border-radius: 999px; border: 1px solid var(--c-line);
  background: #fff; color: var(--c-ink);
  font-size: 14.5px; font-weight: 600; white-space: nowrap; text-decoration: none; cursor: pointer;
}
.ask-chip:hover { text-decoration: none; background: var(--c-bg); }
.ask-chip[aria-pressed="true"] { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.ask-answers { margin-top: 12px; border-radius: 18px; background: #fff; border: 1px solid var(--c-line); box-shadow: 0 12px 36px rgba(15,31,27,.10); overflow: hidden; }
.ask-answers[hidden] { display: none; }
.ask-ans { display: grid; grid-template-columns: 10px 1fr; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--c-line); color: inherit; text-decoration: none; }
.ask-ans:first-child { border-top: 0; }
.ask-ans:hover { text-decoration: none; background: var(--c-bg); }
.ask-ans .sdot { margin-top: 7px; }
.ask-a { display: block; font-family: var(--font-display); font-size: 18px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.25; color: var(--c-ink); }
.ask-d { display: block; font-size: 14.5px; font-weight: 400; color: var(--c-ink-soft); line-height: 1.45; margin-top: 3px; }
.ask-m { display: block; font-size: 12.5px; color: var(--c-teal-deep); margin-top: 5px; font-weight: 600; }
.ask-none { padding: 16px; font-size: 14.5px; color: var(--c-ink-soft); }

/* ----- Now tiles ----- */
.now-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.now-tile {
  display: flex; flex-direction: column;
  background: var(--c-bg);
  border-radius: var(--r-lg);
  padding: 14px 14px 13px;
  min-height: 158px;
  color: var(--c-ink);
  text-decoration: none;
  transition: background .15s ease;
}
.now-tile:hover { background: var(--c-sand-2); text-decoration: none; }
.nt-k { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--c-mute); }
.nt-k .ico { width: 15px; height: 15px; }
.nt-v { display: flex; align-items: center; gap: 7px; margin-top: 7px; font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.12; min-height: 23px; }
.nt-v small { font-size: 13px; font-weight: 700; letter-spacing: 0; color: var(--c-ink-soft); align-self: flex-end; margin-bottom: 1px; }
.nt-viz { flex: 1; display: flex; align-items: center; min-height: 44px; margin: 6px 0; }
.nt-viz svg { width: 100%; height: auto; overflow: visible; display: block; }
.nt-d { font-size: 12.5px; color: var(--c-ink-soft); line-height: 1.3; min-height: 16px; font-weight: 400; }
.nt-beads { display: flex; gap: 7px; flex-wrap: wrap; }
.nt-beads i { width: 17px; height: 17px; border-radius: 50%; background: var(--c-viz, #D3CABA); }
.nt-beads i.good { background: var(--c-green); }
.nt-beads i.moderate { background: var(--c-yellow); }
.nt-beads i.poor, .nt-beads i.advisory { background: var(--c-coral); }
.nt-meter { width: 100%; }
.nt-meter-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.nt-meter-bar i { height: 8px; border-radius: 99px; background: rgba(15,31,27,.10); }
.nt-meter-bar i.on { background: var(--c-green); }
.nt-meter.lvl-2 .nt-meter-bar i.on { background: var(--c-yellow); }
.nt-meter.lvl-3 .nt-meter-bar i.on { background: var(--c-coral); }
.nt-meter-l { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--c-mute); font-weight: 600; margin-top: 5px; }
.nt-uv { position: relative; width: 100%; height: 8px; border-radius: 99px; background: linear-gradient(90deg, #3FB36B 0%, #F2C230 28%, #F08A24 50%, #E0402B 72%, #9B4FD0 100%); }
.nt-uv i { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--c-ink); transform: translate(-50%, -50%); }
.nt-bars { display: flex; align-items: flex-end; gap: 5px; height: 34px; width: 100%; }
.nt-bars i { flex: 1; border-radius: 4px 4px 2px 2px; border: 1.5px dashed #CFC6B5; }
.nt-bars i.on { border: 0; background: var(--c-green); }
.nt-bars.lvl-2 i.on { background: var(--c-yellow); }
.nt-bars.lvl-3 i.on { background: var(--c-coral); }
.nt-line { fill: none; stroke: var(--c-teal); stroke-width: 2.2; stroke-linecap: round; }
.nt-area { fill: rgba(14,143,155,.14); }
.nt-now { fill: var(--c-coral); stroke: #fff; stroke-width: 2.5; }
.nt-dash { fill: none; stroke: #CFC6B5; stroke-width: 1.5; stroke-dasharray: 2 4; stroke-linecap: round; }
.nt-ink { fill: none; stroke: var(--c-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nt-txt { font-family: var(--font); font-size: 9.5px; font-weight: 600; fill: var(--c-mute); }

/* ----- Heads up ----- */
.heads-up { margin-top: 28px; }
.heads-up[hidden] { display: none; }
.heads-up-title { font-family: var(--font); font-size: 13px; font-weight: 700; letter-spacing: 0; color: var(--c-coral-deep); margin: 0 0 8px; }
.heads-up .local-notice { margin: 0 0 8px; }
.heads-up.is-enhanced .heads-up-list { border: 1px solid var(--c-line); border-radius: var(--r-lg); overflow: hidden; }
.heads-up.is-enhanced .local-notice { margin: 0; border: 0; border-radius: 0; border-top: 1px solid var(--c-line); background: #fff; padding: 0; }
.heads-up.is-enhanced .local-notice:first-child, .heads-up.is-enhanced .local-notice[hidden] + .local-notice { border-top: 0; }
.heads-up.is-enhanced .local-notice h3 {
  margin: 0; padding: 13px 44px 13px 38px;
  position: relative; cursor: pointer;
  font-family: var(--font); font-size: 15px; font-weight: 650; letter-spacing: -0.005em; line-height: 1.3;
}
.heads-up.is-enhanced .local-notice h3::before { content: ''; position: absolute; left: 16px; top: 18px; width: 10px; height: 10px; border-radius: 50%; background: var(--c-coral); }
.heads-up.is-enhanced .local-notice h3::after { content: ''; position: absolute; right: 18px; top: 17px; width: 8px; height: 8px; border-right: 2px solid var(--c-mute); border-bottom: 2px solid var(--c-mute); transform: rotate(45deg); transition: transform .18s ease; }
.heads-up.is-enhanced .local-notice.is-open h3::after { transform: rotate(-135deg); top: 21px; }
.heads-up.is-enhanced .local-notice > :not(h3) { display: none; }
.heads-up.is-enhanced .local-notice.is-open > :not(h3) { display: block; margin: 0 16px 10px 38px; }
.heads-up.is-enhanced .local-notice.is-open > :last-child { margin-bottom: 14px; }

/* ----- Two columns on desktop: content left, map pinned right ----- */
.home-cols { margin-top: 28px; }
.home-cols > * + * { margin-top: 16px; }
.home-map { margin-bottom: 28px; }
.imap { position: relative; border-radius: var(--r-lg); overflow: hidden; background: #2F6F78; }
.imap-img { display: block; width: 100%; height: auto; }
.imap-pin {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; align-items: center;
  height: 30px; padding: 2.5px;
  border: 0; border-radius: 999px;
  background: #fff; color: var(--c-ink);
  box-shadow: 0 2px 8px rgba(15,31,27,.35);
  font: inherit; font-size: 12.5px; font-weight: 700; white-space: nowrap;
  cursor: pointer;
}
.imap-pin i { width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; background: var(--c-mute); color: #fff; flex: none; }
.imap-pin i .ico { width: 15px; height: 15px; stroke-width: 2; }
.imap-pin b { display: none; padding: 0 10px 0 7px; font-weight: 700; }
.imap-pin.s-ok i { background: var(--c-green); }
.imap-pin.s-warn i { background: var(--c-yellow); }
.imap-pin.s-bad i { background: var(--c-coral); }
.imap-pin.s-unk i { background: #fff; color: var(--c-mute); box-shadow: inset 0 0 0 2px var(--c-mute); }
.imap-pin.is-on { background: var(--c-primary); color: #fff; z-index: 5; box-shadow: 0 6px 18px rgba(15,31,27,.45); }
.imap-pin.is-on b { display: block; }
.imap-pin.flip.is-on { flex-direction: row-reverse; }
.imap-pin.flip.is-on b { padding: 0 7px 0 10px; }
.imap-places { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 10px -16px 0; padding: 0 16px 4px; scrollbar-width: none; }
.imap-places::-webkit-scrollbar { display: none; }
.imap-place { flex: 0 0 84%; scroll-snap-align: center; background: var(--c-bg); border-radius: var(--r-lg); padding: 14px 16px 15px; border: 1.5px solid transparent; cursor: pointer; }
.imap-place.is-on { border-color: var(--c-primary); background: #fff; }
.imap-place-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.imap-place h3 { margin: 0; font-size: 17px; letter-spacing: -0.03em; }
.imap-place p { margin: 7px 0 9px; font-size: 14px; color: var(--c-ink-soft); line-height: 1.45; }
.imap-place .badge { padding: 3px 10px; font-size: 12px; }
.imap-place .badge::before { display: none; }
.imap-links { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13.5px; }
.imap-links a { font-weight: 650; }
.imap-credit { margin: 8px 2px 0; font-size: 11.5px; }

/* ----- Plan your day ----- */
.plan-card .card-head { margin-bottom: 14px; }
.plan-now { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: center; }
.plan-temp .big-stat { font-size: clamp(52px, 13vw, 68px); }
.plan-temp .sub-stat { color: var(--c-ink); font-weight: 700; font-size: 16px; margin-top: 2px; }
.plan-card .weather-stats { grid-template-columns: repeat(4, 1fr); gap: 8px; }
.plan-card .weather-stats .stat { padding: 10px 10px 9px; }
.plan-card .weather-stats .stat-value { font-size: 19px; }
.plan-blurb { margin: 12px 0 0; max-width: none; }
.plan-days.forecast { margin-top: 16px; gap: 8px; min-height: 0; }
.plan-days .fc-day {
  background: #fff; border: 1px solid var(--c-line); border-radius: 16px;
  padding: 9px 4px 8px; gap: 1px; cursor: pointer;
  font: inherit; color: inherit;
}
.plan-days .fc-day .fc-name { font-size: 12px; text-transform: none; letter-spacing: 0; color: var(--c-mute); font-weight: 600; }
.plan-days .fc-day .fc-ico { color: var(--c-ink-soft); margin: 2px 0; }
.plan-days .fc-day .fc-hi { font-size: 16px; }
.plan-days .fc-day .fc-lo { font-size: 12px; }
.plan-days .fc-day .fc-pop { font-size: 11px; color: var(--c-teal-deep); font-weight: 650; }
.plan-days .fc-day[aria-pressed="true"] { background: var(--c-primary); border-color: var(--c-primary); }
.plan-days .fc-day[aria-pressed="true"] .fc-name,
.plan-days .fc-day[aria-pressed="true"] .fc-lo { color: rgba(255,255,255,.75); }
.plan-days .fc-day[aria-pressed="true"] .fc-hi,
.plan-days .fc-day[aria-pressed="true"] .fc-ico { color: #fff; }
.plan-days .fc-day[aria-pressed="true"] .fc-pop { color: #BFE8D6; }
.plan-days .fc-day-loading { cursor: default; min-height: 96px; }
.plan-box { margin-top: 12px; background: var(--c-bg); border-radius: var(--r-lg); padding: 16px 16px 14px; }
.plan-box[hidden] { display: none; }
.plan-readout { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; min-height: 52px; font-variant-numeric: tabular-nums; }
.plan-readout .r-time { font-family: var(--font-display); font-size: 28px; font-weight: 800; letter-spacing: -0.04em; min-width: 96px; }
.plan-readout .r-vals { font-size: 14px; color: var(--c-ink-soft); display: flex; flex-wrap: wrap; gap: 2px 12px; }
.plan-readout .r-vals b { color: var(--c-ink); font-weight: 700; }
.plan-chart { margin-top: 8px; touch-action: pan-y; cursor: crosshair; -webkit-user-select: none; user-select: none; }
.plan-chart svg { width: 100%; overflow: visible; display: block; }
.plan-chart text { font-family: var(--font); fill: var(--c-mute); font-size: 10px; font-weight: 600; }
.pc-band { fill: #FFE9A8; opacity: .55; }
.pc-area { fill: rgba(14,143,155,.16); }
.pc-line { fill: none; stroke: var(--c-teal); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.pc-grid { stroke: #D3CABA; stroke-width: 1; }
.pc-ext { fill: #fff; stroke: var(--c-teal); stroke-width: 2.2; }
.plan-chart .pc-extl { fill: var(--c-ink); font-weight: 700; font-size: 10.5px; }
.pc-now { stroke: var(--c-coral); stroke-width: 1.6; }
.pc-nowdot { fill: var(--c-coral); stroke: #fff; stroke-width: 2.5; }
.plan-chart .pc-nowt { fill: var(--c-coral-deep); font-weight: 750; font-size: 10.5px; }
.pc-cur { stroke: var(--c-ink); stroke-width: 1; stroke-dasharray: 2 2; opacity: 0; }
.is-scrubbing .pc-cur { opacity: .7; }
.pc-arrow { fill: none; stroke: var(--c-ink-soft); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.plan-chart .pc-kt { fill: var(--c-ink-soft); font-size: 10.5px; font-weight: 700; text-anchor: middle; }
.plan-takeaway { margin: 10px 0 0; font-size: 14.5px; color: var(--c-ink-soft); line-height: 1.5; }
.plan-takeaway b { color: var(--c-ink); font-weight: 650; }
.plan-sub { margin: 20px 0 10px; font-size: 16px; letter-spacing: -0.02em; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.plan-sub .muted { font-family: var(--font); font-weight: 500; letter-spacing: 0; font-size: 12.5px; }
.plan-card .tides-grid { margin-bottom: 10px; }
.plan-card .sun-row { margin: 0 0 14px; justify-content: flex-start; }

/* ----- Homepage cards ----- */
.home-cols .grid { grid-template-columns: 1fr; }
.access-tile .access-pill { align-self: flex-start; }
.sarg-cam-thumb img { color: rgba(255,255,255,.75); font-size: 12px; font-weight: 500; }

.home-cols .card h2 { font-size: 22px; letter-spacing: -0.035em; }
.home .card-head { align-items: baseline; }

@media (min-width: 700px) {
  .home-hero-img { object-position: 50% 40%; }
}
@media (min-width: 1000px) {
  .home-wrap { padding: 0 28px 56px; }
  .home-hero { margin: 10px 0 0; padding: 44px; min-height: 500px; border-radius: 36px; }
  .hero-when { left: 28px; top: 28px; font-size: 14px; }
  .hero-photo-tag { right: 30px; bottom: 24px; }
  .hero-sub { font-size: 19px; max-width: 42ch; }
  .hero-meta { font-size: 15px; }
  .ask { max-width: 640px; margin-top: 18px; }
  .ask-chips { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
  .now-tiles { grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 32px; }
  .now-tile { padding: 18px 18px 16px; min-height: 176px; }
  .nt-v { font-size: 22px; }
  .home-cols { display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: 0 40px; align-items: start; margin-top: 36px; }
  .home-cols > * { grid-column: 1; margin-top: 0; margin-bottom: 16px; }
  .home-cols > .home-map { grid-column: 2; grid-row: 1 / span 40; position: sticky; top: 78px; margin-bottom: 0; }
  .imap-places { margin: 10px 0 0; padding: 0 0 4px; }
  .imap-place { flex-basis: 88%; }
  .plan-now { grid-template-columns: auto 1fr; gap: 28px; }
}
@media (max-width: 420px) {
  .plan-card .weather-stats { grid-template-columns: repeat(2, 1fr); }
}
