/* ============================================================
   HOME-VISUAL-BALANCE-R2-R1 — Full Curtain State & Compact Calendar
   Parent: HOME-VISUAL-BALANCE-R2
   Scope:
   1) Restore the unified deep curtain state across Header + Navigation.
   2) Swap the normal red/black Berlin lockup for an exact red/white dark-state asset.
   3) Compress the desktop calendar and add faster month navigation affordances.
   ============================================================ */

/* --- Full curtain state: Header and Curtain are one continuous deep field. --- */
.brand-lockup-full-dark {
  display: none;
  width: 318px;
  height: auto;
  max-height: 68px;
  object-fit: contain;
  object-position: left center;
}

.site-header-shell.is-curtain {
  background: var(--curtain-bg) !important;
  color: #fff !important;
  border-color: var(--curtain-line) !important;
}
.site-header-shell.is-curtain .brand-lockup-full { display: none !important; }
.site-header-shell.is-curtain .brand-lockup-full-dark { display: block !important; }
.site-header-shell.is-curtain .brand-lockup-seal-only { display: none !important; }
.site-header-shell.is-curtain .nav-trigger,
.site-header-shell.is-curtain .nav-direct,
.site-header-shell.is-curtain .language-switch,
.site-header-shell.is-curtain .mobile-menu-trigger { color: #fff !important; }
.site-header-shell.is-curtain .language-switch .lang-divider { color: rgba(255,255,255,.48) !important; }

/* Keep the light and dark full lockups geometrically identical at each desktop breakpoint. */
@media (min-width: 1440px) {
  .brand-lockup-full,
  .brand-lockup-full-dark { width: 350px !important; max-height: 72px !important; }
}
@media (min-width: 1241px) and (max-width: 1439px) {
  .brand-lockup-full,
  .brand-lockup-full-dark { width: 326px !important; max-height: 68px !important; }
}
@media (max-width: 1240px) and (min-width: 861px) {
  .brand-lockup-full-dark { width: 268px; max-height: 58px; }
}
@media (max-width: 860px) {
  /* Full mobile brand lockup remains a later mobile-specific decision. */
  .brand-lockup-full-dark { display: none !important; }
  .site-header-shell.is-curtain .brand-lockup-seal-only { display: block !important; }
}

/* --- Compact calendar: month overview is the primary task, not an editorial hero. --- */
.calendar-hero {
  padding: 42px 0 24px !important;
  border-bottom: 1px solid var(--hairline) !important;
}
.calendar-title-row {
  margin-top: 14px !important;
  display: flex;
  align-items: center !important;
  justify-content: space-between;
  gap: 28px;
}
.calendar-title-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.calendar-title-row h1 {
  margin: 0;
  font-size: clamp(42px, 4vw, 56px) !important;
  line-height: .96 !important;
  letter-spacing: -.045em !important;
  font-weight: 600 !important;
  white-space: nowrap;
}
.month-controls {
  display: contents;
}
.month-controls button,
.calendar-today,
.calendar-month-select {
  height: 38px;
  min-height: 38px;
  border: 1px solid rgba(11,11,11,.55);
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.month-controls button {
  width: 38px !important;
  cursor: pointer;
  font-size: 18px !important;
  line-height: 1;
}
.month-controls button:hover,
.month-controls button:focus-visible,
.calendar-today:hover,
.calendar-today:focus-visible,
.calendar-month-select:hover,
.calendar-month-select:focus-visible {
  background: var(--curtain-bg);
  color: #fff;
  outline: none;
}
.calendar-quick-controls {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
}
.calendar-today {
  padding: 0 14px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .055em;
}
.calendar-month-select {
  min-width: 164px;
  padding: 0 32px 0 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}
.calendar-lede {
  max-width: 680px !important;
  margin: 14px 0 0 !important;
  font-size: 16px !important;
  line-height: 1.5 !important;
}

.ongoing-panel {
  padding: 20px 0 !important;
  grid-template-columns: 96px minmax(0,1fr) !important;
  gap: 18px !important;
  border-bottom-color: var(--hairline) !important;
}
.ongoing-panel[hidden] { display: none !important; }
.ongoing-list { min-width: 0; }
.ongoing-item {
  min-height: 42px;
  grid-template-columns: 118px minmax(0,1fr) 24px !important;
  gap: 16px !important;
}
.ongoing-item time { font-size: 15px !important; }
.ongoing-item strong { font-size: 18px !important; line-height: 1.18; }
.ongoing-item span { margin-top: 3px !important; font-size: 9px !important; letter-spacing: .08em !important; }

.month-grid-section { padding: 24px 0 0 !important; }
.weekday {
  min-height: 36px !important;
  padding: 10px !important;
  font-size: 10px !important;
  letter-spacing: .08em !important;
}
.day {
  min-height: 82px !important;
  padding: 10px !important;
}
.day > span { font-size: 17px !important; line-height: 1; }
.day i {
  left: 10px !important;
  bottom: 24px !important;
  width: 6px !important;
  height: 6px !important;
}
.day small {
  left: 22px !important;
  right: 8px;
  bottom: 20px !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 8.5px !important;
  letter-spacing: .06em !important;
}
.day.is-today > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  margin: -5px 0 0 -5px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--curtain-bg);
  color: #fff;
}
.calendar-day-panel { padding-top: 48px !important; }

@media (max-width: 860px) {
  .calendar-hero { padding-top: 34px !important; }
  .calendar-title-row { align-items: flex-start !important; gap: 16px; flex-wrap: wrap; }
  .calendar-title-cluster { gap: 8px; }
  .calendar-title-row h1 { font-size: clamp(36px, 11vw, 48px) !important; }
  .month-controls button { width: 36px !important; height: 36px; min-height: 36px; }
  .calendar-quick-controls { width: 100%; margin-left: 0; }
  .calendar-today { height: 36px; min-height: 36px; }
  .calendar-month-select { flex: 1 1 auto; height: 36px; min-height: 36px; }
  .ongoing-panel { grid-template-columns: 1fr !important; gap: 10px !important; }
  .ongoing-item { grid-template-columns: 88px minmax(0,1fr) 20px !important; }
  .month-grid-section { padding-top: 18px !important; }
  .weekday { min-height: 32px !important; padding: 8px 5px !important; font-size: 9px !important; }
  .day { min-height: 64px !important; padding: 7px !important; }
  .day > span { font-size: 15px !important; }
  .day i { left: 7px !important; bottom: 19px !important; }
  .day small { left: 17px !important; bottom: 16px !important; font-size: 7.5px !important; }
}

/* --- R2-R2: fixed month navigation geometry ---
   Keep prev/next controls stationary while month labels change length. */
@media (min-width: 861px) {
  .calendar-title-cluster {
    display: grid !important;
    grid-template-columns: 38px 320px 38px;
    column-gap: 14px !important;
    align-items: center;
    flex: none;
    min-width: 424px;
  }
  .calendar-title-cluster .month-controls {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }
  .calendar-title-cluster h1 {
    width: 320px;
    min-width: 320px;
    max-width: 320px;
    font-size: 48px !important;
    line-height: .98 !important;
    letter-spacing: -.042em !important;
    white-space: nowrap;
    overflow: visible;
  }
}

@media (max-width: 860px) {
  .calendar-title-cluster {
    display: grid !important;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    column-gap: 10px !important;
    width: min(100%, 430px);
    min-width: 0;
  }
  .calendar-title-cluster .month-controls {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }
  .calendar-title-cluster h1 {
    width: 100%;
    min-width: 0;
    max-width: none;
    text-align: center;
    font-size: clamp(34px, 10.5vw, 46px) !important;
    white-space: nowrap;
  }
}
