/* #1181 L2-P1 — factual period/time hierarchy, same Django facts in A and B.
   No new metric, workspace color, navigation, grid or occurrence projection. */
@media (min-width: 901px) {
  .personal-schedule .narrative-summary:not(.narrative-summary--partial) {
    border-color: #d3e1fa;
    border-left: 5px solid #315fe6;
    background: linear-gradient(112deg, #fff 35%, #f0f5ff 100%);
    box-shadow: 0 8px 24px rgb(27 57 107 / 9%);
  }

  .personal-schedule .narrative-summary:not(.narrative-summary--partial) > div:first-child {
    gap: 0.45rem;
    align-content: center;
  }

  .personal-schedule .narrative-summary .narrative-summary-headline {
    color: #173763;
    font-weight: 800;
    letter-spacing: -0.025em;
    font-size: clamp(1.05rem, 1.2vw, 1.35rem);
    line-height: 1.2;
  }

  .personal-schedule .narrative-summary .narrative-summary-duration {
    display: inline-flex;
    align-items: baseline;
    column-gap: 0.45rem;
    row-gap: 0.1rem;
    color: #334d71;
    line-height: 1.4;
  }

  .personal-schedule .narrative-summary .narrative-summary-duration > strong {
    color: #244ca4;
    font-size: clamp(1.25rem, 1.5vw, 1.55rem);
    font-weight: 800;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
  }

  .personal-schedule .narrative-summary .narrative-summary-facts {
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    padding: 0.35rem 0.65rem;
    border: 1px solid #d6e3f8;
    border-radius: 9px;
    background: #fff;
    color: #425776;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  .personal-schedule .narrative-summary:not(.narrative-summary--partial) .narrative-summary-next {
    border: 1px solid #dce6f6;
    border-radius: 12px;
    padding: 0.8rem 0.95rem;
    background: rgb(255 255 255 / 84%);
    box-shadow: 0 2px 8px rgb(28 58 109 / 5%);
  }

  .personal-schedule .narrative-summary:not(.narrative-summary--partial) .narrative-summary-next > span {
    color: #46618a;
    font-weight: 700;
  }

  .personal-schedule .narrative-summary:not(.narrative-summary--partial) .narrative-summary-next > strong {
    color: #1f3657;
    line-height: 1.35;
  }

  .personal-schedule .narrative-time-strip {
    border-color: #d5e2f7;
    background: linear-gradient(180deg, #fff, #f8faff);
    box-shadow: 0 7px 20px rgb(27 57 107 / 7%);
  }

  .personal-schedule .narrative-time-strip-heading > strong {
    color: #203b64;
    font-size: 0.98rem;
    line-height: 1.3;
  }

  .personal-schedule .narrative-time-strip-heading > span {
    color: #3e5678;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
  }

  .personal-schedule .narrative-time-track {
    height: 15px;
    border: 1px solid #cbd9f0;
    border-radius: 999px;
    background: #ecf2fd;
    box-shadow: inset 0 1px 3px rgb(32 65 118 / 12%);
  }

  .personal-schedule .narrative-time-legend > span {
    border-color: #dbe5f6;
    background: #fff;
    color: #304868;
    line-height: 1.45;
  }

  .personal-schedule .narrative-time-unavailable {
    margin: 0;
    color: #415a7d;
    line-height: 1.5;
  }
}

/* At the narrow end of desktop (and in B's remaining content area) stay fluid.
   The original three rails and exact same Django controls remain in place. */
@media (min-width: 901px) and (max-width: 1199px) {
  .personal-schedule .narrative-summary:not(.narrative-summary--partial) {
    gap: 0.65rem;
  }

  .personal-schedule .narrative-summary:not(.narrative-summary--partial) .narrative-summary-next {
    padding: 0.65rem;
  }
}

@media (min-width: 901px) and (forced-colors: active) {
  .personal-schedule .narrative-summary:not(.narrative-summary--partial),
  .personal-schedule .narrative-summary:not(.narrative-summary--partial) .narrative-summary-next,
  .personal-schedule .narrative-summary .narrative-summary-facts,
  .personal-schedule .narrative-time-strip,
  .personal-schedule .narrative-time-legend > span {
    border-color: CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
  }

  .personal-schedule .narrative-summary :is(.narrative-summary-headline, .narrative-summary-duration, .narrative-summary-duration > strong, .narrative-summary-facts),
  .personal-schedule .narrative-summary .narrative-summary-next :is(span, strong),
  .personal-schedule .narrative-time-strip :is(strong, span, p) {
    color: CanvasText;
  }

  .personal-schedule .narrative-time-track {
    border-color: CanvasText;
    background: Canvas;
    box-shadow: none;
  }
}
