/*
 * HiringPlatform candidate-page components
 * ----------------------------------------------------------------------------
 * Requires tokens.css first. Uses tokens and CSS logical properties only, so
 * the same rules serve <html dir="rtl" lang="ar"> and <html dir="ltr" lang="en">.
 * Never use left/right, margin-left, padding-right, text-align: left, etc.
 *
 * Contents
 *   1. Base, icon       6. Select           11. Empty state
 *   2. Page layout      7. Card             12. Language switch
 *   3. Header, footer   8. Status badge     13. Skeleton (loading)
 *   4. Button           9. Alert            14. Bidi helpers, icon direction
 *   5. Field, input    10. Stack, cluster   15. Utilities
 *  16. Narrow container, header actions (M1)
 *  17. Quiet and link buttons (M1)
 *  18. One-time-code input (M1)
 *  19. Steps (M1)
 *  20. Fieldset, choices, text area (M3)
 *  21. Date field (M3)
 *  22. Phone field (M3)
 *  23. File upload and file row (M3)
 *  24. Progress bar (M3)
 *  25. Form progress, error summary, form actions (M3)
 *  26. Summary list, facts, prose (M3)
 *  27. Filters, pager, disclosure (M3)
 *  28. Page with a side column (M3)
 *  29. Danger button, timeline, page navigation (M3)
 *  30. Read from the CV (M4)
 *  31. Stage list and deadline (A1)
 *  32. Video frame and long upload (A2)
 *  33. Restyle: band, lift, motion (28 November 2026)
 */

/* 1. Base ------------------------------------------------------------------ */

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

/* Component display rules must not defeat the hidden attribute. */
[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--color-canvas);
  color: var(--color-ink);
  font-family: var(--font-family-base);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-base);
}

/* Arabic body text needs more room for its marks. Set on body (and on an
   element marked Arabic inside an English page) and inherited, so headings
   keep --line-height-tight: ":lang(ar)" alone matched every element and
   outranked the heading rule (HP-044). */
body:lang(ar),
body [lang="ar"] {
  line-height: var(--line-height-base-ar);
}

/* An element that names its own language (the "English" link on an Arabic
   page, an email preview) takes that language's family; everything else
   inherits it. */
[lang] {
  font-family: var(--font-family-base);
}

h1,
h2,
h3,
h4 {
  margin-block: 0;
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
}

h1 { font-size: var(--font-size-2xl); }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }

p {
  margin-block: 0;
}

/* Numbered lists count in the page's digits (١. ٢. ٣.) in Arabic (M3). */
ol:lang(ar) {
  list-style-type: arabic-indic;
}

a {
  color: var(--color-primary);
  text-decoration-thickness: var(--border-width);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--color-primary-hover);
}

:focus-visible {
  outline: var(--focus-ring-width) solid var(--color-focus);
  outline-offset: var(--focus-ring-offset);
}

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

/* Stroke icons (24 x 24 viewBox). Defined in Base so component rules that
 * resize an icon come later and win. Decorative icons get aria-hidden="true". */
.icon {
  flex: none;
  inline-size: var(--size-icon-md);
  block-size: var(--size-icon-md);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 2. Page layout ----------------------------------------------------------- */

.page {
  display: flex;
  flex-direction: column;
  min-block-size: 100vh;
  min-block-size: 100dvh;
}

.page__main {
  flex: 1 0 auto;
  padding-block: var(--space-6) var(--space-8);
}

.container {
  inline-size: 100%;
  max-inline-size: var(--size-content-max);
  margin-inline: auto;
  padding-inline: var(--size-page-gutter);
}

.container--reading {
  max-inline-size: calc(var(--size-reading-max) + 2 * var(--size-page-gutter));
}

.section + .section {
  margin-block-start: var(--space-7);
}

.section__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin-block-end: var(--space-4);
}

.section__count {
  color: var(--color-ink-muted);
  font-size: var(--font-size-sm);
}

.grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--size-card-min)), 1fr));
}

.skip-link {
  position: absolute;
  inset-inline-start: var(--space-2);
  inset-block-start: var(--space-2);
  z-index: 10;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-primary);
  font-weight: var(--font-weight-medium);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* 3. Header and footer ----------------------------------------------------- */

.site-header {
  background: var(--color-surface);
  border-block-end: var(--border-width) solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-block-size: var(--size-header);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-ink);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
}

.brand:hover {
  color: var(--color-ink);
}

.brand__mark {
  flex: none;
  inline-size: var(--size-brand-mark);
  block-size: var(--size-brand-mark);
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: var(--color-on-primary);
  display: grid;
  place-items: center;
}

.brand__name {
  line-height: var(--line-height-tight);
  white-space: nowrap; /* the product name stays on one line beside the header actions (M3) */
}

.brand__org {
  display: block;
  white-space: normal;
  color: var(--color-ink-muted);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-regular);
}

.page-intro {
  margin-block-end: var(--space-6);
}

.page-intro__title {
  font-size: var(--font-size-2xl);
  overflow-wrap: anywhere; /* a staff-written title may be one long word (HP-054 B1) */
}

.page-intro__lead {
  margin-block-start: var(--space-2);
  overflow-wrap: anywhere;
  max-inline-size: var(--size-reading-max);
  color: var(--color-ink-muted);
  font-size: var(--font-size-lg);
}

@media (min-width: 48rem) { /* tablet breakpoint, see tokens.css */
  .page-intro__title {
    font-size: var(--font-size-3xl);
  }
}

.site-footer {
  background: var(--color-surface);
  border-block-start: var(--border-width) solid var(--color-border);
  color: var(--color-ink-muted);
  font-size: var(--font-size-sm);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-5);
  padding-block: var(--space-5);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--color-ink-muted);
}

.site-footer a:hover {
  color: var(--color-ink);
}

/* 4. Button ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-block-size: var(--size-control-height);
  padding-block: var(--space-2);
  padding-inline: var(--space-5);
  border: var(--border-width) solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-tight);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--easing-standard),
              border-color var(--duration-fast) var(--easing-standard);
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  color: var(--color-on-primary);
}

.btn--secondary {
  background: var(--color-surface);
  border-color: var(--color-border-strong);
  color: var(--color-primary);
}

.btn--secondary:hover {
  background: var(--color-primary-subtle);
  color: var(--color-primary-hover);
}

.btn--block {
  inline-size: 100%;
}

/* Disabled: native [disabled] on <button>, aria-disabled on links. */
.btn:disabled,
.btn[aria-disabled="true"] {
  background: var(--color-surface-sunken);
  border-color: var(--color-surface-sunken);
  color: var(--color-ink-disabled);
  cursor: not-allowed;
}

.btn .icon {
  inline-size: var(--size-icon-md);
  block-size: var(--size-icon-md);
}

/* 5. Field and text input -------------------------------------------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.field + .field {
  margin-block-start: var(--space-5);
}

.field__label {
  font-weight: var(--font-weight-medium);
}

.field__optional {
  color: var(--color-ink-muted);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-sm);
}

.field__hint {
  color: var(--color-ink-subtle);
  font-size: var(--font-size-sm);
}

/* Block, not flex: a flex container would split mixed-direction text
 * (<bdi>, .ltr) into separate items and break its order. */
.field__error {
  position: relative;
  padding-inline-start: calc(var(--size-icon-sm) + var(--space-2));
  color: var(--color-danger);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.field__error .icon {
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 0.15em;
  inline-size: var(--size-icon-sm);
  block-size: var(--size-icon-sm);
}

.input,
.select {
  inline-size: 100%;
  min-block-size: var(--size-control-height);
  padding-block: var(--space-2);
  padding-inline: var(--space-3);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-ink);
  font: inherit;
  line-height: var(--line-height-tight);
}

.input::placeholder {
  color: var(--color-ink-subtle);
  opacity: 1;
}

.input:hover,
.select:hover {
  border-color: var(--color-ink-muted);
}

.input:focus-visible,
.select:focus-visible {
  outline: var(--focus-ring-width) solid var(--color-focus);
  outline-offset: 0;
  border-color: var(--color-focus);
}

.input[aria-invalid="true"],
.select[aria-invalid="true"] {
  border-color: var(--color-danger);
  border-width: var(--border-width-strong);
  padding-inline: calc(var(--space-3) - (var(--border-width-strong) - var(--border-width)));
}

.input:disabled,
.select:disabled {
  background: var(--color-surface-sunken);
  border-color: var(--color-border);
  color: var(--color-ink-disabled);
  opacity: 1; /* browsers fade disabled controls; the colours already pass AA */
  cursor: not-allowed;
}

/* Inputs whose value is always left-to-right (email, phone, URL, codes).
 * Also set dir="ltr" on the element so the browser's bidi and caret agree. */
.input--ltr {
  direction: ltr;
}

/* 6. Select ----------------------------------------------------------------
 * The chevron is a pseudo-element on a wrapper so it sits at the inline end
 * in either direction (background-position has no logical keywords).
 */

.select-wrap {
  position: relative;
}

.select {
  appearance: none;
  padding-inline-end: calc(var(--space-3) + var(--size-icon-lg));
  cursor: pointer;
}

/* A downward chevron is symmetric, so it needs no mirroring. */
.select-wrap::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-end: var(--space-3);
  inline-size: var(--size-icon-sm);
  block-size: var(--size-icon-sm);
  margin-block: auto;
  background: var(--color-ink-muted);
  -webkit-mask: var(--select-chevron) center / contain no-repeat;
  mask: var(--select-chevron) center / contain no-repeat;
  pointer-events: none;
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.select-wrap:has(.select:disabled)::after {
  background: var(--color-ink-disabled);
}

/* 7. Card ------------------------------------------------------------------ */

.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-1);
  /* Titles, names and excerpts come from staff: a long unbroken word breaks
   * inside the card rather than widen the page (HP-054 B1). */
  min-inline-size: 0;
  overflow-wrap: anywhere;
}

.card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.card__title {
  min-inline-size: 0;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
}

.card__title a {
  color: var(--color-ink);
  text-decoration: none;
}

.card__title a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--color-ink-muted);
  font-size: var(--font-size-sm);
}

.card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-inline-size: 0;
  max-inline-size: 100%;
}

.card__meta-item .icon {
  flex: none;
  inline-size: var(--size-icon-sm);
  block-size: var(--size-icon-sm);
}

.card__body {
  color: var(--color-ink-muted);
}

.card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-block-start: auto;
  padding-block-start: var(--space-3);
  border-block-start: var(--border-width) solid var(--color-border);
}

.card__deadline {
  color: var(--color-ink-muted);
  font-size: var(--font-size-sm);
}

/* 8. Status badge ----------------------------------------------------------
 * Colour carries meaning, so the text always says the status as well.
 * Use danger only for errors and failures, never for "not selected".
 */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding-block: calc(var(--space-1) / 2);
  padding-inline: var(--space-2);
  border-radius: var(--radius-xs);
  background: var(--color-neutral-subtle);
  color: var(--color-neutral);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-base);
  white-space: nowrap;
}

.badge::before {
  content: "";
  inline-size: var(--size-dot);
  block-size: var(--size-dot);
  border-radius: var(--radius-pill);
  background: currentColor;
}

.badge--info    { background: var(--color-info-subtle);    color: var(--color-info); }
.badge--success { background: var(--color-success-subtle); color: var(--color-success); }
.badge--warning { background: var(--color-warning-subtle); color: var(--color-warning); }
.badge--danger  { background: var(--color-danger-subtle);  color: var(--color-danger); }

/* A state said as a line of text led by its icon, not a badge (HP-089 B-UX1,
 * B-UX8): the text wraps, and the icon stays at the start of its first line. */
.status-note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin: 0;
}

.status-note > .icon {
  margin-block-start: calc((1lh - var(--size-icon-md)) / 2);
}

/* 9. Alert ----------------------------------------------------------------- */

.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border: var(--border-width) solid currentColor;
  border-inline-start-width: var(--border-width-accent);
  border-radius: var(--radius-sm);
  background: var(--color-info-subtle);
  color: var(--color-info);
}

.alert > .icon {
  flex: none;
  inline-size: var(--size-icon-lg);
  block-size: var(--size-icon-lg);
}

.alert__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-inline-size: 0;
  color: var(--color-ink);
}

.alert__title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
}

.alert__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-block-start: var(--space-2);
}

.alert--success { background: var(--color-success-subtle); color: var(--color-success); }
.alert--warning { background: var(--color-warning-subtle); color: var(--color-warning); }
.alert--error   { background: var(--color-danger-subtle);  color: var(--color-danger); }

/* 10. Stack and cluster ---------------------------------------------------- */

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

/* 11. Empty state ---------------------------------------------------------- */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding-block: var(--space-8);
  padding-inline: var(--space-5);
  border: var(--border-width) dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  text-align: center;
}

.empty-state__icon {
  inline-size: var(--size-icon-xl);
  block-size: var(--size-icon-xl);
  padding: var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  box-sizing: content-box;
}

.empty-state__title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
}

.empty-state__text {
  max-inline-size: var(--size-text-max);
  color: var(--color-ink-muted);
}

.empty-state .btn {
  margin-block-start: var(--space-2);
}

/* 12. Language switch ------------------------------------------------------
 * A link to the other language, labelled in that language's own script and
 * marked with its lang attribute (lang="en" or lang="ar").
 */

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-block-size: var(--size-control-height);
  padding-inline: var(--space-3);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-ink);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  white-space: nowrap;
}

.lang-switch:hover {
  background: var(--color-primary-subtle);
  color: var(--color-ink);
}

.lang-switch .icon {
  inline-size: var(--size-icon-md);
  block-size: var(--size-icon-md);
  color: var(--color-ink-muted);
}

/* 13. Skeleton (loading) ---------------------------------------------------
 * Put aria-busy="true" on the region that is loading and give it a
 * visually hidden "Loading…" text; the shapes themselves are aria-hidden.
 */

.skeleton {
  display: block;
  block-size: 1em;
  border-radius: var(--radius-xs);
  background: var(--color-surface-sunken);
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}

.skeleton--title { block-size: var(--font-size-xl); inline-size: 70%; }
.skeleton--text  { inline-size: 100%; }
.skeleton--short { inline-size: 45%; }

@keyframes skeleton-pulse {
  50% { opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
  }
}

/* 14. Bidi helpers and icons ----------------------------------------------- */

/* Text that is always left-to-right inside any page: phone, email, URL, IDs.
 * Kept on one line so a phone number never splits into reordered pieces. */
.ltr {
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
}

/* An email address (or URL) in running text: still left-to-right, but allowed
 * to break anywhere so a long address cannot push a 360 px page sideways. */
.ltr--wrap {
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Inline text in the other script; prefer <bdi> or dir="auto" in markup. */
.isolate {
  unicode-bidi: isolate;
}

/* Numbers that should line up in tables and counters. */
.tabular {
  font-variant-numeric: tabular-nums;
}

/* Directional icons (arrows, chevrons, "next", "back") point the reading way. */
.icon--flip:dir(rtl) {
  transform: scaleX(-1);
}

/* 15. Utilities ------------------------------------------------------------ */

.visually-hidden {
  position: absolute !important;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.text-muted {
  color: var(--color-ink-muted);
}

/* 16. Narrow container and header actions (M1) ------------------------------ */

/* Single-task pages (sign in, enter a code): one short column, centred. */
.container--narrow {
  max-inline-size: calc(var(--size-form-max) + 2 * var(--size-page-gutter));
}

/* Actions at the inline end of the site header: language switch, sign out.
 * Sign-out is a <form method="post"> so it works without JavaScript. */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.site-header__actions form {
  margin: 0;
}

/* 17. Quiet and link buttons (M1) ------------------------------------------ */

/* Quiet: a low-emphasis action that still looks like a button (sign out). */
.btn--quiet {
  background: transparent;
  border-color: transparent;
  color: var(--color-primary);
  padding-inline: var(--space-3);
}

.btn--quiet:hover {
  background: var(--color-primary-subtle);
  color: var(--color-primary-hover);
}

/* Link: a form-post action that reads as a text link ("Send a new code").
 * Keeps the 44 px height so it is easy to tap. */
.btn--link {
  min-block-size: var(--size-control-height);
  padding-inline: 0;
  background: transparent;
  border-color: transparent;
  color: var(--color-primary);
  text-align: start;
  text-decoration: underline;
  text-decoration-thickness: var(--border-width);
  text-underline-offset: 0.2em;
}

.btn--link:hover {
  color: var(--color-primary-hover);
}

.btn--quiet:disabled,
.btn--link:disabled {
  background: transparent;
  border-color: transparent;
  color: var(--color-ink-disabled);
  text-decoration: none;
}

/* A button label that is visually hidden on phones, where the icon alone is
 * shown; screen readers always hear it. Give the icon aria-hidden="true". */
@media (max-width: 47.99rem) { /* below the tablet breakpoint, see tokens.css */
  .btn__label--wide {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .btn:has(.btn__label--wide) {
    min-inline-size: var(--size-control-height);
    padding-inline: var(--space-3);
  }
}

/* 18. One-time-code input (M1) ---------------------------------------------
 * One ordinary text field, not six boxes: it works without JavaScript, takes
 * a pasted code, and the browser can offer the code from the email. Markup:
 * <input class="input input--code" type="text" inputmode="numeric"
 *  autocomplete="one-time-code" dir="ltr" spellcheck="false">.
 * No pattern or maxlength: the server accepts Western and Arabic-Indic digits
 * and ignores spaces, so "٤٨٢ ٩١٣" is a valid entry.
 */

.input--code {
  max-inline-size: var(--size-code-input);
  min-block-size: calc(var(--size-control-height) + var(--space-3));
  direction: ltr;
  /* Arabic-Indic digit groups separated by a space would otherwise be shown
     right-to-left ("٤٨٢ ٩١٣" as "٩١٣ ٤٨٢"); the override keeps typed order. */
  unicode-bidi: bidi-override;
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-medium);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--tracking-code);
  /* letter-spacing also adds space after the last digit; indenting the start
     by the same amount keeps the code visually centred. */
  text-indent: var(--tracking-code);
  text-align: center;
}

/* 19. Steps (M1) -----------------------------------------------------------
 * A short progress note for a two- or three-step task. <ol class="steps">;
 * the current item has aria-current="step"; finished items carry
 * .steps__item--done and a visually hidden "(done)". Markers show the step
 * number in the page's digits (٢ in Arabic, 2 in English).
 */

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--color-ink-muted);
  font-size: var(--font-size-sm);
}

.steps__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.steps__marker {
  display: inline-grid;
  place-items: center;
  flex: none;
  inline-size: var(--size-step-marker);
  block-size: var(--size-step-marker);
  border: var(--border-width-strong) solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
}

.steps__marker .icon {
  inline-size: var(--size-icon-sm);
  block-size: var(--size-icon-sm);
  stroke-width: 2.5;
}

.steps__item[aria-current="step"] {
  color: var(--color-ink);
  font-weight: var(--font-weight-semibold);
}

.steps__item[aria-current="step"] .steps__marker {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.steps__item--done .steps__marker {
  border-color: var(--color-primary);
  background: var(--color-primary-subtle);
  color: var(--color-primary);
}

/* 20. Fieldset, choices, text area (M3) -------------------------------------
 * A group of controls with one question (a date, yes or no, gender) is a
 * <fieldset class="fieldset"> whose <legend class="field__label"> is the
 * question. Radios and checkboxes are native inputs, so they work without
 * JavaScript and with every screen reader; only their size and colour change.
 *
 *   <label class="choice"><input class="choice__input" type="radio" ...>
 *     <span class="choice__text">Yes<span class="choice__hint">...</span></span></label>
 *
 * .choice--boxed draws each option as a large target with a border (answers
 * to screening questions, consent); the chosen one is outlined in primary.
 */

.fieldset {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.fieldset > legend {
  float: inline-start; /* puts the legend in the flow of the fieldset, so the gap applies */
  inline-size: 100%;
  margin-block-end: var(--space-1);
  padding: 0;
}

.fieldset + .field,
.field + .fieldset,
.fieldset + .fieldset {
  margin-block-start: var(--space-5);
}

.choice-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-block-start: var(--space-1);
}

/* Two or three short options side by side (Yes / No, Male / Female). */
.choice-list--inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
}

.choice-list--inline > .choice--boxed {
  flex: 1 1 8rem;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  min-block-size: var(--size-control-height);
  padding-block: calc((var(--size-control-height) - var(--size-choice)) / 2);
  cursor: pointer;
}

.choice__input {
  flex: none;
  inline-size: var(--size-choice);
  block-size: var(--size-choice);
  margin: 0;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.choice__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-inline-size: 0;
  line-height: var(--line-height-tight);
  /* Centre the first line of text on the box. */
  padding-block-start: calc((var(--size-choice) - 1em * 1.35) / 2);
}

.choice__hint {
  color: var(--color-ink-subtle);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-base);
}

.choice--boxed {
  padding-inline: var(--space-3);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

.choice--boxed:hover {
  border-color: var(--color-ink-muted);
}

.choice--boxed:has(.choice__input:checked) {
  border-color: var(--color-primary);
  box-shadow: inset 0 0 0 1px var(--color-primary);
  background: var(--color-primary-subtle);
}

.choice:has(.choice__input:focus-visible) {
  outline: var(--focus-ring-width) solid var(--color-focus);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius-sm);
}

.choice__input:focus-visible {
  outline: none; /* the whole option shows the ring */
}

.choice-list[aria-invalid="true"] .choice--boxed {
  border-color: var(--color-danger);
}

textarea.input {
  min-block-size: calc(var(--size-control-height) * 2.5);
  line-height: var(--line-height-base);
  resize: vertical;
}

body:lang(ar) textarea.input {
  line-height: var(--line-height-base-ar);
}

/* 21. Date field (M3) -------------------------------------------------------
 * Our own date field: three parts in one fieldset, day, month (a list of
 * Gregorian month names) and year, in that order in both languages, so the
 * order matches how the date is written ("14 March 1994", "١٤ مارس ١٩٩٤").
 * Works without JavaScript and never depends on the browser's date picker,
 * whose digits and calendar follow the device, not the page.
 *
 *   <fieldset class="fieldset date-field">
 *     <legend class="field__label">Date of birth</legend>
 *     <span class="field__hint" id="dob-hint">...</span>
 *     <div class="date-field__parts">
 *       <div class="date-field__part date-field__part--day"><label for="dob-day">Day</label>
 *         <input class="input" id="dob-day" inputmode="numeric" autocomplete="bday-day"
 *                aria-describedby="dob-hint dob-hijri"></div>
 *       <div class="date-field__part date-field__part--month">... <div class="select-wrap"><select class="select">
 *       <div class="date-field__part date-field__part--year">...
 *     </div>
 *     <p class="date-field__hijri" id="dob-hijri" aria-live="polite">...</p>
 *   </fieldset>
 *
 * Day and year are text inputs with inputmode="numeric" (never type="number":
 * it refuses Arabic-Indic digits and adds spinners). The server accepts both
 * digit sets and writes the value back in the page's digits. The Hijri line
 * appears once the date is complete and real; with JavaScript it follows the
 * typing, without it the server writes it when the page comes back.
 */

.date-field__parts {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
}

.date-field__part {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.date-field__part > label {
  color: var(--color-ink-muted);
  font-size: var(--font-size-sm);
}

.date-field__part--day  { inline-size: var(--size-date-day); }
.date-field__part--year { inline-size: var(--size-date-year); }

.date-field__part--month {
  flex: 1 1 auto;
  min-inline-size: 0;
  max-inline-size: var(--size-date-month);
}

.date-field__part .input {
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.date-field__hijri {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-block-start: var(--space-1);
  color: var(--color-ink-muted);
  font-size: var(--font-size-sm);
}

.date-field__hijri .icon {
  inline-size: var(--size-icon-sm);
  block-size: var(--size-icon-sm);
}

.date-field__hijri:empty {
  display: none;
}

/* 22. Phone field (M3) ------------------------------------------------------
 * The country code and the number side by side. The group is always
 * dir="ltr" (the code reads before the number in both languages); the label
 * and messages around it follow the page.
 *
 *   <div class="input-group" dir="ltr"><div class="select-wrap input-group__code">
 *     <select class="select" aria-label="Country code">...</select></div>
 *     <input class="input input--ltr" type="tel" autocomplete="tel-national" ...></div>
 */

.input-group {
  display: flex;
  gap: var(--space-2);
}

.input-group > .input {
  flex: 1 1 auto;
  min-inline-size: 0;
}

.input-group__code {
  flex: none;
  inline-size: var(--size-dial-code);
}

/* 23. File upload and file row (M3) -----------------------------------------
 * One .upload per kind of file (the CV; the certificates). It holds the
 * files already sent as .file-row items and, while more may be added, the
 * choose area. The real control is a native <input type="file"> in the
 * step's form, so a file can be chosen and sent without JavaScript; the input
 * is visually hidden and the <label class="btn btn--secondary"> after it is
 * the button, which shows the input's focus ring. With JavaScript a chosen
 * file uploads at once and its row shows a progress bar; without it the file
 * is sent with the step's "Save and continue" and its row appears when the
 * page comes back.
 */

.upload {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.upload__drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-4);
  border: var(--border-width-strong) dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  text-align: center;
}

.upload__drop > .icon {
  inline-size: var(--size-icon-lg);
  block-size: var(--size-icon-lg);
  color: var(--color-primary);
}

.upload__drop-text {
  color: var(--color-ink-muted);
  font-size: var(--font-size-sm);
}

/* The browser's file input, kept for the keyboard and screen readers. */
.upload__input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  opacity: 0;
}

/* Without script (the product owner's walk-through): the browser's own input is shown, so it names the chosen file;
   the page's script removes this modifier and shows its own row instead. */
.upload__drop--native .upload__input {
  position: static;
  inline-size: auto;
  block-size: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
}

.upload__drop--native .upload__input + .btn {
  display: none;
}

.upload__input:focus-visible + .btn {
  outline: var(--focus-ring-width) solid var(--color-focus);
  outline-offset: var(--focus-ring-offset);
}

.upload__input:disabled + .btn {
  background: var(--color-surface-sunken);
  border-color: var(--color-surface-sunken);
  color: var(--color-ink-disabled);
  cursor: not-allowed;
}

/* A file is being dragged over the area (JavaScript only). */
.upload__drop--active {
  border-color: var(--color-primary);
  background: var(--color-primary-subtle);
}

.upload[aria-invalid="true"] .upload__drop {
  border-color: var(--color-danger);
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.file-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-2) var(--space-3);
  align-items: start;
  padding: var(--space-3) var(--space-4);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

.file-row > .icon {
  inline-size: var(--size-icon-lg);
  block-size: var(--size-icon-lg);
  color: var(--color-ink-muted);
}

.file-row__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-inline-size: 0;
}

/* File names come from people: isolate them (<bdi>) and let a long name
 * break anywhere rather than widen the page. */
.file-row__name {
  font-weight: var(--font-weight-medium);
  overflow-wrap: anywhere;
}

.file-row__meta {
  color: var(--color-ink-muted);
  font-size: var(--font-size-sm);
}

.file-row__actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-4);
}

.file-row__actions form {
  margin: 0;
}

.file-row__extra {
  grid-column: 1 / -1;
}

.file-row--error {
  border-color: var(--color-danger);
  background: var(--color-danger-subtle);
}

.file-row--error > .icon {
  color: var(--color-danger);
}

@media (min-width: 48rem) { /* tablet breakpoint, see tokens.css */
  .file-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .file-row__actions {
    grid-column: 3;
    grid-row: 1;
  }
}

/* 24. Progress bar (M3) -----------------------------------------------------
 * A native <progress class="progress" max="100" value="40"> named by its
 * label (aria-labelledby). It fills from the inline start, so from the right
 * in Arabic.
 */

.progress {
  appearance: none;
  display: block;
  inline-size: 100%;
  block-size: var(--size-progress);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-surface-sunken);
  color: var(--color-primary);
  overflow: hidden;
}

.progress::-webkit-progress-bar {
  background: var(--color-surface-sunken);
  border-radius: var(--radius-pill);
}

.progress::-webkit-progress-value {
  background: var(--color-primary);
  border-radius: var(--radius-pill);
}

.progress::-moz-progress-bar {
  background: var(--color-primary);
  border-radius: var(--radius-pill);
}

/* 25. Form progress, error summary, form actions (M3) -----------------------
 * A form of several steps says where the candidate is in words ("Step 2 of
 * 6") with a bar; from the desktop breakpoint the steps are listed instead
 * (.steps).
 */

.form-progress {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-progress__count {
  color: var(--color-ink-muted);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.form-progress .steps {
  display: none;
}

@media (min-width: 64rem) { /* desktop breakpoint, see tokens.css */
  .form-progress .steps {
    display: flex;
  }

  .form-progress .progress,
  .form-progress__count {
    display: none;
  }
}

/* Shown at the top of a step that failed to save. The page puts focus on it
 * (tabindex="-1"); each link moves to its field. */
.error-summary:focus-visible {
  outline: var(--focus-ring-width) solid var(--color-focus);
  outline-offset: var(--focus-ring-offset);
}

.error-summary__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin: 0;
  padding-inline-start: var(--space-5);
}

.error-summary__list a {
  color: var(--color-danger);
  font-weight: var(--font-weight-medium);
}

/* The main action first in reading order, at the inline start, then "Back".
 * Stacked full width on phones. */
.form-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-block-start: var(--space-5);
  border-block-start: var(--border-width) solid var(--color-border);
}

@media (min-width: 48rem) { /* tablet breakpoint, see tokens.css */
  .form-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
}

.form-section + .form-section {
  margin-block-start: var(--space-6);
}

.form-section__title {
  margin-block-end: var(--space-4);
  font-size: var(--font-size-lg);
}

/* 26. Summary list, facts, prose (M3) ---------------------------------------
 * .summary-list: label/value rows to check before submitting, each with an
 * optional "Change" link. .facts: a job's key facts with an icon each.
 * .prose: a job description or other long text written by people.
 */

.summary-list {
  margin: 0;
}

.summary-list__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-1) var(--space-4);
  padding-block: var(--space-3);
  border-block-end: var(--border-width) solid var(--color-border);
}

.summary-list__row:first-child {
  padding-block-start: 0;
}

.summary-list__row:last-child {
  border-block-end: 0;
  padding-block-end: 0;
}

.summary-list__key {
  grid-column: 1;
  color: var(--color-ink-muted);
  font-size: var(--font-size-sm);
}

.summary-list__value {
  grid-column: 1;
  margin: 0;
  overflow-wrap: anywhere;
}

.summary-list__action {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}

@media (min-width: 48rem) { /* tablet breakpoint, see tokens.css */
  .summary-list__row {
    grid-template-columns: minmax(10rem, 1fr) minmax(0, 2fr) auto;
    align-items: baseline;
  }

  .summary-list__key    { grid-column: 1; font-size: var(--font-size-md); }
  .summary-list__value  { grid-column: 2; grid-row: 1; }
  .summary-list__action { grid-column: 3; grid-row: 1; }
}

.facts {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
}

.facts__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 var(--space-3);
}

.facts__item > .icon {
  grid-row: 1 / span 2;
  color: var(--color-primary);
}

.facts__key {
  color: var(--color-ink-muted);
  font-size: var(--font-size-sm);
}

.facts__value {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: var(--font-weight-medium);
}

.prose {
  max-inline-size: var(--size-reading-max);
  overflow-wrap: anywhere;
}

.prose > * + * {
  margin-block-start: var(--space-3);
}

.prose ul,
.prose ol {
  margin-block: 0;
  padding-inline-start: var(--space-5);
}

.prose li + li {
  margin-block-start: var(--space-1);
}

/* 27. Filters, pager, disclosure (M3) ---------------------------------------
 * The job list's search and filters are one <form method="get">, so the
 * choice lives in the page address and works without JavaScript. On phones
 * the filters fold into a <details class="disclosure"> under the search.
 */

.filters {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.filters__search {
  display: flex;
  gap: var(--space-2);
}

.filters__search .input {
  flex: 1 1 auto;
  min-inline-size: 0;
}

.filters__fields {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
  padding-block: var(--space-2) var(--space-1);
}

.filters__fields .field + .field {
  margin-block-start: 0;
}

@media (min-width: 48rem) { /* tablet breakpoint, see tokens.css */
  .filters__fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.filters__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
}

.disclosure > summary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-block-size: var(--size-control-height);
  color: var(--color-primary);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  list-style: none;
}

.disclosure > summary::-webkit-details-marker {
  display: none;
}

.disclosure > summary .icon {
  transition: transform var(--duration-fast) var(--easing-standard);
}

.disclosure[open] > summary .icon {
  transform: rotate(180deg);
}

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-block-start: var(--space-5);
}

.pager__status {
  color: var(--color-ink-muted);
  font-size: var(--font-size-sm);
}

.pager__links {
  display: flex;
  gap: var(--space-2);
}

/* 28. Page with a side column (M3) ------------------------------------------
 * A page whose main action sits beside the content on wide screens (job
 * details: "Apply" with the closing date). On phones the aside comes where
 * it is in the markup; put it after the key facts and repeat its action at
 * the end of the page.
 */

.with-aside {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 64rem) { /* desktop breakpoint, see tokens.css */
  .with-aside {
    grid-template-columns: minmax(0, 1fr) var(--size-aside);
    align-items: start;
  }

  .with-aside__aside {
    grid-column: 2;
    grid-row: 1 / span 3;
    position: sticky;
    inset-block-start: var(--space-5);
  }

  .with-aside__end {
    display: none; /* the repeated action is for phones */
  }
}

/* 29. Danger button, timeline, page navigation (M3) ------------------------
 * .btn--danger: only for the confirming button of an action that stops
 * something the candidate started (withdraw an application, withdraw
 * consent), on its own confirmation page; the button that opens that page
 * stays .btn--secondary. .timeline: an application's history, newest first.
 * .subnav: the signed-in candidate's pages (My applications, My details,
 * Privacy), a list of links with aria-current="page" on the current one.
 */

.btn--danger {
  background: var(--color-danger-solid);
  color: var(--color-on-primary);
}

.btn--danger:hover {
  background: var(--color-danger);
  color: var(--color-on-primary);
}

.timeline {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline__item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding-block-end: var(--space-4);
  padding-inline-start: var(--space-6);
}

.timeline__item::before {
  content: "";
  position: absolute;
  inset-inline-start: calc((var(--space-6) - var(--size-step-marker)) / 2 + var(--size-step-marker) / 2 - var(--border-width));
  inset-block: var(--space-4) 0;
  border-inline-start: var(--border-width-strong) solid var(--color-border);
}

.timeline__item:last-child::before {
  display: none;
}

.timeline__item::after {
  content: "";
  position: absolute;
  inset-inline-start: calc((var(--space-6) - var(--size-dot) * 1.5) / 2);
  inset-block-start: 0.45em;
  inline-size: calc(var(--size-dot) * 1.5);
  block-size: calc(var(--size-dot) * 1.5);
  border-radius: var(--radius-pill);
  background: var(--color-primary);
}

.timeline__when {
  color: var(--color-ink-muted);
  font-size: var(--font-size-sm);
}

.timeline__what {
  font-weight: var(--font-weight-medium);
}

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  margin: 0 0 var(--space-5);
  padding: 0;
  list-style: none;
  border-block-end: var(--border-width) solid var(--color-border);
}

.subnav a {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--size-control-height);
  padding-inline: var(--space-3);
  border-block-end: var(--border-width-accent) solid transparent;
  color: var(--color-ink-muted);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
}

.subnav a:hover {
  color: var(--color-ink);
}

.subnav a[aria-current="page"] {
  border-block-end-color: var(--color-primary);
  color: var(--color-ink);
}

/* 30. Read from the CV (M4) -------------------------------------------------
 * The application form's experience and education step opens filled in from
 * what the AI read in the CV. The candidate checks it, corrects, adds and
 * removes; nothing read is kept unless the candidate sends it.
 *
 * .beside-doc: the form and the CV side by side from the desktop breakpoint
 * (form at the inline start, CV at the inline end, sticky). Below it the CV
 * column is not drawn; .beside-doc__open ("View your CV", opens the file in a
 * new tab) is the one tap that reaches it. The CV column holds a .doc-view:
 * the file in the browser's own viewer (PDF, in a sandboxed <iframe>), or,
 * for a file the browser can't show (Word), a note with "Open your CV".
 *
 * .entry: one item of a list the candidate edits (a job, a qualification, a
 * language). Its head names it and carries "Remove" (a submit button: the
 * page saves what is typed and comes back without the item). "Add a job"
 * and the like are submit buttons too, so no JavaScript is needed.
 *
 * Marks on what was read (never colour alone; each says it in words):
 *   .field--unsure  the AI was not sure: a warning edge and a .flag line
 *                   "Check this" with the words from the CV (.excerpt).
 *   .field--missing it found nothing, or could not read it: the field is
 *                   empty, with a neutral .flag line saying which.
 *   values read with confidence carry no mark; added items carry none.
 * .chip: a skill, with its own Remove button; .chip--unsure marks one.
 * .spinner: "still reading"; it stops moving with reduced motion.
 * Gender, date of birth, age, nationality and photos are never read, so no
 * field for them ever carries these marks.
 */

.beside-doc {
  display: grid;
  gap: var(--space-6);
}

.beside-doc__doc {
  display: none;
}

@media (min-width: 64rem) { /* desktop breakpoint, see tokens.css */
  .beside-doc {
    grid-template-columns: minmax(0, var(--size-reading-max)) minmax(0, 1fr);
    align-items: start;
  }

  .beside-doc__doc {
    display: block;
    position: sticky;
    inset-block-start: var(--space-5);
  }

  .beside-doc__open {
    display: none;
  }
}

.doc-view {
  display: flex;
  flex-direction: column;
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  overflow: hidden;
}

.doc-view__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-block-end: var(--border-width) solid var(--color-border);
}

.doc-view__name {
  min-inline-size: 0;
  font-weight: var(--font-weight-medium);
  overflow-wrap: anywhere;
}

.doc-view__body {
  block-size: calc(100vh - var(--space-8) * 2);
  min-block-size: var(--size-doc-view);
  overflow: auto;
  padding: var(--space-4);
  background: var(--color-surface-sunken);
}

.doc-view__frame {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  border: 0;
}

/* A page of the CV as the mock-ups draw it; the real page is the PDF. */
.doc-view__page {
  max-inline-size: var(--size-doc-page);
  margin-inline: auto;
  padding: var(--space-6);
  background: var(--color-surface);
  box-shadow: var(--shadow-2);
  font-size: var(--font-size-sm);
}

.doc-view__note {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-5);
}

.entry-list,
.entry-list:lang(ar) {
  list-style: none;
}

.entry-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.entry {
  padding: var(--space-4);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.entry__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin-block-end: var(--space-3);
}

.entry__title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
}

.entry .field + .field,
.entry .field + .fieldset,
.entry .fieldset + .field,
.entry .fieldset + .fieldset {
  margin-block-start: var(--space-4);
}

.entry-add {
  margin-block-start: var(--space-4);
}

.field--unsure,
.field--missing {
  padding-inline-start: var(--space-3);
  border-inline-start: var(--border-width-accent) solid var(--color-warning-solid);
}

.field--missing {
  border-inline-start-color: var(--color-border-strong);
}

.flag {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin-block: var(--space-1);
  color: var(--color-ink-muted);
  font-size: var(--font-size-sm);
}

.flag > .icon {
  flex: none;
  inline-size: var(--size-icon-sm);
  block-size: var(--size-icon-sm);
  margin-block-start: 0.2em;
}

.flag--unsure {
  color: var(--color-warning);
}

.flag__text {
  min-inline-size: 0;
}

/* Words quoted from the CV: from outside, so isolate them (<bdi>). Kept as
 * one inline block so a quote in the other script never splits its order
 * across a line break. */
.excerpt {
  display: inline-block;
  max-inline-size: 100%;
  unicode-bidi: isolate;
  padding-inline: var(--space-1);
  border-radius: var(--radius-xs);
  background: var(--color-surface-sunken);
  color: var(--color-ink);
  overflow-wrap: anywhere;
}

q.excerpt:lang(ar) {
  quotes: "«" "»";
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-block-size: var(--size-control-height);
  padding-inline: var(--space-3) var(--space-1);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
}

.chip--unsure {
  border-color: var(--color-warning-solid);
  background: var(--color-warning-subtle);
}

.chip__remove {
  display: inline-grid;
  place-items: center;
  inline-size: var(--size-control-height);
  block-size: calc(var(--size-control-height) - 2 * var(--border-width));
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-ink-muted);
  cursor: pointer;
}

.chip__remove:hover {
  background: var(--color-neutral-subtle);
  color: var(--color-ink);
}

.chip__remove .icon {
  inline-size: var(--size-icon-sm);
  block-size: var(--size-icon-sm);
}

.add-row {
  display: flex;
  gap: var(--space-2);
}

.add-row .input {
  flex: 1 1 auto;
  min-inline-size: 0;
}

.add-row > .btn {
  flex: none;
  white-space: nowrap;
}

.spinner {
  flex: none;
  inline-size: var(--size-icon-lg);
  block-size: var(--size-icon-lg);
  border: var(--border-width-strong) solid currentColor;
  border-inline-end-color: transparent;
  border-radius: var(--radius-pill);
  animation: spinner-turn 0.9s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
    border-inline-end-color: currentColor;
    border-style: dotted;
  }
}

/* 31. Stage list and deadline (A1) ------------------------------------------
 * .stage-list: where an application stands, in order, on the applicant's
 * status page. <ol class="stage-list">; each <li class="stage-list__item">
 * carries --done, --current or nothing (still to come); the current one also
 * has aria-current="step", and done items a visually hidden "(done)". A
 * stage that ended the application (not selected, withdrawn) uses --ended.
 * .stage-list__note under a name says what happens there or when it ended.
 * .deadline: the one date the applicant must act by. Plain by default;
 * --soon (3 days or fewer) and --passed change the edge and the badge. The
 * date always shows Gregorian with Hijri beside it, and the time with
 * "Riyadh time"; the countdown is words ("in 5 days"), never a ticking clock.
 */

.stage-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stage-list__item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-block-size: calc(var(--size-step-marker) + var(--space-5));
  padding-block-end: var(--space-5);
  padding-inline-start: calc(var(--size-step-marker) + var(--space-3));
  color: var(--color-ink-muted);
}

.stage-list__item::before {           /* the line to the next stage */
  content: "";
  position: absolute;
  inset-inline-start: calc(var(--size-step-marker) / 2 - var(--border-width));
  inset-block: var(--size-step-marker) 0;
  border-inline-start: var(--border-width-strong) solid var(--color-border);
}

.stage-list__item:last-child::before {
  display: none;
}

.stage-list__marker {
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 0;
  display: grid;
  place-items: center;
  inline-size: var(--size-step-marker);
  block-size: var(--size-step-marker);
  border: var(--border-width-strong) solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
}

.stage-list__marker .icon {
  inline-size: var(--size-icon-sm);
  block-size: var(--size-icon-sm);
  stroke-width: 2.5;
}

.stage-list__name {
  min-block-size: var(--size-step-marker);
  display: flex;
  align-items: center;
  font-weight: var(--font-weight-semibold);
}

.stage-list__note {
  margin: 0;
  font-size: var(--font-size-sm);
}

.stage-list__item--done .stage-list__marker {
  border-color: var(--color-primary);
  background: var(--color-primary-subtle);
  color: var(--color-primary);
}

.stage-list__item--done::before {
  border-color: var(--color-primary);
}

.stage-list__item--current {
  color: var(--color-ink);
}

.stage-list__item--current .stage-list__marker {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.stage-list__item--ended .stage-list__marker {
  border-color: var(--color-neutral);
  background: var(--color-neutral-subtle);
  color: var(--color-neutral);
}

.deadline {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4);
  border: var(--border-width) solid var(--color-border);
  border-inline-start: var(--border-width-accent) solid var(--color-primary);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

.deadline__label {
  margin: 0;
  color: var(--color-ink-muted);
  font-size: var(--font-size-sm);
}

.deadline__date {
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
}

.deadline__left {
  margin: 0;
}

.deadline--soon {
  border-inline-start-color: var(--color-warning-solid);
  background: var(--color-warning-subtle);
}

.deadline--passed {
  border-inline-start-color: var(--color-danger-solid);
  background: var(--color-danger-subtle);
}

/* 32. Video frame and long upload (A2) --------------------------------------
 * .video-frame: a recorded video shown with the browser's own <video controls>
 * (keyboard, captions and full screen come with it; no custom player). The
 * frame keeps a 16:9 box so the page doesn't jump while it loads, on a dark
 * ground; a poster is never generated from the video. Use preload="metadata"
 * and say the length and size in text beside it. Nothing about the picture or
 * the sound is analysed or shown; the video is watched for what is said.
 * .file-row--uploading: a large file on its way (chunked and resumable with
 * JavaScript). The row holds the name, a native <progress class="progress">
 * named by the row, the amount sent in words ("210 of 512 MB"), and Pause or
 * Continue. --paused uses the warning edge: the upload stopped and continues
 * from where it stopped when the same file is chosen again.
 */

.video-frame {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  background: var(--color-ink);
}

.video-frame video {
  display: block;
  inline-size: 100%;
  block-size: 100%;
}

.file-row--uploading .file-row__body {
  flex: 1 1 auto;
}

.file-row--uploading .progress {
  margin-block: var(--space-1);
}

.file-row--paused {
  border-color: var(--color-warning-solid);
  background: var(--color-warning-subtle);
}

/* 33. Restyle (product owner, 28 November 2026) -----------------------------
 * Noor's applicant mock-ups (design/mockups/restyle/applicant.html, restyle.css
 * part 2): the institute's colours on the same markup, a deep band under the
 * header on the programme pages, cards that lift, and motion in CSS only:
 * sections rise in (a stagger the server writes as style="--i:n"), buttons
 * press, the form's step bar fills, the current stage's dot rings twice, a
 * success tick draws. Every timing comes from the --motion-* tokens, which
 * prefers-reduced-motion sets to nothing (tokens.css); nothing waits on an
 * animation to be readable or usable, and no page needs script.
 */

@keyframes hp-rise { from { opacity: 0; transform: translateY(var(--motion-distance-md)); } to { opacity: 1; transform: none; } }
@keyframes hp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hp-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(calc(-1 * var(--motion-distance-float))); } }
@keyframes hp-draw { to { stroke-dashoffset: 0; } }
@keyframes hp-pop { 0% { transform: scale(0.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes hp-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes hp-ring { 0% { box-shadow: 0 0 0 0 rgb(0 212 125 / 0.45); } 100% { box-shadow: 0 0 0 12px rgb(0 212 125 / 0); } }

.rise,
.stagger > *,
.page__main > .container > .page-intro,
.page__main > .container > .stack > *,
.page__main > .container > .with-aside {
  animation: hp-rise var(--motion-duration-slow) var(--motion-ease-out) backwards;
  animation-delay: calc(var(--i, 0) * var(--motion-stagger));
}

.page__main > .container > .stack > :nth-child(2) { --i: 1; }
.page__main > .container > .stack > :nth-child(3) { --i: 2; }
.page__main > .container > .stack > :nth-child(4) { --i: 3; }
.page__main > .container > .stack > :nth-child(n+5) { --i: 4; }

.lift,
a.card,
.grid > .card {
  transition: transform var(--motion-duration-fast) var(--motion-ease-out),
              box-shadow var(--motion-duration-fast) var(--motion-ease-out),
              border-color var(--motion-duration-fast);
}

.lift:hover,
.grid > .card:hover,
.grid > .card:focus-within {
  transform: translateY(calc(-1 * var(--motion-distance-sm)));
  box-shadow: var(--shadow-hover);
  border-color: var(--color-primary-200);
}

/* Page ---------------------------------------------------------------------- */

body { background: var(--color-canvas); color: var(--color-ink); }

.container { padding-inline: var(--space-5); }

@media (max-width: 47.99rem) {
  .container { padding-inline: var(--space-4); }
}

.container--reading { max-inline-size: 46rem; }

/* Header and footer ---------------------------------------------------------- */

.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 20;
  background: rgb(255 255 255 / 0.9);
  backdrop-filter: blur(10px);
  border-block-end: var(--border-width) solid var(--color-border);
}

.site-header__inner { min-block-size: 4.25rem; }

.brand { gap: var(--space-3); font-size: var(--font-size-md); }

.brand__mark {
  inline-size: 2.5rem;
  block-size: 2.5rem;
  border-radius: 0;
  background: none;
}

.brand__mark svg { display: block; inline-size: 100%; block-size: 100%; }

.brand__name { font-weight: var(--font-weight-semibold); line-height: 1.25; }

.brand__org { color: var(--color-ink-subtle); line-height: 1.25; }

.lang-switch { border: var(--border-width) solid var(--color-border); border-radius: var(--radius-pill); }

.site-footer { background: var(--color-surface); }

/* The deep band under the header (programme list and page) -------------------- */

.hero {
  position: relative;
  overflow: hidden;
  margin-block: calc(-1 * var(--space-6)) 0;
  background: var(--color-primary-strong);
  color: var(--color-on-deep);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-4);
  max-inline-size: 40rem;
  padding-block: var(--space-8) var(--space-9);
}

.hero .page-intro { margin: 0; animation: none; }

.hero .page-intro__title,
.hero h1 { color: #fff; }

.hero .page-intro__lead,
.hero p { color: var(--color-on-deep-muted); }

.hero a:not(.btn) { color: var(--color-on-deep-muted); }

.hero a:not(.btn):hover { color: #fff; }

.hero__art {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  inline-size: min(48%, 34rem);
  block-size: 100%;
  opacity: 0.95;
  pointer-events: none;
}

[dir="rtl"] .hero__art { transform: scaleX(-1); }

.hero__art .drift { animation: hp-float 9s var(--motion-ease-in-out) infinite; transform-box: fill-box; }

.hero__art .drift--b { animation-duration: 12s; animation-delay: -3s; }

.hero--slim .hero__inner { padding-block: var(--space-6) var(--space-7); }

.hero .badge { background: rgb(255 255 255 / 0.12); color: #fff; }

/* The section after a band starts over its lower edge. */
.overlap { position: relative; z-index: 2; margin-block-start: calc(-1 * var(--space-7)); }

@media (max-width: 47.99rem) {
  .hero__inner { padding-block: var(--space-6) var(--space-8); }
  .hero__art { inline-size: 70%; opacity: 0.35; }
}

/* Buttons ---------------------------------------------------------------------- */

.btn {
  font-weight: var(--font-weight-semibold);
  transition: background-color var(--motion-duration-fast), color var(--motion-duration-fast),
              border-color var(--motion-duration-fast), box-shadow var(--motion-duration-fast),
              transform var(--motion-duration-instant) var(--motion-ease-out);
}

.btn:active:not([disabled]):not([aria-disabled="true"]) { transform: scale(var(--motion-scale-press)); }

.btn--primary { box-shadow: 0 8px 18px -10px rgb(1 97 102 / 0.9); }

.btn--primary:hover { box-shadow: 0 12px 22px -10px rgb(1 97 102 / 0.8); }

.btn--secondary { border-color: var(--color-primary-200); background: var(--color-surface); color: var(--color-primary); }

.btn--secondary:hover { border-color: var(--color-primary); background: var(--color-primary-50); }

.btn .icon--flip { transition: transform var(--motion-duration-fast) var(--motion-ease-out); }

/* Cards, panels ----------------------------------------------------------------- */

.card {
  border-color: var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
}

.grid > .card { overflow: hidden; }

.grid > .card::before {                 /* the band at the top of a programme card */
  content: "";
  display: block;
  block-size: 6px;
  margin: calc(-1 * var(--space-5)) calc(-1 * var(--space-5)) 0;  /* to the card's edges, over its padding */
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

[dir="rtl"] .grid > .card::before { background: linear-gradient(270deg, var(--color-primary), var(--color-accent)); }

.grid > .card:hover .card__title a { color: var(--color-primary); }

.grid { gap: var(--space-5); }

/* Badges, alerts ----------------------------------------------------------------- */

.badge { border-radius: var(--radius-pill); font-weight: var(--font-weight-semibold); }

.alert {
  border-radius: var(--radius-sm);
  animation: hp-rise var(--motion-duration-slow) var(--motion-ease-out) backwards;
}

.field__error,
.error-summary { animation: hp-rise var(--motion-duration-base) var(--motion-ease-out) backwards; }

/* Fields ---------------------------------------------------------------------------- */

.input,
.select,
.textarea {
  transition: border-color var(--motion-duration-fast), box-shadow var(--motion-duration-fast);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-focus);
}

/* The form's step bar fills, from the reading start. */
.progress {
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-pill);
}

.progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-pill);
}

.form-progress .progress { transform-origin: left center; animation: hp-bar 600ms var(--motion-ease-out) 150ms both; }

[dir="rtl"] .form-progress .progress { transform-origin: right center; }

.steps__item[aria-current="step"] .steps__marker { box-shadow: 0 0 0 4px rgb(0 212 125 / 0.22); }

/* Upload ------------------------------------------------------------------------------ */

.upload__drop {
  border: var(--border-width-strong) dashed var(--color-primary-200);
  border-radius: var(--radius-md);
  background: var(--color-primary-50);
  transition: border-color var(--motion-duration-fast), background-color var(--motion-duration-fast);
}

.upload__drop:hover,
.upload__drop:focus-within { border-color: var(--color-primary); background: #E1F0F0; }

.upload__drop > .icon {
  box-sizing: content-box;
  padding: 0.875rem;
  border-radius: 50%;
  background: var(--color-surface);
  box-shadow: var(--shadow-1);
  transition: transform var(--motion-duration-base) var(--motion-ease-out);
}

.upload__drop:hover > .icon { transform: translateY(-3px); }

.file-row {
  border-radius: var(--radius-sm);
  animation: hp-rise var(--motion-duration-slow) var(--motion-ease-out) backwards;
}

/* Stage block on the application page: dots on a line; the current one rings twice --------- */

.stage-list__item {
  --size-step-marker: 2.25rem;
  padding-inline-start: calc(2.25rem + var(--space-3));
}

.stage-list__item::before {
  inset-inline-start: calc(1.125rem - 1px);
  inset-block: 2.25rem 0;
  border-inline-start: 2px solid var(--color-border);
}

.stage-list__marker {
  border: 0;
  background: var(--color-surface-sunken);
  color: var(--color-ink-muted);
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.stage-list__item--done .stage-list__marker { background: var(--color-primary); color: #fff; }

.stage-list__item--done::before { border-color: var(--color-primary-300); }

.stage-list__item--current .stage-list__marker {
  background: var(--color-accent);
  color: var(--color-on-accent);
  box-shadow: 0 0 0 6px rgb(0 212 125 / 0.18);
  animation: hp-ring 1.8s var(--motion-ease-out) 400ms 2;
}

/* Deadline box ----------------------------------------------------------------------------- */

.deadline {
  border: 0;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-strong) 100%);
  color: var(--color-on-deep);
  box-shadow: 0 16px 32px -18px rgb(0 55 42 / 0.8);
}

.deadline .deadline__label,
.deadline p { color: var(--color-on-deep-muted); }

.deadline .deadline__date { color: #fff; }

.deadline .badge { background: rgb(255 255 255 / 0.14); color: #fff; }

/* Success tick: <svg class="tick"><circle class="tick__ring"/><path class="tick__mark"/></svg> */

.tick { inline-size: 2.75rem; block-size: 2.75rem; flex: none; }

.tick__ring { fill: var(--color-accent-subtle); stroke: var(--color-success-solid); stroke-width: 2; transform-origin: center; transform-box: fill-box; animation: hp-pop var(--motion-duration-slow) var(--motion-ease-pop) both; }

.tick__mark { fill: none; stroke: var(--color-success); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; animation: hp-draw var(--motion-duration-slow) var(--motion-ease-out) 120ms forwards; }

@media (prefers-reduced-motion: reduce) {
  .hero__art .drift { animation: none !important; }
  .tick__mark { stroke-dashoffset: 0; }
}

.hero + .container { padding-block-start: var(--space-6); }

.hero .btn--link { color: var(--color-on-deep-muted); }

.hero .btn--link:hover { color: #fff; }

.hero .page-intro__title { font-size: var(--font-size-3xl); }

@media (max-width: 47.99rem) {
  .hero .page-intro__title { font-size: var(--font-size-2xl); }
}

/* Programme cards rise in turn (at most eight staggered; the rest arrive with the eighth). */
.grid > .card { animation: hp-rise var(--motion-duration-slow) var(--motion-ease-out) backwards; animation-delay: calc(var(--i, 0) * var(--motion-stagger)); }
.grid > .card:nth-child(2) { --i: 1; }
.grid > .card:nth-child(3) { --i: 2; }
.grid > .card:nth-child(4) { --i: 3; }
.grid > .card:nth-child(5) { --i: 4; }
.grid > .card:nth-child(6) { --i: 5; }
.grid > .card:nth-child(7) { --i: 6; }
.grid > .card:nth-child(n+8) { --i: 7; }

/* "What happens next" on the application page: the deep panel of the mock-up, when it holds plain text and
   actions (with an alert or a form inside, it stays a white card, so those keep their own colours). */
.card:has(> #next-title):not(:has(.alert, .choice, .field)) {
  border: 0;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-strong) 100%);
  color: var(--color-on-deep-muted);
  box-shadow: 0 16px 32px -18px rgb(0 55 42 / 0.8);
}

.card:has(> #next-title):not(:has(.alert, .choice, .field)) .card__title { color: #fff; }

.card:has(> #next-title):not(:has(.alert, .choice, .field)) .deadline {
  background: rgb(255 255 255 / 0.1);
  box-shadow: none;
}

.card:has(> #next-title):not(:has(.alert, .choice, .field)) .btn--primary {
  background: var(--color-accent);
  color: var(--color-on-accent);
  box-shadow: none;
}

.card:has(> #next-title):not(:has(.alert, .choice, .field)) .btn--primary:hover { background: #00C273; }

.card:has(> #next-title):not(:has(.alert, .choice, .field)) .btn--secondary {
  border-color: rgb(255 255 255 / 0.35);
  background: transparent;
  color: #fff;
}

.card:has(> #next-title):not(:has(.alert, .choice, .field)) .btn--secondary:hover { background: rgb(255 255 255 / 0.1); }

.card:has(> #next-title):not(:has(.alert, .choice, .field)) .btn--link,
.card:has(> #next-title):not(:has(.alert, .choice, .field)) a:not(.btn) { color: #fff; }

.card:has(> #next-title):not(:has(.alert, .choice, .field)) :focus-visible { outline-color: var(--color-focus-on-dark); }

@media (max-width: 47.99rem) {
  .brand__org { display: none; } /* the mock-up's phone header: the name alone beside the actions */
}
