@media screen {
  .aw-dashboard, .tp-shell, .student-portal {
    --portal-navy: #0c2b44;
    --portal-teal: #176365;
    --portal-ink: #163a52;
    --portal-muted: #455e73;
    --portal-line: #d6e2ea;
    --portal-surface: #f2f7fa;
    --portal-gold: #a47828;
    --portal-radius: 16px;
    --portal-shadow: 0 4px 18px rgba(12, 43, 68, .06);
  }

  .aw-dashboard :focus-visible, .tp-shell :focus-visible, .student-portal :focus-visible {
    outline: 3px solid var(--portal-gold);
    outline-offset: 2px;
  }

  .aw-dashboard .aw-masthead, .tp-shell .tp-header, .student-portal .site-header {
    border-block-start: 3px solid var(--portal-teal);
    box-shadow: var(--portal-shadow);
  }

  .aw-dashboard .top, .tp-shell .th-hero, .student-portal .welcome {
    background: linear-gradient(128deg, var(--portal-navy), #16485e 74%, var(--portal-teal));
    border-radius: var(--portal-radius);
  }

  .aw-dashboard .top .meta, .tp-shell .tp-brand > div,
  .student-portal .identity > div, .student-portal .welcome-main {
    min-inline-size: 0;
    overflow-wrap: anywhere;
  }

  .aw-dashboard .aw-identity > div { min-inline-size: 0; }
  .aw-dashboard .aw-identity strong { white-space: normal; }
  .aw-dashboard .aw-breadcrumbs { flex-wrap: wrap; }
  .aw-dashboard .aw-account > * { max-inline-size: 100%; }
  .aw-dashboard .aw-account > * > span { overflow-wrap: anywhere; }

  .aw-dashboard .aw-quicklinks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
    gap: .55rem;
    min-inline-size: 0;
  }

  .aw-dashboard .aw-quicklinks a {
    justify-content: flex-start;
    white-space: normal;
    text-align: start;
    line-height: 1.4;
  }

  .aw-dashboard .aw-category-tabs {
    flex-wrap: wrap;
    gap: .45rem;
  }

  .aw-dashboard .aw-tab-btn {
    white-space: normal;
    min-block-size: 44px;
    text-align: start;
  }

  .aw-dashboard .aw-service-card, .aw-dashboard .aw-kpi-card,
  .tp-shell .tp-card, .tp-shell .th-course,
  .student-portal .stat-card, .student-portal .service-card {
    border-color: var(--portal-line);
    box-shadow: var(--portal-shadow);
  }

  .tp-shell .tp-card:hover, .student-portal .stat-card:hover {
    transform: none;
  }

  .tp-shell .th-code, .tp-shell .th-meta, .student-portal .service-body small {
    color: var(--portal-muted);
  }

  .tp-shell .th-actions { background: var(--portal-surface); }
  .tp-shell .th-action, .tp-shell .tp-nav a { min-block-size: 44px; }
  .tp-shell .th-action svg, .tp-shell .tp-card h2::before { flex-shrink: 0; }
  .tp-shell .th-action span { overflow-wrap: anywhere; }

  .tp-shell .table-wrap { scrollbar-gutter: stable; }
  .tp-shell .tp-table thead th { background: #eaf2f7; color: var(--portal-ink); }
  .tp-shell .tp-table tbody tr:nth-child(even) { background: #f8fbfd; }
  .tp-shell .tp-table tbody tr:focus-within { background: #eef6fb; }
  .tp-shell .tp-table bdi { white-space: nowrap; font-variant-numeric: tabular-nums; }
  .tp-shell .tp-form select, .tp-shell .tp-table select { max-inline-size: 100%; }
  .tp-shell .tp-table input:not([type=checkbox]), .tp-shell .tp-table select {
    min-block-size: 40px;
  }

  .student-portal .welcome h1 { color: #fff; }
  .student-portal .welcome .eyebrow {
    color: #f6e1ab;
    background: transparent;
    border-color: transparent;
    padding-inline: 0;
  }
  .student-portal .welcome .pill {
    color: #fff;
    background: #ffffff14;
    border-color: #ffffff42;
  }
  .student-portal .welcome .pill bdi { color: inherit; }
  .student-portal .current-term-card {
    min-inline-size: min(100%, 15rem);
    border-inline-start: 4px solid #c39a48;
  }
  .student-portal .stat-card .value { flex-wrap: wrap; }
  .student-portal .service-body { min-inline-size: 0; overflow-wrap: anywhere; }
  .student-portal .section-header h2 { padding-inline-start: .65rem; border-inline-start: 3px solid var(--portal-gold); }
  .student-portal .main-services > section { scroll-margin-block-start: 105px; }

  @media (max-width: 1024px) {
    .aw-dashboard .aw-masthead {
      flex-direction: column;
      align-items: stretch;
      gap: .65rem;
      padding: .8rem;
      border-radius: var(--portal-radius);
      background: #fff;
    }
    .aw-dashboard .aw-account { justify-content: flex-start; gap: .45rem; }
  }

  @media (max-width: 768px) {
    .aw-dashboard .aw-quicklinks {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      width: 100%;
    }
    .aw-dashboard .aw-quicklinks a { width: 100%; min-inline-size: 0; padding-inline: .55rem; overflow-wrap: anywhere; }
    .aw-dashboard .aw-tab-btn { max-inline-size: 100%; }
    .tp-shell .tp-card { padding-inline: clamp(10px, 3vw, 20px); }
    .tp-shell .tp-table input:not([type=checkbox]), .tp-shell .tp-table select { min-block-size: 44px; font-size: 16px; }
    .tp-shell .tp-table[data-cards] tr { align-items: start; }
    .student-portal .header-inner { gap: 8px; padding-inline: 14px; }
    .student-portal .identity { flex: 1; min-inline-size: 0; }
    .student-portal .identity-mark { flex-shrink: 0; }
    .student-portal .stat-card { padding: .8rem; }
    .student-portal .stat-card .value small { flex-basis: 100%; }
  }

  @media (max-width: 520px) {
    .tp-shell .th-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tp-shell .th-action { justify-content: flex-start; padding-inline: .55rem; text-align: start; }
    .student-portal .welcome { padding: 1rem; gap: 1rem; }
    .student-portal .header-inner { flex-wrap: nowrap; }
    .student-portal .identity strong { font-size: .88rem; }
    .student-portal .logout { flex-shrink: 0; min-block-size: 44px; padding-inline: .65rem; }
  }
}
