/* Enwan brand tokens. The values are the active theme in src/pp/brand.py.
   A rebrand edits that theme and these custom properties together.
   Logical properties throughout so every rule mirrors under dir="rtl". */

/* -- fonts ------------------------------------------------------------ */

@font-face {
  font-family: "Readex Pro";
  src: url("/_s/fonts/ReadexPro-Variable-Latin.a4805912173b.woff2") format("woff2");
  font-weight: 160 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Readex Pro Arabic";
  src: url("/_s/fonts/ReadexPro-Variable-Arabic.0b9663026949.woff2") format("woff2");
  font-weight: 160 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Tajawal";
  src: url("/_s/fonts/Tajawal-Regular.23d57ff88f92.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Tajawal";
  src: url("/_s/fonts/Tajawal-Medium.3fde0fc4d3f5.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Tajawal";
  src: url("/_s/fonts/Tajawal-Bold.e5493cb56161.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/_s/fonts/IBMPlexSans-Regular.ba711a3085ff.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/_s/fonts/IBMPlexSans-SemiBold.f78048030eab.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Kaitech Riyal";
  src: url("/_s/fonts/KaitechRiyal.1292b537bb98.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* -- color tokens (light / linen theme) ------------------------------- */

:root {
  color-scheme: light dark;

  /* font stacks */
  --font-sans: "Readex Pro", "Readex Pro Arabic", "Kaitech Riyal", system-ui, sans-serif;
  --font-arabic: "Tajawal", "Readex Pro", "Kaitech Riyal", Tahoma, sans-serif;
  --font-text: "IBM Plex Sans", "Tajawal", "Kaitech Riyal", system-ui, sans-serif;
  --font-arabic-text: "Tajawal", "IBM Plex Sans", "Kaitech Riyal", Tahoma, sans-serif;

  /* palette and semantic colours: light (linen) theme */
  --night: #1b2a41;
  --linen: #f4f0e8;
  --white: #ffffff;
  --iris: #7c77df;
  --iris-text: #5852d6;
  --iris-on-night: #9490e5;
  --link: #5852d6;
  --header-muted: #545f70;
  --paper: #f4f0e8;
  --surface: #ffffff;
  --sunken: #eae4d8;
  --line: #ddd5c6;
  --line-strong: #737b8a;
  --ink: #1b2a41;
  --muted: #545f70;
  --action: #1b2a41;
  --on-action: #ffffff;
  --negative: #a3283a;
  --negative-soft: #f6dfe2;
  --positive: #2b5e8c;
  --positive-soft: #e1eaf3;
  --focus-ring: 0 0 0 2px #f4f0e8, 0 0 0 4px #1b2a41;
  --raised: #f4f0e8;
  --raised-hover: #ffffff;
  --shadow-sm: 0 1px 2px #1b2a410f;
  --shadow-menu: 0 4px 16px #1b2a4133;

  /* spacing (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* radius */
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 10px;

  /* layout */
  --container: 1200px;
  --container-text: 680px;
  --header-height: 72px;
  --grid-gutter: 24px;
}

/* -- dark (night) theme ----------------------------------------------- */

@media (prefers-color-scheme: dark) {
  :root {
    --iris-text: #9490e5;
    --link: #9490e5;
    --paper: #131e30;
    --surface: #1b2a41;
    --sunken: #0e1624;
    --line: #2c3b52;
    --line-strong: #6f7d93;
    --ink: #f4f0e8;
    --muted: #a9b3c2;
    --action: #f4f0e8;
    --on-action: #1b2a41;
    --negative: #f28b98;
    --negative-soft: #3a1820;
    --positive: #8db8e0;
    --positive-soft: #18263a;
    --focus-ring: 0 0 0 2px #131e30, 0 0 0 4px #f4f0e8;
    --raised: #2c3b52;
    --raised-hover: #374d66;
    --shadow-sm: 0 1px 2px #00000066;
    --shadow-menu: 0 4px 16px #000000aa;
  }
}

/* -- reset ------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }

/* -- base layout ------------------------------------------------------ */

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-text);
  font-size: 19px;
  line-height: 34px;
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

/* Arabic body: Tajawal 400 */
[dir="rtl"] body {
  font-family: var(--font-arabic-text);
}

/* -- focus ------------------------------------------------------------ */

:focus-visible {
  outline: 2px solid transparent;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* -- skip link -------------------------------------------------------- */

.pp-skip {
  position: absolute;
  inset-inline-start: -9999px;
  z-index: 200;
  padding: var(--space-2) var(--space-4);
  background: var(--action);
  color: var(--on-action);
  font-size: 14px;
  text-decoration: none;
  border-radius: var(--radius-md);
}
.pp-skip:focus {
  inset-inline-start: var(--space-4);
  inset-block-start: var(--space-2);
}

/* -- header ----------------------------------------------------------- */

.pp-header {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--header-height);
  padding-inline: var(--space-5);
  border-block-end: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}

/* -- shared header ---------------------------------------------------- */

.pp-header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
}

.pp-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  min-height: 44px;
}

.pp-logo {
  height: 40px;
  width: auto;
}

.pp-wordmark {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 12rem;
}

.pp-header-nav {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  margin-inline-start: var(--space-4);
}

.pp-header-nav a {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
}

[dir="rtl"] .pp-header-nav a {
  font-family: var(--font-arabic);
  font-size: 15px;
  font-weight: 700;
}

.pp-header-nav a:hover { color: var(--ink); }

.pp-header-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--iris-text);
}

[dir="rtl"] .pp-header-nav a[aria-current="page"] {
  font-weight: 700;
}

.pp-header-end {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-inline-start: auto;
}

.pp-lang-switch {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
}

[dir="rtl"] .pp-lang-switch {
  font-family: var(--font-arabic);
  font-size: 15px;
  font-weight: 700;
}

.pp-lang-switch:hover { color: var(--ink); }

.pp-sign-out-btn {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0;
}

[dir="rtl"] .pp-sign-out-btn {
  font-family: var(--font-arabic);
  font-size: 15px;
  font-weight: 700;
}

.pp-sign-out-btn:hover { color: var(--ink); }

/* -- main ------------------------------------------------------------- */

main {
  flex: 1;
  width: 100%;
  max-width: var(--container-text);
  margin-inline: auto;
  padding: var(--space-7) var(--space-5) var(--space-7);
}

/* -- typography ------------------------------------------------------- */

h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 600;
  text-wrap: balance;
}

/* English heading sizes */
h1 { font-size: 30px; line-height: 38px; letter-spacing: -0.01em; }
h2 { font-size: 23px; line-height: 31px; letter-spacing: -0.005em; }
h3 { font-size: 18px; line-height: 26px; }

/* Arabic headings: Tajawal 700, one step larger */
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 {
  font-family: var(--font-arabic);
  font-weight: 700;
}
[dir="rtl"] h1 { font-size: 32px; line-height: 52px; letter-spacing: 0; }
[dir="rtl"] h2 { font-size: 25px; line-height: 40px; letter-spacing: 0; }
[dir="rtl"] h3 { font-size: 20px; line-height: 32px; }

h1 { margin-block-end: var(--space-4); }

p { color: var(--muted); margin: 0; }

a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }

.pp-muted { color: var(--muted); }

/* -- footer ----------------------------------------------------------- */

footer {
  padding: var(--space-5) var(--space-4);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
  border-block-start: 1px solid var(--line);
}

.pp-endorsed {
  background: var(--paper);
  border-block-start: 1px solid var(--line);
}

.pp-endorsed-logo {
  height: 32px;
  width: auto;
  max-width: 100%;
}

[dir="rtl"] footer {
  font-size: 14px;
  line-height: 24px;
}

/* -- card surface (person page) --------------------------------------- */

.pp-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.pp-card h1 { margin-block-end: var(--space-2); }

.pp-card .pp-title {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  color: var(--ink);
  margin: 0;
}

[dir="rtl"] .pp-card .pp-title {
  font-family: var(--font-arabic);
  font-size: 17px;
  line-height: 28px;
}

.pp-card .pp-org {
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
  margin-block-start: var(--space-1);
}

[dir="rtl"] .pp-card .pp-org {
  font-size: 15px;
  line-height: 24px;
}

.pp-company-logo {
  height: 32px;
  width: auto;
  margin-block-end: var(--space-4);
  display: block;
}

.pp-bio {
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 24px;
  color: var(--ink);
  margin-block-start: var(--space-4);
  white-space: pre-line;
}

[dir="rtl"] .pp-bio {
  font-family: var(--font-arabic-text);
  font-size: 16px;
  line-height: 28px;
}

.pp-contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-block-start: var(--space-4);
}

.pp-contact-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--link);
  text-decoration: none;
  font-size: 14px;
  line-height: 20px;
  word-break: break-all;
}

.pp-contact-link:hover {
  text-decoration: underline;
}

.pp-contact-icon {
  flex-shrink: 0;
  color: var(--muted);
  width: 20px;
  height: 20px;
}

.pp-languages {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
  margin-block-start: var(--space-3);
}

.pp-save-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-block-start: var(--space-5);
  width: 100%;
}

.pp-save-contact svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* -- save-contact language menu --------------------------------------- */

.pp-save-contact-wrap {
  position: relative;
  margin-block-start: var(--space-5);
  width: 100%;
}

.pp-save-contact-wrap .pp-save-contact {
  margin-block-start: 0;
}

.pp-lang-menu {
  position: absolute;
  inset-inline: 0;
  inset-block-end: calc(100% + var(--space-2));
  list-style: none;
  margin: 0;
  padding: var(--space-1) 0;
  background: var(--raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-menu);
  z-index: 10;
}

.pp-lang-menu[hidden] { display: none; }

.pp-lang-menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 24px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  min-height: 40px;
}

[dir="rtl"] .pp-lang-menu-item {
  font-family: var(--font-arabic);
  font-size: 16px;
  font-weight: 700;
}

.pp-lang-menu-item:hover,
.pp-lang-menu-item:focus {
  background: var(--raised-hover);
  color: var(--ink);
  outline: none;
}

.pp-lang-menu-default::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--iris);
  margin-inline-start: var(--space-1);
}

/* -- registration card ------------------------------------------------ */

.pp-register-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  max-width: var(--container-text);
}

.pp-register-card h1 {
  margin-block-end: var(--space-2);
}

.pp-register-card > p {
  margin-block-end: var(--space-5);
}

/* -- registration form ------------------------------------------------ */

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

.pp-form label {
  display: block;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--ink);
  margin-block-end: var(--space-2);
}

[dir="rtl"] .pp-form label {
  font-family: var(--font-arabic);
  font-size: 15px;
  line-height: 24px;
}

.pp-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.pp-form select {
  display: block;
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font: inherit;
  font-size: 16px;
  line-height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  min-height: 44px;
}

.pp-form input::placeholder {
  color: var(--muted);
}

/* -- buttons ---------------------------------------------------------- */

.pp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  box-sizing: border-box;
  height: 44px;
  margin-block-start: var(--space-3);
  padding-block: 0;
  padding-inline: var(--space-4);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: var(--action);
  color: var(--on-action);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color .12s ease;
}

[dir="rtl"] .pp-btn {
  font-family: var(--font-arabic);
  font-size: 16px;
  font-weight: 700;
  /* Tajawal draws Arabic above the centre of the em box. A little
     extra padding on the block-start side brings the glyphs down. */
  padding-block: 3px 0;
}

.pp-btn:hover {
  opacity: 0.85;
}

.pp-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pp-btn-danger {
  background: var(--negative);
  color: var(--on-action);
}

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

/* -- hints and errors ------------------------------------------------- */

.pp-hint {
  margin-block-start: var(--space-1);
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
}

.pp-slug-free {
  color: var(--positive);
}

.pp-slug-taken {
  color: var(--negative);
}

[dir="rtl"] .pp-hint {
  font-size: 15px;
  line-height: 24px;
}

.pp-error {
  padding: var(--space-3) var(--space-4);
  margin-block-start: var(--space-3);
  background: var(--negative-soft);
  color: var(--negative);
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  border-radius: var(--radius-md);
}

[dir="rtl"] .pp-error {
  font-size: 15px;
  line-height: 24px;
}

/* -- form step (registration wizard) ---------------------------------- */

.pp-step {
  display: flex;
  flex-direction: column;
  border: none;
  margin: 0;
  padding: 0;
}

.pp-step[hidden] {
  display: none;
}

/* -- step indicator --------------------------------------------------- */

.pp-step-indicator {
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
  margin-block-end: var(--space-4);
}

[dir="rtl"] .pp-step-indicator {
  font-size: 14px;
  line-height: 24px;
}

/* -- sent-to line (code step) ----------------------------------------- */

.pp-sent-to {
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
  margin-block-end: var(--space-3);
}

[dir="rtl"] .pp-sent-to {
  font-size: 15px;
  line-height: 24px;
}

.pp-sent-to .ltr {
  font-weight: 500;
  color: var(--ink);
}

/* -- text links under the card ---------------------------------------- */

.pp-card-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-block-start: var(--space-5);
  font-size: 14px;
  line-height: 20px;
}

[dir="rtl"] .pp-card-links {
  font-size: 15px;
  line-height: 24px;
}

.pp-card-links a {
  color: var(--link);
}

.pp-card-links a:hover {
  color: var(--ink);
}

/* -- inline link button (change email, resend) ------------------------ */

.pp-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding-block: 2px;
  padding-inline: 0;
  font: inherit;
  font-size: 14px;
  line-height: 1.2;
  min-height: 44px;
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

[dir="rtl"] .pp-link-btn {
  font-size: 15px;
  line-height: 1.2;
  padding-block: 4px 1px;
}

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

.pp-link-btn:disabled {
  opacity: 1;
  color: var(--muted);
  text-decoration: none;
  cursor: not-allowed;
}

/* -- code-step action row --------------------------------------------- */

.pp-signin-alt {
  margin-block-start: var(--space-4);
}

.pp-code-actions {
  display: flex;
  gap: var(--space-4);
  margin-block-start: var(--space-3);
  flex-wrap: wrap;
  align-items: center;
}

/* -- passkeys --------------------------------------------------------- */

.pp-passkey-manage {
  margin-block-start: var(--space-6);
  padding-block-start: var(--space-5);
  border-block-start: 1px solid var(--line);
}

.pp-passkey h2 { margin-block-end: var(--space-2); }

.pp-passkey > p { margin-block-end: var(--space-4); }

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

.pp-passkey-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
}

.pp-passkey-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
  flex: 1 1 10rem;
}

.pp-passkey-name {
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: break-word;
}

.pp-passkey-when {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

[dir="rtl"] .pp-passkey-when {
  font-size: 15px;
  line-height: 24px;
}

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

.pp-passkey-prompt .pp-passkey-actions {
  flex-direction: column;
  align-items: stretch;
}

.pp-passkey .pp-btn,
[dir="rtl"] .pp-passkey .pp-btn {
  margin-block-start: 0;
  white-space: normal;
  height: auto;
  min-height: 44px;
  padding-block: var(--space-2);
  text-align: center;
}

@media (max-width: 480px) {
  .pp-code-actions {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
  }
  .pp-code-actions .pp-link-btn {
    justify-content: flex-start;
    min-height: 44px;
  }
  .pp-passkey-row .pp-btn,
  .pp-passkey-actions,
  .pp-passkey-actions .pp-btn {
    width: 100%;
  }
}

/* -- slug availability ------------------------------------------------ */

.pp-slug-ok {
  color: var(--positive);
}

.pp-slug-taken {
  color: var(--negative);
}

/* -- done state ------------------------------------------------------- */

.pp-done-msg {
  font-size: 16px;
  line-height: 26px;
}

[dir="rtl"] .pp-done-msg {
  font-size: 17px;
  line-height: 28px;
}

.pp-done-msg a {
  color: var(--link);
  font-weight: 500;
}

/* -- language toggle -------------------------------------------------- */

.pp-lang {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--link);
  text-decoration: none;
}

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

/* -- form privacy note ------------------------------------------------ */

.pp-form-note {
  font-size: 13px;
  line-height: 20px;
  color: var(--muted);
  margin: 0;
}

[dir="rtl"] .pp-form-note {
  font-size: 14px;
  line-height: 24px;
}

.pp-form-note a {
  color: var(--link);
}

/* -- consent notice (E5.2) -------------------------------------------- */

.pp-notice {
  margin-block: var(--space-4);
  padding: var(--space-4);
  background: var(--sunken);
  border-radius: var(--radius-md);
  font-size: 15px;
  line-height: 24px;
  color: var(--ink);
}

[dir="rtl"] .pp-notice {
  font-size: 16px;
  line-height: 28px;
}

.pp-notice h2 {
  margin-block-end: var(--space-2);
}

.pp-notice p {
  color: var(--ink);
  margin-block-end: var(--space-2);
}

.pp-notice p:last-child {
  margin-block-end: 0;
}

.pp-checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  font-size: 15px;
  line-height: 24px;
  color: var(--ink);
  cursor: pointer;
}

[dir="rtl"] .pp-checkbox-label {
  font-size: 16px;
  line-height: 28px;
}

.pp-checkbox-label input[type="checkbox"] {
  margin-block-start: 2px;
  flex-shrink: 0;
  accent-color: var(--action);
  width: 24px;
  height: 24px;
  min-width: 24px;
}

/* -- admin table (people list) ---------------------------------------- */

.pp-table {
  width: 100%;
  border-collapse: collapse;
  margin-block-start: var(--space-4);
  font-size: 15px;
  line-height: 24px;
}

.pp-table th, .pp-table td {
  padding: var(--space-2) var(--space-3);
  text-align: start;
  border-block-end: 1px solid var(--line);
}

.pp-table th {
  font-weight: 500;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

/* -- member actions (people list) -------------------------------------- */

.pp-member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.pp-member-actions .pp-btn {
  margin-block-start: 0;
  height: auto;
  min-height: 44px;
}

.pp-my-card-action .pp-btn {
  margin-block-start: 0;
  height: auto;
  min-height: 44px;
}

/* -- platform admin (E3.2) -------------------------------------------- */

.pp-admin-card {
  max-width: var(--container-text);
  margin: 0 auto;
}
.pp-admin-card h1 { margin-block-end: var(--space-3); }

.pp-admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-block-start: var(--space-4);
}
.pp-admin-table th,
.pp-admin-table td {
  padding: var(--space-2) var(--space-3);
  text-align: start;
  border-block-end: 1px solid var(--line);
}
.pp-admin-table th {
  font-weight: 500;
  color: var(--muted);
  font-size: 14px;
}
.pp-admin-table td { font-size: 15px; }

.pp-btn-sm {
  min-height: 44px;
  padding-block: 0;
  padding-inline: var(--space-3);
  font-size: 14px;
  border-radius: var(--radius-sm);
}

[dir="rtl"] .pp-btn-sm {
  padding-block: 2px 0;
}

.pp-btn-block {
  display: flex;
  width: 100%;
}

.pp-muted { color: var(--muted); }
.pp-field-hint { font-size: 13px; margin-block: 0 var(--space-2); }

.pp-status {
  margin-block-start: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: 14px;
}
.pp-status-ok {
  background: var(--positive-soft);
  color: var(--positive);
}
.pp-status-error {
  background: var(--negative-soft);
  color: var(--negative);
}
.pp-field-error {
  border-color: var(--negative) !important;
  outline-color: var(--negative);
}

.pp-admin-actions {
  margin-block-start: var(--space-5);
  text-align: center;
}

.pp-admin-scroll { display: none; }

.pp-admin-table a {
  color: var(--link);
}

.pp-admin-table td,
.pp-admin-table a,
.pp-table td,
.pp-table a,
.pp-wait-card,
.pp-wait-card a {
  overflow-wrap: break-word;
  word-break: normal;
}

.pp-wait-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-block-start: var(--space-4);
}

.pp-wait-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  background: var(--surface);
}

.pp-wait-card h2 {
  margin: 0;
  font-size: 18px;
  line-height: 28px;
}

.pp-wait-card p { margin: var(--space-2) 0 0; }

.pp-wait-card .pp-btn { width: 100%; }

.pp-wait-reason { margin-block-start: var(--space-3); }

/* -- CSV import table ------------------------------------------------- */

.pp-table-wrap {
  overflow-x: auto;
}

.pp-cell-nowrap {
  white-space: nowrap;
}

.pp-import-summary {
  margin-block-start: var(--space-3);
}

.pp-error-badge {
  display: inline-block;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--negative-soft);
  color: var(--negative);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  border-inline-start: 3px solid var(--negative);
}

.pp-ok-badge {
  display: inline-block;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--positive-soft);
  color: var(--positive);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
}

.pp-row-error {
  background: var(--negative-soft);
}

.pp-alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  margin-block-end: var(--space-3);
}

.pp-alert-ok {
  background: var(--positive-soft);
  color: var(--positive);
}

.pp-alert-error {
  background: var(--negative-soft);
  color: var(--negative);
}

[dir="rtl"] .pp-alert {
  font-size: 15px;
  line-height: 24px;
}

.pp-import-consent-note {
  font-size: 14px;
  color: var(--muted);
  margin-block-start: var(--space-3);
}

[dir="rtl"] .pp-import-consent-note {
  font-size: 15px;
}

.pp-form-actions {
  display: flex;
  gap: var(--space-3);
  margin-block-start: var(--space-4);
}

@media (max-width: 639px) {
  .pp-table thead { display: none; }
  .pp-table,
  .pp-table tbody,
  .pp-table tr,
  .pp-table td { display: block; width: 100%; }
  .pp-table tr {
    margin-block-end: var(--space-4);
    padding: var(--space-3);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
  }
  .pp-table td { border: none; padding: var(--space-1) 0; }
  .pp-table td[data-label]::before {
    content: attr(data-label) ": ";
    font-weight: 500;
    color: var(--muted);
    font-size: 13px;
  }
  .pp-table td:empty { display: none; }
}

.pp-form textarea {
  display: block;
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font: inherit;
  font-size: 16px;
  line-height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
}

/* -- consent banner --------------------------------------------------- */

.en-consent {
  position: fixed;
  inset-block-end: 0;
  inset-inline: 0;
  background: var(--surface);
  border-block-start: 1px solid var(--line);
  padding: var(--space-4) var(--space-5);
  z-index: 100;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
}

.en-consent[hidden] { display: none; }

.en-consent-inner {
  max-width: var(--container);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.en-consent p {
  flex: 1;
  min-width: 200px;
  font-size: 14px;
  line-height: 20px;
  color: var(--ink);
  margin: 0;
}

[dir="rtl"] .en-consent p {
  font-size: 15px;
  line-height: 24px;
}

.en-consent-buttons {
  display: flex;
  gap: var(--space-3);
  flex-shrink: 0;
}

.en-consent-buttons .pp-btn {
  min-height: 44px;
  height: auto;
}

/* -- Enwan home page (operating-board #204) --------------------------- */

.en-home .en-main {
  max-width: none;
  padding: 0;
}

/* ---- header ---- */

.en-header { justify-content: stretch; }

.en-header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-7);
}

.en-nav {
  display: flex;
  gap: var(--space-5);
  margin-inline-start: auto;
}

.en-nav a {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  min-height: 44px;
}

[dir="rtl"] .en-nav a {
  font-family: var(--font-arabic);
  font-size: 15px;
}

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

.en-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.en-sign-in {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  min-height: 44px;
}

[dir="rtl"] .en-sign-in {
  font-family: var(--font-arabic);
  font-size: 15px;
}

.en-sign-in:hover { color: var(--ink); }

/* Header chrome follows the theme via --ink and --paper tokens. */
.pp-header .en-nav a,
.pp-header .en-sign-in,
.pp-header .pp-lang {
  color: var(--ink);
  font-weight: 600;
}

[dir="rtl"] .pp-header .en-nav a,
[dir="rtl"] .pp-header .en-sign-in,
[dir="rtl"] .pp-header .pp-lang {
  font-weight: 700;
}

.pp-header .en-nav a:hover,
.pp-header .en-sign-in:hover,
.pp-header .pp-lang:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* The logo sits in an inline <picture>, which left it above the row centre. */
.en-header-inner picture { display: flex; align-items: center; }
.en-header .pp-logo { display: block; }

.pp-header .pp-btn {
  background: var(--action);
  color: var(--on-action);
  border-color: transparent;
}

.en-btn-register {
  font-size: 14px;
  min-height: 44px;
  height: auto;
  /* .pp-btn adds a 12px top margin for forms. In the header row it pushed
     the button 6px below the centre line of the links. */
  margin-block-start: 0;
}

/* ---- sections ---- */

.en-section {
  padding: var(--space-8) 0;
}

.en-container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-7);
}

.en-container-text {
  max-width: var(--container-text);
}

.en-section h2 {
  margin-block-end: var(--space-5);
}

/* ---- hero ---- */

.en-hero {
  padding: var(--space-9) 0 var(--space-8);
}

.en-hero .en-container {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.en-hero-text {
  flex: 1;
  min-width: 0;
}

.en-eyebrow {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--iris-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-block-end: var(--space-3);
}

[dir="rtl"] .en-eyebrow {
  font-family: var(--font-arabic);
  font-size: 15px;
  text-transform: none;
  letter-spacing: 0;
}

.en-hero h1 {
  font-size: 40px;
  line-height: 52px;
  letter-spacing: -0.02em;
  margin-block-end: var(--space-4);
}

[dir="rtl"] .en-hero h1 {
  font-size: 42px;
  line-height: 60px;
  letter-spacing: 0;
}

.en-sub {
  font-size: 18px;
  line-height: 30px;
  color: var(--muted);
  margin-block-end: var(--space-5);
}

[dir="rtl"] .en-sub {
  font-size: 19px;
  line-height: 34px;
}

.en-hero-cta {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-block-end: var(--space-3);
}

.en-waiting {
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
}

[dir="rtl"] .en-waiting {
  font-size: 15px;
  line-height: 24px;
}

.en-hero-diagram {
  flex: 0 0 auto;
  width: 400px;
}

.en-hero-diagram img,
.en-hero-diagram .hd {
  width: 100%;
  height: auto;
}

/* Hero diagram (inline SVG): every colour is a token, so it follows the night theme. */
.hd { display: block; width: 100%; height: auto; --hd-o: 1; }
.hd text { font-family: var(--font-text); font-size: 19px; fill: var(--muted); }
[dir="rtl"] .hd text { font-family: var(--font-arabic-text); }
.hd .hd-name { font-size: 20px; font-weight: 600; fill: var(--ink); }
[dir="rtl"] .hd .hd-name { font-weight: 700; }
.hd .hd-label { font-size: 25px; font-weight: 700; fill: var(--ink); }
.hd .hd-btn-text { fill: var(--ink); }
.hd .hd-btn-text-on { fill: var(--on-action); }
.hd-outline { fill: none; stroke: var(--ink); stroke-opacity: var(--hd-o); stroke-width: 2; }
.hd-line { fill: none; stroke: var(--ink); stroke-opacity: var(--hd-o); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.hd-dash { stroke-dasharray: 2 8; }
.hd-soft { fill: var(--ink); fill-opacity: 0.2; }
.hd-qr rect { fill: var(--ink); }
.hd-avatar { fill: var(--ink); fill-opacity: 0.14; stroke: var(--ink); stroke-opacity: var(--hd-o); stroke-width: 1.5; }
.hd-fill { fill: var(--action); }
.hd-spark { fill: var(--iris); }
@media (prefers-color-scheme: dark) {
  .hd { --hd-o: 0.7; }
}

/* ---- what it is ---- */

.en-what { background: var(--surface); }

.en-lead {
  font-size: 18px;
  line-height: 30px;
  color: var(--muted);
  margin-block-end: var(--space-6);
  max-width: var(--container-text);
}

[dir="rtl"] .en-lead {
  font-size: 19px;
  line-height: 34px;
}

.en-what-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gutter);
}

.en-what-card {
  padding: var(--space-5);
  background: var(--paper);
  border-radius: var(--radius-lg);
}

.en-what-card h3 { margin-block-end: var(--space-2); }

/* ---- how it works ---- */

.en-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--grid-gutter);
}

.en-step { position: relative; }

.en-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-block-end: var(--space-3);
}

.en-step h3 { margin-block-end: var(--space-2); }

/* ---- features ---- */

.en-features { background: var(--surface); }

.en-feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gutter);
}

.en-feat-card {
  padding: var(--space-5);
  background: var(--paper);
  border-radius: var(--radius-lg);
}

.en-feat-card img {
  margin-block-end: var(--space-3);
}

.en-feat-card h3 { margin-block-end: var(--space-2); }

.en-feat-coming img { opacity: 0.6; }

.en-coming-badge {
  display: flex;
  width: fit-content;
  align-items: center;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
  white-space: nowrap;
  background: var(--surface);
  color: var(--muted);
  margin-block-end: var(--space-2);
}

.en-feat-control {
  margin-block-start: var(--space-5);
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
}

[dir="rtl"] .en-feat-control {
  font-size: 15px;
  line-height: 24px;
}

/* ---- who it is for ---- */

.en-who-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gutter);
}

.en-who-card {
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.en-who-card h3 { margin-block-end: var(--space-2); }

/* ---- privacy ---- */

.en-privacy-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.en-privacy-list li {
  position: relative;
  padding-inline-start: var(--space-5);
  margin-block-end: var(--space-3);
  color: var(--muted);
}

.en-privacy-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 10px;
  width: 10px;
  height: 10px;
  background: var(--iris);
  transform: rotate(45deg);
}

/* ---- FAQ ---- */

.en-faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.en-faq-item {
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.en-faq-item summary {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  min-height: 44px;
  display: flex;
  align-items: center;
}

[dir="rtl"] .en-faq-item summary {
  font-family: var(--font-arabic);
  font-size: 17px;
  font-weight: 700;
}

.en-faq-item summary::-webkit-details-marker { display: none; }

.en-faq-item p {
  margin-block-start: var(--space-3);
  font-size: 15px;
  line-height: 24px;
}

[dir="rtl"] .en-faq-item p {
  font-size: 16px;
  line-height: 28px;
}

/* ---- final CTA band ---- */

.en-cta-band {
  background: var(--night);
  color: var(--linen);
  text-align: center;
  --link: var(--iris-on-night);
}

.en-cta-band h2 {
  color: var(--linen);
  margin-block-end: var(--space-3);
}

.en-cta-band p {
  color: var(--linen);
  opacity: 0.8;
  margin-block-end: var(--space-5);
}

.en-cta-band p.en-cta-contact {
  opacity: 1;
}

.en-cta-btn {
  background: var(--linen);
  color: var(--night);
}

.en-cta-contact {
  margin-block-start: var(--space-5);
  font-size: 14px;
}

[dir="rtl"] .en-cta-contact { font-size: 15px; }

.en-cta-contact a { color: var(--link); }

/* ---- home footer ---- */

.en-footer {
  padding: var(--space-5) 0;
  border-block-start: 1px solid var(--line);
}

.en-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.en-footer p {
  font-size: 13px;
  line-height: 20px;
  color: var(--muted);
  margin: 0;
}

[dir="rtl"] .en-footer p {
  font-size: 14px;
  line-height: 24px;
}

.en-footer-links {
  display: flex;
  gap: var(--space-5);
}

.en-footer-links a {
  font-size: 13px;
  line-height: 20px;
  color: var(--link);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

[dir="rtl"] .en-footer-links a { font-size: 14px; }

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

.en-footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.en-footer-endorsed {
  height: 36px;
  width: auto;
}

[dir="rtl"] .en-footer-endorsed {
  height: 40px;
}

/* -- form fieldsets --------------------------------------------------- */

.pp-fieldset {
  border: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.pp-fieldset legend {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  padding: 0;
  margin-block-end: var(--space-2);
}

[dir="rtl"] .pp-fieldset legend {
  font-family: var(--font-arabic);
  font-size: 20px;
  font-weight: 700;
}

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

.pp-optional {
  color: var(--muted);
  font-weight: 400;
}

/* -- status chip ------------------------------------------------------ */

.pp-chip {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
  white-space: nowrap;
}

.pp-chip-live { background: var(--positive-soft); color: var(--positive); }
.pp-chip-waiting { background: var(--sunken); color: var(--muted); }
.pp-chip-ready { background: var(--positive-soft); color: var(--positive); }
.pp-chip-left { background: var(--sunken); color: var(--muted); }

/* -- colleagues directory --------------------------------------------- */

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

.pp-colleague-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  min-height: 44px;
}

.pp-colleague-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
  flex: 1;
}

.pp-colleague-name {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.pp-colleague-name:hover { color: var(--link); }

.pp-colleague-title {
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
}

[dir="rtl"] .pp-colleague-title {
  font-size: 15px;
  line-height: 24px;
}

.pp-copy-btn { flex-shrink: 0; }

/* -- preview banner --------------------------------------------------- */

.pp-preview-banner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  margin-block-end: var(--space-4);
  background: var(--sunken);
  border-radius: var(--radius-md);
}

.pp-preview-banner p {
  flex: 1;
  margin: 0;
  font-size: 15px;
  color: var(--ink);
}

.pp-preview-banner .pp-btn {
  margin-block-start: 0;
}

/* -- utility ---------------------------------------------------------- */

.ltr { direction: ltr; unicode-bidi: isolate; }

/* -- mobile menu ------------------------------------------------------ */

.pp-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: var(--space-1) var(--space-3);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
}

[dir="rtl"] .pp-menu-btn {
  font-family: var(--font-arabic);
  font-size: 15px;
  font-weight: 700;
}

.pp-mobile-menu {
  background: var(--surface);
  border-block-end: 1px solid var(--line);
}

.pp-mobile-menu[hidden] { display: none; }

.pp-mobile-menu-inner {
  display: flex;
  flex-direction: column;
  max-width: var(--container);
  margin-inline: auto;
  padding: var(--space-3) var(--space-4);
}

.pp-mobile-menu-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
  text-align: start;
}

[dir="rtl"] .pp-mobile-menu-link {
  font-family: var(--font-arabic);
  font-size: 16px;
  font-weight: 700;
}

.pp-mobile-menu-link[aria-current="page"] {
  color: var(--iris-text);
}

.pp-mobile-menu-signout {
  border-block-start: 1px solid var(--line);
  margin-block-start: var(--space-2);
  padding-block-start: var(--space-3);
  color: var(--muted);
}

/* -- public home menu button (phone only) ----------------------------- */

.en-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: var(--space-1) var(--space-3);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
}

[dir="rtl"] .en-menu-btn {
  font-family: var(--font-arabic);
  font-size: 15px;
  font-weight: 700;
}

.en-mobile-menu {
  background: var(--surface);
  border-block-end: 1px solid var(--line);
}

.en-mobile-menu[hidden] { display: none; }

.en-mobile-menu-inner {
  display: flex;
  flex-direction: column;
  max-width: var(--container);
  margin-inline: auto;
  padding: var(--space-3) var(--space-4);
}

/* -- settings page sections ------------------------------------------- */

.pp-settings-section {
  margin-block-start: var(--space-5);
  padding-block-start: var(--space-5);
  border-block-start: 1px solid var(--line);
}

/* -- page link section ------------------------------------------------ */

.pp-page-link {
  margin-block: var(--space-4);
  padding-block-start: var(--space-4);
  border-block-start: 1px solid var(--line);
}

.pp-page-link h2 { margin-block-end: var(--space-2); }

.pp-page-url {
  font-size: 15px;
  color: var(--ink);
  word-break: break-all;
}

.pp-page-link-actions {
  display: flex;
  gap: var(--space-3);
  margin-block-start: var(--space-3);
  align-items: center;
}

.pp-page-link-actions .pp-btn {
  margin-block-start: 0;
}

/* -- desktop: cap English lockup so nav fits at 1024-1280 ------------- */

@media (min-width: 641px) {
  [dir="ltr"] .en-header .pp-logo { height: 29px; }
  .en-header .en-nav a,
  .en-sign-in,
  .pp-lang { white-space: nowrap; }
}

/* -- tablet: menu-button layout from 641 to 1099px ------------------- */

@media (min-width: 641px) and (max-width: 1099px) {
  .en-nav { display: none; }
  .en-header .en-sign-in,
  .en-header .pp-lang { display: none; }
  .en-menu-btn:not([hidden]) { display: flex; }
  .en-header-inner {
    flex-wrap: nowrap;
    gap: var(--space-2);
  }
  .en-header-actions {
    flex: 1 1 auto;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: var(--space-2);
    margin-inline-start: auto;
  }
}

/* -- phone breakpoint ------------------------------------------------- */

@media (max-width: 640px) {
  body { font-size: 18px; }
  main { padding: var(--space-6) var(--space-4) var(--space-6); }
  .pp-header { height: auto; min-height: 56px; }
  .pp-header-nav { display: none; }
  .pp-header-inner { gap: var(--space-2); }
  .pp-header-end .pp-sign-out-btn { display: none; }
  .pp-menu-btn:not([hidden]) { display: flex; }

  /* Home header: phone layout with menu button. */
  .en-header {
    height: auto;
    min-height: 56px;
    padding-inline: var(--space-2);
  }
  .en-header-inner {
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--space-2);
    padding-inline: 0;
    padding-block: var(--space-2);
  }
  .en-nav { display: none; }
  .en-header .en-sign-in,
  .en-header .pp-lang { display: none; }
  .en-menu-btn:not([hidden]) { display: flex; }
  .en-header-actions {
    flex: 1 1 auto;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: var(--space-2);
    margin-inline-start: auto;
  }
  .en-header .en-btn-register {
    margin-block-start: 0;
    min-height: 44px;
    height: auto;
    padding-inline: var(--space-2);
    font-size: 13px;
  }
  [dir="rtl"] .en-header .en-btn-register { font-size: 14px; }
  .en-header-actions a { white-space: nowrap; }
  .en-header .pp-logo { height: 20px; }
  [dir="rtl"] .en-header .pp-logo { height: 26px; }
  .pp-logo { height: 36px; }
  .en-container { padding-inline: var(--space-4); }
  .en-hero .en-container { flex-direction: column; }
  .en-hero-diagram { width: 100%; }
  .en-hero h1 { font-size: 28px; line-height: 40px; }
  [dir="rtl"] .en-hero h1 { font-size: 30px; line-height: 44px; }
  .en-what-grid,
  .en-who-grid { grid-template-columns: 1fr; }
  .en-steps-grid { grid-template-columns: repeat(2, 1fr); }
  .en-feat-grid { grid-template-columns: 1fr 1fr; }
  .en-faq-grid { grid-template-columns: 1fr; }
}

/* Narrow phones: the register label wraps so the row still fits at 360px. */
@media (max-width: 480px) {
  .en-header .pp-logo { height: 18px; }
  [dir="rtl"] .en-header .pp-logo { height: 24px; }
  .en-header-actions a.en-btn-register {
    height: auto;
    min-height: 44px;
    padding: var(--space-1) var(--space-2);
    font-size: 12px;
    line-height: 1.15;
    white-space: normal;
    text-align: center;
    max-width: 9em;
  }
  [dir="rtl"] .en-header-actions a.en-btn-register {
    font-size: 13px;
    /* The shorthand above dropped the Tajawal block-start pad. */
    padding-block: 8px 2px;
  }
}

/* Feature icons are img files drawn in night: lighten them on the night theme. */
@media (prefers-color-scheme: dark) {
  .en-feat-card img { filter: invert(1) opacity(0.85); }
}

/* -- initials avatar (operating-board#226 comment 6875171320) ---------- */

.pp-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--iris);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 40px;
  font-weight: 600;
  line-height: 1;
  margin-block-end: var(--space-4);
  flex-shrink: 0;
}

@media (prefers-color-scheme: dark) {
  .pp-avatar {
    background: var(--iris-on-night);
    color: var(--night);
  }
}

.pp-avatar-sm {
  width: 40px;
  height: 40px;
  font-size: 18px;
  margin-block-end: 0;
}

.pp-avatar-photo {
  object-fit: cover;
}

/* -- photo upload control (E5.3) --------------------------------------- */

.pp-photo-upload {
  margin-block-end: var(--space-5);
  padding-block-end: var(--space-5);
  border-block-end: 1px solid var(--line);
}

.pp-photo-empty,
.pp-photo-uploaded {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.pp-photo-empty[hidden],
.pp-photo-uploaded[hidden],
.pp-photo-uploading[hidden] {
  display: none;
}

.pp-photo-upload .pp-hint {
  margin: 0;
}

/* -- nav group separator ----------------------------------------------- */

.pp-nav-sep {
  display: inline-block;
  width: 1px;
  height: 20px;
  background: var(--line);
  margin-inline: var(--space-1);
}

/* -- placeholder chip (booking placeholders) --------------------------- */

.pp-chip {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  border-radius: var(--radius-sm);
}

.pp-chip-muted {
  background: var(--sunken);
  color: var(--muted);
}

.pp-chip-live {
  background: var(--positive-soft);
  color: var(--positive);
}

.pp-placeholder {
  text-align: center;
  padding: var(--space-8) var(--space-5);
}

.pp-placeholder h1 { margin-block-end: var(--space-3); }

.pp-placeholder .pp-chip { margin-block-start: var(--space-5); }

/* -- colleague row with avatar ---------------------------------------- */

.pp-colleague-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* -- dashboard tiles -------------------------------------------------- */

.pp-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-block-start: var(--space-4);
}

.pp-tile {
  flex: 1;
  min-width: 120px;
  padding: var(--space-4);
  background: var(--sunken);
  border-radius: var(--radius-md);
  text-align: center;
}

.pp-tile-number {
  font-size: 28px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.pp-tile-label {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* -- colleague search field ------------------------------------------- */

.pp-colleague-search-field {
  margin-block-end: var(--space-4);
}

/* -- white-label branding (architecture 4.4) ------------------------------ */

.pp-logo-upload {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-block-start: var(--space-4);
}

.pp-logo-preview {
  display: flex;
  align-items: center;
  padding: var(--space-3);
  background: var(--sunken);
  border-radius: var(--radius-md);
}

.pp-logo-preview img {
  max-width: 100%;
  max-height: 80px;
  height: auto;
}

.pp-file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding-inline: var(--space-4);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}

[dir="rtl"] .pp-file-label {
  font-family: var(--font-arabic);
  font-size: 16px;
  font-weight: 700;
}

.pp-file-label:hover {
  background: var(--sunken);
}

.pp-logo-hint {
  font-size: 14px;
  line-height: 20px;
}

[dir="rtl"] .pp-logo-hint {
  font-size: 15px;
  line-height: 24px;
}

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

.pp-brand-version {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  min-height: 44px;
}

.pp-brand-version.pp-active {
  border-color: var(--iris-text);
  background: var(--positive-soft);
}

.pp-rollback-btn {
  margin-block-start: 0;
}

.pp-version-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
  white-space: nowrap;
  background: var(--positive-soft);
  color: var(--positive);
}

.pp-version-date {
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
}

[dir="rtl"] .pp-version-date {
  font-size: 15px;
  line-height: 24px;
}

@media (max-width: 480px) {
  .pp-brand-version {
    flex-wrap: wrap;
  }
}

/* -- responsive nav at 390px ------------------------------------------ */

@media (max-width: 480px) {
  .pp-header-nav {
    flex-wrap: wrap;
    gap: var(--space-2);
  }
  .pp-header-nav a {
    font-size: 13px;
  }
  [dir="rtl"] .pp-header-nav a {
    font-size: 14px;
  }
}

/* -- leaver redirect page (US-12) ------------------------------------ */

.pp-leaver {
  text-align: center;
  max-width: var(--container-text);
  margin-inline: auto;
}
.pp-leaver h1 {
  font-size: 22px;
  line-height: 32px;
  margin-block-end: var(--space-4);
}
[dir="rtl"] .pp-leaver h1 {
  font-size: 24px;
  line-height: 36px;
}
.pp-leaver p {
  margin-block-end: var(--space-3);
}
.pp-leaver .pp-btn {
  margin-block-start: var(--space-2);
  /* Long Arabic names must wrap inside the card at 390px. */
  max-width: 100%;
  height: auto;
  min-height: 44px;
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.35;
  padding-block: var(--space-2);
  text-align: center;
}
.pp-leaver .pp-title {
  margin-block-start: var(--space-2);
  overflow-wrap: break-word;
}

/* -- company landing page (US-31) ------------------------------------ */

.pp-landing {
  max-width: var(--container-text);
  margin-inline: auto;
}
.pp-landing h1 {
  font-size: 24px;
  line-height: 36px;
  margin-block-end: var(--space-4);
  text-align: center;
}
[dir="rtl"] .pp-landing h1 {
  font-size: 26px;
  line-height: 40px;
}
.pp-landing-info {
  text-align: center;
  margin-block-end: var(--space-5);
}
.pp-landing-link {
  color: var(--link);
  text-decoration: none;
}
.pp-landing-link:hover {
  text-decoration: underline;
}
.pp-landing-search {
  margin-block-end: var(--space-5);
}
.pp-landing-search-row {
  display: flex;
  gap: var(--space-2);
}
.pp-landing-search-row input {
  flex: 1;
  min-width: 0;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 24px;
}
.pp-landing-search-row input:focus {
  outline: none;
  box-shadow: var(--focus-ring);
}
.pp-landing-results {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pp-landing-result {
  display: block;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s;
}
.pp-landing-result:hover {
  background: var(--sunken);
}
.pp-landing-result strong {
  display: block;
  font-weight: 500;
  overflow-wrap: break-word;
}
.pp-landing-result .pp-title {
  display: block;
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
  margin-block-start: var(--space-1);
  overflow-wrap: break-word;
}
[dir="rtl"] .pp-landing-result .pp-title {
  font-size: 15px;
  line-height: 24px;
}
.pp-landing-empty {
  text-align: center;
  color: var(--muted);
}
/* -- company block on person page (#256) ------------------------------ */

.pp-company-block {
  margin-block-start: var(--space-4);
}

.pp-company-block-logo {
  height: 32px;
  width: auto;
  display: block;
  margin-block-end: var(--space-3);
}

.pp-company-block-name {
  margin-block-end: var(--space-3);
}

.pp-company-contact {
  margin-block-start: 0;
}

.pp-address {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
}

/* -- open link list (#256) -------------------------------------------- */

.pp-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-block-start: var(--space-4);
}

.pp-link-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--link);
  text-decoration: none;
  font-size: 14px;
  line-height: 20px;
}

.pp-link-item:hover {
  text-decoration: underline;
}

.pp-link-icon {
  flex-shrink: 0;
  color: var(--muted);
  width: 20px;
  height: 20px;
}

/* -- link editor in console (#256) ------------------------------------ */

.pp-link-editor-section {
  margin-block-start: var(--space-5);
}

.pp-link-editor-section h2 {
  margin-block-end: var(--space-2);
}

.pp-links-editor {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-block-end: var(--space-3);
}

.pp-link-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
}

.pp-link-label {
  display: block;
  font-size: 13px;
  color: var(--ink);
}

.pp-link-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  padding: var(--space-1) var(--space-2);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  margin-block-start: var(--space-1);
}

.pp-link-input::placeholder {
  color: var(--muted);
}

.pp-link-remove {
  align-self: flex-end;
  background: none;
  border: none;
  color: var(--negative);
  font-size: 13px;
  cursor: pointer;
  padding: var(--space-1);
}

.pp-link-remove:hover {
  text-decoration: underline;
}

.pp-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* -- landing + leaver at 390px --------------------------------------- */

@media (max-width: 480px) {
  .pp-landing h1 {
    font-size: 20px;
    line-height: 30px;
  }
  [dir="rtl"] .pp-landing h1 {
    font-size: 22px;
    line-height: 34px;
  }
  .pp-landing-search-row {
    flex-direction: column;
  }
  .pp-leaver h1 {
    font-size: 19px;
    line-height: 28px;
  }
  [dir="rtl"] .pp-leaver h1 {
    font-size: 21px;
    line-height: 32px;
  }
}

/* -- QR code dialog (#229) ------------------------------------------- */

.pp-qr-open {
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: start;
}

.pp-qr-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
}

.pp-qr-backdrop[hidden] { display: none; }

.pp-qr-dialog {
  background: var(--raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-menu);
  padding: var(--space-5);
  max-width: 320px;
  width: calc(100vw - var(--space-8));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.pp-qr-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.pp-qr-title {
  font-size: 16px;
  line-height: 24px;
  margin: 0;
}

[dir="rtl"] .pp-qr-title {
  font-size: 17px;
  line-height: 28px;
}

.pp-qr-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.pp-qr-close:hover { color: var(--ink); }

.pp-qr-img {
  display: block;
  width: 200px;
  height: 200px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--white);
}

.pp-qr-img svg {
  display: block;
  width: 100%;
  height: 100%;
}

.pp-qr-img[hidden] { display: none; }

.pp-qr-lang-toggle {
  display: flex;
  gap: var(--space-2);
}

.pp-qr-lang-btn {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: none;
  color: var(--muted);
  cursor: pointer;
  min-height: 32px;
}

[dir="rtl"] .pp-qr-lang-btn {
  font-family: var(--font-arabic);
  font-size: 15px;
  font-weight: 700;
}

.pp-qr-lang-btn:hover {
  background: var(--raised-hover);
  color: var(--ink);
}

.pp-qr-lang-active {
  background: var(--action);
  color: var(--on-action);
  border-color: var(--action);
}

.pp-qr-lang-active:hover {
  background: var(--action);
  color: var(--on-action);
}

.pp-qr-hint {
  font-size: 13px;
  line-height: 20px;
  color: var(--muted);
  text-align: center;
  margin: 0;
}

[dir="rtl"] .pp-qr-hint {
  font-size: 14px;
  line-height: 24px;
}

/* -- My Card QR and touch targets (#312) ------------------------------ */

.pp-qr-container svg {
  display: block;
  width: 200px;
  height: 200px;
  margin-inline: auto;
}

.pp-my-card .pp-btn {
  min-height: 44px;
}

/* -- wallet badge spacing (operating-board#253) ----------------------- */

.pp-wallet-btn {
  margin-block-start: var(--space-3);
}

/* -- page footer with privacy link (operating-board#44, #78) ---------- */

.pp-page-footer {
  margin-block-start: auto;
  padding: var(--space-4) var(--space-5);
  text-align: center;
  font-size: 13px;
  line-height: 20px;
}

[dir="rtl"] .pp-page-footer {
  font-size: 14px;
  line-height: 24px;
}

.pp-page-footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-block: var(--space-2);
  color: var(--muted);
  text-decoration: none;
}

.pp-page-footer-links a:hover {
  color: var(--link);
  text-decoration: underline;
}

/* -- privacy notice page (#78) ---------------------------------------- */

.pp-privacy-notice {
  max-width: var(--container-text);
  margin-inline: auto;
  padding: var(--space-6);
}

.pp-privacy-notice h1 {
  font-size: 24px;
  line-height: 36px;
  margin-block-end: var(--space-5);
}

[dir="rtl"] .pp-privacy-notice h1 {
  font-size: 26px;
  line-height: 40px;
}

.pp-privacy-notice h2 {
  font-size: 18px;
  line-height: 28px;
  margin-block-start: var(--space-5);
  margin-block-end: var(--space-2);
}

[dir="rtl"] .pp-privacy-notice h2 {
  font-size: 19px;
  line-height: 32px;
}

.pp-privacy-notice p,
.pp-privacy-notice li {
  font-size: 15px;
  line-height: 26px;
  color: var(--ink);
  margin-block-end: var(--space-2);
}

[dir="rtl"] .pp-privacy-notice p,
[dir="rtl"] .pp-privacy-notice li {
  font-size: 16px;
  line-height: 28px;
}

.pp-privacy-notice ul {
  padding-inline-start: var(--space-5);
  margin-block: var(--space-2);
}

.pp-privacy-notice a {
  color: var(--link);
  text-decoration: underline;
}

/* -- form privacy link (under public forms) --------------------------- */

.pp-form-privacy {
  font-size: 13px;
  line-height: 20px;
  color: var(--muted);
  margin-block-start: var(--space-3);
}

[dir="rtl"] .pp-form-privacy {
  font-size: 14px;
  line-height: 24px;
}

.pp-form-privacy a {
  color: var(--muted);
  text-decoration: underline;
}

.pp-form-privacy a:hover {
  color: var(--link);
}

/* -- meeting type list (E7.1 #28) --------------------------------- */

.pp-mt-item.pp-card {
  border: 1px solid var(--pp-border);
}

.pp-mt-list + h2 {
  margin-block-start: var(--space-5);
}
