/* MyCodexes — taste-skill v2 overrides, 27 October 2026.
   Loaded after the Vite bundle and the shared frame styles. The bundle (index-*.css/js) is not edited;
   every change here is presentation only: no IDs, links, labels or behaviour change.
   Tokens follow DESIGN.md: paper ground, white surface one tone step up, #f1efe7 band instead of hairlines,
   brand relief (left + bottom, no blur) on cards, flat pill buttons, type scale 13 / 14 / 16 / 24 / 32 / 44. */

.app-shell {
  --mcx-surface: #ffffff;
  --mcx-band: #f1efe7;
  --mcx-neutral: #ebebe7;          /* neutral control track (segmented control, kbd) */
  --mcx-field: #8b9d91;            /* control boundary, >= 3:1 on paper */
  --mcx-relief: -4px 4px 0 rgba(22, 43, 39, .10);  /* brand relief: left + bottom, no blur */
  --mcx-ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- Bars: tone-step bands, no hairlines, no blur, no shadow ---------- */
body.codex-framed .app-shell > header.codex-frame-head {
  background: var(--mcx-band) !important;
  border-bottom: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
body.codex-framed .app-shell > footer.codex-frame-foot {
  background: var(--mcx-band) !important;
  border-top: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  font-size: 14px !important;
}
body.codex-framed .app-shell > .mobile-nav {
  background: var(--mcx-band) !important;
  border-top: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.app-shell .workspace-nav { border-bottom: 0; }
.app-shell .library-strip { border-top: 0; }
.app-shell .modal::backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; }

/* ---------- Brand wordmark: codex emphasis kept (colour + heavier stroke), no text-shadow ---------- */
.app-shell .brand > span { font-size: 32px; }
.app-shell .brand > .brand-name .brand-codex,
.app-shell .brand > span > .brand-name .brand-codex {
  font-size: 1em;
  text-shadow: none;
  -webkit-text-stroke: .45px currentColor;
}
.app-shell .brand small { font-size: 13px; letter-spacing: .02em; margin-top: 6px; }
.app-shell .brand small .brand-name { letter-spacing: .01em; }

/* ---------- Header controls ---------- */
.app-shell .track-picker select,
.app-shell .track-picker select:hover,
.app-shell .track-picker select:focus-visible {
  background: var(--mcx-surface);
  box-shadow: none;
  border: 1.5px solid var(--mcx-field);
  font-size: 14px;
  font-weight: 700;
}
.app-shell .track-picker select:hover { border-color: var(--track); }
.app-shell .header-actions .search-trigger,
.app-shell .updates-trigger { font-size: 14px; }
.app-shell .search-trigger kbd {
  font: 600 13px/1 Manrope, sans-serif;
  color: #4f5f59;                 /* 5.9:1 on the neutral chip */
  background: var(--mcx-neutral);
  border: 0;
  padding: 5px 7px;
}
.app-shell .updates-count {
  font-size: 13px;
  min-width: 22px;
  height: 22px;
  box-shadow: none;
  border: 2px solid var(--mcx-band);
  animation-name: mcx-badge;
}
.app-shell .avatar {
  background: transparent;
  border: 1.5px solid var(--mcx-field);
}
.app-shell .codex-pulse-dot { animation-name: mcx-dot; }
@keyframes mcx-badge { 0%, to { transform: scale(1); opacity: .85 } 50% { transform: scale(1.12); opacity: 1 } }
@keyframes mcx-dot { 0%, to { transform: scale(.45); opacity: .7 } 50% { transform: scale(1.2); opacity: 1 } }

/* ---------- Workspace tabs ---------- */
.app-shell .tabs button { font-size: 14px; transition: color .16s; }
.app-shell .tabs button:hover { color: var(--track); }
.app-shell .count { font-size: 13px; background: var(--mcx-neutral); }
.app-shell .program-link { font-size: 14px; }

/* ---------- Title row ---------- */
.app-shell .section-heading .eyebrow,
.app-shell .hub-center .eyebrow,
.app-shell .panel-label .eyebrow,
.app-shell .library-strip .eyebrow,
.app-shell .topic-panel .eyebrow { display: none; }
/* any remaining group label (search results, dialogs) reads as sentence case at a readable size */
.app-shell .eyebrow { font-size: 13px; letter-spacing: 0; text-transform: lowercase; color: var(--muted); font-weight: 600; }
.app-shell .eyebrow::first-letter { text-transform: uppercase; }

.app-shell .section-heading h1 { font-size: 32px; line-height: 1.1; letter-spacing: -.01em; margin-top: 0; }
.app-shell .view-switch,
.app-shell .section-heading .view-switch {
  background: var(--mcx-neutral);
  border: 0;
  box-shadow: none;
  padding: 3px;
  border-radius: 999px;
}
.app-shell .view-switch button {
  border-radius: 999px;
  color: var(--ink);
  transition: background .16s, transform .12s;
}
.app-shell .view-switch button[aria-pressed=true] {
  background: var(--mcx-surface);
  color: var(--track);
  box-shadow: none;
}
.app-shell .cx-topic-entry {
  background: var(--mcx-surface);
  border: 1.5px solid var(--mcx-field);
  font-size: 16px;
  color: var(--ink);
  transition: border-color .16s, transform .12s;
}
.app-shell .cx-topic-entry:hover { border-color: var(--track); box-shadow: none; }
.app-shell .cx-topic-entry:active { transform: translateY(1px); }

/* ---------- Connected library (the orbit): tone discs instead of 1px rings ---------- */
.app-shell .orbit { border: 0; }
.app-shell .orbit.outer { background: var(--mcx-band); }
.app-shell .orbit.inner { background: #f8f6f0; }
.app-shell .center-divider { display: none; }
.app-shell .hub-center h2 em { font-style: normal; color: inherit; }
.app-shell .hub-center > p:not(.eyebrow) { font-size: 16px; line-height: 1.6; color: var(--ink); }
.app-shell .selected-format { font-size: 14px; margin-top: 18px; }
.app-shell .orbit-controls > span { display: none; } /* helper line: the arrows carry "Previous/Next study format" names */
.app-shell .icon-button { transition: background .16s, transform .12s; }
.app-shell .orbit-controls .icon-button { border: 1.5px solid var(--mcx-field); width: 40px; height: 40px; }

.app-shell .product-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -.01em;
  line-height: 1.1;
}
.app-shell .product-kind { font-size: 14px; letter-spacing: 0; line-height: 1.3; color: var(--ink); }

/* selected / previewed format: a tone step and a 2px inset ring, no drop shadow */
.app-shell .product-node.selected .product-select,
.app-shell .product-node.preview-open .product-select,
.app-shell .arrival-card.is-selected {
  background: var(--track-wash);
  box-shadow: inset 0 0 0 2px var(--track-border);
}
.app-shell .product-node.preview-open .product-art { filter: none; }
.app-shell .save-node,
.app-shell .list-library .save-node { background: transparent; transition: opacity .16s, transform .12s; }

/* book covers: flat object, no blurred drop shadow, flat page edges */
.app-shell .book-object { filter: none; }
.app-shell .book-object img { box-shadow: none; }
.app-shell .book-object::before { background: #ece8db; }
.app-shell .book-object::after { background: #e4dfd0; }
.app-shell .product-node.qbook .product-art img,
.app-shell .product-node.review .product-art img { box-shadow: none; }

/* image-bank plates: flat dark mount, no gradient, no shadow */
.app-shell .image-plate { background: #1b2023; box-shadow: none; }

/* Desktop orbit: covers and interface shots large enough to read as pictures */
@media (min-width: 1101px) {
  /* title row: the question, its search field and the view switch share one line */
  .app-shell main { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 40px; align-items: center; }
  .app-shell main > * { grid-column: 1 / -1; }
  .app-shell main > .section-heading { display: contents; }
  .app-shell main > .section-heading > div:first-child { grid-column: 1; grid-row: 1; }
  .app-shell main > .section-heading > .view-switch { grid-column: 3; grid-row: 1; }
  .app-shell main > .cx-topic-entry { grid-column: 2; grid-row: 1; margin: 0; width: min(560px, 100%); justify-self: start; }
  .app-shell main > .hub-layout,
  .app-shell main > .library-strip { grid-column: 1 / -1; }
  .app-shell main > .hub-layout { margin-top: 28px; }
  .app-shell .connected-library { height: 740px; }
  .app-shell .orbit, .app-shell .hub-center { top: 50%; }
  .app-shell .hub-center { width: 420px; }
  .app-shell .hub-center h2 { font-size: 68px; line-height: 1; letter-spacing: -.025em; margin-top: 0; }
  /* one pair of outer margins: bars, canvas and legal notice all sit on the 50px gutter */
  body.codex-framed .app-shell > header.codex-frame-head { padding-inline: 50px; }
  body.codex-framed .app-shell > footer.codex-frame-foot { padding-left: 50px !important; padding-right: 50px !important; }
  .app-shell main { max-width: none; }
  .app-shell .legal-notice { max-width: none; padding-left: 50px; padding-right: 50px; }
  .app-shell .connected-library .product-node { width: 204px; }
  .app-shell .connected-library .product-node.qbook { --x: 50% !important; --y: 16.5% !important; }
  .app-shell .connected-library .product-node.visual-companion { --x: 18.4% !important; --y: 29% !important; }
  .app-shell .connected-library .product-node.image-bank { --x: 81.6% !important; --y: 29% !important; }
  .app-shell .connected-library .product-node.qbank { --x: 18.4% !important; --y: 70% !important; }
  .app-shell .connected-library .product-node.review { --x: 81.6% !important; --y: 69% !important; }
  .app-shell .connected-library .product-node.audio-notes { --x: 50% !important; --y: 86.5% !important; }
  .app-shell .connected-library .product-node.qbook .product-art,
  .app-shell .connected-library .product-node.review .product-art { width: 184px; height: 178px; }
  .app-shell .connected-library .product-art .book-object { width: 126px; }
  .app-shell .connected-library .product-node.visual-companion .product-art,
  .app-shell .connected-library .product-node.qbank .product-art { width: 188px; height: 140px; }
  .app-shell .connected-library .product-node.audio-notes .product-art { width: 164px; height: 124px; }
  .app-shell .connected-library .product-node.image-bank .product-art { width: 150px; height: 124px; }
  .app-shell .orbit-controls { bottom: -46px; }
  .app-shell .study-sidebar { padding-top: 8px; }
  .app-shell .study-sidebar .selected-panel { height: 560px; }
}

/* ---------- Detail panel: white surface + brand relief, no lines ---------- */
.app-shell .study-sidebar .selected-panel {
  background: var(--mcx-surface);
  border: 0;
  border-radius: 16px;
  box-shadow: var(--mcx-relief);
}
.app-shell .selected-panel-scroll {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.app-shell .selected-panel-scroll > * { align-self: stretch; }
.app-shell .selected-panel-scroll > .contents-link,
.app-shell .selected-panel-scroll > .artwork-credits { align-self: flex-start; }
.app-shell .selected-panel-scroll > .panel-label { position: absolute; top: 14px; right: 18px; z-index: 1; }
.app-shell .selected-panel-scroll > #product-detail-title { order: -2; margin-top: 0; padding-right: 44px; }
.app-shell .selected-panel-scroll > .format-kind { order: -1; margin-top: 6px; }
.app-shell .selected-panel h2 { font-size: 32px; line-height: 1.1; letter-spacing: -.01em; }
.app-shell .format-kind { font-size: 14px; color: var(--muted); }
.app-shell .panel-description { font-size: 16px; line-height: 1.6; color: var(--ink); }
.app-shell .preview-meta { font-size: 14px; }
.app-shell .preview-items { border-top: 0; }
.app-shell .preview-items > a,
.app-shell .preview-items > div {
  border-bottom: 0;
  border-radius: 10px;
  padding: 10px 8px;
  margin: 0 -8px 2px;
  transition: background .16s;
}
.app-shell .preview-item-number { display: none; }
.app-shell .preview-items strong,
.app-shell .selected-panel .preview-items strong { font-size: 14px; }
.app-shell .preview-items small { font-size: 13px; }
.app-shell .preview-note,
.app-shell .availability-note { font-size: 14px; }
.app-shell .availability-note { border: 0; }
.app-shell .contents-link { font-size: 14px; }
.app-shell .format-note { font-size: 14px; color: var(--muted); }
.app-shell .artwork-credits { font-size: 13px; }
.app-shell .access-offer { border-top: 0; font-size: 14px; }
.app-shell .access-links a { font-size: 14px; }
.app-shell .selected-panel-actions {
  border-top: 0;
  background: var(--mcx-surface);
}

/* ---------- Buttons: flat, pill, 16px ---------- */
.app-shell .primary,
.app-shell .secondary {
  border-radius: 999px;
  font-size: 16px;
  padding: 12px 22px;
  box-shadow: none;
}
.app-shell .primary:hover { background: #0f5c4c; }
.app-shell .secondary { border: 1.5px solid var(--track); background: transparent; }
.app-shell .image-bank-recall {
  border: 1.5px solid var(--track);
  border-radius: 999px;
  background: transparent;
  padding: 8px 18px;
  box-shadow: none;
  font-size: 14px;
  transition: background .16s, transform .12s;
}
.app-shell .image-bank-recall:hover { box-shadow: none; background: var(--track-wash); }
.app-shell .image-bank-recall:active { transform: translateY(1px); }
.app-shell .image-bank-recall strong { font-size: 14px; }
.app-shell .image-bank-recall small { font-size: 13px; }
.app-shell .text-link,
.app-shell .text-button { font-size: 14px; }

/* ---------- Closing strip, footer and legal notice ---------- */
.app-shell .library-strip h2 { font-size: 32px; line-height: 1.1; }
/* the phone-only "Explore all programs" link follows the heading instead of sitting above it like a label */
.app-shell .library-strip > div { display: flex; flex-direction: column; align-items: flex-start; }
.app-shell .library-strip > div > .all-programs-mobile { order: 2; margin: 12px 0 0; }
.app-shell .library-strip > p { font-size: 16px; line-height: 1.6; color: var(--ink); max-width: 44ch; }
body.codex-framed .app-shell .footer-brand,
.app-shell .footer-brand { font-size: 14px; }
.app-shell .footer-action { font-size: 14px; }
.app-shell .legal-notice {
  max-width: 1420px;
  padding: 8px 50px 40px;
  text-align: left;
  font-size: 16px;
  line-height: 1.6;
}
.app-shell .legal-notice p { max-width: 68ch; }
.app-shell .legal-notice p + p { margin-top: 10px; }

/* ---------- List view and phone cards: white surface + brand relief, no outline ---------- */
.app-shell .list-library .product-node {
  border: 0;
  background: var(--mcx-surface);
  border-radius: 16px;
  box-shadow: var(--mcx-relief);
}
.app-shell .list-library .product-node.selected { background: var(--track-wash); }
.app-shell .list-description > p { font-size: 16px; line-height: 1.6; color: var(--ink); }

/* ---------- Dialogs and search: readable sizes (they float, so their shadows stay) ---------- */
.app-shell .modal .muted,
.app-shell .modal details p,
.app-shell .empty-search p,
.app-shell .empty-state p,
.app-shell .update-item p,
.app-shell .terms-copy p { font-size: 16px; line-height: 1.6; }
.app-shell .modal summary,
.app-shell .field,
.app-shell .result > span,
.app-shell .result strong,
.app-shell .success-text,
.app-shell .form-error,
.app-shell .profile-menu button,
.app-shell .profile-menu a,
.app-shell .alert-preferences > div,
.app-shell .recent-shortcut,
.app-shell .recent-shortcut button { font-size: 14px; }
.app-shell .result small,
.app-shell .search-foot,
.app-shell .profile-menu > p,
.app-shell .availability-alert small,
.app-shell .small { font-size: 13px; }
.app-shell .search-foot kbd { font-size: 13px; }
.app-shell .terms-copy h3 { font: 400 24px/1.2 var(--serif); }
.app-shell .empty-state h2,
.app-shell .modal-header h2 { font-size: 32px; }
.app-shell .update-item h3,
.app-shell .empty-search h3 { font-size: 24px; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  /* the closing strip is its own section: clear space after the detail panel, not a caption beneath it */
  .app-shell .library-strip,
  .app-shell main > .library-strip { margin-top: clamp(72px, 10vw, 160px); padding-top: 0; }
  /* below the desktop two-column layout the panel grows with its content instead of nesting a scroll box */
  .app-shell .study-sidebar .selected-panel { height: auto; }
  .app-shell .selected-panel-scroll { overflow: visible; }
  .app-shell .product-kind { font-size: 14px; }
  .app-shell .hub-center > p:not(.eyebrow) { font-size: 16px; }
  .app-shell .hub-center h2 { font-size: 40px; }
  .app-shell .legal-notice { padding-left: 28px; padding-right: 28px; }
}
@media (max-width: 850px) {
  /* the shared frame forces a three-column header; on tablet and phone it is wordmark | actions */
  body.codex-framed .app-shell > header { grid-template-columns: minmax(0, 1fr) auto; }
  /* one 24px gutter for bars, canvas and legal notice */
  body.codex-framed .app-shell > header.codex-frame-head { padding-inline: 24px; }
  body.codex-framed .app-shell > footer.codex-frame-foot { padding-left: 24px !important; padding-right: 24px !important; }
  .app-shell .workspace-nav { padding-left: 24px; padding-right: 24px; }
  .app-shell main { padding-left: 24px; padding-right: 24px; }
  .app-shell .brand > span { font-size: 32px; }
  .app-shell .brand small { font-size: 13px; }
  .app-shell .section-heading h1 { font-size: 32px; }
  .app-shell .product-name { font-size: 22px; }
  .app-shell .legal-notice { padding-left: 24px; padding-right: 24px; }
}

/* ---------- Phone ---------- */
@media (max-width: 600px) {
  .app-shell .brand > span { font-size: 28px; }
  .app-shell .brand small { font-size: 13px; letter-spacing: .01em; }
  .app-shell .header-actions { min-width: 0; }
  .app-shell .track-picker select { font-size: 16px; }
  .app-shell .phone-context button { font-size: 14px; }
  .app-shell .section-heading h1 { font-size: 28px; }
  .app-shell .connected-library .product-node,
  .app-shell .list-library .product-node {
    border: 0;
    background: var(--mcx-surface);
    border-radius: 16px;
    box-shadow: var(--mcx-relief);
  }
  .app-shell .connected-library .product-node.selected,
  .app-shell .list-library .product-node.selected {
    background: var(--track-wash);
    box-shadow: var(--mcx-relief), inset 0 0 0 2px var(--track-border);
  }
  .app-shell .connected-library .product-node.selected .product-select,
  .app-shell .list-library .product-node.selected .product-select { background: none; box-shadow: none; }
  .app-shell .product-name { font-size: 22px; }
  .app-shell .product-kind { font-size: 14px; }
  .app-shell .save-node,
  .app-shell .list-library .save-node { background: transparent; }
  .app-shell .selected-panel h2 { font-size: 32px; }
  .app-shell .panel-description,
  .app-shell .library-strip > p { font-size: 16px; }
  .app-shell .format-kind,
  .app-shell .format-note { font-size: 14px; }
  .app-shell .primary,
  .app-shell .secondary { font-size: 16px; }
  .app-shell .library-strip h2 { font-size: 28px; }
  .app-shell .legal-notice { padding: 8px 24px 32px; font-size: 16px; }
  .app-shell .mobile-nav button {
    flex: 1 1 0;
    min-width: 0;
    font-size: 13px;
    transition: background .16s, transform .12s;
  }
  .app-shell .mobile-nav button[aria-current=page] { background: var(--mcx-neutral); color: var(--track); }
  .app-shell .search-input input { font-size: 16px; }
  .app-shell .search-foot { font-size: 13px; }
  .app-shell .toast { font-size: 14px; }
}
/* very narrow phones: Profile lives in the bottom bar, so the header avatar steps aside */
@media (max-width: 359px) {
  .app-shell .header-actions .profile-wrap { display: none; }
  .app-shell .brand > span { font-size: 26px; }
}

/* ---------- Motion: transform + opacity only, press feedback, once-only entrances ---------- */
.app-shell .icon-button:active,
.app-shell .save-node:active,
.app-shell .view-switch button:active,
.app-shell .avatar:active,
.app-shell .search-trigger:active,
.app-shell .updates-trigger:active,
.app-shell .mobile-nav button:active { transform: scale(.94); }
.app-shell .avatar,
.app-shell .search-trigger,
.app-shell .updates-trigger { transition: transform .12s var(--mcx-ease); }
.app-shell .product-select:active .product-art { transform: translateY(-2px) scale(.98); }

@media (prefers-reduced-motion: no-preference) {
  @keyframes mcx-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  @keyframes mcx-disc { from { opacity: 0; scale: .94; } to { opacity: 1; scale: 1; } }
  .app-shell .section-heading .view-switch,
  .app-shell .cx-topic-entry,
  .app-shell .connected-library .product-select,
  .app-shell .list-library .product-select,
  .app-shell .hub-center > h2,
  .app-shell .hub-center > p,
  .app-shell .hub-center > .selected-format,
  .app-shell .orbit-controls,
  .app-shell .study-sidebar .selected-panel {
    animation: mcx-rise .5s var(--mcx-ease) backwards;
  }
  .app-shell .orbit { animation: mcx-disc .7s var(--mcx-ease) backwards; }
  .app-shell .orbit.inner { animation-delay: .08s; }
  .app-shell .section-heading .view-switch { animation-delay: .04s; }
  .app-shell .cx-topic-entry { animation-delay: .08s; }
  .app-shell .hub-center > h2 { animation-delay: .14s; }
  .app-shell .hub-center > p { animation-delay: .21s; }
  .app-shell .hub-center > .selected-format { animation-delay: .28s; }
  .app-shell .product-node.qbook .product-select { animation-delay: .18s; }
  .app-shell .product-node.image-bank .product-select { animation-delay: .25s; }
  .app-shell .product-node.review .product-select { animation-delay: .32s; }
  .app-shell .product-node.audio-notes .product-select { animation-delay: .39s; }
  .app-shell .product-node.qbank .product-select { animation-delay: .46s; }
  .app-shell .product-node.visual-companion .product-select { animation-delay: .53s; }
  .app-shell .study-sidebar .selected-panel { animation-delay: .3s; }
  .app-shell .orbit-controls { animation-name: mcx-fade; animation-delay: .6s; }
  @keyframes mcx-fade { from { opacity: 0; } to { opacity: 1; } }
  /* below-the-fold parts: the hidden state is added by the inline script only, so content shows without it */
  .app-shell .mcx-pending { opacity: 0; transform: translateY(20px); }
  .app-shell .mcx-in {
    opacity: 1;
    transform: none;
    transition: opacity .55s var(--mcx-ease) var(--mcx-d, 0ms), transform .55s var(--mcx-ease) var(--mcx-d, 0ms);
  }
}
@media (prefers-reduced-motion: reduce) {
  .app-shell .mcx-pending { opacity: 1; transform: none; }
  .app-shell .icon-button:active,
  .app-shell .save-node:active,
  .app-shell .view-switch button:active,
  .app-shell .mobile-nav button:active { transform: none; }
}

/* PS-113 mobile header fix */
.app-shell .save-node,
.app-shell .open-details,
.app-shell .legal-notice a {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 480px) {
  body.codex-framed .app-shell > header.codex-frame-head {
    padding-inline: 14px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .app-shell .header-actions {
    gap: 6px;
    min-width: 0;
    flex-wrap: wrap;
  }
  .app-shell .header-actions .profile-actions,
  .app-shell .header-actions .profile-wrap {
    display: none !important;
  }
  .app-shell .mobile-nav {
    padding-inline: 8px;
    gap: 4px;
  }
}

/* ==========================================================================
   Grid View Default & Compact Scrollable Boxes (28 Oct 2026)
   Applies to both /mycodexes/ (.list-library) and /mycodexes/q/<CODE> (.arrival-list)
   ========================================================================== */

/* 1. Main MyCodexes Hub Grid View (.list-library) */
.app-shell .list-library {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
  align-content: start !important;
}

.app-shell .list-library .product-node {
  padding: 14px 16px !important;
  border-radius: 10px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

.app-shell .list-library .product-select {
  gap: 10px !important;
  padding-right: 34px !important;
}

.app-shell .list-library .product-art {
  width: 48px !important;
  height: 60px !important;
  flex-shrink: 0 !important;
}

.app-shell .list-library .product-name {
  font-size: 0.96rem !important;
  line-height: 1.25 !important;
}

.app-shell .list-library .product-kind {
  font-size: 0.74rem !important;
}

.app-shell .list-library .list-description {
  margin-top: 8px !important;
  padding-top: 8px !important;
  gap: 8px !important;
}

.app-shell .list-library .list-description p {
  font-size: 0.81rem !important;
  line-height: 1.45 !important;
  max-height: 76px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media (max-width: 1180px) {
  .app-shell .list-library {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 560px) {
  .app-shell .list-library {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* 2. Topic Arrival Page Grid View (.arrival-list on /mycodexes/q/<CODE>) */
.app-shell .arrival-list-layout {
  grid-template-columns: minmax(0, 1fr) 310px !important;
  gap: 18px !important;
  align-items: start !important;
}

.app-shell .arrival-list {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  align-items: stretch !important;
}

.app-shell .arrival-list .arrival-card {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  padding: 13px 14px !important;
  border-radius: 10px !important;
  min-height: 0 !important;
  max-height: 295px !important;
  overflow: hidden !important;
  background: var(--mcx-surface, #fffdf8) !important;
}

.app-shell .arrival-list .arrival-format-button {
  display: grid !important;
  grid-template-columns: 40px minmax(0, 1fr) !important;
  column-gap: 10px !important;
  row-gap: 2px !important;
  align-items: center !important;
  text-align: left !important;
  padding: 2px 0 !important;
  flex-shrink: 0 !important;
}

.app-shell .arrival-list .arrival-art {
  grid-row: 1 / 3 !important;
  width: 40px !important;
  height: 50px !important;
  margin-bottom: 0 !important;
}

.app-shell .arrival-list .arrival-format-button strong {
  font-size: 0.92rem !important;
  line-height: 1.22 !important;
}

.app-shell .arrival-list .arrival-format-button > span:last-child {
  font-size: 0.72rem !important;
  line-height: 1.3 !important;
}

.app-shell .arrival-list .arrival-mobile-references {
  border-left: 0 !important;
  border-top: 1px solid var(--line, rgba(24, 51, 47, 0.12)) !important;
  padding-left: 0 !important;
  padding-top: 8px !important;
  padding-right: 4px !important;
  margin-top: 0 !important;
  max-height: 185px !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  font-size: 0.81rem !important;
}

.app-shell .arrival-list .arrival-reference {
  padding: 6px 0 !important;
  gap: 3px !important;
}

.app-shell .arrival-list .arrival-reference:first-child {
  padding-top: 0 !important;
}

.app-shell .arrival-list .arrival-reference strong {
  font-size: 0.82rem !important;
  line-height: 1.35 !important;
}

.app-shell .arrival-list .arrival-reference > span,
.app-shell .arrival-list .arrival-status {
  font-size: 0.75rem !important;
  line-height: 1.35 !important;
}

.app-shell .arrival-list .access-offer {
  margin-top: 8px !important;
  padding: 8px 10px !important;
  font-size: 0.75rem !important;
}

.app-shell .arrival-list .access-offer p {
  font-size: 0.74rem !important;
  line-height: 1.35 !important;
}

.app-shell .arrival-resource-panel {
  padding: 16px 18px !important;
  max-height: 540px !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
}

.app-shell .arrival-contents {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.app-shell .arrival-contents button {
  padding: 11px 14px !important;
}

@media (max-width: 1180px) {
  .app-shell .arrival-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 820px) {
  .app-shell .arrival-list-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (max-width: 560px) {
  .app-shell .arrival-list,
  .app-shell .arrival-contents {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Site-wide two-tone product brand pairs: ChartWalk, QuestionBank, FlashCards, AudioNotes, ImageBank */
.cw-brand-pair {
  white-space: nowrap;
}
.cw-chart {
  color: var(--ink, #162b27);
  font-weight: inherit;
}
.cw-walk {
  color: var(--track, #0B4A3D);
  font-weight: 800;
}
.app-shell .primary .cw-chart {
  color: #ffffff;
}
.app-shell .primary .cw-walk {
  color: #9fe3cc;
}
.app-shell[data-track="usmle-step-1"] .primary .cw-walk {
  color: #b7d4ff;
}
