/* Platform release/article calendar. Content and navigation work without JavaScript. */
.platform-calendar {
    --pc-release: #a48bff;
    --pc-article: #54d7bc;
    margin-top: 20px;
    padding: 26px;
    border: 1px solid var(--platforms-border);
    border-radius: 24px;
    background: var(--platforms-surface);
    box-shadow: var(--platforms-shadow);
    color: var(--platforms-ink);
    overflow-wrap: anywhere;
}
body.light-theme .platform-calendar { --pc-release: #704bff; --pc-article: #087e67; --platforms-muted: #626a7d; }
.platform-calendar [hidden] { display: none !important; }
#platform-calendar, #platform-materials, #platform-popular, #platform-catalog,
.pc-day-panel { scroll-margin-top: 108px; }
.pc-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.pc-heading { min-width: 0; max-width: 580px; }
.pc-eyebrow { display: flex; align-items: center; gap: 8px; color: var(--platforms-purple); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.pc-eyebrow svg { flex: 0 0 18px; }
body.platforms-page .pc-title { margin: 10px 0 8px; font-size: clamp(23px, 2.2vw, 30px); font-weight: 800; line-height: 1.2; letter-spacing: -.035em; }
.pc-intro { margin: 0; color: var(--platforms-muted); font-size: 12px; line-height: 1.7; }
.pc-month-nav { display: grid; grid-template-columns: 44px minmax(140px, 1fr) 44px; flex: 0 0 auto; align-items: center; gap: 6px; min-width: 0; }
.pc-month-arrow { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--platforms-border); border-radius: 13px; background: var(--platforms-surface); color: var(--platforms-ink); }
.pc-month-arrow[aria-disabled="true"] { opacity: .35; }
.pc-month-label { padding: 0 8px; font-size: 14px; line-height: 1.4; text-align: center; }
.pc-current-month { grid-column: 1 / -1; justify-self: center; display: flex; align-items: center; min-height: 36px; padding: 4px 12px; color: var(--platforms-purple); font-size: 11px; font-weight: 700; }
.pc-filters { display: flex; width: fit-content; max-width: 100%; gap: 4px; margin-top: 22px; padding: 4px; border: 1px solid var(--platforms-border); border-radius: 14px; background: var(--platforms-surface-soft); }
.pc-filters button { min-height: 40px; padding: 9px 16px; border: 0; border-radius: 10px; background: transparent; color: var(--platforms-muted); font: inherit; font-size: 12px; font-weight: 700; line-height: 1.3; cursor: pointer; }
.pc-filters button[aria-pressed="true"] { background: var(--platforms-purple); color: #141321; box-shadow: 0 3px 10px rgba(112, 75, 255, .16); }
body.light-theme .pc-filters button[aria-pressed="true"] { color: #fff; }
.pc-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin: 18px 0; color: var(--platforms-muted); font-size: 11px; line-height: 1.5; }
.pc-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.pc-legend > span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--pc-release); }
.pc-legend > .pc-legend-article::before { background: var(--pc-article); }
.pc-legend strong { color: var(--platforms-ink); font-size: 12px; }
.pc-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, 1fr); align-items: start; gap: 24px; }
.pc-month, .pc-details { min-width: 0; }
.pc-weekdays, .pc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.pc-weekdays { margin-bottom: 9px; }
.pc-weekdays abbr { padding: 5px 0; color: var(--platforms-muted); font-size: 10px; font-weight: 700; line-height: 1.4; text-align: center; text-decoration: none; }
.pc-day { position: relative; display: block; min-width: 0; min-height: 66px; padding: 11px 10px; border: 1px solid var(--platforms-border); border-radius: 13px; background: var(--platforms-surface-soft); color: var(--platforms-ink); line-height: 1; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease; }
.pc-day-number { font-size: 14px; font-weight: 700; }
.pc-day-count { position: absolute; top: 8px; right: 7px; display: inline-flex; align-items: center; justify-content: center; min-width: 19px; min-height: 19px; padding: 3px; border-radius: 6px; background: var(--platforms-surface); color: var(--platforms-purple); font-size: 9px; font-weight: 800; }
.pc-day-dots { position: absolute; bottom: 11px; left: 11px; display: flex; gap: 5px; }
.pc-day-dots i { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--pc-release); }
.pc-day-dots i[data-kind="article"] { background: var(--pc-article); }
.pc-day-empty { background: transparent; color: var(--platforms-muted); border-color: transparent; }
.pc-day-padding { visibility: hidden; }
.pc-day.is-today { border-color: var(--platforms-purple); }
.pc-day.is-selected { background: #704bff; border-color: #704bff; color: #fff; box-shadow: 0 5px 14px rgba(112, 75, 255, .2); }
.pc-day.is-selected .pc-day-count { color: #fff; background: rgba(0, 0, 0, .15); }
.pc-day.is-selected .pc-day-dots i { background: #fff; }
.pc-day.is-selected .pc-day-dots i[data-kind="article"] { background: #75f4d8; }
.pc-day.is-filter-empty:not(.is-selected) { background: transparent; border-color: var(--platforms-border); color: var(--platforms-muted); }
.pc-details { padding: 18px; border: 1px solid var(--platforms-border); border-radius: 17px; background: var(--platforms-surface-soft); }
.platform-calendar.is-enhanced .pc-details { max-height: 504px; min-height: 320px; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: thin; scrollbar-color: var(--platforms-border) transparent; }
.pc-day-panel + .pc-day-panel { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--platforms-border); }
.is-enhanced .pc-day-panel { margin-top: 0; padding-top: 0; border-top: 0; }
body.platforms-page .pc-day-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 17px; font-weight: 800; line-height: 1.4; }
.pc-today-label { padding: 4px 7px; border: 1px solid var(--platforms-border); border-radius: 6px; background: var(--platforms-surface); color: var(--platforms-purple); font-size: 9px; font-weight: 700; }
.pc-day-summary { margin: 6px 0 16px; color: var(--platforms-muted); font-size: 10px; line-height: 1.5; }
.pc-events { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pc-event { display: flex; flex-direction: column; min-width: 0; gap: 6px; padding: 14px; border: 1px solid var(--platforms-border); border-radius: 12px; background: var(--platforms-surface); }
.pc-event-kind { display: flex; align-items: center; gap: 6px; color: var(--platforms-muted); font-size: 9px; font-weight: 700; line-height: 1.4; }
.pc-event-kind::before { content: ""; width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: var(--pc-release); }
.pc-event-article .pc-event-kind::before { background: var(--pc-article); }
.pc-event-title { color: var(--platforms-ink); font-size: 13px; font-weight: 750; line-height: 1.5; }
.pc-event a.pc-event-title { display: block; }
.pc-event-date { color: var(--platforms-muted); font-size: 11px; line-height: 1.5; }
.pc-event-badges, .pc-event-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-event-badges > span { padding: 4px 6px; border-radius: 5px; background: var(--platforms-surface-soft); color: var(--platforms-purple); font-size: 9px; font-weight: 700; line-height: 1.4; }
.pc-event-badges > .is-postponed { color: #e4944b; }
body.light-theme .pc-event-badges > .is-postponed { color: #95521a; }
.pc-event-links { margin-top: 3px; }
.pc-event-links > a { display: inline-block; padding: 7px 9px; border: 1px solid var(--platforms-border); border-radius: 8px; color: var(--platforms-purple); font-size: 10px; font-weight: 700; line-height: 1.5; }
.pc-event-links > a.pc-external { color: var(--platforms-muted); }
.pc-empty, .pc-filter-empty, .pc-selection-hint { margin: 0; padding: 16px 4px; color: var(--platforms-muted); font-size: 12px; line-height: 1.8; }
.pc-unavailable { margin-top: 16px; }
.pc-undated { margin-top: 20px; border-top: 1px solid var(--platforms-border); }
.pc-undated summary { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 12px 0; color: var(--platforms-ink); font-size: 12px; font-weight: 700; cursor: pointer; list-style: none; }
.pc-undated summary::-webkit-details-marker { display: none; }
.pc-undated summary::before { content: ""; width: 7px; height: 7px; margin: 0 4px 0 1px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }
.pc-undated[open] summary::before { transform: rotate(45deg); }
.pc-undated summary > span { padding: 3px 7px; border-radius: 6px; background: var(--platforms-surface-soft); color: var(--platforms-purple); font-size: 10px; }
.pc-undated > p { margin: 0 0 14px; color: var(--platforms-muted); font-size: 11px; line-height: 1.7; }
.pc-undated > .pc-events { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.platform-calendar :is(a, button, summary):focus-visible { outline: 3px solid var(--platforms-purple); outline-offset: 3px; }
.platforms-stats.platforms-stats--linked { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.platforms-stats--linked .platforms-stat { position: relative; max-width: none; padding-right: 52px; transition: border-color .15s ease, background .15s ease; }
.platforms-stat-arrow { position: absolute; width: 19px; height: 19px; top: 22px; right: 18px; color: var(--platforms-purple); }
@media (hover: hover) {
    .pc-day[href]:hover { border-color: var(--platforms-purple); }
    .pc-month-arrow[href]:hover, .pc-event-links > a:hover, .platforms-stats--linked .platforms-stat:hover { border-color: var(--platforms-purple); background: var(--platforms-surface-soft); }
    .pc-current-month:hover, .pc-event a.pc-event-title:hover { color: var(--platforms-purple); text-decoration: underline; text-underline-offset: 3px; }
    .pc-filters button:not([aria-pressed="true"]):hover { color: var(--platforms-ink); }
}
@media (max-width: 900px) {
    .pc-header { flex-direction: column; gap: 18px; }
    .pc-heading { max-width: none; }
    .pc-month-nav { width: 100%; grid-template-columns: 44px minmax(0, 1fr) 44px; }
    .pc-current-month { min-height: 32px; }
    .pc-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .platform-calendar.is-enhanced .pc-details { max-height: 440px; min-height: 0; }
    .pc-undated > .pc-events { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
    .platform-calendar { padding: 16px; margin-top: 14px; border-radius: 19px; }
    body.platforms-page .pc-title { font-size: 24px; }
    .pc-intro { font-size: 11px; line-height: 1.65; }
    .pc-header { gap: 14px; }
    .pc-eyebrow { font-size: 10px; }
    .pc-filters { width: 100%; margin-top: 14px; gap: 2px; }
    .pc-filters button { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 8px 5px; font-size: 10px; }
    .pc-legend { margin: 14px 0; gap: 10px 16px; font-size: 10px; }
    .pc-grid, .pc-weekdays { gap: 4px; }
    .pc-weekdays abbr { font-size: 9px; }
    .pc-day { min-height: 52px; padding: 9px 6px; border-radius: 9px; }
    .pc-day-number { font-size: 12px; }
    .pc-day-count { top: 5px; right: 4px; min-width: 14px; min-height: 14px; padding: 2px; border-radius: 4px; font-size: 8px; }
    .pc-day-dots { left: 7px; bottom: 8px; gap: 4px; }
    .pc-day-dots i { width: 5px; height: 5px; }
    .pc-details { padding: 13px; border-radius: 13px; }
    body.platforms-page .pc-day-title { font-size: 16px; }
    .pc-event { padding: 12px; }
    .pc-event-title { font-size: 13px; }
    .pc-event-links > a { display: inline-flex; align-items: center; gap: 3px; min-height: 44px; font-size: 11px; padding: 9px; }
    .pc-event a.pc-event-title { padding: 3px 0; min-height: 44px; }
    .pc-undated > .pc-events { grid-template-columns: minmax(0, 1fr); }
    .platforms-stats.platforms-stats--linked { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .platforms-stats--linked .platforms-stat { padding: 13px 35px 13px 14px; }
    .platforms-stats--linked .platforms-stat:last-child { grid-column: 1 / -1; }
    .platforms-stats--linked .platforms-stat:last-child strong { display: inline-block; margin-right: 10px; }
    .platforms-stats--linked .platforms-stat:last-child span { display: inline-block; margin-top: 0; }
    .platforms-stat-arrow { width: 16px; height: 16px; top: 18px; right: 12px; }
}
@media (max-width: 380px) {
    .platform-calendar { padding: 12px; }
    .pc-day-count { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .platform-calendar *, .platforms-stats--linked .platforms-stat { transition: none !important; scroll-behavior: auto !important; }
}
