/* ============================================================
   /roles, "GLASS GRID" (9 Nov 2026, his pick of three previews:
   A Glass Grid, B City Lens, C Career Tracks; the previews were built
   through design-master). Loaded after styles.css, page.css, tabbar.css and
   glass.css, so every token (--bg, --card, --ink, --live, --cta, the
   --lg-* glass materials, --ease-out, --snap, --spring) comes from the
   site. Hand-committed; pages.js loads it on /roles only (ROLES_ASSETS,
   ?v=1). Motion is never switched off (his rule); hover only brightens
   an edge or a surface, never lifts.
   ============================================================ */

/* Focus and anchors land clear of what sticks to the top: the masthead, plus the floating bar on a wide
   screen. One offset only: a scroll-margin on top of this would count twice. */
:root:has(main.rx) { scroll-padding-top: calc(var(--bar-h) + 84px); }
@media (max-width: 900px) {
  :root:has(main.rx) { scroll-padding-top: calc(var(--bar-h) + 16px); }
  html.has-tabbar:has(main.rx) { scroll-padding-bottom: calc(var(--tb-h) + 44px + env(safe-area-inset-bottom)); }
}

.rx { padding-top: 18px; }
.rx .crumbs { margin-bottom: 12px; }
.rx-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- the short hero ---------- */
.rx-hero { margin: 0 0 18px; }
.rx .rx-hero h1 { margin: 0 0 6px; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.05; text-wrap: balance; }
.rx-lede { margin: 0; max-width: 64ch; font-size: 16px; line-height: 1.5; color: var(--ink-15); text-wrap: pretty; }

/* ---------- controls: search, city, type ----------
   Glass controls (glass.css's .find family): a translucent fill, a rim of
   light, a press that gives under the finger. Text sits on the control's own
   fill, never on the page behind it. */
.rx-bar { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rx-bar.is-pending { visibility: hidden; }
.rx-bar-glass { display: none; }

.rx-find {
  position: relative; flex: 1 1 260px; min-width: 0;
  display: flex; align-items: center; gap: 9px; height: 44px; padding: 0 6px 0 15px;
  border-radius: var(--r-pill); color: var(--ink-3);
  background: var(--lg-ctl); border: .5px solid var(--lg-rim);
  box-shadow: inset 1px 1px 0 -.5px var(--lg-hi), inset -1px -1px 0 -.5px var(--lg-lo);
  transition: border-color .16s, background-color .16s;
}
.rx-find:focus-within { border-color: var(--rule-2); background: color-mix(in oklab, var(--card) 70%, var(--lg-ctl)); }
.rx-find:has(:focus-visible) { outline: 2px solid var(--live); outline-offset: 2px; }
.rx-find input {
  flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none;
  font: inherit; font-size: 15px; color: var(--ink); letter-spacing: -.005em;
}
.rx-find input::placeholder { color: var(--ink-3); }
.rx-find input::-webkit-search-cancel-button { display: none; }
.rx-ic { flex: none; }
.rx-clear {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); cursor: pointer;
  transition: background-color .16s, color .16s, scale .35s var(--spring);
}
.rx-clear:active { scale: .9; transition-duration: .1s; }
@media (hover: hover) and (pointer: fine) { .rx-clear:hover { background: var(--lg-hover); color: var(--ink); } }

.rx-city {
  flex: none; display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 13px 0 11px;
  border-radius: var(--r-pill); color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 500; cursor: pointer;
  background: var(--lg-ctl); border: .5px solid var(--lg-rim);
  box-shadow: inset 1px 1px 0 -.5px var(--lg-hi), inset -1px -1px 0 -.5px var(--lg-lo);
  transition: border-color .16s, background-color .16s, scale .35s var(--spring);
}
.rx-city:active { scale: .97; transition-duration: .1s; }
.rx-city[aria-expanded="true"] { border-color: var(--rule-2); }
.rx-city .rx-caret { color: var(--ink-3); transition: rotate .3s var(--ease-out); }
.rx-city[aria-expanded="true"] .rx-caret { rotate: 180deg; }
.rx-city-t { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-pin { flex: none; }
@media (hover: hover) and (pointer: fine) { .rx-city:hover { border-color: var(--rule-2); } }

/* The type tabs: the site's channel and lens (glass.js IDGlass.tabs adds
   .lg-tabs.has-ind and the gliding .seg-ind). With no script the chosen tab
   keeps a fill of its own. */
.rx-type {
  flex: none; display: flex; gap: 2px; padding: 3px; height: 44px; border-radius: var(--r-pill);
  border: .5px solid var(--lg-rim); background: var(--lg-well);
}
.rx-type > [role="tab"] {
  display: inline-flex; align-items: center; justify-content: center; padding: 0 14px;
  border: 0; border-radius: var(--r-pill); background: transparent; cursor: pointer;
  font: inherit; font-size: 13.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap;
}
.rx-type > [role="tab"][aria-selected="true"] { background: var(--card-2); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .rx-type > [role="tab"]:hover { color: var(--ink); } }

.rx-status { margin: 0; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* Numbers cross-fade when they change (rx.js); they need a box of their own to move. */
.rx-n { display: inline-block; font-variant-numeric: tabular-nums; }

/* ---------- empty, zero and where ---------- */
.rx-empty {
  margin-top: 16px; padding: 26px 22px; border-radius: var(--r-2);
  background: var(--card); border: 1px solid var(--rule);
}
.rx-empty-t { margin: 0 0 4px; font-size: 16px; font-weight: 600; color: var(--ink); }
.rx-empty-s { margin: 0 0 16px; font-size: 14.5px; color: var(--ink-15); }
.rx-reset {
  display: inline-flex; align-items: center; height: 44px; padding: 0 18px; border-radius: var(--r-pill);
  border: 1px solid var(--rule-2); background: var(--card-2); color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  transition: border-color .16s, background-color .16s, scale .35s var(--spring);
}
.rx-reset:active { scale: .97; transition-duration: .1s; }
.rx-where { display: block; margin-top: 3px; font-size: 12px; color: var(--ink-3); }
.rx-split .is-off { color: var(--ink-3); }
.rx-role.is-zero .rx-n { color: var(--ink-3); }
/* Roles that match but have none for this city or type: named once, each still a link. */
.rx-zero { margin: 14px 2px 0; font-size: 14px; line-height: 1.6; color: var(--ink-15); text-wrap: pretty; }
.rx-zero a { color: var(--ink); text-underline-offset: 3px; }

/* ---------- popular pages and the full list ---------- */
.rx-short { margin-top: 44px; }
.rx-short h2, .rx-promo h2 {
  margin: 0 0 12px; font-family: var(--ui); font-size: 17px; font-weight: 600; letter-spacing: -.01em; color: var(--ink);
  display: block;
}
.rx-short-l { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rx-sc {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 15px; border-radius: var(--r-pill);
  background: var(--card); border: 1px solid var(--rule); color: var(--ink-15); text-decoration: none; font-size: 13.5px;
  transition: border-color .16s, background-color .16s, color .16s, scale .35s var(--spring);
}
.rx-sc b, .rx-all b { font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rx-sc:active { scale: .97; transition-duration: .1s; }
@media (hover: hover) and (pointer: fine) { .rx-sc:hover { border-color: var(--rule-2); background: var(--card-2); color: var(--ink); } }

.rx-all { margin-top: 14px; }
.rx-all > summary {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px;
  list-style: none; cursor: pointer; color: var(--ink); font-size: 14px; font-weight: 500;
}
.rx-all > summary::-webkit-details-marker { display: none; }
.rx-all > summary .rx-caret { color: var(--ink-3); transition: rotate .3s var(--ease-out); }
.rx-all[open] > summary .rx-caret { rotate: 180deg; }
.rx-all > summary:focus-visible { outline: 2px solid var(--live); outline-offset: 2px; border-radius: 8px; }
.rx-all-in {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 18px 24px;
  margin-top: 6px; padding: 18px 20px; border-radius: var(--r-2); background: var(--card); border: 1px solid var(--rule);
}
.rx-all-city h3 { margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.rx-all-city ul { margin: 0; padding: 0; list-style: none; }
.rx-all-city a {
  display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; min-height: 32px;
  color: var(--ink-15); text-decoration: none; font-size: 13.5px; border-top: 1px solid var(--rule);
}
.rx-all-city li:first-child a { border-top: 0; }
@media (hover: hover) and (pointer: fine) { .rx-all-city a:hover { color: var(--ink); } }

/* ---------- the tailor, in the page after the browsing (was the floating pill) ---------- */
.rx-promo {
  margin-top: 40px; display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap;
  padding: 22px 24px; border-radius: 20px; background: var(--card); border: 1px solid var(--rule);
}
.rx-promo-t { flex: 1 1 380px; min-width: 0; }
.rx-promo h2 { margin-bottom: 6px; }
.rx-promo p { margin: 0; max-width: 62ch; font-size: 14.5px; line-height: 1.55; color: var(--ink-15); }
.rx-promo-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.rx-cta, .rx-promo-2 {
  display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border-radius: var(--r-pill);
  font-size: 14.5px; font-weight: 600; text-decoration: none; transition: scale .35s var(--spring), border-color .16s, background-color .16s;
}
.rx-cta { background: var(--cta); color: var(--cta-ink); }
.rx-promo-2 { border: 1px solid var(--rule-2); color: var(--ink); font-weight: 500; }
.rx-cta:active, .rx-promo-2:active { scale: .97; transition-duration: .1s; }
@media (hover: hover) and (pointer: fine) { .rx-promo-2:hover { background: var(--card-2); } }

/* ---------- the city sheet: a popover from its button on a wide screen, a bottom sheet on a phone ---------- */
.rx-sheet {
  margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink);
  max-width: none; max-height: none; overflow: visible;
}
.rx-sheet::backdrop { background: transparent; }
.rx-sheet-in {
  display: flex; flex-direction: column; min-height: 0; max-height: inherit;
  /* Heavier glass than a menu: it holds a list to read over the page. */
  background: color-mix(in oklab, var(--bg-2) 80%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(var(--lg-sat));
  backdrop-filter: blur(22px) saturate(var(--lg-sat));
  border: .5px solid var(--lg-rim);
  box-shadow: inset 1px 1px 0 -.5px var(--lg-hi), inset -1px -1px 0 -.5px var(--lg-lo), var(--lg-shade);
}
.rx-sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 4px 10px; }
.rx-sheet-top h2 { margin: 0; font-family: var(--ui); font-size: 16px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); display: block; }
.rx-x {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--lg-fill); color: var(--ink-15); transition: background-color .16s, scale .35s var(--spring);
}
.rx-x:active { scale: .9; transition-duration: .1s; }
.rx-find-c { flex: none; margin-bottom: 8px; }
.rx-clist { overflow-y: auto; overscroll-behavior: contain; padding: 2px; scrollbar-width: thin; }
.rx-cgroup { margin: 12px 10px 4px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.rx-cnone { margin: 14px 10px; font-size: 14px; line-height: 1.5; color: var(--ink-15); }
.rx-copt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  min-height: 46px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 500; color: var(--ink); text-align: left;
  transition: background-color .16s, scale .35s var(--spring);
}
.rx-copt b { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.rx-copt:active { scale: .98; transition-duration: .1s; }
.rx-copt[aria-current="true"] {
  background: var(--lg-lens);
  box-shadow: inset 0 0 0 .5px var(--lg-rim), inset 1px 1.5px 0 -.5px var(--lg-lens-hi), inset -1px -1px 0 -.5px var(--lg-lo);
}
.rx-copt:focus-visible { outline: 2px solid var(--live); outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) { .rx-copt:hover { background: var(--lg-hover); } }
.rx-grab { display: none; }

@media (min-width: 901px) {
  .rx-sheet { position: fixed; inset: auto; top: var(--rx-top, 120px); left: var(--rx-left, 40px); width: 320px; max-height: min(460px, calc(100dvh - var(--rx-top, 120px) - 24px)); }
  .rx-sheet-in { padding: 14px 12px 10px; border-radius: 20px; transform-origin: var(--rx-origin, top left); }
}
@media (max-width: 900px) {
  .rx-sheet {
    position: fixed; inset: auto 0 0 0; width: 100%; max-height: min(82dvh, 680px);
    touch-action: none;
  }
  .rx-sheet::backdrop { background: var(--lg-veil); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: var(--rx-veil, 1); }
  .rx-sheet-in {
    border-radius: 24px 24px 0 0; border-bottom: 0;
    padding: 0 14px calc(14px + env(safe-area-inset-bottom));
  }
  .rx-grab { display: grid; place-items: center; height: 26px; cursor: grab; }
  .rx-grab span { width: 38px; height: 5px; border-radius: 3px; background: var(--rule-2); }
  .rx-clist { touch-action: pan-y; }
  .rx-copt { min-height: 50px; }
}
.rx-sheet.is-closing::backdrop { opacity: 0; transition: opacity .2s ease; }

/* ============================================================
   A · GLASS GRID
   ============================================================ */
@media (min-width: 901px) {
  /* The bar floats over the grid as it scrolls: frost on its own layer
     (a backdrop root around the controls would stop the lens refracting). */
  .rx .rx-bar {
    position: sticky; top: calc(var(--bar-h) + 10px); z-index: 30;
    margin: 0 -12px; padding: 10px 12px; border-radius: 26px;
  }
  .rx .rx-bar-glass {
    display: block; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
    background: color-mix(in oklab, var(--bg) 74%, transparent);
    -webkit-backdrop-filter: blur(22px) saturate(var(--lg-sat));
    backdrop-filter: blur(22px) saturate(var(--lg-sat));
    box-shadow: inset 0 0 0 .5px var(--lg-rim), inset 1px 1px 0 -.5px var(--lg-hi);
    transition: box-shadow .3s var(--ease-out);
  }
  .rx-bar.is-stuck .rx-bar-glass {
    box-shadow: inset 0 0 0 .5px var(--lg-rim), inset 1px 1px 0 -.5px var(--lg-hi), 0 14px 30px -18px rgba(0, 0, 0, .6);
  }
  .rx .rx-bar .rx-find { flex: 0 1 380px; }
  .rx .rx-bar .rx-status { margin-left: auto; padding-right: 6px; }
}

.rx-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
@media (max-width: 1100px) { .rx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .rx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.rx-card {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr auto auto auto;
  column-gap: 10px; min-height: 140px; padding: 15px 14px 14px 16px;
  border-radius: var(--r-2); background: var(--card); border: 1px solid var(--rule);
  color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent;
  transition: border-color .16s, background-color .16s, transform .5s var(--spring);
}
.rx-card-name { grid-column: 1; grid-row: 1; font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; text-wrap: balance; }
.rx-card .rx-chev { grid-column: 2; grid-row: 1; margin-top: 2px; color: var(--ink-3); transition: color .16s; }
.rx-card-num { grid-column: 1 / -1; grid-row: 3; display: flex; align-items: baseline; gap: 7px; margin-top: 16px; }
.rx-card-num .rx-n { font-family: var(--display); font-size: 28px; font-weight: 600; line-height: 1; letter-spacing: -.035em; }
.rx-n-l { font-size: 13px; color: var(--ink-2); }
.rx-card .rx-split { grid-column: 1 / -1; grid-row: 4; margin-top: 6px; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rx-card .rx-where { grid-column: 1 / -1; grid-row: 5; }
/* A press gives at once and springs back on release. */
.rx-card:active { transform: scale(.975); transition: transform .12s var(--snap); }
.rx-card:focus-visible { outline: 2px solid var(--live); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .rx-card:hover { border-color: var(--rule-2); background: var(--card-2); }
  .rx-card:hover .rx-chev { color: var(--ink); }
}

@media (max-width: 900px) {
  .rx .rx-bar { gap: 8px; }
  .rx .rx-bar .rx-find { flex: 1 1 0; }
  .rx .rx-type { flex: 1 1 100%; }
  .rx .rx-type > [role="tab"] { flex: 1 1 0; padding: 0 8px; }
  .rx .rx-bar .rx-status { flex: 1 1 100%; margin-top: 2px; }
}
/* Compact rows on a phone: name and split on the left, the count and chevron on the right. */
@media (max-width: 640px) {
  .rx .rx-grid {
    grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 12px;
    border-radius: var(--r-2); background: var(--card); border: 1px solid var(--rule); overflow: clip;
  }
  .rx .rx-card {
    grid-template-columns: minmax(0, 1fr) auto auto; grid-template-rows: auto auto auto; align-items: center;
    min-height: 58px; padding: 9px 10px 9px 14px; column-gap: 8px;
    border: 0; border-top: 1px solid var(--rule); border-radius: 0; background: transparent;
  }
  .rx .rx-card:first-child { border-top: 0; }
  .rx .rx-card-name { grid-column: 1; grid-row: 1; font-size: 15px; }
  .rx .rx-card .rx-split { grid-column: 1; grid-row: 2; margin-top: 2px; font-size: 12.5px; }
  .rx .rx-card .rx-where { grid-column: 1; grid-row: 3; margin-top: 1px; }
  .rx .rx-card-num { grid-column: 2; grid-row: 1 / 4; margin: 0; }
  .rx .rx-card-num .rx-n { font-size: 19px; letter-spacing: -.02em; }
  .rx .rx-n-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .rx .rx-card .rx-chev { grid-column: 3; grid-row: 1 / 4; margin: 0; }
  .rx .rx-card:active { transform: none; background: var(--card-2); transition: background-color .08s; }
  .rx .rx-card:focus-visible { outline-offset: -3px; border-radius: 12px; }
}

@media (max-width: 640px) {
  .rx .rx-hero h1 { font-size: 28px; }
  .rx-lede { font-size: 15px; }
  .rx-hero { margin-bottom: 14px; }
  .rx-promo { padding: 18px; }
  .rx-promo-acts { width: 100%; }
  .rx-cta, .rx-promo-2 { flex: 1 1 auto; justify-content: center; }
  .rx-short { margin-top: 34px; }
  .rx-sc { min-height: 44px; }
  .rx-all-in { padding: 14px 16px; }
}
