/* Desktop-only readability layer over the verified student-records release.
   Keep existing application modules and the desktop zoom unchanged. */
@media screen and (min-width: 901px) {
  .main-content {
    padding: 30px clamp(20px, 2.4vw, 38px) 56px;
    max-width: 1760px;
  }

  .sidebar__nav a, .sidebar-action, .global-search { font-size: 14px; }
  .sidebar__nav a, .sidebar-action { min-height: 44px; }
  .sidebar__nav a > svg, .sidebar-action > svg { width: 22px; height: 22px; flex-shrink: 0; }
  .sidebar__context strong, .profile-chip strong { font-size: 14px; }
  .sidebar__context small, .profile-chip small { font-size: 12px; }
  .sidebar__context, .sidebar__footer { flex-shrink: 0; }
  .sidebar__nav { min-height: 0; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
  .sidebar__nav::-webkit-scrollbar { display: block; width: 5px; }
  .sidebar__nav::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; }
  .topbar { gap: 14px; padding-inline: clamp(20px, 2.4vw, 38px); }
  .global-search { min-width: 160px; height: 46px; }
  .topbar__tools { flex-shrink: 0; }

  .button { min-height: 44px; font-size: 14px; padding-inline: 16px; }
  .button > svg, .text-link > svg, .panel-link > svg { width: 19px; height: 19px; flex-shrink: 0; }
  .icon-button { width: 42px; height: 42px; flex-shrink: 0; }
  .icon-button > svg { width: 21px; height: 21px; }
  .badge { min-height: 27px; font-size: 12px; }
  .badge > svg { width: 15px; height: 15px; }
  .page-header h1, .dashboard-hello h1 { font-size: 30px; }
  .page-header p { font-size: 14px; line-height: 1.6; }
  .page-header, .page-actions, .toolbar { flex-wrap: wrap; }
  .panel h2, .panel__header h2 { font-size: 16px; line-height: 1.45; }
  .panel__header p, .class-line small, .metric__copy small { font-size: 12px; }
  .class-line strong { font-size: 14px; }
  .text-link, .panel-link, .view-toggle, .toolbar-note, .back-link { font-size: 13px; }
  .filter-tabs button { font-size: 12px; min-height: 36px; }
  .search-field { height: 44px; }
  .search-field input { font-size: 14px; }
  .list-summary, .metric__copy em { font-size: 12px; }
  .metric__copy strong { font-size: 26px; }
  .attention-row__text strong, .event-row > span:last-child strong, .mini-tasks strong { font-size: 13px; }
  .attention-row__text small, .event-row > span:last-child small, .event-row em, .mini-tasks small { font-size: 12px; }
  .date-block { width: 46px; height: 49px; }
  .date-block strong { font-size: 17px; }
  .date-block small { font-size: 11px; }
  .attention-row, .event-row { min-height: 82px; }

  .student-row { min-height: 82px; grid-template-columns: 44px minmax(0, 1fr) 80px 80px auto 20px; }
  .student-row__identity strong { font-size: 14px; white-space: normal; line-height: 1.5; }
  .student-row__identity small, .student-row__identity em, .student-row__stat small { font-size: 12px; }
  .student-row__stat strong { font-size: 15px; }
  .student-row__warning .badge { white-space: normal; }
  .student-hero { flex-wrap: wrap; }
  .student-hero h1 { font-size: 29px; }
  .student-hero p, .detail-tabs button { font-size: 14px; }
  .student-hero-actions { margin-left: auto; }
  .privacy-note { font-size: 12px; line-height: 1.6; }
  .info-rows small, .overview-stats span { font-size: 12px; }
  .info-rows strong, .action-list button { font-size: 14px; }
  .data-table span, .data-table__head { font-size: 12px; }
  .book-cell strong, .book-card__title h2, .service-card h2 { font-size: 14px; }
  .book-cell small, .book-card__title p, .service-card p, .service-card__footer { font-size: 12px; }
  .task-copy strong { font-size: 14px; }
  .task-copy small, .visibility-cell, .task-list article > span:last-child { font-size: 12px; }
  .task-summary small, .attention-summary small { font-size: 12px; }
  .task-list article { grid-template-columns: 28px minmax(180px, 1fr) auto auto 90px; }
  .request-preview strong, .report-grid h2, .year-card strong { font-size: 14px; }
  .request-preview small, .report-grid p, .year-card small, .year-card > a, .year-card > span:last-child { font-size: 12px; }
  .settings-heading p, .check-list li, .setting-status p, .print-summary small { font-size: 12px; line-height: 1.6; }
  .archived-student-list strong, .timeline strong { font-size: 14px; }
  .archived-student-list small, .timeline small { font-size: 12px; }
  .empty-state h3 { font-size: 16px; }
  .empty-state p, .toast, .sync-error { font-size: 13px; }

  .field > span, .segment-field legend { font-size: 13px; }
  .field input, .field textarea, .field select { font-size: 14px; line-height: 1.5; }
  .field input, .field select { height: 46px; }
  .field > small, .form-callout, .sensitive-box small { font-size: 12px; line-height: 1.6; }
  .form-error, .sensitive-box strong { font-size: 13px; }
  .form-grid > .field { margin-top: 0; }
  .student-entry-form h3, .guardian-editor h2 { font-size: 16px; }
  .student-entry-form > section > h3 { margin-bottom: 18px; }
  .guardian-edit__header > strong { font-size: 12px; }
  .guardian-section-heading { flex-wrap: wrap; }
  .guardian-section-heading .button { min-height: 40px; }

  /* Only the body scrolls: headers and action buttons must stay on screen. */
  .modal { max-height: calc(100dvh / 1.1 - 44px); }
  .modal--drawer { height: calc(100dvh / 1.1); max-height: calc(100dvh / 1.1); }
  .modal__header, .modal__footer { flex-shrink: 0; }
  .modal__header h2 { font-size: 20px; }
  .modal__header p { font-size: 12px; line-height: 1.6; }
  .modal__body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .modal__footer { min-height: 76px; flex-wrap: wrap; background: var(--surface); border-radius: 0 0 16px 16px; }
  .delete-confirm { flex-wrap: wrap; }
  .delete-confirm > span { font-size: 12px; }

  .timezone-banner { font-size: 12px; line-height: 1.6; padding: 11px 14px; }
  .timezone-banner > svg { width: 19px; height: 19px; flex-shrink: 0; }
  .calendar-toolbar { gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
  .calendar-nav { flex-wrap: wrap; gap: 8px; }
  .calendar-nav h2 { font-size: 21px; line-height: 1.35; }
  .calendar-toolbar .filter-tabs button { min-height: 40px; font-size: 13px; padding-inline: 14px; }
  .calendar-weekdays span { padding: 13px 12px; font-size: 13px; }
  .calendar-days > div { min-height: 142px; padding: 9px; }
  .day-number { width: 30px; height: 30px; font-size: 14px; margin-bottom: 7px; }
  .calendar-event, .calendar-grid--week .calendar-event {
    height: auto;
    min-height: 38px;
    padding: 7px;
    display: grid;
    grid-template-columns: 6px minmax(0, 1fr) 13px;
    align-items: start;
    align-content: start;
    gap: 3px 5px;
    border-radius: 7px;
  }
  .calendar-event i { grid-column: 1; grid-row: 1; margin-top: 5px; width: 6px; height: 6px; }
  .calendar-event small { grid-column: 2; grid-row: 1; font-size: 12px; font-weight: 600; line-height: 1.4; }
  .calendar-event span, .calendar-grid--week .calendar-event span {
    grid-column: 1 / -1;
    grid-row: 2;
    width: auto;
    font-size: 13px;
    line-height: 1.4;
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
  }
  .calendar-event > svg { grid-column: 3; grid-row: 1; width: 13px; height: 13px; margin-top: 2px; }
  .calendar-event:not(:has(small)) span { grid-row: 2; grid-column: 1 / -1; }
  .calendar-event:not(:has(small)) i { grid-row: 1; }
  .calendar-grid--week .calendar-days > div { min-height: 480px; }
  .more-events { font-size: 12px; line-height: 1.6; padding: 4px; }
  .calendar-list__item { min-height: 84px; grid-template-columns: 48px 10px minmax(0, 1fr) auto 100px; }
  .calendar-list__item strong { font-size: 15px; line-height: 1.5; white-space: normal; }
  .calendar-list__item small, .calendar-list__item > span:last-child { font-size: 12px; line-height: 1.6; }
  .calendar-detail__visibility, .calendar-detail__readonly p { font-size: 13px; }
  .attachment-panel h3 { font-size: 15px; }
  .attachment-panel header p, .attachment-security, .attachment-row__copy small { font-size: 12px; }
  .attachment-row__copy strong, .attachment-empty, .file-picker { font-size: 13px; }
  .file-picker { min-height: 46px; }
  .reminder-panel p, .reminder-list small, .reminder-empty { font-size: 12px; }
  .reminder-list strong, .reminder-detail p { font-size: 14px; }

  :root[data-theme=dark] .calendar-event--reminder { color: #d3b1fa; background: #332342; }
}

@media screen and (min-width: 901px) and (max-width: 1180px) {
  .topbar { gap: 10px; }
  .global-search kbd { display: none; }
  .student-row { grid-template-columns: 40px minmax(0, 1fr) 64px 64px minmax(90px, 120px) 18px; gap: 9px; }
  .student-hero-actions { width: 100%; justify-content: flex-start; }
  .info-layout--editor, .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-list article { grid-template-columns: 28px minmax(0, 1fr) auto auto; }
  .task-list article .visibility-cell { grid-column: 2; }
  .task-list article > span:last-child { grid-column: 4; grid-row: 1; }
  .calendar-nav h2 { font-size: 19px; }
  .calendar-grid { overflow-x: auto; }
  .calendar-weekdays, .calendar-days { min-width: 930px; }
  .calendar-days > div { padding: 6px; }
  .calendar-detail { grid-template-columns: minmax(0, 1fr) minmax(240px, .8fr); }
  .calendar-list__item { grid-template-columns: 46px 8px minmax(0, 1fr) auto; }
  .calendar-list__item > span:last-child { grid-column: 3; }
}
