/* ============================================================================
   practice-hub-heb.css · EZ42 Practice Hub (Hebrew) · v1.0 · 2026-10
   ----------------------------------------------------------------------------
   Load AFTER ez42-ui.css v3.1. Design-system tokens only (var(--*)), logical
   properties only: the same rules are RTL-correct with no row-reverse, no
   order hacks and no !important. Light and dark come from the tokens, so set
   <html data-theme="dark|auto"> and nothing here changes.

   Prefix .ph- = page compositions. Everything else is an existing .ez- class.
   JS hook classes and IDs are untouched; new classes are added NEXT to them.

   Replaces
     styles-portal-filterbar-heb.css            (delete the whole file)
     styles-portal-heb.css: card, header-bg, counter, announcement, skills
       blocks (exact list in CLASS-MAP.md)
     inline styles in portal_header_heb.js (HEADER_CONFIG colours)
     Tailwind utilities on cards / tags / modal body in portal_heb.js
     <style id="featured-row-styles"> injected by featured-row.js

   00 Page shell          06 Activity card
   01 Announcement bar    07 Featured row
   02 Header panel        08 States: loading / empty / error
   03 Filter bar          09 Restricted modal body
   04 Selected filters    10 Scroll-to-top
   05 Main + skills panel 11 Mobile (≤768px): sheets, stacking, sizes
   ========================================================================= */

:root {
  --ph-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); /* @kind other */
  --ph-check-on-brand: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); /* @kind other */
}

/* ==== 00 PAGE SHELL ======================================================= */
/* Same reset ez42-ui.css applies to .ez- classes (Tailwind preflight-safe). */
[class^="ph-"], [class*=" ph-"], [class^="ph-"]::before, [class*=" ph-"]::before,
[class^="ph-"]::after, [class*=" ph-"]::after { box-sizing: border-box; }
.ph-page { min-block-size: 100vh; }
/* Full screen width like today, with 48px gutters. To cap it, add max-inline-size: var(--width-page). */
.ph-container { margin-inline: auto; padding-inline: var(--space-7); }
/* Hebrew page: Latin tracking on badges spreads Hebrew letters apart.
   Upstream candidate for ez42-ui.css ([dir="rtl"] .ez-badge). */
.ph-page .ez-badge { letter-spacing: 0; }

/* ==== 01 ANNOUNCEMENT BAR  #announcement-bar =============================== */
/* JS keeps toggling style.display between 'flex' and 'none'. */
.ph-announce { display: flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-block-size: 40px; padding: var(--space-2) var(--space-4); background: var(--info-bg);
  color: var(--info-text); border-block-end: 1px solid var(--border); font-size: var(--fs-body-sm);
  font-weight: var(--fw-semibold); line-height: var(--lh-heading); text-align: center; }
.ph-announce__text { min-inline-size: 0; text-wrap: pretty; }
.ph-announce__link { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.ph-announce__link:hover { color: var(--text); }

/* ==== 02 HEADER PANEL  #portal-header-panel ================================
   Option A: .ez-hero (purple) + .ph-hero, tiles on the hero.
   Option B: .ez-hero.ez-hero--flat + .ph-hero.ph-hero--flat, AI links as
             .ez-ai-entry in .ez-hero__actions, tiles on the surface.
   Option C (CHOSEN): Option A markup + .ez-hero--flat.ph-hero--flat.
   Both: .ez-hero--compact, and <div class="ez-strip"> directly after.        */
.ph-hero .ez-hero__inner { gap: var(--space-5); max-inline-size: none; padding-inline: var(--space-7); }
.ph-hero .ez-hero__main { flex: 1 1 100%; }
.ph-tiles { flex: 1 1 100%; display: flex; align-items: stretch; gap: var(--space-3); min-inline-size: 0; }
.ph-tiles__group { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  gap: var(--space-3); min-inline-size: 0; }
.ph-tiles__group--subjects { flex: 5 1 0; }
.ph-tiles__group--links { flex: 2 1 0; }
.ph-tiles__divider { flex: 0 0 1px; align-self: stretch; background: rgba(255,255,255,0.22); }

.ph-tile { -webkit-appearance: none; appearance: none; position: relative; display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2);
  min-block-size: 112px; min-inline-size: 0; padding: var(--space-4) var(--space-3);
  border: 1px solid rgba(255,255,255,0.22); border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.12); color: var(--on-brand); font-family: var(--font-sans);
  font-size: var(--fs-body-sm); font-weight: var(--fw-bold); line-height: var(--lh-heading);
  text-align: center; text-decoration: none; cursor: pointer;
  transition: var(--t-color), var(--t-card-lift); }
.ph-tile:hover { background: rgba(255,255,255,0.2); color: var(--on-brand); text-decoration: none;
  transform: translateY(-2px); }
.ph-tile:focus-visible { outline: 2px solid var(--on-brand); outline-offset: 2px; }
.ph-tile__icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  inline-size: 44px; block-size: 44px; border-radius: var(--radius-md); background: rgba(255,255,255,0.14); }
.ph-tile__text { display: flex; flex-direction: column; align-items: center; gap: 2px; min-inline-size: 0; }
.ph-tile__label { text-wrap: balance; }
/* "AI" is a Latin run: keeps DS eyebrow tracking. */
.ph-tile__eyebrow { font-size: var(--fs-eyebrow); font-weight: var(--fw-black); letter-spacing: var(--ls-eyebrow);
  line-height: 1.2; opacity: 0.85; }
.ph-tile__go { position: absolute; inset-block-start: var(--space-3); inset-inline-end: var(--space-3); opacity: 0.8; }
/* Current subject. Purple hero is identical in both themes, so the selected tile is too. */
.ph-tile[aria-pressed="true"] { background: var(--on-brand); border-color: var(--on-brand);
  color: var(--purple-deep); box-shadow: var(--shadow-card); }
.ph-tile[aria-pressed="true"] .ph-tile__icon { background: var(--purple-deep); color: var(--on-brand); }
.ph-tile--link { background: transparent; border-color: rgba(255,255,255,0.4); }

/* Option B: flat hero */
.ph-hero--flat .ez-hero__main { flex: 1 1 420px; }
.ph-hero--flat .ez-hero__actions { align-self: center; }
.ph-hero--flat .ez-ai-entry { min-inline-size: 220px; }
.ph-hero--flat .ph-tile { background: var(--surface); border-color: var(--border); color: var(--text);
  min-block-size: 104px; }
.ph-hero--flat .ph-tile:hover { border-color: var(--purple); color: var(--purple-dark); box-shadow: var(--shadow-card); }
.ph-hero--flat .ph-tile:focus-visible { outline-color: var(--focus-color); }
.ph-hero--flat .ph-tile__icon { background: var(--purple-tint); color: var(--purple-dark); }
.ph-hero--flat .ph-tile[aria-pressed="true"] { background: var(--selected-bg); border-color: var(--selected-border);
  color: var(--purple-dark); box-shadow: inset 0 0 0 1px var(--selected-border); }
.ph-hero--flat .ph-tile[aria-pressed="true"] .ph-tile__icon { background: var(--purple); color: var(--on-brand); }
/* 1c (chosen): 1a tile row on the white hero. Links read as doorways, not filters. */
/* PHSUBJ: two labelled subject groups (each grows by its tile count, set in JS);
   the two links are compact doors beside the title. */
.ph-tiles__section { display: flex; flex-direction: column; gap: var(--space-2); flex: 1 1 0; min-inline-size: 0; }
.ph-tiles__section .ph-tiles__group { flex: 1 1 auto; }
.ph-tiles__caption { font-size: var(--fs-eyebrow); font-weight: var(--fw-bold); letter-spacing: var(--ls-eyebrow);
  line-height: 1.2; color: var(--text-muted); text-transform: uppercase; }
/* PHSKILL: skills tiles draw the eye with solid purple icon chips (the selected tile keeps its own look) */
.ph-hero--flat .ph-tiles__section--skills .ph-tile__icon { background: var(--purple-deep); color: var(--on-brand); }
.ph-tiles__section--skills .ph-tiles__caption { color: var(--purple-dark); }
.ph-doors { display: flex; flex: 0 0 auto; align-self: flex-start; gap: var(--space-3); min-inline-size: 0; }
.ph-door { display: inline-flex; align-items: center; gap: var(--space-2); min-block-size: 48px;
  padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md);
  background: transparent; color: var(--text-soft); font-family: var(--font-sans); font-size: var(--fs-body-sm);
  font-weight: var(--fw-bold); line-height: var(--lh-heading); text-decoration: none;
  transition: var(--t-color), var(--t-card-lift); }
.ph-door:hover { border-color: var(--purple); color: var(--purple-dark); text-decoration: none; box-shadow: var(--shadow-card); }
.ph-door:focus-visible { outline: 2px solid var(--focus-color); outline-offset: 2px; }
.ph-door__icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  inline-size: 32px; block-size: 32px; border-radius: var(--radius-sm); background: var(--border-soft); color: var(--text-soft); }
.ph-door:hover .ph-door__icon { background: var(--purple-tint); color: var(--purple-dark); }
.ph-door__text { min-inline-size: 0; }
.ph-door__eyebrow { font-size: var(--fs-eyebrow); font-weight: var(--fw-black); letter-spacing: var(--ls-eyebrow); color: var(--purple-dark); }
.ph-door__go { flex: 0 0 auto; opacity: 0.8; }
.ph-hero--flat .ph-tiles__divider { background: var(--border); }
.ph-hero--flat .ph-tile--link { background: transparent; border-color: var(--border); color: var(--text-soft); }
.ph-hero--flat .ph-tile--link .ph-tile__icon { background: var(--border-soft); color: var(--text-soft); }
.ph-hero--flat .ph-tile--link .ph-tile__eyebrow { color: var(--purple-dark); opacity: 1; }
.ph-hero--flat .ph-tile--link:hover .ph-tile__icon { background: var(--purple-tint); color: var(--purple-dark); }

/* ==== 03 FILTER BAR  #filterBarContainer ===================================
   DOM order is the visual order in RTL: selectors → search → summary.
   .ph-filterbar__summary has order:2, so it lands at the inline end whether
   portal_heb.js prepends or appends #rightControls.                         */
.ph-filterbar { position: relative; z-index: var(--z-sticky); margin-block-start: var(--space-5);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); }
.ph-filterbar__row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3) var(--space-4);
  padding: var(--space-4) var(--space-5); }
.ph-filterbar__controls { display: flex; align-items: center; gap: var(--space-3); flex: 1 1 560px; min-inline-size: 0; }
.ph-filterbar__selectors { flex: 0 0 auto; }
.ph-filterbar__selectors .ph-sheet__body { display: flex; align-items: center; gap: var(--space-2); }
.ph-filterbar .ez-search { flex: 1 1 220px; max-inline-size: none; }
.ph-filterbar__summary { order: 2; display: flex; align-items: center; gap: var(--space-1); margin-inline-start: auto; }
.ph-filterbar__summary .ez-filter-summary { white-space: nowrap; }
.ph-count { gap: 0.3em; flex-wrap: nowrap; }
.ph-filterbar__mobile { display: none; }

/* Prominent search (options 5a hero · 5b search-first · 5c sticky). Search is the page's
   main task, so its button is the ONE coral primary on the page. Wrapper: .ph-search. */
.ph-search--plain { display: contents; }
.ph-search:not(.ph-search--plain) { display: flex; align-items: stretch; gap: var(--space-2); flex: 1 1 320px; min-inline-size: 0; }
.ph-search:not(.ph-search--plain) .ez-search { flex: 1 1 auto; max-inline-size: none; }
.ph-search:not(.ph-search--plain) .ez-search__input { min-block-size: 56px; padding-inline: 3rem 1rem;
  border-color: var(--purple); background: var(--surface); box-shadow: var(--shadow-card);
  font-size: var(--fs-body); font-weight: var(--fw-semibold); }
.ph-search:not(.ph-search--plain) .ez-search__input::placeholder { color: var(--text-muted); font-weight: var(--fw-regular); }
.ph-search:not(.ph-search--plain) .ez-search__icon { inset-inline-start: 1rem; color: var(--purple-dark); }
.ph-search__btn { flex: 0 0 auto; min-block-size: 56px; padding-inline: var(--space-6); }
.ph-hero .ph-search--hero { flex: 1 1 100%; max-inline-size: none; padding-inline-end: max(0px, calc(100% - 760px)); }
.ph-filterbar--search-first .ph-filterbar__controls { display: contents; }
.ph-filterbar--search-first .ph-search { order: -1; flex: 1 1 100%; }
.ph-filterbar--sticky { position: sticky; inset-block-start: var(--space-2); }

/* Select (on .device-selector). .active is set by toggleDropdown(). */
.ph-select { position: relative; }
.ph-select__button { display: flex; align-items: center; gap: var(--space-2); min-block-size: var(--tap-min);
  padding-block: 0.45rem; padding-inline: 0.9rem 0.6rem; border: 2px solid var(--border);
  border-radius: var(--radius-md); background: var(--surface); color: var(--text); cursor: pointer;
  white-space: nowrap; -webkit-user-select: none; user-select: none; transition: var(--t-color); }
.ph-select:hover .ph-select__button { border-color: var(--border-strong); }
.ph-select.active .ph-select__button { border-color: var(--purple); }
.ph-select__text { display: inline-flex; align-items: center; gap: var(--space-2); }
.ph-select__label { font-size: var(--fs-body-sm); font-weight: var(--fw-bold); color: var(--text); }
.ph-select__chevron { display: inline-flex; color: var(--text-light); transition: transform var(--dur-fast) var(--ease); }
.ph-select.active .ph-select__chevron { transform: rotate(180deg); }
.ph-select__list { position: absolute; inset-block-start: calc(100% + 4px); inset-inline-start: 0;
  z-index: var(--z-sticky); min-inline-size: 240px; max-block-size: 320px; overflow-y: auto; padding: 4px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover); opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), visibility 0s linear var(--dur-fast); }
.ph-select.active .ph-select__list { opacity: 1; visibility: visible; transform: none;
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.ph-select__options { display: flex; flex-direction: column; gap: 2px; }
.ph-select__option { display: flex; align-items: center; gap: var(--space-2); min-block-size: var(--tap-min);
  padding: 0.55rem 0.7rem; border-radius: var(--radius-sm); font-size: var(--fs-body-sm);
  color: var(--text-soft); text-align: start; cursor: pointer; transition: var(--t-color); }
.ph-select__option:hover { background: var(--border-soft); color: var(--text); }
.ph-select__option.selected { background: var(--selected-bg); color: var(--purple-dark); font-weight: var(--fw-bold); }
.ph-select__option.selected::after { content: ""; flex: 0 0 auto; margin-inline-start: auto; inline-size: 16px;
  block-size: 16px; background: currentColor; -webkit-mask: var(--ph-check) center / contain no-repeat;
  mask: var(--ph-check) center / contain no-repeat; }

/* Click-outside layer (#dropdownOverlay). Sits under the bar, over the page. */
.ph-overlay { position: fixed; inset: 0; z-index: calc(var(--z-sticky) - 1); display: none; background: transparent; }
.ph-overlay.active { display: block; }

/* ==== 04 SELECTED FILTERS  #selectedFiltersRow ============================= */
.ph-filterbar__tags { display: flex; flex-wrap: wrap; gap: var(--space-2); padding: var(--space-3) var(--space-5);
  border-block-start: 1px solid var(--border-soft); }
.ph-filterbar__tags:empty { display: none; }
/* .filter-tag = .ez-chip.ez-chip--removable.ph-applied : an applied filter, tinted purple. */
.ph-applied, .ph-applied:hover:not(:disabled) { background: var(--selected-bg); border-color: var(--tip-border);
  color: var(--purple-dark); cursor: default; }

/* ==== 05 MAIN AREA + SKILLS PANEL ========================================== */
/* Aside first in the DOM = inline start = right in RTL. No order, no margins. */
.ph-main { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: var(--space-5);
  align-items: start; padding-block: var(--space-5) var(--space-8); }
.ph-side { position: sticky; inset-block-start: var(--space-4); display: flex; flex-direction: column;
  gap: var(--space-4); min-inline-size: 0; }

.ph-heroes { align-items: center; gap: var(--space-2); text-align: center; }
.ph-heroes__title { margin: 0; font-size: var(--fs-h3); font-weight: var(--fw-bold); line-height: var(--lh-heading); color: var(--text); }
.ph-heroes__link { display: block; border-radius: var(--radius-md); }
.ph-heroes__img { display: block; block-size: 96px; inline-size: auto; margin-inline: auto; object-fit: contain; }
.ph-heroes__name { margin: 0; font-size: var(--fs-body); font-weight: var(--fw-semibold); color: var(--text-soft); }

.ph-skills { gap: 0; padding: 0; overflow: hidden; }
.ph-skills__head { position: relative; display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-4) var(--space-5) var(--space-3); border-block-end: 1px solid var(--border-soft); }
.ph-skills__title { margin: 0; font-size: var(--fs-h3); font-weight: var(--fw-bold); line-height: var(--lh-heading); color: var(--text); }
/* Long lists scroll inside the panel; the panel itself is sticky. */
.ph-skills__list { display: flex; flex-direction: column; gap: 4px; padding: var(--space-2);
  max-block-size: min(62vh, 620px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
/* Skill = multi-select row with a checkbox mark. Selected is purple, never coral. */
.ph-skill { -webkit-appearance: none; appearance: none; display: flex; flex: 0 0 auto; align-items: flex-start; gap: var(--space-3);
  inline-size: 100%; min-block-size: var(--tap-min); padding: 0.6rem var(--space-3); border: 0;
  border-radius: var(--radius-sm); background: transparent; color: var(--text-soft); font-family: var(--font-sans);
  font-size: var(--fs-body-sm); font-weight: var(--fw-semibold); line-height: 1.45; text-align: start;
  text-wrap: pretty; cursor: pointer; transition: var(--t-color); }
.ph-skill::before { content: ""; flex: 0 0 auto; inline-size: 18px; block-size: 18px; margin-block-start: 1px;
  border: 2px solid var(--border-strong); border-radius: var(--radius-sm); background-color: var(--surface);
  transition: var(--t-chip-select); }
.ph-skill:hover { background: var(--border-soft); color: var(--text); }
.ph-skill:focus-visible { outline: 2px solid var(--focus-color); outline-offset: -2px; }
.ph-skill[aria-pressed="true"] { background: var(--selected-bg); color: var(--purple-dark); }
.ph-skill[aria-pressed="true"]::before { border-color: var(--purple); background: var(--purple) var(--ph-check-on-brand) center / 12px no-repeat; }
/* "Clear selected skills" is appended last by JS; order pulls it to the top and keeps it in reach. */
.ph-skills__clear { order: -1; flex: 0 0 auto; position: sticky; inset-block-start: calc(var(--space-2) * -1); z-index: 1;
  margin-block-end: var(--space-1); background: var(--surface); }

/* ==== 06 ACTIVITY CARD  .education-card ====================================
   Collapsed height is fixed so rows line up; .is-expanded releases it.
   The grid uses align-items:start, so expanding one card never stretches
   its row neighbours (the old expandRow() height sync is removed).          */
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: var(--space-5);
  align-items: start; min-inline-size: 0; }
.ph-grid__full { grid-column: 1 / -1; }

.ph-card { --ph-card-h: 240px; --ph-media-h: 136px; position: relative; display: flex; flex-direction: column;
  block-size: var(--ph-card-h); min-inline-size: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: hidden; cursor: pointer;
  transition: var(--t-card-lift), border-color var(--dur-fast) var(--ease); }
.ph-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.ph-card:focus-visible { outline: 2px solid var(--focus-color); outline-offset: 2px; }
.ph-card.is-expanded { block-size: auto; border-color: var(--border-strong); }
.ph-card.is-expanded:hover { transform: none; }

/* Media: JS keeps setting backgroundColor = card.colorDark (data colour). */
.ph-card__media { position: relative; isolation: isolate; flex: 0 0 var(--ph-media-h); display: flex;
  align-items: flex-end; padding: var(--space-4); background-color: var(--navy); background-size: cover;
  background-position: center; color: var(--on-brand); }
.ph-card__tint { position: absolute; inset: 0; z-index: -2; opacity: 0.7; }
/* Scrim: keeps white titles legible on any data colour, light or saturated. */
.ph-card__scrim { position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, var(--overlay) 0%, var(--overlay) 35%, transparent 100%); }
.ph-card__titles { display: flex; flex-direction: column; gap: 2px; inline-size: 100%; min-inline-size: 0; }
.ph-card__title { margin: 0; font-size: var(--fs-h3); font-weight: var(--fw-bold); line-height: var(--lh-heading);
  color: inherit; text-wrap: pretty; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ph-card__subtitle { margin: 0; font-size: var(--fs-body-sm); color: rgba(255,255,255,0.88);
  direction: ltr; unicode-bidi: isolate; text-align: left; }
[dir="rtl"] .ph-card__subtitle { text-align: right; } /* RTL OVERRIDE: LTR run, page-edge alignment */

/* Icon chips on the media: lock (inline start), open (inline end, on hover) */
.ph-card__chip { position: absolute; inset-block-start: var(--space-3); z-index: 1; display: inline-flex;
  align-items: center; justify-content: center; gap: var(--space-1); min-inline-size: 32px; block-size: 32px;
  padding-inline: var(--space-2); border-radius: var(--radius-pill); background: var(--overlay);
  color: var(--on-brand); font-size: var(--fs-footnote); font-weight: var(--fw-bold); line-height: 1; }
.ph-card__lock { inset-inline-start: var(--space-3); }
.ph-card__open { inset-inline-end: var(--space-3); opacity: 0; transition: var(--t-fade); }
.ph-card:hover .ph-card__open, .ph-card:focus-within .ph-card__open { opacity: 1; }
@media (hover: none) { .ph-card__open { opacity: 1; } }

.ph-card__body { display: flex; flex-direction: column; gap: var(--space-3); flex: 1 1 auto; min-block-size: 0;
  padding: var(--space-4); }
.ph-card__tags { display: flex; flex-wrap: wrap; align-content: flex-start; gap: var(--space-2); }
.ph-card__collapse { align-self: center; }

/* Tags: 26px tall, 8px gap. These numbers feed measureCardTags() (see CLASS-MAP §5). */
.ph-tag { -webkit-appearance: none; appearance: none; display: inline-block; max-inline-size: 100%;
  block-size: 26px; padding-inline: 0.6rem; border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--text-soft); font-family: var(--font-sans); font-size: 0.8125rem;
  font-weight: var(--fw-semibold); line-height: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  vertical-align: top; }
.ph-tag--grade { border-color: transparent; background: var(--border-soft); color: var(--text-muted); }
.ph-tag--more { cursor: pointer; border-color: var(--tip-border); background: var(--tip-bg-from); color: var(--purple-dark);
  direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; transition: var(--t-color); }
.ph-tag--more:hover { border-color: var(--purple); }
.ph-tag--more:focus-visible { outline: 2px solid var(--focus-color); outline-offset: 2px; }
.ph-card.is-expanded .ph-tag { block-size: auto; padding-block: 0.15rem; line-height: 1.45; white-space: normal; }

/* Option B: colour band, title in the body */
.ph-card--band { --ph-card-h: 236px; --ph-media-h: 72px; }
.ph-card--band .ph-card__scrim { display: none; }
.ph-card--band .ph-card__body > .ph-card__titles { color: var(--text); }
.ph-card--band .ph-card__body .ph-card__subtitle { color: var(--text-muted); }

/* ==== 07 FEATURED ROW  #featuredRowContainer ===============================
   Lives inside #cardsContainer as the first grid item. Horizontal track with
   scroll-snap replaces the nth-child hiding rules.                          */
.ph-featured { grid-column: 1 / -1; min-inline-size: 0; padding: var(--space-4) var(--space-5) var(--space-5);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.ph-featured__head { display: flex; align-items: center; gap: var(--space-3); margin-block-end: var(--space-3); }
.ph-featured__icon { display: inline-flex; align-items: center; justify-content: center; inline-size: 36px; block-size: 36px;
  border-radius: var(--radius-md); background: var(--purple-tint); color: var(--purple-dark); }
.ph-featured__title { margin: 0; font-size: var(--fs-h3); font-weight: var(--fw-bold); line-height: var(--lh-heading); color: var(--text); }
.ph-featured__dismiss { margin-inline-start: auto; color: var(--text-muted); }
.ph-featured__track { display: grid; grid-auto-flow: column; grid-auto-columns: 208px; gap: var(--space-3);
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  scrollbar-width: thin; padding-block: 4px var(--space-2); }
.ph-featured__track > * { scroll-snap-align: start; }
.ph-featured__all { display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-2);
  min-block-size: 116px; padding: var(--space-4); border-radius: var(--radius-md); background: var(--hero-gradient-navy);
  color: var(--on-brand); text-decoration: none; transition: var(--t-card-lift); }
.ph-featured__all:hover { color: var(--on-brand); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.ph-featured__all:focus-visible { outline: 2px solid var(--focus-color); outline-offset: 2px; }
.ph-featured__count { font-size: 1.75rem; font-weight: var(--fw-black); line-height: 1.1; font-variant-numeric: tabular-nums; }
.ph-featured__stack { display: flex; flex-direction: column; }
.ph-featured__label { font-size: var(--fs-body-sm); font-weight: var(--fw-semibold); color: rgba(255,255,255,0.85); }
.ph-featured__more { display: inline-flex; align-items: center; gap: var(--space-1); font-size: var(--fs-body-sm); font-weight: var(--fw-bold); }
.ph-featured__item { display: flex; flex-direction: column; gap: var(--space-2); min-block-size: 116px; padding: var(--space-3) var(--space-4);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text);
  text-decoration: none; transition: var(--t-card-lift), border-color var(--dur-fast) var(--ease); }
.ph-featured__item:hover { color: var(--text); text-decoration: none; border-color: var(--purple); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.ph-featured__item:focus-visible { outline: 2px solid var(--focus-color); outline-offset: 2px; }
.ph-featured__badges { display: flex; flex-wrap: wrap; gap: 6px; }
.ph-featured__name { font-size: var(--fs-body-sm); font-weight: var(--fw-semibold); line-height: 1.5; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ==== 08 STATES ============================================================ */
.ph-skeleton-card { block-size: 240px; padding: 0; gap: 0; overflow: hidden; }
.ph-skeleton-card__media { block-size: 136px; border-radius: 0; }
.ph-skeleton-card__body { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4); }
.ph-skeleton-card__tags { display: flex; gap: var(--space-2); }
.ph-skeleton-card__tag { block-size: 26px; inline-size: 30%; border-radius: var(--radius-pill); }

/* ==== 09 RESTRICTED MODAL BODY (showActionModal body) ====================== */
.ph-restricted { display: flex; flex-direction: column; gap: var(--space-2); }
.ph-restricted__lead, .ph-restricted__note { margin: 0; line-height: var(--lh-relaxed); color: var(--text-soft); text-wrap: pretty; }
.ph-restricted__item { margin: 0 0 var(--space-2); font-size: var(--fs-h3); font-weight: var(--fw-bold);
  line-height: var(--lh-heading); color: var(--purple-dark); text-wrap: pretty; }
.ph-restricted-head { align-items: center; }

/* ==== 10 SCROLL-TO-TOP  #hebSimpleScrollBtn ================================ */
/* inline-end = left in RTL, same spot as today, above the feedback widget. */
.ph-scrolltop { -webkit-appearance: none; appearance: none; position: fixed; inset-block-end: 100px; inset-inline-end: 18px;
  z-index: var(--z-sticky); display: inline-flex; align-items: center; justify-content: center; inline-size: 48px; block-size: 48px;
  border: 1px solid var(--border); border-radius: var(--radius-circle); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-card); cursor: pointer; transition: var(--t-color), var(--t-card-lift); }
.ph-scrolltop:hover { border-color: var(--purple); color: var(--purple-dark); transform: translateY(-2px); }
.ph-scrolltop:focus-visible { outline: 2px solid var(--focus-color); outline-offset: 2px; }

/* ==== 11 MOBILE ============================================================
   Sheets: the skills <aside> and the filter selectors are the SAME nodes as
   on desktop. Below 768px CSS turns them into bottom sheets (geometry of
   .ez-drawer at ≤768px); a one-line toggle adds .is-open (CLASS-MAP §4).    */
.ph-sheet__head, .ph-sheet__footer, .ph-sheet__close { display: none; }

@media (max-width: 768px) {
  .ph-container { padding-inline: var(--space-4); }

  /* Header */
  .ph-hero .ez-hero__inner { flex-wrap: nowrap; padding-inline: var(--space-4); } /* nowrap: wrap + stretch would size every row to the tiles' max-content */
  .ph-tiles { max-inline-size: 100%; }
  .ph-hero .ez-hero__title { font-size: var(--fs-hero-mobile); }
  .ph-tiles { flex-direction: column; }
  .ph-tiles__divider { display: none; }
  .ph-tiles__group--subjects { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(var(--space-4) * -1); padding-inline: var(--space-4); padding-block: 2px; }
  .ph-tiles__group--subjects::-webkit-scrollbar { display: none; }
  .ph-tiles__group--subjects .ph-tile { flex: 0 0 104px; min-block-size: 96px; scroll-snap-align: start; }
  .ph-tiles__group--links { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph-tile--link { flex-direction: row; justify-content: flex-start; min-block-size: 64px; padding: var(--space-3);
    padding-inline-end: var(--space-6); text-align: start; }
  .ph-tile--link .ph-tile__icon { inline-size: 36px; block-size: 36px; }
  .ph-tile--link .ph-tile__text { align-items: flex-start; }
  .ph-tile--link .ph-tile__label { font-size: var(--fs-footnote); }
  .ph-hero--flat .ph-tiles { order: 1; }
  /* PHSUBJ: one swipe row for both groups (captions hidden), doors below as two columns */
  .ph-tiles { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(var(--space-4) * -1); padding-inline: var(--space-4); padding-block: 2px; }
  .ph-tiles::-webkit-scrollbar { display: none; }
  .ph-tiles__section, .ph-tiles__section .ph-tiles__group--subjects { display: contents; }
  .ph-tiles__caption { display: none; }
  .ph-doors { order: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-self: stretch; }
  .ph-door { font-size: var(--fs-footnote); }
  .ph-door__go { display: none; }
  .ph-hero--flat .ez-hero__actions { order: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph-hero--flat .ez-ai-entry { min-inline-size: 0; }

  /* Filter bar: search on its own row, sheet buttons + count below */
  .ph-filterbar { z-index: auto; margin-block-start: var(--space-4); }
  .ph-filterbar__row { padding: var(--space-3); gap: var(--space-2); }
  .ph-filterbar__controls { display: contents; }
  .ph-filterbar .ez-search { flex: 1 1 100%; }
  .ph-filterbar__mobile { display: flex; gap: var(--space-2); }
  .ph-filterbar__mobile .ez-btn { inline-size: auto; padding-inline: var(--space-4); font-size: var(--fs-body-sm); }
  .ph-filterbar__summary { flex: 1 1 100%; justify-content: space-between; margin-inline-start: 0; }
  .ph-filterbar__summary .ez-btn { inline-size: auto; }
  .ph-filterbar__tags { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: var(--space-3); }
  .ph-filterbar__tags::-webkit-scrollbar { display: none; }
  .ph-filterbar__tags > * { flex: 0 0 auto; }
  .ph-overlay.active { display: none; }
  .ph-search:not(.ph-search--plain) { flex: 1 1 100%; }
  .ph-search__btn { inline-size: auto; padding-inline: var(--space-4); }
  .ph-filterbar--sticky { inset-block-start: 0; z-index: var(--z-sticky); }
  /* an open sheet must escape the sticky stacking context to sit above the scrim */
  .ph-filterbar--sticky:has(.ph-sheet.is-open) { z-index: auto; }

  /* Bottom sheet */
  .ph-sheet { position: fixed; inset-inline: 0; inset-block: auto 0; z-index: var(--z-modal); display: flex;
    flex-direction: column; gap: 0; max-block-size: 88vh; max-block-size: 88dvh; background: var(--surface);
    border-start-start-radius: var(--radius-lg); border-start-end-radius: var(--radius-lg); box-shadow: var(--shadow-overlay);
    transform: translateY(100%); visibility: hidden; transition: var(--t-drawer), visibility 0s linear var(--dur-slow); }
  .ph-sheet.is-open { transform: none; visibility: visible; transition: var(--t-drawer); }
  .ph-sheet__head { position: relative; display: flex; align-items: center; gap: var(--space-3);
    padding: var(--space-5) var(--space-5) var(--space-3); border-block-end: 1px solid var(--border-soft); }
  .ph-sheet__head::before, .ph-sheet .ph-skills__head::before { content: ""; position: absolute; inset-block-start: 8px;
    inset-inline: 0; margin-inline: auto; inline-size: 40px; block-size: 4px; border-radius: var(--radius-pill); background: var(--border-strong); }
  .ph-sheet__title { margin: 0; font-size: var(--fs-h3); font-weight: var(--fw-bold); color: var(--text); }
  .ph-sheet__close { display: inline-flex; margin-inline-start: auto; }
  .ph-sheet__body, .ph-filterbar__selectors .ph-sheet__body { display: block; flex: 1 1 auto; min-block-size: 0;
    overflow-y: auto; overscroll-behavior: contain; padding: var(--space-2) var(--space-5) var(--space-4); }
  .ph-sheet__footer { display: flex; gap: var(--space-3); padding: var(--space-3) var(--space-5) var(--space-4);
    border-block-start: 1px solid var(--border-soft); background: var(--surface-alt); }

  /* Filter sheet: each selector is a section, its options become chips */
  .ph-sheet .ph-select { padding-block: var(--space-3); border-block-end: 1px solid var(--border-soft); }
  .ph-sheet .ph-select:last-child { border-block-end: 0; }
  .ph-sheet .ph-select--subject { display: none; } /* the hero tiles switch subject on mobile */
  .ph-sheet .ph-select__button, .ph-sheet .ph-select.active .ph-select__button { min-block-size: 0; padding: 0;
    margin-block-end: var(--space-2); border: 0; background: none; cursor: default; }
  .ph-sheet .ph-select__chevron { display: none; }
  .ph-sheet .ph-select__list { position: static; min-inline-size: 0; max-block-size: none; overflow: visible; padding: 0;
    border: 0; background: none; box-shadow: none; opacity: 1; visibility: visible; transform: none; transition: none; }
  .ph-sheet .ph-select__options { flex-direction: row; flex-wrap: wrap; gap: var(--space-2); }
  .ph-sheet .ph-select__option { padding: 0.5rem 0.95rem; border: 2px solid var(--border); border-radius: var(--radius-pill);
    background: var(--surface); color: var(--text-muted); font-weight: var(--fw-bold); }
  .ph-sheet .ph-select__option.selected { background: var(--purple); border-color: var(--purple); color: var(--on-brand); }
  .ph-sheet .ph-select__option.selected::after { display: none; }

  /* Skills sheet: the aside itself */
  .ph-main { grid-template-columns: minmax(0, 1fr); padding-block: var(--space-4) var(--space-7); }
  .ph-heroes { display: none; }
  .ph-sheet .ph-skills { flex: 1 1 auto; min-block-size: 0; display: flex; flex-direction: column;
    border: 0; border-radius: 0; box-shadow: none; }
  .ph-sheet .ph-skills__head { padding-block-start: var(--space-5); }
  .ph-sheet .ph-skills__list { flex: 1 1 auto; max-block-size: none; }

  .ph-grid { gap: var(--space-4); }
  .ph-featured { padding: var(--space-3) var(--space-4) var(--space-4); }
  .ph-featured__track { grid-auto-columns: 184px; }
  .ph-scrolltop { inset-block-end: 88px; inline-size: 44px; block-size: 44px; }
}
@media (max-width: 480px) {
  .ph-container { padding-inline: var(--space-3); }
  .ph-hero .ez-hero__inner { padding-inline: var(--space-3); }
  .ph-tiles__group--subjects { margin-inline: calc(var(--space-3) * -1); padding-inline: var(--space-3); }
  .ph-tiles { margin-inline: calc(var(--space-3) * -1); padding-inline: var(--space-3); }   /* PHSUBJ */
  .ph-featured__dismiss { inline-size: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .ph-tile, .ph-door, .ph-card, .ph-featured__all, .ph-featured__item, .ph-sheet, .ph-select__list, .ph-scrolltop { transition: none; }
  .ph-tile:hover, .ph-card:hover, .ph-featured__all:hover, .ph-featured__item:hover, .ph-scrolltop:hover { transform: none; }
}

/* ==== 12 EZ42 INTEGRATION (added at implementation, 2026-10) ===============
   practice_hub_heb.html is the only page that loads this file, so these
   rules are page-scoped. base_heb.html owns <html>/<body>; the page sets
   <html data-theme="auto"> from its own <head> block.                       */
/* Canvas behind the .ph-page wrapper follows the theme (light #f8fafc / dark #0f172a). */
body { background-color: var(--bg); }
/* .ez-badge sets display:inline-flex, which beats the UA [hidden] rule.
   ph-sheets.js hides the zero-count badges with the hidden attribute. */
.ph-page .ez-badge[hidden] { display: none; }
/* Mobile header: ez-hero__inner becomes a column at ≤768px, where a flex-basis
   is a HEIGHT. Reset the desktop row bases, otherwise the title block takes a
   420px height and the subject tile row collapses to ~0px. */
@media (max-width: 768px) {
  .ph-hero .ez-hero__main,
  .ph-hero--flat .ez-hero__main,
  .ph-tiles,
  .ph-tiles__group--subjects,
  .ph-tiles__group--links { flex: 0 0 auto; }
}

/* >>> PH-CARD-SCRIM-SOFT (2026-10, option 2) ================================
   Softer title scrim on the card media, identical in light and dark (the
   --overlay token went to 45% / 70%). The card's own data colour now shows.
   New composition: page-local token, black alpha, bottom 60% only.
   Tune live in the console:
     document.documentElement.style.setProperty('--ph-card-scrim', 'linear-gradient(0deg, rgba(0,0,0,.30) 0%, transparent 60%)')
*/
:root { --ph-card-scrim: linear-gradient(0deg, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0.10) 35%, transparent 60%); /* @kind color */ }
.ph-card__scrim { background: var(--ph-card-scrim); }
/* <<< PH-CARD-SCRIM-SOFT */
