/* Lama Sans, the app's only typeface. The files are made by tool/fonts.sh
   from assets/fonts of the Flutter app. `swap` shows text in a system font
   until the face arrives, so text is readable at once. */
@font-face {
  font-family: "Lama Sans";
  src: url("/fonts/LamaSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lama Sans";
  src: url("/fonts/LamaSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lama Sans";
  src: url("/fonts/LamaSans-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lama Sans";
  src: url("/fonts/LamaSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lama Sans";
  src: url("/fonts/LamaSans-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lama Sans";
  src: url("/fonts/LamaSans-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* The app's design values as CSS variables: colours, type, shapes, layout.
   lib/theme/app_theme.dart of the Flutter app is the source; a change there
   is repeated here by hand. */


:root {
  /* ── Brand primaries ──────────────────────────────────────────────────── */
  --medura-ink: #23204f;          /* headlines, dark CTA fills */
  --medura-violet: #592ea7;       /* brand accent voice */
  --medura-periwinkle: #9eaafd;
  --medura-lavender: #d5dafd;

  /* ── Ink ramp (text) ──────────────────────────────────────────────────── */
  --medura-ink-900: #23204f;
  --medura-ink-700: #44406e;
  --medura-ink-500: #5b5882;
  --medura-ink-300: #8b88a8;
  --medura-ink-100: #cfcce0;

  /* ── Violet tints ─────────────────────────────────────────────────────── */
  --medura-violet-soft: #efeafb;  /* chip / icon-tile fills */
  --medura-violet-tint: #f6f3fd;  /* barely-there wash */

  /* ── Semantic surfaces ────────────────────────────────────────────────── */
  --medura-background: #f3f1fb;   /* the lavender-washed page */
  --medura-surface: #ffffff;      /* the floating white card */
  --medura-surface-alt: #f8f7fd;  /* tinted inset — session strips, row fills */
  --medura-border: #e8e6f4;       /* hairline */
  --medura-track: #eeecf7;        /* progress-bar troughs */

  /* ── Semantic text ────────────────────────────────────────────────────── */
  --medura-text-primary: #23204f;    /* headlines, primary labels */
  --medura-text-body: #44406e;       /* paragraphs */
  --medura-text-secondary: #5b5882;  /* supporting text, metadata */
  --medura-text-tertiary: #8b88a8;   /* captions, placeholders, eyebrows */
  --medura-text-on-ink: #ffffff;     /* type on an ink CTA */

  /* ── Semantic accent ──────────────────────────────────────────────────── */
  --medura-accent: #592ea7;
  --medura-accent-light: #9eaafd;
  --medura-accent-soft: #efeafb;

  /* ── Status pairs — always the pair, never the fill alone ─────────────── */
  --medura-success: #0f8a5f;
  --medura-success-surface: #e3f5ef;
  --medura-warning: #d9802a;        /* urgency: "8 seats left" */
  --medura-warning-surface: #fdf4ea;
  --medura-danger: #d9534f;
  --medura-danger-surface: #fdeeee;
  --medura-gold: #c9a24b;           /* accreditation, credits */
  --medura-gold-surface: #fbf1dd;
}


:root {
  /* ── Corner radii ─────────────────────────────────────────────────────── */
  --medura-radius-sm: 12px;
  --medura-radius-md: 16px;    /* inputs, snackbars */
  --medura-radius-card: 22px;  /* the default card radius — course, settings */
  --medura-radius-lg: 24px;    /* dialogs */
  --medura-radius-xl: 30px;
  --medura-radius-sheet: 28px; /* bottom-sheet top corners */
  --medura-radius-pill: 999px; /* every button, chip and tab */

  /* ── Elevation — layered, navy-tinted. Never a grey shadow. ───────────── */
  /* Cards in feeds: a tight contact shadow plus a wide, lifted bloom. */
  --medura-shadow-card:
    0 2px 4px rgba(28, 25, 71, 0.04),
    0 14px 30px -12px rgba(28, 25, 71, 0.1);
  /* Search bars, small pills, icon buttons. */
  --medura-shadow-soft:
    0 1px 2px rgba(28, 25, 71, 0.05),
    0 8px 24px -10px rgba(28, 25, 71, 0.1);
  /* The floating bottom navigation shell. */
  --medura-shadow-nav:
    0 -1px 0 rgba(28, 25, 71, 0.04),
    0 12px 40px -8px rgba(28, 25, 71, 0.22);

  /* ── Borders ──────────────────────────────────────────────────────────── */
  --medura-border-width: 1.5px;  /* chips, outlined buttons, checkboxes */
  --medura-hairline-width: 1px;  /* dividers, card edges */

  /* ── Gradients — avatars, course thumbnails, provider marks ───────────── */
  --medura-gradient-avatar: linear-gradient(135deg, #6a4bf0, #3f2bb5);
  --medura-gradient-thumb-coral: linear-gradient(135deg, #ff8a73, #d9534f);
  --medura-gradient-thumb-violet: linear-gradient(135deg, #8a6bff, #5b3fd6);
  --medura-gradient-thumb-teal: linear-gradient(135deg, #56c2a8, #2e8f7a);
  --medura-gradient-thumb-blue: linear-gradient(135deg, #3b6fe0, #1f3f9e);
  --medura-gradient-thumb-slate: linear-gradient(135deg, #b7b1d6, #7d77a3);

  /* ── Layout ───────────────────────────────────────────────────────────── */
  --medura-breakpoint-tablet: 600px;
  --medura-width-feed: 560px;     /* feeds and lists cap here */
  --medura-width-content: 680px;  /* forms and detail pages breathe wider */
  --medura-page-padding: 18px;    /* horizontal, phone */
  --medura-page-padding-tablet: 32px;
  --medura-screen-top-gap: 20px;  /* below the status bar, before content */
  --medura-nav-bottom-gap: 132px; /* clears the floating bottom nav */

  --medura-page-bottom-gap: 24px; /* under a page with no bottom bar */

  /* ── Control metrics ──────────────────────────────────────────────────── */
  --medura-control-height: 54px;     /* primary CTA / outlined button */
  --medura-control-padding-x: 22px;
  --medura-input-padding-x: 18px;
  --medura-input-padding-y: 16px;
  --medura-chip-padding-x: 14px;
  --medura-chip-padding-y: 8px;

  /* ── Flutter's sizing of Material buttons, by the system it runs on ───── */
  /* On a desktop system (Windows, macOS, Linux) Flutter lays its Material
     buttons out "compact": 8 less in height and width than the theme's
     numbers, and no extra room around them. On a phone or tablet it uses the
     theme's numbers and keeps at least 48 around each button for a finger.
     The website has no word for the system, so it takes the pointer: a
     finger is a phone or tablet. */
  --medura-density-trim: 8px;
  --medura-tap-target: 0px;

  /* The room at the sides of a TextButton's words. Material gives 12, and
     with an icon 12 before it and 16 after the words, for a label of size
     14, and narrows it as the label grows; the app's labels are 15. */
  --medura-text-button-padding: 11.714px;
  --medura-text-button-padding-icon-start: 11.429px;
  --medura-text-button-padding-icon-end: 15.143px;
}

@media (pointer: coarse) {
  :root {
    --medura-density-trim: 0px;
    --medura-tap-target: 48px;
  }
}


:root {
  --medura-font-family: "Lama Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* ── Sizes ────────────────────────────────────────────────────────────── */
  --medura-size-display-lg: 40px;   /* hero numerals, oversized statements */
  --medura-size-display-md: 32px;
  --medura-size-display-sm: 28px;   /* page titles — "Browse", "My Learning" */
  --medura-size-headline-lg: 24px;
  --medura-size-headline-md: 20px;
  --medura-size-headline-sm: 18px;  /* card titles */
  --medura-size-title-lg: 16px;
  --medura-size-title-md: 15px;
  --medura-size-title-sm: 13px;
  --medura-size-body-lg: 16px;
  --medura-size-body-md: 14px;
  --medura-size-body-sm: 12px;
  --medura-size-label-lg: 15px;     /* button labels */
  --medura-size-label-md: 13px;
  --medura-size-label-sm: 10px;     /* eyebrows */

  /* ── Weights ──────────────────────────────────────────────────────────── */
  --medura-weight-regular: 400;
  --medura-weight-medium: 500;      /* body copy */
  --medura-weight-semibold: 600;    /* labels, buttons */
  --medura-weight-bold: 700;        /* card + section titles */
  --medura-weight-extrabold: 800;   /* display, page titles, eyebrows */

  /* ── Tracking — negative as type grows, positive as it shrinks ────────── */
  --medura-tracking-display-lg: -1px;
  --medura-tracking-display-md: -0.8px;
  --medura-tracking-display-sm: -0.7px;
  --medura-tracking-headline-lg: -0.5px;
  --medura-tracking-headline-md: -0.4px;
  --medura-tracking-headline-sm: -0.3px;
  --medura-tracking-title-lg: -0.2px;
  --medura-tracking-label-lg: 0.1px;
  --medura-tracking-eyebrow: 1.2px;

  /* ── Line heights ─────────────────────────────────────────────────────── */
  --medura-leading-display: 1.05;
  --medura-leading-headline: 1.15;
  --medura-leading-body: 1.5;
  --medura-leading-caption: 1.4;

  /* ── What Flutter adds ────────────────────────────────────────────────── */
  /* A style of app_theme.dart that names no tracking is drawn with
     Material's own for that style (Flutter's typography.dart,
     englishLike2021, which Theme.of merges under the app's text theme). These
     are those values, for the styles the app leaves it out of. */
  --medura-tracking-title-md: 0.15px;
  --medura-tracking-title-sm: 0.1px;
  --medura-tracking-body-lg: 0.5px;
  --medura-tracking-body-md: 0.25px;
  --medura-tracking-body-sm: 0.4px;
  --medura-tracking-label-md: 0.5px;

  /* The height of one line of each style, as Flutter lays it out: the size
     times the line height, rounded to a whole dot. Where app_theme.dart names
     no line height, Material's is used, as for the tracking above (1.27 for
     titleLarge, 1.5 titleMedium, 1.43 titleSmall and labelLarge, 1.33
     labelMedium, 1.45 labelSmall). A browser would keep the fraction, and a
     page of such lines ends up a dot or two off the app's. */
  --medura-line-display-sm: 29px;  /* 28 × 1.05 */
  --medura-line-headline-sm: 21px; /* 18 × 1.16 */
  --medura-line-title-lg: 20px;    /* 16 × 1.27 */
  --medura-line-title-md: 23px;    /* 15 × 1.5 */
  --medura-line-title-sm: 19px;    /* 13 × 1.43 */
  --medura-line-body-md: 21px;     /* 14 × 1.5 */
  --medura-line-body-sm: 17px;     /* 12 × 1.4 */
  --medura-line-label-lg: 21px;    /* 15 × 1.43 */
  --medura-line-label-md: 17px;    /* 13 × 1.33 */
  --medura-line-label-sm: 14px;    /* 10 × 1.45 */

  /* Within its line, Flutter sets a few styles a dot lower than a browser
     does: both round where the letters stand, and at these sizes they round
     to different sides. The styles' rules move their words down by this
     much (`position: relative; top`), which moves nothing else. */
  --medura-drop-display-sm: 1px; /* 28 at 1.05 */
  --medura-drop-label-lg: 1px;   /* 15 at 1.43 */
  --medura-drop-label-sm: 1px;   /* 10 at 1.45 */

  /* Flutter adds no tracking to Arabic, neither inside a word nor at the
     space after it; a browser leaves the words whole but still adds it at
     the spaces. Only the eyebrow's is wide enough to show: its rules take
     this off each space (`word-spacing`). */
  --medura-word-gap-eyebrow: 0px;
}

:root:lang(ar) {
  --medura-word-gap-eyebrow: calc(-1 * var(--medura-tracking-eyebrow));
}

/* ── Applied scale ──────────────────────────────────────────────────────── */

.medura-display-lg,
.medura-display-md,
.medura-display-sm,
.medura-headline-lg,
.medura-headline-md,
.medura-headline-sm,
.medura-title-lg,
.medura-title-md,
.medura-title-sm,
.medura-body-lg,
.medura-body-md,
.medura-body-sm,
.medura-label-lg,
.medura-label-md,
.medura-eyebrow {
  font-family: var(--medura-font-family);
  margin: 0;
}

.medura-display-lg {
  font-size: var(--medura-size-display-lg);
  font-weight: var(--medura-weight-extrabold);
  letter-spacing: var(--medura-tracking-display-lg);
  line-height: var(--medura-leading-display);
  color: var(--medura-text-primary);
}
.medura-display-md {
  font-size: var(--medura-size-display-md);
  font-weight: var(--medura-weight-extrabold);
  letter-spacing: var(--medura-tracking-display-md);
  line-height: 1.08;
  color: var(--medura-text-primary);
}
/* The page title. Every top-level screen opens with one of these. */
.medura-display-sm {
  font-size: var(--medura-size-display-sm);
  font-weight: var(--medura-weight-extrabold);
  letter-spacing: var(--medura-tracking-display-sm);
  line-height: var(--medura-leading-display);
  color: var(--medura-text-primary);
}
.medura-headline-lg {
  font-size: var(--medura-size-headline-lg);
  font-weight: var(--medura-weight-extrabold);
  letter-spacing: var(--medura-tracking-headline-lg);
  line-height: 1.12;
  color: var(--medura-text-primary);
}
.medura-headline-md {
  font-size: var(--medura-size-headline-md);
  font-weight: var(--medura-weight-bold);
  letter-spacing: var(--medura-tracking-headline-md);
  line-height: var(--medura-leading-headline);
  color: var(--medura-text-primary);
}
/* Card titles. */
.medura-headline-sm {
  font-size: var(--medura-size-headline-sm);
  font-weight: var(--medura-weight-bold);
  letter-spacing: var(--medura-tracking-headline-sm);
  line-height: 1.16;
  color: var(--medura-text-primary);
}
.medura-title-lg {
  font-size: var(--medura-size-title-lg);
  font-weight: var(--medura-weight-bold);
  letter-spacing: var(--medura-tracking-title-lg);
  color: var(--medura-text-primary);
}
.medura-title-md {
  font-size: var(--medura-size-title-md);
  font-weight: var(--medura-weight-semibold);
  color: var(--medura-text-primary);
}
.medura-title-sm {
  font-size: var(--medura-size-title-sm);
  font-weight: var(--medura-weight-semibold);
  color: var(--medura-text-secondary);
}
.medura-body-lg {
  font-size: var(--medura-size-body-lg);
  font-weight: var(--medura-weight-medium);
  line-height: var(--medura-leading-body);
  color: var(--medura-text-body);
}
.medura-body-md {
  font-size: var(--medura-size-body-md);
  font-weight: var(--medura-weight-medium);
  line-height: var(--medura-leading-body);
  color: var(--medura-text-body);
}
.medura-body-sm {
  font-size: var(--medura-size-body-sm);
  font-weight: var(--medura-weight-medium);
  line-height: var(--medura-leading-caption);
  color: var(--medura-text-secondary);
}
/* Button and emphasized labels. */
.medura-label-lg {
  font-size: var(--medura-size-label-lg);
  font-weight: var(--medura-weight-semibold);
  letter-spacing: var(--medura-tracking-label-lg);
  color: var(--medura-text-primary);
}
.medura-label-md {
  font-size: var(--medura-size-label-md);
  font-weight: var(--medura-weight-semibold);
  color: var(--medura-text-secondary);
}
/* Eyebrow — tiny, heavy, tracked-out, uppercase. Sits above section titles. */
.medura-eyebrow {
  font-size: var(--medura-size-label-sm);
  font-weight: var(--medura-weight-extrabold);
  letter-spacing: var(--medura-tracking-eyebrow);
  text-transform: uppercase;
  color: var(--medura-text-tertiary);
}

/* What every page starts from: the page's colours and type, and elements
   without the browser's own spacing and looks. Sides are written as start and
   end (inline-start, inline-end), never left and right, so one rule serves
   Arabic and English. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--medura-background);
  color: var(--medura-text-body);
  font-family: var(--medura-font-family);
  font-size: var(--medura-size-body-md);
  font-weight: var(--medura-weight-medium);
  line-height: var(--medura-leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--medura-accent);
  outline-offset: 2px;
}

/* Read by screen readers and search engines, not drawn. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* An icon (lib/components/icon.dart) keeps its size inside a flex row. */
.icon {
  flex: none;
}

/* Arrows and chevrons that point along the reading direction. */
[dir="rtl"] .icon-mirrored {
  transform: scaleX(-1);
}

/* The app's buttons, as its theme (lib/theme/app_theme.dart) and Flutter's
   Material widgets draw them.

   Flutter sizes a Material button by the system it runs on: tighter on a
   desktop system, and with room around it for a finger on a phone or tablet
   (--medura-density-trim and --medura-tap-target in 10-tokens.css). */

/* TextButton: words in the accent colour, no box. */
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  min-width: calc(64px - var(--medura-density-trim));
  min-height: calc(40px - var(--medura-density-trim));
  /* The room a phone keeps around the button, above and below. */
  --tap-margin: max(0px, calc((var(--medura-tap-target) - 40px) / 2));
  margin-block: var(--tap-margin);
  padding: 0 var(--medura-text-button-padding);
  border-radius: var(--medura-radius-pill);
  color: var(--medura-accent);
  font-size: var(--medura-size-label-lg);
  font-weight: var(--medura-weight-semibold);
  letter-spacing: var(--medura-tracking-label-lg);
  line-height: normal;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 120ms ease;
}
/* A text button whose words the app sets in a style of the page's text
   theme: a line of the style's height, the words a dot lower in it. */
.text-button-styled {
  line-height: var(--medura-line-label-lg);
}
.text-button-styled > span {
  position: relative;
  top: var(--medura-drop-label-lg);
}
.text-button:hover {
  background: color-mix(in srgb, currentColor 8%, transparent);
}
.text-button:active {
  background: color-mix(in srgb, currentColor 12%, transparent);
}

/* IconButton: an icon alone, in a round area of 40, whatever the system. */
.icon-button {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 40px;
  min-height: 40px;
  margin: max(0px, calc((var(--medura-tap-target) - 40px) / 2));
  padding: 0 8px;
  border-radius: 50%;
  color: var(--medura-text-primary);
  cursor: pointer;
  transition: background-color 120ms ease;
}
.icon-button:hover {
  background: color-mix(in srgb, currentColor 8%, transparent);
}

/* FilledButton and OutlinedButton: the ink call to action and its quiet
   bordered partner. */
.button-filled,
.button-outlined {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  min-width: calc(64px - var(--medura-density-trim));
  min-height: calc(var(--medura-control-height) - var(--medura-density-trim));
  padding: 0 var(--medura-control-padding-x);
  border-radius: var(--medura-radius-pill);
  font-size: var(--medura-size-label-lg);
  font-weight: var(--medura-weight-semibold);
  letter-spacing: var(--medura-tracking-label-lg);
  line-height: normal;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 120ms ease,
    opacity 120ms ease;
}
.button-filled {
  background: var(--medura-text-primary);
  color: var(--medura-text-on-ink);
}
.button-filled:hover {
  background: color-mix(in srgb, var(--medura-text-primary) 92%, #fff);
}
.button-filled:disabled {
  background: color-mix(in srgb, var(--medura-text-primary) 35%, transparent);
  cursor: default;
}
.button-outlined {
  border: 1px solid var(--medura-border);
  background: var(--medura-surface);
  color: var(--medura-text-primary);
}
.button-outlined:hover {
  background: color-mix(in srgb, var(--medura-text-primary) 8%, var(--medura-surface));
}
.button-outlined:disabled {
  border-color: color-mix(in srgb, var(--medura-text-primary) 12%, transparent);
  color: color-mix(in srgb, var(--medura-text-primary) 38%, transparent);
  cursor: default;
}
.button-outlined > span,
.button-filled > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* A page's content replaced by a state (lib/components/state_view.dart): an
   icon on a soft disc, a title and the way out, in the middle of the room
   the page leaves. */
.state-view {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 24px 40px var(--medura-page-bottom-gap);
}
.state-view-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 440px;
}
.state-view-disc {
  display: grid;
  width: 80px;
  height: 80px;
  place-items: center;
  border-radius: 50%;
  background: var(--medura-accent-soft);
  color: var(--medura-accent);
}
.state-view-title {
  margin-top: 20px;
  color: var(--medura-text-primary);
  font-size: var(--medura-size-headline-sm);
  font-weight: var(--medura-weight-bold);
  letter-spacing: var(--medura-tracking-headline-sm);
  line-height: 23px; /* 18 × 1.3 */
  text-align: center;
}
.state-view .button-filled {
  margin-top: 24px;
}

/* CircularProgressIndicator. */
.spinner {
  display: block;
  box-sizing: border-box;
  width: 36px;
  height: 36px;
  border: 2.5px solid transparent;
  border-top-color: var(--medura-accent);
  border-inline-end-color: var(--medura-accent);
  border-radius: 50%;
  animation: spinner-turn 900ms linear infinite;
}
@keyframes spinner-turn {
  to {
    transform: rotate(360deg);
  }
}

/* A menu that opens under its button (lib/client/explore/popup_menu.dart):
   the app's sort menu and language menu. */
.popup {
  position: relative;
  display: inline-flex;
}
.popup-barrier {
  position: fixed;
  z-index: 40;
  inset: 0;
}
.popup-menu {
  position: absolute;
  z-index: 41;
  inset-block-start: 100%;
  inset-inline-end: 0;
  box-sizing: border-box;
  min-width: 112px;
  max-width: 280px;
  padding: 8px 0;
  border-radius: var(--medura-radius-md);
  background: var(--medura-surface);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.3),
    0 2px 6px 2px rgba(0, 0, 0, 0.15);
}
.popup-menu[hidden] {
  display: none;
}
.popup-item {
  display: flex;
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  color: var(--medura-text-primary);
  font-size: var(--medura-size-label-lg);
  font-weight: var(--medura-weight-semibold);
  letter-spacing: var(--medura-tracking-label-lg);
  line-height: var(--medura-line-label-lg);
  text-align: start;
  white-space: nowrap;
  cursor: pointer;
}
.popup-item:hover,
.popup-item:focus-visible {
  outline: 0;
  background: color-mix(in srgb, var(--medura-text-primary) 8%, transparent);
}
.popup-item-label {
  position: relative;
  top: var(--medura-drop-label-lg);
  flex: 1;
}

/* The top of the Explore page (lib/client/explore/explore_header.dart).

   One element, two forms, as the app has two. Under 900 wide it is the
   page's own header (the app's BrowseHeader): the other language on a line
   of its own, the title beside Sign in, the search field beside the round
   filter button. From 900 it is the bar across the window (the app's
   _TopBarScaffold for a visitor): the wordmark at its start, and at its end
   the search field, "Filters", the language menu and Sign in. */

/* ── Under 900: the page's own header ─────────────────────────────────── */

.explore-head {
  display: grid;
  grid-template-areas:
    "language language language"
    "title    sign-in  sign-in"
    "search   search   filters";
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  padding: var(--medura-screen-top-gap) var(--explore-side) 0;
}
.explore-head-brand,
.language-menu {
  display: none;
}

/* The other language, in its own script, after a globe. No padding at its
   start: the globe lines up with the title under it. */
.language-switch {
  grid-area: language;
  justify-self: start;
  min-width: 0;
  margin-bottom: calc(var(--tap-margin) + 2px);
  padding-inline: 0 8px;
  color: var(--medura-text-secondary);
}

.explore-title {
  grid-area: title;
  color: var(--medura-text-primary);
  font-size: var(--medura-size-display-sm);
  font-weight: var(--medura-weight-extrabold);
  letter-spacing: var(--medura-tracking-display-sm);
  line-height: var(--medura-line-display-sm);
  position: relative;
  top: var(--medura-drop-display-sm);
}
.sign-in {
  grid-area: sign-in;
  margin-inline-start: 20px;
}

/* The white pill the search is typed in, a violet search icon at its
   start. */
.search-field {
  display: flex;
  grid-area: search;
  box-sizing: border-box;
  min-width: 0;
  height: 52px;
  align-items: center;
  margin-top: 15px;
  padding-inline: 16px 4px;
  border: var(--medura-hairline-width) solid var(--medura-border);
  border-radius: var(--medura-radius-pill);
  background: var(--medura-surface);
  box-shadow: var(--medura-shadow-soft);
  transition: border-color 120ms ease;
}
.search-field:focus-within {
  border-color: var(--medura-accent-light);
}
.search-field > .icon {
  margin-inline-end: 10px;
  color: var(--medura-accent);
}
.search-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  /* The app's field keeps its theme's 18 at either side of the words. The 2
     above set the words a dot lower, where the app's stand. */
  padding: 2px var(--medura-input-padding-x) 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--medura-text-primary);
  font-size: 15.5px;
  font-weight: var(--medura-weight-medium);
  letter-spacing: var(--medura-tracking-body-md);
  /* Taller than the words need: a field cuts its words off at the line's
     edges, and the dots under Arabic letters reach lower than a line of the
     app's 23 (15.5 × 1.5). The words stand in the field's middle either
     way. */
  line-height: 36px;
  text-overflow: ellipsis;
  appearance: none;
}
.search-field input::placeholder {
  /* A browser cuts the hint off at its own line, taking the dots under
     Arabic letters with it; this lets it draw a little past. */
  overflow: clip;
  overflow-clip-margin: 6px;
  color: var(--medura-text-tertiary);
  opacity: 1;
}
.search-field input::-webkit-search-cancel-button,
.search-field input::-webkit-search-decoration {
  display: none;
  appearance: none;
}
.search-clear {
  display: inline-flex;
  flex: none;
  box-sizing: border-box;
  min-width: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  margin: max(0px, calc((var(--medura-tap-target) - 40px) / 2));
  padding: 0 8px;
  border-radius: 50%;
  color: var(--medura-text-tertiary);
}
.search-clear:hover {
  background: color-mix(in srgb, currentColor 8%, transparent);
}

/* The round white filter button beside the search field. */
.filter-toggle {
  display: inline-flex;
  grid-area: filters;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  margin-top: 15px;
  margin-inline-start: 10px;
  border-radius: 50%;
  background: var(--medura-surface);
  box-shadow: var(--medura-shadow-soft);
  color: var(--medura-text-primary);
  transition: background-color 120ms ease;
}
.filter-toggle:hover {
  background: color-mix(in srgb, var(--medura-text-primary) 6%, var(--medura-surface));
}
.filter-toggle-word {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── From 900: the bar across the window ──────────────────────────────── */

@media (min-width: 900px) {
  .explore-head {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    height: 68px;
    padding: 0 28px;
    background: var(--medura-surface);
    /* The line under the bar, drawn over the bar's last dot as the app
       draws it, so the bar is 68 with its line. */
    box-shadow: inset 0 calc(-1 * var(--medura-hairline-width)) 0 var(--medura-border);
  }
  .explore-head-brand {
    display: inline-flex;
    /* The wordmark, then at least 36 before whatever follows; the rest of
       the bar's room goes between them. */
    margin-inline-end: auto;
    padding-inline-end: 36px;
  }
  .language-switch {
    display: none;
  }
  /* On a desktop window the page has no visible title; it is still the
     page's heading for whoever reads the page by its headings. */
  .explore-title {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .search-field {
    flex: 0 1 340px;
    margin-top: 0;
  }

  /* "Filters" after its icon, as grey words; violet while the filters show
     beside the page. */
  .filter-toggle {
    width: auto;
    min-width: 0;
    height: auto;
    min-height: calc(44px - var(--medura-density-trim));
    gap: 8px;
    margin-top: 0;
    margin-block: max(0px, calc((var(--medura-tap-target) - 44px) / 2));
    padding-inline: var(--medura-text-button-padding-icon-start) var(--medura-text-button-padding-icon-end);
    border-radius: var(--medura-radius-pill);
    background: none;
    box-shadow: none;
    color: var(--medura-text-secondary);
    font-size: var(--medura-size-label-lg);
    font-weight: var(--medura-weight-semibold);
    letter-spacing: var(--medura-tracking-label-lg);
    line-height: normal;
  }
  .filter-toggle:hover {
    background: color-mix(in srgb, currentColor 8%, transparent);
  }
  .filter-toggle-on {
    color: var(--medura-accent);
  }
  .filter-toggle .icon {
    width: 18px;
    height: 18px;
  }
  .filter-toggle-word {
    position: static;
    overflow: visible;
    width: auto;
    height: auto;
    clip-path: none;
  }

  /* A line, then the page's language after a globe, opening both. */
  .language-menu {
    display: inline-flex;
    align-items: center;
    margin-inline-start: 16px;
  }
  .language-menu::before {
    width: 1px;
    height: 24px;
    margin-inline-end: 8px;
    background: var(--medura-border);
    content: "";
  }
  .language-menu-button {
    min-width: 0;
    padding-inline: var(--medura-text-button-padding-icon-start) var(--medura-text-button-padding-icon-end);
    color: var(--medura-text-secondary);
  }
  .language-menu-button .icon:last-child {
    margin-inline-start: -4px;
  }
  /* Material's menu under a button (MenuAnchor), where the sort menu is its
     pop-up menu: it starts at the button's start edge, right under it, on a
     tinted surface with small corners, and its rows are tighter on a desktop
     system. */
  .language-menu .popup-menu {
    /* Past the line and the gap before the button. */
    inset-inline: 9px auto;
    min-width: 0;
    border-radius: 4px;
    background: var(--medura-surface-alt);
  }
  .language-menu .popup-item {
    min-height: calc(48px - var(--medura-density-trim));
    gap: calc(12px - var(--medura-density-trim) / 2);
    padding: 0 calc(12px - var(--medura-density-trim) / 2);
  }
  .language-menu .popup-item .icon {
    color: var(--medura-accent);
  }
  .sign-in {
    margin-inline-start: 0;
  }
}

/* ── Medura's name (lib/components/brand_wordmark.dart) ────────────────── */

/* A heavy first half and a lighter second one on one baseline; the app's
   BrandWordmark at height 20. Arabic is set a little larger, as there. */
.wordmark {
  display: inline-flex;
  align-items: baseline;
  color: #1a2440;
  line-height: 1;
  white-space: nowrap;
}
.wordmark-first {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
}
.wordmark-second {
  font-size: 19px;
  font-weight: var(--medura-weight-medium);
  letter-spacing: 1.5px;
}
:lang(ar) > .wordmark-first {
  font-size: 23px;
  font-weight: var(--medura-weight-extrabold);
  letter-spacing: 0;
}
:lang(ar) > .wordmark-second {
  font-size: 22px;
  font-weight: var(--medura-weight-semibold);
  letter-spacing: 0;
}

/* The Explore page under its header (lib/client/explore/): the page people
   land on, and the results of a search, a filter or an opened collection.

   Two widths decide the layout, as in the app. The window's width decides
   what belongs to the window: its bar, the filters beside the page, cards or
   rows for the results (media queries). The width of the page's own column,
   which is narrower than the window while the filters stand beside it,
   decides what the page's blocks look like (container queries on
   .explore-column), since the app's blocks read the width they are given. */

.explore {
  /* The page's side margin: 18 on a phone, 32 from 600. */
  --explore-side: var(--medura-page-padding);
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
}
@media (min-width: 600px) {
  .explore {
    --explore-side: var(--medura-page-padding-tablet);
  }
}

.explore-body {
  display: flex;
  flex: 1;
  align-items: flex-start;
}
.explore-column {
  min-width: 0;
  flex: 1;
  align-self: stretch;
  container: explore / inline-size;
}
.explore-page {
  --side: var(--medura-page-padding);
  display: flex;
  min-height: 100%;
  box-sizing: border-box;
  flex-direction: column;
  padding-bottom: var(--medura-page-bottom-gap);
}
@container explore (min-width: 600px) {
  .explore-page {
    --side: var(--medura-page-padding-tablet);
  }
}
@media (min-width: 900px) {
  .explore-page {
    padding-top: 8px;
  }
}
/* A state in place of the courses (nothing matched, no courses yet) stands
   in the middle of what the window leaves under the header; the gap under
   the page comes after that, as in the app. */
.explore:has(.explore-page > .state-view) {
  min-height: calc(100vh + var(--medura-page-bottom-gap));
  min-height: calc(100dvh + var(--medura-page-bottom-gap));
}

/* ── A block of the page people land on ───────────────────────────────── */

.shelf-heading {
  display: flex;
  align-items: center;
  padding: 28px var(--side) 12px;
}
.shelf-title {
  min-width: 0;
  flex: 1;
  color: var(--medura-text-primary);
  font-size: var(--medura-size-title-lg);
  font-weight: var(--medura-weight-extrabold);
  letter-spacing: var(--medura-tracking-title-lg);
  line-height: var(--medura-line-title-lg);
}
.see-all {
  min-width: 0;
  min-height: 0;
  margin-block: max(0px, calc((var(--medura-tap-target) - 29px) / 2));
  padding: max(0px, calc(4px - var(--medura-density-trim))) 4px;
  font-weight: var(--medura-weight-bold);
}

/* A row holding its collection's every course: cards in a grid that wraps,
   two to a line on a phone, as many as fit from 600. */
.shelf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 14px;
  padding: 0 var(--side);
}
@container explore (min-width: 600px) {
  .shelf-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  }
}

/* A row of a longer collection: cards side by side that scroll sideways,
   running on through the page's side margin to the window's edge. */
.shelf-scroll {
  --card: 156px;
  display: flex;
  overflow-x: auto;
  gap: 14px;
  padding: 0 var(--side);
  scroll-padding-inline: var(--side);
  scrollbar-width: none;
}
.shelf-scroll::-webkit-scrollbar {
  display: none;
}
.shelf-scroll > li {
  flex: 0 0 var(--card);
}
@container explore (min-width: 600px) {
  .shelf-scroll {
    --card: 210px;
  }
}

/* ── Collections as tiles ─────────────────────────────────────────────── */

/* A round picture with the name under it. While the tiles fit they share
   the row equally; when a share would be narrower than a tile, the row
   scrolls sideways. A tile is never narrower than its picture with 8 at
   either side, nor than the longest word of its name. */
.collection-tiles {
  --picture: 84px;
  display: grid;
  overflow-x: auto;
  grid-auto-columns: minmax(auto, 1fr);
  grid-auto-flow: column;
  padding: 0 var(--side);
  scrollbar-width: none;
}
.collection-tiles::-webkit-scrollbar {
  display: none;
}
.collection-tile {
  display: flex;
  min-width: calc(var(--picture) + 16px);
  box-sizing: border-box;
  flex-direction: column;
  align-items: center;
  padding: 6px 4px;
  border-radius: var(--medura-radius-card);
  transition: background-color 120ms ease;
}
.collection-tile:hover {
  background: color-mix(in srgb, var(--medura-text-primary) 5%, transparent);
}
.collection-picture {
  display: grid;
  overflow: hidden;
  width: var(--picture);
  height: var(--picture);
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: var(--medura-accent-soft);
  color: var(--medura-accent);
}
.collection-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.collection-picture .icon {
  width: 33.33%;
  height: 33.33%;
}
.collection-name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  margin-top: 10px;
  color: var(--medura-text-primary);
  font-size: var(--medura-size-title-sm);
  font-weight: var(--medura-weight-bold);
  letter-spacing: var(--medura-tracking-title-sm);
  -webkit-line-clamp: 2;
  line-clamp: 2;
  line-height: 16px; /* 13 × 1.25 */
  text-align: center;
  /* Room under the last line for the dots under Arabic letters, which reach
     below the line and would be cut off with the overflow; taken back, so
     nothing moves. No more than the gap between lines, or the top of a
     third line would show in it. */
  padding-bottom: 2px;
  margin-bottom: -2px;
}
@container explore (min-width: 600px) {
  .collection-tiles {
    --picture: 104px;
  }
}
/* Where the page is as wide as a desktop window's: chips of a small picture
   beside the name, wrapping from the row's start. */
@container explore (min-width: 900px) {
  .collection-tiles {
    --picture: 36px;
    display: flex;
    overflow: visible;
    flex-wrap: wrap;
    gap: 10px;
  }
  .collection-tiles > li {
    min-width: 0;
  }
  .collection-tile {
    min-width: 0;
    flex-direction: row;
    /* 5 around the picture and 14 after the name, the chip's line taking
       the first of each. */
    padding: 4px;
    padding-inline-end: 13px;
    border: var(--medura-hairline-width) solid var(--medura-border);
    border-radius: var(--medura-radius-pill);
    background: var(--medura-surface);
  }
  .collection-tile:hover {
    background: color-mix(in srgb, var(--medura-text-primary) 5%, var(--medura-surface));
  }
  .collection-name {
    display: block;
    margin-top: 0;
    margin-inline-start: 10px;
    position: relative;
    top: var(--medura-drop-label-lg);
    font-size: var(--medura-size-label-lg);
    letter-spacing: var(--medura-tracking-label-lg);
    line-height: var(--medura-line-label-lg);
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* ── Banners ──────────────────────────────────────────────────────────── */

/* One banner at a time between the page's side margins, the next a swipe
   away; twice as wide as tall on a phone, 3.2 times from 600, never taller
   than 320. */
.banners {
  padding-top: 16px;
}
.banner-strip {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.banner-strip::-webkit-scrollbar {
  display: none;
}
.banner-page {
  box-sizing: border-box;
  flex: 0 0 100%;
  padding: 0 var(--side);
  scroll-snap-align: start;
}
.banner {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2;
  border-radius: var(--medura-radius-lg);
  background: var(--medura-accent-soft);
}
@container explore (min-width: 600px) {
  .banner {
    max-height: 320px;
    aspect-ratio: 3.2;
  }
}
.banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Words staff put over the picture, on a shade that deepens downward. */
.banner-words {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 16px 14px;
  background: linear-gradient(to bottom, transparent 35%, #000 100%);
  color: #fff;
}
.banner-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  font-size: var(--medura-size-title-lg);
  font-weight: var(--medura-weight-extrabold);
  letter-spacing: var(--medura-tracking-title-lg);
  -webkit-line-clamp: 2;
  line-clamp: 2;
  line-height: var(--medura-line-title-lg);
}
.banner-subtitle {
  overflow: hidden;
  font-size: var(--medura-size-body-sm);
  letter-spacing: var(--medura-tracking-body-sm);
  line-height: var(--medura-line-body-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.banner-dots {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}
.banner-dot {
  width: 6px;
  height: 6px;
  margin: 0 3px;
  border-radius: 3px;
  background: var(--medura-border);
  transition:
    width 200ms ease,
    background-color 200ms ease;
}
.banner-dot-on {
  width: 18px;
  background: var(--medura-accent);
}

/* ── The results ──────────────────────────────────────────────────────── */

/* From 900: an opened collection named over its courses, after the way back
   to the page people land on. Under 900 the line of filters names it; its
   title stays in the page for whoever reads it by its headings. */
.results-collection {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  white-space: nowrap;
}
.results-collection .icon-button {
  display: none;
}
@media (min-width: 900px) {
  .results-collection {
    position: static;
    display: flex;
    overflow: visible;
    width: auto;
    height: auto;
    align-items: center;
    padding: 8px var(--side) 0;
    clip-path: none;
  }
  .results-collection .icon-button {
    display: inline-flex;
  }
  .results-collection-title {
    overflow: hidden;
    min-width: 0;
    flex: 1;
    margin-inline-start: 4px;
    color: var(--medura-text-primary);
    font-size: var(--medura-size-title-lg);
    font-weight: var(--medura-weight-extrabold);
    letter-spacing: var(--medura-tracking-title-lg);
    line-height: var(--medura-line-title-lg);
    text-overflow: ellipsis;
  }
}

/* Under 900: each filter that is on, named with a cross that takes it off,
   and "Edit filters" at the line's end. */
.active-filters {
  display: flex;
  align-items: flex-start;
  padding: 12px var(--side) 0;
}
@media (min-width: 900px) {
  .active-filters {
    display: none;
  }
}
.active-filter-chips {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
  gap: 8px;
}
.active-filter-chips > li {
  min-width: 0;
  max-width: 100%;
}
.active-filter {
  display: flex;
  max-width: 100%;
  box-sizing: border-box;
  align-items: center;
  gap: 6px;
  padding-block: 6px;
  padding-inline: 12px 8px;
  border-radius: var(--medura-radius-pill);
  background: var(--medura-accent-soft);
  color: var(--medura-accent);
  font-size: var(--medura-size-label-md);
  font-weight: var(--medura-weight-bold);
  letter-spacing: var(--medura-tracking-label-md);
  line-height: var(--medura-line-label-md);
  cursor: pointer;
  transition: background-color 120ms ease;
}
.active-filter:hover {
  background: color-mix(in srgb, var(--medura-accent) 16%, var(--medura-accent-soft));
}
.active-filter > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.edit-filters {
  min-width: 0;
  min-height: 0;
  margin-inline-start: 8px;
  margin-block: max(0px, calc((var(--medura-tap-target) - 33px) / 2));
  padding: max(0px, calc(6px - var(--medura-density-trim))) 4px;
  font-weight: var(--medura-weight-bold);
}

/* How many courses, and the order they are in. */
.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--side) 10px;
}
.results-count {
  color: var(--medura-text-secondary);
  font-size: var(--medura-size-title-sm);
  font-weight: var(--medura-weight-bold);
  letter-spacing: var(--medura-tracking-title-sm);
  line-height: var(--medura-line-title-sm);
}
.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  border-radius: 8px;
  color: var(--medura-text-secondary);
  font-size: var(--medura-size-label-lg);
  font-weight: var(--medura-weight-semibold);
  letter-spacing: var(--medura-tracking-label-lg);
  line-height: var(--medura-line-label-lg);
  white-space: nowrap;
  transition: background-color 120ms ease;
}
.sort-button > span {
  position: relative;
  top: var(--medura-drop-label-lg);
}
.sort-button:hover {
  background: color-mix(in srgb, currentColor 8%, transparent);
}
/* The menu opens 6 under the button, at its end edge. */
.sort .popup-menu {
  margin-top: 6px;
}

/* The courses: rows one under another on a phone, in two columns from 600,
   and from 900 cards in as many columns as fit
   (41-course-card.css draws each as a row or a card). */
.results-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 0 var(--side);
}
@media (min-width: 600px) {
  .results-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
  }
}
@media (min-width: 900px) {
  .results-list {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;
  }
}

/* The end of the results while more can show. */
.load-more {
  display: flex;
  justify-content: center;
  padding: 24px 0;
}

/* ── The courses could not be read (lib/pages/load_failed_page.dart) ───── */

.load-failed {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}

/* One course on the Explore page (lib/client/explore/course_item.dart): a
   link holding the picture, the title, the provider and the price.

   It has the app's two forms. As a card (the app's CourseCard) the picture
   is on top and the words are on the page under it: the rows of the page
   people land on, and the results from 900 wide. As a row (the app's
   CourseRow) the picture is at the side with a line under the whole: the
   results under 900. */

/* ── The card ─────────────────────────────────────────────────────────── */

.course {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  color: inherit;
}
/* Dimmed, as the app dims a course the person is already enrolled in. */
.course-enrolled {
  opacity: 0.55;
}

/* The picture, or the course's code on a soft field under it. */
.course-thumb {
  position: relative;
  display: grid;
  overflow: hidden;
  flex: none;
  aspect-ratio: 171 / 118;
  place-items: center;
  border-radius: 18px;
  background: var(--medura-accent-soft);
}
.course-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}
.course:hover .course-thumb img {
  transform: scale(1.03);
}
.course-code {
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0 10px;
  /* The accent mixed 45% toward the surface. */
  color: #a48ccf;
  font-size: 30px;
  font-weight: var(--medura-weight-extrabold);
  letter-spacing: -0.6px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The words: a fixed height under the picture, so the price stays at the
   bottom and cards in a line stay level whether their titles take one line
   or two. 11 above, two title lines, 5, the provider, room, the price, 12
   below. */
.course-words {
  display: flex;
  min-width: 0;
  height: 107px;
  box-sizing: border-box;
  flex-direction: column;
  padding: 11px 2px 12px;
}
.course-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  color: var(--medura-text-primary);
  font-size: var(--medura-size-title-lg);
  font-weight: var(--medura-weight-extrabold);
  letter-spacing: var(--medura-tracking-title-lg);
  -webkit-line-clamp: 2;
  line-clamp: 2;
  line-height: 20px; /* 16 × 1.25 */
  overflow-wrap: anywhere;
  /* Room under the last line for the dots under Arabic letters, which reach
     below the line and would be cut off with the overflow; taken back, so
     nothing moves. No more than the gap between lines, or the top of a
     third line would show in it. */
  padding-bottom: 2px;
  margin-bottom: -2px;
}
.course-provider {
  overflow: hidden;
  margin-top: 5px;
  color: var(--medura-text-tertiary);
  font-size: 11px;
  font-weight: var(--medura-weight-semibold);
  letter-spacing: var(--medura-tracking-body-sm);
  line-height: 13px; /* 11 × 1.2 */
  text-overflow: ellipsis;
  white-space: nowrap;
  /* As for the title: room for what reaches below the line. */
  padding-bottom: 4px;
  margin-bottom: -4px;
}

/* The price, at the end edge: right in English, left in Arabic. */
.course-end {
  display: flex;
  min-width: 0;
  justify-content: flex-end;
  margin-top: auto;
}
/* A title that runs past two lines, once the browser has found its first
   line (CourseTitle): the first line, then the rest on one line that ends
   in "…" where it runs out of room, as the app's does. */
.course-title-split {
  display: block;
}
.course-title-split > span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
}
.course-title-split > .course-title-rest {
  text-overflow: ellipsis;
}

/* The parts of the price are set in their own sizes on one baseline; the
   line is as tall as its tallest part, with nothing of its own. */
.price {
  /* A dot lower, where the app's price stands in its line. */
  position: relative;
  top: 1px;
  display: block;
  font-size: 0;
  line-height: 0;
  white-space: nowrap;
}
.price-was,
.price-from,
.price-currency {
  color: var(--medura-text-tertiary);
  letter-spacing: var(--medura-tracking-body-sm);
  line-height: var(--medura-leading-caption);
}
.price-was {
  font-size: 11px;
  font-weight: var(--medura-weight-semibold);
}
s.price-was {
  text-decoration: line-through;
}
.price-from {
  font-size: 10px;
  font-weight: var(--medura-weight-bold);
}
.price-now {
  color: var(--medura-text-primary);
  font-size: 18px;
  font-weight: var(--medura-weight-extrabold);
  letter-spacing: -0.3px;
  line-height: 1;
}
.price-currency {
  font-size: 9.5px;
  font-weight: var(--medura-weight-bold);
}
.price-free {
  color: var(--medura-accent);
  font-size: 15.5px;
  font-weight: var(--medura-weight-extrabold);
  letter-spacing: -0.3px;
  line-height: 1;
}
.course-enrolled-mark {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  color: var(--medura-accent);
  font-size: 11px;
  font-weight: var(--medura-weight-bold);
  letter-spacing: var(--medura-tracking-body-sm);
  line-height: 1;
}

/* ── The row: results under 900 ───────────────────────────────────────── */

@media (max-width: 899.98px) {
  .results-list .course {
    height: 112px;
    box-sizing: border-box;
    flex-direction: row;
    align-items: flex-start;
    padding: 12px 0;
    border-radius: 0;
    /* The line under the row, drawn inside its height. */
    box-shadow: inset 0 calc(-1 * var(--medura-hairline-width)) 0 var(--medura-border);
  }
  .results-list .course-thumb {
    width: 120px;
    height: 86px;
    aspect-ratio: auto;
    border-radius: var(--medura-radius-sm);
  }
  .results-list .course:hover .course-thumb img {
    transform: none;
  }
  .results-list .course-words {
    height: 88px;
    flex: 1;
    margin-inline-start: 14px;
    padding: 0;
  }
  .results-list .course-title {
    font-size: var(--medura-size-title-sm);
    font-weight: var(--medura-weight-bold);
    letter-spacing: var(--medura-tracking-title-sm);
    line-height: 16px; /* 13 × 1.25 */
  }
  .results-list .course-provider {
    margin-top: 3px;
    color: var(--medura-text-secondary);
    position: relative;
    top: var(--medura-drop-label-sm);
    font-size: var(--medura-size-label-sm);
    font-weight: var(--medura-weight-extrabold);
    letter-spacing: var(--medura-tracking-eyebrow);
    line-height: var(--medura-line-label-sm);
    word-spacing: var(--medura-word-gap-eyebrow);
  }
}

/* The Explore page's filters (lib/client/explore/filters.dart): beside the
   page from 900 wide, each filter in a tinted card (the app's
   BrowseFilterPanel); in a sheet from the bottom under 900, the filters one
   under another with lines between them (the app's BrowseFilterSheet). The
   controls are the same in both. */

/* ── Beside the page ──────────────────────────────────────────────────── */

.filter-panel {
  display: none;
}
@media (min-width: 900px) {
  /* It stays in view under the bar while the page scrolls, and scrolls by
     itself when it is taller than the window. It opens and closes by its
     width, from the start edge, its content keeping to the end edge. */
  .filter-panel {
    position: sticky;
    top: 68px;
    display: flex;
    overflow: hidden auto;
    width: 320px;
    height: calc(100vh - 68px);
    height: calc(100dvh - 68px);
    flex: none;
    justify-content: flex-end;
    opacity: 1;
    scrollbar-width: thin;
    transition:
      width 240ms cubic-bezier(0.215, 0.61, 0.355, 1),
      opacity 240ms cubic-bezier(0.215, 0.61, 0.355, 1);
  }
  @starting-style {
    .filter-panel {
      width: 0;
      opacity: 0;
    }
  }
  .filter-panel-away {
    width: 0;
    opacity: 0;
  }
}
.filter-panel-inner {
  width: 320px;
  height: max-content;
  box-sizing: border-box;
  flex: none;
  padding: 30px 8px 40px 24px;
  padding-inline: 24px 8px;
}
.filter-panel-head {
  display: flex;
  align-items: center;
  padding: 0 4px;
  margin-bottom: 14px;
}
.filter-panel-title {
  flex: 1;
  color: var(--medura-text-primary);
  font-size: var(--medura-size-title-md);
  font-weight: var(--medura-weight-extrabold);
  letter-spacing: var(--medura-tracking-title-md);
  line-height: var(--medura-line-title-md);
}
.filter-clear-all {
  min-width: 0;
  min-height: 0;
  margin-block: max(0px, calc((var(--medura-tap-target) - 29px) / 2));
  padding: max(0px, calc(6px - var(--medura-density-trim))) 8px;
  color: var(--medura-text-secondary);
  font-size: var(--medura-size-label-md);
  letter-spacing: var(--medura-tracking-label-md);
  line-height: var(--medura-line-label-md);
}

/* ── The filters, each under its name ─────────────────────────────────── */

.filter-list {
  /* The fill of a choice that is not on: the colour the card or sheet under
     it is not. */
  --well: var(--medura-surface);
  display: flex;
  flex-direction: column;
}
.filter-name {
  color: var(--medura-text-primary);
  font-weight: var(--medura-weight-bold);
}
.filter-list-cards .filter-section {
  padding: 14px 16px 16px;
  border-radius: var(--medura-radius-md);
  background: var(--medura-surface-alt);
}
.filter-list-cards .filter-section + .filter-section {
  margin-top: 8px;
}
.filter-list-cards .filter-name {
  position: relative;
  top: var(--medura-drop-label-lg);
  margin-bottom: 12px;
  font-size: var(--medura-size-label-lg);
  letter-spacing: var(--medura-tracking-label-lg);
  line-height: var(--medura-line-label-lg);
}
.filter-list-lined {
  --well: var(--medura-background);
}
.filter-list-lined .filter-section {
  padding: 20px 0;
}
/* A line under each filter but the last, drawn inside its 20 below. */
.filter-list-lined .filter-section:not(:last-child) {
  box-shadow: inset 0 calc(-1 * var(--medura-hairline-width)) 0 var(--medura-border);
}
.filter-list-lined .filter-name {
  margin-bottom: 14px;
  font-size: var(--medura-size-title-sm);
  letter-spacing: var(--medura-tracking-title-sm);
  line-height: var(--medura-line-title-sm);
}

/* One look serves every choice: a soft fill with no outline, the chosen ones
   in ink. */
.filter-chip,
.filter-tile,
.filter-track-choice {
  background: var(--well);
  color: var(--medura-text-primary);
  transition:
    background-color 160ms ease,
    color 160ms ease;
}
.filter-on.filter-chip,
.filter-on.filter-tile,
.filter-on.filter-track-choice {
  background: var(--medura-text-primary);
  color: var(--medura-surface);
}

/* Choices any number of which can be on, as chips. */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filter-chip {
  height: 34px;
  padding: 0 14px;
  border-radius: var(--medura-radius-pill);
  font-size: var(--medura-size-label-md);
  font-weight: var(--medura-weight-semibold);
  letter-spacing: var(--medura-tracking-label-md);
  line-height: var(--medura-line-label-md);
  white-space: nowrap;
}

/* Tiles of an icon over a name, sharing the row: the formats. */
.filter-tiles {
  display: flex;
  gap: 6px;
}
.filter-tile {
  display: flex;
  min-width: 0;
  height: 64px;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--medura-radius-sm);
  font-size: var(--medura-size-label-sm);
  font-weight: var(--medura-weight-semibold);
  letter-spacing: var(--medura-tracking-eyebrow);
  line-height: var(--medura-line-label-sm);
  word-spacing: var(--medura-word-gap-eyebrow);
}
.filter-tile .icon {
  color: var(--medura-text-secondary);
}
.filter-on.filter-tile .icon {
  color: inherit;
}
.filter-tile > span {
  position: relative;
  top: var(--medura-drop-label-sm);
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* One of a few choices or none, on one track: the level. */
.filter-track {
  display: flex;
  height: 38px;
  box-sizing: border-box;
  padding: 3px;
  border-radius: var(--medura-radius-pill);
  background: var(--well);
}
.filter-track-choice {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  justify-content: center;
  border-radius: var(--medura-radius-pill);
  background: none;
  font-size: var(--medura-size-label-sm);
  font-weight: var(--medura-weight-semibold);
  letter-spacing: var(--medura-tracking-eyebrow);
  line-height: var(--medura-line-label-sm);
  word-spacing: var(--medura-word-gap-eyebrow);
}
.filter-track-choice > span {
  position: relative;
  top: var(--medura-drop-label-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The price: five stops on one line, Free to Any, the line filled up to the
   stop picked, each label under its stop, the price picked named over
   them. */
.filter-price-picked {
  margin-bottom: 10px;
  color: var(--medura-text-secondary);
  font-size: var(--medura-size-body-md);
  letter-spacing: var(--medura-tracking-body-md);
  line-height: var(--medura-line-body-md);
}
.price-stops {
  position: relative;
  display: flex;
  min-height: 44px;
  align-items: flex-start;
}
.price-stops::before,
.price-stops::after {
  position: absolute;
  top: 8px;
  height: 4px;
  border-radius: 2px;
  content: "";
  inset-inline-start: calc(50% / var(--stops));
}
.price-stops::before {
  background: var(--well);
  inset-inline-end: calc(50% / var(--stops));
}
.price-stops::after {
  width: calc(100% / var(--stops) * var(--at));
  background: var(--medura-text-primary);
  transition: width 160ms ease;
}
.price-stop {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  align-items: center;
  color: var(--medura-text-tertiary);
  font-size: var(--medura-size-label-sm);
  font-weight: var(--medura-weight-medium);
  letter-spacing: var(--medura-tracking-eyebrow);
  line-height: var(--medura-line-label-sm);
  word-spacing: var(--medura-word-gap-eyebrow);
  white-space: nowrap;
}
.price-stop::before {
  /* The stop's dot is centred in a box 20 tall. */
  display: block;
  height: 20px;
  content: "";
}
.price-stop-dot {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 8px;
  height: 8px;
  box-sizing: border-box;
  border-radius: 50%;
  background: var(--well);
  transform: translate(-50%, -50%);
  transition:
    width 160ms ease,
    height 160ms ease;
}
.price-stop-passed .price-stop-dot {
  background: var(--medura-text-primary);
}
.price-stop-on .price-stop-dot {
  width: 18px;
  height: 18px;
  border: 5px solid var(--medura-text-primary);
  background: var(--medura-surface);
}
.price-stop-label {
  position: relative;
  top: var(--medura-drop-label-sm);
  margin-top: 6px;
}
.price-stop-on {
  color: var(--medura-text-primary);
  font-weight: var(--medura-weight-bold);
}

/* The start days: a month to pick a first and a last day from. */
.calendar-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.calendar-month {
  position: relative;
  top: var(--medura-drop-label-lg);
  flex: 1;
  color: var(--medura-text-primary);
  font-size: var(--medura-size-label-lg);
  font-weight: var(--medura-weight-semibold);
  letter-spacing: var(--medura-tracking-label-lg);
  line-height: var(--medura-line-label-lg);
}
.calendar-nav {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--well);
  color: var(--medura-text-primary);
}
.calendar-nav:disabled {
  color: var(--medura-text-tertiary);
  cursor: default;
}
.calendar-weekdays,
.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.calendar-weekdays > span {
  display: grid;
  height: 22px;
  place-items: center;
  padding-top: calc(2 * var(--medura-drop-label-sm));
  box-sizing: border-box;
  color: var(--medura-text-tertiary);
  font-size: var(--medura-size-label-sm);
  font-weight: var(--medura-weight-extrabold);
  letter-spacing: var(--medura-tracking-eyebrow);
  line-height: var(--medura-line-label-sm);
  word-spacing: var(--medura-word-gap-eyebrow);
}
.calendar-day {
  position: relative;
  display: grid;
  height: 36px;
  place-items: center;
  color: var(--medura-text-primary);
  font-size: var(--medura-size-label-md);
  font-weight: var(--medura-weight-medium);
  letter-spacing: var(--medura-tracking-label-md);
  line-height: var(--medura-line-label-md);
}
.calendar-day:disabled {
  color: var(--medura-text-tertiary);
  cursor: default;
}
/* The band between the two days picked: each day's half toward the day
   before, and its half toward the day after, is filled while inside it; its
   ends are round where a week breaks it. */
.calendar-day::before,
.calendar-day::after {
  position: absolute;
  top: 3px;
  bottom: 3px;
  width: 50%;
  content: "";
}
.calendar-day::before {
  inset-inline-start: 0;
}
.calendar-day::after {
  inset-inline-end: 0;
}
.calendar-band-before::before,
.calendar-band-after::after {
  background: var(--medura-accent-soft);
}
.calendar-week-start::before {
  border-start-start-radius: 15px;
  border-end-start-radius: 15px;
}
.calendar-week-end::after {
  border-start-end-radius: 15px;
  border-end-end-radius: 15px;
}
.calendar-day-number {
  position: relative;
  z-index: 1;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
}
button.calendar-day:not(:disabled):hover .calendar-day-number {
  background: color-mix(in srgb, var(--medura-text-primary) 8%, transparent);
}
.calendar-day-end .calendar-day-number,
button.calendar-day-end:not(:disabled):hover .calendar-day-number {
  background: var(--medura-text-primary);
  color: var(--medura-surface);
  font-weight: var(--medura-weight-bold);
}
/* A dot under a day a class starts on. */
.calendar-dot {
  position: absolute;
  bottom: 3px;
  left: 50%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--medura-accent);
}
.calendar-day-end .calendar-dot {
  background: var(--medura-surface);
}

/* ── In a sheet ───────────────────────────────────────────────────────── */

/* A dialog covering the window, its box at the bottom across the whole
   width, as tall as the filters up to 94% of the window. */
.filter-sheet {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  box-sizing: border-box;
  align-items: flex-end;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
}
.filter-sheet[open] {
  display: flex;
}
.filter-sheet::backdrop {
  background: rgba(0, 0, 0, 0.54);
}
html:has(.filter-sheet[open]) {
  overflow: hidden;
}
.filter-sheet-box:focus {
  outline: 0;
}
.filter-sheet-box {
  display: flex;
  overflow: hidden;
  width: 100%;
  max-height: 94%;
  flex-direction: column;
  border-radius: var(--medura-radius-sheet) var(--medura-radius-sheet) 0 0;
  background: var(--medura-surface);
  animation: filter-sheet-rise 250ms cubic-bezier(0.2, 0, 0, 1);
}
@keyframes filter-sheet-rise {
  from {
    transform: translateY(100%);
  }
}
.filter-sheet-head {
  display: flex;
  align-items: center;
  padding: 20px 12px 8px 24px;
  padding-inline: 24px 12px;
}
.filter-sheet-title {
  flex: 1;
  color: var(--medura-text-primary);
  font-size: var(--medura-size-title-lg);
  font-weight: var(--medura-weight-extrabold);
  letter-spacing: var(--medura-tracking-title-lg);
  line-height: var(--medura-line-title-lg);
}
.filter-sheet-scroll {
  overflow-y: auto;
  min-height: 0;
  flex: 1;
  padding: 0 24px;
  overscroll-behavior: contain;
}
.filter-sheet-foot {
  display: flex;
  gap: 10px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: var(--medura-hairline-width) solid var(--medura-border);
  background: var(--medura-surface);
}
/* "Clear all" takes a third of the row and "Show N courses" the rest. The
   buttons have no padding of their own here, which would count toward their
   shares; the words keep 8 at either side. */
.filter-sheet-foot .button-outlined,
.filter-sheet-foot .button-filled {
  min-width: 0;
  min-height: calc(50px - var(--medura-density-trim));
  padding: 0;
}
.filter-sheet-foot .button-outlined {
  flex: 1 1 0;
}
.filter-sheet-foot .button-filled {
  flex: 2 1 0;
}
.filter-sheet-foot span {
  padding: 0 8px;
}

/* A course's page: its two layouts, the dark title area and the reading
   sections. The Flutter app's page is the measure for every number here
   (lib/features/catalog/course_details of the app).

   In a wide window (at least 720 wide and 500 high, as in the app) the
   purchase panel stands in a side column over the title area and the
   sections, in a frame of at most 1160. Otherwise the page is the picture,
   the title area and one column of at most 680, over a bar along the bottom
   (61-course-purchase.css). */

/* ── How the app sets its type ────────────────────────────────────────── */

/* Two things the app's text does that 10-tokens.css does not say.

   A text style of the app that leaves its tracking or its line height unsaid
   takes Material's own (Typography.englishLike2021, the same for Arabic):
   body text is tracked out by a quarter to half a dot, and a label or a
   title stands in a line of 1.27 to 1.5 times its size.

   And Flutter rounds every line of text to a whole dot: 15 at 1.43 is a line
   of 21, not 21.45. So the line heights here are whole dots, each the size
   times the line height, rounded. A page set in fractions drifts from the
   app's by a dot every few lines. */
:root {
  --course-tracking-title-md: 0.15px;
  --course-tracking-title-sm: 0.1px;
  --course-tracking-body-lg: 0.5px;
  --course-tracking-body-md: 0.25px;
  --course-tracking-body-sm: 0.4px;
  --course-tracking-label-md: 0.5px;

  --course-line-headline-md: 23px; /* 20 at 1.15 */
  --course-line-headline-sm: 21px; /* 18 at 1.16 */
  --course-line-title-lg: 20px;    /* 16 at 1.27 */
  --course-line-title-md: 23px;    /* 15 at 1.5 */
  --course-line-title-sm: 19px;    /* 13 at 1.43 */
  --course-line-body-lg: 24px;     /* 16 at 1.5 */
  --course-line-body-md: 21px;     /* 14 at 1.5 */
  --course-line-body-sm: 17px;     /* 12 at 1.4 */
  --course-line-label-lg: 21px;    /* 15 at 1.43 */
  --course-line-label-md: 17px;    /* 13 at 1.33 */
  --course-line-label-sm: 14px;    /* 10 at 1.45 */
}

/* A text of the app whose baseline Chrome draws one dot higher than Flutter
   does. Both put the baseline on a whole dot, from the same line and the same
   font, but round on the way differently: Flutter rounds the exact place,
   Chrome rounds the font's rise first and drops half a dot of the room above
   it. For most of the app's styles the two agree; for 15 in a line of 21 or
   20, 10 in 14, 14 in 20, 17 in 20, 20 in 23 and 26 in 30 Chrome ends one dot
   short. */
.course-provider-name,
.price-line-button .panel-price-now,
.choice-package-name,
.purchase-action-label,
.question-contact-provider,
.choice-field-label,
.choice-popular,
.instalment-line,
.module-number,
.course-page-title {
  position: relative;
  top: 1px;
}

/* Flutter adds no tracking to Arabic text. A price's figure is digits, which
   it does track. */
html[lang="ar"] :is(.course-page, .not-found, .provider-window) * {
  letter-spacing: 0;
}
html[lang="ar"] .price-figure {
  letter-spacing: var(--course-tracking-title-md);
}

.course-page {
  /* The colours an id picks, for a picture that has not loaded and for a
     provider's mark: AppGradients.thumbs of the app, in its order. */
  --course-thumb-0: var(--medura-gradient-thumb-coral);
  --course-thumb-1: var(--medura-gradient-thumb-violet);
  --course-thumb-2: var(--medura-gradient-thumb-teal);
  --course-thumb-3: var(--medura-gradient-thumb-blue);
  --course-thumb-4: var(--medura-gradient-thumb-slate);

  /* What every section keeps clear at its two sides. */
  --course-inset: 20px;

  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100vh;
  align-content: start;
}

/* An author's `display` would otherwise show what is marked hidden. */
.course-page [hidden] {
  display: none !important;
}

.thumb-0 { background: var(--course-thumb-0); }
.thumb-1 { background: var(--course-thumb-1); }
.thumb-2 { background: var(--course-thumb-2); }
.thumb-3 { background: var(--course-thumb-3); }
.thumb-4 { background: var(--course-thumb-4); }

/* ── The picture ──────────────────────────────────────────────────────── */

.course-picture {
  position: relative;
  overflow: hidden;
}
.course-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── The title area ───────────────────────────────────────────────────── */

.course-hero {
  position: relative;
  background: var(--medura-ink);
  color: var(--medura-text-on-ink);
}
.course-hero-picture {
  height: 200px;
}
/* Keeps the way back legible on any picture. */
.course-hero-picture::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.28), transparent 50%);
}
.course-hero-frame {
  max-width: var(--medura-width-content);
  margin-inline: auto;
  padding: 20px 20px 24px;
}

.course-back {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--medura-text-primary);
}

.course-title-area {
  display: flex;
  flex-direction: column;
}
.course-page-title {
  font-size: 26px;
  font-weight: var(--medura-weight-extrabold);
  letter-spacing: var(--medura-tracking-headline-lg);
  line-height: 30px;
  color: var(--medura-text-on-ink);
}

.course-page-provider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.course-provider-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #fff;
  font-size: 9.36px;
  font-weight: var(--medura-weight-extrabold);
  letter-spacing: 0.4px;
  line-height: 14px;
}
.course-provider-text {
  flex: 1;
  min-width: 0;
}
.course-provider-name,
.course-provider-kind {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.course-provider-name {
  font-size: var(--medura-size-label-lg);
  font-weight: var(--medura-weight-bold);
  letter-spacing: var(--medura-tracking-label-lg);
  line-height: var(--course-line-label-lg);
  color: var(--medura-text-on-ink);
}
.course-provider-kind {
  font-size: var(--medura-size-body-sm);
  letter-spacing: var(--course-tracking-body-sm);
  line-height: var(--course-line-body-sm);
  color: rgba(255, 255, 255, 0.72);
}

.course-status {
  display: flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  margin-top: 14px;
  padding: 6px 12px;
  border-radius: var(--medura-radius-pill);
  background: rgba(255, 255, 255, 0.14);
  color: var(--medura-text-on-ink);
  font-size: var(--medura-size-label-md);
  font-weight: var(--medura-weight-bold);
  line-height: var(--course-line-label-md);
  letter-spacing: var(--course-tracking-label-md);
}

/* ── The sections ─────────────────────────────────────────────────────── */

.course-sections {
  width: 100%;
  max-width: var(--medura-width-content);
  margin-inline: auto;
  padding-top: 36px;
}

.course-section {
  padding: 0 var(--course-inset) 36px;
}
.course-section-wide {
  padding-inline: 0;
}
.course-section-wide > .course-heading {
  padding-inline: var(--course-inset);
}

.course-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--medura-text-primary);
}
.course-heading h2 {
  flex: 1;
  font-size: var(--medura-size-headline-sm);
  font-weight: var(--medura-weight-bold);
  letter-spacing: var(--medura-tracking-headline-sm);
  line-height: var(--course-line-headline-sm);
  color: var(--medura-text-primary);
}

.course-panel {
  padding: 20px;
  border-radius: 16px;
}
.course-panel-outlined {
  border: 1px solid var(--medura-text-secondary);
}
.course-panel-tinted {
  background: var(--medura-surface);
}

/* The paragraphs' and lines' text: darker than the body text, so it reads
   clearly on the page's tinted background. */
.course-paragraph,
.course-lines,
.question-answer {
  font-size: var(--medura-size-body-lg);
  font-weight: var(--medura-weight-medium);
  line-height: var(--course-line-body-lg);
  color: var(--medura-text-primary);
  letter-spacing: var(--course-tracking-body-lg);
}

/* Lines of a list, in two columns where each column would still read well. */
.course-lines-box {
  container-type: inline-size;
}
.course-lines {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px 28px;
}
@container (min-width: 620px) {
  .course-lines {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.course-lines li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
/* One row of the text high, so the mark centres on the first row. */
.course-line-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 24px;
  color: var(--medura-accent);
}
.course-line-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--medura-text-secondary);
}

/* ── Certificate ──────────────────────────────────────────────────────── */

.certificate-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
}
.certificate-facts dt {
  font-size: var(--medura-size-body-sm);
  line-height: var(--course-line-body-sm);
  color: var(--medura-text-secondary);
  letter-spacing: var(--course-tracking-body-sm);
}
.certificate-facts dd {
  margin-top: 2px;
  font-size: var(--medura-size-title-sm);
  font-weight: var(--medura-weight-bold);
  line-height: var(--course-line-title-sm);
  color: var(--medura-text-primary);
  letter-spacing: var(--course-tracking-title-sm);
}

/* ── Curriculum ───────────────────────────────────────────────────────── */

.curriculum-summary {
  margin-bottom: 10px;
  line-height: var(--course-line-body-md);
  color: var(--medura-text-secondary);
  letter-spacing: var(--course-tracking-body-md);
}
.curriculum-box {
  overflow: hidden;
  border: 1px solid var(--medura-border);
  border-radius: 14px;
}
.module + .module {
  border-top: 1px solid var(--medura-border);
}
.module > summary {
  display: block;
  cursor: pointer;
  list-style: none;
}
.module > summary::-webkit-details-marker {
  display: none;
}
.module[open] > summary {
  background: var(--medura-surface);
}
.module-row {
  display: flex;
  align-items: flex-start;
  padding: 14px 16px;
}
.module-row-level {
  align-items: center;
}
.module-number {
  flex: none;
  min-width: 36px;
  margin-inline-end: 6px;
  font-size: var(--medura-size-headline-md);
  font-weight: var(--medura-weight-bold);
  letter-spacing: var(--medura-tracking-headline-md);
  line-height: var(--course-line-headline-md);
  color: var(--medura-accent);
}
.module-text {
  flex: 1;
  min-width: 0;
}
.module-title,
.instructor-name,
.question h3 {
  font-size: var(--medura-size-title-lg);
  font-weight: var(--medura-weight-bold);
  letter-spacing: var(--medura-tracking-title-lg);
  line-height: var(--course-line-title-lg);
  color: var(--medura-text-primary);
}
.module-meta {
  margin-top: 2px;
  line-height: var(--course-line-body-md);
  color: var(--medura-text-secondary);
  letter-spacing: var(--course-tracking-body-md);
}
/* The arrow of a row that opens: down while closed, up while open. */
.course-arrow {
  color: var(--medura-text-secondary);
}
details[open] > summary .course-arrow {
  transform: rotate(180deg);
}
.module-items {
  padding-block: 8px 10px;
  padding-inline: 58px 16px;
}
.module-items li {
  display: flex;
  align-items: flex-start;
  padding-block: 6px;
  color: var(--medura-text-secondary);
}
.module-items .icon {
  margin-top: 2px;
  margin-inline-end: 10px;
}
.module-item-name {
  flex: 1;
  line-height: var(--course-line-body-md);
  color: var(--medura-text-primary);
  letter-spacing: var(--course-tracking-body-md);
}
.module-item-minutes {
  margin-inline-start: 12px;
  font-size: var(--medura-size-body-sm);
  line-height: var(--course-line-body-sm);
  color: var(--medura-text-secondary);
  letter-spacing: var(--course-tracking-body-sm);
}

/* ── Instructors ──────────────────────────────────────────────────────── */

/* Side by side at equal widths while every card gets at least 270; else each
   270 wide and the row slides sideways. One person takes the whole width. */
.instructors {
  display: flex;
  gap: 12px;
  padding-inline: var(--course-inset);
  overflow-x: auto;
  scrollbar-width: none;
}
.instructors::-webkit-scrollbar {
  display: none;
}
.instructors > li {
  flex: 1 0 270px;
  display: flex;
  min-width: 0;
}
.instructors > li:only-child {
  flex-basis: 0;
}
.instructor-card {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--medura-border);
  border-radius: 14px;
}
.instructor-card-opens {
  cursor: pointer;
}
.instructor-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: hsl(var(--instructor-hue) 25% 94%);
  color: hsl(var(--instructor-hue) 35% 35%);
  font-size: 16.64px;
  font-weight: var(--medura-weight-semibold);
  line-height: 25px;
  letter-spacing: var(--course-tracking-title-md);
}
.instructor-org {
  margin-top: 2px;
  line-height: var(--course-line-body-md);
  color: var(--medura-text-secondary);
  letter-spacing: var(--course-tracking-body-md);
}
.instructor-bio {
  margin-top: 8px;
  line-height: var(--course-line-body-md);
  color: var(--medura-text-body);
  letter-spacing: var(--course-tracking-body-md);
}
.instructor-bio-cut {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
.instructor-arrow {
  align-self: flex-end;
  color: var(--medura-text-secondary);
}

/* ── Common questions ─────────────────────────────────────────────────── */

.question:not(:last-child) {
  border-bottom: 1px solid var(--medura-border);
}
.question > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-block: 14px;
  cursor: pointer;
  list-style: none;
}
.question > summary::-webkit-details-marker {
  display: none;
}
.question h3 {
  flex: 1;
}
.question-answer {
  margin-top: -6px;
  padding-bottom: 14px;
}
.question-contact {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  /* The app gives these two sides by name, not by start and end, so they do
     not swap in Arabic. */
  padding: 12px 8px 12px 14px;
  border-radius: 12px;
  background: var(--medura-surface);
  line-height: var(--course-line-body-md);
  color: var(--medura-text-secondary);
  letter-spacing: var(--course-tracking-body-md);
}
.question-contact > :first-child {
  flex: 1;
}
.question-contact-provider {
  max-width: 50%;
  padding: 4px;
  font-size: var(--medura-size-label-lg);
  font-weight: var(--medura-weight-semibold);
  letter-spacing: var(--medura-tracking-label-lg);
  line-height: var(--course-line-label-lg);
  color: var(--medura-text-primary);
}

/* ── A wide window: the side column ───────────────────────────────────── */

@media (min-width: 720px) and (min-height: 500px) {
  .course-page {
    /* The side column's width, and that with the space beside it. */
    --course-side-width: 290px;
    --course-beside: calc(var(--course-side-width) + 24px);
    /* What is left of the window at each side of the frame of 1160. */
    --course-frame-margin: max(0px, (100% - 1160px) / 2);

    /* The last row takes what a side column taller than the title area and
       the sections needs, so the column always ends inside the page. */
    grid-template-rows: auto auto 1fr;
  }

  .course-hero-picture {
    display: none;
  }
  .course-hero-frame {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: none;
    min-height: 300px;
    margin-inline: 0;
    padding-block: 32px;
    padding-inline: calc(var(--course-frame-margin) + 32px)
      calc(var(--course-frame-margin) + 32px + var(--course-beside));
  }
  .course-back {
    position: static;
    align-self: flex-start;
    margin-bottom: 28px;
  }
  .course-page-title {
    top: 0;
    font-size: 28px;
    line-height: 32px;
  }

  .course-sections {
    max-width: none;
    margin-inline: 0;
    padding-inline: calc(var(--course-frame-margin) + 32px - var(--course-inset))
      calc(var(--course-frame-margin) + 32px - var(--course-inset) + var(--course-beside));
  }
}

@media (min-width: 900px) and (min-height: 500px) {
  .course-page {
    --course-side-width: 360px;
    --course-beside: calc(var(--course-side-width) + 48px);
  }
  .course-page-title {
    font-size: 34px;
    line-height: 39px;
  }
}

/* The purchase panel of a course's page: the card that stays in view in the
   side column of a wide window, the bar along the bottom of a narrow one,
   and the lists of dates and packages their fields open. The Flutter app's
   CoursePurchasePanel and CourseChoiceSheet are the measure
   (lib/features/catalog/course_details/widgets of the app).

   Both forms are in the page; the window's size decides which shows. */

/* ── A narrow window: the bar along the bottom ────────────────────────── */

/* Without a box of its own, so the bar holds to the page's lower edge and
   not to this element's. */
.course-purchase {
  display: contents;
}
.purchase-side {
  display: none;
}

.purchase-bar {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: var(--medura-surface);
}
/* The page fades into the bar. */
.purchase-bar::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 100%;
  height: 28px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--medura-surface));
  pointer-events: none;
}
.purchase-bar-inner {
  display: flex;
  flex-direction: column;
  max-width: var(--medura-width-content);
  margin-inline: auto;
  padding: 8px 20px calc(10px + env(safe-area-inset-bottom, 0px));
}
.purchase-bar .move-note {
  margin-bottom: 8px;
}

/* A pill per field, sliding sideways when there are more than fit. */
.field-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.field-pills::-webkit-scrollbar {
  display: none;
}
.field-pill {
  flex: none;
  display: flex;
  align-items: center;
  height: 36px;
  padding-inline: 12px;
  border: 1px solid var(--medura-border);
  border-radius: var(--medura-radius-pill);
  color: var(--medura-text-secondary);
}
.field-pill-icon {
  margin-inline-end: 6px;
}
.field-pill-text {
  max-width: 240px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: var(--medura-size-label-md);
  font-weight: var(--medura-weight-bold);
  line-height: var(--course-line-label-md);
  color: var(--medura-text-primary);
  letter-spacing: var(--course-tracking-label-md);
}
.field-pill-arrow {
  margin-inline-start: 2px;
}

/* ── The button ───────────────────────────────────────────────────────── */

.purchase-action {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 64px;
  padding-inline: 24px;
  border-radius: var(--medura-radius-pill);
  background: var(--medura-text-primary);
  color: var(--medura-text-on-ink);
  font-size: var(--medura-size-label-lg);
  font-weight: var(--medura-weight-semibold);
  letter-spacing: var(--medura-tracking-label-lg);
  line-height: var(--course-line-label-lg);
  white-space: nowrap;
}
/* The words and the price stand at the button's two ends. */
.purchase-action-priced {
  justify-content: space-between;
  gap: 12px;
}
/* An action that takes something back is outlined. */
.purchase-action-quiet {
  border: var(--medura-border-width) solid var(--medura-border);
  background: transparent;
  color: var(--medura-text-primary);
}
.purchase-action:disabled {
  cursor: default;
}
.purchase-action:disabled:not(.purchase-action-quiet) {
  background: rgba(35, 32, 79, 0.5);
}

/* ── A price ──────────────────────────────────────────────────────────── */

/* A bold figure with the currency small after it, and the struck old price. */
.price-line {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 8px;
}
.panel-price-now {
  font-weight: var(--medura-weight-extrabold);
  color: var(--medura-text-primary);
  white-space: nowrap;
  letter-spacing: var(--course-tracking-title-md);
}
.panel-price-currency {
  font-size: var(--medura-size-label-sm);
  font-weight: var(--medura-weight-bold);
  letter-spacing: var(--medura-tracking-eyebrow);
  color: var(--medura-text-secondary);
  line-height: var(--course-line-label-sm);
}
.price-old {
  font-size: var(--medura-size-label-md);
  font-weight: var(--medura-weight-semibold);
  line-height: var(--course-line-label-md);
  color: var(--medura-text-tertiary);
  text-decoration: line-through;
  letter-spacing: var(--course-tracking-label-md);
}
.price-line-side .panel-price-now {
  font-size: 26px;
  line-height: 31px;
}
.price-line-list .panel-price-now {
  font-size: 18px;
  line-height: 22px;
}
.price-line-button .panel-price-now {
  font-size: 17px;
  color: inherit;
  line-height: 20px;
}
.price-line-button .panel-price-currency,
.price-line-button .price-old {
  color: rgba(255, 255, 255, 0.7);
}

/* ── What the page changed by itself in the choice ────────────────────── */

.move-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: var(--medura-accent);
}
.move-note span {
  flex: 1;
  font-size: var(--medura-size-label-md);
  font-weight: var(--medura-weight-semibold);
  line-height: var(--course-line-label-md);
  color: var(--medura-text-primary);
  letter-spacing: var(--course-tracking-label-md);
}

/* ── What a package includes ──────────────────────────────────────────── */

.feature-marks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.feature-mark {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  color: var(--medura-accent);
}
.feature-mark .icon {
  margin-top: 2px;
}
.feature-mark span {
  font-size: var(--medura-size-body-sm);
  line-height: 16px;
  color: var(--medura-text-primary);
  letter-spacing: var(--course-tracking-body-sm);
}
.feature-mark-lacks,
.feature-mark-lacks span {
  color: var(--medura-text-tertiary);
}

/* ── A wide window: the card in the side column ───────────────────────── */

@media (min-width: 720px) and (min-height: 500px) {
  /* Over the title area and the sections, from the page's top to its end,
     so the card can travel down beside the sections. */
  .course-purchase {
    display: block;
    grid-area: 1 / 1 / -1 / -1;
    justify-self: end;
    width: var(--course-side-width);
    margin-block: 32px 24px;
    margin-inline-end: calc(var(--course-frame-margin) + 32px);
    /* Only the card answers the pointer, not the empty column under it. */
    pointer-events: none;
  }
  .course-hero {
    grid-area: 1 / 1;
  }
  .course-sections {
    grid-area: 2 / 1;
  }
  .purchase-bar {
    display: none;
  }
  .purchase-side {
    display: block;
    height: 100%;
  }

  /* A card taller than the window holds by its foot instead, so all of it
     can be scrolled into view. Its height is measured by the panel. */
  .purchase-card {
    position: sticky;
    top: min(24px, 100vh - var(--course-side-height, 0px) - 24px);
    overflow: hidden;
    border: 1px solid var(--medura-border);
    border-radius: 16px;
    background: var(--medura-surface);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
  }
  .purchase-picture {
    height: 130px;
  }
  .purchase-card-body {
    display: flex;
    flex-direction: column;
    padding: 20px;
  }
  .purchase-card-body > .price-line {
    margin-bottom: 14px;
  }
  .purchase-card-body > .move-note {
    margin-bottom: 12px;
  }
  .purchase-card-body > .purchase-action {
    margin-top: 4px;
  }
  .purchase-includes {
    margin-top: 16px;
  }

  /* The fields in one outlined box, as a booking form has them. */
  .choice-fields {
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid var(--medura-text-secondary);
    border-radius: 14px;
    background: var(--medura-surface);
  }
  .choice-field {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    color: var(--medura-text-secondary);
    text-align: start;
  }
  .choice-field + .choice-field {
    border-top: 1px solid var(--medura-border);
  }
  .choice-field-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  .choice-field-label {
    margin-bottom: 2px;
    font-size: var(--medura-size-label-sm);
    font-weight: var(--medura-weight-extrabold);
    letter-spacing: var(--medura-tracking-eyebrow);
    line-height: var(--course-line-label-sm);
  }
  .choice-field-value {
    font-size: var(--medura-size-title-sm);
    font-weight: var(--medura-weight-bold);
    line-height: var(--course-line-title-sm);
    color: var(--medura-text-primary);
    letter-spacing: var(--course-tracking-title-sm);
  }
  .choice-field-detail {
    font-size: var(--medura-size-body-sm);
    letter-spacing: var(--course-tracking-body-sm);
    line-height: var(--course-line-body-sm);
  }
}

@media (min-width: 900px) and (min-height: 500px) {
  .purchase-picture {
    height: 190px;
    letter-spacing: var(--course-tracking-body-sm);
  }
}

/* ── The list a field opens ───────────────────────────────────────────── */

/* A sheet rising from the bottom edge; in a window of 900 or wider, a
   centred window, as the app's showAdaptiveSheet. */
.choice-window {
  width: 100%;
  max-width: none;
  max-height: 90vh;
  margin: auto 0 0;
  padding: 0;
  border: 0;
  border-radius: var(--medura-radius-sheet) var(--medura-radius-sheet) 0 0;
  background: var(--medura-surface);
  color: inherit;
  overflow-y: auto;
  /* The side column lets the pointer through beside its card; this window
     is a child of it and must not. */
  pointer-events: auto;
}
.choice-window::backdrop {
  background: rgba(0, 0, 0, 0.54);
}
.choice-window[open] {
  animation: choice-window-rises 0.25s cubic-bezier(0.2, 0, 0, 1);
}
@keyframes choice-window-rises {
  from {
    transform: translateY(100%);
  }
}
/* The sheet's handle. */
.choice-window::before {
  content: "";
  display: block;
  width: 32px;
  height: 4px;
  margin: 22px auto;
  border-radius: 2px;
  background: var(--medura-border);
}
.choice-window-body {
  padding: 0 20px calc(24px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 900px) {
  .choice-window {
    width: min(560px, 100vw - 48px);
    max-height: 85vh;
    margin: auto;
    border-radius: var(--medura-radius-lg);
  }
  .choice-window[open] {
    animation: choice-window-appears 0.15s ease-out;
  }
  .choice-window::before {
    display: none;
  }
  .choice-window-body {
    padding-top: 16px;
  }
}
@keyframes choice-window-appears {
  from {
    opacity: 0;
  }
}

.choice-list-title {
  margin-bottom: 12px;
  font-size: var(--medura-size-headline-sm);
  font-weight: var(--medura-weight-bold);
  letter-spacing: var(--medura-tracking-headline-sm);
  line-height: var(--course-line-headline-sm);
  color: var(--medura-text-primary);
}
.choice-list-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* The outline every line shares: violet over soft violet when chosen. The
   padding gives back the chosen outline's extra width. */
.choice-box {
  display: flex;
  align-items: flex-start;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--medura-border);
  border-radius: 14px;
  background: var(--medura-surface);
  text-align: start;
}
.choice-box-chosen {
  padding: 13px;
  border: 2px solid var(--medura-accent);
  background: var(--medura-accent-soft);
}
.choice-box:disabled {
  cursor: default;
}
.choice-box:disabled > * {
  opacity: 0.5;
}
.choice-dot {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  margin-inline-end: 12px;
  border: 2px solid var(--medura-border);
  border-radius: 50%;
}
.choice-box-chosen .choice-dot {
  border-color: var(--medura-accent);
  background: var(--medura-accent);
}
.choice-box-chosen .choice-dot::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
}
.choice-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.choice-name {
  font-size: var(--medura-size-title-md);
  font-weight: var(--medura-weight-bold);
  line-height: var(--course-line-title-md);
  color: var(--medura-text-primary);
  letter-spacing: var(--course-tracking-title-md);
}
.choice-meta {
  display: flex;
  flex-wrap: wrap;
  column-gap: 12px;
  margin-top: 2px;
}
.choice-meta,
.choice-provider {
  font-size: var(--medura-size-body-md);
  font-weight: var(--medura-weight-medium);
  line-height: var(--course-line-body-md);
  color: var(--medura-text-secondary);
  letter-spacing: var(--course-tracking-body-md);
}
.choice-state {
  flex: none;
  max-width: 120px;
  margin-inline-start: 8px;
  font-size: var(--medura-size-label-md);
  font-weight: var(--medura-weight-bold);
  line-height: var(--course-line-label-md);
  text-align: end;
  letter-spacing: var(--course-tracking-label-md);
}
.choice-state-warning {
  color: var(--medura-warning);
}
.choice-state-danger {
  color: var(--medura-danger);
}
.choice-state-accent {
  color: var(--medura-accent);
}

.choice-package-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.choice-package-names {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.choice-popular {
  margin-bottom: 2px;
  font-size: var(--medura-size-label-sm);
  font-weight: var(--medura-weight-extrabold);
  letter-spacing: var(--medura-tracking-eyebrow);
  line-height: var(--course-line-label-sm);
  color: var(--medura-accent);
}
.choice-package-name {
  line-height: 20px;
}
.choice-package-price {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.choice-text > .feature-marks {
  margin-top: 10px;
}

/* The ways to split a price into payments on a course's page: one framed
   line per provider beside its logo, the short line under the buy button
   that opens them, and the provider's own explanation over the page. The
   Flutter app's InstalmentCards, InstalmentDisclosure and provider
   explanation are the measure (lib/features/payment/widgets of the app).

   The frame, its 16 pixels of room, the space beside the logo and the logo's
   height are the ones Tamara's widget guidelines give; Tabby's line takes the
   same form beside it. */

.course-instalments {
  padding: 0 var(--course-inset) 32px;
}

.instalment-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.instalment-card {
  container-type: inline-size;
  padding: 16px;
  border: 1px solid var(--medura-border);
  border-radius: 16px;
  background: var(--medura-surface);
}
.instalment-card-inner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
/* In a frame this narrow the line beside the logo would break after every
   few words, so the logo stands over it. */
@container (max-width: 299.98px) {
  .instalment-card-inner {
    flex-direction: column;
    gap: 12px;
  }
}

/* Tamara: 28 pixels on a phone, 32 on a desktop. */
.instalment-logo {
  flex: none;
  width: auto;
  height: 32px;
}
@media (max-width: 599.98px) {
  .instalment-logo {
    height: 28px;
  }
}

/* Tamara's guidelines ask for 14 to 16 pixels at regular weight. */
.instalment-line {
  flex: 1;
  min-width: 0;
  font-size: var(--medura-size-body-md);
  font-weight: var(--medura-weight-regular);
  line-height: 20px;
  color: var(--medura-text-secondary);
  text-align: start;
  letter-spacing: var(--course-tracking-body-md);
}
.instalment-line strong {
  font-weight: var(--medura-weight-bold);
  color: var(--medura-text-primary);
}
.instalment-more {
  display: inline-block;
  padding-block: 6px;
  font-weight: var(--medura-weight-semibold);
  color: var(--medura-accent);
}

/* ── The short line under the buy button ──────────────────────────────── */

.instalment-disclosure-line {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding-block: 10px;
  border-radius: 12px;
  color: var(--medura-text-secondary);
}
.instalment-disclosure-words {
  margin-inline-end: 8px;
  font-size: var(--medura-size-label-md);
  font-weight: var(--medura-weight-semibold);
  line-height: var(--course-line-label-md);
  white-space: nowrap;
  letter-spacing: var(--course-tracking-label-md);
}
.instalment-disclosure-logo {
  flex: none;
  width: auto;
  height: 18px;
}
.instalment-disclosure-logo + .instalment-disclosure-logo {
  margin-inline-start: 6px;
}
.instalment-disclosure-arrow {
  margin-inline-start: 2px;
  transition: transform 0.2s;
}
.instalment-disclosure-line[aria-expanded="true"] .instalment-disclosure-arrow {
  transform: rotate(180deg);
}
/* On a short window the lines scroll rather than push the button off the
   screen. */
.instalment-disclosure-lines {
  max-height: 40vh;
  padding-block: 2px 6px;
  overflow-y: auto;
}

/* ── A provider's own explanation, over the page ──────────────────────── */

.provider-window {
  padding: 0;
  border: 0;
  overflow: hidden;
}
.provider-window-frame {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
}

/* A whole page with no way to close it, such as Tabby's: a window of its
   own with a close button; the whole screen on a phone. */
.provider-window-page {
  width: min(760px, 100vw - 80px);
  height: min(780px, 100vh - 64px);
  max-width: none;
  max-height: none;
  border-radius: 20px;
  background: var(--medura-surface);
}
.provider-window-page[open] {
  display: flex;
  flex-direction: column;
}
.provider-window-page::backdrop {
  background: rgba(0, 0, 0, 0.54);
}
.provider-window-page .provider-window-frame {
  flex: 1;
}
.provider-window-bar {
  display: flex;
  justify-content: flex-end;
  padding: 4px;
}
.provider-window-close {
  display: grid;
  place-items: center;
  /* Material draws its buttons 8 smaller on a desktop system, where a
     pointer is exact. */
  width: calc(48px - var(--medura-density-trim));
  height: calc(48px - var(--medura-density-trim));
  border-radius: 50%;
  color: var(--medura-text-primary);
}
@media (max-width: 599.98px) {
  .provider-window-page {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
  }
}

/* A page of Medura's own whose provider widget draws its pop-up, with its
   own dimmed backdrop and close button: see-through over the whole screen,
   so the pop-up stands directly over the course page. */
.provider-window-pop-up {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  background: transparent;
}
.provider-window-pop-up::backdrop {
  background: transparent;
}
.provider-window-pop-up .provider-window-frame {
  position: absolute;
  inset: 0;
  height: 100%;
}
/* Shows through the page until the provider's pop-up covers it. */
.provider-window-waiting {
  position: absolute;
  inset: 0;
  width: 36px;
  height: 36px;
  margin: auto;
  border: 4px solid transparent;
  border-top-color: var(--medura-accent);
  border-inline-end-color: var(--medura-accent);
  border-radius: 50%;
  animation: provider-window-turns 1s linear infinite;
}
@keyframes provider-window-turns {
  to {
    transform: rotate(360deg);
  }
}

/* What an address that names nothing shows: a bar with the way back over a
   mark on a soft disc, one line and the way to Explore, held in the middle
   of the window. The Flutter app's course page for a course that does not
   exist is the measure: an AppBar over a StateView
   (lib/shared/widgets/state_view.dart of the app). */

.not-found {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.not-found-bar {
  flex: none;
  display: flex;
  align-items: center;
  height: 56px;
  padding-inline: 4px;
}
.not-found-back {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--medura-text-primary);
}

.not-found-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 40px;
  text-align: center;
}
.not-found-disc {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--medura-accent-soft);
  color: var(--medura-accent);
}
.not-found-view h1 {
  max-width: 440px;
  margin-top: 20px;
  font-size: var(--medura-size-headline-sm);
  font-weight: var(--medura-weight-bold);
  letter-spacing: var(--medura-tracking-headline-sm);
  line-height: 23px;
  color: var(--medura-text-primary);
}
.not-found-action {
  display: flex;
  align-items: center;
  gap: 8px;
  /* Material draws its buttons 8 shorter on a desktop system, where a
     pointer is exact, and keeps them finger-sized on a touch screen. */
  min-height: calc(var(--medura-control-height) - var(--medura-density-trim));
  margin-top: 24px;
  padding-inline: var(--medura-control-padding-x);
  border-radius: var(--medura-radius-pill);
  background: var(--medura-text-primary);
  color: var(--medura-text-on-ink);
  font-size: var(--medura-size-label-lg);
  font-weight: var(--medura-weight-semibold);
  letter-spacing: var(--medura-tracking-label-lg);
  line-height: normal;
}


/* The frame of a pop-up (lib/client/sign_in/sheet_dialog.dart): what
   showAdaptiveSheet is in the Flutter app. A sheet that rises from the bottom
   in a window narrower than 900px, with the theme's drag handle and rounded
   top corners; a dialog of at most 560px in the middle of a wider one. It is
   a <dialog> opened with showModal(), so the browser dims the page behind
   it and keeps focus inside. */

dialog.sheet {
  position: fixed;
  /* Resting on the on-screen keyboard while one is open: the two variables
     are set from the browser's visual viewport as the pop-up opens. */
  inset: auto 0 var(--sheet-keyboard-inset, 0px) 0;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: var(--sheet-viewport-height, 100dvh);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--medura-radius-sheet) var(--medura-radius-sheet) 0 0;
  background: var(--medura-surface);
  color: var(--medura-text-body);
  overflow: hidden;
}

dialog.sheet[open] {
  display: flex;
  flex-direction: column;
  animation: sheet-rise 250ms cubic-bezier(0, 0, 0.2, 1);
}

/* The dim over the page: Flutter's black at 54%. */
dialog.sheet::backdrop {
  background: rgba(0, 0, 0, 0.54);
}

dialog.sheet[open]::backdrop {
  animation: sheet-fade 250ms ease-out;
}

/* Nothing of the dialog's own box shows around the surface, so a press that
   lands on the dialog element itself is a press on the dimmed page. */
.sheet-surface {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

/* The drag handle of the app's bottom sheets: 32 by 4, in a strip of 48. */
.sheet-handle {
  display: grid;
  flex: none;
  place-items: center;
  height: 48px;
}

.sheet-handle::before {
  content: "";
  width: 32px;
  height: 4px;
  border-radius: 2px;
  background: var(--medura-border);
}

/* The content scrolls here when it is taller than the window allows. */
.sheet-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* The row at the top of a pop-up's content: back at the start when there is
   a step to go back to, close at the end. */
.sheet-bar {
  display: flex;
  align-items: center;
  height: 48px;
}

.sheet-bar-space {
  flex: 1;
}

.sheet-icon-button {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--medura-text-secondary);
  transition: background-color 150ms ease-out;
}

@media (hover: hover) {
  .sheet-icon-button:hover {
    background: rgba(91, 88, 130, 0.08);
  }
}

/* A finger gets the 48px target the app gives it on a phone. */
@media (pointer: coarse) {
  .sheet-icon-button {
    width: 48px;
    height: 48px;
  }
}

/* ── The dialog form ───────────────────────────────────────────────────── */

@media (min-width: 900px) {
  dialog.sheet {
    inset: 0 0 var(--sheet-keyboard-inset, 0px) 0;
    width: min(560px, calc(100% - 48px));
    /* As tall as its content, not as its top and bottom set to 0 would
       stretch it. */
    height: fit-content;
    max-height: min(85dvh, calc(var(--sheet-viewport-height, 100dvh) - 48px));
    margin: auto;
    border-radius: var(--medura-radius-lg);
  }

  dialog.sheet[open] {
    animation: sheet-fade 150ms ease-out;
  }

  dialog.sheet[open]::backdrop {
    animation-duration: 150ms;
  }

  .sheet-handle {
    display: none;
  }

  /* Stands in for the handle's space, as the app's dialog form does. */
  .sheet-surface {
    padding-top: 16px;
  }
}

@keyframes sheet-rise {
  from {
    transform: translateY(100%);
  }
}

@keyframes sheet-fade {
  from {
    opacity: 0;
  }
}

/* The sign-in pop-up (lib/client/sign_in/): the sign-in sheet of the Flutter
   app, lib/features/auth/widgets/sign_in_sheet.dart and the widgets it is
   made of. Each block names the widget it repeats; a change to that widget
   is repeated here. */

/* Type. The app's text styles are laid over Material's own (ThemeData's
   2021 type scale), which fills in what the app's leave unset: a letter
   spacing of 0.4 for body-small, 0.25 for body-medium, 0.5 for body-large
   and 0.15 for title-medium, and a line height of 1.43 for label-large.
   10-tokens.css has only what the app's styles set themselves, so those
   values are written here. The app's text engine adds no letter spacing to
   Arabic text, so an Arabic page gets none, except where the text is Latin
   whatever the page: the number and the email.

   The app's text engine gives each line a whole number of pixels, so a line
   height that would come to a fraction is written as that number: 21px for
   18 at 1.16, 17px for 12 at 1.4, 22px for 15 at 1.45. */

/* Sizes that follow how the pop-up is used. The app is compact where it is
   run with a mouse (Material's desktop density: a field of 48, a text
   button of 32) and roomier under a finger (a field of 56, a text button's
   target of 48, or 40 for the one the app draws compact); a browser says
   which with `pointer`. */
.sign-in-steps {
  --sign-in-field-height: 48px;
  --sign-in-text-button-height: 32px;
  --sign-in-compact-button-height: 32px;
  --sign-in-tracking-body-sm: 0.4px;
  --sign-in-tracking-body-md: 0.25px;
  --sign-in-tracking-title-md: 0.15px;
  --sign-in-tracking-label-lg: var(--medura-tracking-label-lg);
  --sign-in-tracking-headline-sm: var(--medura-tracking-headline-sm);

  padding: 4px 16px 24px;
}

@media (pointer: coarse) {
  .sign-in-steps {
    --sign-in-field-height: 56px;
    --sign-in-text-button-height: 48px;
    --sign-in-compact-button-height: 40px;
  }
}

[dir="rtl"] .sign-in-steps {
  --sign-in-tracking-body-sm: 0;
  --sign-in-tracking-body-md: 0;
  --sign-in-tracking-title-md: 0;
  --sign-in-tracking-label-lg: 0;
  --sign-in-tracking-headline-sm: 0;
}

/* A step takes the place of another by fading in; the pop-up's height
   follows (sheet_dialog.dart). */
.sign-in-step {
  padding-inline: 8px;
  animation: sign-in-appear 200ms ease-out;
}

@keyframes sign-in-appear {
  from {
    opacity: 0;
  }
}

/* ── Heading ───────────────────────────────────────────────────────────── */

.sign-in-title {
  font-size: var(--medura-size-headline-sm);
  font-weight: var(--medura-weight-bold);
  letter-spacing: var(--sign-in-tracking-headline-sm);
  line-height: 21px;
  color: var(--medura-text-primary);
}

.sign-in-subtitle {
  margin-top: 8px;
  font-size: var(--medura-size-body-md);
  letter-spacing: var(--sign-in-tracking-body-md);
  line-height: 1.5;
  color: var(--medura-text-secondary);
}

/* ── The number and email tabs: SegmentedTabBar ────────────────────────── */

.sign-in-tabs {
  position: relative;
  display: flex;
  height: 50px;
  margin-top: 20px;
  padding: 4px;
  border: 1px solid var(--medura-border);
  border-radius: 99px;
  background: var(--medura-surface);
  box-shadow: var(--medura-shadow-soft);
}

/* The ink pill, which slides under the chosen tab. */
.sign-in-tabs-pill {
  position: absolute;
  inset-block: 4px;
  inset-inline-start: 4px;
  width: calc(50% - 4px);
  border-radius: 99px;
  background: var(--medura-text-primary);
  transition: inset-inline-start 220ms cubic-bezier(0.215, 0.61, 0.355, 1);
}

.sign-in-tabs[data-selected="1"] .sign-in-tabs-pill {
  inset-inline-start: 50%;
}

.sign-in-tab {
  position: relative;
  flex: 1;
  border-radius: 99px;
  font-size: 14px;
  font-weight: var(--medura-weight-semibold);
  letter-spacing: var(--sign-in-tracking-label-lg);
  line-height: 1.43;
  color: var(--medura-text-secondary);
  transition: color 180ms linear;
}

.sign-in-tab.is-selected {
  color: var(--medura-text-on-ink);
}

/* ── The fields of a tab ───────────────────────────────────────────────── */

.sign-in-form {
  display: flex;
  flex-direction: column;
  margin-top: 20px;
  animation: sign-in-appear 200ms ease-out;
}

.sign-in-form > .sign-in-notice {
  margin-bottom: 16px;
}

/* PhoneField: the +966 box and the digits, left to right in both
   languages, which is why its sides are not written as start and end. */
.sign-in-phone {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sign-in-phone-code {
  flex: none;
  padding: 13px 16px;
  border: 1px solid var(--medura-border);
  border-radius: var(--medura-radius-md);
  background: var(--medura-surface);
  font-size: var(--medura-size-body-lg);
  font-weight: var(--medura-weight-semibold);
  letter-spacing: 0.5px;
  line-height: 1.5;
  color: var(--medura-text-primary);
}

/* AuthTextField, with the theme's input decoration. */
.sign-in-input {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: var(--sign-in-field-height);
  /* The theme's 18, and the 4 an outlined field of the app adds before its
     text; the 1 of the border is part of it. */
  padding: 0 21px;
  border: 1px solid var(--medura-border);
  border-radius: var(--medura-radius-md);
  outline: none;
  background-color: var(--medura-surface);
  font-size: var(--medura-size-body-lg);
  font-weight: var(--medura-weight-medium);
  letter-spacing: 0.5px;
  line-height: 1.5;
  color: var(--medura-text-primary);
  caret-color: var(--medura-text-primary);
  text-align: left;
  appearance: none;
}

.sign-in-input::placeholder {
  font-size: 15px;
  font-weight: var(--medura-weight-medium);
  color: var(--medura-text-tertiary);
  opacity: 1;
}

/* The focused outline is 1.6 thick; the extra is drawn inside, so the field
   keeps its size. */
.sign-in-input:focus {
  border-color: var(--medura-accent);
  box-shadow: inset 0 0 0 0.6px var(--medura-accent);
}

.sign-in-input.is-invalid,
.sign-in-phone.is-invalid .sign-in-input,
.sign-in-phone.is-invalid .sign-in-phone-code {
  border-color: var(--medura-danger);
}

.sign-in-input.is-invalid:focus,
.sign-in-phone.is-invalid .sign-in-input:focus {
  box-shadow: inset 0 0 0 0.6px var(--medura-danger);
}

/* The wash a pointer over the field gives it in the app. */
@media (hover: hover) {
  .sign-in-input:hover {
    background-image: linear-gradient(rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.04));
  }
}

/* FieldErrorText: as far in from the field's edge as the text inside it. */
.sign-in-field-error {
  padding: 4px 22px 0;
  font-size: var(--medura-size-body-sm);
  letter-spacing: var(--sign-in-tracking-body-sm);
  line-height: 17px;
  color: var(--medura-danger);
}

.sign-in-field-error:empty {
  display: none;
}

.sign-in-consent {
  margin-top: 12px;
  font-size: var(--medura-size-body-sm);
  letter-spacing: var(--sign-in-tracking-body-sm);
  line-height: 1.5;
  color: var(--medura-text-secondary);
}

/* ── PrimaryButton ─────────────────────────────────────────────────────── */

.sign-in-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 64px;
  margin-top: 24px;
  padding: 0 14px;
  border-radius: var(--medura-radius-pill);
  background: var(--medura-text-primary);
  box-shadow: 0 8px 18px rgba(35, 32, 79, 0.25);
  font-size: var(--medura-size-label-lg);
  font-weight: var(--medura-weight-semibold);
  letter-spacing: var(--sign-in-tracking-label-lg);
  line-height: 1.43;
  color: var(--medura-text-on-ink);
  transition:
    background-color 160ms ease-out,
    box-shadow 160ms ease-out;
}

.sign-in-button.is-busy {
  background: var(--medura-text-tertiary);
  box-shadow: none;
  cursor: default;
}

/* ── TextButton ────────────────────────────────────────────────────────── */

.sign-in-text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: var(--sign-in-text-button-height);
  padding: 0 12px;
  border-radius: var(--medura-radius-pill);
  font-size: var(--medura-size-label-lg);
  font-weight: var(--medura-weight-semibold);
  letter-spacing: var(--sign-in-tracking-label-lg);
  line-height: 1.43;
  color: var(--medura-accent);
  transition: background-color 150ms ease-out;
}

.sign-in-text-button.is-compact {
  min-height: var(--sign-in-compact-button-height);
  padding: 0 8px;
}

.sign-in-text-button:disabled {
  color: var(--medura-text-tertiary);
  cursor: default;
}

@media (hover: hover) {
  .sign-in-text-button:not(:disabled):hover {
    background: rgba(89, 46, 167, 0.08);
  }
}

/* ── TermsText ─────────────────────────────────────────────────────────── */

.sign-in-terms {
  margin-top: 12px;
  text-align: center;
}

.sign-in-terms-prefix {
  font-size: var(--medura-size-body-sm);
  letter-spacing: var(--sign-in-tracking-body-sm);
  line-height: 17px;
  color: var(--medura-text-tertiary);
}

.sign-in-terms-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 16px;
}

.sign-in-terms-link {
  padding: 8px;
  border-radius: 8px;
  font-size: var(--medura-size-body-sm);
  font-weight: var(--medura-weight-semibold);
  letter-spacing: var(--sign-in-tracking-body-sm);
  line-height: 17px;
  color: var(--medura-accent);
  text-decoration: underline;
}

/* ── AppNotice, in the tone of a refusal ───────────────────────────────── */

.sign-in-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.sign-in-code-step > .sign-in-notice {
  margin-top: 16px;
}

.sign-in-notice-mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--medura-danger);
}

.sign-in-notice-text {
  flex: 1;
  min-width: 0;
}

.sign-in-notice-title {
  font-size: var(--medura-size-title-md);
  font-weight: var(--medura-weight-bold);
  letter-spacing: var(--sign-in-tracking-title-md);
  line-height: 22px;
  color: var(--medura-text-primary);
}

.sign-in-notice-body {
  margin-top: 2px;
  font-size: var(--medura-size-body-md);
  letter-spacing: var(--sign-in-tracking-body-md);
  line-height: 1.45;
  color: var(--medura-text-secondary);
}

.sign-in-notice-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 6px 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: var(--medura-weight-bold);
  letter-spacing: var(--sign-in-tracking-label-lg);
  line-height: 1.43;
  color: var(--medura-accent);
  text-align: start;
}

/* ── The code step ─────────────────────────────────────────────────────── */

/* CodeSentNotice. */
.sign-in-code-sent {
  display: flex;
  align-items: flex-start;
  margin-top: 16px;
}

/* WhatsApp's own green. */
.whatsapp-mark {
  flex: none;
  color: #25d366;
}

.sign-in-code-sent-text {
  flex: 1;
  min-width: 0;
  margin-inline-start: 10px;
  font-size: var(--medura-size-body-md);
  letter-spacing: var(--sign-in-tracking-body-md);
  line-height: 1.5;
  color: var(--medura-text-secondary);
}

.sign-in-code-sent .sign-in-text-button {
  flex: none;
  margin-inline-start: 8px;
}

.sign-in-code-expired {
  margin-top: 20px;
}

.sign-in-code-panel {
  margin-top: 24px;
}

/* OtpInput: one invisible field over the cells that show its digits. Left
   to right in both languages. */
.sign-in-code {
  position: relative;
  height: 72px;
}

.sign-in-code-input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  /* 16px, so a phone does not zoom the page in on focus. */
  font-size: 16px;
  color: transparent;
  caret-color: transparent;
  cursor: text;
  appearance: none;
}

.sign-in-code-input::selection {
  background: transparent;
  color: transparent;
}

.sign-in-code-cells {
  display: flex;
  gap: 10px;
  height: 100%;
}

.sign-in-code-cell {
  display: grid;
  flex: 1;
  place-items: center;
  border: 1px solid var(--medura-border);
  border-radius: 15.84px;
  background: var(--medura-surface);
  font-size: var(--medura-size-headline-md);
  font-weight: var(--medura-weight-bold);
  letter-spacing: var(--medura-tracking-headline-md);
  line-height: 1.15;
  color: var(--medura-text-primary);
}

/* The cell the next digit goes to, while the field has the keyboard. Its
   outline is 1.8 thick; the part over a pixel is drawn inside, because a
   browser cuts a border down to whole pixels. */
.sign-in-code-input:focus ~ .sign-in-code-cells .is-next {
  border-color: var(--medura-accent);
  box-shadow: inset 0 0 0 0.8px var(--medura-accent);
}

.sign-in-code.has-error .sign-in-code-cell {
  border-color: var(--medura-danger);
  box-shadow: inset 0 0 0 0.8px var(--medura-danger);
}

.sign-in-verifying {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  font-size: var(--medura-size-body-md);
  letter-spacing: var(--sign-in-tracking-body-md);
  line-height: 1.5;
  color: var(--medura-text-secondary);
}

.sign-in-verifying .sign-in-spinner,
.sign-in-text-button .sign-in-spinner {
  color: var(--medura-accent);
}

.sign-in-retry {
  margin-top: 22px;
}

.sign-in-retry .sign-in-button {
  margin-top: 0;
}

/* "Didn't get a code?" and the way to another. */
.sign-in-resend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 4px;
  margin-top: 18px;
}

.sign-in-resend-question {
  font-size: var(--medura-size-body-md);
  letter-spacing: var(--sign-in-tracking-body-md);
  line-height: 1.5;
  color: var(--medura-text-tertiary);
}

/* ── The spinner: CircularProgressIndicator ────────────────────────────── */

.sign-in-spinner {
  flex: none;
  animation: spinner-turn 1.4s linear infinite;
}

/* Lengths are hundredths of the circle (pathLength on the element). */
.spinner-arc {
  stroke-dasharray: 72 100;
  animation: spinner-arc 1.4s ease-in-out infinite;
}

@keyframes spinner-turn {
  to {
    transform: rotate(360deg);
  }
}

@keyframes spinner-arc {
  0% {
    stroke-dasharray: 2 100;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 72 100;
    stroke-dashoffset: -14;
  }
  100% {
    stroke-dasharray: 72 100;
    stroke-dashoffset: -98;
  }
}

/* It keeps turning for a reader who asked for less motion, at an even
   pace: without it nothing says the page is working. */
@media (prefers-reduced-motion: reduce) {
  .sign-in-spinner {
    animation-duration: 1.4s !important;
  }

  .spinner-arc {
    animation: none;
  }
}

/* The terms of service and the privacy policy over the sign-in pop-up
   (lib/client/sign_in/legal_view.dart): _LegalSheet of the Flutter app,
   lib/features/auth/widgets/terms_text.dart. */

/* Letter spacing as in 71-sign-in.css: Material's for each text style, and
   none in Arabic. */
.legal {
  --legal-tracking-body-sm: 0.4px;
  --legal-tracking-body-md: 0.25px;
  --legal-tracking-title-md: 0.15px;
  --legal-tracking-title-sm: 0.1px;
  --legal-tracking-headline-sm: var(--medura-tracking-headline-sm);
}

/* Line heights are whole pixels, as the app's text engine lays lines out:
   24px for 14 at 1.7, 23px for 15 at 1.5, 19px for 13 at 1.43. */

[dir="rtl"] .legal {
  --legal-tracking-body-sm: 0;
  --legal-tracking-body-md: 0;
  --legal-tracking-title-md: 0;
  --legal-tracking-title-sm: 0;
  --legal-tracking-headline-sm: 0;
}

/* A pop-up of one height, whose text scrolls inside it: the app's sheet
   opens at 85% of the room it has. */
dialog.sheet-tall {
  height: calc(48px + 0.85 * (var(--sheet-viewport-height, 100dvh) - 48px));
}

.sheet-tall .sheet-scroll,
.sheet-tall .sheet-content,
.legal {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.sheet-tall .sheet-scroll {
  overflow: hidden;
}

@media (min-width: 900px) {
  dialog.sheet-tall {
    height: calc(16px + 0.85 * (85dvh - 16px));
  }
}

.legal-head {
  position: relative;
  padding: 16px 24px 0;
}

.legal-title {
  font-size: var(--medura-size-headline-sm);
  font-weight: var(--medura-weight-bold);
  letter-spacing: var(--legal-tracking-headline-sm);
  line-height: 21px;
  color: var(--medura-text-primary);
}

.legal-updated {
  margin-top: 4px;
  font-size: var(--medura-size-body-sm);
  letter-spacing: var(--legal-tracking-body-sm);
  line-height: 17px;
  color: var(--medura-text-tertiary);
}

/* The app's sheet has no close button. This one is for the keyboard and
   screen readers, and shows only while it has the keyboard's focus. */
.legal-close {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-end: 16px;
  padding: 8px 12px;
  border-radius: var(--medura-radius-pill);
  background: var(--medura-surface);
  font-size: var(--medura-size-label-md);
  font-weight: var(--medura-weight-semibold);
  color: var(--medura-accent);
}

.legal-close:not(:focus-visible) {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.legal-body {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 8px;
  padding: 8px 24px 32px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.legal-section {
  max-width: var(--medura-width-content);
  margin-inline: auto;
  padding-top: 20px;
}

.legal-heading {
  font-size: var(--medura-size-title-md);
  font-weight: var(--medura-weight-bold);
  letter-spacing: var(--legal-tracking-title-md);
  line-height: 23px;
  color: var(--medura-text-primary);
}

.legal-paragraph,
.legal-list li,
.legal-email {
  font-size: var(--medura-size-body-md);
  letter-spacing: var(--legal-tracking-body-md);
  line-height: 24px;
  color: var(--medura-text-body);
}

.legal-paragraph,
.legal-list,
.legal-email {
  margin-top: 8px;
}

.legal-subheading {
  margin-top: 12px;
  font-size: var(--medura-size-title-sm);
  font-weight: var(--medura-weight-semibold);
  letter-spacing: var(--legal-tracking-title-sm);
  line-height: 19px;
  color: var(--medura-text-primary);
}

/* A violet dot before each item. */
.legal-list li {
  position: relative;
  padding-bottom: 4px;
  padding-inline-start: 15px;
}

.legal-list li::before {
  content: "";
  position: absolute;
  inset-block-start: 10px;
  inset-inline-start: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--medura-accent);
}

.legal-list strong {
  font-weight: var(--medura-weight-semibold);
  color: var(--medura-text-primary);
}

.legal-email a {
  font-weight: var(--medura-weight-semibold);
  color: var(--medura-accent);
}
