/* Default (desktop): both controls are absent. */
.mobile-nav-toggle,
.mobile-nav-overlay {
  display: none;
}

@media (max-width: 1023px) {

  /* ── Hamburger, first item in the topbar ── */
  .mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    margin-right: 0.25rem;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg-surface);
    color: var(--color-text);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
  }

  .mobile-nav-toggle:hover {
    background: var(--color-bg-hover);
  }

  .mobile-nav-toggle:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
  }

  /* ── Off-canvas drawer ── */
  .app-layout .sidebar {
    /* Let the fixed top/bottom edges track Safari's changing tablet viewport. */
    height: auto;
    transform: translateX(-100%);
    transition: transform 0.24s var(--ease-out);
    z-index: var(--z-mobile-nav);
    box-shadow: none;
  }

  .app-layout.is-nav-open .sidebar {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  /* ── Scrim ── */
  .mobile-nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s var(--ease-out);
    z-index: var(--z-mobile-nav-overlay);
  }

  .app-layout.is-nav-open .mobile-nav-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  /* Lock the page behind the open drawer. */
  body.has-mobile-nav-open {
    overflow: hidden;
  }
}

/* Users who prefer reduced motion get the state change without the slide. */
@media (max-width: 1023px) and (prefers-reduced-motion: reduce) {

  .app-layout .sidebar,
  .mobile-nav-overlay {
    transition: none;
  }
}

@media (max-width: 1023px) {

  /* Reclaim the 256px (220px on Essay Manager) the sidebar used to reserve. */
  .main-content {
    margin-left: 0;
    min-width: 0;
    overflow-x: auto;
  }

  .page-content {
    min-width: 0;
  }

  .topbar {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .page-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (max-width: 767px) {

  .page-content {
    padding-top: 1rem;
    padding-bottom: 1.5rem;
  }
}

@media (max-width: 767px) {

  .p-student-documents-index .docs-layout {
    flex-direction: column;
  }

  .p-student-documents-index .docs-sidebar {
    width: 100%;
    max-width: none;
    max-height: none;
  }
  .p-student-documents-index .docs-main {
    width: 100%;
    max-height: none;
    overflow: visible;
  }
}

/* ── Responsive visibility ── */
.u-hide-mobile,
.u-hide-tablet,
.u-show-mobile,
.u-show-tablet {
  /* Defaults are desktop: "show-*" helpers are hidden until their breakpoint. */
}

.u-show-mobile,
.u-show-tablet {
  display: none;
}

@media (max-width: 1023px) {
  .u-hide-tablet { display: none !important; }
  .u-show-tablet { display: revert; }
}

@media (max-width: 767px) {
  .u-hide-mobile { display: none !important; }
  .u-show-mobile { display: revert; }
}

/* ── Stacking ──
   The single most common responsive need: a flex row that becomes a column. */
.u-stack-m,
.u-stack-t {
  min-width: 0;
}

@media (max-width: 1023px) {
  .u-stack-t {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 767px) {
  .u-stack-m {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ── Grid collapse ── */
@media (max-width: 1023px) {
  .u-grid-1-t { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .u-grid-1-m { grid-template-columns: 1fr; }
}

/* ── Wrapping ──
   For toolbars and filter bars that must not push the page sideways. */
@media (max-width: 1023px) {
  .u-wrap-t { flex-wrap: wrap; }
}

@media (max-width: 767px) {
  .u-wrap-m { flex-wrap: wrap; }
}

@media (max-width: 767px) {
  .u-full-m {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: 1 1 auto !important;
  }
}

@media (max-width: 1023px) {
  .u-full-t {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: 1 1 auto !important;
  }
}

.u-scroll-x {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.u-shrink {
  min-width: 0;
}

.u-break {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ── Text truncation ── */
.u-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

@media (max-width: 767px) {
  .u-nowrap-release-m { white-space: normal !important; }
}

/* ── Accessible-only text (there was no .sr-only class, only an inline block) ── */
.u-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Spacing release ──
   Desktop gaps and gutters that are too generous once the viewport narrows. */
@media (max-width: 767px) {
  .u-gap-sm-m { gap: 0.5rem !important; }
  .u-gap-md-m { gap: 0.75rem !important; }
  .u-pad-sm-m { padding: 0.75rem !important; }
  .u-mt-0-m   { margin-top: 0 !important; }
}

@media (max-width: 1023px) {
  .u-gap-sm-t { gap: 0.5rem !important; }
  .u-pad-sm-t { padding: 0.75rem !important; }
}

/* ── Alignment / ordering ── */
@media (max-width: 767px) {
  .u-align-start-m { align-items: flex-start !important; }
  .u-justify-start-m { justify-content: flex-start !important; }
  .u-text-left-m { text-align: left !important; }
  .u-order-first-m { order: -1; }
  .u-order-last-m  { order: 99; }
}

@media (max-width: 767px) {
  .u-block-m  { display: block !important; }
  .u-flex-m   { display: flex !important; }
  .u-static-m { position: static !important; }
}

@media (max-width: 1023px) {
  .u-block-t  { display: block !important; }
  .u-static-t { position: static !important; }
}

@media (max-width: 767px) {
  .u-auto-height-m {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
  }
}

@media (max-width: 1023px) {

  .dev-menu {
    gap: 0.375rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .dev-menu-buttons {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    min-width: 0;
  }

  .dev-menu-buttons::-webkit-scrollbar {
    display: none;
  }

  .dev-menu-btn,
  .dev-menu-buttons .button_to {
    flex-shrink: 0;
  }
  .dev-menu-current-user svg {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
  }

  .dev-menu-user-switcher {
    flex-shrink: 0;
  }
}

@media (max-width: 1023px) {
  .page-content>*,
  .page-content>*>*,
  .page-content>*>*>* {
    max-width: 100%;
    min-width: 0;
  }

  .c-table-scroll,
  .c-table-responsive,
  .u-scroll-x {
    min-width: 0;
    max-width: 100%;
  }

  .wf-tracker {
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 767px) {

  .wf-step {
    min-width: 4.5rem;
  }

  /* ── Detail / summary grids that assume a wide canvas ── */
  .detail-grid,
  .card-grid,
  .mc-detail-grid,
  .dash-top-row {
    grid-template-columns: 1fr;
  }

  /* ── Toolbars and filter rows ── */
  .toolbar,
  .filter-bar,
  .c-toolbar {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .p-student-documents-index .docs-main {
    min-width: 0;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .p-student-documents-index .docs-sidebar {
    width: 260px;
  }
}

@media (max-width: 767px) {

  .btn-impersonate {
    white-space: normal;
    overflow-wrap: anywhere;
    max-width: 100%;
    text-align: left;
  }

  .impersonate-zone {
    flex-direction: column;
    align-items: stretch;
  }

  .impersonate-zone .btn-impersonate {
    width: 100%;
  }
}

@media (min-width: 768px) and (max-width: 1023px), (min-width: 1024px) and (hover: none) and (pointer: coarse) {
  .impersonate-zone {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-impersonate {
    white-space: normal;
    overflow-wrap: anywhere;
    max-width: 100%;
    text-align: left;
  }
}


@media (max-width: 767px) {

  .p-student-documents-index .docs-list-item {
    flex-wrap: wrap;
    align-items: flex-start;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .p-student-documents-index .docs-item-actions {
    flex-basis: 100%;
    justify-content: flex-end;
  }
  .p-student-documents-index .docs-layout {
    margin-left: -1rem;
    margin-right: -1rem;
    max-width: none;
  }
}


@media (max-width: 767px) {
  .p-student-messages-index .c-thread-preview {
    display: block;
  }
}


@media (max-width: 767px) {
  .p-student-school-selections-index .school-card-header {
    flex-wrap: wrap;
  }

  .p-student-school-selections-index .school-card-meta {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 0.375rem;
  }
  .p-student-school-selections-index .school-status-tracker {
    padding-left: 20px;
    padding-right: 20px;
  }

  .p-student-school-selections-index .school-status-label {
    left: 12px;
  }
  .p-student-school-selections-index .x-student-school-selections-index-2.x-student-school-selections-index-2 {
    flex: 1 1 100%;
    width: 100%;
  }
}


@media (max-width: 767px) {
  .p-student-profiles-show .page-content {
    overflow-y: visible;
  }

  /* Sit comfortably above the bottom edge rather than flush against it. */
  .p-student-profiles-show .x-student-profiles-show-1 {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 1023px), (hover: none) and (pointer: coarse) {
  .p-student-profiles-show .c-form-grid > .c-form-group:has(> select[data-controller~="select2"]) {
    grid-column: 1 / -1;
  }

  .p-student-profiles-show .select2-container .select2-selection--single .select2-selection__clear {
    margin-right: 0;
  }

  .p-student-profiles-show .select2-container .select2-selection--single {
    height: auto;
    min-height: 2.25rem;
  }

  .p-student-profiles-show .select2-container .select2-selection--single .select2-selection__rendered {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    white-space: normal;
    overflow-wrap: anywhere;
    text-overflow: clip;
  }

  .p-student-profiles-show .select2-container--open .select2-selection--single:has(.select2-search__field.has-selection:placeholder-shown) .select2-selection__rendered {
    visibility: visible;
  }

  .p-student-profiles-show .select2-container--open .select2-selection--single:has(.select2-search__field.has-selection:placeholder-shown) .select2-search__field::placeholder {
    color: transparent;
  }
}


@media (max-width: 767px) {

  .p-admin-users-index .search-form,
  .p-admin-users-invitations .search-form {
    flex-wrap: wrap;
  }

  .p-admin-users-index .search-field-group,
  .p-admin-users-invitations .search-field-group {
    flex-basis: 100%;
  }

  .p-admin-users-index .search-input,
  .p-admin-users-invitations .search-input {
    width: 100%;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .p-admin-users-invitations .search-field-group {
    min-width: auto;
  }

  .p-admin-users-invitations .filter-select {
    max-width: 180px;
  }
}


@media (max-width: 1023px) {

  .p-admin-resources-index .admin-table th {
    overflow-wrap: normal;
    word-break: normal;
  }
}


@media (max-width: 767px) {
  .p-student-essays-show .admin-section-header {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  .p-student-essays-show .essay-focus-btn {
    margin-left: 0.5rem;
    margin-right: 0;
  }

  .p-student-essays-show .admin-section-header > div {
    flex-basis: 100%;
  }
}


@media (max-width: 767px) {
  .p-admin-schools-show .verified-badge {
    display: inline-block;
    max-width: 100%;
    border-radius: var(--radius-md);
    padding: 0.375rem 0.625rem;
    line-height: 1.4;
  }
}


@media (max-width: 767px) {

  .p-counselor-students-index .c-saved-views {
    margin-left: 0;
    max-width: 100%;
  }
   .p-counselor-students-index .search-field-group {
    flex-basis: 100%;
    width: 100%;
  }

  .p-counselor-students-index .search-field-group input.search-input {
    width: 100%;
  }
}


@media (max-width: 767px) {

  .p-essay-specialist-essays-show .x-essay-specialist-essays-show-1 {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  .p-essay-specialist-essays-show .x-essay-specialist-essays-show-1 > div:first-child {
    flex-basis: 100%;
  }

  .p-student-essays-show .x-student-essays-show-1 {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  .p-student-essays-show .x-student-essays-show-2 {
    flex-basis: 100%;
  }

  .p-student-essays-show .essay-header-actions {
    justify-content: flex-start;
  }

  .p-essay-manager-essays-show .x-essay-manager-essays-show-1 {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  .p-essay-manager-essays-show .x-essay-manager-essays-show-1 > div:first-child {
    flex-basis: 100%;
  }

  .p-essay-manager-essays-show .x-essay-manager-essays-show-2 {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .p-essay-manager-essays-show .x-essay-manager-essays-show-2 form.button_to .c-btn {
    display: flex;
  }
}


@media (max-width: 767px) {

  .p-essay-manager-students-index .c-table-scroll .c-table {
    min-width: 760px;
  }
}


@media (max-width: 767px) {

  .c-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .c-tabs::-webkit-scrollbar {
    display: none;
  }

  .c-tab {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

@media (max-width: 1023px) {
  .p-counselor-students-show .c-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: none;
    scrollbar-width: none;
  }

  .p-counselor-students-show .c-tabs::-webkit-scrollbar {
    display: none;
  }

  .p-counselor-students-show .c-tab {
    flex-shrink: 0;
    white-space: nowrap;
  }
}


@media (max-width: 767px) {
  .p-counselor-essays-show .x-counselor-essays-show-1 {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  .p-counselor-essays-show .x-counselor-essays-show-1 > div:first-child {
    flex-basis: 100%;
  }

  .p-counselor-essays-show .x-counselor-essays-show-3 {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .p-counselor-essays-show .x-counselor-essays-show-3 .c-btn,
  .p-counselor-essays-show .x-counselor-essays-show-3 form.button_to {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .p-counselor-essays-show .x-counselor-essays-show-3 form.button_to .c-btn {
    display: flex;
  }
}

@media (min-width: 768px) {
  .p-counselor-essays-show .x-counselor-essays-show-1 {
    column-gap: 1rem;
  }

  .p-counselor-essays-show .x-counselor-essays-show-3 {
    flex-shrink: 0;
  }

  .p-counselor-essays-show .x-counselor-essays-show-3 .c-btn {
    white-space: nowrap;
  }
}


@media (min-width: 1024px) {
  .resource-hero {
    max-width: 604px;
    margin-inline: auto;
  }

  .resource-hero-img {
    aspect-ratio: 16 / 9;
  }
}


@media (min-width: 768px) {
  .p-student-documents-index .docs-sidebar {
    flex-shrink: 0;
  }
}


@media (min-width: 768px) and (max-width: 1023px) {
  .p-student-documents-index .docs-layout {
    margin-left: -1rem;
    margin-right: -1rem;
    max-width: none;
  }
}

@media (max-width: 767px) {

  .account-section {
    width: 100%;
    min-width: 0;
  }

  .integrations-copy {
    flex-basis: 100%;
  }

  .integrations-row > .c-btn,
  .integrations-row > form.button_to,
  .integrations-row > form.button_to .c-btn {
    width: 100%;
    justify-content: center;
    min-height: 2.75rem;
  }

  .booking-hours-field {
    min-width: 0;
    width: 100%;
  }

  /* One card-ish block per day, separated so seven of them stay readable. */
  .booking-hours-grid {
    gap: 0;
  }

  .booking-hours-day {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 0.875rem 0;
    border-top: 1px solid var(--color-border-subtle);
  }

  .booking-hours-day:first-child {
    border-top: 0;
    padding-top: 0;
  }

  .booking-hours-day-label {
    padding-top: 0;
  }

  .booking-hours-ranges {
    gap: 0.75rem;
  }

  .booking-hours-range {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.5rem;
    align-items: center;
  }

  .booking-hours-range > .c-btn {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .booking-hours-day > .c-btn {
    justify-self: start;
  }

  .booking-hours-day-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .booking-hours-day .c-btn-xs {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    min-height: 2rem;
  }

  .booking-hours-form .c-input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    font-size: 16px;
    font-family: inherit;
    line-height: 1.375;
    min-height: 2.75rem;
    padding: 0.5rem 0.625rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background-color: var(--color-bg);
    color: var(--color-text);
  }

  /* Drop iOS's native time chrome so the field sizes from the box above. */
  .booking-hours-form input[type="time"].c-input {
    -webkit-appearance: none;
    appearance: none;
    text-align: left;
  }

  /* iOS Safari right-aligns the value in its own shadow element. */
  .booking-hours-form input[type="time"].c-input::-webkit-date-and-time-value {
    text-align: left;
    margin: 0;
  }

  .booking-hours-form input[type="time"].c-input::-webkit-calendar-picker-indicator {
    display: none;
  }

  .booking-hours-actions .c-btn,
  .booking-hours-actions input[type="submit"] {
    width: 100%;
    justify-content: center;
    min-height: 2.75rem;
  }
}

@media (max-width: 1023px) {
  .p-counselor-essays-index .c-table td:nth-child(1) {
    white-space: nowrap;
  }
}

@media (max-width: 1023px) {
  .p-counselor-strategy-reports-show .c-student-header {
    flex-wrap: wrap;
    row-gap: 0.75rem;
  }

  .p-counselor-strategy-reports-show .x-counselor-strategy-reports-show-1 {
    flex: 1 1 10rem;
    min-width: 0;
  }

  .p-counselor-strategy-reports-show .c-student-header > .c-badge {
    max-width: 100%;
    white-space: normal;
  }
}

@media (max-width: 1023px) {
  .p-counselor-dashboard-show .staff-welcome-stats,
  .p-essay-specialist-dashboard-show .staff-welcome-stats {
    align-items: flex-start;
  }

  .p-counselor-dashboard-show .staff-stats-divider,
  .p-essay-specialist-dashboard-show .staff-stats-divider {
    align-self: center;
  }
}

@media (max-width: 767px) {
  .p-counselor-dashboard-show .staff-stat,
  .p-essay-specialist-dashboard-show .staff-stat {
    flex: 1 1 0;
    min-width: 0;
  }
}

@supports (-webkit-touch-callout: none) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]),
  select,
  textarea,
  [contenteditable="true"] {
    font-size: 16px !important;
  }

  .x-shared-essay-notes-2 input[type="radio"] {
    width: auto;
    padding: 0;
    flex-shrink: 0;
  }

  .booking-hours-form input[type="time"][value=""]::before {
    content: "--:-- --";
    white-space: nowrap;
  }
}

@media (max-width: 1023px) {
  .l-app .dev-menu ~ .app-layout .main-content {
    height: 100%;
    min-height: 0;
  }
}

@media (max-width: 1023px) {
  .p-essay-specialist-dashboard-show .student-group-header {
    flex-wrap: wrap;
  }

  .p-essay-specialist-dashboard-show .student-group-meta {
    flex-wrap: wrap;
    white-space: nowrap;
  }
}

@media (max-width: 767px) {
  .p-essay-specialist-dashboard-show .student-group-name {
    flex: 1;
    min-width: 0;
  }

  .p-essay-specialist-dashboard-show .student-group-meta {
    flex-basis: 100%;
    padding-left: 4rem;
  }
}

@media (max-width: 767px) {
  .team-bar-members {
    flex: 0 0 calc(100% + 2rem);
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-bottom: 0.5rem;
  }

  .team-bar-members::after {
    content: "";
    flex: 0 0 1px;
  }
}

@media (max-width: 1023px), (hover: none) and (pointer: coarse) {
  .p-admin-tags-index .rt-table-scroll {
    padding-bottom: 0.5rem;
    overscroll-behavior: none;
  }

  .p-admin-tags-index .rt-table {
    min-width: 0;
  }

  .p-admin-tags-index .rt-table td.rt-col-tag {
    min-width: 0;
  }

  .p-admin-tags-index .rt-table th.rt-col-count,
  .p-admin-tags-index .rt-table td.rt-col-count {
    width: auto;
  }

  .p-admin-tags-index .rt-table thead th,
  .p-admin-tags-index .rt-table td {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

@media (max-width: 767px) {
  .p-student-documents-index .docs-folder-nav {
    padding-bottom: 0.75rem;
  }

  .p-student-documents-index .docs-sidebar-actions {
    display: flex;
    position: static;
    margin-top: 0;
    box-shadow: none;
  }

  .p-student-documents-index .docs-sidebar-actions .btn {
    flex: 1 1 auto;
    width: auto;
  }
}

@media (max-width: 767px) {
  .l-app .page-content {
    padding-bottom: 6rem;
  }
}

@supports (-webkit-touch-callout: none) {
  @media (min-width: 768px) {
    .p-student-documents-index .docs-folder-sort-select {
      width: calc(100% + 1rem);
      margin-left: -0.5rem;
      margin-right: -0.5rem;
    }
  }
}

@media (max-width: 1023px), (hover: none) and (pointer: coarse) {
  .p-admin-resources-index .x-admin-resources-index-9 {
    width: 88px;
  }

  .p-admin-resources-index .x-admin-resources-index-10 {
    width: 140px;
  }

  .p-admin-resources-index .x-admin-resources-index-18 {
    flex-wrap: nowrap;
  }

  .p-admin-resources-index .x-admin-resources-index-3 {
    table-layout: auto;
  }

  .p-admin-resources-index .x-admin-resources-index-11 {
    width: 200px;
  }

  .p-admin-resources-index .x-admin-resources-index-13 {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .p-admin-resources-index .x-admin-resources-index-14,
  .p-admin-resources-index .x-admin-resources-index-15 {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
  }
}

@media (max-width: 62em) {
  #user-profile .cl-profileSectionItem__danger,
  #user-profile .cl-profileSectionPrimaryButton__danger {
    padding-left: 0;
  }
}

@media (max-width: 48em), (hover: none) and (pointer: coarse) {
  #user-profile .cl-cardBox {
    height: auto;
  }

  #user-profile .cl-pageScrollBox {
    height: auto;
    overflow-y: visible;
  }
}

@supports (-webkit-touch-callout: none) {
  @media (min-width: 768px) {
    .p-student-school-selections-index .x-student-school-selections-index-2.x-student-school-selections-index-2 {
      flex: 0 0 220px;
      width: 220px;
    }

    .p-student-school-selections-index .x-student-school-selections-index-9.x-student-school-selections-index-9 {
      flex: 0 0 300px;
      width: 300px;
    }

    .p-student-school-selections-index .x-student-school-selections-index-10.x-student-school-selections-index-10 {
      flex: 0 0 310px;
      width: 310px;
    }
  }
}

@media (min-width: 768px) and (max-width: 1023px), (min-width: 1024px) and (hover: none) and (pointer: coarse) {
  .p-student-essays-show .admin-section-header {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  .p-student-essays-show .essay-focus-btn {
    margin-left: 0.5rem;
    margin-right: 0;
  }

  .p-student-essays-show .essay-focus-btn svg {
    flex-shrink: 0;
  }

  .p-student-essays-show .admin-section-header > div {
    flex-basis: 100%;
  }
}

@supports (-webkit-touch-callout: none) {
  @media (min-width: 768px) {
    .p-student-profiles-show .x-student-profiles-show-1 input[type="submit"].c-btn {
      -webkit-appearance: none;
      appearance: none;
    }

    .p-student-profiles-show .c-form-grid:has(input[type="email"]) {
      grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr);
    }

    .p-student-profiles-show .c-form-grid:has(input[type="email"]):has(select[data-controller~="select2"]) {
      grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    }
  }
}

@media (min-width: 768px) and (max-width: 1023px), (min-width: 1024px) and (hover: none) and (pointer: coarse) {
  .p-student-school-selections-index .school-prompt-essay .school-prompt-meta {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

.p-admin-users-show .admin-section-header {
  flex-wrap: wrap;
  row-gap: 0.25rem;
  column-gap: 0.75rem;
}

@supports (-webkit-touch-callout: none) {
  @media (min-width: 768px) {
    .p-admin-users-show .detail-grid:has(input[name="student_profile[welcome_call_booking_url]"]),
    .p-admin-users-show .detail-grid:has(input[name$="_parent_email]"]) {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .p-admin-users-show .detail-grid:has(input[name="student_profile[welcome_call_booking_url]"]) > .detail-item:has(> input[name="student_profile[welcome_call_booking_url]"]),
    .p-admin-users-show .detail-grid:has(input[name="student_profile[welcome_call_booking_url]"]) > .detail-item:has(> select[data-controller~="select2"]),
    .p-admin-users-show .detail-grid:has(input[name$="_parent_email]"]) > .detail-item:has(> select[data-controller~="select2"]) {
      grid-column: 1 / -1;
    }

    .p-admin-users-show input[name="student_profile[welcome_call_booking_url]"] {
      max-width: none;
    }
  }
}

@supports (-webkit-touch-callout: none) {
  @media (min-width: 768px) {
    html:has(.l-app.p-student-resources-index),
    body.l-app.p-student-resources-index {
      height: auto;
    }

    .l-app.p-student-resources-index .app-layout {
      height: auto;
      min-height: 100vh;
      min-height: 100dvh;
      overflow: visible;
    }

    .l-app.p-student-resources-index .main-content {
      height: auto;
      min-height: 100vh;
      min-height: 100dvh;
      overflow: visible;
    }
  }
}

@media (hover: none) and (pointer: coarse) {
  .l-app .main-content:has(:where(.docs-upload-modal.is-open, dialog[open])) {
    overflow: hidden;
  }
}
