/* Helalia: el alwan el mamzooga (color-mix) we el rules el nested (&) etghayaro le alwan sabta we rules 3adeya,
   3ashan iPhone iOS 16.1 w a2dam mesh beyefhamhom (el footer kan beyetkasar). Nafs el shakl 3ala ay mobile tany. */
@charset "UTF-8";
/* ============================================================
   HELALIA LANGUAGE SCHOOL — mobile design system
   navy #112c5a · navy-soft #1a3d7a · gold #eed484
   coral #f1595d · cream #f9f1e2 · sky #eef6fa
   Pure CSS. No framework. RTL is a real layout (logical props).
   ============================================================ */

@layer reset, tokens, base, shell, chrome, components, utils;

/* ---------------------------------------------------------- reset */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; padding: 0; }
  html { -webkit-text-size-adjust: 100%; }
  body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
  img, svg, video { display: block; max-width: 100%; }
  button, input, textarea, select { font: inherit; color: inherit; }
  a { color: inherit; text-decoration: none; }
  ul, ol { list-style: none; }
  :focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
}

/* --------------------------------------------------------- tokens */
@layer tokens {
  :root {
    /* brand — locked hex */
    --navy: #112c5a;
    --navy-soft: #1a3d7a;
    --gold: #eed484;
    --coral: #f1595d;
    --cream: #f9f1e2;
    --sky: #eef6fa;
    --white: #ffffff;

    /* OKLCH companions of the brand hex (perceptual mixing base) */
    --navy-ok: oklch(30.5% 0.093 265);
    --navy-soft-ok: oklch(38% 0.107 265);
    --gold-ok: oklch(88% 0.083 88);
    --coral-ok: oklch(65.6% 0.181 24);
    --cream-ok: oklch(95.8% 0.021 85);
    --sky-ok: oklch(96.8% 0.011 230);

    /* derived tints (perceptual, via oklab) */
    --navy-96: #f4f6f8;
    --navy-88: #dfe4eb;
    --navy-70: #b1bbcc;
    --navy-deep: #0c234b;
    --gold-soft: #f8eed0;
    --gold-deep: #c8ab61;
    --coral-soft: #ffe3e1;
    --green: #2e7d5a;
    --green-soft: #deeae3;

    /* text */
    --ink: #16233a;
    --ink-2: #4a5a72;
    --ink-3: #8695a9;
    --on-navy: #ffffff;
    --on-navy-2: #f6e8bd;

    /* type — fluid, container-relative */
    --font-en: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
    --font-ar: "Cairo", "Segoe UI", Tahoma, system-ui, sans-serif;
    --font: var(--font-en);
    --fs-xs: clamp(0.68rem, 0.62rem + 0.25cqi, 0.76rem);
    --fs-sm: clamp(0.78rem, 0.72rem + 0.28cqi, 0.86rem);
    --fs-md: clamp(0.9rem, 0.84rem + 0.3cqi, 0.98rem);
    --fs-lg: clamp(1.05rem, 0.96rem + 0.45cqi, 1.18rem);
    --fs-xl: clamp(1.3rem, 1.1rem + 0.9cqi, 1.55rem);
    --fs-2xl: clamp(1.6rem, 1.3rem + 1.4cqi, 2rem);

    /* shape */
    --r-sm: 12px;
    --r-md: 20px;
    --r-lg: 26px;
    --r-xl: 32px;
    --r-pill: 999px;

    /* elevation — navy-tinted */
    --sh-1: 0 2px 8px -2px rgb(17 44 90 / .10), 0 6px 18px -8px rgb(17 44 90 / .12);
    --sh-2: 0 6px 20px -6px rgb(17 44 90 / .16), 0 16px 40px -20px rgb(17 44 90 / .22);
    --sh-3: 0 12px 34px -10px rgb(17 44 90 / .28), 0 30px 60px -30px rgb(17 44 90 / .34);
    --sh-nav: 0 -6px 26px -10px rgb(17 44 90 / .20);

    /* metrics */
    --gutter: 18px;
    --nav-h: 74px;
    --tap: 46px;

    /* per-tone accent, set by .t-* */
    --accent: var(--navy);
    --accent-soft: var(--navy-88);
  }

  [dir="rtl"] { --font: var(--font-ar); }
  [dir="ltr"] { --font: var(--font-en); }

  .t-navy  { --accent: var(--navy);  --accent-soft: var(--navy-88); }
  .t-gold  { --accent: var(--gold-deep); --accent-soft: var(--gold-soft); }
  .t-coral { --accent: var(--coral); --accent-soft: var(--coral-soft); }
  .t-green { --accent: var(--green); --accent-soft: var(--green-soft); }
  .t-blue  { --accent: var(--navy-soft); --accent-soft: var(--navy-88); }
}

/* ----------------------------------------------------------- base */
@layer base {
  html, body { height: 100%; }
  body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--cream);
    display: block;
    min-height: 100dvh;
  }
}

/* ------------------------------------------------------- shell */
@layer shell {
  /* Fills the viewport edge-to-edge — no device frame. */
  .app {
    container-type: inline-size;
    container-name: app;
    position: relative;
    inline-size: 100%;
    block-size: 100dvh;
    background: var(--cream);
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    /* flex, not grid: a screen may have no header at all, and a fixed
       3-row grid would let the nav stretch into the empty row. */
    display: flex;
    flex-direction: column;
    isolation: isolate;
  }

  /* scrolling page body */
  .page {
    flex: 1 1 auto;
    min-block-size: 0;          /* lets the flex child actually scroll */
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    padding-inline: var(--gutter);
    padding-block-start: 16px;
    padding-block-end: calc(20px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: helalia-page-in 180ms ease-out both;
  }
  /* tablet and up: wider content, capped and centred */
  @media (min-width: 768px) {
    body { background: var(--sky); }
    .app {
      max-inline-size: 720px;
      margin-inline: auto;
      box-shadow: 0 0 0 1px rgb(17 44 90 / 0.08);
    }
  }
  @keyframes helalia-page-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  .page::-webkit-scrollbar { width: 0; }
  /* clear the floating FAB so the last card is never covered */
  .page--fab { padding-block-end: calc(82px + env(safe-area-inset-bottom)); }
  /* clear the floating child photo that overhangs the tab bar */
  .app:has(.nav__fab) .page {
    padding-block-end: calc(var(--fab-overhang, 96px) + env(safe-area-inset-bottom));
  }
  @container app (max-width: 430px) {
    .app:has(.nav__fab) .page { --fab-overhang: 78px; }
  }
  .page--flush { padding-inline: 0; }
  .page--flush > * { margin-inline: var(--gutter); }
  .page--flush > .bleed { margin-inline: 0; }

  /* auth: school photo is the page, navy colour layer over it */
  .app--auth {
    grid-template-rows: 1fr;
    position: relative;
    isolation: isolate;
    background: var(--navy);
    overflow: hidden;
  }
  .app--auth::before { display: none; }
}

/* ------------------------------------- chrome (header / nav / fab) */
@layer chrome {
  /* ---- navy header, sticky, rounded underside ---- */
  .hero {
    position: relative;
    z-index: 3;
    padding-inline: var(--gutter);
    padding-block: max(50px, calc(12px + env(safe-area-inset-top))) 20px;
    color: var(--on-navy);
    background:
      radial-gradient(120% 140% at 88% -30%, rgb(238 212 132 / 0.26), transparent 58%),
      linear-gradient(168deg, var(--navy-soft), var(--navy) 62%, var(--navy-deep));
    border-end-start-radius: var(--r-xl);
    border-end-end-radius: var(--r-xl);
    box-shadow: var(--sh-2);

    overflow: hidden;
  }
  /* gold hairline along the bottom edge */
  .hero::after {
    content: "";
    position: absolute;
    inset-inline: 22px;
    inset-block-end: 0;
    z-index: 2;
    block-size: 1px;
    background: linear-gradient(90deg, transparent, rgb(238 212 132 / 0.7), transparent);
    }
  .hero { flex: none; min-block-size: 0; }
  .hero > * { position: relative; z-index: 1; }
  /* clear the device status bar (clock / battery) */
  .hero--tall { padding-block-start: max(50px, env(safe-area-inset-top)); padding-block-end: 26px; }
  .hero--tall:has(.featured) {
    overflow: visible;
    padding-block-end: 0;
  }
  .hero--tall:has(.featured)::after { display: none; }
  .app:has(> .hero--tall .featured) > .page {
    padding-block-start: 40px;
  }

  /* 1024px Helalia seal — clipped to the navy header so it cannot cover the page */
  .hero--tall::before {
    content: "";
    position: absolute;
    z-index: 0;
    pointer-events: none;
    inset: 0;
    background: url("../img/logo-icon.png") 108% 18% / min(62%, 220px) no-repeat;
    opacity: 0.2;
    -webkit-mask-image: radial-gradient(circle at 78% 28%, #000 36%, transparent 72%);
            mask-image: radial-gradient(circle at 78% 28%, #000 36%, transparent 72%);
  }
  [dir="rtl"] .hero--tall::before {
    background-position: -8% 18%;
    -webkit-mask-image: radial-gradient(circle at 22% 28%, #000 36%, transparent 72%);
            mask-image: radial-gradient(circle at 22% 28%, #000 36%, transparent 72%);
  }

  .hero__row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-block-size: var(--tap);
  }
  .hero__title {
    flex: 1;
    font-size: var(--fs-lg);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
  }
  .hero__eyebrow {
    font-size: var(--fs-xs);
    color: var(--on-navy-2);
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  .hero__lede { font-size: var(--fs-sm); color: rgb(255 255 255 / 0.76); margin-block-start: 4px; }

  /* back chevron — flips with direction */
  .back {
    inline-size: 38px; block-size: 38px;
    display: grid; place-items: center;
    border-radius: var(--r-pill);
    background: rgb(255 255 255 / .12);
    border: 1px solid rgb(255 255 255 / .16);
    font-size: 1.3rem; line-height: 1;
    flex: none;
  }
  .back svg { inline-size: 18px; block-size: 18px; }
  [dir="rtl"] .back svg { transform: scaleX(-1); }


  /* two-up list on wider screens (subject lists) */
  @container app (min-width: 560px) {
    .rows--2up { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  }

  /* ---- children grid: photo-forward cards (parent home) ---- */
  .kids {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }
  @container app (min-width: 340px) {
    .kids { grid-template-columns: 1fr 1fr; }
  }
  .kidcard {
    display: grid;
    grid-template-rows: auto auto;
    background: var(--white);
    border: 1px solid rgb(17 44 90 / 0.09);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--sh-1);
    color: inherit;
    transition: transform 120ms ease, box-shadow 120ms ease;
  }
  .kidcard:active { transform: scale(.985); box-shadow: none; }
  .kidcard__photo {
    position: relative;
    inline-size: 100%;
    aspect-ratio: 4 / 3;
    max-block-size: 200px;
    background: #eff1f5;
  }
  .kidcard__photo img {
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
    object-position: center 25%;
  }
  .kidcard__stage {
    position: absolute;
    inset-block-start: 8px;
    inset-inline-start: 8px;
    padding: 4px 9px;
    border-radius: var(--r-pill);
    font-size: var(--fs-xs);
    font-weight: 800;
    color: var(--navy);
    background: var(--gold);
  }
  /* new-homework flag on a child's card */
  .kidcard__hw {
    position: absolute;
    inset-block-start: 8px;
    inset-inline-end: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-block-size: 26px;
    padding: 0 9px;
    border-radius: var(--r-pill);
    font-size: var(--fs-xs);
    font-weight: 800;
    color: #fff;
    background: var(--coral);
    box-shadow: 0 6px 16px -8px rgb(0 0 0 / .5);
  }
  .kidcard__hw svg { inline-size: 14px; block-size: 14px; }
  .kidcard__body { padding: 10px 12px 13px; display: grid; gap: 2px; }
  .kidcard__name { font-size: var(--fs-md); font-weight: 800; line-height: 1.25; }
  .kidcard__meta { font-size: var(--fs-sm); font-weight: 600; color: rgb(22 35 58 / 0.62); }

  /* ---- dual notification bells with badges ---- */
  .bells { display: flex; gap: 8px; flex: none; }
  .bell {
    position: relative;
    inline-size: 48px; block-size: 48px;
    display: grid; place-items: center;
    border-radius: var(--r-pill);
    background: rgb(255 255 255 / .12);
    border: 1px solid rgb(255 255 255 / .16);
  }
  .bell svg { inline-size: 24px; block-size: 24px; }
  /* the bell rings while there is anything to see */
  @keyframes helalia-ring {
    0%, 58%, 100% { transform: rotate(0deg); }
    62% { transform: rotate(14deg); }
    68% { transform: rotate(-11deg); }
    74% { transform: rotate(8deg); }
    80% { transform: rotate(-6deg); }
    86% { transform: rotate(3deg); }
  }
  .bell:has(.bell__badge) svg {
    transform-origin: 50% 22%;
    animation: helalia-ring 2.6s ease-in-out infinite;
  }
  @media (prefers-reduced-motion: reduce) {
    .bell:has(.bell__badge) svg { animation: none; }
  }
  .bell__badge {
    position: absolute;
    inset-block-start: -4px;
    inset-inline-end: -4px;
    min-inline-size: 23px;
    block-size: 23px;
    padding-inline: 5px;
    border-radius: var(--r-pill);
    display: grid; place-items: center;
    font-size: .83rem; font-weight: 800;
    color: var(--navy);
    background: var(--gold);
    border: 2px solid var(--navy);
  }
  .bell--alert .bell__badge { background: var(--coral); color: #fff; }

  /* ---- featured child card, sits on the navy ---- */
  .featured {
    margin-block-start: 6px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    column-gap: 13px;
    align-items: start;
    padding: 13px;
    border-radius: var(--r-lg);
    background: rgb(255 255 255 / .14);
    border: 1px solid rgb(255 255 255 / .22);
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
  }
  .hero--tall .featured {
    margin-block-end: -24px;
    box-shadow:
      0 16px 34px -12px rgb(17 44 90 / .50),
      0 4px 12px -4px rgb(17 44 90 / .28),
      inset 0 1px 0 rgb(255 255 255 / .24);
  }
  .featured > .av {
    grid-column: 1;
    grid-row: 1 / 3;
  }
  .featured__body { display: contents; }
  .featured__name { grid-column: 2; grid-row: 1; font-size: var(--fs-lg); font-weight: 700; line-height: 1.2; min-inline-size: 0; }
  .featured__meta { grid-column: 2; grid-row: 2; font-size: var(--fs-sm); color: var(--on-navy-2); margin-block-start: 2px; min-inline-size: 0; }
  .featured__tags {
    grid-column: 1 / -1;
    grid-row: 3;
    display: flex;
    gap: 6px;
    margin-block-start: 10px;
    flex-wrap: wrap;
  }
  .featured__go { grid-column: 3; grid-row: 1 / 3; align-self: center; font-size: 1.4rem; opacity: .7; }
  [dir="rtl"] .featured__go { transform: scaleX(-1); }

  .tag {
    display: inline-flex; align-items: center; white-space: nowrap;
    font-size: var(--fs-xs); font-weight: 700;
    padding: 3px 10px; border-radius: var(--r-pill);
    background: var(--gold); color: var(--navy);
  }
  .tag--soft { background: rgb(255 255 255 / .18); color: #fff; }

  /* ---- bottom nav: 5 tabs + raised navy FAB ---- */
  .nav {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: end;
    padding-block: 8px calc(8px + env(safe-area-inset-bottom));
    padding-inline: 6px;
    background: #fffefd;
    border-block-start: 1px solid rgb(17 44 90 / 0.08);
    box-shadow: var(--sh-nav);
    min-block-size: var(--nav-h);
    flex: none;
    overflow: visible;
  }
  /* pages without the centre photo split evenly across the tabs they have */
  .nav:not(:has(.nav__fab)) { grid-template-columns: repeat(4, 1fr); }
  /* a single-tab footer centres its one item */
  .nav--single, .nav--single:not(:has(.nav__fab)) { grid-template-columns: 1fr; }
  .nav--trio, .nav--trio:not(:has(.nav__fab)) { grid-template-columns: repeat(3, 1fr); }
  .nav__item {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding-block: 8px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--ink-3);
    border-radius: var(--r-sm);
  }
  .nav__item svg { inline-size: 28px; block-size: 28px; }
  .nav__item.is-active { color: var(--navy); }
  .nav__item.is-active .nav__dot { opacity: 1; }
  /* each tab keeps its own brand colour, labels stay ink */
  .nav__item svg { color: var(--tab-tint, currentColor); }
  .nav__item[href*="parent-view"] { --tab-tint: var(--navy); }
  .nav__item[href*="parent-homework"] { --tab-tint: var(--coral); }
  .nav__item[href*="parent-alerts"] { --tab-tint: #a38745; }
  .nav__item[href*="parent-settings"],
  .nav__item[href*="parent-profile"] { --tab-tint: var(--green); }
  .nav__dot {
    inline-size: 5px; block-size: 5px; border-radius: 50%;
    background: var(--gold); opacity: 0;
  }
  .nav__fab {
    --fab-size: 84px;
    --fab-lift: 28px;
    justify-self: center;
    inline-size: var(--fab-size); block-size: var(--fab-size);
    margin-block-end: 10px;
    /* lifted clear of the bar */
    position: relative;
    z-index: 5;
    inset-block-start: calc(var(--fab-lift) * -1);
    margin-block-start: calc(var(--fab-lift) * -1);
    overflow: hidden;
    display: grid; place-items: center;
    border-radius: var(--r-pill);
    color: var(--gold);
    background: linear-gradient(160deg, var(--navy-soft), var(--navy));
    box-shadow: 0 10px 22px -6px rgb(17 44 90 / .55), 0 0 0 5px #f9f2e4;
    transition: transform 160ms ease, box-shadow 160ms ease;
  }
  .nav__fab svg { inline-size: 26px; block-size: 26px; }
  .nav__fab img {
    inline-size: 100%;
    block-size: 100%;
    border-radius: inherit;
    object-fit: cover;
    object-position: center 25%;
  }
  /* on narrow phones the circle must not crowd the tabs either side */
  @container app (max-width: 430px) {
    .nav__fab { --fab-size: 84px; --fab-lift: 28px; }
  }
  .nav__fab:hover { transform: translateY(-3px); }
  .nav__fab:active { transform: translateY(-1px) scale(0.96); }

  /* floating round FAB (video: bottom-end above nav) */
  .fab {
    position: absolute;
    inset-block-end: calc(var(--nav-h) + 14px);
    inset-inline-end: var(--gutter);
    z-index: 5;
    inline-size: 50px; block-size: 50px;
    display: grid; place-items: center;
    border-radius: var(--r-pill);
    color: var(--gold);
    background: linear-gradient(160deg, var(--navy-soft), var(--navy));
    box-shadow: var(--sh-2);
    transition: transform 160ms ease, box-shadow 160ms ease;
  }
  .fab svg { inline-size: 23px; block-size: 23px; }
  .fab:hover { transform: translateY(-3px); }
  .fab:active { transform: translateY(-1px) scale(0.96); }
}

/* ----------------------------------------------------- components */
@layer components {
  /* ---- light header (video: "Subjects" / "Alerts" screens) ---- */
  .topline {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
  }
  .bells--light .bell {
    color: var(--navy);
    background: #eff1f5;
    border-color: rgb(17 44 90 / 0.1);
  }
  .bells--light .bell__badge { border-color: var(--cream); }
  .page--top { padding-block-start: calc(14px + env(safe-area-inset-top)); }

  /* ---- section heading ---- */
  .sec {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 12px; margin-block-start: 2px;
  }
  .sec__title { font-size: var(--fs-md); font-weight: 800; letter-spacing: -0.01em; }
  .sec__link { font-size: var(--fs-sm); font-weight: 700; color: var(--navy-soft); }
  .lede { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.55; }

  /* ---- page title block (light screens) ---- */
  .title { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }

  /* ---- avatar monogram ---- */
  .av {
    inline-size: 46px; block-size: 46px; flex: none;
    border-radius: 15px;
    display: grid; place-items: center;
    font-weight: 800; font-size: var(--fs-md);
    color: var(--navy);
    background: linear-gradient(155deg, var(--gold), #f6e8bd);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / .5);
  }
  img.av { object-fit: cover; object-position: center 30%; }
  .av--lg { inline-size: 102px; block-size: 102px; border-radius: 20px; font-size: var(--fs-lg); }
  .av--sm { inline-size: 38px; block-size: 38px; border-radius: 12px; font-size: var(--fs-sm); }

  /* student profile header: portrait floats out of the card */
  .featured--profile {
    position: relative;
    align-items: center;
    gap: 10px;
    margin-block-start: 16px;
    padding: 18px;
  }
  .featured--profile .av--lg {
    position: relative;
    inset-block-start: -36px;
    margin-block-end: -46px;
    inline-size: 100px;
    block-size: 100px;
    border-radius: 30px;
    border: 3px solid var(--white);
    object-fit: cover;
    object-position: center 25%;
    box-shadow: 0 14px 30px -14px rgb(0 0 0 / .45);
  }

  .av.t-coral { background: linear-gradient(155deg, var(--coral), #ffb0ad); color: #fff; }
  .av.t-green { background: linear-gradient(155deg, var(--green), #99bda9); color: #fff; }
  .av.t-blue,
  .av.t-navy  { background: linear-gradient(155deg, var(--navy-soft), var(--navy)); color: var(--gold); }

  /* ---- quick row: 4 icon shortcuts ---- */
  .quickrow {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  /* three shortcuts: keep them tile-sized and centred, not stretched */
  .quickrow--3 {
    grid-template-columns: repeat(3, minmax(0, 116px));
    justify-content: center;
    gap: 10px;
  }
  .quick {
    position: relative;
    display: grid; justify-items: center; gap: 6px;
    padding: 12px 4px;
    border-radius: var(--r-md);
    background: var(--white);
    box-shadow: var(--sh-1);
    font-size: .66rem; font-weight: 700; color: var(--ink-2);
    text-align: center;
  }
  .quick__ico {
    inline-size: 38px; block-size: 38px;
    display: grid; place-items: center;
    border-radius: 13px;
    color: var(--accent);
    background: var(--accent-soft);  }
  .quick__ico svg { inline-size: 20px; block-size: 20px; }
  /* 3D artwork shortcuts: the picture is the icon, no tinted plate */
  .quick__ico--art {
    inline-size: 90px; block-size: 90px;
    background: none;
    border-radius: 0;
  }
  .quick__ico--art img { inline-size: 100%; block-size: 100%; object-fit: contain; }
  .quickrow--3 .quick { padding: 12px 6px 11px; gap: 8px; }
  .quick__badge {
    position: absolute; inset-block-start: 8px; inset-inline-end: 8px;
    min-inline-size: 17px; block-size: 17px; padding-inline: 4px;
    border-radius: var(--r-pill);
    display: grid; place-items: center;
    font-size: .62rem; font-weight: 800;
    background: var(--coral); color: #fff;
  }

  /* ---- feature tiles (2-col) ---- */
  .tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  @container app (min-width: 380px) { .tiles { gap: 13px; } }
  .tile {
    position: relative;
    display: grid; gap: 10px;
    padding: 16px;
    border-radius: var(--r-md);
    background: var(--white);
    box-shadow: var(--sh-1);
    overflow: hidden;
  }
  .tile::after {
    content: "";
    position: absolute;
    inset-block-start: 0; inset-inline-end: 0;
    inline-size: 74px; block-size: 74px;
    background: radial-gradient(circle at 100% 0, var(--accent-soft), transparent 68%);
    opacity: .85;
    pointer-events: none;
    }
  .tile__ico {
    inline-size: 42px; block-size: 42px;
    display: grid; place-items: center;
    border-radius: 14px;
    color: var(--accent);
    background: var(--accent-soft);
    position: relative; z-index: 1;
  }
  .tile__ico svg { inline-size: 22px; block-size: 22px; }
  /* 3D artwork tiles: the picture is the icon, no tinted plate */
  .tile__ico--art {
    inline-size: 100px; block-size: 100px;
    justify-self: center;
    background: none;
    border-radius: 0;
  }
  .tile__ico--art img { inline-size: 100%; block-size: 100%; object-fit: contain; }
  /* artwork tiles read as centred cards */
  .tile:has(.tile__ico--art) {
    justify-items: center;
    text-align: center;
    gap: 6px;
    padding: 14px 12px 16px;
    margin:  5px;
  }
  .tile:has(.tile__ico--art)::after { display: none; }
  /* "new items" flag on a tile */
  .tile__new {
    position: absolute;
    inset-block-start: 8px;
    inset-inline-end: 8px;
    z-index: 2;
    min-inline-size: 24px;
    block-size: 24px;
    padding-inline: 7px;
    border-radius: var(--r-pill);
    display: grid; place-items: center;
    font-size: var(--fs-xs); font-weight: 800;
    color: #fff;
    background: var(--coral);
    box-shadow: 0 6px 14px -8px rgb(0 0 0 / .5);
  }
  .tile__label { font-size: var(--fs-md); font-weight: 700; line-height: 1.25; position: relative; z-index: 1; }
  .tile__meta { font-size: var(--fs-xs); color: var(--ink-3); position: relative; z-index: 1; }

  /* ---- list rows: left colour bar + round count ---- */
  .rows { display: grid; gap: 9px; }
  /* older rows, revealed by "Load more" */
  .rows .hw--old { display: none; }
  .rows.is-expanded .hw--old { display: flex; }
  .row {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    padding: 13px 14px;
    padding-inline-start: 20px;
    border-radius: var(--r-md);
    background: var(--white);
    box-shadow: var(--sh-1);
    overflow: hidden;
  }
  /* the colour bar — inline-start, so it flips in RTL */
  .row::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    inset-block: 10px;
    inline-size: 5px;
    border-start-end-radius: 4px;
    border-end-end-radius: 4px;
    background: var(--accent);
    }
  .row--plain { padding-inline-start: 14px; }
  .row--plain::before { display: none; }
  .row__ico {
    inline-size: 38px; block-size: 38px; flex: none;
    display: grid; place-items: center;
    border-radius: 12px;
    color: var(--accent);
    background: var(--accent-soft);
  }
  .row__ico svg { inline-size: 20px; block-size: 20px; }
  .row__body { flex: 1; min-inline-size: 0; }
  .row__title { font-size: var(--fs-md); font-weight: 700; line-height: 1.3; }
  .row__meta {
    font-size: var(--fs-sm); color: var(--ink-2); margin-block-start: 2px;
    line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .row__time { font-size: var(--fs-xs); color: var(--ink-3); margin-block-start: 4px; }
  /* round count badge */
  .row__count {
    flex: none;
    min-inline-size: 28px; block-size: 28px; padding-inline: 8px;
    border-radius: var(--r-pill);
    display: grid; place-items: center;
    font-size: var(--fs-sm); font-weight: 800;
    color: var(--white);
    background: var(--accent);
  }
  .row__count--gold { background: var(--gold); color: var(--navy); }
  .row__go { flex: none; font-size: 1.25rem; color: var(--ink-3); line-height: 1; }
  [dir="rtl"] .row__go { transform: scaleX(-1); }
  .row.is-unread .row__title::after {
    content: ""; display: inline-block;
    inline-size: 7px; block-size: 7px; border-radius: 50%;
    background: var(--coral); margin-inline-start: 7px; vertical-align: middle;
  }
  /* read vs unread alerts — unread carries weight, read steps back */
  .row.is-unread {
    background: var(--white);
    border-color: rgb(241 89 93 / 0.3);
  }
  .row.is-unread .row__title { font-weight: 800; }
  .row.is-read {
    background: #f7f8fa;
  }
  .row.is-read .row__title { font-weight: 700; color: var(--ink-2); }
  .row.is-read .row__ico { opacity: .55; }
  .row.is-read .row__meta,
  .row.is-read .row__time { color: var(--ink-3); }

  /* ---- segmented tabs ---- */
  .tabs {
    display: flex; gap: 4px; padding: 4px;
    border-radius: var(--r-pill);
    background: #eceff3;
  }
  .tab {
    flex: 1; text-align: center;
    padding-block: 8px;
    border-radius: var(--r-pill);
    font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2);
  }
  .tab.is-active { background: var(--white); color: var(--navy); box-shadow: var(--sh-1); }

  /* horizontally scrollable filter tabs (child picker) */
  .tabs--scroll {
    flex: 0 0 auto;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .tabs--scroll::-webkit-scrollbar { height: 0; }
  .tabs--scroll .tab {
    flex: 0 0 auto;
    scroll-snap-align: center;
    padding-inline: 16px;
    padding-block: 9px;
    white-space: nowrap;
  }


  /* ---- generic card ---- */
  .card {
    padding: 16px;
    border-radius: var(--r-md);
    background: var(--white);
    box-shadow: var(--sh-1);
  }

  .btn--danger {
    color: #fff;
    background: var(--coral);
    border: 1px solid transparent;
  }
  .btn--danger:active { background: #bf4548; }

  /* ---- alert detail: photo, when, text ---- */
  .adet { flex: 0 0 auto; padding: 0; overflow: hidden; }
  .adet__media {
    inline-size: 100%; 
    background: #eff1f5;
  }
  .adet__media img { inline-size: 100%; block-size: 100%; object-fit: cover; }
  .adet__body { display: grid; gap: 10px; padding: 16px; }
  .adet__when {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: var(--fs-xs); font-weight: 700;
    color: var(--ink-3);
  }
  .adet__when svg { inline-size: 14px; block-size: 14px; }
  .adet__title { font-size: var(--fs-lg); font-weight: 800; letter-spacing: -.02em; }
  .adet__link {
    justify-self: start;
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--navy);
    text-decoration: underline;
    text-underline-offset: 3px;
    min-block-size: 44px;
    display: inline-flex;
    align-items: center;
  }
  .adet__actions {
    display: flex;
    gap: 10px;
    padding-block-start: 4px;
  }
  .adet__actions .btn { flex: 1; min-block-size: 50px; }
  .adet__text { font-size: var(--fs-sm); line-height: 1.7; color: var(--ink-2); text-wrap: pretty; }

  .card--navy {
    color: var(--on-navy);
    background: linear-gradient(160deg, var(--navy-soft), var(--navy));
    box-shadow: var(--sh-2);
  }
  .card--outline { background: transparent; box-shadow: none; border: 1px dashed rgb(17 44 90 / 0.22); }

  /* ---- stat tiles ---- */
  .stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stats--3up { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stats--4up { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .stats--4up { align-items: stretch; }
  .stats--4up .stat:not(.stat--action) { padding: 11px 9px; display: grid; align-content: space-between; gap: 6px; text-align: center; }
  .stats--4up .stat__label { font-size: var(--fs-sm); color: var(--ink-2); }
  .stats--4up .stat__value { font-size: var(--fs-xl); letter-spacing: -.02em; }
  /* the action sits in the row as its own cell, no card behind it */
  .stats .stat--action {
    display: grid;
    align-content: stretch;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .stats .stat--action .btn {
    inline-size: 100%;
    block-size: 100%;
    min-block-size: 0;
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 4px;
    padding: 11px 12px;
    line-height: 1.2;
    text-align: start;
    text-wrap: balance;
  }
  .stats .stat--action .btn svg { inline-size: 18px; block-size: 18px; flex: none; }
  .stats--3up .stat { padding: 12px 10px; }
  .stats--3up .stat__value { font-size: var(--fs-md); }
  .stat {
    padding: 14px;
    border-radius: var(--r-md);
    background: var(--white);
    box-shadow: var(--sh-1);
  }
  .stat__label { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; line-height: 1.35; }
  .stat__value { font-size: var(--fs-xl); font-weight: 800; color: var(--accent); margin-block-start: 6px; letter-spacing: -0.02em; }
  .meter {
    block-size: 6px; border-radius: var(--r-pill);
    background: #e7eaf0;
    margin-block-start: 10px; overflow: hidden;
  }
  .meter__fill { block-size: 100%; border-radius: var(--r-pill); background: var(--accent); }

  /* ---- calendar rows ---- */
  .cal {
    display: flex; align-items: center; gap: 13px;
    padding: 12px 14px;
    border-radius: var(--r-md);
    background: var(--white);
    box-shadow: var(--sh-1);
  }
  .cal__date {
    inline-size: 50px; flex: none;
    padding-block: 7px;
    border-radius: 14px;
    text-align: center;
    color: var(--accent);
    background: var(--accent-soft);
  }
  .cal__day { display: block; font-size: var(--fs-lg); font-weight: 800; line-height: 1; }
  .cal__mon { display: block; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-block-start: 3px; }

  /* ---- weekly plan ---- */
  .plan { display: grid; gap: 9px; }
  .plan__row {
    display: grid;
    grid-template-columns: 62px 1fr;
    align-items: center; gap: 12px;
    padding: 13px 14px;
    border-radius: var(--r-md);
    background: var(--white);
    box-shadow: var(--sh-1);
  }
  .plan__day {
    font-size: var(--fs-sm); font-weight: 800; color: var(--accent);
    padding: 6px 4px; border-radius: 10px;
    background: var(--accent-soft); text-align: center;
  }

  /* ---- gallery ---- */
  .photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .photo {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--navy-88);
    box-shadow: var(--sh-1);
  }
  .photo img { inline-size: 100%; block-size: 100%; object-fit: cover; }
  .photo__cap {
    position: absolute; inset-inline: 0; inset-block-end: 0;
    padding: 16px 10px 8px;
    font-size: var(--fs-xs); font-weight: 700; color: #fff;
    background: linear-gradient(transparent, rgb(9 18 36 / .78));
  }
  .photo--wide { grid-column: span 2; aspect-ratio: 16 / 9; }

  /* ---- year calendar: 12 mini months, event days marked ---- */
  .year {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  @container app (min-width: 560px) { .year { grid-template-columns: repeat(3, 1fr); } }


  .hwtitle {
    font-size: var(--fs-lg);
    font-weight: 800;
    color: #000;
    line-height: 1.25;
    letter-spacing: -.02em;
  }

  /* ---- weekly plan: one block per Friday-to-Friday week ---- */
  .week { display: grid; gap: 10px; }
  .week + .week { margin-block-start: 18px; }
  .week--old { display: none; }
  .week--old.is-shown { display: grid; }
  /* expandable day rows */
  .planitem {
    border-radius: var(--r-md);
    background: var(--white);
    box-shadow: var(--sh-1);
    overflow: hidden;
  }
  .planitem .plan__row {
    inline-size: 100%;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    text-align: start;
    cursor: pointer;
    box-shadow: none;
    border-radius: 0;
  }
  .plan__panel { display: none; padding: 0 14px 14px 18px; }
  .planitem.is-open .plan__panel { display: grid; gap: 10px; }
  [dir="rtl"] .plan__panel { padding: 0 18px 14px 14px; }
  .plan__panel .shots { grid-template-columns: repeat(6, 1fr); gap: 6px; }
  .plan__panel .shots--2 { grid-template-columns: repeat(3, 1fr); }
  .plan__note { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.55; }
  .plan__sub { font-size: var(--fs-xs); font-weight: 800; color: var(--ink-3); }
  .weekhead {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    padding-block-end: 8px;
    border-block-end: 2px solid rgb(17 44 90 / 0.12);
  }
  .weekhead__range { font-size: var(--fs-md); font-weight: 800; color: var(--navy); }
  .weekhead__tag { font-size: var(--fs-xs); font-weight: 800; color: var(--ink-3); }
  .weekhead__tag--now { color: var(--coral); }

  /* ---- timeline posts: feed cards ---- */
  .posts { display: grid; gap: 26px; }
  .post {
    inline-size: 100%;
    display: grid;
    padding: 0;
    border: 0;
    border-radius: var(--r-md);
    background: var(--white);
    box-shadow: var(--sh-1);
    overflow: hidden;
    font: inherit;
    color: inherit;
    text-align: start;
    cursor: pointer;
  }
  .post__head {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 10px;
  }
  .post__av {
    inline-size: 40px; block-size: 40px;
    border-radius: var(--r-pill);
    object-fit: cover;
    background: #eaedf1;
  }
  .post__who { display: grid; gap: 1px; }
  .post__author { font-size: var(--fs-sm); font-weight: 800; }
  .post__date { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; }
  .post__title { padding: 0 14px 6px; font-size: var(--fs-md); font-weight: 800; line-height: 1.3; }
  .post__excerpt {
    padding: 0 14px 12px;
    font-size: var(--fs-sm);
    color: var(--ink-2);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .post__media { position: relative; aspect-ratio: 16 / 9; background: #eff1f5; }
  .post__media img { inline-size: 100%; block-size: 100%; object-fit: cover; }
  .post__play {
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: 50%;
    transform: translate(-50%, -50%);
    inline-size: 52px; block-size: 52px;
    display: grid; place-items: center;
    border-radius: var(--r-pill);
    background: rgb(9 16 30 / .6);
    color: #fff;
  }
  .post__play svg { inline-size: 28px; block-size: 28px; }
  .post__foot {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 14px;
    border-block-start: 1px solid rgb(17 44 90 / 0.08);
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--ink-3);
  }
  .post__tag {
    padding: 2px 8px;
    border-radius: var(--r-pill);
    background: #eaedf1;
    color: var(--navy);
    font-size: .62rem;
    font-weight: 800;
  }
  .post--old { display: none; }
  .posts.is-expanded .post--old { display: grid; }

  .modal__media {
    inline-size: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    overflow: hidden;
    background: #eff1f5;
  }
  .modal__media img { inline-size: 100%; block-size: 100%; object-fit: cover; }
  .modal__link {
    justify-self: start;
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--navy);
    text-decoration: underline;
    text-underline-offset: 3px;
    min-block-size: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* ---- gallery: media picker → albums → contents ---- */
  .gal { display: grid; gap: 12px; }
  .gal__pick { display: grid; grid-template-columns: 1fr; gap: 14px; }
  @container app (min-width: 420px) { .gal__pick { grid-template-columns: 1fr 1fr; } }
  .gal__type {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 4px;
    min-block-size: 0;
    padding: 22px 16px 20px;
    border: 0;
    border-radius: var(--r-md);
    background: var(--white);
    box-shadow: var(--sh-1);
    font: inherit;
    color: inherit;
    text-align: center;
    cursor: pointer;
  }
  .gal__type.is-active { box-shadow: inset 0 0 0 2px var(--navy), var(--sh-1); }
  .gal__type-ico {
    inline-size: 38px; block-size: 38px;
    display: grid; place-items: center;
    border-radius: 12px;
    margin-block-end: 8px;
    color: var(--accent);
    background: var(--accent-soft);
  }
  .gal__type-ico svg { inline-size: 20px; block-size: 20px; }
  .gal__type-ico--art {
    inline-size: min(150px, 46cqi); block-size: min(150px, 46cqi);
    margin-block-end: 12px;
    background: none;
    border-radius: 0;
  }
  .gal__type-ico--art img { inline-size: 100%; block-size: 100%; object-fit: contain; mix-blend-mode: multiply; }
  .gal__type-name { font-size: var(--fs-lg); font-weight: 800; letter-spacing: -.02em; }
  .gal__type-meta { font-size: var(--fs-sm); color: var(--ink-3); }

  .albums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .album {
    position: relative;
    padding: 0;
    border: 0;
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--sh-1);
    font: inherit;
    color: inherit;
    text-align: start;
    cursor: pointer;
  }
  .album.is-active { box-shadow: inset 0 0 0 2px var(--navy), var(--sh-1); }
  .album__cover { aspect-ratio: 4 / 3; background: #eff1f5; }
  .album__cover img { inline-size: 100%; block-size: 100%; object-fit: cover; }
  .album__body { padding: 9px 11px 11px; display: grid; gap: 2px; }
  .album__name { font-size: var(--fs-sm); font-weight: 800; }
  .album__meta { font-size: var(--fs-xs); color: var(--ink-3); }

  /* ---- lightbox slideshow ---- */
  .light {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgb(6 11 20 / .92);
  }
  .light.is-open { display: flex; }
  .light__stage {
    inline-size: 100%;
    max-inline-size: 75%;
    display: grid;
    gap: 12px;
    justify-items: center;
    padding: 14px;
    border-radius: 20px;
    background: rgb(17 24 40 / .96);
    border: 1px solid rgb(255 255 255 / .12);
  }
  .light__frame {
    inline-size: 100%;
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #fff;
    color: var(--ink-2);
    font-size: var(--fs-sm);
    font-weight: 700;
    overflow: hidden;
  }
  .light__frame img { inline-size: 100%; block-size: 100%; object-fit: contain; }
  .light__caption { color: #fff; font-size: var(--fs-sm); font-weight: 700; text-align: center; }
  .light__bar { display: flex; align-items: center; gap: 12px; }
  .light__btn {
    inline-size: 48px; block-size: 48px;
    display: grid; place-items: center;
    border: 1px solid rgb(255 255 255 / .28);
    border-radius: var(--r-pill);
    background: rgb(255 255 255 / .1);
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
  }
  .light__count { color: rgb(255 255 255 / .8); font-size: var(--fs-xs); font-weight: 700; min-inline-size: 46px; text-align: center; }
  .light .btn--more { margin-inline: 0; inline-size: 100%; }

  /* ---- expandable detail groups ---- */
  .folds { display: grid; gap: 9px; }
  .fold {
    position: relative;
    border-radius: var(--r-md);
    background: var(--white);
    box-shadow: var(--sh-1);
    overflow: hidden;
  }
  .fold::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    inline-size: 4px;
    background: var(--accent);
    }
  .fold__head {
    inline-size: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    min-block-size: 64px;
    padding: 12px 14px 12px 18px;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    text-align: start;
    cursor: pointer;
  }
  [dir="rtl"] .fold__head { padding: 12px 18px 12px 14px; }
  .fold__body { display: grid; gap: 2px; flex: 1; }
  .fold__body .row__title,
  .fold__body .row__meta { display: block; }
  .fold__chev {
    flex: none;
    font-size: 1.25rem;
    color: var(--ink-3);
    transition: transform 140ms ease;
  }
  [dir="rtl"] .fold__chev { transform: scaleX(-1); }
  .fold.is-open .fold__chev { transform: rotate(90deg); }
  .fold__panel { display: none; padding: 0 14px 12px 18px; }
  .fold.is-open .fold__panel { display: grid; gap: 2px; }
  .fold__item {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 11px;
    row-gap: 2px;
    min-block-size: 52px;
    align-content: center;
    padding: 8px 10px;
    border-radius: 12px;
    background: #f4f6f8;
    color: inherit;
  }
  .fold__item-ico {
    grid-row: span 2;
    inline-size: 25px; block-size: 25px;
    display: grid; place-items: center;
    border-radius: 8px;
    font-size: .55rem; font-weight: 800; letter-spacing: .02em;
    color: #fff;
  }
  .fold__item-ico--doc { background: #2b579a; }
  .fold__item-ico--xls { background: #1d7044; }
  .fold__item-ico--pdf { background: #c8332b; }
  .fold__item-ico svg,
  .fold__item-ico > * { inline-size: 15px; block-size: 15px; flex: none; }
  /* picture tiles inside a fold panel */
  .shots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding-block-start: 2px;
  }
  .shot {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgb(17 44 90 / 0.12);
    border-radius: 12px;
    background: #eff1f5;
    color: var(--ink-3);
    font: inherit;
    font-size: var(--fs-xs);
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
  }
  .shot img { inline-size: 100%; block-size: 100%; object-fit: cover; }
  .shot.is-big {
    grid-column: 1 / -1;
    aspect-ratio: 4 / 3;
  }
  .shots--2 { grid-template-columns: repeat(2, 1fr); }
  .shot--vid { position: relative; aspect-ratio: 16 / 10; }
  .shot__play {
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: 50%;
    transform: translate(-50%, -50%);
    inline-size: 38px; block-size: 38px;
    display: grid; place-items: center;
    border-radius: var(--r-pill);
    background: rgb(9 16 30 / .62);
    color: #fff;
  }
  .shot__play svg { inline-size: 22px; block-size: 22px; }
  .shot__len {
    position: absolute;
    inset-block-end: 6px;
    inset-inline-end: 6px;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgb(9 16 30 / .72);
    color: #fff;
    font-size: .62rem;
    font-weight: 800;
  }
  .light__frame--vid { position: relative; }
  .light__frame--vid::after {
    content: "";
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: 50%;
    transform: translate(-50%, -50%);
    inline-size: 56px; block-size: 56px;
    border-radius: var(--r-pill);
    background: rgb(9 16 30 / .6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M9 7.5v9l7.5-4.5z'/%3E%3C/svg%3E") center / 30px no-repeat;
  }
  .fold__item-ico--img { background: var(--navy); }
  .fold__item-ico--vid { background: var(--coral); }
  .fold__item-ico--link { background: var(--gold-deep); color: var(--navy); }
  .fold__item-title,
  .fold__item-meta { grid-column: 2; }
  .fold__item-title { font-size: var(--fs-sm); font-weight: 700; }
  .fold__item-meta { font-size: var(--fs-xs); color: var(--ink-3); }

  /* ---- file upload row ---- */
  .upload {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    min-block-size: 64px;
    padding: 12px 14px;
    border-radius: var(--r-md);
    border: 1.5px dashed rgb(17 44 90 / 0.24);
    background: #f7f8fa;
    cursor: pointer;
  }
  .upload input[type="file"] { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
  .upload__ico {
    inline-size: 40px; block-size: 40px;
    display: grid; place-items: center;
    border-radius: 13px;
    color: var(--navy);
    background: #e4e8ee;
  }
  .upload__ico svg { inline-size: 20px; block-size: 20px; }
  .upload__body { display: grid; gap: 2px; }
  .upload__title { font-size: var(--fs-sm); font-weight: 800; color: var(--navy); }
  .upload__meta { font-size: var(--fs-xs); color: var(--ink-3); }

  /* ---- collapsible event cards ---- */
  .cal--fold { cursor: pointer; }
  .cal--fold .cal__more {
    display: none;
    font-size: var(--fs-sm);
    color: var(--ink-2);
    line-height: 1.5;
    margin-block-start: 6px;
  }
  .cal--fold.is-open .cal__more { display: block; }
  .cal__chev {
    flex: none;
    font-size: 1.1rem;
    color: var(--ink-3);
    transition: transform 140ms ease;
  }
  .cal--fold.is-open .cal__chev { transform: rotate(90deg); }

  /* ---- event modal ---- */
  .modal {
    position: fixed;
    inset: 0;
    z-index: 1000; /* above the footer bar (F16 / N13) */
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgb(9 16 30 / .55);
  }
  .modal.is-open { display: flex; }
  .modal__card {
    inline-size: 100%;
    max-inline-size: 95%;
    padding: 20px;
    border-radius: var(--r-lg, 22px);
    background: var(--white);
    box-shadow: var(--sh-3);
    display: grid;
    gap: 10px;
    text-align: start;
  }
  .modal__date { font-size: var(--fs-xs); font-weight: 800; color: var(--coral); text-transform: uppercase; letter-spacing: .05em; }
  .modal__title { font-size: var(--fs-lg); font-weight: 800; line-height: 1.25; }
  .modal__meta { font-size: var(--fs-sm); color: var(--ink-2); }
  .modal__card { max-block-size: calc(100dvh - 40px - env(safe-area-inset-bottom)); overflow: auto; }
  /* Close stays visible at the bottom of the card while the text scrolls (F16 / N13) */
  .modal__close { margin-block-start: 4px; position: sticky; inset-block-end: 0; background: var(--white); z-index: 2; }

  /* ---- month switcher ---- */
  .calnav {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin-block-end: 10px;
  }
  .calnav__btn {
    inline-size: 44px; block-size: 44px;
    display: grid; place-items: center;
    border: 1px solid rgb(17 44 90 / 0.12);
    border-radius: var(--r-md);
    background: var(--white);
    color: var(--navy);
  }
  .calnav__btn svg { inline-size: 20px; block-size: 20px; }
  [dir="rtl"] .calnav__btn svg { transform: scaleX(-1); }
  .calnav__label { font-size: var(--fs-lg); font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
  .ymon--single { padding: 14px 12px 16px; }
  .ymon--single .ymon__grid { gap: 4px; }
  .ymon--single .ymon__dow {
    font-size: var(--fs-xs);
    padding-block: 7px;
    border-radius: 8px;
    color: var(--navy);
    background: #e7eaf0;
  }
  .ymon--single .yday { font-size: var(--fs-sm); border-radius: 10px; }
  .ymon--single .ymon__name { display: none; }

  .ymon {
    padding: 11px 10px 12px;
    border-radius: var(--r-md);
    background: var(--white);
    box-shadow: var(--sh-1);
  }
  .ymon__name {
    font-size: var(--fs-sm); font-weight: 800; color: var(--navy);
    margin-block-end: 8px;
  }
  .ymon__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
  }
  .ymon__dow {
    font-size: .58rem; font-weight: 800; color: var(--ink-3);
    text-align: center; padding-block-end: 3px;
  }
  .yday {
    aspect-ratio: 1;
    display: grid; place-items: center;
    border-radius: 7px;
    border: 0;
    background: none;
    font: inherit;
    font-size: .64rem; font-weight: 600;
    color: var(--ink-2);
    padding: 0;
  }
  .yday--pad { visibility: hidden; }
  .yday--event {
    font-weight: 800;
    color: #fff;
    background: var(--coral);
    cursor: pointer;
  }
  .yday--today { box-shadow: inset 0 0 0 1.5px var(--navy); }
  .ycount { font-size: var(--fs-sm); color: var(--ink-2); font-weight: 600; }
  .ykey { display: flex; align-items: center; gap: 7px; font-size: var(--fs-xs); color: var(--ink-3); }
  .ykey__dot { inline-size: 12px; block-size: 12px; border-radius: 4px; background: var(--coral); }

  /* ---- ask school: question rows with replies ---- */
  .qa { display: grid; gap: 9px; }
  .qa__item {
    border-radius: var(--r-md);
    background: var(--white);
    box-shadow: var(--sh-1);
    overflow: hidden;
  }
  .qa__q {
    inline-size: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    min-block-size: var(--tap);
    padding: 13px 14px;
    border: 0;
    background: none;
    text-align: start;
    font: inherit;
    color: inherit;
    cursor: pointer;
  }
  .qa__title { display: block; font-size: var(--fs-md); font-weight: 700; line-height: 1.3; }
  .qa__time { display: block; font-size: var(--fs-xs); color: var(--ink-3); margin-block-start: 3px; }
  .qa__flag {
    display: inline-flex; align-items: center; gap: 5px;
    min-block-size: 28px;
    padding-inline: 9px;
    border-radius: var(--r-pill);
    font-size: var(--fs-xs); font-weight: 800;
    color: var(--green); background: var(--green-soft);
  }
  .qa__flag svg { inline-size: 15px; block-size: 15px; }
  .qa__flag--wait { color: var(--ink-2); background: #e7eaf0; }
  .qa__a {
    display: none;
    padding: 0 14px 14px;
    border-block-start: 1px solid rgb(17 44 90 / 0.08);
    margin-block-start: 0;
  }
  .qa__item.is-open .qa__a { display: grid; gap: 4px; padding-block-start: 12px; }
  .qa__from { font-size: var(--fs-xs); font-weight: 800; color: var(--navy); }
  .qa__adate { font-size: var(--fs-xs); color: var(--ink-3); }
  .qa__item--old { display: none; }
  .qa.is-expanded .qa__item--old { display: block; }
  .qa__more { margin-block-start: 2px; }
  .qa.is-expanded + .qa__more { display: none; }
  .qa__reply { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.55; }

  /* ---- forms ---- */
  .field { display: grid; gap: 6px; }
  .field__label { font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2); }
  .input {
    inline-size: 100%;
    min-block-size: var(--tap);
    padding: 12px 15px;
    border-radius: var(--r-md);
    border: 1px solid rgb(17 44 90 / 0.13);
    background: var(--white);
    /* iOS Safari/WebView auto-zooms el page kolaha lama el user yedos fe
       input font-size beta3o < 16px -- --fs-md beyeb2a ~14-16px 3ala 7asb
       el container. max(16px, ...) beysaman el UI zay ma heya 3ala shashet
       desktop/kbeera, bas beyman3 el zoom el mozeg da 3ala mobile daymn. */
    font-size: max(16px, var(--fs-md));
    color: var(--ink);
  }
  .input::placeholder { color: var(--ink-3); }
  .input:focus { border-color: var(--navy-soft); outline: none; box-shadow: 0 0 0 3px rgb(17 44 90 / 0.14); }
  textarea.input { min-block-size: 116px; resize: vertical; line-height: 1.55; }
  select.input {
    appearance: none;
    padding-inline-end: 40px;
    font-weight: 600;
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: calc(100% - 20px) 51%, calc(100% - 14px) 51%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
  }
  [dir="rtl"] select.input {
    background-position: 20px 51%, 14px 51%;
  }

  .btn {
    inline-size: 100%;
    min-block-size: var(--tap);
    display: inline-grid; place-items: center;
    padding: 13px 20px;
    border-radius: var(--r-md);
    border: 0;
    font-size: var(--fs-md); font-weight: 700;
    cursor: pointer;
  }
  .btn--primary {
    color: var(--gold);
    background: linear-gradient(160deg, var(--navy-soft), var(--navy));
    box-shadow: var(--sh-2);
  }
  .btn--gold { color: var(--navy); background: var(--gold); box-shadow: var(--sh-1); }
  .btn--ghost {
    color: var(--white);
    background: rgb(255 255 255 / .12);
    border: 1px solid rgb(255 255 255 / .28);
  }
  .btn--sm {
    min-block-size: 40px;
    padding-inline: 14px;
    font-size: var(--fs-sm);
    inline-size: auto;
  }
  .sec .btn--sm { flex: none; }
  .btn--quiet { color: var(--navy); background: var(--white); box-shadow: var(--sh-1); }
  /* load-more control */
  .btn--more {
    inline-size: auto;
    margin-inline: 22px;
    margin-block-start: 4px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-left: 100px;
    margin-right: 100px;
  }
  .btn--more[aria-busy="true"] { pointer-events: none; opacity: .8; }
  .spin {
    inline-size: 17px; block-size: 17px;
    border-radius: 50%;
    border: 2px solid rgb(17 44 90 / 0.22);
    border-block-start-color: var(--navy);
    animation: hls-spin 700ms linear infinite;
  }
  @keyframes hls-spin { to { transform: rotate(360deg); } }
  @media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2s; } }

  .checkline { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: var(--fs-sm); }
  .checkline__box { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 600; }
  .checkline input { inline-size: 18px; block-size: 18px; accent-color: var(--navy); }

  /* ---- settings list ---- */
  .settings { border-radius: var(--r-md); background: var(--white); box-shadow: var(--sh-1); overflow: hidden; }
  .settings__item {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px;
    min-block-size: var(--tap);
    font-size: var(--fs-md); font-weight: 600;
  }
  .settings__item + .settings__item { border-block-start: 1px solid rgb(17 44 90 / 0.07); }
  .settings__item span:first-of-type { flex: 1; }
  .settings__go { color: var(--ink-3); font-size: 1.2rem; line-height: 1; }
  [dir="rtl"] .settings__go { transform: scaleX(-1); }
  .settings__item--danger { color: var(--coral); font-weight: 700; }

  /* ---- chips ---- */
  .chip {
    display: inline-grid; place-items: center;
    white-space: nowrap;
    padding: 4px 11px;
    border-radius: var(--r-pill);
    font-size: var(--fs-xs); font-weight: 700;
    color: var(--accent);
    background: var(--accent-soft);
  }
  .chip--solid { color: #fff; background: var(--accent); }
  .chip--gold { color: var(--navy); background: var(--gold); }
  /* absence outcomes */
  .chip--ok { color: #fff; background: var(--green, #2f9e5e); }
  .chip--no { color: #fff; background: var(--coral); }
  .chip--wait { color: var(--navy); background: #dfe4eb; }
  .chiprow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

  /* ---- radio groups + required marks ---- */
  .req { color: var(--coral); font-weight: 800; }
  fieldset.field { border: 0; margin: 0; padding: 0; }
  fieldset.field > legend { padding: 0; }
  .opts { display: grid; gap: 4px; }
  .opt {
    display: flex; align-items: center; gap: 10px;
    min-block-size: var(--tap);
    padding-inline: 12px;
    border-radius: 12px;
    font-size: var(--fs-sm); font-weight: 600;
    background: #f4f6f8;
    cursor: pointer;
  }
  .opt input { position: absolute; opacity: 0; pointer-events: none; }
  .opt__box {
    flex: none;
    inline-size: 20px; block-size: 20px;
    border-radius: 50%;
    border: 2px solid #a7b3c6;
    display: grid; place-items: center;
  }
  .opt__box::after {
    content: ""; inline-size: 10px; block-size: 10px;
    border-radius: 50%; background: var(--navy); transform: scale(0);
    transition: transform .16s ease;
  }
  /* Sibling-selector fallback first (works on EVERY browser, no :has() needed —
     input yeb2a odam .opt__box fel HTML fa el ~ combinator beyshtaghal daymn).
     Da el 7al el 7a2i2y — mesh el :has() elly ba3do, 3ashan mobile WebView
     adeema (keteera fel madares) mesh 3arfa :has() aslan, fa el "checked" dot/
     border kanet mabtzharsh khales lama el parent yedos 3ala ekhteyar — beyheseb
     zay el form etwa22aft/glitched, mesh ay data et2ala3t fe3lan. */
  .opt input:checked ~ .opt__box { border-color: var(--navy); }
  .opt input:checked ~ .opt__box::after { transform: scale(1); }
  .opt input:focus-visible ~ .opt__box { outline: 2px solid var(--navy-soft); outline-offset: 2px; }
  /* :has() progressive enhancement — el background tint bta3 el satr kolo (mesh
     mehtaga fallback keda keda, el JS beyzabetha kaman gowa sync() lel .opt) */
  .opt:has(input:checked) {
    background: #e4e8ee;
    color: var(--navy);
  }
  .opt.is-checked {
    background: #e4e8ee;
    color: var(--navy);
  }
  /* conditional follow-up fields */
  [data-reveal] { display: none; }
  [data-reveal].is-on { display: grid; }

  /* ---- auth screens — full-bleed photo + navy veil + glass form ---- */
  .auth {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-block-size: 0;
    display: flex;
    flex-direction: column;
    padding: 0;
    color: var(--on-navy);
    background: transparent;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    scrollbar-width: none;
  }
  .auth::-webkit-scrollbar { width: 0; }
  .auth__hero,
  .auth__cover {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    background: var(--navy);
    pointer-events: none;
    isolation: isolate;
  }
  .auth__hero-img,
  img.auth__cover {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center 38%;
    transform: scale(1.08);
    filter: saturate(0.92) contrast(1.05);
  }
  /* navy colour layer — blends into the photo instead of sitting on top as a tab */
  .auth__hero::after,
  .auth__cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #112c5a;
    mix-blend-mode: multiply;
    opacity: 0.72;
  }
  /* readability + gold brand wash */
  .auth__hero::before,
  .auth__cover::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
      radial-gradient(90% 55% at 50% -8%, rgb(238 212 132 / .26), transparent 58%),
      linear-gradient(180deg, rgb(17 44 90 / .22) 0%, rgb(17 44 90 / .28) 36%, rgb(10 22 48 / .78) 100%);
  }
  .auth .between {
    position: relative;
    z-index: 3;
    padding: calc(14px + env(safe-area-inset-top)) 18px 0;
    width: 100%;
  }
  .auth__err {
    display: none;
    margin: 0;
    padding: 10px 12px;
    border-radius: var(--r-md);
    background: #ffddda;
    color: #7a1216;
    font-size: var(--fs-sm);
    font-weight: 700;
    text-align: center;
  }
  .auth__err.is-on { display: block; }
  .auth__brand {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 26px 26px 20px;
    margin: 0;
    position: relative;
    z-index: 2;
  }
  .auth__logo {
    inline-size: 92px;
    block-size: 92px;
    border-radius: 28px;
    padding: 10px;
    background: rgb(255 255 255 / .16);
    border: 1px solid rgb(238 212 132 / .55);
    box-shadow: 0 16px 40px -16px rgb(0 0 0 / .45);
    object-fit: contain;
    backdrop-filter: blur(12px);
  }
  .auth__name {
    font-size: var(--fs-lg);
    font-weight: 800;
    text-align: center;
    letter-spacing: -0.02em;
    color: #fff;
  }
  .auth__tag { font-size: var(--fs-sm); color: var(--on-navy-2); text-align: center; }
  .auth__form {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 14px;
    inline-size: min(100% - 36px, 420px);
    margin-inline: auto;
    margin-block-start: 0;
    margin-block-end: calc(24px + env(safe-area-inset-bottom));
    padding: 22px 20px;
    border-radius: 26px;
    background: var(--navy);
    border: 1px solid rgb(238 212 132 / 0.34);
    box-shadow: 0 26px 60px -28px rgb(0 0 0 / .6);
  }
  .auth .input {
    min-block-size: 52px;
    color: var(--navy);
    background: #fff;
    border: 1px solid rgb(17 44 90 / 0.14);
  }
  .auth__form .btn { min-block-size: 54px; }
  .auth .checkline { min-block-size: 44px; align-items: center; }
  .auth .field__label,
  .auth .checkline__box { color: #fff; }
  .auth .checkline input { accent-color: var(--gold); }
  .auth .checkline { padding-inline: 0; }
  .auth__foot {
    position: relative;
    z-index: 2;
    margin-block-start: auto;
    padding: 16px 22px calc(18px + env(safe-area-inset-bottom));
    display: grid;
    gap: 10px;
    justify-items: center;
  }
  .auth__link { font-size: var(--fs-sm); font-weight: 700; color: var(--gold); }
  .auth__fine { font-size: var(--fs-xs); color: rgb(255 255 255 / 0.62); text-align: center; line-height: 1.6; }
  .auth__foot:empty { padding: 0; }
  .auth__demo {
    display: grid; gap: 3px;
    padding: 11px 14px;
    border-radius: var(--r-md);
    background: rgb(255 255 255 / .08);
    border: 1px dashed rgb(238 212 132 / .38);
    font-size: var(--fs-xs);
    color: rgb(255 255 255 / 0.78);
    text-align: center;
  }
  .auth__demo b { color: var(--gold); font-weight: 800; }
  .auth .btn--ghost {
    color: #fff;
    background: rgb(255 255 255 / .10);
    border: 1px solid rgb(255 255 255 / .28);
  }
  .auth .back {
    color: #fff;
    background: rgb(17 44 90 / .45);
    border-color: rgb(255 255 255 / .28);
    backdrop-filter: blur(10px);
  }

  /* language switch pill */
  .lang {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 13px;
    border-radius: var(--r-pill);
    font-size: var(--fs-xs); font-weight: 700;
    color: var(--navy);
    background: var(--gold);
  }
  .lang--onnavy { color: #fff; background: rgb(255 255 255 / .14); border: 1px solid rgb(255 255 255 / .24); }
  .lang--quiet {
    color: var(--navy);
    background: transparent;
    border: 1px solid rgb(17 44 90 / 0.18);
  }

  /* empty state */
  .empty {
    display: grid; justify-items: center; gap: 8px;
    padding: 34px 20px;
    border-radius: var(--r-md);
    background: var(--white);
    box-shadow: var(--sh-1);
    text-align: center;
    color: var(--ink-2);
    font-size: var(--fs-sm);
  }

  /* thank-you / confirmation state */
  .thanks {
    display: grid; justify-items: center; gap: 14px;
    padding: 40px 22px;
    border-radius: var(--r-md);
    background: var(--white);
    box-shadow: var(--sh-1);
    text-align: center;
  }
  .thanks__mark {
    inline-size: 76px; block-size: 76px;
    border-radius: 50%;
    display: grid; place-items: center;
    color: #fff;
    background: var(--green, #2f9e5e);
    box-shadow: var(--sh-2);
  }
  .thanks__mark svg { inline-size: 38px; block-size: 38px; }
  .thanks__title { font-size: var(--fs-lg); font-weight: 800; letter-spacing: -0.01em; }
  .thanks__body { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.6; max-inline-size: 34ch; }

  /* note / callout */
  .note {
    padding: 13px 15px;
    border-radius: var(--r-md);
    background: #fbf4e0;
    border: 1px solid #f6e8bd;
    font-size: var(--fs-sm);
    color: #0a1f43;
    line-height: 1.55;
  }
  .note--navy { background: var(--navy-88); border-color: var(--navy-70); color: var(--navy); }

  /* index / launcher page */
  .launch {
    inline-size: min(560px, 92vw);
    padding: 34px 30px;
    border-radius: var(--r-xl);
    background: var(--white);
    box-shadow: var(--sh-3);
    display: grid; gap: 20px; justify-items: center;
    text-align: center;
  }
  .launch__logo { inline-size: 92px; block-size: 92px; object-fit: contain; }
  .launch__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; inline-size: 100%; }
  .launch__meta { font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.7; }

  /* splash — logo in the middle, modern language choice */
  .app.app--splash {
    background:
      radial-gradient(120% 70% at 50% 18%, rgb(238 212 132 / .28), transparent 58%),
      linear-gradient(180deg, rgb(17 44 90 / .35) 0%, rgb(17 44 90 / .78) 42%, #0d1b38 100%),
      #112c5a url("../img/login.jpg") center / cover no-repeat;
  }
  .splash {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: calc(28px + env(safe-area-inset-top)) 22px calc(22px + env(safe-area-inset-bottom));
    color: #fff;
  }
  .splash__brand {
    display: grid;
    justify-items: center;
    gap: 14px;
    margin-block-end: auto;
    margin-block-start: auto;
    text-align: center;
  }
  .splash__logo {
    width: min(58%, 196px);
    height: auto;
    filter: drop-shadow(0 18px 36px rgb(0 0 0 / .28));
  }
  .splash__name {
    font-size: var(--fs-lg);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
  }
  .splash__hint {
    font-size: var(--fs-sm);
    color: #f6e8bd;
    font-weight: 600;
  }
  .splash__langs {
    display: grid;
    gap: 12px;
    width: 100%;
    margin-block-start: 28px;
  }
  .splash__lang {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 14px;
    min-block-size: 64px;
    padding: 12px 16px;
    border-radius: 20px;
    background: rgb(255 255 255 / .12);
    border: 1px solid rgb(255 255 255 / .18);
    color: #fff;
    box-shadow: 0 10px 28px -16px rgb(0 0 0 / .45);
    backdrop-filter: blur(10px);
  }
  .splash__lang:active { transform: scale(0.98); }
  .splash__lang--gold {
    background: var(--gold);
    border-color: transparent;
    color: var(--navy);
  }
  .splash__lang-code {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: rgb(17 44 90 / .16);
    color: inherit;
  }
  .splash__lang--gold .splash__lang-code { background: rgb(17 44 90 / .10); }
  .splash__lang b { display: block; font-size: 16px; font-weight: 800; line-height: 1.2; }
  .splash__lang small { display: block; margin-top: 2px; font-size: 12px; opacity: .72; font-weight: 600; }
  .splash__lang-go { font-size: 22px; opacity: .55; font-weight: 400; }
  .splash__copy {
    margin: 0;
    text-align: center;
    font-size: 11px;
    color: rgb(255 255 255 / .48);
    line-height: 1.5;
  }
  .splash__copy span { color: var(--gold); }
  /* ch154: Ascendra + © + device code at very bottom, centered */
  .splash__foot {
    margin-block-start: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-block-start: 18px;
    text-align: center;
  }
  .splash__powered {
    display: block;
    width: 100px;
    height: auto;
    margin: 0 auto;
    opacity: .95;
  }
  .splash__device {
    margin: 0;
    max-width: 100%;
    padding: 0 8px;
    color: rgba(255, 255, 255, .55);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .02em;
    line-height: 1.35;
    word-break: break-all;
    text-align: center;
    font-family: ui-monospace, Consolas, Monaco, monospace;
  }
}

/* ---------------------------------------------------------- utils */
@layer utils {
  .stack { display: grid; gap: 12px; }
  .stack--sm { gap: 8px; }
  .row-flex { display: flex; align-items: center; gap: 10px; }
  .between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .grow { flex: 1; min-inline-size: 0; }
  .center { text-align: center; }
  .muted { color: var(--ink-2); }
  .tiny { font-size: var(--fs-xs); color: var(--ink-3); }
  .mt-a { margin-block-start: auto; }
  .nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hide { display: none; }
}

/* ------------------------------------------------- interactions */
.tile, .row, .quick, .cal, .card, .featured, .btn {
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}
.tile:active, .row:active, .quick:active, .cal:active, .card:active, .featured:active, .btn:active {
  transform: scale(0.98);
}

@media (hover: hover) {
  .tile:hover, .row:hover, .quick:hover, .cal:hover, .card:hover { transform: translateY(-1px); }
  .btn:hover { filter: brightness(1.06); }
  .photo:hover img { transform: scale(1.04); }
  .photo img { transition: transform .35s ease; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .tile:active, .row:active, .quick:active, .cal:active, .card:active, .featured:active, .btn:active,
  .nav__fab:hover, .nav__fab:active, .fab:hover, .fab:active { transform: none; }
}

@media print {
  body { background: #fff; display: block; }
  .app { inline-size: 100%; block-size: auto; box-shadow: none; border-radius: 0; }
  .nav, .fab { display: none; }
}


.pulse {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}
