/* Погодный сайт (sites/weather): блоки поверх общего style.css сайтов-табло — карточки курортов, плитки месяцев,
   таблицы климата, туры. Цвета берутся из токенов темы. */

/* температура в таблицах: цвет по дневному максимуму (build.heat) */
.tv { font-weight: 750; }
.tv--hot { color: #c2410c; }
.tv--warm { color: #d97706; }
.tv--mild { color: #0f766e; }
.tv--cool { color: #2563eb; }
.sea { color: var(--brand); font-weight: 750; }
@media (prefers-color-scheme: dark) {
  .tv--hot { color: #fb923c; } .tv--warm { color: #fbbf24; } .tv--mild { color: #5eead4; } .tv--cool { color: #93c5fd; }
}

/* карточки курортов на главной */
.rcards { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.rcard { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.rcard__head { display: flex; align-items: center; justify-content: space-between; color: var(--text); text-decoration: none; font-size: 1.1rem; }
.rcard__now { display: flex; align-items: center; gap: 10px; margin: 0; }
.rcard__now b { font-size: 2.1rem; line-height: 1; }
.rcard__now span { color: var(--muted); }
.rcard__ic { width: 36px; height: 36px; color: var(--accent); }
.rcard__facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; color: var(--muted); font-size: .92rem; }
.rcard__facts li { display: flex; align-items: center; gap: 6px; }
.rcard .more { margin-top: auto; }

/* плитки месяцев */
.mtiles { list-style: none; margin: 10px 0 22px; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.mtile { display: grid; gap: 2px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.mtile:hover { border-color: var(--brand); }
.mtile.is-cur { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.mtile__m { font-weight: 700; }
.mtile__t { font-size: 1.6rem; line-height: 1.1; }
.mtile__n { color: var(--muted); font-size: .88rem; }
.mtile__s { display: flex; align-items: center; gap: 5px; color: var(--brand); font-weight: 650; font-size: .92rem; }

/* таблицы климата */
.clim tr.is-cur td { background: var(--accent-soft); }
.clim tr.is-cur td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
.clim td small { font-weight: 400; }

/* соседние месяцы */
.monthpn { display: flex; justify-content: space-between; gap: 12px; margin: 16px 0 22px; }
.monthpn a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--text); text-decoration: none; font-weight: 600; }
.monthpn a:hover { border-color: var(--brand); color: var(--brand); }

/* туры на Авиапинге */
.cta--tours { margin-top: 8px; }
.cta--tours .cta__text { flex: 1 1 100%; }
.tours { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tours a { padding: 7px 13px; border-radius: 999px; background: rgba(255, 255, 255, .16); color: #fff; text-decoration: none; font-weight: 600; }
.tours a:hover { background: rgba(255, 255, 255, .28); }

/* ссылки курорта: прогноз, вода, ветер */
.rlinks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rlinks a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--text); text-decoration: none; font-weight: 600; font-size: .92rem; }
.rlinks a:hover { border-color: var(--brand); color: var(--brand); }

/* декады и таблица по дням */
.dec td small { display: block; }
.daily { padding: 0; margin: 0 0 18px; }
.daily > summary { display: flex; align-items: center; gap: 8px; padding: 14px 16px; cursor: pointer; font-weight: 650; list-style: none; }
.daily > summary::-webkit-details-marker { display: none; }
.daily > summary .faq__chev { margin-left: auto; }
.daily[open] > summary .faq__chev { transform: rotate(180deg); }
.daily .note { padding: 0 16px 14px; }

/* сезон: ячейка месяца */
.season td { vertical-align: top; }
.season__cell small { display: block; color: var(--muted); }
.season__cell.is-ok { background: var(--brand-soft); }
.season__cell.is-ok small { color: var(--brand); font-weight: 650; }

/* карточки-ссылки на главной */
.linkcard { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start; padding: 16px 18px; color: var(--text); text-decoration: none; }
.linkcard .ic { grid-row: span 2; width: 28px; height: 28px; color: var(--accent-ink); }
.linkcard span { color: var(--muted); font-size: .93rem; }
.linkcard:hover b { color: var(--brand); }
.mtile__m small { color: var(--muted); font-weight: 500; }

/* график воды: роли цветов, проверенные dataviz/validate_palette.js (синий слот 1 + серая норма) */
.viz { --series-1: #2a78d6; --series-ref: #8b8b86; --viz-surface: var(--card); padding: 16px 18px; }
@media (prefers-color-scheme: dark) { .viz { --series-1: #3987e5; } }
.viz__legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 8px; padding: 0; color: var(--muted); font-size: .9rem; }
.viz__legend li { display: inline-flex; align-items: center; gap: 8px; }
.viz__key { width: 18px; height: 2px; border-radius: 2px; }
.viz__key--s1 { background: var(--series-1); }
.viz__key--ref { background: var(--series-ref); }
.viz__plot { position: relative; }
.viz__svg { display: block; width: 100%; height: auto; overflow: visible; }
.viz__svg:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 4px; }
.viz__grid { stroke: var(--line); stroke-width: 1; }
.viz__tick { fill: var(--muted); font-size: 11px; }
.viz__line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz__line--s1 { stroke: var(--series-1); }
.viz__line--ref { stroke: var(--series-ref); }
.viz__dot { fill: var(--series-1); stroke: var(--viz-surface); stroke-width: 2; }
.viz__end { fill: var(--text); font-size: 12px; font-weight: 700; }
.viz__end--ref { fill: var(--muted); font-weight: 500; }
.viz__cross { stroke: var(--muted); stroke-width: 1; }
.viz__hit { fill: transparent; cursor: crosshair; }
.viz__tip { position: absolute; top: 0; transform: translateX(-50%); pointer-events: none; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 8px 10px; font-size: .86rem; white-space: nowrap; }
.viz__tip b { display: block; font-size: 1rem; }
.viz__tip .viz__row { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.viz__tip .viz__row b { display: inline; color: var(--text); }
.viz__table { margin-top: 10px; }
.viz__table summary { cursor: pointer; color: var(--brand); font-weight: 600; }
