/* ==========================================================================
   TOGAF ADM Interactive Simulator — Design system
   White canvas · Deep Navy structure · Fuchsia focus · Teal relationships
   ========================================================================== */

:root {
  --navy-900: #0a1633;
  --navy: #0f1f45;
  --navy-700: #1b2f66;
  --navy-500: #3a4f86;
  --navy-300: #8f9cc0;
  --navy-100: #e4e9f5;
  --navy-50: #f3f6fc;

  --fuchsia: #d62f8f;
  --fuchsia-600: #b81f77;
  --fuchsia-100: #fbe3f0;
  --fuchsia-50: #fdf2f8;

  --teal: #14a3a3;
  --teal-600: #0e8585;
  --teal-100: #d5f2f1;

  --amber: #e2a03a;
  --red: #d64545;
  --green: #1fa774;

  --bg: #f7f9fd;
  --surface: #ffffff;
  --text: #16213d;
  --muted: #66718f;
  --line: #e6eaf3;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 31, 69, .06), 0 1px 1px rgba(15, 31, 69, .04);
  --shadow: 0 10px 30px -12px rgba(15, 31, 69, .18), 0 2px 6px rgba(15, 31, 69, .05);
  --shadow-lg: 0 30px 60px -20px rgba(15, 31, 69, .28), 0 8px 20px -8px rgba(15, 31, 69, .12);
  --glow: 0 0 0 4px rgba(214, 47, 143, .14);

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(20, 163, 163, .06), transparent 60%),
    radial-gradient(900px 500px at -10% 0%, rgba(214, 47, 143, .05), transparent 60%),
    var(--bg);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; color: var(--navy); letter-spacing: -.02em; line-height: 1.2; }
p { margin: 0; }
a { color: inherit; }
code { font-family: var(--mono); font-size: .88em; background: var(--navy-50); padding: 1px 6px; border-radius: 6px; color: var(--navy-700); }
button { font: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.grad { background: linear-gradient(90deg, var(--fuchsia), #8b3fd1 55%, var(--teal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ic { flex-shrink: 0; vertical-align: -3px; }

/* ---------- boot */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-ring { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--navy-100); border-top-color: var(--fuchsia); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 28px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-size: 15px; white-space: nowrap; }
.brand b { font-weight: 800; letter-spacing: .02em; }
.brand span { color: var(--navy-500); font-weight: 500; }
.topbar-nav { display: flex; align-items: center; gap: 12px; }
.topbar-center { display: flex; flex-direction: column; align-items: center; line-height: 1.2; min-width: 0; }
.topbar-center b { color: var(--navy); font-size: 14px; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.pill-soft { background: var(--navy-50); color: var(--navy-500); border: 1px solid var(--navy-100); }

.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 5px 11px; border-radius: 999px; background: var(--navy-50); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--navy-300); }
.live.live i, .live-inline i { background: var(--teal); box-shadow: 0 0 0 0 rgba(20, 163, 163, .5); animation: ping 1.8s infinite; }
.live.live { color: var(--teal-600); background: var(--teal-100); }
.live.reconnecting i { background: var(--amber); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(20, 163, 163, .5); } 80%, 100% { box-shadow: 0 0 0 8px rgba(20, 163, 163, 0); } }

.me-chip { display: flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.me-chip span:last-child { display: flex; flex-direction: column; line-height: 1.15; font-size: 13px; }
.me-chip small { color: var(--muted); font-size: 11.5px; }

/* ---------- buttons */
.btn {
  --b: var(--navy);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; font-size: 14.5px; cursor: pointer; text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, #e2399b, var(--fuchsia-600)); color: #fff; box-shadow: 0 8px 20px -8px rgba(214, 47, 143, .7); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 12px 26px -8px rgba(214, 47, 143, .8); transform: translateY(-1px); }
.btn-navy { background: var(--navy); color: #fff; box-shadow: 0 8px 18px -10px rgba(15, 31, 69, .8); }
.btn-navy:hover:not(:disabled) { background: var(--navy-700); }
.btn-outline { background: var(--surface); color: var(--navy); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-outline:hover:not(:disabled) { border-color: var(--navy-300); }
.btn-ghost { background: transparent; color: var(--navy-500); }
.btn-ghost:hover { background: var(--navy-50); color: var(--navy); }
.btn-sm { padding: 8px 12px; font-size: 13.5px; border-radius: 10px; }
.btn-lg { padding: 14px 22px; font-size: 15.5px; border-radius: 14px; }
.btn-block { width: 100%; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 0; background: var(--navy-50); color: var(--navy); cursor: pointer; }
.icon-btn:hover { background: var(--navy-100); }

/* ---------- cards & forms */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.card-pad { padding: 24px; }
.card-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.card-head h2 { font-size: 18px; }
.card-head p { font-size: 13px; }
.card-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0; }
.card-icon.fuchsia { background: var(--fuchsia-50); color: var(--fuchsia); }
.card-icon.teal { background: var(--teal-100); color: var(--teal-600); }
.card-icon.navy { background: var(--navy-50); color: var(--navy); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--navy-700); }
.field em { font-style: normal; font-weight: 500; color: var(--muted); margin-left: 4px; }
input, textarea, select {
  font: inherit; color: var(--text);
  padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fbfcfe;
  transition: border-color .2s, box-shadow .2s, background .2s; width: 100%;
}
input:focus, textarea:focus { outline: none; border-color: var(--fuchsia); box-shadow: var(--glow); background: #fff; }
textarea { resize: vertical; min-height: 44px; }
.code-input { font-family: var(--mono); font-size: 22px; letter-spacing: .35em; text-transform: uppercase; text-align: center; font-weight: 800; }
.hint { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.hint.center { justify-content: center; }
.alert { background: #fdecec; color: #a12d2d; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 12px; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--fuchsia); }
.eyebrow.light { color: rgba(255, 255, 255, .75); }

/* ---------- toasts */
#toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(10px); transition: all .25s ease; max-width: 90vw; }
.toast.in { opacity: 1; transform: none; }
.toast-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); flex-shrink: 0; }
.toast-error .toast-dot { background: #ff6b8b; }
.toast-success .toast-dot { background: #4be0b0; }

/* ---------- modal */
.modal-wrap { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(10, 22, 51, .42); backdrop-filter: blur(4px); opacity: 0; transition: opacity .2s; }
.modal-wrap.in { opacity: 1; }
.modal { position: relative; width: min(480px, 100%); background: #fff; border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow-lg); transform: translateY(14px) scale(.98); transition: transform .25s cubic-bezier(.2, .9, .3, 1.2); max-height: 92vh; overflow: auto; }
.modal-wrap.in .modal { transform: none; }
.modal-x { position: absolute; top: 14px; right: 14px; }
.modal-title { margin-bottom: 10px; }
.modal-body p { margin-top: 10px; color: #3a4563; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ==========================================================================
   HOME
   ========================================================================== */
.home { max-width: 1240px; margin: 0 auto; padding: 36px 28px 40px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(32px, 4.4vw, 52px); font-weight: 800; margin: 14px 0 6px; letter-spacing: -.035em; }
.hero-ar { font-family: 'IBM Plex Sans Arabic', var(--font); color: var(--navy-500); font-size: 17px; font-weight: 600; margin-bottom: 12px; }
.lead { color: var(--muted); font-size: 16.5px; max-width: 580px; }
.hero-cards { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; margin-top: 28px; align-items: start; }
.join-card .btn { margin-top: 4px; }
.hero-visual { position: relative; }
.hero-visual .adm-svg { width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(15, 31, 69, .08)); }
.hero-visual::before { content: ''; position: absolute; inset: 10% 6%; border-radius: 50%; background: radial-gradient(circle, rgba(214, 47, 143, .08), transparent 65%); z-index: -1; }

.recent { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; margin-top: 44px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 12px; }
.section-title .muted { font-weight: 500; }
.list { display: flex; flex-direction: column; gap: 8px; }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; box-shadow: var(--shadow-sm); transition: border-color .2s, transform .15s, box-shadow .2s; }
.list-item:hover { border-color: var(--fuchsia); transform: translateY(-1px); box-shadow: var(--shadow); }
.list-item div { display: flex; flex-direction: column; min-width: 0; }
.list-item b { color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item small { color: var(--muted); font-size: 12.5px; }
.list-item .ic { color: var(--fuchsia); }
.foot { text-align: center; color: var(--navy-300); font-size: 12.5px; padding: 20px 0 32px; }

/* ==========================================================================
   ADM DIAGRAM
   ========================================================================== */
.adm-svg { display: block; width: 100%; height: auto; overflow: visible; user-select: none; -webkit-user-select: none; }
.bd-ring { fill: none; stroke: var(--navy-100); stroke-width: 1; stroke-dasharray: 2 6; }
.bd-2 { stroke: rgba(20, 163, 163, .25); }
.bd-track { fill: none; stroke: var(--navy-50); stroke-width: 34; }
.bd-flow { fill: none; stroke: rgba(15, 31, 69, .08); stroke-width: 2; stroke-dasharray: 3 14; animation: flow 6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -170; } }
.adm-iter { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; fill: var(--navy-300); }

.adm-arc { fill: none; stroke: var(--navy-500); stroke-width: 2.6; stroke-linecap: round; transition: stroke .25s, stroke-width .25s, opacity .25s; }
.adm-arc-loop { stroke-dasharray: 7 6; }
.adm-arc.lit { stroke: var(--fuchsia); stroke-width: 3.4; }
.adm-entry { fill: none; stroke: var(--fuchsia); stroke-width: 2.6; stroke-dasharray: 6 6; animation: flow 3s linear infinite; }
.adm-spoke { fill: none; stroke: var(--teal); stroke-width: 2; opacity: .55; transition: opacity .25s, stroke-width .25s; }
.adm-spoke.lit { opacity: 1; stroke-width: 3; }
.adm-pulse-dot { fill: var(--teal); opacity: .75; }
.has-hover .adm-arc:not(.lit), .has-hover .adm-spoke:not(.lit) { opacity: .28; }

.adm-node { cursor: pointer; outline: none; }
.node-scale { transition: transform .3s cubic-bezier(.2, .9, .3, 1.3); transform-box: fill-box; transform-origin: center; }
.adm-node.hover .node-scale, .adm-node:focus-visible .node-scale { transform: scale(1.08); }

.phase-node .node-body { fill: url(#g-node); stroke: var(--navy-100); stroke-width: 1.5; transition: fill .3s, stroke .3s; }
.phase-node .node-ring { fill: none; stroke: transparent; stroke-width: 2; stroke-dasharray: 4 5; transition: stroke .3s; }
.phase-node .node-letter { font-size: 30px; font-weight: 800; fill: var(--navy); letter-spacing: -.02em; }
.phase-node .node-label { font-size: 11.2px; font-weight: 600; fill: var(--navy-500); }
.phase-node.hover .node-body, .phase-node:focus-visible .node-body { stroke: var(--teal); stroke-width: 2.5; }
.phase-node.hover .node-ring, .phase-node:focus-visible .node-ring { stroke: var(--teal); animation: rot 8s linear infinite; transform-origin: center; transform-box: fill-box; }
@keyframes rot { to { transform: rotate(360deg); } }
.phase-node.hover .node-letter { fill: var(--teal-600); }

/* Active phase (fuchsia) */
.state-active .node-body { fill: url(#g-active) !important; stroke: #fff !important; stroke-width: 3 !important; }
.phase-node.state-active .node-letter, .phase-node.state-active .node-label { fill: #fff; }
.node-halo { animation: halo 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes halo { 0%, 100% { opacity: .55; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.06); } }
.state-completed .node-body { stroke: var(--teal); stroke-width: 2.5; }
.node-check circle { fill: var(--teal); stroke: #fff; stroke-width: 2; }
.node-check path { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Requirements Management centre */
.rm-orbit { fill: none; stroke: var(--teal); stroke-width: 1.5; stroke-dasharray: 2 7; animation: rot 30s linear infinite; transform-box: fill-box; transform-origin: center; }
.rm-inner { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 1; }
.rm-title { font-size: 17px; font-weight: 700; fill: #fff; letter-spacing: -.01em; }
.rm-sub { font-size: 9.5px; font-weight: 700; letter-spacing: .24em; fill: #58d6d3; }
.rm-node.hover .rm-orbit { stroke-width: 2.5; stroke: #3cc9c6; }
.rm-node.hover .rm-body { stroke: var(--teal); stroke-width: 3; }

/* Preliminary */
.pre-body { fill: #fff; stroke: var(--navy-100); stroke-width: 1.5; transition: fill .3s, stroke .3s; }
.pre-badge { fill: var(--navy); transition: fill .3s; }
.pre-badge-t { font-size: 22px; font-weight: 800; fill: #fff; }
.pre-title { font-size: 21px; font-weight: 800; fill: var(--navy); letter-spacing: -.02em; }
.pre-sub { font-size: 10px; font-weight: 700; letter-spacing: .14em; fill: var(--navy-300); }
.pre-node.hover .pre-body { stroke: var(--teal); stroke-width: 2.5; }
.pre-node.state-active .pre-badge { fill: #fff; }
.pre-node.state-active .pre-badge-t { fill: var(--fuchsia); }
.pre-node.state-active .pre-title { fill: #fff; }
.pre-node.state-active .pre-sub { fill: rgba(255, 255, 255, .85); }
.pre-halo { fill: none; stroke: rgba(214, 47, 143, .45); stroke-width: 10; animation: halo-rect 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; filter: blur(5px); }
@keyframes halo-rect { 0%, 100% { opacity: .35; transform: scale(.97); } 50% { opacity: 1; transform: scale(1.02); } }

/* Tooltip */
.adm-wrap, .hero-visual { position: relative; }
.adm-tip {
  position: absolute; z-index: 5; width: 290px; transform: translateX(-50%) translateY(6px);
  background: rgba(10, 22, 51, .96); color: #fff; padding: 14px 16px; border-radius: 14px;
  box-shadow: var(--shadow-lg); pointer-events: none; opacity: 0; transition: opacity .18s, transform .18s;
}
.adm-tip.in { opacity: 1; transform: translateX(-50%); }
.tip-kicker { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #ff7ac0; }
.tip-title { font-weight: 700; font-size: 15px; margin: 3px 0 6px; }
.tip-desc { font-size: 12.8px; line-height: 1.5; color: rgba(255, 255, 255, .78); }

/* ==========================================================================
   TRAINER
   ========================================================================== */
.trainer { max-width: 1320px; margin: 0 auto; padding: 28px; }
.ws-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.ws-title h1 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; margin: 10px 0 8px; }
.ws-meta { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: 13.5px; }
.ws-meta span { display: inline-flex; align-items: center; gap: 6px; }
.ws-desc { color: #46516f; margin-top: 10px; max-width: 720px; }
.ws-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; max-width: 320px; text-align: right; }

.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-draft { background: #fff4e0; color: #a86b0f; }
.st-open { background: var(--teal-100); color: var(--teal-600); }
.st-open i { animation: ping 1.8s infinite; }
.st-closed { background: #f0f1f6; color: #5d6687; }
.st-active { background: var(--fuchsia-100); color: var(--fuchsia-600); }
.stat-text.st-draft, .stat-text.st-open, .stat-text.st-closed { background: none; font-size: 16px !important; }

.trainer-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 24px; align-items: start; }
.join-panel { padding: 22px; position: sticky; top: 84px; }
.jp-head h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 14px; }
.qr-frame { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; aspect-ratio: 1; display: grid; place-items: center; }
.qr-frame::before { content: ''; position: absolute; inset: -1px; border-radius: 18px; padding: 2px; background: linear-gradient(135deg, var(--fuchsia), var(--teal)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .5; }
.qr-svg { width: 100%; height: auto; display: block; border-radius: 6px; }
.qr-frame.dim .qr-svg { opacity: .14; filter: blur(1px); }
.qr-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 30px; color: var(--navy); font-weight: 600; font-size: 14px; }
.qr-fallback { font-size: 13px; color: var(--muted); text-align: center; padding: 30px; }
.join-code-block { text-align: center; margin: 16px 0 12px; }
.join-code { display: flex; justify-content: center; gap: 6px; margin-top: 6px; }
.join-code b { font-family: var(--mono); font-size: 24px; font-weight: 800; color: var(--navy); background: var(--navy-50); border: 1px solid var(--navy-100); width: 38px; height: 46px; display: grid; place-items: center; border-radius: 10px; }
.join-code.xl b { font-size: 46px; width: 64px; height: 78px; border-radius: 14px; color: var(--fuchsia); background: var(--fuchsia-50); border-color: var(--fuchsia-100); }
.link-row { display: flex; gap: 8px; }
.link-row input { font-size: 12.5px; padding: 8px 12px; color: var(--navy-500); font-family: var(--mono); }
.jp-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.trainer-link { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.trainer-link summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--navy-500); list-style: none; display: flex; align-items: center; gap: 6px; }
.trainer-link summary::-webkit-details-marker { display: none; }
.trainer-link p { margin: 8px 0 6px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 18px; }
.stat b { display: block; font-size: 28px; font-weight: 800; color: var(--navy); letter-spacing: -.03em; line-height: 1.1; }
.stat div span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0; }
.stat-ic.navy { background: var(--navy-50); color: var(--navy); }
.stat-ic.fuchsia { background: var(--fuchsia-50); color: var(--fuchsia); }
.stat-ic.teal { background: var(--teal-100); }
.stat-ic.soft { background: #f3f4f9; color: var(--navy-500); }
.dot-live { width: 12px; height: 12px; border-radius: 50%; background: var(--teal); animation: ping 1.8s infinite; }

.teams-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.teams-head h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.team-card { border: 1px solid var(--line); border-radius: 18px; padding: 18px; background: linear-gradient(180deg, #fff, #fbfcff); display: flex; flex-direction: column; gap: 14px; transition: box-shadow .2s, border-color .2s, transform .2s; animation: pop .35s ease; }
.team-card:hover { box-shadow: var(--shadow); border-color: var(--navy-100); transform: translateY(-2px); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.team-card header { display: flex; gap: 12px; align-items: center; }
.team-avatar { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; font-size: 15px; color: #fff; background: linear-gradient(135deg, var(--navy-700), var(--navy)); flex-shrink: 0; letter-spacing: .02em; }
.team-avatar.lg { width: 52px; height: 52px; border-radius: 15px; font-size: 18px; }
.team-id { min-width: 0; }
.team-id h3 { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-id p { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phase-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--fuchsia-50); color: var(--fuchsia-600); font-weight: 600; font-size: 13px; border: 1px solid var(--fuchsia-100); }
.phase-chip b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--fuchsia); color: #fff; font-size: 11.5px; }
.team-members ul, .tp-members ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.team-members li, .tp-members li { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 500; }
.av { position: relative; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-50); color: var(--navy-700); font-size: 11px; font-weight: 700; flex-shrink: 0; }
.av i { position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: #c7cede; border: 2px solid #fff; }
li.on .av i { background: var(--teal); }
.me-chip .av { background: var(--fuchsia-50); color: var(--fuchsia-600); }
.leader-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: #a86b0f; background: #fff4e0; padding: 2px 7px; border-radius: 999px; }
.team-activity { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 12px; margin-top: auto; }
.team-activity span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-activity time { font-weight: 600; color: var(--navy-500); white-space: nowrap; }

.empty { text-align: center; padding: 50px 20px; }
.empty-art { width: 80px; height: 80px; border-radius: 24px; margin: 0 auto 16px; display: grid; place-items: center; background: linear-gradient(135deg, var(--fuchsia-50), var(--teal-100)); color: var(--navy-500); }
.empty h3 { margin-bottom: 6px; }
.empty p { max-width: 380px; margin: 0 auto; }

/* Presentation mode */
.modal.present { width: min(1100px, 96vw); padding: 48px; }
.present-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.present-copy h2 { font-size: clamp(28px, 3.4vw, 44px); font-weight: 800; margin: 12px 0 20px; }
.present-steps { padding-left: 22px; margin: 0 0 26px; color: #3a4563; font-size: 18px; display: flex; flex-direction: column; gap: 6px; }
.present-steps li::marker { color: var(--fuchsia); font-weight: 800; }
.present-code > span { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.present-code .join-code { justify-content: flex-start; margin-top: 8px; }
.present-url { margin-top: 18px; font-family: var(--mono); color: var(--navy-500); font-size: 15px; word-break: break-all; }
.present-qr { background: #fff; border-radius: 22px; padding: 16px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }

/* Access */
.center-wrap { min-height: calc(100vh - 70px); display: grid; place-items: center; padding: 24px; }
.access-card { width: min(440px, 100%); text-align: left; }
.access-card h2 { margin: 14px 0 6px; }
.access-card > p { margin-bottom: 18px; }
.access-card .btn + .btn { margin-top: 8px; }
.center-msg { min-height: 70vh; display: grid; place-content: center; text-align: center; gap: 10px; padding: 24px; }

/* ==========================================================================
   JOIN
   ========================================================================== */
.page-join { min-height: 100vh; position: relative; overflow-x: hidden; }
.join-bg { position: fixed; inset: 0; z-index: -1; background: linear-gradient(160deg, #0a1633 0%, #13285c 46%, #f7f9fd 46.2%); }
.join-bg span { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.join-bg span:nth-child(1) { width: 380px; height: 380px; background: var(--fuchsia); top: -120px; right: -60px; opacity: .35; }
.join-bg span:nth-child(2) { width: 300px; height: 300px; background: var(--teal); top: 120px; left: -120px; opacity: .3; }
.join-bg span:nth-child(3) { width: 520px; height: 520px; border: 1px solid rgba(255, 255, 255, .12); filter: none; opacity: 1; top: -200px; left: 50%; transform: translateX(-50%); }
.join { max-width: 620px; margin: 0 auto; padding: 40px 18px 30px; }
.join-card { overflow: hidden; border: 0; box-shadow: var(--shadow-lg); }
.join-hero { text-align: center; padding: 34px 28px 28px; background: radial-gradient(circle at 50% -40%, rgba(214, 47, 143, .55), transparent 60%), linear-gradient(160deg, #0f1f45, #1b2f66); color: #fff; }
.join-logo { width: 64px; height: 64px; border-radius: 18px; background: #fff; display: grid; place-items: center; margin: 0 auto 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.join-logo svg { width: 42px; height: 42px; }
.join-hero h1 { color: #fff; font-size: clamp(22px, 5vw, 30px); font-weight: 800; margin: 8px 0 10px; }
.join-ws { color: #ffd1ea; font-size: 17px; font-weight: 600; }
.join-meta { color: rgba(255, 255, 255, .7); font-size: 13.5px; margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.join-form { padding: 28px; }
.step { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.step-n { flex-shrink: 0; width: 28px; height: 28px; margin-top: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--fuchsia); background: var(--fuchsia-50); border: 1px solid var(--fuchsia-100); }
.step:nth-child(2) .step-n { margin-top: 4px; }
.grow { flex: 1; min-width: 0; }
.step .field { margin-bottom: 0; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--navy-50); border-radius: 13px; margin-bottom: 14px; }
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; padding: 10px; border-radius: 10px; background: transparent; color: var(--navy-500); font-weight: 600; font-size: 13.5px; cursor: pointer; transition: all .2s; }
.seg button.on { background: #fff; color: var(--navy); box-shadow: var(--shadow-sm); }
.seg button:disabled { opacity: .45; cursor: not-allowed; }
.seg .count { background: var(--navy-100); color: var(--navy-700); border-radius: 999px; padding: 0 7px; font-size: 11.5px; }
.team-pick { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow: auto; padding: 2px; }
.team-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; transition: all .18s; background: #fff; }
.team-opt:hover { border-color: var(--navy-300); }
.team-opt.on { border-color: var(--fuchsia); box-shadow: var(--glow); background: var(--fuchsia-50); }
.team-opt input { position: absolute; opacity: 0; pointer-events: none; width: auto; }
.team-opt-av { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; background: linear-gradient(135deg, var(--navy-700), var(--navy)); }
.team-opt.on .team-opt-av { background: linear-gradient(135deg, #e2399b, var(--fuchsia-600)); }
.team-opt-name { flex: 1; font-weight: 600; color: var(--navy); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-opt-count { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.new-team .hint { display: block; margin-top: 2px; line-height: 1.5; }
.new-team .hint .ic { color: #a86b0f; margin-right: 2px; }
.join-wait { text-align: center; padding: 36px 28px 40px; }
.wait-orb { width: 66px; height: 66px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; color: var(--fuchsia); background: var(--fuchsia-50); box-shadow: 0 0 0 10px rgba(214, 47, 143, .06); animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 18px rgba(214, 47, 143, .03); } }
.join-wait h3 { margin-bottom: 8px; }
.join-wait p { max-width: 380px; margin: 0 auto 16px; }
.live-inline { color: var(--teal-600); background: var(--teal-100); }
.join-foot { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 18px; }

/* ==========================================================================
   SIMULATOR
   ========================================================================== */
.sim { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 22px; padding: 22px 28px 28px; max-width: 1480px; margin: 0 auto; align-items: start; }
.sim-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }
.tp-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.tp-head h2 { font-size: 19px; margin-top: 2px; word-break: break-word; }
.tp-initiative { background: var(--navy-50); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; }
.tp-initiative p { font-weight: 600; color: var(--navy); font-size: 14px; }
.tp-initiative p.muted { font-weight: 500; color: var(--muted); font-size: 13px; }
.tp-members .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-members em { color: var(--muted); font-style: normal; font-weight: 400; }
.current-card { background: linear-gradient(160deg, #fff 30%, var(--fuchsia-50)); border-color: var(--fuchsia-100); }
.current-k { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--fuchsia); font-size: 11.5px; }
.current-row { display: flex; gap: 12px; align-items: center; margin: 10px 0 16px; }
.current-row b { display: block; color: var(--navy); font-size: 16px; }
.current-row small { color: var(--muted); font-size: 12.5px; }
.current-badge { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #fff; background: linear-gradient(135deg, #e2399b, var(--fuchsia-600)); box-shadow: 0 0 0 6px rgba(214, 47, 143, .14); animation: halo-badge 2.4s ease-in-out infinite; flex-shrink: 0; }
@keyframes halo-badge { 50% { box-shadow: 0 0 0 11px rgba(214, 47, 143, .06); } }
.journey h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 10px; }
.journey ol { list-style: none; padding: 0; margin: 0 0 10px; position: relative; }
.journey ol::before { content: ''; position: absolute; left: 13px; top: 14px; bottom: 14px; width: 2px; background: var(--line); }
.journey li { position: relative; display: flex; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 10px; cursor: pointer; font-size: 13px; transition: background .15s; }
.journey li:hover { background: var(--navy-50); }
.j-dot { position: relative; z-index: 1; width: 18px; height: 18px; margin-left: 4px; border-radius: 50%; display: grid; place-items: center; font-size: 9.5px; font-weight: 800; background: #fff; border: 2px solid var(--navy-100); color: var(--navy-300); flex-shrink: 0; }
.j-name { flex: 1; color: var(--navy-500); font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.j-st { color: var(--navy-300); font-size: 11.5px; font-weight: 700; }
.j-active .j-dot { width: 22px; height: 22px; margin-left: 2px; background: var(--fuchsia); border-color: var(--fuchsia-100); color: #fff; box-shadow: 0 0 0 4px rgba(214, 47, 143, .15); }
.j-active .j-name { color: var(--navy); font-weight: 700; }
.j-active .j-st { color: var(--fuchsia); }
.j-done .j-dot { background: var(--teal); border-color: var(--teal-100); color: #fff; }

.sim-stage { padding: 22px 24px 16px; position: relative; overflow: hidden; }
.sim-stage::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(var(--navy-100) 1px, transparent 1px); background-size: 22px 22px; opacity: .55; pointer-events: none; mask-image: radial-gradient(circle at 50% 55%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(circle at 50% 55%, #000 30%, transparent 75%); }
.stage-head { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.stage-head h1 { font-size: 24px; font-weight: 800; margin-top: 4px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { display: inline-block; }
.lg-active { width: 12px; height: 12px; border-radius: 50%; background: var(--fuchsia); box-shadow: 0 0 0 3px rgba(214, 47, 143, .2); }
.lg-upcoming { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--navy-100); }
.lg-flow { width: 22px; height: 0; border-top: 2px solid var(--teal); position: relative; }
.adm-wrap { position: relative; max-width: min(760px, max(420px, calc((100vh - 210px) * 0.877))); margin: 6px auto 0; }
.stage-hint { position: relative; text-align: center; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 4px; }

/* Phase modal */
.phase-modal .pm-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding-right: 30px; }
.pm-head h3 { font-size: 21px; margin-top: 2px; }
.pm-badge { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 22px; color: var(--navy); background: #fff; border: 2px solid var(--navy-100); box-shadow: var(--shadow); flex-shrink: 0; }
.pm-badge.rm { font-size: 16px; color: #fff; background: radial-gradient(circle at 40% 30%, #1d3473, #0b1838); border-color: var(--teal); }
.pm-tag { font-weight: 600; color: var(--teal-600) !important; }
.pm-soon { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; padding: 14px; border-radius: 14px; background: var(--fuchsia-50); border: 1px dashed rgba(214, 47, 143, .35); color: var(--fuchsia-600); font-weight: 600; font-size: 14px; }
.welcome-modal h3 { font-size: 23px; margin: 10px 0 4px; }

/* Drawer (Preliminary side panel) */
.drawer { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.drawer.open { pointer-events: auto; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(10, 22, 51, .3); opacity: 0; transition: opacity .25s; }
.drawer.open .drawer-scrim { opacity: 1; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: #fff; box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .35s cubic-bezier(.2, .9, .3, 1); display: flex; flex-direction: column; overflow: hidden; }
.drawer.open .drawer-panel { transform: none; }
.drawer-x { position: absolute; top: 16px; right: 16px; z-index: 2; background: rgba(255, 255, 255, .15); color: #fff; }
.drawer-x:hover { background: rgba(255, 255, 255, .25); }
.drawer-hero { position: relative; padding: 34px 28px 26px; color: #fff; background: radial-gradient(circle at 110% -20%, rgba(214, 47, 143, .7), transparent 55%), radial-gradient(circle at -20% 120%, rgba(20, 163, 163, .45), transparent 50%), linear-gradient(160deg, #0f1f45, #1b2f66); }
.drawer-badge { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; font-weight: 800; font-size: 24px; color: var(--fuchsia); background: #fff; box-shadow: 0 0 0 8px rgba(255, 255, 255, .12); margin-bottom: 16px; }
.drawer-hero .status-pill { position: absolute; top: 46px; left: 100px; background: rgba(255, 255, 255, .14); color: #fff; }
.drawer-hero h2 { color: #fff; font-size: 26px; font-weight: 800; }
.drawer-hero p { color: rgba(255, 255, 255, .75); margin-top: 6px; }
.drawer-body { padding: 24px 28px; overflow: auto; flex: 1; }
.drawer-body h4 { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 6px 0 8px; }
.drawer-body > p { color: #3a4563; margin-bottom: 20px; }
.focus-list { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-direction: column; gap: 8px; }
.focus-list li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: var(--navy-50); border-radius: 12px; font-size: 14px; color: var(--navy); font-weight: 500; }
.focus-list .ic { color: var(--fuchsia); margin-top: 2px; }
.drawer-soon { display: flex; gap: 14px; padding: 16px; border-radius: 16px; border: 1px dashed var(--navy-100); background: linear-gradient(135deg, #fff, var(--fuchsia-50)); }
.drawer-soon b { color: var(--navy); display: block; margin-bottom: 4px; }
.drawer-soon p { color: var(--muted); }
.soon-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--fuchsia); box-shadow: var(--shadow-sm); flex-shrink: 0; }
.drawer-foot { padding: 14px 28px; border-top: 1px solid var(--line); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { max-width: 560px; margin: 0 auto; order: -1; }
  .trainer-grid { grid-template-columns: minmax(0, 1fr); }
  .join-panel { position: static; display: grid; grid-template-columns: 260px 1fr; gap: 0 22px; }
  .join-panel .jp-head { grid-column: 1 / -1; }
  .join-panel .qr-frame { grid-row: span 4; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sim { grid-template-columns: minmax(0, 1fr); }
  .sim-side { position: static; order: 2; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .present-inner { grid-template-columns: minmax(0, 1fr); }
  .present-qr { max-width: 420px; margin: 0 auto; }
}
@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .topbar { padding: 10px 16px; }
  .brand span { display: none; }
  .topbar-center { display: none; }
  .topbar-nav .pill-soft { display: none; }
  .me-chip span:last-child { display: none; }
  .me-chip { padding: 3px; }
  .home, .trainer { padding: 22px 16px; }
  .hero-cards { grid-template-columns: minmax(0, 1fr); }
  .card-pad { padding: 20px; }
  .join-panel { display: block; }
  .ws-controls { align-items: stretch; text-align: left; max-width: none; width: 100%; }
  .stats { gap: 10px; }
  .stat { padding: 14px; gap: 10px; }
  .stat b { font-size: 22px; }
  .stat-ic { width: 36px; height: 36px; }
  .sim { padding: 14px 12px 20px; gap: 14px; }
  .sim-stage { padding: 16px 12px 12px; }
  .stage-head h1 { font-size: 20px; }
  .legend { gap: 10px; font-size: 11.5px; }
  .adm-tip { width: 240px; }
  .join { padding-top: 20px; }
  .join-form { padding: 22px 18px; }
  .step { gap: 10px; }
  .step-n { display: none; }
  .seg button { white-space: nowrap; font-size: 13px; padding: 10px 6px; gap: 5px; }
  .seg button .ic { display: none; }
  .modal.present { padding: 28px 20px; }
  .join-code.xl b { font-size: 30px; width: 44px; height: 56px; }
  .drawer-panel { top: auto; height: 88vh; width: 100%; border-radius: 22px 22px 0 0; transform: translateY(100%); }
  .drawer.open .drawer-panel { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   LANGUAGE (English default · Arabic RTL)
   ========================================================================== */
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--navy); font-weight: 600; font-size: 13px;
  cursor: pointer; box-shadow: var(--shadow-sm); transition: border-color .2s, color .2s; white-space: nowrap;
}
.lang-btn:hover { border-color: var(--fuchsia); color: var(--fuchsia); }
.lang-btn[lang="ar"] span { font-family: 'IBM Plex Sans Arabic', var(--font); }
.lang-btn.on-dark { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .28); box-shadow: none; }
.lang-btn.on-dark:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.join-hero { position: relative; }
.join-lang { position: absolute; top: 16px; inset-inline-end: 16px; }

/* Arabic typography: Arabic script must never be letter-spaced or upper-cased */
html[lang="ar"] body, html[lang="ar"] button, html[lang="ar"] input, html[lang="ar"] textarea {
  font-family: 'IBM Plex Sans Arabic', var(--font);
}
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4 { letter-spacing: 0; }
html[lang="ar"] .hero h1 { letter-spacing: 0; line-height: 1.35; }
html[lang="ar"] .eyebrow, html[lang="ar"] .current-k, html[lang="ar"] .drawer-body h4,
html[lang="ar"] .present-code > span, html[lang="ar"] .tip-kicker {
  letter-spacing: 0; text-transform: none; font-size: 13px;
}
html[lang="ar"] .adm-iter { letter-spacing: 0; text-transform: none; font-size: 13px; }
html[lang="ar"] .rm-sub, html[lang="ar"] .pre-sub { letter-spacing: 0; font-size: 11.5px; }
html[lang="ar"] .node-label { font-size: 12.5px; }
html[lang="ar"] .pre-title { font-size: 20px; letter-spacing: 0; }
html[lang="ar"] .rm-title { font-size: 18px; letter-spacing: 0; }
html[lang="ar"] .tip-desc, html[lang="ar"] .modal-body p, html[lang="ar"] .drawer-body > p { line-height: 1.8; }

/* Left-to-right islands: codes, links and the ADM diagram keep their geometry */
.code-input, .join-code, .link-row input, code, .present-url, .adm-svg { direction: ltr; }
.adm-tip { text-align: start; }

/* RTL mirroring */
[dir="rtl"] .ic-dir { transform: scaleX(-1); }
[dir="rtl"] .field em { margin-left: 0; margin-right: 4px; }
[dir="rtl"] .ws-controls { text-align: left; }
[dir="rtl"] .journey ol::before { left: auto; right: 13px; }
[dir="rtl"] .j-dot { margin-left: 0; margin-right: 4px; }
[dir="rtl"] .j-active .j-dot { margin-left: 0; margin-right: 2px; }
[dir="rtl"] .modal-x { right: auto; left: 14px; }
[dir="rtl"] .phase-modal .pm-head { padding-right: 0; padding-left: 30px; }
[dir="rtl"] .me-chip { padding: 4px 4px 4px 12px; }
[dir="rtl"] .av i { right: auto; left: -1px; }
[dir="rtl"] .new-team .hint .ic { margin-right: 0; margin-left: 2px; }
[dir="rtl"] .present-code .join-code { justify-content: flex-end; }
[dir="rtl"] .present-steps { padding-left: 0; padding-right: 22px; }
[dir="rtl"] .drawer-panel { right: auto; left: 0; transform: translateX(-100%); }
[dir="rtl"] .drawer.open .drawer-panel { transform: none; }
[dir="rtl"] .drawer-x { right: auto; left: 16px; }
[dir="rtl"] .drawer-hero .status-pill { left: auto; right: 100px; }
@media (max-width: 720px) {
  [dir="rtl"] .drawer-panel { left: 0; right: 0; transform: translateY(100%); }
  [dir="rtl"] .drawer.open .drawer-panel { transform: none; }
  .topbar-nav .lang-btn { padding: 6px 10px; font-size: 12.5px; }
  .topbar-nav .lang-btn .ic { display: none; }
  .topbar-nav { gap: 8px; }
}

/* ==========================================================================
   SIMULATION — shared bits
   ========================================================================== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
@keyframes popIn { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes glowNew { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c, #d62f8f) 60%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
@keyframes pulseBtn { 0%, 100% { box-shadow: 0 8px 20px -8px rgba(214, 47, 143, .7), 0 0 0 0 rgba(214, 47, 143, .35); } 50% { box-shadow: 0 8px 20px -8px rgba(214, 47, 143, .7), 0 0 0 10px rgba(214, 47, 143, 0); } }
.pulse { animation: pulseBtn 2.2s infinite; }
.fx-confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 120; }
.pbar { height: 8px; border-radius: 99px; background: var(--navy-100); overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 99px; transition: width .8s cubic-bezier(.2, .9, .3, 1); }
.ring { flex-shrink: 0; }
.ring-val { transition: stroke-dashoffset 1s cubic-bezier(.2, .9, .3, 1); animation: ringIn 1.1s cubic-bezier(.2, .9, .3, 1); }
@keyframes ringIn { from { stroke-dashoffset: var(--c); } }
.ring-label { font-size: 15px; font-weight: 800; fill: var(--navy); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--navy-50); border: 1px solid var(--navy-100); color: var(--navy-700); font-size: 13px; font-weight: 600; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--navy-50); color: var(--navy-500); font-style: normal; }
.tag.ai { background: linear-gradient(135deg, #f2e9ff, var(--fuchsia-50)); color: #7a2fd1; }
.tag.by { background: transparent; color: var(--muted); font-weight: 600; }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 9px; }
.icon-btn.danger:hover { background: #fdecec; color: var(--red); }
.danger-text { color: var(--red) !important; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.team-main { animation: fadeUp .35s ease; }

/* Breadcrumbs */
.crumbs { background: rgba(255, 255, 255, .6); border-bottom: 1px solid var(--line); }
.crumbs-inner { max-width: 1480px; margin: 0 auto; padding: 9px 28px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.crumbs-path { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); min-width: 0; flex-wrap: wrap; }
.crumbs-path a { text-decoration: none; color: var(--navy-500); display: inline-flex; align-items: center; gap: 5px; }
.crumbs-path a:hover { color: var(--fuchsia); }
.crumbs-path > span { color: var(--navy); }
.crumbs-path .sep { color: var(--navy-300); display: inline-flex; }
.proj-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; color: #fff; text-decoration: none; font-size: 12.5px; font-weight: 700; background: linear-gradient(135deg, var(--a), var(--b)); max-width: 46vw; box-shadow: 0 6px 14px -8px var(--a); }
.proj-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-project { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; margin-bottom: 14px; text-decoration: none; color: #fff; background: linear-gradient(135deg, var(--a), var(--b)); transition: transform .2s; }
.tp-project:hover { transform: translateY(-2px); }
.tp-project-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); flex-shrink: 0; }
.tp-project small { display: block; opacity: .8; font-size: 11.5px; }
.tp-project b { font-size: 14px; }

/* ==========================================================================
   PROJECT PICKER
   ========================================================================== */
.picker { max-width: 1240px; margin: 0 auto; padding: 34px 28px 50px; }
.picker-head { text-align: center; max-width: 760px; margin: 0 auto 30px; }
.picker-head h1 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; margin: 10px 0; }
.picker-note { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 8px 14px; border-radius: 12px; background: #fff4e0; color: #8a5a0f; font-weight: 600; font-size: 13.5px; }
.case-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.case-card { position: relative; display: flex; flex-direction: column; border-radius: 22px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; cursor: pointer; transition: transform .25s cubic-bezier(.2, .9, .3, 1.2), box-shadow .25s; animation: fadeUp .5s ease both; animation-delay: var(--d); outline: none; }
.case-card:hover, .case-card:focus-visible { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.case-top { position: relative; height: 112px; padding: 18px; display: flex; justify-content: space-between; align-items: flex-start; color: #fff; background: radial-gradient(circle at 85% 0%, rgba(255, 255, 255, .28), transparent 50%), linear-gradient(135deg, var(--a), var(--b)); }
.case-top::after { content: ''; position: absolute; inset: auto -20% -60% auto; width: 160px; height: 160px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); }
.case-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: rgba(255, 255, 255, .2); color: #fff; backdrop-filter: blur(4px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); flex-shrink: 0; }
.case-ic.lg { width: 70px; height: 70px; border-radius: 20px; }
.case-sector { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .2); }
.case-body { padding: 18px 18px 6px; flex: 1; }
.case-body h3 { font-size: 17.5px; margin-bottom: 4px; }
.case-org { font-size: 13px; color: var(--muted); font-weight: 600; }
.case-tag { font-size: 14px; color: var(--navy-700); margin: 10px 0; font-weight: 500; }
.case-body ul { padding-inline-start: 18px; margin: 0 0 12px; color: #46516f; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.case-body li::marker { color: var(--a); }
.case-size { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.case-foot { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); color: var(--a); font-weight: 700; font-size: 14px; }
.case-card:hover .case-foot .ic { transform: translateX(4px); }
[dir="rtl"] .case-card:hover .case-foot .ic { transform: scaleX(-1) translateX(4px); }
.case-foot .ic { transition: transform .2s; }
.case-custom { border: 2px dashed color-mix(in srgb, var(--a) 55%, #fff); background: linear-gradient(180deg, #fffaf2, #fff); box-shadow: none; }
.case-custom-inner { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 22px; gap: 10px; }
.case-plus { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: 0 12px 24px -10px var(--a); transition: transform .3s; }
.case-custom:hover .case-plus { transform: rotate(90deg) scale(1.05); }
.case-custom p { color: var(--muted); font-size: 13.5px; }

.modal.case-modal, .modal.work-modal { width: min(680px, 100%); padding: 0 0 22px; overflow: auto; }
.case-modal .modal-body, .work-modal .modal-body { padding: 0 26px; }
.case-modal .modal-actions, .work-modal .modal-actions { padding: 0 26px; }
.cm-hero { margin: 0 -26px 18px; padding: 26px; display: flex; gap: 16px; align-items: center; color: #fff; background: radial-gradient(circle at 90% 0%, rgba(255, 255, 255, .25), transparent 55%), linear-gradient(135deg, var(--a), var(--b)); }
.cm-hero h3 { color: #fff; font-size: 22px; }
.cm-sector { font-size: 12.5px; opacity: .85; font-weight: 600; }
.cm-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 16px; }
.cm-cols h4, .work-modal h4 { display: flex; align-items: center; gap: 6px; font-size: 14px; margin: 14px 0 8px; }
.cm-cols ul { padding-inline-start: 18px; margin: 0; font-size: 13.5px; color: #3a4563; display: flex; flex-direction: column; gap: 5px; }
.cm-lock { display: flex; align-items: center; gap: 7px; margin-top: 16px !important; padding: 10px 12px; border-radius: 12px; background: var(--navy-50); color: var(--navy-500) !important; font-size: 13px; font-weight: 600; }
.modal.custom-modal { width: min(600px, 100%); }
.modal-x { z-index: 3; }
.case-modal .modal-x, .work-modal .modal-x { background: rgba(255, 255, 255, .2); color: #fff; }

/* ==========================================================================
   PROJECT BRIEFING
   ========================================================================== */
.brief { max-width: 1240px; margin: 0 auto; padding: 24px 28px 50px; }
.brief-hero { border-radius: 26px; padding: 34px; color: #fff; background: radial-gradient(circle at 92% -10%, rgba(255, 255, 255, .3), transparent 45%), radial-gradient(circle at 0% 120%, rgba(255, 255, 255, .15), transparent 45%), linear-gradient(135deg, var(--a), var(--b)); box-shadow: var(--shadow-lg); position: relative; overflow: hidden; animation: fadeUp .45s ease; }
.brief-hero::after { content: ''; position: absolute; width: 380px; height: 380px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); inset: -120px -100px auto auto; }
.brief-hero-in { position: relative; display: flex; gap: 20px; align-items: center; }
.brief-hero h1 { color: #fff; font-size: clamp(24px, 3vw, 36px); font-weight: 800; margin: 6px 0; }
.brief-hero p { opacity: .9; }
.brief-kicker { font-size: 13px; font-weight: 700; opacity: .85; }
.brief-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; margin-top: 20px; align-items: start; }
.brief-card { padding: 8px 22px 24px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 -22px 20px; padding: 0 18px; overflow-x: auto; }
.tabs button { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 14px 12px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2.5px solid transparent; white-space: nowrap; font-size: 14px; }
.tabs button.on { color: var(--fuchsia); border-bottom-color: var(--fuchsia); }
.tab-body { animation: fadeUp .3s ease; }
.tab-body h4 { margin: 20px 0 10px; font-size: 14px; color: var(--muted); }
.brief-overview { font-size: 16px; line-height: 1.85; color: #2c3654; }
.brief-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.brief-list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--navy-50); animation: fadeUp .4s ease both; animation-delay: var(--d); }
.brief-list li > span { width: 26px; height: 26px; flex-shrink: 0; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 12.5px; color: #fff; background: linear-gradient(135deg, #e2399b, var(--fuchsia-600)); }
.brief-list p { color: var(--navy); font-weight: 500; }
.brief-cta { padding: 24px; position: sticky; top: 130px; background: linear-gradient(170deg, #fff 40%, var(--fuchsia-50)); }
.brief-cta h3 { font-size: 20px; margin: 8px 0; }
.brief-cta p { margin-bottom: 18px; }

/* ==========================================================================
   PRELIMINARY WORKSPACE
   ========================================================================== */
.prelim { max-width: 1480px; margin: 0 auto; padding: 22px 28px 50px; display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; transition: grid-template-columns .3s; }
.prelim.intro-closed { grid-template-columns: 54px minmax(0, 1fr); }
.prelim-intro { position: sticky; top: 130px; padding: 0; overflow: hidden; max-height: calc(100vh - 150px); display: flex; flex-direction: column; }
.intro-toggle { display: flex; align-items: center; gap: 8px; width: 100%; padding: 14px 16px; border: 0; background: var(--navy); color: #fff; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.intro-toggle span { flex: 1; text-align: start; }
.intro-body { padding: 20px; overflow: auto; }
.intro-body h3 { font-size: 20px; margin: 10px 0 2px; }
.intro-tag { color: var(--teal-600); font-weight: 600; margin-bottom: 10px; }
.intro-body > p { color: #3a4563; font-size: 14px; line-height: 1.75; }
.intro-body h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 8px; }
.intro-body .focus-list li { font-size: 13px; padding: 8px 10px; }
.drawer-badge.sm { width: 44px; height: 44px; font-size: 19px; margin: 0; color: #fff; background: linear-gradient(135deg, #e2399b, var(--fuchsia-600)); box-shadow: 0 0 0 6px rgba(214, 47, 143, .12); }
.intro-closed .intro-body { display: none; }
.intro-closed .intro-toggle { flex-direction: column; padding: 16px 0; height: 220px; writing-mode: vertical-rl; }
.intro-closed .intro-toggle .ic:last-child { display: none; }
.prelim-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 24px; flex-wrap: wrap; background: radial-gradient(circle at 100% 0%, var(--fuchsia-50), transparent 50%), #fff; }
.ph-left { display: flex; gap: 16px; align-items: center; }
.ph-badge { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #e2399b, var(--fuchsia-600)); box-shadow: 0 0 0 8px rgba(214, 47, 143, .12); animation: halo-badge 2.4s ease-in-out infinite; flex-shrink: 0; }
.prelim-head h1 { font-size: 26px; font-weight: 800; margin: 4px 0; }
.ph-progress { display: flex; align-items: center; gap: 14px; }
.ph-progress b { display: block; font-size: 22px; color: var(--navy); }
.ph-progress span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.ph-progress .ring-label { font-size: 17px; }
.act-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.act-card { position: relative; padding: 20px; border-radius: 20px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 8px; animation: fadeUp .45s ease both; animation-delay: var(--d); overflow: hidden; outline: none; }
.act-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c); }
.act-card[data-act] { cursor: pointer; transition: transform .22s cubic-bezier(.2, .9, .3, 1.2), box-shadow .22s, border-color .22s; }
.act-card[data-act]:hover, .act-card[data-act]:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--c) 40%, #fff); }
.act-card.is-next { border-color: color-mix(in srgb, var(--c) 45%, #fff); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 12%, transparent), var(--shadow); }
.act-card.locked { background: #fafbfe; }
.act-card.locked > *:not(.act-top) { opacity: .6; }
.act-card.st-completed { background: linear-gradient(170deg, #fff 55%, color-mix(in srgb, var(--c) 8%, #fff)); }
.next-ribbon { position: absolute; top: 14px; inset-inline-end: 14px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; color: #fff; background: var(--c); animation: popIn .5s ease .4s both; }
.act-top { display: flex; align-items: center; gap: 10px; }
.act-num { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 12.5px; font-weight: 800; background: var(--navy-50); color: var(--navy-500); }
.act-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); }
.act-status { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.is-next .act-status { margin-inline-end: 96px; }
.st-completed .act-status { color: var(--teal-600); }
.st-in_progress .act-status { color: var(--c); }
.act-tech { font-size: 12px; font-weight: 800; color: var(--c); text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }
html[lang="ar"] .act-tech { letter-spacing: 0; text-transform: none; font-size: 13px; }
.act-card h3 { font-size: 18px; }
.act-card p { color: #4a5573; font-size: 14px; }
.act-out { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.act-out b { color: var(--navy-700); }
.act-foot { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.act-go { display: inline-flex; align-items: center; gap: 6px; color: var(--c); }
.gate { margin-top: 18px; display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-style: dashed; background: #fafbfe; }
.gate.open { border-style: solid; border-color: var(--teal); background: linear-gradient(135deg, #fff, var(--teal-100)); }
.gate-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--navy-50); color: var(--navy-500); flex-shrink: 0; }
.gate.open .gate-ic { background: var(--teal); color: #fff; animation: popIn .5s ease; }
.gate b { color: var(--navy); }
.gate-pct { margin-inline-start: auto; font-weight: 800; color: var(--navy-500); font-size: 18px; }

/* ==========================================================================
   PESTEL
   ========================================================================== */
.pestel { max-width: 1480px; margin: 0 auto; padding: 22px 28px 50px; }
.pe-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; padding: 20px 24px; flex-wrap: wrap; background: radial-gradient(circle at 100% 0%, #efe9ff, transparent 50%), #fff; }
.back-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 13px; font-weight: 600; color: var(--navy-500); margin-bottom: 6px; }
.back-link:hover { color: var(--fuchsia); }
.pe-title .eyebrow { color: #6d4ae0; display: flex; }
.pe-title h1 { font-size: 25px; font-weight: 800; margin: 4px 0; }
.pe-title p { max-width: 640px; }
.pe-progress { display: flex; flex-direction: column; gap: 8px; min-width: 280px; }
.pe-pct { display: flex; align-items: baseline; gap: 10px; }
.pe-pct b { font-size: 28px; font-weight: 800; color: var(--navy); }
.pe-pct span { font-size: 13px; color: var(--muted); font-weight: 600; }
.pe-progress .btn { align-self: flex-start; }
.done-badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 12px; background: var(--teal-100); color: var(--teal-600); font-weight: 800; animation: popIn .5s ease; }
.pe-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 20px; margin-top: 18px; align-items: start; }
.pe-left { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 130px; }
.pe-wheel-card { padding: 18px; }
.pe-wheel { max-width: 440px; margin: 0 auto; }
.pe-svg { width: 100%; height: auto; display: block; overflow: visible; }
.pe-orbit { fill: none; stroke: var(--navy-100); stroke-width: 1.5; stroke-dasharray: 3 7; animation: rot 60s linear infinite; transform-origin: center; transform-box: fill-box; }
.pseg { cursor: pointer; outline: none; transform-origin: 220px 220px; transition: transform .3s cubic-bezier(.2, .9, .3, 1.3); }
.pseg-bg { fill: color-mix(in srgb, var(--c) 13%, #fff); stroke: #fff; stroke-width: 3; transition: fill .4s, filter .3s; }
.pseg.filled .pseg-bg { fill: var(--c); }
.pseg:hover, .pseg:focus-visible { transform: scale(1.035); }
.pseg.sel { transform: scale(1.06); }
.pseg.sel .pseg-bg { filter: drop-shadow(0 8px 14px color-mix(in srgb, var(--c) 55%, transparent)); stroke: #fff; stroke-width: 4; }
.pseg:not(.filled).sel .pseg-bg { fill: color-mix(in srgb, var(--c) 28%, #fff); }
.pseg-letter { font-size: 34px; font-weight: 800; fill: var(--c); pointer-events: none; }
.pseg-name { font-size: 11.5px; font-weight: 700; fill: var(--navy-500); pointer-events: none; }
.pseg.filled .pseg-letter, .pseg.filled .pseg-name { fill: #fff; }
.pseg-count circle { fill: #fff; stroke: var(--c); stroke-width: 2.5; }
.pseg-count text { font-size: 13px; font-weight: 800; fill: var(--navy); }
.pseg.pop .pseg-bg { animation: segPop .7s ease; }
@keyframes segPop { 0% { filter: brightness(1.6) drop-shadow(0 0 0 var(--c)); } 100% { filter: none; } }
.pe-core { filter: drop-shadow(0 10px 18px rgba(15, 31, 69, .3)); }
.core-num { font-size: 40px; font-weight: 800; fill: #fff; }
.core-lbl { font-size: 12px; font-weight: 700; fill: rgba(255, 255, 255, .7); letter-spacing: .06em; }
.core-drv { font-size: 14px; font-weight: 800; fill: #ffd166; }
html[lang="ar"] .core-lbl { letter-spacing: 0; font-size: 13px; }
.assist-box { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 14px; border-radius: 16px; background: linear-gradient(135deg, #f5efff, var(--fuchsia-50)); border: 1px solid #ecdcff; flex-wrap: wrap; }
.assist-box > div:nth-child(2) { flex: 1; min-width: 180px; }
.assist-box b { color: #5b2bb5; }
.assist-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #8b3fd1, var(--fuchsia)); box-shadow: 0 8px 16px -8px #8b3fd1; flex-shrink: 0; }
.assist-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.assist-btns .btn-outline { border-color: #dcc6ff; color: #5b2bb5; }
.pe-drivers { padding: 18px 20px; }
.drv-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.drv-head h3 { display: flex; align-items: center; gap: 7px; font-size: 16px; }
.drv-head h3 .ic { color: #e2a03a; }
.drv-count { font-weight: 800; padding: 3px 10px; border-radius: 999px; background: #fff4e0; color: #a86b0f; font-size: 13px; }
.drv-count.ok { background: var(--teal-100); color: var(--teal-600); animation: popIn .4s ease; }
.drv-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.drv-list li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--c) 8%, #fff); border-inline-start: 3px solid var(--c); font-size: 13.5px; color: var(--navy); font-weight: 500; animation: fadeUp .35s ease; }
.drv-letter { width: 22px; height: 22px; flex-shrink: 0; border-radius: 6px; display: grid; place-items: center; font-size: 11.5px; font-weight: 800; color: #fff; background: var(--c); }
.drv-empty { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 14px; border-radius: 12px; border: 1.5px dashed var(--navy-100); color: var(--navy-300); font-weight: 600; font-size: 13.5px; }
.pe-panel { padding: 20px 22px; }
.cat-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; animation: fadeUp .3s ease; }
.cat-letter { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; font-size: 24px; font-weight: 800; color: #fff; background: var(--c); box-shadow: 0 10px 18px -10px var(--c); flex-shrink: 0; }
.cat-letter.ghost { background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c); box-shadow: none; }
.cat-head h2 { font-size: 19px; }
.coach { margin-bottom: 14px; padding: 12px 14px; border-radius: 14px; background: #f7f3ff; border: 1px solid #ebe0ff; }
.coach b { display: flex; align-items: center; gap: 6px; color: #5b2bb5; font-size: 13.5px; }
.coach ul { margin: 8px 0 0; padding-inline-start: 18px; font-size: 13.5px; color: #3a4563; display: flex; flex-direction: column; gap: 4px; }
.factor-form { padding: 14px; border-radius: 16px; background: var(--navy-50); border: 1px solid var(--navy-100); }
.factor-form .field { margin-bottom: 10px; }
.factor-form textarea { background: #fff; }
.ff-row { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.ff-lbl { display: block; font-size: 12px; font-weight: 700; color: var(--navy-500); margin-bottom: 5px; }
.seg-ctl { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: #fff; border: 1px solid var(--line); }
.seg-ctl label { cursor: pointer; }
.seg-ctl input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg-ctl span { display: block; padding: 6px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 700; color: var(--navy-500); transition: all .15s; white-space: nowrap; }
.seg-ctl input:checked + span { background: var(--navy); color: #fff; }
.seg-ctl .hi input:checked + span { background: #d64545; }
.seg-ctl .md input:checked + span { background: #e2a03a; }
.seg-ctl .lo input:checked + span { background: #2fa66a; }
.seg-ctl .op input:checked + span { background: #1fa774; }
.seg-ctl .th input:checked + span { background: #d64545; }
.seg-ctl input:focus-visible + span { box-shadow: var(--glow); }
.ff-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.ff-actions .btn-navy { background: var(--c); box-shadow: 0 8px 18px -10px var(--c); }
.factor-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.factor { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); border-inline-start: 4px solid var(--c); transition: transform .2s, opacity .25s, box-shadow .2s; animation: fadeUp .3s ease; }
.factor:hover { box-shadow: var(--shadow-sm); }
.factor.new { animation: popIn .45s ease, glowNew 1.2s ease .2s; }
.factor.from-ai { background: linear-gradient(135deg, #fff 70%, #faf5ff); }
.factor.is-driver { background: linear-gradient(135deg, #fff 60%, #fff8e8); }
.factor.leaving { opacity: 0; transform: translateX(20px) scale(.96); }
.f-body { flex: 1; min-width: 0; }
.f-body p { color: var(--navy); font-weight: 500; font-size: 14px; line-height: 1.55; }
.f-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag.imp-high { background: #fdecec; color: #b53434; }
.tag.imp-medium { background: #fff4e0; color: #a86b0f; }
.tag.imp-low { background: #e5f6ee; color: #1e7f50; }
.tag.ty-opportunity { background: #e5f6ee; color: #1e7f50; }
.tag.ty-threat { background: #fdecec; color: #b53434; }
.f-acts { display: flex; flex-direction: column; gap: 4px; opacity: .55; transition: opacity .2s; }
.factor:hover .f-acts { opacity: 1; }
.star { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; border: 0; cursor: pointer; background: var(--navy-50); color: var(--navy-300); flex-shrink: 0; transition: all .2s; }
.star:hover { color: #e2a03a; background: #fff4e0; }
.star.on { color: #fff; background: linear-gradient(135deg, #f5b942, #e2a03a); box-shadow: 0 6px 12px -6px #e2a03a; }
.star.on .ic { fill: currentColor; }
.star.burst { animation: popIn .45s ease; }
.f-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 26px 16px; color: var(--muted); font-size: 14px; border: 1.5px dashed color-mix(in srgb, var(--c) 35%, #fff); border-radius: 16px; }

/* Celebration */
.modal.celebrate-modal { text-align: center; width: min(440px, 100%); padding-top: 34px; background: radial-gradient(circle at 50% 0%, #fff4e0, #fff 55%); }
.cel-trophy { width: 86px; height: 86px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #f5b942, #e2a03a); box-shadow: 0 0 0 10px rgba(226, 160, 58, .15), 0 18px 30px -12px #e2a03a; animation: popIn .6s cubic-bezier(.2, .9, .3, 1.4); }
.cel-title { font-size: 23px; }
.cel-body { margin-top: 8px !important; }
.cel-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.cel-stats div { padding: 12px 6px; border-radius: 14px; background: var(--navy-50); }
.cel-stats b { display: block; font-size: 26px; font-weight: 800; color: var(--fuchsia); }
.cel-stats span { font-size: 12px; color: var(--muted); font-weight: 600; }
.celebrate-modal .modal-actions { justify-content: center; }

/* Trainer: team work */
.tw { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: var(--navy-50); }
.tw-project { display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; max-width: 100%; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--a, #8f9cc0), var(--b, #5b6787)); }
.tw-project span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tw-project.none { color: var(--muted); background: #fff; border: 1px dashed var(--navy-100); }
.tw-row { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--navy-500); }
.tw-row b { color: var(--navy); }
.tw-acts { display: flex; flex-wrap: wrap; gap: 5px; }
.tw-act { display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #fff; color: var(--navy-300); border: 1px solid var(--line); }
.tw-act.wip { color: var(--c); border-color: color-mix(in srgb, var(--c) 35%, #fff); }
.tw-act.done { color: #fff; background: var(--c); border-color: var(--c); }
.tw-foot { display: flex; justify-content: space-between; align-items: center; }
.work-pestel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wp-cat { padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--c) 7%, #fff); border-inline-start: 3px solid var(--c); }
.wp-cat b { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--navy); }
.wp-cat b span { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; color: #fff; background: var(--c); font-size: 11px; }
.wp-cat ul { margin: 6px 0 0; padding-inline-start: 16px; font-size: 12.5px; color: #3a4563; display: flex; flex-direction: column; gap: 3px; }
.wp-cat li.drv { color: #8a5a0f; font-weight: 600; }

/* Responsive */
@media (max-width: 1100px) {
  .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brief-grid { grid-template-columns: minmax(0, 1fr); }
  .brief-cta { position: static; }
  .prelim, .prelim.intro-closed { grid-template-columns: minmax(0, 1fr); }
  .prelim-intro { position: static; max-height: none; }
  .intro-closed .intro-toggle { writing-mode: horizontal-tb; height: auto; flex-direction: row; padding: 14px 16px; }
  .pe-grid { grid-template-columns: minmax(0, 1fr); }
  .pe-left { position: static; }
}
@media (max-width: 720px) {
  .crumbs-inner { padding: 8px 14px; flex-wrap: wrap; }
  .picker, .brief, .prelim, .pestel { padding: 16px 12px 40px; }
  .case-grid, .act-grid, .cm-cols, .work-pestel, .field-row { grid-template-columns: minmax(0, 1fr); }
  .brief-hero { padding: 22px; border-radius: 20px; }
  .brief-hero-in { flex-direction: column; align-items: flex-start; }
  .prelim-head { padding: 18px; }
  .pe-head { padding: 16px; }
  .pe-progress { min-width: 0; width: 100%; }
  .ff-row { grid-template-columns: minmax(0, 1fr); }
  .is-next .act-status { margin-inline-end: 0; }
  .next-ribbon { position: static; align-self: flex-start; }
}
.ph-progress b span { font-size: inherit; color: inherit; font-weight: inherit; }

/* ==========================================================================
   AI COACH BAR (pinned under the top bar on every team screen)
   ========================================================================== */
.coach-bar { position: sticky; top: var(--topbar-h, 57px); z-index: 25; padding: 10px 28px 0; pointer-events: none; }
.coach-in {
  pointer-events: auto; max-width: 1424px; margin: 0 auto; display: flex; align-items: center; gap: 14px;
  padding: 10px 12px 10px 10px; border-radius: 20px;
  background: linear-gradient(100deg, rgba(255, 255, 255, .96), rgba(253, 242, 248, .96) 60%, rgba(229, 247, 246, .96));
  border: 1px solid rgba(214, 47, 143, .18); box-shadow: 0 14px 30px -18px rgba(15, 31, 69, .45);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: coachIn .5s cubic-bezier(.2, .9, .3, 1.2);
}
[dir="rtl"] .coach-in { padding: 10px 10px 10px 12px; }
@keyframes coachIn { from { opacity: 0; transform: translateY(-10px); } }
.coach-av { position: relative; flex-shrink: 0; width: 60px; height: 60px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: none; }
.coach-av::before { content: ''; position: absolute; inset: -3px; border-radius: 50%; background: conic-gradient(from 0deg, var(--fuchsia), var(--teal), #6d4ae0, var(--fuchsia)); animation: rot 6s linear infinite; }
.coach-face { position: relative; display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 35%, #1d4f7a, #0b1838); border: 2.5px solid #fff; }
.coach-face img { position: absolute; width: 150%; height: 150%; max-width: none; left: -25%; top: -6%; transition: transform .3s; }
.coach-av:hover .coach-face img { transform: scale(1.06); }
.coach-dot { position: absolute; bottom: 2px; inset-inline-end: 2px; width: 13px; height: 13px; border-radius: 50%; background: var(--teal); border: 2px solid #fff; animation: ping 1.8s infinite; }
.coach-text { flex: 1; min-width: 0; }
.coach-name { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--navy); }
.coach-ai { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #8b3fd1, var(--fuchsia)); }
.coach-hint { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.coach-msg { margin-top: 3px; color: #2c3654; font-size: 14px; line-height: 1.55; font-weight: 500; }
.coach-msg.typing::after { content: '▍'; color: var(--fuchsia); animation: blink .8s steps(1) infinite; margin-inline-start: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.coach-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 52%; }
.coach-btn { background: #fff; color: #5b2bb5; border: 1px solid #dcc6ff; box-shadow: var(--shadow-sm); }
.coach-btn:hover:not(:disabled) { border-color: #8b3fd1; }
.coach-min { flex-shrink: 0; align-self: flex-start; background: transparent; color: var(--navy-300); }
.coach-min:hover { background: var(--navy-50); color: var(--navy); }
.coach-bar.min .coach-in { max-width: max-content; margin-inline-start: auto; margin-inline-end: max(0px, calc((100% - 1424px) / 2)); padding: 6px 10px 6px 6px; gap: 10px; border-radius: 999px; }
.coach-bar.min .coach-av { width: 40px; height: 40px; }
.coach-bar.min .coach-min { align-self: center; }
/* screens below the bar keep their own top spacing */
.screen-picker .picker, .screen-briefing .brief, .screen-prelim .prelim, .screen-pestel .pestel, .screen-cycle .sim { padding-top: 16px; }
.screen-pestel .pe-left, .screen-prelim .prelim-intro, .screen-briefing .brief-cta { top: calc(var(--topbar-h, 57px) + 100px); }
@media (max-width: 900px) {
  .coach-bar { padding: 8px 12px 0; }
  .coach-in { flex-wrap: wrap; gap: 8px 10px; padding: 10px; padding-inline-end: 34px; position: relative; }
  [dir="rtl"] .coach-in { padding: 10px; padding-inline-end: 34px; }
  .coach-min { position: absolute; top: 6px; inset-inline-end: 6px; }
  .coach-bar.min .coach-in { padding-inline-end: 40px; }
  .coach-bar.min .coach-min { top: 50%; transform: translateY(-50%); }
  .coach-av { width: 46px; height: 46px; }
  .coach-msg { font-size: 13px; }
  .coach-acts { max-width: none; width: 100%; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .coach-acts .btn { flex-shrink: 0; }
  .coach-text { flex-basis: calc(100% - 100px); }
}

.pill-admin { background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }

/* ==========================================================================
   HOME — trainee entrance
   ========================================================================== */
.home-join .hero { align-items: center; }
.join-big { margin-top: 24px; max-width: 460px; }
.code-input.big { font-size: 30px; letter-spacing: .45em; padding: 14px; }
.or-row { display: flex; align-items: center; gap: 12px; margin: 16px 0 12px; color: var(--muted); font-size: 13px; font-weight: 600; }
.or-row::before, .or-row::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.continue-box { margin-top: 22px; max-width: 460px; }
.hero-visual { position: relative; }
.coach-welcome { position: absolute; inset-inline-end: -10px; bottom: -44px; display: flex; align-items: flex-end; gap: 10px; border: 0; background: none; cursor: pointer; padding: 0; z-index: 3; animation: popIn .7s cubic-bezier(.2, .9, .3, 1.3) .5s both; }
.cw-photo { position: relative; width: 132px; height: 132px; flex-shrink: 0; border-radius: 50%; padding: 4px; background: conic-gradient(from 0deg, var(--fuchsia), var(--teal), #6d4ae0, var(--fuchsia)); box-shadow: 0 20px 40px -18px rgba(15, 31, 69, .55); transition: transform .3s; }
.cw-photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #0f1f45; border: 3px solid #fff; display: block; }
.cw-photo i { position: absolute; bottom: 10px; inset-inline-end: 10px; width: 18px; height: 18px; border-radius: 50%; background: var(--teal); border: 3px solid #fff; animation: ping 1.8s infinite; }
.coach-welcome:hover .cw-photo { transform: perspective(500px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)) scale(1.05); }
.cw-bubble { position: relative; max-width: 220px; margin-bottom: 70px; padding: 12px 14px; border-radius: 16px; background: #fff; color: var(--navy); font-size: 13.5px; font-weight: 600; line-height: 1.5; text-align: start; box-shadow: var(--shadow-lg); border: 1px solid var(--fuchsia-100); animation: floaty 4s ease-in-out infinite; }
.cw-bubble::after { content: ''; position: absolute; bottom: 14px; inset-inline-end: -8px; width: 16px; height: 16px; background: #fff; border-right: 1px solid var(--fuchsia-100); border-bottom: 1px solid var(--fuchsia-100); transform: rotate(-45deg); }
[dir="rtl"] .cw-bubble::after { transform: rotate(135deg); }
@keyframes floaty { 50% { transform: translateY(-6px); } }
.how-row { text-align: center; margin-top: 10px; }
.modal.explain-modal { width: min(620px, 100%); }
.ex-head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; padding-inline-end: 30px; }
.ex-coach { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: #0f1f45; box-shadow: 0 0 0 4px var(--fuchsia-100); flex-shrink: 0; }
.ex-head h3 { font-size: 22px; margin: 4px 0; }
.ex-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ex-steps li { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--navy-50); animation: fadeUp .4s ease both; animation-delay: var(--d); }
.ex-steps li:last-child { background: linear-gradient(135deg, #f5efff, var(--fuchsia-50)); }
.ex-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #e2399b, var(--fuchsia-600)); flex-shrink: 0; }
.ex-steps b { color: var(--navy); }
.ex-steps p { margin: 2px 0 0 !important; font-size: 13.5px; }
.ex-trainer { display: flex; align-items: center; gap: 6px; margin-top: 14px !important; font-size: 13px; font-weight: 600; color: var(--teal-600) !important; }
.modal.scan-modal { width: min(440px, 100%); }
.scan-box { position: relative; border-radius: 18px; overflow: hidden; background: #0b1838; aspect-ratio: 1; }
.scan-box video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 18%; border: 3px solid rgba(255, 255, 255, .85); border-radius: 18px; box-shadow: 0 0 0 999px rgba(11, 24, 56, .35); }
@media (max-width: 1100px) { .coach-welcome { inset-inline-end: 0; bottom: -10px; } .cw-photo { width: 104px; height: 104px; } }
@media (max-width: 720px) { .cw-bubble { max-width: 170px; font-size: 12.5px; margin-bottom: 50px; } .cw-photo { width: 88px; height: 88px; } .join-big { max-width: none; } }

/* ==========================================================================
   ENTERPRISE SCOPE
   ========================================================================== */
.scope, .raci { max-width: 1480px; margin: 0 auto; padding: 16px 28px 50px; }
.sc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; margin-top: 18px; align-items: start; }
.sc-card { padding: 20px 22px; }
.sc-card-head h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.sc-card-head p { margin: 4px 0 14px; }
.sc-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; padding: 12px; border-radius: 14px; background: var(--navy-50); border: 1px solid var(--navy-100); }
.sc-form > input { flex: 1; min-width: 180px; background: #fff; padding: 9px 12px; }
.sc-form .btn-navy { background: var(--c); }
.bd-outer { position: relative; padding: 40px 16px 16px; border-radius: 26px; border: 2px dashed #c9d2e8; background: repeating-linear-gradient(45deg, #fafbfe, #fafbfe 10px, #f4f6fb 10px, #f4f6fb 20px); }
.bd-label { position: absolute; top: 12px; inset-inline-start: 18px; display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 800; color: var(--navy-500); }
.bd-label b { background: #fff; border-radius: 999px; padding: 0 7px; border: 1px solid var(--line); }
.bd-inner { position: relative; padding: 40px 16px 18px; border-radius: 22px; background: linear-gradient(160deg, #eef4ff, #e6fbf8); border: 2px solid #b9cdf3; box-shadow: inset 0 0 0 6px rgba(255, 255, 255, .6), 0 12px 24px -16px rgba(58, 111, 216, .5); transition: border-color .3s, box-shadow .3s; }
.bd-inner.ok { border-color: var(--teal); box-shadow: inset 0 0 0 6px rgba(255, 255, 255, .6), 0 0 0 4px rgba(20, 163, 163, .15); }
.bd-label.in { color: #2a59b8; }
.bd-chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 40px; }
.bd-chips.out { margin-top: 14px; }
.bd-empty { color: var(--muted); font-size: 13px; margin: 6px 0; }
.unit { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px 8px 12px; border-radius: 12px; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: transform .25s cubic-bezier(.2, .9, .3, 1.3), box-shadow .2s, opacity .25s; animation: popIn .35s ease; outline: none; }
.unit.in { background: #fff; color: #1e3f86; border: 1px solid #b9cdf3; box-shadow: 0 4px 10px -6px rgba(58, 111, 216, .6); }
.unit.out { background: #fff; color: #5b6787; border: 1px dashed #b8c1d9; }
.unit:hover, .unit:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow); }
.unit.new { animation: popIn .45s ease, glowNew 1.2s ease .2s; --c: #3a6fd8; }
.unit.moving { opacity: .4; transform: scale(.9); }
.unit.leaving, .sh.leaving { opacity: 0; transform: scale(.8); }
.u-x { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; border: 0; background: transparent; color: var(--navy-300); cursor: pointer; padding: 0; }
.u-x:hover { background: #fdecec; color: var(--red); }
.u-ai { display: inline-grid; place-items: center; color: #8b3fd1; font-style: normal; }
.unit.ai.in { background: linear-gradient(135deg, #fff 70%, #faf5ff); }
.pi-wrap { position: relative; padding: 0 0 22px 26px; direction: ltr; }
.pi-axis { position: absolute; font-size: 12px; font-weight: 800; color: var(--navy-500); }
.pi-axis.y { left: 0; top: 50%; transform: translateY(-50%) rotate(-90deg); transform-origin: left center; margin-top: 30px; white-space: nowrap; left: 8px; }
.pi-axis.x { bottom: 0; right: 4px; }
.pi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: minmax(170px, auto) minmax(170px, auto); gap: 8px; }
.pi-q { position: relative; padding: 32px 10px 10px; border-radius: 18px; background: color-mix(in srgb, var(--c) 7%, #fff); border: 1.5px solid color-mix(in srgb, var(--c) 25%, #fff); cursor: pointer; transition: background .2s, border-color .2s, transform .2s; direction: inherit; }
[dir="rtl"] .pi-q { direction: rtl; }
.pi-q:hover { background: color-mix(in srgb, var(--c) 12%, #fff); }
.pi-qname { position: absolute; top: 9px; inset-inline-start: 12px; font-size: 12.5px; font-weight: 800; color: var(--c); }
.moving .pi-q { border-style: dashed; animation: qPulse 1.2s ease-in-out infinite; }
@keyframes qPulse { 50% { border-color: var(--c); } }
.pi-move { position: absolute; top: 8px; inset-inline-end: 10px; font-size: 11px; font-weight: 800; color: #fff; background: var(--c); padding: 2px 8px; border-radius: 999px; }
.pi-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sh { display: inline-flex; align-items: center; gap: 6px; padding: 6px 6px 6px 6px; border-radius: 12px; background: #fff; border: 1px solid color-mix(in srgb, var(--c) 30%, #fff); box-shadow: 0 3px 8px -6px rgba(15, 31, 69, .4); cursor: pointer; transition: transform .2s, box-shadow .2s, opacity .25s; animation: popIn .35s ease; outline: none; max-width: 100%; }
.sh:hover { transform: translateY(-2px); }
.sh.sel { outline: 3px solid var(--c); outline-offset: 2px; transform: scale(1.04); }
.sh.new { animation: popIn .45s ease, glowNew 1.2s ease .2s; }
.sh.sponsor { background: linear-gradient(135deg, #fff 55%, #fff4e0); border-color: #f2c66b; }
.sh-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.sh-txt b { font-size: 13px; color: var(--navy); }
.sh-txt small { font-size: 11px; color: var(--muted); }
.sh-crown { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; border: 0; cursor: pointer; background: var(--navy-50); color: var(--navy-300); flex-shrink: 0; transition: all .2s; }
.sh-crown.on { background: linear-gradient(135deg, #f5b942, #e2a03a); color: #fff; box-shadow: 0 4px 10px -5px #e2a03a; }
.sh-crown.burst { animation: popIn .45s ease; }
.sh-form { flex-direction: column; align-items: stretch; }
.sh-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.sh-row > input { flex: 1; min-width: 150px; background: #fff; padding: 9px 12px; }
.sh-sponsor { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #a86b0f; padding: 8px 10px; border-radius: 10px; background: #fff; border: 1px solid var(--line); cursor: pointer; }
.sh-sponsor input { width: auto; }
.sh-row .btn { margin-inline-start: auto; }

/* ==========================================================================
   RACI
   ========================================================================== */
.rc-roles-card, .rc-matrix-card { padding: 20px 22px; margin-top: 18px; }
.role-lib { display: flex; flex-wrap: wrap; gap: 8px; }
.role-chip { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 7px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; color: var(--navy-700); font-weight: 600; font-size: 13.5px; cursor: pointer; transition: all .2s cubic-bezier(.2, .9, .3, 1.3); }
[dir="rtl"] .role-chip { padding: 7px 7px 7px 12px; }
.role-chip .rc-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); transition: all .2s; }
.role-chip:hover { border-color: color-mix(in srgb, var(--c) 50%, #fff); transform: translateY(-2px); }
.role-chip.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, #fff); color: var(--navy); box-shadow: 0 6px 14px -10px var(--c); }
.role-chip.on .rc-ic { background: var(--c); color: #fff; }
.role-chip.new { animation: popIn .45s ease, glowNew 1.2s ease .2s; }
.role-chip.custom { cursor: default; }
.rc-count { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 13px; font-weight: 700; color: #a86b0f; background: #fff4e0; padding: 4px 12px; border-radius: 999px; }
.rc-count.ok { color: var(--teal-600); background: var(--teal-100); }
.rc-mhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.palette { display: flex; gap: 6px; padding: 6px; border-radius: 16px; background: var(--navy-50); border: 1px solid var(--navy-100); position: sticky; top: calc(var(--topbar-h, 57px) + 90px); z-index: 2; }
.pal { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 64px; padding: 6px 8px; border-radius: 12px; border: 2px solid transparent; background: #fff; cursor: pointer; transition: all .15s; color: var(--navy-500); }
.pal b { font-size: 20px; font-weight: 800; line-height: 1; }
.pal span { font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.pal-R b { color: #3a6fd8; } .pal-A b { color: #d62f8f; } .pal-C b { color: #14a3a3; } .pal-I b { color: #8f9cc0; }
.pal.on { border-color: var(--navy); transform: translateY(-2px); box-shadow: var(--shadow); }
.pal-R.on { border-color: #3a6fd8; } .pal-A.on { border-color: #d62f8f; } .pal-C.on { border-color: #14a3a3; } .pal-I.on { border-color: #8f9cc0; }
.rc-scroll { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); }
.rc-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.rc-table th, .rc-table td { padding: 6px; text-align: center; border-bottom: 1px solid var(--line); }
.rc-table thead th { background: #f7f9fd; position: sticky; top: 0; z-index: 1; vertical-align: bottom; }
.rc-table .rc-act { text-align: start; min-width: 230px; position: sticky; inset-inline-start: 0; background: #fff; z-index: 1; font-weight: 600; color: var(--navy); padding: 8px 12px; }
.rc-table thead .rc-act { background: #f7f9fd; z-index: 2; font-size: 12px; color: var(--muted); }
.rc-num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--navy-50); color: var(--navy-500); font-size: 11.5px; font-weight: 800; margin-inline-end: 8px; }
.rc-role { min-width: 84px; max-width: 110px; }
.rc-role .rc-ic { width: 26px; height: 26px; margin: 0 auto 4px; border-radius: 8px; display: grid; place-items: center; color: #fff; background: var(--c, #5b6787); }
.rc-rname { display: block; font-size: 11.5px; font-weight: 700; color: var(--navy-700); line-height: 1.25; }
.rc-chk { min-width: 96px; }
.cell { width: 44px; height: 40px; border-radius: 12px; border: 1.5px dashed var(--navy-100); background: #fff; font-weight: 800; font-size: 17px; cursor: pointer; transition: transform .15s, background .2s, border-color .2s; display: inline-grid; place-items: center; color: #fff; }
.cell:hover { border-color: var(--navy-300); transform: scale(1.06); }
.cell.c-R { background: #3a6fd8; border: 0; box-shadow: 0 6px 12px -8px #3a6fd8; }
.cell.c-A { background: linear-gradient(135deg, #e2399b, #b01f78); border: 0; box-shadow: 0 6px 12px -8px #d62f8f; }
.cell.c-C { background: #14a3a3; border: 0; box-shadow: 0 6px 12px -8px #14a3a3; }
.cell.c-I { background: #c3cbe0; border: 0; color: var(--navy); }
.cell.pop { animation: popIn .3s ease; }
.rc-table tbody tr { transition: background .3s; }
.rc-table.intro tbody tr { animation: fadeUp .35s ease both; animation-delay: var(--d); }
.rc-table tbody tr.valid th.rc-act { box-shadow: inset 4px 0 0 var(--teal); }
[dir="rtl"] .rc-table tbody tr.valid th.rc-act { box-shadow: inset -4px 0 0 var(--teal); }
.rc-table tbody tr.flash { animation: rowFlash 1s ease; }
@keyframes rowFlash { 0% { background: #d5f2f1; } 100% { background: transparent; } }
.chk { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.chk.ok { background: var(--teal-100); color: var(--teal-600); animation: popIn .3s ease; }
.chk.bad { background: #fff1f2; color: #be3455; }
.rc-table tfoot th, .rc-table tfoot td { background: #fafbfe; border-bottom: 0; vertical-align: bottom; }
.load { width: 22px; height: 46px; margin: 0 auto 2px; border-radius: 6px; background: var(--navy-100); display: flex; align-items: flex-end; overflow: hidden; }
.load i { display: block; width: 100%; background: linear-gradient(180deg, #6d4ae0, #3a6fd8); border-radius: 6px; transition: height .5s; }
.load.heavy i { background: linear-gradient(180deg, #d64545, #e2a03a); }
.rc-table tfoot small { font-size: 10.5px; color: var(--muted); font-weight: 700; }
.rc-table.mini .rc-act { min-width: 160px; font-size: 12px; }
.rc-table.mini .rc-role { min-width: 60px; }
.rc-table.mini .cell { width: 28px; height: 26px; font-size: 12px; border-radius: 8px; cursor: default; }
@media (max-width: 1100px) { .sc-grid { grid-template-columns: minmax(0, 1fr); } .palette { position: static; } }
@media (max-width: 720px) {
  .scope, .raci { padding: 14px 12px 40px; }
  .pal { min-width: 52px; } .pal span { display: none; }
  .pi-grid { grid-template-rows: minmax(130px, auto) minmax(130px, auto); }
}
@media (max-width: 1100px) {
  .home-join .hero-visual { order: 2; margin-bottom: 60px; }
  .home-join .hero h1 { margin-top: 4px; }
}

/* ==========================================================================
   ARCHITECTURE PRINCIPLES
   ========================================================================== */
.princ { max-width: 1480px; margin: 0 auto; padding: 16px 28px 50px; }
.pr-head .pe-title .eyebrow { color: #d62f8f; }
.pr-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; margin-top: 18px; align-items: start; }
.pr-trace { padding: 18px; position: sticky; top: calc(var(--topbar-h, 57px) + 100px); max-height: calc(100vh - 190px); overflow: auto; }
.pr-trace h3 { display: flex; align-items: center; gap: 7px; font-size: 16px; margin-bottom: 4px; }
.pr-trace h3 .ic { color: #e2a03a; }
.trace-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.trace-list li { padding: 10px; border-radius: 12px; background: color-mix(in srgb, var(--c) 7%, #fff); border-inline-start: 3px solid var(--c); transition: background .3s; }
.trace-list li.gap { background: #fff7f7; border-inline-start-color: #f0a3a3; }
.tr-drv { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; font-weight: 600; color: var(--navy); }
.tr-ps { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.tr-p { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; color: #fff; background: var(--c); animation: popIn .3s ease; }
.tr-gap { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: #be3455; }
.pr-board { padding: 18px 20px; }
.pr-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pr-bar h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.pr-bar-btns { display: flex; gap: 8px; }
.pr-bar .btn-navy { background: var(--fuchsia); }
.pr-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pr-col { border-radius: 18px; background: color-mix(in srgb, var(--c) 6%, #fff); border: 1px solid color-mix(in srgb, var(--c) 22%, #fff); min-height: 220px; display: flex; flex-direction: column; }
.pr-col-head { display: flex; align-items: center; gap: 8px; padding: 12px; border-bottom: 1px dashed color-mix(in srgb, var(--c) 30%, #fff); }
.pr-col-head b { flex: 1; color: var(--navy); font-size: 14px; }
.pr-col-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: #fff; background: var(--c); }
.pr-col-n { font-weight: 800; font-size: 12px; color: var(--c); background: #fff; border-radius: 999px; padding: 1px 9px; border: 1px solid color-mix(in srgb, var(--c) 30%, #fff); }
.pr-col-body { padding: 10px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.pr-col-empty { color: var(--muted); font-size: 12.5px; text-align: center; margin: auto 0; padding: 20px 6px; }
.pcard { position: relative; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--c); cursor: pointer; transition: transform .2s, box-shadow .2s, opacity .25s; animation: fadeUp .3s ease; outline: none; }
.pcard:hover, .pcard:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow); }
.pcard.new { animation: popIn .45s ease, glowNew 1.2s ease .2s; }
.pcard.good { box-shadow: 0 0 0 2px color-mix(in srgb, var(--teal) 30%, transparent); }
.pcard.leaving { opacity: 0; transform: scale(.9); }
.pc-top { display: flex; align-items: flex-start; gap: 6px; padding-inline-end: 22px; }
.pc-top h4 { flex: 1; font-size: 14px; line-height: 1.35; }
.pc-stmt { font-size: 12.5px; color: #4a5573; margin: 6px 0 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pc-meter { display: flex; gap: 4px; }
.pc-meter span { width: 22px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; background: var(--navy-50); color: var(--navy-300); }
.pc-meter span.on { background: var(--c); color: #fff; }
.pc-links { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.pc-drv { font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 999px; color: #fff; background: var(--k); }
.pc-unl { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: #be3455; }
.pc-del { position: absolute; top: 8px; inset-inline-end: 6px; opacity: 0; transition: opacity .2s; }
.pcard:hover .pc-del { opacity: 1; }
.modal.pr-editor { width: min(620px, 100%); }
.tpl-k { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; font-size: 11px; background: var(--fuchsia); color: #fff; margin-inline-end: 4px; }
.dom-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.dom-pick label, .drv-pick label { cursor: pointer; }
.dom-pick input, .drv-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.dom-pick span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 8%, #fff); border: 1.5px solid color-mix(in srgb, var(--c) 30%, #fff); transition: all .15s; }
.dom-pick input:checked + span { background: var(--c); color: #fff; border-color: var(--c); }
.drv-pick { display: flex; flex-direction: column; gap: 6px; max-height: 190px; overflow: auto; }
.drv-pick span { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--line); font-size: 13px; background: #fff; transition: all .15s; }
.drv-pick span b { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; color: #fff; background: var(--c); font-size: 11px; flex-shrink: 0; }
.drv-pick span i { font-style: normal; color: var(--navy); font-weight: 500; }
.drv-pick input:checked + span { border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 15%, transparent); }
.modal.pr-library { width: min(980px, 100%); }
.lib-tabs { margin: 10px 0 12px; }
.lib-tab { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 13px; color: var(--navy-500); cursor: pointer; }
.lib-tab.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; max-height: 58vh; overflow: auto; padding: 2px; }
.lib-card { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); border-top: 4px solid var(--c); background: #fff; }
.lib-card.on { background: color-mix(in srgb, var(--c) 6%, #fff); }
.lib-card h4 { font-size: 14px; }
.lib-card p { font-size: 12.5px; color: #4a5573; margin: 0 !important; flex: 1; }
.lib-dom { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; color: var(--c); }
.lib-card .btn { align-self: flex-start; }
/* Phase gate & Request for Architecture Work */
.gate .btn { margin-inline-start: auto; }
.gate.passed { border-style: solid; border-color: var(--teal); background: linear-gradient(135deg, #fff, var(--teal-100)); }
.gate.passed .gate-ic { background: var(--teal); color: #fff; }
.modal.rfaw-modal { width: min(880px, 100%); padding: 0 0 22px; }
.rfaw-modal .modal-body { padding: 0 26px; }
.rfaw-modal .modal-actions { padding: 0 26px; }
.rfaw-modal .modal-x { background: rgba(255, 255, 255, .2); color: #fff; }
.rf-hero { margin: 0 -26px 14px; padding: 26px; display: flex; gap: 16px; align-items: center; color: #fff; background: radial-gradient(circle at 90% 0%, rgba(255, 255, 255, .25), transparent 55%), linear-gradient(135deg, var(--a), var(--b)); }
.rf-hero h3 { color: #fff; font-size: 24px; }
.rf-hero p { color: rgba(255, 255, 255, .85) !important; margin: 2px 0 0 !important; }
.rf-kicker { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
html[lang="ar"] .rf-kicker { letter-spacing: 0; text-transform: none; }
.rf-seal { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .2); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); flex-shrink: 0; }
.rf-lead { font-weight: 600; color: var(--navy-500) !important; }
.rf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.rf-sec { padding: 12px 14px; border-radius: 14px; background: var(--navy-50); border: 1px solid var(--navy-100); animation: fadeUp .35s ease both; }
.rf-sec h4 { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--navy); margin-bottom: 6px; }
.rf-sec ul { margin: 0; padding-inline-start: 18px; font-size: 13px; color: #3a4563; display: flex; flex-direction: column; gap: 3px; }
.rf-sec p { margin: 0 !important; font-size: 13px; }
.rf-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rf-two b { font-size: 12px; color: var(--navy-500); }
.rf-tag { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 5px; color: #fff; background: var(--c); font-size: 10.5px; font-weight: 800; }
.cel-trophy.big { width: 110px; height: 110px; }
.pre-node.state-completed .pre-badge { fill: var(--teal); }
.pre-node.state-completed .pre-body { stroke: var(--teal); stroke-width: 2.5; }
.pre-node.state-completed .pre-sub { fill: var(--teal-600); }
@media (max-width: 1100px) { .pr-grid { grid-template-columns: minmax(0, 1fr); } .pr-trace { position: static; max-height: none; } .pr-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .princ { padding: 14px 12px 40px; } .pr-cols, .rf-grid, .rf-two { grid-template-columns: minmax(0, 1fr); } }

/* ==========================================================================
   PHASE A — capability heat map & readiness radar
   ========================================================================== */
.caps, .ready { max-width: 1480px; margin: 0 auto; padding: 16px 28px 50px; }
.phase-a .ph-badge, .phase-a .drawer-badge.sm { background: linear-gradient(135deg, #3a6fd8, #1d3f8f); box-shadow: 0 0 0 8px rgba(58, 111, 216, .14); }
.phase-a .prelim-head { background: radial-gradient(circle at 100% 0%, #e8f0ff, transparent 50%), #fff; }
.cp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; margin-top: 18px; align-items: start; }
.cp-map-card { padding: 20px 22px; }
.cp-maphead { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.cp-legend { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.cp-legend i { display: grid; place-items: center; width: 26px; height: 20px; border-radius: 6px; color: #fff; font-style: normal; font-size: 11px; font-weight: 800; }
.cp-legend i.na { background: #c3cbe0; color: var(--navy-500); }
.cp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 8px; }
.ctile { position: relative; display: flex; flex-direction: column; gap: 6px; align-items: stretch; text-align: start; padding: 12px; border-radius: 16px; border: 1.5px solid color-mix(in srgb, var(--h) 45%, #fff); background: linear-gradient(160deg, color-mix(in srgb, var(--h) 22%, #fff), color-mix(in srgb, var(--h) 8%, #fff)); cursor: pointer; transition: transform .2s cubic-bezier(.2, .9, .3, 1.3), box-shadow .2s; animation: fadeUp .3s ease; font: inherit; color: inherit; }
.ctile:hover { transform: translateY(-3px); box-shadow: 0 10px 20px -12px var(--h); }
.ctile.sel { outline: 3px solid var(--navy); outline-offset: 2px; }
.ctile.new { animation: popIn .45s ease, glowNew 1.2s ease .2s; --c: var(--h); }
.ctile.focus { box-shadow: 0 0 0 3px #f5b94266, 0 10px 20px -12px var(--h); }
.ctile b { font-size: 13.5px; color: var(--navy); padding-inline-end: 20px; line-height: 1.35; }
.ct-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.ct-row small { font-size: 11px; color: var(--navy-500); font-weight: 600; }
.mdots { display: inline-flex; gap: 3px; }
.mdots i { width: 10px; height: 10px; border-radius: 3px; background: rgba(15, 31, 69, .12); }
.mdots.cur i.on { background: var(--navy); }
.mdots.tgt i.on { background: transparent; box-shadow: inset 0 0 0 2px var(--navy); }
.ct-gap { align-self: flex-start; font-size: 11.5px; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: var(--h); color: #fff; }
.ct-star { position: absolute; top: 8px; inset-inline-end: 8px; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #f5b942, #e2a03a); }
.ct-star .ic { fill: currentColor; }
.ctile .u-ai { position: absolute; bottom: 10px; inset-inline-end: 10px; }
.ctile.ghost { --h: #c3cbe0; background: #fafbfe; border: 1.5px dashed #c3cbe0; justify-content: space-between; min-height: 112px; }
.ctile.ghost b { color: var(--navy-500); }
.ct-add { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; color: #3a6fd8; }
.cp-detail { padding: 18px; position: sticky; top: calc(var(--topbar-h, 57px) + 100px); }
.cp-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--muted); padding: 40px 10px; }
.cp-empty .ic { color: #3a6fd8; opacity: .5; }
.cp-dhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--h) 25%, #fff), #fff); border: 1.5px solid color-mix(in srgb, var(--h) 50%, #fff); margin-bottom: 8px; }
.cp-dhead h3 { font-size: 17px; }
.cp-gapbig { min-width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; font-weight: 800; color: #fff; background: var(--h); }
.cp-detail h4 { font-size: 12.5px; color: var(--muted); margin: 14px 0 6px; }
.mpick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.mpick button { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 2px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; transition: all .15s; color: var(--navy-500); }
.mpick button b { font-size: 17px; }
.mpick button small { font-size: 9.5px; font-weight: 700; text-align: center; line-height: 1.15; }
.mpick button:hover { border-color: var(--navy-300); }
.mpick button.on { background: var(--navy); border-color: var(--navy); color: #fff; transform: translateY(-2px); }
.mpick[data-field="target"] button.on { background: #3a6fd8; border-color: #3a6fd8; }
.mpick button.pop { animation: popIn .3s ease; }
.cp-focus { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 16px 0 8px; padding: 11px; border-radius: 12px; border: 1.5px dashed #e2a03a; background: #fffaf0; color: #a86b0f; font-weight: 800; cursor: pointer; transition: all .2s; }
.cp-focus.on { border-style: solid; color: #fff; background: linear-gradient(135deg, #f5b942, #e2a03a); box-shadow: 0 8px 18px -10px #e2a03a; }
.cp-focus.on .ic { fill: currentColor; }
.rd-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 20px; margin-top: 18px; align-items: start; }
.rd-radar-card, .rd-list-card { padding: 20px 22px; }
.rd-radar-card { position: sticky; top: calc(var(--topbar-h, 57px) + 100px); }
.rd-radar-card h2, .rd-list-card h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; margin-bottom: 8px; }
.rd-svg { width: 100%; max-width: 480px; display: block; margin: 0 auto; overflow: visible; }
.rd-ring { fill: none; stroke: var(--navy-100); stroke-width: 1; }
.rd-ring.weak { stroke: #f0a3a3; stroke-dasharray: 4 4; stroke-width: 1.5; }
.rd-axis { stroke: var(--navy-100); stroke-width: 1; }
.rd-poly { stroke: #6d4ae0; stroke-width: 2.5; stroke-linejoin: round; animation: polyIn .6s cubic-bezier(.2, .9, .3, 1.2); transform-origin: center; transform-box: view-box; }
@keyframes polyIn { from { transform: scale(.6); opacity: 0; } }
.rd-dot { stroke: #fff; stroke-width: 2.5; animation: popIn .4s ease; transform-box: fill-box; transform-origin: center; }
.rd-label { font-size: 13px; font-weight: 700; fill: var(--navy-500); }
.rd-label.weak { fill: #d64545; }
.rd-core { fill: var(--navy); }
.rd-avg { font-size: 20px; font-weight: 800; fill: #fff; }
.rd-avgl { font-size: 10px; fill: rgba(255, 255, 255, .7); }
.rd-overall { text-align: center; font-weight: 600; color: var(--muted); margin-top: 6px; }
.rd-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; padding: 12px; border-radius: 14px; border: 1px solid var(--line); margin-bottom: 8px; transition: background .3s, border-color .3s; animation: fadeUp .3s ease; }
.rd-row.scored { background: #fafbfe; }
.rd-row.weak { background: #fff7f5; border-color: #f5c2b8; }
.rd-name b { display: block; color: var(--navy); font-size: 14px; }
.rd-name small { color: var(--muted); font-size: 12px; }
.rd-scores { display: flex; gap: 4px; }
.rd-scores button { width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid color-mix(in srgb, var(--s) 45%, #fff); background: #fff; color: var(--s); font-weight: 800; cursor: pointer; transition: all .15s; }
.rd-scores button:hover { transform: translateY(-2px); }
.rd-scores button.on { background: var(--s); color: #fff; border-color: var(--s); box-shadow: 0 6px 12px -6px var(--s); transform: scale(1.08); }
.rd-action { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; }
.rd-action span { font-size: 12px; font-weight: 700; color: var(--navy-500); display: flex; align-items: center; gap: 4px; }
.rd-action.need span { color: #d64545; }
.rd-action em { font-style: normal; }
.rd-action textarea { background: #fff; font-size: 13px; }
.rd-action.need textarea { border-color: #f0a3a3; }
.rd-ai { position: absolute; top: 8px; inset-inline-end: 8px; }
@media (max-width: 1100px) { .cp-grid, .rd-grid { grid-template-columns: minmax(0, 1fr); } .cp-detail, .rd-radar-card { position: static; } }
@media (max-width: 720px) { .caps, .ready { padding: 14px 12px 40px; } .rd-row { grid-template-columns: minmax(0, 1fr); } .rd-label { font-size: 11px; } }

/* ==========================================================================
   PHASE A — vision board, risk matrix, Statement of Architecture Work
   ========================================================================== */
.vision, .risks { max-width: 1480px; margin: 0 auto; padding: 16px 28px 50px; }
.vs-hero { margin-top: 18px; padding: 0; overflow: hidden; border: 0; background: radial-gradient(circle at 92% -20%, rgba(255, 255, 255, .25), transparent 45%), linear-gradient(135deg, #b01f78, #6d2fd1 55%, #1d3f8f); box-shadow: var(--shadow-lg); }
.vs-hero-in { display: flex; gap: 14px; padding: 26px 28px; }
.vs-quote { font-size: 90px; line-height: .8; color: rgba(255, 255, 255, .35); font-family: Georgia, serif; }
.vs-hero-body { flex: 1; }
.vs-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; color: #ffd1ea; letter-spacing: .06em; text-transform: uppercase; }
html[lang="ar"] .vs-kicker { letter-spacing: 0; text-transform: none; }
.vs-hero textarea { margin-top: 8px; background: rgba(255, 255, 255, .1); border: 1.5px solid rgba(255, 255, 255, .25); color: #fff; font-size: 19px; font-weight: 600; line-height: 1.6; resize: vertical; }
.vs-hero textarea::placeholder { color: rgba(255, 255, 255, .55); }
.vs-hero textarea:focus { background: rgba(255, 255, 255, .16); border-color: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .15); }
.vs-hero-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 12.5px; color: rgba(255, 255, 255, .75); flex-wrap: wrap; }
.vs-count { font-weight: 800; padding: 1px 10px; border-radius: 999px; background: rgba(255, 255, 255, .15); }
.vs-count.ok { background: #4be0b0; color: #0b3b2c; }
.vs-values-card { padding: 18px 20px; margin-top: 18px; }
.vs-values { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.vcard { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 18px; border: 1px solid var(--fuchsia-100); background: linear-gradient(170deg, #fff 60%, var(--fuchsia-50)); animation: fadeUp .35s ease; }
.vcard.new { animation: popIn .45s ease, glowNew 1.2s ease .2s; --c: #d62f8f; }
.vcard.unlinked { border-color: #f5c2b8; }
.vc-head { display: flex; align-items: flex-start; gap: 8px; }
.vc-head h3 { flex: 1; font-size: 15.5px; line-height: 1.4; }
.vc-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #e2399b, #b01f78); flex-shrink: 0; }
.vc-ic .ic { fill: currentColor; }
.pc-drv span { font-weight: 600; }
.kpis { display: flex; flex-direction: column; gap: 6px; }
.kpi { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: #fff; border: 1px solid var(--line); cursor: pointer; transition: border-color .2s; animation: fadeUp .3s ease; }
.kpi:hover { border-color: var(--fuchsia); }
.kpi.new { animation: popIn .45s ease; }
.kpi-name { flex: 1; font-size: 13px; font-weight: 600; color: var(--navy); }
.kpi-vals { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; }
.kpi-vals .kb { color: var(--muted); background: var(--navy-50); padding: 1px 7px; border-radius: 6px; }
.kpi-vals .kt { color: #fff; background: var(--teal); padding: 1px 7px; border-radius: 6px; }
.kpi-vals i { color: var(--navy-300); display: inline-flex; }
[dir="rtl"] .kpi-vals i .ic { transform: scaleX(-1); }
.kpi-empty { font-size: 12.5px; color: var(--muted); margin: 0; }
.vc-addkpi { align-self: flex-start; color: var(--fuchsia); }
.rk-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 18px; align-items: start; }
.rk-matrix-card, .rk-list-card { padding: 20px 22px; }
.rk-matrix-card { position: sticky; top: calc(var(--topbar-h, 57px) + 100px); }
.rm-wrap { position: relative; padding: 0 0 22px 24px; direction: ltr; }
.rm-axis { position: absolute; font-size: 12px; font-weight: 800; color: var(--navy-500); }
.rm-axis.y { left: 0; top: 45%; transform: rotate(-90deg); transform-origin: left center; white-space: nowrap; margin-top: 30px; left: 8px; }
.rm-axis.x { right: 0; bottom: 0; }
.rm-grid { display: flex; flex-direction: column; gap: 5px; }
.rm-row { display: grid; grid-template-columns: 22px repeat(5, minmax(0, 1fr)); gap: 5px; }
.rm-ylab, .rm-xlabs span { display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--navy-300); }
.rm-cell { position: relative; aspect-ratio: 1.25; border-radius: 12px; border: 0; cursor: pointer; background: color-mix(in srgb, var(--h) 30%, #fff); display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 3px; padding: 4px; transition: transform .15s, background .2s; }
.rm-cell:hover { transform: scale(1.04); background: color-mix(in srgb, var(--h) 45%, #fff); }
.rm-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 800; color: #fff; background: var(--navy); border: 2px solid #fff; box-shadow: 0 4px 8px -4px rgba(0, 0, 0, .5); animation: popIn .35s ease; cursor: pointer; }
.rm-dot.new { animation: popIn .45s ease, glowNew 1.2s ease .2s; --c: var(--navy); }
.rm-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--muted); }
.rm-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-inline-end: 4px; vertical-align: -1px; }
.rk-sugg { padding: 12px; border-radius: 14px; background: #f5f0ff; border: 1px dashed #c9b3f5; margin-bottom: 12px; }
.rk-sugg > b { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #5b2bb5; margin-bottom: 8px; }
.rk-sg { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; font-weight: 600; color: var(--navy); border-top: 1px solid #e6dafc; }
.rk-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.rk-item { position: relative; display: flex; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); border-inline-start: 5px solid var(--h); background: #fff; cursor: pointer; transition: box-shadow .2s, transform .2s; animation: fadeUp .3s ease; }
.rk-item:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.rk-item.new { animation: popIn .45s ease, glowNew 1.2s ease .2s; --c: var(--h); }
.rk-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--navy); flex-shrink: 0; }
.rk-body { flex: 1; min-width: 0; padding-inline-end: 22px; }
.rk-body b { color: var(--navy); font-size: 14px; }
.rk-body p { font-size: 12.8px; color: #3a4563; margin: 4px 0 0; display: flex; gap: 5px; align-items: flex-start; }
.rk-body p .ic { color: var(--teal); margin-top: 3px; }
.rk-nomit { color: #be3455 !important; }
.rk-nomit .ic { color: #be3455 !important; }
.rk-item .u-x { position: absolute; top: 10px; inset-inline-end: 8px; }
.mpick.sm { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.mpick.sm label { cursor: pointer; }
.mpick.sm input { position: absolute; opacity: 0; width: 0; height: 0; }
.mpick.sm span { display: grid; place-items: center; height: 38px; border-radius: 10px; border: 1.5px solid var(--line); font-weight: 800; color: var(--navy-500); transition: all .15s; }
.mpick.sm input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.saw-vision { margin: 4px 0 12px; padding: 16px 18px; border-radius: 16px; font-size: 16.5px; font-weight: 700; line-height: 1.65; color: #fff; background: linear-gradient(135deg, #b01f78, #6d2fd1); }
.rf-sec.wide { grid-column: 1 / -1; }
.saw-kpi { font-size: 12px; color: var(--muted); margin-inline-start: 4px; }
.saw-sign { margin-top: 14px; padding: 16px; border-radius: 16px; border: 2px dashed #c9d2e8; background: #fafbfe; }
.saw-sign.signed { border-style: solid; border-color: var(--teal); background: linear-gradient(135deg, #fff, var(--teal-100)); }
.saw-sign h4 { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--navy); margin-bottom: 8px; }
.saw-sign h4 .ic { color: #e2a03a; }
.saw-sign-row { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.saw-sign-row .field { margin: 0; }
.saw-stamp { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--teal-600) !important; padding: 6px 14px; border-radius: 999px; background: #fff; border: 2px solid var(--teal); transform: rotate(-2deg); animation: popIn .5s ease; }
@media (max-width: 1100px) { .rk-grid { grid-template-columns: minmax(0, 1fr); } .rk-matrix-card { position: static; } }
@media (max-width: 720px) { .vision, .risks { padding: 14px 12px 40px; } .vs-hero-in { padding: 18px; } .vs-quote { display: none; } .vs-hero textarea { font-size: 16px; } .saw-sign-row { grid-template-columns: minmax(0, 1fr); } }

/* ==========================================================================
   PHASE B — value stream & baseline/target
   ========================================================================== */
.vstream, .bt { max-width: 1480px; margin: 0 auto; padding: 16px 28px 50px; }
.phase-b .ph-badge, .phase-b .drawer-badge.sm { background: linear-gradient(135deg, #14a3a3, #0b5f6b); box-shadow: 0 0 0 8px rgba(20, 163, 163, .14); }
.phase-b .prelim-head { background: radial-gradient(circle at 100% 0%, #e2f7f6, transparent 50%), #fff; }
.vm-card { margin-top: 18px; padding: 20px 22px; }
.vm-def { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.vm-f { display: flex; flex-direction: column; gap: 4px; }
.vm-f span { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; color: var(--navy-500); }
.vm-f-trigger span { color: #a86b0f; } .vm-f-value span { color: #0e8585; }
.vm-f input { font-weight: 600; }
.vm-flow-wrap { overflow-x: auto; padding: 6px 2px 12px; }
.vm-flow { display: flex; align-items: flex-start; gap: 0; min-width: max-content; direction: ltr; }
[dir="rtl"] .vm-flow { direction: rtl; }
.vm-end { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 130px; padding: 14px 10px; border-radius: 18px; text-align: center; font-size: 13px; flex-shrink: 0; }
.vm-end span { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.vm-end.trig { background: #fff8eb; border: 1.5px dashed #e2a03a; } .vm-end.trig span { background: #e2a03a; }
.vm-end.val { background: #e6f8f6; border: 1.5px dashed var(--teal); } .vm-end.val span { background: var(--teal); }
.vm-end.val .ic { fill: currentColor; }
.vm-end b { color: var(--navy); line-height: 1.35; }
.vm-col { display: flex; flex-direction: column; gap: 8px; width: 190px; flex-shrink: 0; margin-inline-start: -6px; animation: fadeUp .4s ease both; animation-delay: var(--d); }
.vm-col:first-of-type { margin-inline-start: 8px; }
.vm-col.new { animation: popIn .45s ease; }
.vm-chev { position: relative; display: flex; align-items: center; gap: 8px; height: 66px; padding: 0 30px 0 26px; border: 0; color: #fff; background: var(--c); cursor: pointer; clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%, 18px 50%); transition: filter .2s, transform .2s; text-align: start; font: inherit; }
[dir="rtl"] .vm-chev { clip-path: polygon(18px 0, 100% 0, calc(100% - 18px) 50%, 100% 100%, 18px 100%, 0 50%); padding: 0 26px 0 30px; }
.vm-chev:hover { filter: brightness(1.08); }
.vm-col.sel .vm-chev { transform: translateY(-3px); filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .25)); }
.vm-chev b { font-size: 13px; line-height: 1.3; }
.vm-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .25); font-size: 12px; font-weight: 800; flex-shrink: 0; }
.vm-caps { display: flex; flex-direction: column; gap: 5px; padding: 8px; margin: 0 14px; border-radius: 12px; background: color-mix(in srgb, var(--c) 7%, #fff); border: 1px dashed color-mix(in srgb, var(--c) 35%, #fff); min-height: 60px; }
.vm-col.sel .vm-caps { border-style: solid; border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 15%, transparent); }
.vm-cap { font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 8px; background: #fff; color: var(--navy); border-inline-start: 3px solid var(--c); animation: popIn .3s ease; }
.vm-empty { font-size: 11.5px; color: var(--muted); text-align: center; margin: auto; }
.vm-tools { display: flex; justify-content: center; gap: 4px; }
.vm-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 90px; height: 66px; margin: 0 10px; border-radius: 14px; border: 2px dashed var(--navy-100); background: #fafbfe; color: var(--navy-500); font-weight: 700; font-size: 12px; cursor: pointer; flex-shrink: 0; }
.vm-add:hover { border-color: var(--teal); color: var(--teal-600); }
.vm-hint { margin-top: 6px; display: flex; align-items: center; gap: 6px; font-weight: 600; }
.vm-pool-card { margin-top: 18px; padding: 18px 22px; }
.vm-pool-card h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; margin-bottom: 12px; }
.vm-pool { display: flex; flex-wrap: wrap; gap: 8px; }
.vm-pchip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; font-size: 13px; color: var(--navy-700); cursor: pointer; transition: all .15s; }
.vm-pchip:disabled { cursor: default; opacity: .75; }
.vm-pool.active .vm-pchip:not(:disabled):hover { border-color: var(--teal); transform: translateY(-2px); }
.vm-pchip.focus { border-color: #f2c66b; background: #fffaf0; }
.vm-pchip.focus .ic { color: #e2a03a; fill: currentColor; }
.vm-pchip.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.vm-pchip.on .ic { color: #fff; }
.vm-pchip i { font-style: normal; font-size: 11px; font-weight: 800; padding: 0 6px; border-radius: 999px; background: var(--navy-50); color: var(--navy-500); }
.vm-pchip.focus:not(.mapped) i { background: #fdecec; color: #be3455; }
.vm-pchip.on i { background: rgba(255, 255, 255, .25); color: #fff; }
.bt-cols-head { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 54px; margin: 20px 0 8px; padding: 0 24px; font-weight: 800; font-size: 13px; }
.bt-cols-head span { display: flex; align-items: center; gap: 6px; }
.bt-cols-head span:first-child { color: var(--navy-500); } .bt-cols-head span:last-child { color: #3a6fd8; }
.bt-row { padding: 16px 18px; margin-bottom: 12px; border-inline-start: 5px solid var(--h); animation: fadeUp .35s ease; }
.bt-row.done { box-shadow: 0 0 0 2px color-mix(in srgb, var(--teal) 30%, transparent), var(--shadow); }
.bt-row.new { animation: popIn .45s ease; }
.bt-cap { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.bt-cap b { font-size: 15px; color: var(--navy); }
.bt-star { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #f5b942, #e2a03a); }
.bt-star .ic { fill: currentColor; }
.bt-mat { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--navy-500); background: var(--navy-50); padding: 2px 10px; border-radius: 999px; }
[dir="rtl"] .bt-mat .ic, [dir="rtl"] .bt-arrow .ic { transform: scaleX(-1); }
.bt-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: stretch; }
.bt-side textarea { height: 100%; min-height: 96px; font-size: 13.5px; line-height: 1.6; }
.bt-side.today textarea { background: #f4f6fb; border-color: #dfe4ef; }
.bt-side.tomorrow textarea { background: linear-gradient(160deg, #f1f6ff, #f5f0ff); border-color: #c9d8f5; }
.bt-side.ok textarea { border-color: var(--teal); }
.bt-arrow { display: grid; place-items: center; color: #3a6fd8; }
@media (max-width: 900px) { .vm-def { grid-template-columns: minmax(0, 1fr); } .bt-pair { grid-template-columns: minmax(0, 1fr); } .bt-arrow { transform: rotate(90deg); } .bt-cols-head { display: none; } }
@media (max-width: 720px) { .vstream, .bt { padding: 14px 12px 40px; } }

/* ---- Phase B · Gap analysis ---- */
.gp, .rm { max-width: 1480px; margin: 0 auto; padding: 16px 28px 50px; }
.count-pill { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--navy-50); color: var(--navy-500); font-size: 12px; font-weight: 800; }
.gp-stack { display: flex; height: 10px; border-radius: 999px; overflow: hidden; margin-top: 12px; max-width: 520px; background: var(--navy-50); gap: 2px; }
.gp-stack span { background: var(--c); transition: flex .5s ease; min-width: 0; }
.gp-stack span.empty { background: var(--navy-50); }
.gp-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--navy-500); align-items: center; }
.gp-legend span { display: inline-flex; align-items: center; gap: 5px; }
.gp-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.gp-legend b { color: var(--navy); }
.gp-tray { margin-top: 18px; padding: 16px 20px; border: 2px dashed #f0b4b4; background: #fffafa; }
.gp-tray.clear { border-style: solid; border-color: var(--teal); background: linear-gradient(135deg, #fff, var(--teal-100)); }
.gp-tray h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.gp-tray.clear h2 { color: var(--teal-600); }
.gp-tray-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; margin-top: 12px; }
.gp-todo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); animation: fadeUp .35s ease; }
.gp-todo b { font-size: 14px; color: var(--navy); }
.gp-sugg { font-size: 11.5px; font-weight: 800; color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); padding: 2px 9px; border-radius: 999px; margin-inline-start: auto; }
.gp-todo .gp-types { width: 100%; }
.gp-todo .gp-tbtn { flex: 1; width: auto; gap: 4px; font-size: 11.5px; font-weight: 700; }
.gp-todo .gp-tbtn.sugg { box-shadow: 0 0 0 2px var(--c); animation: pulseRing 1.8s ease infinite; }
.gp-mat { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: var(--navy-500); background: var(--navy-50); padding: 2px 9px; border-radius: 999px; width: fit-content; }
[dir="rtl"] .gp-mat .ic, [dir="rtl"] .rm-pkg-tools .ic, [dir="rtl"] .ad-bt .arr .ic { transform: scaleX(-1); }
.bt-star.sm { width: 20px; height: 20px; border-radius: 6px; }
.gp-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; align-items: start; }
.gp-lane { border-radius: 18px; background: color-mix(in srgb, var(--c) 5%, #fff); border: 1px solid color-mix(in srgb, var(--c) 22%, #fff); padding: 12px; animation: fadeUp .4s ease both; animation-delay: var(--d); }
.gp-lane header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.gp-lane header b { display: block; color: var(--c); font-size: 15px; }
.gp-lane header small { color: var(--muted); font-size: 11.5px; }
.gp-lane-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: var(--c); flex-shrink: 0; box-shadow: 0 6px 14px -6px var(--c); }
.gp-lane-n { margin-inline-start: auto; font-size: 20px; font-weight: 800; color: var(--c); }
.gp-lane-body { display: flex; flex-direction: column; gap: 8px; min-height: 70px; }
.gp-empty { margin: auto; font-size: 12px; color: var(--muted); }
.gp-card { display: flex; flex-direction: column; gap: 7px; padding: 11px; border-radius: 14px; background: #fff; border: 1px solid var(--line); border-inline-start: 4px solid var(--c); box-shadow: var(--shadow-sm); animation: fadeUp .3s ease; }
.gp-card.new { animation: popIn .45s ease; }
.gp-card.ok { box-shadow: 0 0 0 2px color-mix(in srgb, var(--teal) 25%, transparent), var(--shadow-sm); }
.gp-card-top { display: flex; align-items: center; gap: 6px; }
.gp-card-top b { font-size: 13.5px; color: var(--navy); flex: 1; line-height: 1.35; }
.gp-card textarea { font-size: 12.5px; line-height: 1.55; min-height: 58px; }
.gp-card.ok textarea { border-color: var(--teal); }
.gp-note { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--teal-600); margin: 0; }
.gp-types { display: flex; gap: 4px; }
.gp-tbtn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 28px; border-radius: 9px; border: 1.5px solid color-mix(in srgb, var(--c) 35%, #fff); background: #fff; color: var(--c); cursor: pointer; transition: all .15s; font: inherit; }
.gp-tbtn:hover { background: color-mix(in srgb, var(--c) 10%, #fff); transform: translateY(-1px); }
.gp-tbtn.on { background: var(--c); border-color: var(--c); color: #fff; cursor: default; }
.gp-addf { display: flex; gap: 6px; margin-top: 10px; }
.gp-addf input { flex: 1; font-size: 13px; padding: 8px 10px; }
@keyframes pulseRing { 0%, 100% { box-shadow: 0 0 0 2px var(--c); } 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 30%, transparent); } }
@media (max-width: 1200px) { .gp-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .gp-board { grid-template-columns: minmax(0, 1fr); } .gp, .rm { padding: 14px 12px 40px; } .gp-tray-list { grid-template-columns: minmax(0, 1fr); } }

/* ---- Phase B · Roadmap ---- */
.rm-time { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; align-items: start; }
.rm-axis { position: absolute; inset-inline: 10px; top: 27px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, #d62f8f, #6d4ae0, #1d3f8f); opacity: .35; }
[dir="rtl"] .rm-axis { background: linear-gradient(-90deg, #d62f8f, #6d4ae0, #1d3f8f); }
.rm-col { position: relative; animation: fadeUp .4s ease both; animation-delay: var(--d); }
.rm-col-head { display: flex; align-items: center; gap: 10px; padding: 8px 14px; margin-bottom: 12px; border-radius: 16px; background: #fff; border: 1.5px solid color-mix(in srgb, var(--c) 30%, #fff); box-shadow: var(--shadow-sm); }
.rm-col-head b { display: block; font-size: 16px; color: var(--c); }
.rm-col-head small { font-size: 11.5px; color: var(--muted); }
.rm-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 18%, transparent); flex-shrink: 0; }
.rm-col-n { margin-inline-start: auto; font-size: 20px; font-weight: 800; color: var(--c); }
.rm-col-body { display: flex; flex-direction: column; gap: 10px; min-height: 90px; padding: 10px; border-radius: 18px; background: color-mix(in srgb, var(--c) 5%, #fff); border: 1.5px dashed color-mix(in srgb, var(--c) 25%, #fff); }
.rm-empty { margin: auto; font-size: 12.5px; color: var(--muted); }
.rm-pkg { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--c); box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .15s, box-shadow .15s; animation: fadeUp .35s ease both; animation-delay: var(--d); }
.rm-pkg:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.rm-pkg.sel { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 45%, transparent), var(--shadow); }
.rm-pkg.new { animation: popIn .45s ease; }
.rm-pkg.unnamed .rm-name { border-color: #f0b4b4; background: #fffafa; }
.rm-pkg-top { display: flex; align-items: center; gap: 6px; }
.rm-pkg-n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: #fff; background: var(--c); flex-shrink: 0; }
.rm-name { flex: 1; min-width: 0; font-weight: 700; font-size: 13.5px; padding: 6px 8px; border: 1px solid transparent; background: transparent; color: var(--navy); }
.rm-name:hover, .rm-name:focus { border-color: var(--line); background: #fff; }
.rm-gchips { display: flex; flex-wrap: wrap; gap: 4px; }
.rm-gchip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 8px; color: var(--c); background: color-mix(in srgb, var(--c) 9%, #fff); animation: popIn .3s ease; }
.rm-nogap { font-size: 11.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.rm-pkg-tools { display: flex; align-items: center; gap: 4px; }
.rm-gn { margin-inline-start: auto; font-size: 11.5px; font-weight: 700; color: var(--navy-500); }
.rm-addf { display: flex; gap: 6px; margin-top: 10px; }
.rm-addf input { flex: 1; font-size: 13px; padding: 8px 10px; }
.rm-pool-card { margin-top: 18px; padding: 18px 22px; transition: box-shadow .2s; }
.rm-pool-card.active { box-shadow: 0 0 0 2px #6d4ae0, var(--shadow); }
.rm-pool-card h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.rm-pool { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rm-pchip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; border: 1.5px solid color-mix(in srgb, var(--c) 40%, #fff); background: #fff; font: inherit; font-weight: 600; font-size: 13px; color: var(--navy-700); cursor: pointer; transition: all .15s; }
.rm-pchip:disabled { cursor: default; }
.rm-pchip:not(.used) { border-style: dashed; background: #fffafa; }
.rm-pchip .ic { color: var(--c); }
.rm-pchip i { font-style: normal; font-size: 11px; font-weight: 800; padding: 0 6px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); }
.rm-pool-card.active .rm-pchip:hover { transform: translateY(-2px); border-color: var(--c); }
.rm-pchip.on { background: var(--c); border-color: var(--c); color: #fff; border-style: solid; }
.rm-pchip.on .ic, .rm-pchip.on i { color: #fff; background: rgba(255, 255, 255, .2); }
@media (max-width: 1000px) { .rm-time { grid-template-columns: minmax(0, 1fr); } .rm-axis { display: none; } }

/* ---- Phase B gate · Architecture Definition Document ---- */
.ad-sub { font-size: 14px; font-weight: 600; opacity: .85; margin-inline-start: 6px; }
.ad-chevs { display: flex; flex-wrap: wrap; gap: 0; margin-top: 8px; }
.ad-chevs span { padding: 8px 22px 8px 18px; margin-inline-end: -6px; font-size: 12px; font-weight: 700; color: #fff; background: hsl(calc(180 - var(--i) * 18) 70% 36%); clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); }
[dir="rtl"] .ad-chevs span { padding: 8px 18px 8px 22px; clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 50%, 100% 100%, 10px 100%, 0 50%); }
.ad-bt { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ad-bt th, .ad-bt td { padding: 7px 6px; border-top: 1px solid var(--navy-100); vertical-align: top; text-align: start; }
.ad-bt th { width: 22%; color: var(--navy); }
.ad-bt th small { display: block; font-weight: 600; color: var(--muted); }
.ad-bt td { color: #3a4563; }
.ad-bt td.arr { width: 20px; color: #3a6fd8; }
.ad-gaps, .ad-road { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ad-road { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ad-gcol, .ad-hcol { padding: 8px 10px; border-radius: 10px; background: #fff; border-top: 3px solid var(--c); }
.ad-gcol b, .ad-hcol b { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--c); margin-bottom: 4px; }
.ad-gcol b i { font-style: normal; margin-inline-start: auto; }
.ad-hcol small { color: var(--muted); font-weight: 600; }
.ad-lbl { display: block; font-size: 12.5px; font-weight: 800; color: var(--navy-500); margin-bottom: 6px; }
.ad-people { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ad-person { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.ad-person:has(input:checked) { border-color: var(--teal); background: var(--teal-100); color: var(--teal-600); }
.ad-person input { accent-color: var(--teal); }
.ad-fb { margin-top: 8px !important; font-style: italic; color: var(--navy-500); }
@media (max-width: 760px) { .ad-gaps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ad-road { grid-template-columns: minmax(0, 1fr); } }
.rm-name { resize: none; line-height: 1.4; font-family: inherit; overflow: hidden; }
.rm-pkg-top { align-items: flex-start; }
.ad-person { flex: 0 0 auto; max-width: 100%; line-height: 1.4; }
.ad-person input { width: 16px; height: 16px; padding: 0; margin: 0; flex-shrink: 0; border-radius: 4px; box-shadow: none; }
.ad-person span { white-space: normal; }

/* ---- Phase C · shared ---- */
.de, .ap { max-width: 1480px; margin: 0 auto; padding: 16px 28px 50px; }
.phase-c .ph-badge, .phase-c .drawer-badge.sm { background: linear-gradient(135deg, #3a6fd8, #1d3f8f); box-shadow: 0 0 0 8px rgba(58, 111, 216, .14); }
.phase-c .prelim-head { background: radial-gradient(circle at 100% 0%, #e7eefc, transparent 50%), #fff; }

/* ---- Phase C · Data entities ---- */
.de-card { margin-top: 18px; padding: 18px 20px; }
.de-legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin-bottom: 12px; font-size: 12.5px; font-weight: 600; color: var(--navy-500); }
.de-leg { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.de-leg span { display: inline-flex; align-items: center; gap: 6px; }
.de-leg i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.de-scroll { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); }
.de-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.de-table th, .de-table td { padding: 6px 6px; border-bottom: 1px solid var(--navy-100); text-align: center; vertical-align: middle; background: #fff; }
.de-table thead th { background: #f6f8fc; font-size: 12px; color: var(--navy-500); font-weight: 800; position: sticky; top: 0; }
.de-h-name, .de-name { text-align: start !important; min-width: 210px; position: sticky; inset-inline-start: 0; z-index: 1; }
.de-h-owner { min-width: 170px; } .de-h-cls { min-width: 96px; }
.de-cap { min-width: 84px; max-width: 110px; vertical-align: bottom !important; }
.de-cap-in { display: flex; align-items: flex-start; justify-content: center; gap: 3px; line-height: 1.3; font-size: 11.5px; color: var(--navy-700); }
.de-cap-in .ic { color: #e2a03a; fill: currentColor; flex-shrink: 0; margin-top: 2px; }
.de-cap small { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }
.de-cap.focus { background: #fffaf0 !important; }
.de-cap.missing { box-shadow: inset 0 -3px 0 #d64545; }
.de-td.focus { background: #fffdf7; }
.de-name-in { display: flex; align-items: center; gap: 6px; }
.de-ok { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; flex-shrink: 0; color: #fff; background: #b8c0d3; }
tr.ok .de-ok { background: var(--teal); }
.de-table input { padding: 7px 9px; font-size: 13px; border-radius: 9px; background: transparent; border-color: transparent; }
.de-table input:hover, .de-table input:focus { border-color: var(--line); background: #fff; }
.de-name input { font-weight: 700; color: var(--navy); }
tr.new td, tr.new th { animation: rowFlash 1.2s ease; }
.de-cell { width: 34px; height: 30px; border-radius: 9px; border: 1.5px dashed #d3d9e6; background: #fff; font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; transition: transform .12s; color: #fff; }
.de-cell:hover { transform: scale(1.08); border-color: var(--navy-300); }
.de-cell.c-C { background: #d62f8f; border: 0; } .de-cell.c-R { background: #3a6fd8; border: 0; }
.de-cell.c-U { background: #e2a03a; border: 0; } .de-cell.c-D { background: #6b7489; border: 0; }
.de-leg .de-cell { width: 22px; height: 22px; display: inline-grid; place-items: center; font-size: 11px; cursor: default; border-radius: 6px; }
.de-cell.pop { animation: popIn .3s ease; }
.de-cls { padding: 5px 10px; border-radius: 999px; border: 1.5px solid var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); color: var(--c); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.de-cls.unset { border-style: dashed; }
.de-warn { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #fdecec; color: #d64545; font-weight: 800; font-size: 12px; margin-inline-end: 4px; }
.de-empty { padding: 26px !important; color: var(--muted); }
.de-addf { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.de-addf input { flex: 1 1 180px; }
.de-add-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: #0e8585; }

/* ---- Phase C · Application portfolio ---- */
.ap-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; margin-top: 18px; }
.ap-quad-card, .ap-cov-card { padding: 16px 18px; }
.ap-quad-card h2, .ap-cov-card h2, .ap-block h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 8px; }
.ap-quad { width: 100%; max-width: 520px; display: block; margin: 0 auto; direction: ltr; }
.ap-qlabel { font-size: 13px; font-weight: 800; }
.ap-axis { stroke: #b8c0d3; stroke-width: 1.5; }
.ap-tick { font-size: 11px; fill: var(--muted); text-anchor: middle; }
.ap-axl { font-size: 12px; font-weight: 700; fill: var(--navy-500); text-anchor: middle; }
.ap-dot { cursor: pointer; }
.ap-dot circle { fill: var(--c); stroke: #fff; stroke-width: 2.5; filter: drop-shadow(0 3px 5px rgba(15, 31, 69, .25)); transition: r .15s; }
.ap-dot:hover circle { r: 12; }
.ap-dot.new circle { animation: popIn .5s ease; transform-box: fill-box; transform-origin: center; }
.ap-cov { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ap-cov li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 9px 11px; border-radius: 12px; background: #f6f8fc; border: 1px solid var(--navy-100); }
.ap-cov li.gap { background: #fffafa; border-color: #f3c4c4; }
.ap-cov li b { font-size: 13.5px; color: var(--navy); }
.ap-cov-ic { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--teal); }
.ap-cov li.gap .ap-cov-ic { background: #d64545; }
.ap-cov-apps { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; }
.ap-cov-apps i { font-style: normal; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 8px; color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); }
.ap-cov-apps small { color: #be3455; font-weight: 600; }
.ap-block { margin-top: 18px; padding: 18px 20px; }
.ap-block.new { background: linear-gradient(160deg, #fff, #f6f2ff); }
.ap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.ap-empty { margin: 4px 0; }
.ap-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--c); box-shadow: var(--shadow-sm); animation: fadeUp .3s ease; }
.ap-card.new { animation: popIn .45s ease; }
.ap-card.flash { animation: glowNew 1.2s ease; }
.ap-card.nomap { border-color: #f3c4c4; border-top-color: var(--c); }
.ap-card-top { display: flex; align-items: center; gap: 6px; }
.ap-card-top .icon-btn { margin-inline-start: auto; }
.ap-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; color: #fff; background: var(--c); padding: 3px 10px; border-radius: 999px; }
.ap-name { font-weight: 700; color: var(--navy); padding: 7px 9px; }
.ap-scores { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; }
.ap-scores label { font-size: 12px; font-weight: 700; color: var(--navy-500); }
.ap-seg { display: flex; gap: 3px; direction: ltr; }
.ap-seg button { flex: 1; height: 26px; border-radius: 7px; border: 1.5px solid var(--navy-100); background: #fff; font: inherit; font-size: 12px; font-weight: 700; color: var(--navy-500); cursor: pointer; }
.ap-seg button.fill { background: color-mix(in srgb, var(--c) 18%, #fff); border-color: color-mix(in srgb, var(--c) 40%, #fff); }
.ap-seg button.on { background: var(--c); border-color: var(--c); color: #fff; }
.ap-caps { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ap-sup { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.ap-chip { display: inline-flex; align-items: center; gap: 3px; font: inherit; font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 8px; border: 1px solid var(--navy-100); background: #f8f9fc; color: var(--navy-500); cursor: pointer; }
.ap-chip .ic { color: #e2a03a; fill: currentColor; }
.ap-chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.ap-warn { color: #be3455; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.ap-addf { display: flex; gap: 8px; margin-top: 12px; }
.ap-addf input { flex: 1; }
@media (max-width: 1000px) { .ap-top { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .de, .ap { padding: 14px 12px 40px; } .ap-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---- Cumulative Architecture Definition Document ---- */
.ad-toc { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 6px 0 14px; }
.ad-toc-i { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--navy-100); background: #fff; text-decoration: none; color: var(--navy); position: relative; }
.ad-toc-i span { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 800; font-size: 12px; }
.ad-toc-i b { font-size: 13px; line-height: 1.3; }
.ad-toc-i small { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.ad-toc-i.st-approved small { color: var(--teal-600); }
.ad-toc-i.st-current small { color: var(--c); }
.ad-toc-i.st-pending { opacity: .6; }
.ad-toc-i.focus { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); }
.ad-part { margin-top: 14px; padding: 14px; border-radius: 18px; border: 1px solid var(--navy-100); background: #fbfcfe; scroll-margin-top: 12px; }
.ad-part.focus { border: 2px solid var(--c); background: #fff; }
.ad-part.st-pending { border-style: dashed; }
.ad-part > header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ad-part-n { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 800; }
.ad-part h3 { display: flex; align-items: center; gap: 6px; font-size: 17px; color: var(--navy); margin: 0; }
.ad-part h3 .ic { color: var(--c); }
.ad-part-st { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--navy-50); color: var(--navy-500); }
.ad-part.st-approved .ad-part-st { background: var(--teal-100); color: var(--teal-600); }
.ad-part.st-current .ad-part-st { background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); }
.ad-pending { margin: 10px 0 0 !important; }
.ad-cls { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); }
.ad-ent th { width: 28%; }
.ad-apps { margin: 0; padding-inline-start: 18px; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
@media (max-width: 760px) { .ad-toc { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- Phase C · Integration ---- */
.in, .ig { max-width: 1480px; margin: 0 auto; padding: 16px 28px 50px; }
.in-layout { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr); gap: 16px; margin-top: 18px; align-items: start; }
.in-map-card { padding: 14px 16px; }
.in-hint { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--navy-500); margin-bottom: 6px; }
.in-map { position: relative; aspect-ratio: 1000 / 600; direction: ltr; background: radial-gradient(circle at 50% 50%, #f4f1ff, #fff 70%); border-radius: 16px; border: 1px solid var(--navy-100); }
.in-map .f-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.in-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.in-flow { cursor: pointer; }
.in-flow .hit { fill: none; stroke: transparent; stroke-width: 18; }
.in-flow .ln { fill: none; stroke: var(--c); stroke-width: 3; transition: stroke-width .15s; }
.in-flow:hover .ln, .in-flow.sel .ln { stroke-width: 5; }
.in-flow.new .ln { animation: drawIn .8s ease; stroke-dashoffset: 0; }
.in-flow circle { fill: #fff; stroke: var(--c); stroke-width: 2; }
.in-flow text { font-size: 13px; font-weight: 800; fill: var(--c); text-anchor: middle; }
.in-flow.empty circle { fill: #fdecec; stroke: #d64545; } .in-flow.empty text { fill: #d64545; }
.in-flow.sel circle { fill: var(--c); } .in-flow.sel text { fill: #fff; }
@keyframes drawIn { from { opacity: 0; } }
.in-node { position: absolute; transform: translate(-50%, -50%); width: 15.5%; min-height: 50px; padding: 8px 10px; border-radius: 14px; border: 2px solid var(--c); background: #fff; color: var(--navy); font: inherit; font-size: 12px; font-weight: 700; line-height: 1.3; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; display: flex; align-items: center; justify-content: center; text-align: center; }
.in-node:hover { transform: translate(-50%, -50%) scale(1.05); box-shadow: var(--shadow); }
.in-node.from { background: var(--c); color: #fff; box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 25%, transparent); }
.in-node.iso { border-style: dashed; }
.in-node i { position: absolute; top: -8px; inset-inline-end: -8px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; }
.in-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--navy-500); }
.in-legend span { display: inline-flex; align-items: center; gap: 6px; }
.in-side { padding: 16px 18px; position: sticky; top: 140px; }
.in-side h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 10px; }
.in-side h4 { font-size: 12.5px; color: var(--navy-500); margin: 12px 0 6px; }
.in-route { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: #f4f1ff; }
.in-route b { color: var(--navy); font-size: 13.5px; } .in-route span { color: #6d4ae0; }
[dir="rtl"] .in-route span .ic, [dir="rtl"] .in-list .ic { transform: scaleX(-1); }
.in-row { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.in-modes { display: flex; flex-direction: column; gap: 5px; }
.in-mode { text-align: start; padding: 7px 11px; border-radius: 10px; border: 1.5px solid color-mix(in srgb, var(--c) 35%, #fff); background: #fff; color: var(--c); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.in-mode.on { background: var(--c); border-color: var(--c); color: #fff; }
.in-ents { display: flex; flex-wrap: wrap; gap: 5px; }
.in-ent { display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px; border-radius: 9px; border: 1px solid var(--navy-100); background: #f8f9fc; color: var(--navy-500); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.in-ent i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.in-ent.on { background: #0e8585; border-color: #0e8585; color: #fff; }
.in-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 520px; overflow: auto; }
.in-list li { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--navy-100); border-inline-start: 4px solid var(--c); cursor: pointer; font-size: 12.5px; }
.in-list li:hover { background: #f8f9fc; }
.in-list li.empty { border-color: #f3c4c4; border-inline-start-color: #d64545; }
.in-list li b { color: var(--navy); } .in-list li small { display: block; color: var(--muted); margin-top: 2px; }
@media (max-width: 1100px) { .in-layout { grid-template-columns: minmax(0, 1fr); } .in-side { position: static; } .in-node { font-size: 10.5px; padding: 5px 6px; min-height: 40px; } }
@media (max-width: 720px) { .in, .ig { padding: 14px 12px 40px; } .in-node { font-size: 9.5px; width: 19%; } }

/* ---- Phase C · IS gaps ---- */
.ig-reg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; align-items: start; }
.ig-col { padding: 16px 18px; }
.ig-col h2, .ig-road-card h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 10px; }
.ig-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ig-gap { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 10px; font-size: 12.5px; color: var(--navy-700); background: color-mix(in srgb, var(--c) 8%, #fff); border: 1.5px dashed color-mix(in srgb, var(--c) 45%, #fff); }
.ig-gap > .ic:first-child { color: var(--c); } .ig-gap b { color: var(--c); }
.ig-gap.used { border-style: solid; }
.ig-gap.used > .ic:last-child { color: var(--teal); }
.ig-dlist { display: flex; flex-direction: column; gap: 8px; }
.ig-dg { display: flex; align-items: flex-start; gap: 8px; padding: 8px; border-radius: 12px; background: #fffaf0; border: 1px solid #f2dfb6; animation: fadeUp .3s ease; }
.ig-dg.new { animation: popIn .45s ease; }
.ig-dg.used { background: #f2fbf9; border-color: #bfe6e1; }
.ig-dg-ic { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; color: #fff; background: #e2a03a; flex-shrink: 0; margin-top: 4px; }
.ig-dg.used .ig-dg-ic { background: var(--teal); }
.ig-dg-in { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.ig-dg input { padding: 6px 9px; font-size: 13px; font-weight: 700; }
.ig-dg input.sub { font-weight: 500; font-size: 12.5px; }
.ig-road-card { margin-top: 18px; padding: 18px 20px; }
.ig-road-card .rm-time { margin-top: 6px; }
.ig-bpkg { padding: 7px 10px; border-radius: 10px; border: 1px dashed #c9d2e8; background: rgba(255, 255, 255, .6); font-size: 12px; color: var(--navy-500); }
.ig-bpkg small { display: block; font-size: 10.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 900px) { .ig-reg { grid-template-columns: minmax(0, 1fr); } }

/* ---- Phase D ---- */
.pl, .ho { max-width: 1480px; margin: 0 auto; padding: 16px 28px 50px; }
.phase-d .ph-badge, .phase-d .drawer-badge.sm { background: linear-gradient(135deg, #1d3f8f, #0f1f45); box-shadow: 0 0 0 8px rgba(29, 63, 143, .14); }
.phase-d .prelim-head { background: radial-gradient(circle at 100% 0%, #e4e9f6, transparent 50%), #fff; }
.pl-card { margin-top: 18px; padding: 18px 20px; }
.pl-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.pl-views { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--navy-50); gap: 2px; }
.pl-views button { padding: 8px 18px; border-radius: 10px; border: 0; background: transparent; font: inherit; font-weight: 700; font-size: 13.5px; color: var(--navy-500); cursor: pointer; transition: all .2s; }
.pl-views button.on { background: #fff; color: var(--navy); box-shadow: var(--shadow-sm); }
.pl-legend { display: flex; gap: 14px; font-size: 12.5px; font-weight: 700; }
.pl-legend span { display: inline-flex; align-items: center; gap: 5px; color: var(--c); }
.pl-stack { display: flex; flex-direction: column; gap: 8px; }
.pl-layer { display: grid; grid-template-columns: 250px 1fr; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 16px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 9%, #fff), #fff 60%); border: 1px solid color-mix(in srgb, var(--c) 22%, #fff); border-inline-start: 5px solid var(--c); animation: fadeUp .4s ease both; animation-delay: var(--d); }
[dir="rtl"] .pl-layer { background: linear-gradient(-90deg, color-mix(in srgb, var(--c) 9%, #fff), #fff 60%); }
.pl-layer.missing { border-color: #f0b4b4; border-inline-start-color: var(--c); }
.pl-layer header { display: flex; align-items: center; gap: 10px; }
.pl-layer header b { display: block; color: var(--navy); font-size: 14px; }
.pl-layer header small { color: var(--muted); font-size: 11.5px; }
.pl-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: var(--c); flex-shrink: 0; }
.pl-miss { margin-inline-start: auto; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #fdecec; color: #d64545; font-weight: 800; }
.pl-comps { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pl-comp { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 6px; border-radius: 11px; background: #fff; border: 1.5px solid color-mix(in srgb, var(--s) 45%, #fff); font-size: 12.5px; animation: popIn .35s ease; transition: opacity .3s, transform .3s; }
.pl-comp b { color: var(--navy); font-weight: 600; }
.pl-comp.st-retire b { text-decoration: line-through; text-decoration-color: #d64545; color: var(--navy-500); }
.pl-comp.st-new { background: color-mix(in srgb, var(--s) 7%, #fff); }
.view-target .pl-comp.st-new { box-shadow: 0 0 0 3px color-mix(in srgb, var(--s) 15%, transparent); }
.view-baseline .pl-comp.st-retire b { text-decoration: none; color: var(--navy); }
.pl-st { width: 22px; height: 22px; border-radius: 7px; border: 0; display: grid; place-items: center; color: #fff; background: var(--s); cursor: pointer; }
.pl-x { width: 18px; height: 18px; border-radius: 50%; border: 0; display: grid; place-items: center; background: transparent; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .15s; }
.pl-comp:hover .pl-x { opacity: 1; } .pl-x:hover { background: #fdecec; color: #d64545; }
.pl-empty { font-size: 12px; color: var(--muted); }
.pl-addf { display: inline-flex; align-items: center; gap: 4px; }
.pl-addf input { width: 200px; padding: 6px 10px; font-size: 12.5px; border-style: dashed; background: transparent; }
@media (max-width: 900px) { .pl-layer { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .pl, .ho { padding: 14px 12px 40px; } }
.ho-zones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; align-items: start; }
.ho-zpick { display: flex; gap: 4px; width: 100%; flex-wrap: wrap; }
.ho-zpick .gp-tbtn { flex: 1; width: auto; gap: 4px; font-size: 11.5px; font-weight: 700; min-width: 0; }
.ho-zpick .gp-tbtn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ho-kind { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 800; color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); padding: 2px 8px; border-radius: 999px; width: fit-content; }
.ho-card { display: flex; flex-direction: column; gap: 7px; padding: 11px; border-radius: 14px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--t); box-shadow: var(--shadow-sm); animation: fadeUp .3s ease; }
.ho-card.new { animation: popIn .45s ease; }
.ho-card.notier { border-top-style: dashed; }
.ho-top { display: flex; align-items: center; gap: 6px; }
.ho-top b { font-size: 13.5px; color: var(--navy); flex: 1; line-height: 1.35; }
.ho-medal { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--t); box-shadow: 0 3px 8px -3px var(--t); }
.ho-tiers { display: flex; gap: 4px; }
.ho-tier { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 3px; padding: 5px 4px; border-radius: 9px; border: 1.5px solid color-mix(in srgb, var(--c) 40%, #fff); background: #fff; color: var(--c); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.ho-tier.on { background: var(--c); border-color: var(--c); color: #fff; }
.ho-zbtns { display: flex; gap: 3px; padding-top: 6px; border-top: 1px dashed var(--navy-100); }
.ho-zbtn { flex: 1; height: 26px; border-radius: 8px; border: 1px solid var(--navy-100); background: #f8f9fc; color: var(--c); display: grid; place-items: center; cursor: pointer; }
.ho-zbtn.on { background: var(--c); border-color: var(--c); color: #fff; cursor: default; }
@media (max-width: 1200px) { .ho-zones { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .ho-zones { grid-template-columns: minmax(0, 1fr); } }
.ad-stack { display: flex; flex-direction: column; gap: 5px; }
.ad-lyr { display: grid; grid-template-columns: 170px 1fr; gap: 8px; padding: 6px 10px; border-radius: 10px; background: #fff; border-inline-start: 4px solid var(--c); font-size: 12.5px; }
.ad-lyr b { color: var(--c); }
.ad-lyr span { display: flex; flex-wrap: wrap; gap: 4px; }
.ad-lyr i { font-style: normal; padding: 1px 7px; border-radius: 7px; background: color-mix(in srgb, var(--s) 10%, #fff); color: var(--navy-700); }
.ad-lyr i.st-retire { text-decoration: line-through; color: var(--muted); }
@media (max-width: 760px) { .ad-lyr { grid-template-columns: minmax(0, 1fr); } }

/* ---- Phase D · Standards radar ---- */
.st, .tg { max-width: 1480px; margin: 0 auto; padding: 16px 28px 50px; }
.st-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; margin-top: 18px; align-items: start; }
.st-radar-card, .st-list-card { padding: 16px 18px; }
.st-radar-card h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.st-svg { width: 100%; display: block; direction: ltr; }
.st-ring { fill: none; stroke: var(--c); stroke-opacity: .45; stroke-width: 1.5; }
.st-spoke { stroke: #c9d2e8; stroke-width: 1; stroke-dasharray: 3 4; }
.st-sector { font-size: 16px; font-weight: 800; }
.st-rlabel { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.st-dot { cursor: pointer; }
.st-dot circle { fill: var(--c); stroke: #fff; stroke-width: 2.5; filter: drop-shadow(0 2px 4px rgba(15, 31, 69, .3)); transition: r .15s; }
.st-dot:hover circle, .st-dot.focus circle { r: 12; }
.st-dot.focus circle { stroke: var(--navy); }
.st-dot.new circle { animation: popIn .5s ease; transform-box: fill-box; transform-origin: center; }
.st-addf { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.st-addf input { flex: 1 1 180px; } .st-addf select { flex: 0 1 190px; font: inherit; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--line); background: #fbfcfe; }
.st-group { margin-bottom: 12px; }
.st-group h3 { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--c); margin: 0 0 6px; }
.st-group h3 small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.st-group h3 i { margin-inline-start: auto; font-style: normal; font-size: 13px; }
.st-rdot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.st-item { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; margin-bottom: 5px; border-radius: 11px; background: #fff; border: 1px solid var(--navy-100); border-inline-start: 4px solid var(--c); cursor: pointer; animation: fadeUp .3s ease; }
.st-item.new { animation: popIn .45s ease; }
.st-item.focus { box-shadow: 0 0 0 2px var(--c); }
.st-item b { font-size: 13px; color: var(--navy); flex: 1 1 160px; }
.st-ltag { font-size: 11px; font-weight: 700; color: var(--l); background: color-mix(in srgb, var(--l) 10%, #fff); padding: 2px 8px; border-radius: 999px; }
.st-rings { display: flex; gap: 2px; }
.st-rings button { padding: 3px 7px; border-radius: 7px; border: 1px solid color-mix(in srgb, var(--c) 35%, #fff); background: #fff; color: var(--c); font: inherit; font-size: 10.5px; font-weight: 800; cursor: pointer; }
.st-rings button.on { background: var(--c); color: #fff; cursor: default; }
.st-empty { font-size: 12px; color: var(--muted); margin: 0 0 6px; }
@media (max-width: 1050px) { .st-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .st, .tg { padding: 14px 12px 40px; } }
/* ---- Phase D · Technology gaps ---- */
.tg-reg { margin-top: 18px; }
.tg-layers { display: flex; flex-direction: column; gap: 8px; }
.tg-lrow { display: grid; grid-template-columns: 200px 1fr; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 12px; border-inline-start: 4px solid var(--l); background: #fbfcfe; }
.tg-lrow > b { font-size: 13px; color: var(--l); }
@media (max-width: 800px) { .tg-lrow { grid-template-columns: minmax(0, 1fr); } }
.ad-ph { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; font-size: 10.5px; font-weight: 800; color: #fff; background: #0b8f8f; }
.ad-ph.ph-C { background: #3a6fd8; } .ad-ph.ph-D { background: #1d3f8f; }

/* ---- Phase E ---- */
.dp, .op { max-width: 1480px; margin: 0 auto; padding: 16px 28px 50px; }
.phase-e .ph-badge, .phase-e .drawer-badge.sm { background: linear-gradient(135deg, #6d4ae0, #3a2399); box-shadow: 0 0 0 8px rgba(109, 74, 224, .14); }
.phase-e .prelim-head { background: radial-gradient(circle at 100% 0%, #efe9ff, transparent 50%), #fff; }
.dp-map { position: relative; direction: ltr; background: radial-gradient(circle at 50% 30%, #f6f2ff, #fff 70%); border-radius: 16px; border: 1px solid var(--navy-100); min-height: 260px; }
.dp-map .f-empty { padding: 40px; text-align: center; }
.dp-col { font-size: 15px; font-weight: 800; text-anchor: middle; }
.dp-arrow { fill: none; stroke: #6d4ae0; stroke-width: 2.5; stroke-opacity: .75; }
.dp-arrow.bad { stroke: #d64545; stroke-width: 3; stroke-dasharray: 6 4; stroke-opacity: 1; }
.dp-arrow.new { animation: drawIn .8s ease; }
.dp-node { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 6px; min-height: 48px; padding: 6px 10px; border-radius: 12px; border: 2px solid var(--c); background: #fff; font: inherit; font-size: 11.5px; font-weight: 700; color: var(--navy); text-align: start; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.dp-node:hover { transform: translate(-50%, -50%) scale(1.03); box-shadow: var(--shadow); }
.dp-node.from { background: var(--c); color: #fff; box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 25%, transparent); }
.dp-node.from .ad-ph { background: #fff; color: var(--c); }
.dp-node.iso { border-style: dashed; }
.dp-node.new { animation: popIn .45s ease; }
.dp-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
[dir="rtl"] .dp-name { direction: rtl; text-align: right; }
.dp-list li { position: relative; display: flex; flex-direction: column; gap: 3px; padding-inline-end: 34px !important; }
.dp-list li small { color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.dp-bad { color: #d64545 !important; font-weight: 700; }
.dp-list .btn { align-self: flex-start; margin-top: 4px; }
.dp-del { position: absolute; top: 6px; inset-inline-end: 6px; }
.op-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; margin-top: 18px; }
.op-legend-card { padding: 16px 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-content: start; }
.op-appr { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: color-mix(in srgb, var(--c) 7%, #fff); border: 1px solid color-mix(in srgb, var(--c) 25%, #fff); }
.op-appr > span { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--c); flex-shrink: 0; }
.op-appr b { display: block; color: var(--c); } .op-appr small { color: var(--muted); font-size: 11.5px; }
.op-appr i { margin-inline-start: auto; font-style: normal; font-size: 20px; font-weight: 800; color: var(--c); }
.op-dtext { font-size: 10px; font-weight: 800; fill: #fff; text-anchor: middle; pointer-events: none; }
.op-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; margin-top: 18px; }
.op-card { position: relative; display: flex; flex-direction: column; gap: 9px; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--c); box-shadow: var(--shadow-sm); animation: fadeUp .3s ease; }
.op-card.new { animation: popIn .45s ease; } .op-card.flash { animation: glowNew 1.2s ease; }
.op-card-top { display: flex; align-items: center; gap: 6px; }
.op-card-top b { flex: 1; font-size: 13.5px; color: var(--navy); line-height: 1.35; }
.op-h { font-size: 11px; font-weight: 800; color: var(--h); background: color-mix(in srgb, var(--h) 10%, #fff); padding: 2px 8px; border-radius: 999px; }
.op-apprs { display: flex; gap: 4px; flex-wrap: wrap; }
.op-apprs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 6px 6px; border-radius: 9px; border: 1.5px solid color-mix(in srgb, var(--c) 35%, #fff); background: #fff; color: var(--c); font: inherit; font-size: 11.5px; font-weight: 800; cursor: pointer; }
.op-apprs button.on { background: var(--c); border-color: var(--c); color: #fff; }
.op-q { position: absolute; top: -11px; inset-inline-end: 12px; font-size: 11px; font-weight: 800; color: #fff; background: var(--c); padding: 2px 10px; border-radius: 999px; }
@media (max-width: 1000px) { .op-top { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .dp, .op { padding: 14px 12px 40px; } .op-grid { grid-template-columns: minmax(0, 1fr); } .op-legend-card { grid-template-columns: minmax(0, 1fr); } .dp-node { font-size: 9.5px; padding: 4px 6px; } }

/* ---- Phase E · Transitions ---- */
.tr, .mg { max-width: 1480px; margin: 0 auto; padding: 16px 28px 50px; }
.tr-stairs-card { margin-top: 18px; padding: 20px; overflow-x: auto; }
.tr-stairs { display: grid; grid-template-columns: 150px repeat(3, minmax(250px, 1fr)); gap: 12px; align-items: end; min-width: 900px; }
.tr-base { align-self: end; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px; border-radius: 16px; border: 2px dashed #c9d2e8; color: var(--navy-500); text-align: center; height: 90px; justify-content: center; }
.tr-base span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-50); }
.tr-step { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 18px; background: #fff; border: 1.5px solid color-mix(in srgb, var(--c) 30%, #fff); border-top: 6px solid var(--c); box-shadow: var(--shadow-sm); margin-bottom: calc(var(--i) * 46px); cursor: pointer; transition: box-shadow .2s, transform .2s; animation: fadeUp .45s ease both; animation-delay: calc(var(--i) * 90ms); }
.tr-step:hover { transform: translateY(-2px); }
.tr-step.sel { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 40%, transparent), var(--shadow); }
.tr-step.ok .tr-num { background: var(--teal); }
.tr-step.new { animation: popIn .45s ease; }
.tr-step-top { display: flex; align-items: center; gap: 8px; }
.tr-num { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--c); font-weight: 800; flex-shrink: 0; }
.tr-num .ic { fill: currentColor; }
.tr-step input { font-weight: 800; color: var(--navy); padding: 7px 9px; }
.tr-step textarea { font-size: 12.5px; line-height: 1.55; min-height: 70px; }
.tr-step textarea.ok { border-color: var(--teal); }
.tr-pkgs { display: flex; flex-wrap: wrap; gap: 4px; min-height: 28px; }
.tr-pkg { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 3px 7px 3px 3px; border-radius: 8px; background: color-mix(in srgb, var(--c) 8%, #fff); color: var(--navy-700); animation: popIn .3s ease; }
.tr-pkg.bad { background: #fdecec; box-shadow: inset 0 0 0 1.5px #d64545; }
.rm-pchip .ad-ph { flex-shrink: 0; }
/* ---- Phase E · Roadmap (Gantt) ---- */
.mg-strat { margin-top: 18px; padding: 16px 18px; }
.mg-strat h2, .mg-gantt-card h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 10px; }
.mg-strats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.mg-st { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font: inherit; text-align: start; cursor: pointer; transition: all .15s; }
.mg-st span { color: #1d3f8f; } .mg-st b { color: var(--navy); font-size: 14px; } .mg-st small { color: var(--muted); font-size: 11.5px; }
.mg-st.on { border-color: #1d3f8f; background: linear-gradient(160deg, #eef2fb, #fff); box-shadow: 0 0 0 3px rgba(29, 63, 143, .12); }
.mg-strat textarea.ok { border-color: var(--teal); }
.mg-gantt-card { margin-top: 18px; padding: 16px 18px; }
.mg-scroll { overflow-x: auto; }
.mg-gantt { min-width: 900px; }
.mg-row { display: grid; align-items: center; gap: 0; min-height: 34px; border-bottom: 1px solid var(--navy-50); }
.mg-years b { text-align: center; font-size: 12.5px; color: var(--navy); padding: 4px 0; background: var(--navy-50); border-inline-start: 2px solid #fff; }
.mg-qs i { text-align: center; font-style: normal; font-size: 11px; color: var(--muted); font-weight: 700; border-inline-start: 1px dashed var(--navy-100); }
.mg-miles { min-height: 30px; }
.mg-miles em { justify-self: end; font-style: normal; color: var(--c); font-size: 18px; line-height: 1; display: flex; flex-direction: column; align-items: center; transform: translateX(50%); }
[dir="rtl"] .mg-miles em { transform: translateX(-50%); }
.mg-miles em small { font-size: 10px; font-weight: 800; }
.mg-group { padding: 8px 10px 4px; font-size: 12.5px; font-weight: 800; color: var(--c); border-bottom: 2px solid color-mix(in srgb, var(--c) 30%, #fff); margin-top: 6px; }
.mg-name { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--navy); padding: 4px 8px 4px 0; line-height: 1.3; }
.mg-bar { display: flex; align-items: center; justify-content: center; gap: 2px; height: 26px; margin: 3px 1px; border-radius: 8px; background: var(--c); color: #fff; font-size: 11px; font-weight: 800; box-shadow: 0 3px 8px -4px var(--c); animation: fadeUp .3s ease; overflow: hidden; }
.mg-bar.new { animation: popIn .4s ease; }
.mg-bar.bad { background: repeating-linear-gradient(45deg, #d64545, #d64545 6px, #e86a6a 6px, #e86a6a 12px); }
.mg-bar button { width: 18px; height: 18px; border: 0; border-radius: 5px; background: rgba(255, 255, 255, .2); color: #fff; font: inherit; font-weight: 800; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s; padding: 0; }
.mg-bar:hover button { opacity: 1; }
[dir="rtl"] .mg-bar .ic { transform: scaleX(-1); }
.mg-add { height: 26px; border-radius: 8px; border: 1.5px dashed #c9d2e8; background: #fafbfe; color: var(--navy-500); font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.mg-warns { margin-top: 10px; }
@media (max-width: 900px) { .mg-strats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .tr, .mg { padding: 14px 12px 40px; } }
/* ---- Phase E gate document ---- */
.am-stairs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; }
.am-step { padding: 10px 12px; border-radius: 12px; background: #fff; border-top: 4px solid var(--c); margin-bottom: calc(var(--i) * 18px); }
.am-step b { color: var(--c); font-size: 13px; } .am-step p { margin: 4px 0 !important; font-size: 12.5px !important; } .am-step small { color: var(--muted); font-weight: 700; }
.am-gantt { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; }
.am-row { display: grid; align-items: center; min-height: 20px; }
.am-row > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding-inline-end: 6px; }
.am-row em { height: 12px; border-radius: 4px; background: var(--c); }
.am-head i { font-style: normal; font-size: 10.5px; font-weight: 800; color: var(--navy-500); border-inline-start: 1px dashed var(--navy-100); padding-inline-start: 3px; }
@media (max-width: 760px) { .am-stairs { grid-template-columns: minmax(0, 1fr); } .am-step { margin-bottom: 0; } }

/* ---- Phase F ---- */
.pj, .vl { max-width: 1480px; margin: 0 auto; padding: 16px 28px 50px; }
.phase-f .ph-badge, .phase-f .drawer-badge.sm { background: linear-gradient(135deg, #0e8585, #1d3f8f); box-shadow: 0 0 0 8px rgba(14, 133, 133, .14); }
.phase-f .prelim-head { background: radial-gradient(circle at 100% 0%, #e2f4f4, transparent 50%), #fff; }
.pj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-top: 18px; align-items: start; }
.pj-card { display: flex; flex-direction: column; gap: 9px; padding: 14px; border-radius: 18px; background: #fff; border: 1.5px solid color-mix(in srgb, var(--c) 25%, #fff); border-top: 6px solid var(--c); box-shadow: var(--shadow-sm); cursor: pointer; animation: fadeUp .35s ease both; animation-delay: var(--d); transition: box-shadow .2s; }
.pj-card.sel { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 40%, transparent), var(--shadow); }
.pj-card.new { animation: popIn .45s ease; }
.pj-top { display: flex; align-items: center; gap: 6px; }
.pj-top input { flex: 1; font-weight: 800; color: var(--navy); padding: 7px 9px; }
.pj-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--c); flex-shrink: 0; }
.pj-owner { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 12px; background: #fff8eb; border: 1px dashed #e2a03a; color: #a86b0f; }
.pj-owner.ok { background: #fffaf0; border-style: solid; }
.pj-owner select { flex: 1; border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--navy); padding: 6px; }
.pj-pkgs { display: flex; flex-wrap: wrap; gap: 4px; min-height: 26px; }
.pj-n { color: var(--muted); font-weight: 700; }
.pj-addf { display: flex; align-items: center; gap: 8px; padding: 14px; border: 2px dashed #c9d2e8; box-shadow: none; }
.pj-addf input { flex: 1; }
.vl-chart-card { margin-top: 18px; padding: 16px 18px; }
.vl-chart-card h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.vl-svg { width: 100%; max-width: 900px; display: block; margin: 0 auto; direction: ltr; }
.vl-line { stroke: #8d97ad; stroke-width: 1.5; stroke-dasharray: 6 5; }
.vl-zone { font-size: 13px; font-weight: 800; } .vl-zone.end { text-anchor: end; }
.vl-bub { cursor: pointer; }
.vl-bub circle { fill: color-mix(in srgb, var(--c) 75%, #fff); stroke: #d64545; fill-opacity: .85; filter: drop-shadow(0 3px 6px rgba(15, 31, 69, .25)); }
.vl-bub text { font-size: 12px; font-weight: 800; fill: #fff; text-anchor: middle; pointer-events: none; }
.vl-bub.new circle { animation: popIn .5s ease; transform-box: fill-box; transform-origin: center; }
.vl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; margin-top: 18px; }
.vl-card { display: flex; flex-direction: column; gap: 9px; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--c); box-shadow: var(--shadow-sm); animation: fadeUp .3s ease; }
.vl-card.new { animation: popIn .45s ease; } .vl-card.flash { animation: glowNew 1.2s ease; }
.vl-top { display: flex; align-items: center; gap: 6px; }
.vl-top b { flex: 1; font-size: 13.5px; color: var(--navy); line-height: 1.35; }
.vl-verdict { font-size: 11px; font-weight: 800; color: #fff; background: var(--v); padding: 2px 9px; border-radius: 999px; }
.vl-costs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.vl-costs button { min-width: 40px; padding: 5px 8px; border-radius: 9px; border: 1.5px solid #c9d2e8; background: #fff; font: inherit; font-weight: 800; font-size: 12px; color: var(--navy-500); cursor: pointer; }
.vl-costs button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.vl-costs small { color: var(--muted); font-weight: 600; margin-inline-start: 4px; }
.vl-kpi { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 12px; background: #f2fbf9; border: 1px solid #bfe6e1; color: #0e8585; }
.vl-kpi select { flex: 1; border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--navy); padding: 6px; min-width: 0; }
@media (max-width: 720px) { .pj, .vl { padding: 14px 12px 40px; } .pj-grid, .vl-grid { grid-template-columns: minmax(0, 1fr); } }
.pj-name { flex: 1; font-weight: 800; color: var(--navy); padding: 6px 9px; resize: none; line-height: 1.35; min-height: 0; font-family: inherit; }
.pj-top { align-items: flex-start; }

/* ---- Phase F · Migration risks ---- */
.mr, .ls { max-width: 1480px; margin: 0 auto; padding: 16px 28px 50px; }
.mr-layout { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 16px; margin-top: 18px; align-items: start; }
.mr-heat-card { padding: 16px 18px; position: sticky; top: 140px; }
.mr-heat-card h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 10px; }
.mr-heat { display: grid; grid-template-columns: 22px 1fr; grid-template-rows: 1fr auto; gap: 6px; direction: ltr; }
.mr-ylab { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 12px; font-weight: 700; color: var(--navy-500); text-align: center; }
.mr-xlab { grid-column: 2; text-align: center; font-size: 12px; font-weight: 700; color: var(--navy-500); }
.mr-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; aspect-ratio: 1; }
.mr-cell { border-radius: 8px; background: color-mix(in srgb, var(--c) 22%, #fff); display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 3px; padding: 3px; }
.mr-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--navy); font-size: 11px; font-weight: 800; box-shadow: 0 2px 5px rgba(15, 31, 69, .25); cursor: pointer; animation: popIn .35s ease; }
.mr-list { display: flex; flex-direction: column; gap: 10px; }
.mr-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); border-inline-start: 5px solid var(--c); box-shadow: var(--shadow-sm); animation: fadeUp .3s ease; }
.mr-card.ok { box-shadow: 0 0 0 2px color-mix(in srgb, var(--teal) 25%, transparent), var(--shadow-sm); }
.mr-card.new { animation: popIn .45s ease; } .mr-card.flash { animation: glowNew 1.2s ease; }
.mr-top { display: flex; align-items: center; gap: 6px; }
.mr-top input { flex: 1; font-weight: 700; color: var(--navy); padding: 7px 9px; }
.mr-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-50); color: var(--navy); font-weight: 800; font-size: 12px; flex-shrink: 0; }
.mr-sc { min-width: 28px; height: 24px; padding: 0 6px; border-radius: 7px; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 800; font-size: 12px; }
.mr-proj { display: flex; align-items: center; gap: 6px; padding: 3px 3px 3px 10px; border-radius: 11px; border: 1px solid color-mix(in srgb, var(--p) 40%, #fff); background: color-mix(in srgb, var(--p) 6%, #fff); color: var(--p); }
.mr-proj select { flex: 1; border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--navy); padding: 5px; min-width: 0; }
.mr-card textarea { font-size: 12.5px; min-height: 52px; }
@media (max-width: 1000px) { .mr-layout { grid-template-columns: minmax(0, 1fr); } .mr-heat-card { position: static; } }
/* ---- Phase F · Plan & lessons ---- */
.ls-plan { margin-top: 18px; padding: 16px 18px; }
.ls-plan h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 10px; }
.ls-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.ls-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px; border-radius: 14px; background: color-mix(in srgb, var(--c) 7%, #fff); border: 1px solid color-mix(in srgb, var(--c) 22%, #fff); text-align: center; }
.ls-stat span { color: var(--c); } .ls-stat b { font-size: 26px; color: var(--c); line-height: 1.1; } .ls-stat small { color: var(--navy-500); font-weight: 600; font-size: 12px; }
.ls-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; align-items: start; }
.ls-col { padding: 12px; border-radius: 18px; background: color-mix(in srgb, var(--c) 6%, #fff); border: 1px solid color-mix(in srgb, var(--c) 22%, #fff); animation: fadeUp .4s ease both; animation-delay: var(--d); }
.ls-col header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ls-col header span { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--c); }
.ls-col header b { color: var(--c); font-size: 15px; } .ls-col header i { margin-inline-start: auto; font-style: normal; font-weight: 800; color: var(--c); font-size: 18px; }
.ls-notes { display: flex; flex-direction: column; gap: 10px; }
.ls-note { padding: 8px; border-radius: 6px 6px 14px 6px; background: color-mix(in srgb, var(--c) 14%, #fffdf3); box-shadow: 0 6px 14px -8px rgba(15, 31, 69, .35); transform: rotate(var(--r)); transition: transform .2s; }
.ls-note:hover, .ls-note:focus-within { transform: rotate(0) scale(1.02); }
.ls-note.new { animation: popIn .45s ease; }
.ls-note textarea { border: 0; background: transparent; font-size: 13px; line-height: 1.55; min-height: 64px; resize: none; padding: 4px; box-shadow: none; }
.ls-note-foot { display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.ls-addf { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ls-addf textarea { font-size: 13px; min-height: 48px; border-style: dashed; }
.ls-addf .btn { align-self: flex-end; }
@media (max-width: 1000px) { .ls-board { grid-template-columns: minmax(0, 1fr); } .ls-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .mr, .ls { padding: 14px 12px 40px; } }
/* ---- Phase F gate ---- */
.ip-table thead th { font-size: 11.5px; color: var(--navy-500); text-transform: uppercase; letter-spacing: .03em; }
.ip-table th small, .ip-table td small { display: block; color: var(--muted); font-weight: 600; }
.ip-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-inline-end: 6px; }

/* ---- Phase G ---- */
.ct, .cp { max-width: 1480px; margin: 0 auto; padding: 16px 28px 50px; }
.phase-g .ph-badge, .phase-g .drawer-badge.sm { background: linear-gradient(135deg, #1d3f8f, #0e8585); box-shadow: 0 0 0 8px rgba(29, 63, 143, .14); }
.phase-g .prelim-head { background: radial-gradient(circle at 100% 0%, #e4eaf6, transparent 50%), #fff; }
.ct-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; margin-top: 18px; align-items: start; }
.ct-doc { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 6px 6px 18px 18px; background: linear-gradient(#fff, #fdfcf8); border: 1px solid #e6e1d3; border-top: 6px solid var(--c); box-shadow: 0 14px 30px -18px rgba(15, 31, 69, .45); animation: fadeUp .4s ease; }
.ct-doc.new { animation: popIn .45s ease; }
.ct-doc.signed { background: linear-gradient(#fbfffd, #f2fbf8); border-color: #bfe6e1; border-top-color: var(--c); }
.ct-doc-head { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 1px dashed #d9d3c3; }
.ct-doc-head small { color: var(--muted); font-weight: 700; font-size: 11.5px; }
.ct-doc-head h3 { margin: 0; font-size: 16px; color: var(--navy); line-height: 1.35; }
.ct-seal { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--c); flex-shrink: 0; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35); }
.ct-doc fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ct-doc fieldset:disabled { opacity: .92; }
.ct-doc .field { margin: 0; }
.ct-lbl { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; color: var(--navy-500); margin-top: 2px; }
.ct-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.ct-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 9px; border: 1px solid color-mix(in srgb, var(--k) 35%, #fff); background: #fff; color: var(--navy-500); font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; }
.ct-chip.on { background: var(--k); border-color: var(--k); color: #fff; }
.ct-chip:disabled, fieldset:disabled .ct-chip { cursor: default; }
.ct-dels { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
.ct-dels .ad-ph { margin-inline-end: 4px; }
.ct-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; padding-top: 10px; border-top: 1px dashed #d9d3c3; }
.ct-stamp { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--teal-600); padding: 6px 14px; border-radius: 999px; border: 2px solid var(--teal); background: #fff; transform: rotate(-3deg); }
.ct-stamp.fresh { animation: stampIn .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes stampIn { 0% { transform: scale(2.2) rotate(-12deg); opacity: 0; } 100% { transform: scale(1) rotate(-3deg); opacity: 1; } }
.cp-legend { margin-top: 18px; padding: 12px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 12.5px; }
.cp-legend span { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--c); }
.cp-legend i { font-style: normal; min-width: 26px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 800; }
.cp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; margin-top: 14px; align-items: start; }
.cp-card { padding: 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--c); box-shadow: var(--shadow-sm); animation: fadeUp .35s ease; }
.cp-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.cp-card header b { display: block; color: var(--navy); font-size: 14.5px; } .cp-card header small { color: var(--muted); font-weight: 600; }
.cp-gauge { display: flex; flex-direction: column; align-items: center; gap: 2px; } .cp-gauge small { font-size: 10.5px; color: var(--muted); font-weight: 700; }
.cp-rows { display: flex; flex-direction: column; gap: 5px; }
.cp-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: #f8f9fc; border: 1px solid transparent; transition: background .2s; }
.cp-row.new { animation: rowFlash 1.2s ease; }
.cp-row.lv-non { background: #fdf1f1; border-color: #f3c4c4; }
.cp-row.lv-full, .cp-row.lv-conformant { background: #f2fbf6; }
.cp-kind { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: #fff; background: #6d4ae0; flex-shrink: 0; } .cp-kind.s { background: #3a6fd8; }
.cp-name { flex: 1; font-size: 12.5px; font-weight: 600; color: var(--navy); line-height: 1.3; }
.cp-levels { display: flex; gap: 3px; direction: ltr; }
.cp-levels button { min-width: 30px; height: 26px; border-radius: 7px; border: 1.5px solid color-mix(in srgb, var(--c) 40%, #fff); background: #fff; color: var(--c); font: inherit; font-weight: 800; font-size: 12px; cursor: pointer; }
.cp-levels button.on { background: var(--c); border-color: var(--c); color: #fff; }
@media (max-width: 720px) { .ct, .cp { padding: 14px 12px 40px; } .ct-list, .cp-list { grid-template-columns: minmax(0, 1fr); } }

/* ---- Phase G · Deviations ---- */
.dv, .pi { max-width: 1480px; margin: 0 auto; padding: 16px 28px 50px; }
.dv-board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dv-todo, .dv-find { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.dv-todo b, .dv-find b { font-size: 13.5px; color: var(--navy); }
.dv-todo small, .dv-find small { font-size: 11.5px; font-weight: 700; color: var(--p); background: color-mix(in srgb, var(--p) 10%, #fff); padding: 1px 8px; border-radius: 999px; }
.dv-lv { font-size: 11px; font-weight: 800; color: #fff; background: var(--c); padding: 2px 8px; border-radius: 999px; }
.dv-exp { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--navy-500); }
.dv-exp button { padding: 3px 8px; border-radius: 7px; border: 1.5px solid #f2d39a; background: #fff; color: #a86b0f; font: inherit; font-size: 11.5px; font-weight: 800; cursor: pointer; }
.dv-exp button.on { background: #e2a03a; border-color: #e2a03a; color: #fff; }
.dv-h { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; color: #6d4ae0; }
[dir="rtl"] .dv-h .ic { transform: scaleX(-1); }
@media (max-width: 1100px) { .dv-board { grid-template-columns: minmax(0, 1fr); } }
/* ---- Phase G · Post-implementation review ---- */
.pi-head-right { display: flex; align-items: center; gap: 18px; }
.pi-real { display: flex; flex-direction: column; align-items: center; gap: 2px; } .pi-real small { font-size: 11px; font-weight: 700; color: var(--muted); }
.pi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; margin-top: 18px; }
.pi-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--c); box-shadow: var(--shadow-sm); animation: fadeUp .35s ease; }
.pi-card.new { animation: popIn .45s ease; }
.pi-top { display: flex; align-items: center; gap: 6px; } .pi-top b { flex: 1; font-size: 14.5px; color: var(--navy); }
.pi-st { font-size: 11px; font-weight: 800; color: #fff; background: var(--c); padding: 2px 9px; border-radius: 999px; }
.pi-track { padding: 18px 4px 0; }
.pi-rail { position: relative; height: 10px; border-radius: 999px; background: var(--navy-50); direction: ltr; }
[dir="rtl"] .pi-rail { direction: rtl; }
.pi-fill { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 999px; background: var(--c); transition: width .6s ease; }
.pi-rail em { position: absolute; top: -22px; transform: translateX(-50%); font-style: normal; font-size: 11px; font-weight: 800; color: #fff; background: var(--c); padding: 1px 7px; border-radius: 7px; white-space: nowrap; }
[dir="rtl"] .pi-rail em { transform: translateX(50%); }
.pi-ends { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11.5px; color: var(--muted); font-weight: 700; }
.pi-ends b { display: block; color: var(--navy); font-size: 13px; }
.pi-ends span:last-child { text-align: end; }
.pi-sts { display: flex; gap: 4px; }
.pi-sts button { flex: 1; padding: 6px; border-radius: 9px; border: 1.5px solid color-mix(in srgb, var(--c) 40%, #fff); background: #fff; color: var(--c); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.pi-sts button.on { background: var(--c); border-color: var(--c); color: #fff; }
@media (max-width: 720px) { .dv, .pi { padding: 14px 12px 40px; } .pi-grid { grid-template-columns: minmax(0, 1fr); } .pi-head-right { flex-direction: column; align-items: stretch; } }

/* ---- Phase H · Change radar ---- */
.cd, .cq { max-width: 1480px; margin: 0 auto; padding: 16px 28px 50px; }
.phase-h .ph-badge, .phase-h .drawer-badge.sm { background: linear-gradient(135deg, #0e8585, #6d4ae0); box-shadow: 0 0 0 8px rgba(14, 133, 133, .14); }
.phase-h .prelim-head { background: radial-gradient(circle at 100% 0%, #e2f4f4, transparent 50%), #fff; }
.cd-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr); gap: 16px; margin-top: 18px; align-items: start; }
.cd-radar-card { padding: 16px 18px; position: sticky; top: 140px; }
.cd-radar-card h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.cd-svg { width: 100%; max-width: 480px; display: block; margin: 0 auto; direction: ltr; }
.cd-bg { fill: #0b2a2e; }
.cd-ring { fill: none; stroke: rgba(127, 211, 207, .35); stroke-width: 1.5; }
.cd-axis { stroke: rgba(127, 211, 207, .25); stroke-width: 1; }
.cd-sweep { animation: sweep 4s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }
.cd-centre { fill: rgba(255, 255, 255, .5); font-size: 10px; font-weight: 800; text-anchor: middle; text-transform: uppercase; letter-spacing: .08em; }
.cd-blip { cursor: pointer; }
.cd-blip circle { fill: var(--c); stroke: #fff; stroke-width: 1.5; }
.cd-blip .halo { fill: var(--c); fill-opacity: .25; stroke: none; animation: ping2 2.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.cd-blip.derived circle:not(.halo) { stroke-dasharray: 3 2; }
.cd-blip.focus circle:not(.halo) { stroke: #ffd36b; stroke-width: 3; }
.cd-blip.new circle { animation: popIn .5s ease; transform-box: fill-box; transform-origin: center; }
@keyframes ping2 { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }
.cd-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 10px; font-size: 12px; font-weight: 700; }
.cd-legend span { display: inline-flex; align-items: center; gap: 5px; color: var(--c); }
.cd-legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.cd-side { display: flex; flex-direction: column; gap: 10px; }
.cd-addf { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px; }
.cd-addf input { flex: 1 1 200px; } .cd-addf select { font: inherit; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--line); background: #fbfcfe; }
#cd-list { display: flex; flex-direction: column; gap: 8px; }
.cd-item { display: flex; flex-direction: column; gap: 7px; padding: 11px; border-radius: 14px; background: #fff; border: 1px solid var(--line); border-inline-start: 5px solid var(--c); box-shadow: var(--shadow-sm); animation: fadeUp .3s ease; }
.cd-item.derived { background: #f4fbfa; }
.cd-item.focus { box-shadow: 0 0 0 2px var(--c), var(--shadow-sm); }
.cd-item.new { animation: popIn .45s ease; }
.cd-top { display: flex; align-items: center; gap: 6px; }
.cd-top b { flex: 1; font-size: 13.5px; color: var(--navy); }
.cd-top input { flex: 1; font-weight: 700; color: var(--navy); padding: 6px 9px; }
.cd-cat { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: #fff; background: var(--c); flex-shrink: 0; }
.cd-tag { font-size: 10.5px; font-weight: 800; color: var(--c, #0e8585); background: color-mix(in srgb, var(--c, #0e8585) 12%, #fff); padding: 2px 8px; border-radius: 999px; }
.cd-cats { display: flex; gap: 4px; flex-wrap: wrap; }
.cd-cats button { padding: 4px 10px; border-radius: 8px; border: 1.5px solid color-mix(in srgb, var(--c) 35%, #fff); background: #fff; color: var(--c); font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; }
.cd-cats button.on { background: var(--c); border-color: var(--c); color: #fff; }
.cd-scores { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; }
.cd-scores label { font-size: 12px; font-weight: 700; color: var(--navy-500); }
.cd-seg { display: flex; gap: 3px; }
.cd-seg button { flex: 1; padding: 5px; border-radius: 8px; border: 1.5px solid var(--navy-100); background: #fff; font: inherit; font-size: 11.5px; font-weight: 700; color: var(--navy-500); cursor: pointer; }
.cd-seg button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
@media (max-width: 1000px) { .cd-layout { grid-template-columns: minmax(0, 1fr); } .cd-radar-card { position: static; } }
/* ---- Phase H · Change requests ---- */
.cq-board-row { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--navy-500); }
.cq-board-row button { padding: 4px 12px; border-radius: 8px; border: 1.5px solid color-mix(in srgb, var(--c) 40%, #fff); background: #fff; color: var(--c); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.cq-board-row button.on { background: var(--c); border-color: var(--c); color: #fff; }
@media (max-width: 720px) { .cd, .cq { padding: 14px 12px 40px; } }

/* ---- Phase H · Next cycle ---- */
.nc, .cl { max-width: 1480px; margin: 0 auto; padding: 16px 28px 50px; }
.nc-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 18px; align-items: start; }
.nc-form { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.nc-form .field { margin: 0; } .nc-form .field > span { display: flex; align-items: center; gap: 6px; }
.nc-form select { font: inherit; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fbfcfe; }
.nc-drivers { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.nc-drv { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 10px; border: 1.5px solid color-mix(in srgb, var(--c) 35%, #fff); background: #fff; color: var(--navy-700); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; text-align: start; }
.nc-drv .ic { color: var(--c); } .nc-drv i { font-style: normal; font-size: 10.5px; font-weight: 800; color: #d62f8f; background: #fde8f3; padding: 1px 6px; border-radius: 999px; }
.nc-drv.on { background: var(--c); border-color: var(--c); color: #fff; } .nc-drv.on .ic { color: #fff; } .nc-drv.on i { background: rgba(255, 255, 255, .25); color: #fff; }
.nc-doc { position: sticky; top: 140px; }
.nc-paper { padding: 26px 28px; border-radius: 6px 6px 20px 20px; background: linear-gradient(#fff, #fdfcf8); border: 1px solid #e6e1d3; border-top: 6px solid #d62f8f; box-shadow: 0 20px 40px -24px rgba(15, 31, 69, .5); animation: fadeUp .4s ease; }
.nc-paper-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px dashed #d9d3c3; margin-bottom: 12px; }
.nc-paper-head small { color: var(--muted); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.nc-paper-head h3 { margin: 0; font-size: 17px; color: var(--navy); }
.nc-paper h2 { display: flex; align-items: center; gap: 8px; font-size: 20px; color: var(--navy); margin: 4px 0; line-height: 1.35; }
.nc-paper dl { margin: 14px 0 0; display: grid; gap: 4px 0; }
.nc-paper dt { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--navy-500); margin-top: 8px; }
.nc-paper dd { margin: 0; font-size: 13.5px; color: #3a4563; line-height: 1.6; padding-inline-start: 26px; }
.nc-paper dd ul { margin: 0; padding-inline-start: 16px; }
.nc-tick { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--navy-50); color: var(--muted); flex-shrink: 0; }
.nc-tick.ok { background: var(--teal); color: #fff; }
@media (max-width: 1000px) { .nc-layout { grid-template-columns: minmax(0, 1fr); } .nc-doc { position: static; } }
/* ---- Phase H · Cycle closure ---- */
.cl-journey-card { margin-top: 18px; padding: 18px 20px; }
.cl-journey-card h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 14px; }
.cl-line { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 8px; position: relative; }
.cl-line::before { content: ''; position: absolute; top: 22px; inset-inline: 4%; height: 4px; border-radius: 4px; background: linear-gradient(90deg, #0e8585, #6d4ae0, #d62f8f, #e2a03a); opacity: .35; }
[dir="rtl"] .cl-line::before { background: linear-gradient(-90deg, #0e8585, #6d4ae0, #d62f8f, #e2a03a); }
.cl-node { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; animation: fadeUp .5s ease both; animation-delay: calc(var(--i) * 110ms); }
.cl-dot { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 3px solid #c9d2e8; color: var(--navy-500); font-weight: 800; z-index: 1; }
.cl-node.st-done .cl-dot { background: var(--teal); border-color: var(--teal); color: #fff; box-shadow: 0 0 0 6px rgba(20, 163, 163, .15); }
.cl-node.st-cur .cl-dot { background: #e2a03a; border-color: #e2a03a; color: #fff; animation: pulseRing 1.8s ease infinite; --c: #e2a03a; }
.cl-body { display: flex; flex-direction: column; gap: 2px; }
.cl-body small { font-size: 10.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.cl-body b { font-size: 12px; color: var(--navy); line-height: 1.3; }
.cl-stat { font-size: 11.5px; color: var(--navy-500); font-weight: 600; } .cl-stat em { font-style: normal; font-weight: 800; color: var(--navy); font-size: 15px; }
.cl-ap { font-size: 10.5px; color: var(--teal-600); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 3px; flex-wrap: wrap; }
.cl-node.st-todo .cl-ap, .cl-node.st-cur .cl-ap { color: var(--muted); }
.cl-reflect { margin-top: 18px; padding: 18px 20px; }
.cl-stars { display: flex; gap: 6px; margin-bottom: 12px; direction: ltr; }
[dir="rtl"] .cl-stars { justify-content: flex-end; }
.cl-stars button { border: 0; background: transparent; color: #d9dee9; cursor: pointer; padding: 2px; transition: transform .15s; }
.cl-stars button:hover { transform: scale(1.15); }
.cl-stars button.on { color: #f5b942; } .cl-stars button.on .ic { fill: currentColor; }
@media (max-width: 1000px) { .cl-line { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; } .cl-line::before { display: none; } }
@media (max-width: 720px) { .nc, .cl { padding: 14px 12px 40px; } }
/* ---- Phase H · Certificate ---- */
.modal.cert-modal { width: min(860px, 100%); }
.cert { padding: 6px; }
.cert-border { position: relative; padding: 34px 30px 28px; border-radius: 14px; text-align: center; background: radial-gradient(circle at 50% 0%, #fff8e6, #fff 60%); border: 3px double #d9a21b; box-shadow: inset 0 0 0 8px #fff, inset 0 0 0 9px #f0dfae; }
.cert-kicker { font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #a87a12; }
.cert h2 { font-size: 27px; color: var(--navy); margin: 8px 0 14px; font-family: Georgia, 'Times New Roman', serif; }
[dir="rtl"] .cert h2 { font-family: inherit; }
.cert h3 { font-size: 30px; margin: 4px 0; background: linear-gradient(90deg, #b01f78, #6d2fd1); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cert h4 { font-size: 18px; color: var(--navy); margin: 4px 0 16px; }
.cert-small { margin: 0 !important; color: var(--navy-500) !important; font-size: 13.5px !important; }
.cert-seals { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 14px 0; direction: ltr; }
.cert-seal { width: 52px; height: 52px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 2px dashed #c9d2e8; color: var(--muted); }
.cert-seal b { font-size: 15px; } .cert-seal small { font-size: 9.5px; font-weight: 700; }
.cert-seal.ok { border: 0; color: #fff; background: radial-gradient(circle at 30% 30%, #2bb8b0, #0b6f6f); box-shadow: 0 6px 12px -6px rgba(14, 133, 133, .8); }
.cert-foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 12px; margin-top: 18px; }
.cert-foot > div:not(.cert-medal) { display: flex; flex-direction: column; gap: 4px; border-top: 1.5px solid #e6dcc0; padding-top: 6px; }
.cert-foot small { font-size: 11px; color: var(--muted); font-weight: 700; } .cert-foot b { color: var(--navy); }
.cert-foot input { text-align: center; padding: 6px; }
.cert-medal { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 35% 30%, #ffd36b, #c98a12); box-shadow: 0 8px 18px -8px #c98a12; }
.cert-stamp { position: absolute; top: 18px; inset-inline-end: 18px; display: inline-flex; align-items: center; gap: 5px; font-weight: 800; color: var(--teal-600); padding: 5px 12px; border: 2px solid var(--teal); border-radius: 999px; transform: rotate(8deg); background: #fff; animation: stampIn .6s cubic-bezier(.2, 1.6, .4, 1); }
.phase-chip.done { background: linear-gradient(135deg, #ffd36b, #e2a03a); color: #5b3c00; }
.tw-strip { display: flex; gap: 3px; flex-wrap: wrap; margin: 6px 0; }
.tw-ph { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; background: var(--navy-50); color: var(--muted); }
.tw-ph.done { background: var(--teal); color: #fff; } .tw-ph.cur { background: #e2a03a; color: #fff; }
@media print {
  body.printing-cert > *:not(.modal-wrap) { display: none !important; }
  body.printing-cert .modal-wrap { position: static !important; background: none !important; }
  body.printing-cert .modal { box-shadow: none !important; width: 100% !important; max-height: none !important; overflow: visible !important; transform: none !important; }
  body.printing-cert .modal-actions, body.printing-cert .modal-x, body.printing-cert [data-close] { display: none !important; }
}

/* ---- Requirements Management ---- */
.crumbs-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; text-decoration: none; font-size: 12.5px; font-weight: 700; color: #0f1f45; background: #fff; border: 1.5px solid #c9d2e8; box-shadow: var(--shadow-sm); white-space: nowrap; }
.rm-chip:hover { border-color: #1d3f8f; }
.rm-chip b { background: #0f1f45; color: #fff; border-radius: 999px; padding: 0 7px; font-size: 11px; }
.rm-chip i { font-style: normal; background: #d62f8f; color: #fff; border-radius: 999px; padding: 0 6px; font-size: 10.5px; font-weight: 800; animation: pulseBtn 2s ease infinite; }
.rqm { max-width: 1480px; margin: 0 auto; padding: 16px 28px 50px; }
.rq-head { background: radial-gradient(circle at 100% 0%, #e6ebf8, transparent 55%), radial-gradient(circle at 0% 100%, #f3eefe, transparent 50%), #fff; }
.rq-types { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; font-size: 12.5px; font-weight: 700; }
.rq-types span { display: inline-flex; align-items: center; gap: 5px; color: var(--c); } .rq-types b { color: var(--navy); }
.rq-stats { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.rq-health { display: flex; flex-direction: column; align-items: center; gap: 2px; } .rq-health small { font-size: 11px; font-weight: 700; color: var(--muted); }
.rq-donut { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; transition: background .5s; }
.rq-donut > div { width: 66px; height: 66px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rq-donut b { font-size: 22px; color: var(--navy); line-height: 1; } .rq-donut small { font-size: 10px; color: var(--muted); font-weight: 700; }
.rq-legend { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: var(--navy-500); }
.rq-legend span { display: inline-flex; align-items: center; gap: 6px; } .rq-legend i { font-style: normal; width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 800; font-size: 11px; } .rq-legend b { color: var(--navy); }
.rq-inboxn { color: #d62f8f !important; font-weight: 800; }
.rq-layout { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 16px; margin-top: 18px; align-items: start; }
.rq-inbox { padding: 16px; position: sticky; top: 140px; max-height: calc(100vh - 170px); overflow: auto; }
.rq-inbox h2, .rq-repo h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.rq-inbox .btn-block { margin: 8px 0 10px; }
.rq-cands { display: flex; flex-direction: column; gap: 10px; }
.rq-grp { display: flex; flex-direction: column; gap: 5px; position: relative; padding-inline-start: 30px; }
.rq-ph { position: absolute; inset-inline-start: 0; top: 0; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 10.5px; font-weight: 800; }
.rq-cand { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 8px; border-radius: 10px; background: #f8f9fc; border: 1px dashed color-mix(in srgb, var(--c) 45%, #fff); font-size: 12.5px; color: var(--navy-700); animation: fadeUp .3s ease; }
.rq-cand > span:nth-child(2) { flex: 1; line-height: 1.35; }
.rq-ty { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; color: #fff; background: var(--c); flex-shrink: 0; }
.rq-repo { padding: 16px 18px; }
.rq-repo-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.rq-filter { display: flex; flex-wrap: wrap; gap: 4px; }
.rq-filter button { padding: 4px 10px; border-radius: 999px; border: 1.5px solid color-mix(in srgb, var(--c) 30%, #fff); background: #fff; color: var(--c); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.rq-filter button.on { background: var(--c); border-color: var(--c); color: #fff; }
#rq-list { display: flex; flex-direction: column; gap: 6px; }
.rq-row { display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: #fff; border: 1px solid var(--line); border-inline-start: 4px solid var(--c); animation: fadeUp .3s ease; }
.rq-row.new { animation: popIn .45s ease; }
.rq-id { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; font-weight: 800; color: var(--navy-500); background: var(--navy-50); padding: 3px 7px; border-radius: 7px; direction: ltr; }
.rq-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rq-main input { padding: 5px 8px; font-size: 13px; font-weight: 600; border-color: transparent; background: transparent; }
.rq-main input:hover, .rq-main input:focus { border-color: var(--line); background: #fff; }
.rq-meta { display: flex; align-items: center; gap: 6px; padding-inline-start: 8px; }
.rq-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--c); }
.rq-src { font-size: 11px; color: var(--muted); font-weight: 600; }
.rq-mo { display: flex; gap: 2px; direction: ltr; }
.rq-mo button { width: 26px; height: 26px; border-radius: 7px; border: 1.5px solid color-mix(in srgb, var(--c) 40%, #fff); background: #fff; color: var(--c); font: inherit; font-weight: 800; font-size: 12px; cursor: pointer; }
.rq-mo button.on { background: var(--c); border-color: var(--c); color: #fff; }
.rq-st { min-width: 92px; padding: 5px 10px; border-radius: 999px; border: 0; background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.rq-empty { padding: 20px; text-align: center; }
.rq-addf { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.rq-addf input { flex: 1 1 260px; } .rq-addf select { font: inherit; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--line); background: #fbfcfe; }
@media (max-width: 1000px) { .rq-layout { grid-template-columns: minmax(0, 1fr); } .rq-inbox { position: static; max-height: none; } }
@media (max-width: 720px) { .rqm { padding: 14px 12px 40px; } .rq-row { grid-template-columns: auto 1fr; } .rq-mo, .rq-st { grid-column: 2; } .rm-chip span { display: none; } }

/* ---- Requirements · batch 2 ---- */
.rq-row { grid-template-columns: auto 1fr auto auto auto auto; }
.rq-headbtns { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.rq-cov { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: #0e8585; }
.rq-tr { display: inline-flex; align-items: center; gap: 4px; min-width: 54px; justify-content: center; padding: 5px 8px; border-radius: 999px; border: 1.5px solid #bfe6e1; background: #f2fbf9; color: #0e8585; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.rq-tr.orphan { border-color: #f3c4c4; background: #fdf1f1; color: #d64545; animation: qPulse 2s ease infinite; --c: #d64545; }
.modal.trace-modal { width: min(980px, 100%); }
.tr-title { display: flex; align-items: center; gap: 6px; font-weight: 800; color: var(--c) !important; font-size: 15px; }
.tr-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 12px 0; position: relative; }
.tr-col { display: flex; flex-direction: column; gap: 6px; position: relative; }
.tr-col:not(:last-child)::after { content: '→'; position: absolute; top: 24px; inset-inline-end: -10px; color: #9aa3b8; font-weight: 800; }
[dir="rtl"] .tr-col:not(:last-child)::after { content: '←'; }
.tr-h { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tr-n { padding: 7px 9px; border-radius: 10px; background: color-mix(in srgb, var(--c) 9%, #fff); border-inline-start: 3px solid var(--c); font-size: 12px; font-weight: 600; color: var(--navy); line-height: 1.35; animation: fadeUp .35s ease both; }
.tr-n.empty { background: #f6f7fa; border-color: #d9dee9; color: var(--muted); text-align: center; }
.tr-bottom { display: grid; grid-template-columns: 220px 1fr; gap: 16px; margin-top: 10px; align-items: start; }
.tr-ring { width: 180px; display: block; }
.tr-ph { fill: #f3f5fa; stroke: #c9d2e8; stroke-width: 1.5; } .tr-ph.on { fill: #d62f8f; stroke: #fff; stroke-width: 2.5; }
.tr-pl { font-size: 11px; font-weight: 800; text-anchor: middle; fill: var(--muted); } .tr-pl.on { fill: #fff; }
.tr-rm { fill: #0f1f45; }
.tr-ray { stroke: #d62f8f; stroke-width: 2.5; stroke-dasharray: 5 4; animation: rayFlow 1s linear infinite; }
@keyframes rayFlow { to { stroke-dashoffset: -18; } }
.tr-pkgs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; max-height: 210px; overflow: auto; }
.tr-pkgs button { display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px; border-radius: 9px; border: 1.5px solid #c9d2e8; background: #fff; font: inherit; font-size: 12px; font-weight: 600; color: var(--navy-700); cursor: pointer; text-align: start; }
.tr-pkgs button.on { border-color: #0e8585; background: #e6f6f4; color: #0b5f5f; }
@media (max-width: 860px) { .tr-flow { grid-template-columns: minmax(0, 1fr); } .tr-col::after { display: none; } .tr-bottom { grid-template-columns: minmax(0, 1fr); } }
/* change-impact ripple on the ADM ring */
.adm-spoke.rm-ripple { stroke: #d62f8f !important; stroke-width: 3.5 !important; stroke-dasharray: 8 6; animation: rayFlow .9s linear infinite; }
.phase-node.rm-impact .node-scale { animation: impactPulse 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.phase-node.rm-impact circle:first-of-type { stroke: #d62f8f; }
@keyframes impactPulse { 0%, 100% { filter: drop-shadow(0 0 0 rgba(214, 47, 143, 0)); } 50% { filter: drop-shadow(0 0 10px rgba(214, 47, 143, .75)); } }
/* requirements specification */
.modal.ars-modal { width: min(980px, 100%); }
.ars-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 10px 0 4px; }
.ars-stats div { display: flex; flex-direction: column; align-items: center; padding: 12px; border-radius: 14px; background: color-mix(in srgb, var(--c, #1d3f8f) 8%, #fff); border: 1px solid color-mix(in srgb, var(--c, #1d3f8f) 22%, #fff); }
.ars-stats b { font-size: 24px; color: var(--c, #1d3f8f); } .ars-stats small { font-size: 11.5px; color: var(--navy-500); font-weight: 700; }
.ars-table code { font-size: 11px; font-weight: 800; color: var(--navy-500); direction: ltr; display: inline-block; }
.ars-mo { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--c); color: #fff; font-weight: 800; font-size: 11px; }
.ars-orph { color: #d64545; font-weight: 800; }
.tw-req { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: #1d3f8f; margin-top: 6px; }
@media (max-width: 720px) { .ars-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ==========================================================================
   MOBILE SAFETY NET — nothing may push the page wider than the phone
   ========================================================================== */
@media (max-width: 720px) {
  html, body { max-width: 100%; overflow-x: clip; }
  .gate { flex-wrap: wrap; padding: 14px; }
  .gate > div:not(.gate-ic) { flex: 1 1 200px; min-width: 0; }
  .gate .btn { flex: 1 1 auto; justify-content: center; }
  .gate-pct { margin-inline-start: 0; }
  img, svg, video, canvas { max-width: 100%; }
  .modal { max-width: calc(100vw - 16px); }
  .modal table { display: block; overflow-x: auto; }
  pre, code { white-space: pre-wrap; word-break: break-word; }
  h1, h2, h3, h4, p, li, td, th, label, small, b { overflow-wrap: anywhere; }
}
@media (max-width: 720px) {
  .coach-acts { flex-wrap: wrap; overflow-x: visible; }
  .coach-acts .btn { flex: 1 1 auto; justify-content: center; white-space: normal; }
  .tabs { flex-wrap: wrap; overflow-x: visible; margin-inline: -14px; padding: 0 8px; }
  .tabs button { padding: 12px 9px; font-size: 13px; }
  /* staircase & value stream become vertical lists instead of sideways scrollers */
  .tr-stairs-card { overflow-x: visible; padding: 14px; }
  .tr-stairs { grid-template-columns: minmax(0, 1fr); min-width: 0; align-items: stretch; }
  .tr-base { height: auto; flex-direction: row; padding: 10px; }
  .tr-step { margin-bottom: 0; }
  .vm-flow-wrap { overflow-x: visible; }
  .vm-flow { flex-direction: column; align-items: stretch; min-width: 0; gap: 8px; }
  .vm-col, .vm-end { width: auto; margin-inline-start: 0 !important; }
}
@media (max-width: 720px) {
  .topbar-nav { min-width: 0; gap: 6px; }
  .topbar-nav .pill-admin, .topbar-nav > a.btn { font-size: 0; gap: 0; padding: 8px; }
  .topbar-nav .pill-admin .ic, .topbar-nav > a.btn .ic { margin: 0; }
}
@media (max-width: 420px) { .topbar-nav .live span { display: none; } }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* ==========================================================================
   VIRTUAL COACH — signs of life (subtle; off under prefers-reduced-motion)
   Uses the individual scale/translate/rotate properties so it never fights
   the transform used by hover and entrance effects.
   ========================================================================== */
@keyframes coachBreathe { 0%, 100% { scale: 1; } 50% { scale: 1.035; } }
@keyframes coachHalo { 0% { opacity: .5; scale: 1; } 70%, 100% { opacity: 0; scale: 1.42; } }
@keyframes coachNod { 0% { rotate: 0deg; translate: 0 0; } 25% { rotate: -7deg; translate: 0 -3px; } 55% { rotate: 5deg; translate: 0 0; } 80% { rotate: -2deg; } 100% { rotate: 0deg; } }
@keyframes coachFloat { 0%, 100% { translate: 0 0; scale: 1; } 50% { translate: 0 -7px; scale: 1.03; } }

.coach-av { animation: coachBreathe 4.2s ease-in-out infinite; }
.coach-av::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--fuchsia); pointer-events: none; opacity: 0; animation: coachHalo 3.6s ease-out 1s infinite; }
.coach-av.talk { animation: coachNod .9s ease-in-out; }

.cw-photo { transform: perspective(500px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)); transition: transform .25s ease-out; animation: coachFloat 5s ease-in-out 1.3s infinite; }
.cw-photo::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--fuchsia); pointer-events: none; opacity: 0; animation: coachHalo 3.6s ease-out 1.6s infinite; }
@media (prefers-reduced-motion: reduce) { .coach-av, .coach-av::after, .cw-photo, .cw-photo::after { animation: none !important; } }
.cw-ask { display: block; margin-top: 4px; color: var(--fuchsia); font-weight: 800; }

/* ==========================================================================
   BDAT — the four architecture domains (identity + tower on the cycle page)
   Business #6d4ae0 · Data #3a6fd8 · Application #0e9e9e · Technology #e2702a
   ========================================================================== */
.node-dom circle { stroke: #fff; stroke-width: 2.5; }
.node-dom text { fill: #fff; font-size: 11px; font-weight: 800; pointer-events: none; }
.dom-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.dom-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); border: 1px solid color-mix(in srgb, var(--c) 30%, #fff); }
[dir="rtl"] .dom-chip { padding: 4px 4px 4px 10px; }
.dom-chip i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font-style: normal; font-size: 11px; font-weight: 800; }

.stage-body { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; align-items: center; }
.stage-body:has(> .bdat[hidden]) { grid-template-columns: minmax(0, 1fr); }
.bdat[hidden] { display: none; }
.bdat { position: relative; padding: 16px; background: linear-gradient(180deg, #fff, #fbfaff); }
.bd-head h2 { font-size: 16px; font-weight: 800; color: var(--navy); margin: 4px 0 4px; }
.bd-head p { font-size: 12px; color: var(--muted); line-height: 1.55; margin-bottom: 12px; }
.bd-stack { display: flex; flex-direction: column; }
.bd-layer { position: relative; overflow: hidden; display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 11px 12px; border-radius: 14px; text-align: start; cursor: pointer; font: inherit; color: var(--navy);
  background: #fff; border: 1.5px solid color-mix(in srgb, var(--c) 28%, #fff); border-inline-start: 6px solid var(--c); box-shadow: 0 6px 16px -12px color-mix(in srgb, var(--c) 70%, transparent);
  transition: transform .2s, box-shadow .2s; animation: fadeUp .45s ease both; animation-delay: calc(var(--i) * 90ms); }
.bd-layer:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 12px 24px -14px color-mix(in srgb, var(--c) 80%, transparent); }
.bd-layer:disabled { cursor: default; }
.bd-layer.st-waiting { border-style: dashed; border-inline-start-style: solid; background: #fafbfe; }
.bd-layer.st-waiting .bd-ic { background: color-mix(in srgb, var(--c) 35%, #fff); }
.bd-fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--p); background: color-mix(in srgb, var(--c) 9%, transparent); animation: bdGrow 1s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 90ms + .2s); pointer-events: none; }
@keyframes bdGrow { from { width: 0; } }
.bd-ic { position: relative; flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--c); }
.bd-ic i { position: absolute; bottom: -5px; inset-inline-end: -5px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--c); font-style: normal; font-size: 10.5px; font-weight: 800; box-shadow: 0 0 0 2px var(--c); }
.bd-body { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bd-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.bd-top b { font-size: 13.5px; }
.bd-st { flex-shrink: 0; display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-size: 11px; font-weight: 800; color: var(--c); }
.st-waiting .bd-st { color: var(--muted); }
.bd-q { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.bd-metrics { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11.5px; color: #3a4563; }
.bd-metrics b { color: var(--c); font-size: 13px; }
.bd-ex { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.bd-ex i { font-style: normal; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--c) 12%, #fff); color: color-mix(in srgb, var(--c) 75%, #0f1f45); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-ex i.more { background: none; color: var(--muted); }
.bd-link { display: flex; align-items: center; justify-content: center; gap: 4px; height: 22px; color: var(--muted); font-size: 10.5px; font-weight: 700; }
.bd-link span { display: grid; place-items: center; transform: rotate(-90deg); color: #b5bdd3; }
[dir="rtl"] .bd-link span { transform: rotate(90deg); }
.bd-built { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #6d4ae0, #3a6fd8 40%, #0e9e9e 70%, #e2702a); }
.bd-built b { display: block; font-size: 13px; } .bd-built small { font-size: 11px; opacity: .9; }
.bd-celebrate .bd-built { animation: popIn .6s ease; }

@media (max-width: 1300px) { .stage-body { grid-template-columns: minmax(0, 1fr); } .bdat { max-width: 640px; width: 100%; margin: 6px auto 0; } }
/* compact tower: examples appear on hover/focus where a pointer can hover */
.bdat { padding: 14px; }
.bd-head p { margin-bottom: 8px; }
.bd-layer { padding: 9px 11px; }
.bd-link { height: 16px; }
.bd-ex { flex-wrap: nowrap; overflow: hidden; }
@media (hover: hover) {
  .bd-ex { max-height: 0; opacity: 0; margin-top: 0; transition: max-height .3s, opacity .3s, margin-top .3s; }
  .bd-layer:hover .bd-ex, .bd-layer:focus-visible .bd-ex { max-height: 24px; opacity: 1; margin-top: 3px; }
}
@media (hover: none) { .bd-ex { flex-wrap: wrap; } }

/* ---- BDAT traceability thread ---- */
.bd-thread { margin-bottom: 10px; width: 100%; justify-content: center; }
.thr { max-width: 1480px; margin: 0 auto; padding: 16px 28px 50px; }
.thr-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; flex-wrap: wrap; padding: 20px 24px; background: radial-gradient(circle at 100% 0%, #efe9ff, transparent 45%), radial-gradient(circle at 0% 100%, #fff1e6, transparent 40%), #fff; }
.thr-title { flex: 1 1 420px; min-width: 0; }
.thr-title h1 { font-size: 24px; font-weight: 800; margin: 4px 0 6px; }
.thr-title p { max-width: 720px; line-height: 1.6; }
.thr-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.thr-view { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--navy-50); }
.thr-view button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; }
.thr-view button.on { background: #fff; color: var(--navy); box-shadow: var(--shadow-sm); }
.thr-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.thr-stats span { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: color-mix(in srgb, var(--c) 10%, #fff); color: var(--c); }
.thr-stats i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font-style: normal; font-size: 11px; font-weight: 800; }
.thr-stats b { font-size: 14px; }
.thr-stats em { position: absolute; top: -6px; inset-inline-end: -6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: #d64545; color: #fff; font-style: normal; font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.thr-orph-k { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; }
.thr-orph-k i { width: 14px; height: 10px; border-radius: 4px; border: 1.5px dashed #d64545; }

.thr-board { margin-top: 16px; padding: 16px 18px 20px; }
.thr-detail { min-height: 54px; margin-bottom: 12px; }
.thr-pick { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-radius: 14px; background: #fafbfe; border: 1.5px dashed var(--line); color: var(--muted); font-weight: 600; }
.thr-sel { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--c) 7%, #fff); border: 1.5px solid color-mix(in srgb, var(--c) 30%, #fff); animation: fadeUp .3s ease; }
.thr-sel > div { flex: 1; min-width: 0; }
.thr-sel small { color: var(--c); font-weight: 800; font-size: 11.5px; }
.thr-sel b { display: block; font-size: 16px; color: var(--navy); margin: 1px 0 3px; }
.thr-sel p { font-size: 13px; color: #3a4563; line-height: 1.55; }
.thr-sel p.warn { color: #b3261e; font-weight: 700; }
.thr-host, .thr-hint { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12.5px !important; color: var(--muted) !important; }

.thr-lanes { position: relative; display: flex; flex-direction: column; gap: 30px; }
.thr-wires { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 1; }
.thr-wires path { fill: none; stroke-width: 2.2; stroke-linecap: round; opacity: .75; stroke-dasharray: 600; stroke-dashoffset: 600; animation: thrDraw .7s ease forwards; }
@keyframes thrDraw { to { stroke-dashoffset: 0; } }
.thr-lane { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; align-items: start; padding: 12px; border-radius: 16px; background: color-mix(in srgb, var(--c) 5%, #fff); border-inline-start: 5px solid var(--c); }
.thr-lane-h { display: flex; gap: 10px; align-items: flex-start; }
.thr-lane-h b { display: block; font-size: 13.5px; color: var(--navy); }
.thr-lane-h small { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.thr-lane-ic { position: relative; flex-shrink: 0; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: var(--c); }
.thr-lane-ic i { position: absolute; bottom: -5px; inset-inline-end: -5px; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--c); font-style: normal; font-size: 10px; font-weight: 800; box-shadow: 0 0 0 2px var(--c); }
.thr-chips { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 7px; }
.thr-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 7px 12px; border-radius: 12px; border: 1.5px solid color-mix(in srgb, var(--c) 35%, #fff); background: #fff; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--navy); cursor: pointer; text-align: start; transition: transform .15s, opacity .25s, box-shadow .2s, background .2s; }
.thr-chip:hover { transform: translateY(-1px); box-shadow: 0 6px 14px -10px var(--c); }
.thr-chip.new::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.thr-chip.retire { text-decoration: line-through; color: var(--muted); }
.thr-chip.orphan { border: 1.5px dashed #d64545; background: #fff7f7; }
.thr-orph-dot { width: 7px; height: 7px; border-radius: 50%; background: #d64545; flex-shrink: 0; }
.thr-chip.on { background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 8px 18px -10px var(--c); }
.thr-chip.on.orphan { background: #d64545; border-color: #d64545; }
.thr-chip.sel { outline: 3px solid color-mix(in srgb, var(--c) 35%, transparent); outline-offset: 2px; }
.thr-chip.dim { opacity: .35; }
.thr-chip.linkable { opacity: 1; border-style: dashed; }
.thr-chip.linkable.linked { background: var(--c); color: #fff; border-style: solid; }
.thr-tog { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 15%, #fff); color: var(--c); }
.linked .thr-tog { background: #fff; }
.thr-empty { font-size: 12.5px; color: var(--muted); padding: 6px 0; }
@media (max-width: 900px) { .thr-lane { grid-template-columns: minmax(0, 1fr); } .thr-side { align-items: flex-start; } }
@media (max-width: 720px) { .thr { padding: 14px 12px 40px; } .thr-head { padding: 16px; } .thr-board { padding: 12px; } .thr-lanes { gap: 22px; } .thr-chip { font-size: 12px; padding: 6px 10px; } }
.thr-shared { display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px; border-radius: 999px; font-size: 10px; font-weight: 800; background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c); } .thr-chip.on .thr-shared, .thr-chip.linked .thr-shared { background: rgba(255,255,255,.25); color: #fff; }

/* ---- Requirements Management: a living centre ---- */
.rm-breath { fill: none; stroke: #8b6cf0; stroke-width: 3; opacity: 0; pointer-events: none; transform-box: fill-box; transform-origin: center; }
.rm-open .rm-breath { animation: rmBreath 3.4s ease-out infinite; }
.rm-open .rm-breath.b2 { animation-delay: 1.7s; }
.rm-alert .rm-breath { stroke: #e2853a; stroke-width: 4; animation-duration: 2s; }
.rm-alert .rm-breath.b2 { animation-delay: 1s; }
@keyframes rmBreath { 0% { opacity: .55; scale: 1; } 80%, 100% { opacity: 0; scale: 1.28; } }
.rm-open .rm-body { transform-box: fill-box; transform-origin: center; animation: coachBreathe 4s ease-in-out infinite; }
.rm-badge circle { fill: #d64545; stroke: #fff; stroke-width: 3; }
.rm-alert .rm-badge circle { fill: #e2853a; }
.rm-badge text { fill: #fff; font-size: 15px; font-weight: 800; pointer-events: none; }
.rm-badge.ok circle { fill: var(--teal); }
.rm-badge.ok path { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.rm-badge > * { transform-box: fill-box; transform-origin: center; animation: popIn .5s ease both; }
.rm-chip.hot { animation: chipHot 1.8s ease-out infinite; border-color: #e2853a !important; }
@keyframes chipHot { 0% { box-shadow: 0 0 0 0 rgba(226, 133, 58, .55); } 80%, 100% { box-shadow: 0 0 0 9px rgba(226, 133, 58, 0); } }
.count-pill.hot { background: #e2853a !important; color: #fff !important; }

.rq-in { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.rq-in h2 { color: #c2611a; }
.rq-evt { margin-top: 10px; padding: 11px 12px; border-radius: 14px; background: linear-gradient(135deg, #fff8f0, #fff); border: 1.5px solid #f3c79a; border-inline-start: 5px solid var(--c); animation: popIn .45s ease both; }
.rq-evt-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rq-evt-top b { font-size: 12.5px; color: var(--navy); }
.rq-evt-top small { margin-inline-start: auto; font-size: 11px; color: var(--muted); font-weight: 700; }
.rq-evt p { margin: 6px 0 3px; font-weight: 700; color: var(--navy); font-size: 13.5px; line-height: 1.5; }
.rq-evt-why { display: block; font-size: 12px; color: var(--muted); font-style: italic; }
.rq-evt-acts { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.rq-evt-mo { margin-inline-end: auto; font-size: 11px; font-weight: 800; color: var(--c); }
.rq-tl { margin-top: 12px; }
.rq-tl > div { display: flex; align-items: flex-end; gap: 6px; height: 64px; margin-top: 6px; }
.rq-tl span { position: relative; flex: 1; min-width: 22px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.rq-tl span i { display: block; width: 100%; max-width: 28px; min-height: 3px; border-radius: 6px 6px 2px 2px; background: #dfe4ef; transition: height .5s; }
.rq-tl span.on i { background: linear-gradient(180deg, #8b6cf0, #1d3f8f); }
.rq-tl span b { font-size: 10.5px; color: var(--muted); }
.rq-tl span em { position: absolute; top: -4px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 999px; background: #e2853a; color: #fff; font-style: normal; font-size: 10px; font-weight: 800; display: grid; place-items: center; }
@media (prefers-reduced-motion: reduce) { .rm-breath, .rm-body, .rm-chip.hot { animation: none !important; } }

/* ---- Trainer · send a requirement ---- */
.tq-card { margin-top: 16px; }
.tq-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.tq-head h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; color: var(--navy); }
.tq-head p { max-width: 560px; margin-top: 4px; }
.tq-auto { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--navy); user-select: none; }
.tq-auto input { position: absolute; opacity: 0; pointer-events: none; }
.tq-sw { position: relative; width: 38px; height: 22px; border-radius: 999px; background: #cfd6e6; transition: background .2s; flex-shrink: 0; }
.tq-sw::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: inset-inline-start .2s; }
.tq-auto input:checked + .tq-sw { background: var(--teal); }
.tq-auto input:checked + .tq-sw::after { inset-inline-start: 19px; }
.tq-auto input:focus-visible + .tq-sw { box-shadow: var(--glow); }
.tq-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; margin-top: 14px; align-items: start; }
.tq-form { display: flex; flex-direction: column; gap: 10px; }
.tq-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); flex: 1; min-width: 0; }
.tq-row { display: flex; gap: 10px; }
.tq-ideas, .tq-to > div { display: flex; flex-wrap: wrap; gap: 6px; }
.tq-ideas .ad-lbl, .tq-to .ad-lbl { width: 100%; }
.tq-idea { border: 1px dashed #c9d2e8; background: #fafbfe; border-radius: 10px; padding: 5px 9px; font: inherit; font-size: 11.5px; color: var(--navy); cursor: pointer; text-align: start; }
.tq-idea:hover { border-color: var(--fuchsia); color: var(--fuchsia); }
.tq-team { display: inline-flex; align-items: center; gap: 5px; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--muted); cursor: pointer; }
.tq-team.on { border-color: var(--fuchsia); background: var(--fuchsia-100, #fde7f3); color: var(--fuchsia); }
#tq-send { align-self: flex-start; }
.tq-history { display: flex; flex-direction: column; gap: 8px; max-height: 520px; overflow: auto; padding-inline-end: 4px; }
.tq-sent { padding: 10px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); border-inline-start: 5px solid var(--c); }
.tq-sent-top { display: flex; align-items: center; gap: 6px; }
.tq-sent-top b { font-size: 12.5px; color: var(--navy); }
.tq-sent-top time { margin-inline-start: auto; font-size: 11px; color: var(--muted); }
.tq-sent p { margin: 5px 0 6px; font-weight: 700; font-size: 13px; color: var(--navy); line-height: 1.5; }
.tq-prog { height: 6px; border-radius: 999px; background: #e9edf5; overflow: hidden; margin-bottom: 3px; }
.tq-prog span { display: block; height: 100%; background: linear-gradient(90deg, #7fd3cf, var(--teal)); transition: width .5s; }
.tq-states { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tq-states span { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.tq-states .st-waiting { background: #fff4e8; color: #c2611a; }
.tq-states .st-accepted { background: #e6f8f6; color: #0e8585; }
.tq-states .st-deferred { background: #eef1f7; color: #6b7590; }
.rq-evt.trainer { background: linear-gradient(135deg, #fdf0f8, #fff); border-color: #f2b8d9; }
.rq-evt-tr { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; background: var(--fuchsia); color: #fff; font-size: 10.5px; font-weight: 800; }
@media (max-width: 1000px) { .tq-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .tq-row { flex-direction: column; } }
.tq-auto { position: relative; } .tq-auto input { inset: 0; width: 100%; height: 100%; margin: 0; }

/* ---- Workshop title in the top bar ---- */
.topbar-center { gap: 1px; }
.topbar-center > span { font-size: 10.5px !important; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--fuchsia) !important; }
.topbar-center b { font-family: 'Sora', 'Cairo', var(--font); font-size: 19px; font-weight: 800; letter-spacing: -.01em; line-height: 1.25; max-width: 46vw;
  background: linear-gradient(90deg, var(--navy) 0%, #3a3f9e 55%, var(--fuchsia) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[lang="ar"] .topbar-center b { letter-spacing: 0; }
html[lang="ar"] .topbar-center > span { letter-spacing: 0; font-size: 11.5px !important; }
@media (max-width: 1100px) { .topbar-center b { font-size: 16px; max-width: 34vw; } }

/* ---- Stakeholder map: Power / Interest matrix (2×2, drag & drop) ---- */
.pim { display: grid; grid-template-columns: 30px minmax(0, 1fr); grid-template-rows: auto auto; gap: 6px 8px; direction: ltr; }
.pim-y { grid-row: 1; grid-column: 1; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 6px 0; }
.pim-y b { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 12.5px; font-weight: 800; color: var(--navy); letter-spacing: .04em; position: relative; }
.pim-y b::before { content: '▲'; display: block; margin-bottom: 6px; font-size: 10px; color: var(--navy-300); transform: rotate(180deg); }
.pim-y span, .pim-x span { font-size: 10.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.pim-y span { writing-mode: vertical-rl; transform: rotate(180deg); }
.pim-x { grid-row: 2; grid-column: 2; display: flex; justify-content: space-between; align-items: center; padding: 0 6px; }
.pim-x b { font-size: 12.5px; font-weight: 800; color: var(--navy); letter-spacing: .04em; }
.pim-x b::after { content: ' ▶'; font-size: 10px; color: var(--navy-300); }
.pim-grid { grid-row: 1; grid-column: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(200px, auto); gap: 8px; }
.pim-q { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 18px; cursor: pointer;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 18%, #fff), color-mix(in srgb, var(--c) 7%, #fff));
  border: 2px solid color-mix(in srgb, var(--c) 40%, #fff); transition: transform .15s, box-shadow .2s, border-color .2s, background .2s; }
.pim-q:hover { border-color: color-mix(in srgb, var(--c) 65%, #fff); }
[dir="rtl"] .pim-q { direction: rtl; }
.pim-q.q-hl { border-start-start-radius: 26px; } .pim-q.q-hh { border-start-end-radius: 26px; }
.pim-q.q-ll { border-end-start-radius: 26px; } .pim-q.q-lh { border-end-end-radius: 26px; }
.pim-qh { display: flex; align-items: flex-start; gap: 8px; }
.pim-qh > div { flex: 1; min-width: 0; }
.pim-qh b { display: block; font-size: 13.5px; font-weight: 800; color: color-mix(in srgb, var(--c) 80%, #0f1f45); }
.pim-qh small { display: block; font-size: 11px; line-height: 1.4; color: color-mix(in srgb, var(--c) 45%, #3a4563); }
.pim-ic { flex-shrink: 0; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--c); color: #fff; box-shadow: 0 4px 10px -5px var(--c); }
.pim-qh em { flex-shrink: 0; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; background: #fff; color: var(--c); font-style: normal; font-size: 12px; font-weight: 800; border: 1.5px solid color-mix(in srgb, var(--c) 40%, #fff); }
.pim-chips { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; flex: 1; }
.pim-empty { font-size: 11.5px; color: color-mix(in srgb, var(--c) 50%, #8d97ad); font-style: italic; padding: 6px 2px; }
.pim-drop { display: none; position: absolute; inset: 0; border-radius: inherit; place-items: center; font-size: 13px; font-weight: 800; color: #fff; background: color-mix(in srgb, var(--c) 82%, transparent); pointer-events: none; z-index: 3; }
.pim.dragging .pim-q { border-style: dashed; }
.pim-q.over { transform: scale(1.02); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 30%, transparent), 0 14px 30px -18px var(--c); border-style: solid; }
.pim-q.over .pim-drop { display: grid; animation: popIn .25s ease; }
.pim.moving .pim-q { border-style: dashed; animation: qPulse 1.2s ease-in-out infinite; }
.pim.moving .pim-q:hover .pim-drop { display: grid; }
.pim .sh { touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; border-color: color-mix(in srgb, var(--c) 35%, #fff); }
.pim .sh:active { cursor: grabbing; }
.pim .sh.dragging { opacity: .3; }
.sh-ghost { position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none; margin: 0; box-shadow: 0 18px 36px -12px rgba(15, 31, 69, .45); opacity: .95; cursor: grabbing; }
@media (max-width: 720px) {
  .pim { grid-template-columns: 22px minmax(0, 1fr); gap: 4px 6px; }
  .pim-grid { grid-auto-rows: minmax(150px, auto); gap: 6px; }
  .pim-q { padding: 8px; }
  .pim-qh small { display: none; }
  .pim-ic { width: 24px; height: 24px; }
  .pim-qh b { font-size: 12px; }
}
@media (max-width: 720px) {
  .pim .sh { width: 100%; padding: 5px; gap: 4px; }
  .pim .sh-txt b { font-size: 11.5px; overflow-wrap: normal; word-break: normal; hyphens: auto; }
  .pim .sh-txt small, .pim .sh .u-ai { display: none; }
  .pim .sh-crown { width: 20px; height: 20px; border-radius: 6px; }
  .pim .sh-crown:not(.on) { opacity: .55; }
  .pim .sh .u-x { margin-inline-start: auto; }
}

/* ---- Trainer spectator mode (read-only view of a team) ---- */
.spec-bar { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 28px; color: #fff; background: linear-gradient(90deg, #0f1f45, #3a2a8f 60%, #d62f8f); }
.spec-bar span { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.spec-bar small { opacity: .85; }
.spec-bar .btn-navy { background: #fff; color: var(--navy); }
.me-chip .av.spec { background: linear-gradient(135deg, #3a2a8f, #d62f8f); color: #fff; display: grid; place-items: center; }
.spectating #team-main input, .spectating #team-main textarea, .spectating #team-main select { pointer-events: none; background: #f7f8fb; }
.tc-adm { margin: 10px 0 4px; justify-content: center; }
@media (max-width: 720px) { .spec-bar { padding: 8px 14px; } .spec-bar small { display: none; } }

/* ==========================================================================
   WORK REPORT (preview overlay + print / Save as PDF)
   ========================================================================== */
body.rp-capturing .modal-wrap { visibility: hidden !important; transition: none !important; }
.rp-open-btn { margin-bottom: 8px; justify-content: center; }
.tc-btns { display: flex; gap: 6px; margin: 10px 0 4px; flex-wrap: wrap; }
.tc-btns .tc-adm { flex: 1 1 auto; margin: 0; justify-content: center; }
.rp-chs { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.rp-ch { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; color: var(--navy); }
.rp-ch input { width: auto; accent-color: var(--fuchsia); }
.rp-ch small { margin-inline-start: auto; color: var(--muted); font-weight: 600; font-size: 11.5px; }
.rp-ch.off { opacity: .55; cursor: default; }
.rp-tools { display: flex; gap: 6px; margin-top: 8px; }

body.rp-open { overflow: hidden; }
.rp { position: fixed; inset: 0; z-index: 900; display: flex; flex-direction: column; background: #e9edf5; }
.rp-bar-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 20px; background: #0f1f45; color: #fff; }
.rp-bar-top b { display: inline-flex; align-items: center; gap: 8px; }
.rp-bar-top small { opacity: .75; }
.rp-acts { margin-inline-start: auto; display: flex; gap: 8px; }
.rp-acts .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.rp-paper { flex: 1; overflow: auto; padding: 24px 12px 60px; }
.rp-page { width: min(210mm, 100%); margin: 0 auto 18px; padding: 16mm 14mm; background: #fff; box-shadow: 0 10px 30px -18px rgba(15,31,69,.45); border-radius: 6px; }
.rp-cover { display: flex; flex-direction: column; gap: 14px; background: radial-gradient(circle at 100% 0%, #efe9ff, transparent 45%), radial-gradient(circle at 0% 100%, #e3f7f5, transparent 45%), #fff; }
.rp-kicker { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--fuchsia); }
.rp-cover h1 { font-family: 'Sora', 'Cairo', var(--font); font-size: 30px; line-height: 1.2; margin: 8px 0 4px; color: var(--navy); }
.rp-org { color: var(--muted); font-weight: 600; }
.rp-cover-adm { max-width: 135mm; margin: 0 auto; width: 100%; }
.rp-cover-adm .adm-iters { display: none; }
.rp-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; padding-top: 12px; border-top: 2px solid var(--navy-50); }
.rp-meta dt { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.rp-meta dd { margin: 2px 0 0; font-weight: 700; color: var(--navy); }
.rp-h { display: flex; align-items: center; gap: 8px; font-size: 20px; color: var(--navy); margin-bottom: 8px; }
.rp-h3 { font-size: 14px; color: var(--navy); margin: 16px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.rp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rp-table th { text-align: start; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px; border-bottom: 2px solid var(--line); }
.rp-table td { padding: 6px; border-bottom: 1px solid #eef1f6; vertical-align: middle; }
.rp-letter { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--navy-50); color: var(--navy); font-size: 11px; margin-inline-end: 4px; }
.st-completed .rp-letter { background: var(--teal); color: #fff; } .st-active .rp-letter { background: var(--fuchsia); color: #fff; }
.rp-st { font-size: 11px; font-weight: 800; color: var(--muted); } .st-completed .rp-st { color: var(--teal-600, #0e8585); } .st-active .rp-st { color: var(--fuchsia); }
.rp-bar { display: inline-block; vertical-align: middle; width: 70px; height: 6px; border-radius: 999px; background: #e9edf5; overflow: hidden; }
.rp-bar i { display: block; height: 100%; background: linear-gradient(90deg, #7fd3cf, #0e8585); }
.rp-bdat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rp-bdat > div { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--c) 30%, #fff); border-inline-start: 5px solid var(--c); }
.rp-bdat > div > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rp-bdat b { font-size: 12.5px; color: var(--navy); } .rp-bdat small { font-size: 10.5px; color: var(--muted); }
.rp-bdat .rp-bar { width: 100%; } .rp-bdat .rp-bar i { background: var(--c); }
.rp-bdat em { font-style: normal; font-weight: 800; color: var(--c); font-size: 13px; }
.rp-dom { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 800; font-size: 12px; flex-shrink: 0; }
.rp-line { font-size: 13px; color: #3a4563; }
.rp-chhead { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--fuchsia); padding-bottom: 8px; margin-bottom: 10px; border-bottom: 2px solid var(--fuchsia-100, #fde7f3); }
.rp-doc .rf-doc { box-shadow: none; }
.rp-doc .saw-sign-row, .rp-doc .ad-sign, .rp-doc [data-print], .rp-doc .modal-x { display: none !important; }
.rp-doc .cert { margin: 0 auto; }
@media (max-width: 720px) { .rp-page { padding: 18px 14px; } .rp-meta, .rp-bdat { grid-template-columns: minmax(0, 1fr); } .rp-bar-top small { display: none; } }

@media print {
  @page { size: A4; margin: 12mm; }
  body.printing-report > *:not(#report-print) { display: none !important; }
  body.printing-report { overflow: visible !important; background: #fff !important; }
  body.printing-report #report-print { position: static !important; display: block !important; background: #fff !important; }
  body.printing-report .rp-bar-top { display: none !important; }
  body.printing-report .rp-paper { overflow: visible !important; padding: 0 !important; }
  body.printing-report .rp-page { width: auto !important; margin: 0 !important; padding: 0 !important; box-shadow: none !important; border-radius: 0 !important; break-after: page; }
  body.printing-report .rp-page:last-child { break-after: auto; }
  body.printing-report * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; animation: none !important; transition: none !important; }
  body.printing-report tr, body.printing-report .rp-bdat > div, body.printing-report .rf-sec { break-inside: avoid; }
}

/* ---- Workshop report ---- */
.wr-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.wr-tiles div { padding: 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); text-align: center; }
.wr-tiles b { display: block; font-family: 'Sora', var(--font); font-size: 28px; color: var(--navy); }
.wr-tiles small { color: var(--muted); font-weight: 700; font-size: 11.5px; }
.wr-teamcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.wr-teamcards > div { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.wr-teamcards b { color: var(--navy); } .wr-teamcards small { color: var(--muted); font-size: 11px; }
.wr-teamcards em { position: absolute; top: 10px; inset-inline-end: 12px; font-style: normal; font-weight: 800; color: var(--teal-600, #0e8585); }
.wr-strip { display: inline-flex; gap: 2px; direction: ltr; }
.wr-strip i { width: 16px; height: 16px; border-radius: 4px; display: grid; place-items: center; font-style: normal; font-size: 9px; font-weight: 800; background: #e9edf5; color: var(--muted); }
.wr-strip i.done { background: var(--teal); color: #fff; } .wr-strip i.cur { background: var(--fuchsia); color: #fff; }
.wr-table td { font-size: 11.5px; }
.wr-bd { display: inline-flex; gap: 2px; direction: ltr; }
.wr-bd i { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; font-style: normal; font-size: 9.5px; font-weight: 800; color: #fff; background: linear-gradient(0deg, var(--c) var(--p), color-mix(in srgb, var(--c) 25%, #fff) var(--p)); }
.wr-sent { display: flex; flex-direction: column; gap: 6px; }
.wr-sent > div { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); border-inline-start: 4px solid var(--c); break-inside: avoid; }
.wr-sent p { font-size: 12.5px; margin-bottom: 3px; }
.wr-s { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; margin: 2px 2px 0 0; }
.wr-s.st-waiting { background: #fff4e8; color: #c2611a; } .wr-s.st-accepted { background: #e6f8f6; color: #0e8585; } .wr-s.st-deferred { background: #eef1f7; color: #6b7590; }
@media (max-width: 720px) { .wr-tiles, .wr-teamcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wr-table { display: block; overflow-x: auto; } }

/* ==========================================================================
   EXAM TRAINING (TOGAF Foundation)
   ========================================================================== */
.exam-entry { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 16px 18px; text-decoration: none; color: var(--navy); max-width: 520px;
  background: linear-gradient(120deg, #fff, #f6f1ff 60%, #fdeef6); border: 1.5px solid #e4d8fb; transition: transform .2s, box-shadow .2s; }
.exam-entry:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.exam-entry > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.exam-entry small { font-size: 11px; font-weight: 800; color: var(--fuchsia); text-transform: uppercase; letter-spacing: .06em; }
.exam-entry b { font-size: 17px; } .exam-entry em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.exam-entry-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #6d4ae0, #d62f8f); box-shadow: 0 8px 18px -10px #6d4ae0; flex-shrink: 0; }
.linkish { border: 0; background: none; padding: 0; font: inherit; color: var(--fuchsia); cursor: pointer; text-decoration: underline; }

.exm { max-width: 1180px; margin: 0 auto; padding: 18px 28px 60px; display: flex; flex-direction: column; gap: 16px; }
.exm-loading { display: grid; place-items: center; padding: 80px; }
.exm-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 14px; background: #eef4ff; color: #1d3f8f; font-size: 13px; font-weight: 600; }
.exm-note.admin { background: linear-gradient(90deg, #f1ecff, #fdeef6); color: #4b2fa8; }
.exm-note .btn { margin-inline-start: auto; }
.exm-auth { max-width: 460px; margin: 20px auto; padding: 28px; text-align: center; display: flex; flex-direction: column; gap: 12px; }
.exm-auth form { display: flex; flex-direction: column; gap: 10px; text-align: start; }
.exm-auth h1 { font-size: 22px; color: var(--navy); }
.exm-badge { width: 60px; height: 60px; margin: 0 auto; border-radius: 18px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #6d4ae0, #d62f8f); box-shadow: 0 12px 24px -12px #6d4ae0; }
.exm-tabs { display: inline-flex; align-self: center; padding: 3px; border-radius: 999px; background: var(--navy-50); }
.exm-tabs button { border: 0; background: none; padding: 7px 16px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; }
.exm-tabs button.on { background: #fff; color: var(--navy); box-shadow: var(--shadow-sm); }

.exm-hero { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; padding: 22px 24px; background: radial-gradient(circle at 100% 0%, #efe9ff, transparent 45%), radial-gradient(circle at 0% 100%, #fdeef6, transparent 40%), #fff; }
.exm-hero h1 { font-size: 24px; color: var(--navy); margin: 4px 0; }
.exm-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.exm-stats div { min-width: 92px; padding: 10px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); text-align: center; }
.exm-stats b { display: block; font-family: 'Sora', var(--font); font-size: 22px; color: var(--navy); }
.exm-stats small { font-size: 11px; font-weight: 700; color: var(--muted); }
.exm-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.exm-mode { display: flex; flex-direction: column; gap: 10px; padding: 20px; position: relative; overflow: hidden; }
.exm-mode h2 { font-size: 18px; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.exm-mode > .btn { align-self: flex-start; margin-top: 4px; }
.exm-mode-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: var(--teal); }
.exm-mode.exam .exm-mode-ic { background: linear-gradient(135deg, #0f1f45, #3a3f9e); }
.exm-mode.learn { border-top: 5px solid var(--teal); } .exm-mode.exam { border-top: 5px solid #3a3f9e; }
.exm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.exm-chips button { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--navy); cursor: pointer; text-align: start; }
.exm-chips button small { font-weight: 600; color: var(--muted); }
.exm-chips button.on { border-color: var(--fuchsia); background: #fdeef6; color: var(--fuchsia); }
.exm-history h2 { font-size: 16px; color: var(--navy); display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.exm-history { padding: 18px 20px; }
.exm-res { font-size: 11.5px; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: #fff4e8; color: #c2611a; }
.exm-res.ok { background: #e6f8f6; color: #0e8585; }

.exm-play { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.exm-bar { height: 6px; border-radius: 999px; background: #e9edf5; overflow: hidden; }
.exm-bar-fill { display: block; height: 100%; background: linear-gradient(90deg, #7fd3cf, var(--teal)); transition: width .4s; }
.exm-qhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.exm-tag { font-size: 11.5px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: #f1ecff; color: #6d4ae0; }
.exm-qn { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.exm-qhead .btn { margin-inline-start: auto; }
.exm-q { font-size: 19px; line-height: 1.55; color: var(--navy); text-align: left; }
.exm-q-ar { font-size: 15px; line-height: 1.8; color: #4b2fa8; background: #f8f5ff; padding: 8px 12px; border-radius: 10px; font-family: 'IBM Plex Sans Arabic', var(--font); }
.exm-opts { display: flex; flex-direction: column; gap: 8px; }
.exm-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font: inherit; font-size: 14.5px; color: var(--navy); cursor: pointer; text-align: left; transition: border-color .15s, background .15s, transform .15s; direction: ltr; }
.exm-opt:hover:not(:disabled) { border-color: #b9a8f0; transform: translateX(2px); }
.exm-opt > b { flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--navy-50); color: var(--navy); font-size: 13px; }
.exm-opt > span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.exm-opt small { font-size: 12.5px; color: #6d4ae0; font-family: 'IBM Plex Sans Arabic', var(--font); text-align: right; }
.exm-opt.picked { border-color: #6d4ae0; background: #f6f2ff; } .exm-opt.picked > b { background: #6d4ae0; color: #fff; }
.exm-opt.right { border-color: var(--teal); background: #e9f9f7; } .exm-opt.right > b { background: var(--teal); color: #fff; }
.exm-opt.right .ic { color: var(--teal); }
.exm-opt.wrong { border-color: #d64545; background: #fff3f3; } .exm-opt.wrong > b { background: #d64545; color: #fff; }
.exm-opt.dim { opacity: .55; }
.exm-opt:disabled { cursor: default; }
.exm-explain { padding: 14px 16px; border-radius: 14px; background: #f5fbfb; border: 1px solid #bfe7e3; display: flex; flex-direction: column; gap: 8px; animation: fadeUp .35s ease; }
.exm-explain.no { background: #fff8f3; border-color: #f3c79a; }
.exm-explain > b { color: var(--teal-600, #0e8585); } .exm-explain.no > b { color: #c2611a; }
.exm-explain p { font-size: 13.5px; line-height: 1.65; color: #3a4563; display: flex; flex-direction: column; gap: 2px; }
.exm-trick { flex-direction: row !important; flex-wrap: wrap; align-items: baseline; gap: 6px !important; padding: 8px 10px; border-radius: 10px; background: #fdf0f8; color: #8a1f5c !important; }
.exm-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
.exm-nav > span { flex: 1; }
.exm-nav .btn-ghost.flag-on { color: #e2853a; border-color: #e2853a; }

.exm-exam { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start; }
.exm-side { padding: 16px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: calc(var(--topbar-h, 57px) + 90px); }
.exm-clock { --p: 100%; width: 140px; height: 140px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#3a3f9e var(--p), #e9edf5 0); position: relative; }
.exm-clock::before { content: ''; position: absolute; inset: 11px; border-radius: 50%; background: #fff; }
.exm-clock span { position: relative; font-family: 'Sora', var(--font); font-size: 28px; font-weight: 800; color: var(--navy); direction: ltr; }
.exm-clock.low { background: conic-gradient(#d64545 var(--p), #fde8e8 0); animation: pulseBtn 1s ease infinite; }
.exm-clock.low span { color: #d64545; }
.exm-map { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; direction: ltr; }
.exm-map button { aspect-ratio: 1; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; font: inherit; font-size: 12px; font-weight: 800; color: var(--muted); cursor: pointer; position: relative; }
.exm-map button.done { background: #3a3f9e; border-color: #3a3f9e; color: #fff; }
.exm-map button.flag::after { content: ''; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: #e2853a; border: 2px solid #fff; }
.exm-map button.cur { outline: 2.5px solid var(--fuchsia); outline-offset: 1px; }

.exm-done, .exm-result { padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.exm-done { align-items: center; text-align: center; max-width: 560px; margin: 10px auto; width: 100%; }
.exm-done h1, .exm-result h1 { font-size: 24px; color: var(--navy); }
.exm-ring { display: grid; place-items: center; }
.exm-done-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.exm-result-top { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.exm-result.pass { border-top: 6px solid var(--teal); } .exm-result.fail { border-top: 6px solid #e2853a; }
.exm-saved { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-weight: 700; color: var(--muted); }
.exm-topics { display: flex; flex-direction: column; gap: 6px; }
.exm-topics > div { display: grid; grid-template-columns: minmax(0, 1fr) 160px 46px; gap: 10px; align-items: center; font-size: 13px; }
.exm-topics .rp-bar { width: 100%; }
.exm-topics b { text-align: end; color: var(--navy); }
.exm-review { display: flex; flex-direction: column; gap: 6px; }
.exm-review details { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: #fff; border-inline-start: 4px solid var(--teal); }
.exm-review details.no { border-inline-start-color: #d64545; }
.exm-review summary { cursor: pointer; display: flex; gap: 8px; align-items: baseline; font-size: 13.5px; color: var(--navy); }
.exm-review summary span { flex: 1; text-align: left; }
.exm-review details p { font-size: 13px; color: #3a4563; margin-top: 6px; line-height: 1.6; }
.qb-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.qb-file { display: block; cursor: pointer; }
.qb-file input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.qb-file span { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 22px; border-radius: 14px; border: 2px dashed #c9bdf2; background: #faf8ff; color: #4b2fa8; font-weight: 700; }
.qb-file:hover span { background: #f3eeff; }
.qb-err { padding: 10px 12px; border-radius: 12px; background: #fff3f3; color: #a12b2b; font-size: 12.5px; }
.qb-err ul { margin: 6px 0 0; padding-inline-start: 18px; }
.qb-ok { color: #0e8585; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.qb-prev { font-size: 12.5px; color: #3a4563; } .qb-prev p { margin: 4px 0; }
@media (max-width: 900px) { .exm-modes { grid-template-columns: minmax(0, 1fr); } .exm-exam { grid-template-columns: minmax(0, 1fr); } .exm-side { position: static; } .exm-clock { width: 104px; height: 104px; } .exm-clock span { font-size: 22px; } .exm-map { grid-template-columns: repeat(10, minmax(0, 1fr)); } }
@media (max-width: 720px) { .exm { padding: 14px 12px 40px; } .exm-play { padding: 16px 14px; } .exm-q { font-size: 16.5px; } .exm-opt { font-size: 13.5px; padding: 10px 12px; } .exm-topics > div { grid-template-columns: minmax(0, 1fr) 80px 40px; } .exm-map { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.exm-sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.exm-set { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 14px; border: 1.5px solid #d6d9ee; background: linear-gradient(160deg, #fff, #f4f5fd); font: inherit; text-align: start; cursor: pointer; transition: transform .15s, border-color .15s; }
.exm-set:hover { transform: translateY(-2px); border-color: #3a3f9e; }
.exm-set b { font-family: 'Sora', 'Cairo', var(--font); font-size: 16px; color: var(--navy); }
.exm-set small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.exm-set em { font-style: normal; font-size: 11.5px; font-weight: 800; color: #3a3f9e; margin-top: 4px; }
.exm-set.passed { border-color: var(--teal); background: linear-gradient(160deg, #fff, #e9f9f7); } .exm-set.passed em { color: var(--teal-600, #0e8585); }
.exm-set i { position: absolute; top: 8px; inset-inline-end: 8px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: #fff; }
.qb-sets { display: flex; flex-wrap: wrap; gap: 6px; } .qb-sets span { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: #eef0fb; color: #3a3f9e; }

/* ---- Home: three columns around the ADM (exam left · ADM centre · join right) ---- */
.home.home3 { max-width: 1480px; padding: 26px 28px 30px; }
.h3-head { text-align: center; max-width: 820px; margin: 0 auto 18px; }
.h3-head h1 { font-size: clamp(30px, 3.6vw, 46px); font-weight: 800; margin: 10px 0 6px; letter-spacing: -.035em; }
.h3-head .lead { margin: 0 auto; max-width: 720px; }
.h3-grid { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr) minmax(260px, 340px); grid-template-areas: "exam adm join"; gap: 26px; align-items: center; }
/* Same physical sides in Arabic: exam on the left, join on the right. */
[dir="rtl"] .h3-grid { grid-template-areas: "join adm exam"; }
.h3-exam { grid-area: exam; display: flex; flex-direction: column; gap: 14px; }
.h3-adm { grid-area: adm; max-width: 640px; width: 100%; margin: 0 auto 40px; }
.h3-join { grid-area: join; margin-top: 0; max-width: none; }
.h3-join-t { display: flex; align-items: center; gap: 8px; font-size: 17px; color: var(--navy); margin-bottom: 12px; }
.h3-adm .coach-welcome { inset-inline-end: 0; bottom: -36px; }
.h3-exam .continue-box { margin-top: 0; max-width: none; }

.exam-panel { display: flex; flex-direction: column; gap: 6px; padding: 20px; text-decoration: none; color: var(--navy);
  background: radial-gradient(circle at 100% 0%, #f1ecff, transparent 55%), radial-gradient(circle at 0% 100%, #fdeef6, transparent 50%), #fff;
  border: 1.5px solid #e4d8fb; transition: transform .2s, box-shadow .2s; }
.exam-panel:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.exam-panel .exam-entry-ic { width: 52px; height: 52px; margin-bottom: 6px; }
.exam-panel small { font-size: 11px; font-weight: 800; color: var(--fuchsia); text-transform: uppercase; letter-spacing: .06em; }
.exam-panel b { font-size: 20px; line-height: 1.25; }
.exam-panel em { font-style: normal; font-size: 13px; color: var(--muted); }
.exam-panel ul { list-style: none; margin: 8px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.exam-panel li { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: #3a4563; line-height: 1.45; }
.exam-panel li .ic { color: #6d4ae0; flex-shrink: 0; margin-top: 2px; }

@media (max-width: 1180px) {
  .h3-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "exam join" "adm adm"; align-items: start; }
  [dir="rtl"] .h3-grid { grid-template-areas: "join exam" "adm adm"; }
  .h3-adm { max-width: 560px; margin-bottom: 56px; }
}
@media (max-width: 720px) {
  .home.home3 { padding: 16px 12px 30px; }
  .h3-grid, [dir="rtl"] .h3-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "join" "exam" "adm"; gap: 18px; }
  .h3-adm { margin-bottom: 70px; }
}
.h3-join-help { font-size: 13px; line-height: 1.65; color: var(--muted); margin: -4px 0 14px; padding: 10px 12px; border-radius: 12px; background: #f6f7fc; border-inline-start: 3px solid var(--fuchsia); }

/* ---- Home fits one screen: compact header, ADM sized by the viewport height ---- */
.home.home3 { padding-top: 14px; padding-bottom: 10px; }
.h3-head { position: relative; max-width: none; margin-bottom: 8px; padding: 0 200px; }
.h3-head h1 { font-size: clamp(26px, 2.7vw, 40px); margin: 0 0 2px; }
.h3-head .hero-ar { margin-bottom: 0; font-size: 15px; }
/* “Trainee entrance” sits on the right, level with the title (same side in both languages). */
.h3-eyebrow { position: absolute; top: 50%; right: 0; transform: translateY(-50%); margin: 0; padding: 6px 12px; border-radius: 999px; background: #fdeef6; }
.h3-grid { --h3-room: calc(100vh - var(--topbar-h, 59px) - 130px); align-items: center; gap: 22px; }
.h3-adm { max-width: min(640px, calc(var(--h3-room) * 0.877)); margin: 0 auto 24px; }
.h3-adm .coach-welcome { bottom: -18px; }
.h3-adm .cw-photo { width: 108px; height: 108px; }
.h3-adm .cw-bubble { margin-bottom: 56px; }
.exam-panel { padding: 16px; gap: 4px; }
.exam-panel .exam-entry-ic { width: 44px; height: 44px; margin-bottom: 2px; }
.exam-panel b { font-size: 18px; }
.exam-panel ul { margin: 6px 0 10px; gap: 5px; }
.h3-exam .continue-box .list { max-height: 186px; overflow-y: auto; padding-inline-end: 4px; }
.h3-exam .continue-box .section-title { margin-bottom: 6px; }
.home3 + .foot, .page-home .foot { padding: 8px 16px; }
.page-home .how-row { display: none; } /* the coach bubble opens the same explainer */
.h3-join .hint { margin-bottom: 0; }
/* Short screens (laptops with browser bars): trim secondary text. */
@media (min-width: 1181px) and (max-height: 820px) {
  .exam-panel ul, .exam-panel em { display: none; }
  .h3-join-help { font-size: 12px; padding: 8px 10px; margin-bottom: 10px; }
  .h3-join .or-row { margin: 10px 0 8px; }
  .h3-join .hint { display: none; }
  .code-input.big { padding: 10px; font-size: 26px; }
  .h3-exam .continue-box .list { max-height: 124px; }
}
@media (max-width: 1180px) { .h3-head { padding: 0; } .h3-eyebrow { position: static; transform: none; display: inline-flex; margin-bottom: 6px; } .h3-adm { max-width: 560px; } .page-home .how-row { display: block; } }
.h3-grid { --h3-room: calc(100vh - var(--topbar-h, 59px) - 172px); }
.h3-eyebrow { top: clamp(13px, 1.35vw, 20px); transform: translateY(-50%); }
/* Virtual Coach above the exam card (no longer over the ADM) */
.h3-coach { position: static; inset: auto; align-self: stretch; display: flex; align-items: center; gap: 12px; text-align: start; animation: popIn .7s cubic-bezier(.2, .9, .3, 1.3) .4s both; }
.h3-coach .cw-photo { width: 92px; height: 92px; }
.h3-coach .cw-bubble { flex: 1; max-width: none; margin: 0; font-size: 13px; }
.h3-coach .cw-bubble::after { bottom: auto; top: 50%; inset-inline-end: auto; inset-inline-start: -8px; transform: translateY(-50%) rotate(135deg); }
[dir="rtl"] .h3-coach .cw-bubble::after { transform: translateY(-50%) rotate(-45deg); }
.h3-adm { margin-bottom: 0; }
.h3-exam { gap: 12px; }
.h3-exam .continue-box .list { max-height: 132px; }
@media (min-width: 1181px) and (max-height: 820px) { .h3-coach .cw-photo { width: 72px; height: 72px; } .h3-coach .cw-bubble { font-size: 12px; padding: 9px 11px; } .h3-exam .continue-box .list { max-height: 72px; } }
@media (max-width: 720px) { .h3-coach .cw-photo { width: 76px; height: 76px; } }
/* Iteration labels around the ADM: orange and a little larger */
.adm-iter { fill: #e2702a; font-size: 13px; font-weight: 800; letter-spacing: .1em; }
html[lang="ar"] .adm-iter { font-size: 16px; letter-spacing: 0; }

/* ---- Home: light separators (no extra height) ---- */
/* 1. A fine gradient hairline under the title */
.h3-head::after { content: ''; display: block; width: min(520px, 70%); height: 2px; margin: 8px auto 0; border-radius: 2px;
  background: linear-gradient(90deg, transparent, #6d4ae0 25%, var(--fuchsia) 50%, #e2702a 75%, transparent); opacity: .55; }
/* 2. A stronger soft glow behind the ADM — the “stage” of the page */
.home3 .h3-adm { isolation: isolate; }
.home3 .h3-adm::before { inset: 4% 0; z-index: -1; background: radial-gradient(circle at 50% 52%, rgba(109, 74, 224, .10), rgba(214, 47, 143, .06) 38%, transparent 66%); }
/* 3. A very light dot grid, fading towards the edges (as on the ADM cycle page) */
.home3 { position: relative; }
.home3::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(var(--navy-100) 1.1px, transparent 1.1px); background-size: 24px 24px; opacity: .6;
  -webkit-mask-image: radial-gradient(ellipse at 50% 55%, #000 25%, transparent 72%); mask-image: radial-gradient(ellipse at 50% 55%, #000 25%, transparent 72%); }
.page-home { position: relative; z-index: 0; }
.home3::before { background-image: radial-gradient(rgba(29, 63, 143, .16) 1.2px, transparent 1.3px); opacity: 1; }

/* ---- Exam training console (site admin; embedded in the admin panel with ?embed=1) ---- */
.qb-embed { background: transparent; }
.qb-embed .exm { padding: 4px 2px 20px; max-width: none; }
.qb-tabs { align-self: flex-start; }
.qb-setlist { display: flex; flex-direction: column; gap: 6px; }
.qb-setlist > div { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: #f6f7fc; border: 1px solid var(--line); }
.qb-setlist b { font-family: 'Sora', 'Cairo', var(--font); color: var(--navy); }
.qb-setlist span { color: var(--muted); font-size: 12.5px; font-weight: 700; flex: 1; }
.qb-del:hover { color: #b91c1c; border-color: #fca5a5; background: #fff5f5; }
.qb-lhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.qb-lhead h2 { margin: 0 !important; }
.qb-lhead input { max-width: 280px; padding: 8px 12px; }
.qb-learners .rp-table td, .qb-detail .rp-table td { font-size: 12.5px; }
.qb-lrow { cursor: pointer; }
.qb-lrow:hover td { background: #f8f6ff; }
.qb-lrow.on td { background: #f1ecff; }
.qb-detail { animation: fadeUp .3s ease; }
@media (max-width: 900px) { .qb-learners, .qb-detail { overflow-x: auto; } }

/* ---- Exam console · Questions tab & editor ---- */
.qb-qbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.qb-qbar select, .qb-qbar input { width: auto; padding: 8px 10px; font-size: 13px; }
.qb-qbar input { flex: 1; min-width: 180px; }
.qb-qbar .btn { margin-inline-start: auto; }
.qb-bulk { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 10px; border-radius: 12px; background: #f1ecff; color: #4b2fa8; font-size: 13px; }
.qb-bulk label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; } .qb-bulk select { width: auto; padding: 5px 8px; font-size: 12.5px; }
.qb-qtable td { font-size: 12.5px; vertical-align: top; }
.qb-qtable input[type=checkbox] { width: auto; accent-color: #6d4ae0; }
.qb-qrow { cursor: pointer; } .qb-qrow:hover td { background: #f8f6ff; }
.qb-qtext { max-width: 520px; text-align: left; line-height: 1.5; }
.qb-setchip { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: #eef0fb; color: #3a3f9e; white-space: nowrap; }
.qb-flags { white-space: nowrap; } .qb-flags i { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: #fff4e8; color: #c2611a; margin-inline-end: 3px; }
.modal.qb-editor-modal { width: min(1180px, 100%); max-height: 94vh; }
.qb-editor-modal .modal-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.qb-ed { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.qb-form { display: flex; flex-direction: column; gap: 9px; }
.qb-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); min-width: 0; }
.qb-form textarea { resize: vertical; font-size: 13.5px; }
.qb-row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 9px; }
.qb-lbl { font-size: 12px; font-weight: 800; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.qb-opts { display: flex; flex-direction: column; gap: 6px; }
.qb-opt { display: grid; grid-template-columns: auto minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 6px; align-items: center; padding: 6px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; }
.qb-opt.right { border-color: var(--teal); background: #effaf8; }
.qb-opt input:not([type=radio]) { padding: 7px 9px; font-size: 13px; }
.qb-radio { flex-direction: row !important; align-items: center; gap: 4px !important; cursor: pointer; }
.qb-radio input { width: auto; accent-color: var(--teal); }
.qb-radio b { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--navy-50); color: var(--navy); font-size: 12px; }
.qb-opt.right .qb-radio b { background: var(--teal); color: #fff; }
.qb-prevpane { position: sticky; top: 0; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: #fafbfe; border: 1px dashed #c9d2e8; }
.qb-prevpane .exm-q { font-size: 16px; } .qb-prevpane .exm-opt { cursor: default; font-size: 13px; padding: 9px 11px; }
@media (max-width: 900px) { .qb-ed { grid-template-columns: minmax(0, 1fr); } .qb-prevpane { position: static; } .qb-opt { grid-template-columns: auto minmax(0, 1fr) auto; } .qb-opt input[data-optar] { grid-column: 2; } }

/* ---- Exam console · Tests tab ---- */
.qb-tbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.qb-tbar small { flex: 1 1 260px; display: inline-flex; gap: 5px; align-items: center; }
.qb-tcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.qb-tcard { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-top: 5px solid #3a3f9e; }
.qb-tcard-h { display: flex; align-items: baseline; justify-content: space-between; }
.qb-tcard-h b { font-family: 'Sora', 'Cairo', var(--font); font-size: 18px; color: var(--navy); }
.qb-tcard-h span { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.qb-tcard .exm-topics > div { grid-template-columns: minmax(0, 1fr) 90px 28px; font-size: 12px; }
.qb-pos { display: flex; gap: 8px; align-items: flex-end; height: 74px; padding-top: 4px; direction: ltr; }
.qb-pos div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.qb-pos i { width: 100%; max-width: 34px; min-height: 3px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #8b6cf0, #3a3f9e); }
.qb-pos b { font-size: 11px; color: var(--navy); } .qb-pos small { font-size: 10px; color: var(--muted); }
.qb-tcard-a { display: flex; gap: 4px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 8px; margin-top: auto; }
.qb-src { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); margin-top: 6px; font-size: 13px; cursor: pointer; }
.qb-src input { width: auto; margin-top: 3px; accent-color: #6d4ae0; }
.modal.qb-order-modal { width: min(820px, 100%); max-height: 92vh; }
.qb-olist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; max-height: 62vh; overflow-y: auto; }
.qb-olist li { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: grab; font-size: 12.5px; }
.qb-olist li.dragging { opacity: .4; } .qb-olist li.over { border-color: #6d4ae0; box-shadow: 0 0 0 2px #e4dcff; }
.qb-olist li b { min-width: 22px; color: #3a3f9e; } .qb-grip { color: #b5bdd3; letter-spacing: -2px; }
.qb-otext { flex: 1; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb-olist small { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==========================================================================
   LIVE QUIZ — host screen (projector) and player screen (phone)
   ========================================================================== */
.page-quiz { min-height: 100vh; }
.qz-msg { min-height: 70vh; display: grid; place-items: center; text-align: center; gap: 10px; padding: 24px; color: var(--navy); }
/* setup modal */
.modal.qz-setup-modal { width: min(760px, 100%); }
.qz-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 10px; }
.qz-row .field { flex: 1; min-width: 140px; margin: 0; }
.qz-row select, .qz-row input { width: auto; }
.qz-row > select, .qz-row > input { padding: 8px 10px; font-size: 13px; }
.qz-row > input { flex: 1; min-width: 160px; }
.qz-n { font-size: 12.5px; color: #6d4ae0; }
.qz-check { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--navy); padding-bottom: 8px; }
.qz-check input { width: auto; accent-color: var(--fuchsia); }
.qz-list { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin-top: 8px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; }
.qz-item { display: flex; align-items: flex-start; gap: 8px; padding: 6px 8px; border-radius: 8px; font-size: 12.5px; cursor: pointer; }
.qz-item:hover { background: #f6f3ff; }
.qz-item input { width: auto; margin-top: 2px; accent-color: #6d4ae0; }
.qz-item span { flex: 1; text-align: left; }
.qz-item small { color: var(--muted); white-space: nowrap; }
.ws-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* host */
.quiz-host { background: radial-gradient(circle at 15% 10%, #2a1e6e, transparent 45%), radial-gradient(circle at 85% 90%, #6b1f52, transparent 45%), #0d1736; color: #fff; display: flex; flex-direction: column; }
.qh-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; flex-wrap: wrap; }
.qh-brand { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; }
.qh-pin { font-size: 15px; opacity: .85; } .qh-pin b { font-family: 'JetBrains Mono', monospace; letter-spacing: .12em; font-size: 20px; margin-inline-start: 6px; }
.qh-tools { display: flex; gap: 8px; align-items: center; }
.qh-tool { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.quiz-host .lang-btn { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.25); }
.qh-stage { flex: 1; display: flex; flex-direction: column; padding: 8px clamp(16px, 4vw, 56px) 28px; }
.qh-lobby { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.qh-joinbox { display: flex; align-items: center; gap: clamp(20px, 4vw, 60px); background: #fff; color: var(--navy); border-radius: 28px; padding: 24px 32px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); flex-wrap: wrap; justify-content: center; }
.qh-joinbox > div:first-child { display: flex; flex-direction: column; gap: 6px; }
.qh-k { font-size: 14px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.qh-url { font-size: clamp(18px, 2.2vw, 28px); color: var(--fuchsia); margin-bottom: 10px; }
.qh-pinbig { display: flex; gap: 8px; } .qh-pinbig b { font-family: 'JetBrains Mono', monospace; font-size: clamp(36px, 5vw, 64px); width: 1.05em; text-align: center; background: var(--navy-50); border-radius: 14px; padding: 4px 0; }
.qh-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; } .qh-qr > div { width: clamp(170px, 18vw, 240px); } .qh-qr svg { width: 100%; height: auto; display: block; } .qh-qr small { color: var(--muted); font-weight: 700; }
.qh-count { font-size: 18px; opacity: .9; } .qh-count b { font-size: 40px; font-family: 'Sora', var(--font); margin-inline-end: 6px; }
.qh-players { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 1100px; }
.qh-player { border: 0; background: rgba(255,255,255,.12); color: #fff; font: inherit; font-size: 18px; font-weight: 800; padding: 8px 18px; border-radius: 999px; cursor: pointer; animation: popIn .4s ease; }
.qh-player:hover { background: rgba(214,47,143,.5); text-decoration: line-through; }
.qh-wait { opacity: .7; font-size: 18px; animation: pulseBtn 2s ease infinite; }
.qh-go { font-size: 20px; padding: 14px 34px; }
.qh-q { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.qh-qhead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 16px; font-weight: 700; opacity: .95; }
.qh-tag { padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.14); font-size: 13px; }
.qh-ans { margin-inline-start: auto; } .qh-ans b { font-size: 26px; font-family: 'Sora', var(--font); }
.qh-clock { --p: 100%; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#fff var(--p), rgba(255,255,255,.15) 0); position: relative; margin: 0 auto; }
.qh-clock::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: #1b1a52; }
.qh-clock b { position: relative; font-family: 'Sora', var(--font); font-size: 32px; }
.qh-clock.low { background: conic-gradient(#ff6b6b var(--p), rgba(255,255,255,.15) 0); animation: pulseBtn 1s ease infinite; }
.qh-text { font-size: clamp(24px, 3.2vw, 46px); line-height: 1.3; text-align: center; margin: 10px auto 0; max-width: 1200px; font-weight: 800; }
.qh-text-ar { text-align: center; font-size: clamp(18px, 2vw, 26px); opacity: .85; font-family: 'IBM Plex Sans Arabic', var(--font); margin: 0; }
.qh-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: auto; }
.qh-opt { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 18px; background: var(--c); min-height: 96px; box-shadow: 0 10px 0 -2px color-mix(in srgb, var(--c) 60%, #000); transition: opacity .3s, transform .3s; overflow: hidden; }
.qh-let { flex-shrink: 0; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.22); font-size: 24px; font-weight: 900; }
.qh-otext { flex: 1; font-size: clamp(17px, 1.8vw, 26px); font-weight: 800; line-height: 1.3; text-align: left; display: flex; flex-direction: column; gap: 3px; position: relative; z-index: 1; }
.qh-otext small { font-size: .7em; font-weight: 600; opacity: .9; text-align: right; font-family: 'IBM Plex Sans Arabic', var(--font); }
.qh-q.revealed .qh-opt.wrong { opacity: .35; transform: scale(.98); }
.qh-q.revealed .qh-opt.right { box-shadow: 0 0 0 5px #fff, 0 16px 30px -10px rgba(0,0,0,.5); }
.qh-bar { position: absolute; inset: 0; pointer-events: none; } .qh-bar i { display: block; height: 100%; background: rgba(255,255,255,.18); transition: width .8s ease; }
.qh-cnt { position: relative; font-size: 30px; font-family: 'Sora', var(--font); }
.qh-opt .ic { position: relative; }
.qh-why { display: flex; gap: 12px; align-items: flex-start; background: rgba(255,255,255,.1); border-radius: 16px; padding: 14px 18px; font-size: clamp(15px, 1.4vw, 19px); line-height: 1.55; animation: fadeUp .4s ease; }
.qh-why span { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: #ffd36b; }
.qh-why p { margin: 0; }
.qh-act { display: flex; justify-content: center; margin-top: 4px; }
.qh-act .btn { font-size: 18px; padding: 12px 30px; }
.quiz-host .btn-outline { color: #fff; border-color: rgba(255,255,255,.5); background: transparent; }
.qh-board { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.qh-board h1 { display: flex; align-items: center; gap: 10px; font-size: clamp(26px, 3vw, 40px); }
.qh-board ol { list-style: none; padding: 0; margin: 0; width: min(900px, 100%); display: flex; flex-direction: column; gap: 10px; }
.qh-board li { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.2fr) 140px; align-items: center; gap: 14px; background: rgba(255,255,255,.1); border-radius: 16px; padding: 12px 16px; animation: fadeUp .5s ease both; animation-delay: var(--d); }
.qh-rank { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--navy); font-size: 20px; }
.qh-name { font-size: 22px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .qh-name em { font-style: normal; font-size: 15px; color: #ffd36b; }
.qh-sbar { height: 12px; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; } .qh-sbar i { display: block; height: 100%; background: linear-gradient(90deg, #8b6cf0, #d62f8f); }
.qh-score { font-size: 24px; font-family: 'Sora', var(--font); text-align: end; } .qh-score small { font-size: 13px; opacity: .8; }
.qh-end { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.qh-end h1 { font-size: clamp(28px, 3.4vw, 46px); }
.qh-podium { display: flex; align-items: flex-end; gap: 16px; direction: ltr; }
.qh-step { width: clamp(140px, 16vw, 220px); display: flex; flex-direction: column; align-items: center; gap: 6px; animation: fadeUp .7s ease both; }
.qh-step.gold { animation-delay: .6s; } .qh-step.silver { animation-delay: .3s; }
.qh-pname { font-size: 22px; font-weight: 900; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.qh-pscore { font-size: 18px; opacity: .85; font-family: 'Sora', var(--font); }
.qh-block { width: 100%; border-radius: 18px 18px 6px 6px; display: grid; place-items: start center; padding-top: 12px; font-size: 44px; font-family: 'Sora', var(--font); }
.gold .qh-block { background: linear-gradient(180deg, #ffd36b, #e2a03a); color: #5b3c00; }
.silver .qh-block { background: linear-gradient(180deg, #e5e9f2, #aab3c5); color: #33405c; }
.bronze .qh-block { background: linear-gradient(180deg, #e6a57a, #b07a4a); color: #4a2a10; }
.qh-rest { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; width: min(1000px, 100%); }
.qh-rest li { display: flex; gap: 10px; align-items: center; background: rgba(255,255,255,.08); border-radius: 12px; padding: 8px 12px; font-size: 15px; } .qh-rest li span { flex: 1; }
@media (max-width: 760px) { .qh-opts { grid-template-columns: minmax(0, 1fr); } .qh-board li { grid-template-columns: 44px minmax(0, 1fr) 90px; } .qh-sbar { display: none; } }

/* player */
.quiz-play { background: linear-gradient(160deg, #241a63, #0d1736 60%, #4b1840); color: #fff; display: flex; flex-direction: column; }
.qp-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; gap: 10px; }
.qp-top span { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; min-width: 0; } .qp-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quiz-play .lang-btn { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.qp-main { flex: 1; display: flex; flex-direction: column; padding: 8px 14px 20px; }
.qp-card { margin: auto 0; background: #fff; color: var(--navy); border-radius: 24px; padding: 24px 20px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); width: 100%; max-width: 460px; align-self: center; }
.qp-card h1 { font-size: 22px; text-align: center; margin: 0; }
.qp-k { text-align: center; font-size: 12.5px; color: var(--muted); font-weight: 700; } .qp-k b { color: var(--fuchsia); letter-spacing: .1em; }
.qp-err { color: #b3261e; font-weight: 700; text-align: center; margin: 0; font-size: 13.5px; }
.qp-center { align-items: center; text-align: center; } .qp-center p { margin: 0; color: #3a4563; }
.qp-big { --c: #0e9e9e; width: 92px; height: 92px; border-radius: 26px; display: grid; place-items: center; background: var(--c); color: #fff; font-size: 46px; font-weight: 900; animation: popIn .45s ease; }
.qp-result.ok .qp-big { --c: #0e9e9e; } .qp-result.no .qp-big { --c: #d64545; }
.qp-rankbig { --c: #6d4ae0; font-size: 34px; width: auto; min-width: 92px; padding: 0 14px; }
.qp-pts { font-size: 22px; font-weight: 900; color: #0e8585 !important; }
.qp-streak { color: #c2611a !important; font-weight: 800; }
.qp-stats { display: flex; gap: 10px; width: 100%; } .qp-stats div { flex: 1; background: var(--navy-50); border-radius: 14px; padding: 10px; } .qp-stats small { display: block; color: var(--muted); font-weight: 700; } .qp-stats b { font-size: 22px; font-family: 'Sora', var(--font); }
.qp-q { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.qp-qhead { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; opacity: .9; }
.qp-time { flex: 1; height: 8px; border-radius: 999px; background: rgba(255,255,255,.15); overflow: hidden; } .qp-time i { display: block; height: 100%; background: #ffd36b; transition: width .2s linear; }
.qp-text { font-size: 16px; line-height: 1.45; font-weight: 700; margin: 0; text-align: left; }
.qp-opts { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-height: 52vh; }
.qp-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 20px; background: var(--c); color: #fff; font: inherit; padding: 12px 10px; cursor: pointer; box-shadow: 0 8px 0 -2px color-mix(in srgb, var(--c) 60%, #000); transition: transform .1s; }
.qp-opt:active { transform: translateY(3px); }
.qp-opt b { font-size: 38px; font-weight: 900; } .qp-opt span { font-size: 13px; font-weight: 700; line-height: 1.3; text-align: center; opacity: .95; }
.qp-opt:disabled:not(.picked) { opacity: .3; } .qp-opt.picked { box-shadow: 0 0 0 4px #fff; }
.qp-top3 { list-style: none; padding: 0; margin: 4px 0; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.qp-top3 li { display: flex; gap: 10px; align-items: center; background: var(--navy-50); border-radius: 12px; padding: 8px 12px; } .qp-top3 li span { flex: 1; text-align: start; }
@media (max-width: 360px) { .qp-opts { grid-template-columns: minmax(0, 1fr); } }
.quiz-host h1, .quiz-host h2, .quiz-host .qh-text { color: #fff; }
/* Live quiz · batch 2: hub tabs, saved/results cards, teams, report */
.qz-tabs { margin-bottom: 12px; }
.qz-tabs button { display: inline-flex; align-items: center; gap: 6px; }
.qz-acts { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.qz-note { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.qz-editing { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; border-radius: 12px; background: #f3efff; color: #4b32b8; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.qz-editing .btn { margin-inline-start: auto; }
.qz-cards { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; padding: 2px; }
.qz-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; flex-wrap: wrap; }
.qz-card-main { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 3px; }
.qz-card-main b { color: var(--navy); font-size: 14.5px; } .qz-card-main small { color: var(--muted); font-size: 12px; }
.qz-card-acts { display: flex; gap: 6px; align-items: center; }
.qz-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 16px; color: var(--muted); text-align: center; }
.qz-loading { display: grid; place-items: center; padding: 40px; }
.qz-loading .spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--navy-50); border-top-color: #6d4ae0; animation: qzSpin .8s linear infinite; }
@keyframes qzSpin { to { transform: rotate(360deg); } }
.qh-tcols { display: grid; gap: 14px; width: min(1200px, 100%); } .qh-tcols.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .qh-tcols.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .qh-tcols.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.qh-tcol { background: color-mix(in srgb, var(--c) 22%, transparent); border: 2px solid color-mix(in srgb, var(--c) 70%, transparent); border-radius: 20px; padding: 12px; min-height: 120px; }
.qh-tcol h3 { margin: 0 0 10px; text-align: center; font-size: 20px; color: #fff; } .qh-tcol h3 small { display: inline-block; min-width: 26px; padding: 1px 8px; border-radius: 999px; background: var(--c); font-size: 14px; margin-inline-start: 6px; }
.qh-tcol .qh-players { gap: 6px; } .qh-tcol .qh-player { font-size: 15px; padding: 6px 12px; }
.qh-tchip { display: inline-block; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--c); color: #fff; vertical-align: middle; white-space: nowrap; }
.qh-teamboard li .qh-sbar i { background: var(--c); }
.qh-teamboard li { border-inline-start: 6px solid var(--c); }
.qh-board.with-teams > ol:not(.qh-teamboard) li { padding: 8px 16px; } .qh-board.with-teams > ol:not(.qh-teamboard) .qh-name { font-size: 18px; }
.qh-sub { font-size: 18px; opacity: .85; margin: 4px 0 0; }
.qh-note { opacity: .7; font-size: 13px; margin: -6px 0 0; }
.qh-block[style*="--tc"] { box-shadow: inset 0 -10px 0 var(--tc); }
.qh-end .qh-act { gap: 10px; flex-wrap: wrap; }
.quiz-host .btn-ghost.qh-light { color: #fff; border: 1px solid rgba(255,255,255,.3); }
.qp-teams { display: flex; flex-direction: column; gap: 6px; }
.qp-tgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.qp-tpick { position: relative; display: block; min-width: 0; }
.qp-tpick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.qp-tpick span { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 8px; border-radius: 14px; border: 2px solid color-mix(in srgb, var(--c, #8892a8) 50%, #fff); font-weight: 800; font-size: 14px; cursor: pointer; color: var(--navy); }
.qp-tpick span small { font-size: 11px; color: var(--muted); }
.qp-tpick input:checked + span { background: var(--c, #6d4ae0); border-color: var(--c, #6d4ae0); color: #fff; } .qp-tpick input:checked + span small { color: #fff; }
.qp-tpick.auto { grid-column: 1 / -1; }
.qp-team { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--c); color: #fff; font-weight: 800; font-size: 13px; }
.qp-tline { font-weight: 800; } .qp-tline.big { font-size: 18px; color: #6d4ae0 !important; }
.qr-cover .qr-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.qr-stats div { background: var(--navy-50); border-radius: 12px; padding: 12px; text-align: center; } .qr-stats b { display: block; font-size: 24px; color: var(--navy); font-family: 'Sora', var(--font); } .qr-stats small { font-size: 11px; color: var(--muted); font-weight: 700; }
.qr-team { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--c); color: #fff; font-weight: 700; font-size: 11px; }
.qr-note { font-size: 11px; color: var(--muted); margin: 4px 0 0; }
.qr-qtext { display: block; font-weight: 600; color: var(--navy); } .qr-topic { display: block; color: var(--muted); font-size: 10.5px; margin-top: 2px; }
.qr-hard td { background: #fff4f4; }
.qr-spread { white-space: nowrap; } .qr-spread span { display: inline-block; font-size: 10.5px; padding: 1px 5px; border-radius: 6px; background: #f1f3f8; margin: 1px; } .qr-spread span.ok { background: #d9f3f1; color: #0e7272; font-weight: 800; }
.qr-topics { display: flex; flex-direction: column; gap: 6px; } .qr-topics div { display: grid; grid-template-columns: minmax(0, 1fr) 120px 44px; gap: 10px; align-items: center; font-size: 12.5px; }
.qr-topics .rp-bar { width: 100%; } .qr-topics b { text-align: end; color: var(--navy); }
.qr-grid th, .qr-grid td { text-align: center; padding: 4px 3px; font-size: 10.5px; } .qr-grid td:first-child, .qr-grid th:first-child { text-align: start; }
.qr-grid td.ok { color: #0e7272; background: #e3f6f4; font-weight: 800; } .qr-grid td.no { color: #b3261e; background: #fdeeee; } .qr-grid td.na { color: #b8bfcc; }
@media (max-width: 760px) { .qh-tcols.n3, .qh-tcols.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .qr-cover .qr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Live quiz · admin page (hub inline) */
.qz-admin { padding: 20px 16px 40px; }
.qb-embed .qz-admin { padding: 6px 2px 20px; }
.qz-admin-card { max-width: 980px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow-sm); }
.qz-inline .modal-body { padding: 0; }
.qz-inline .modal-actions { display: flex; justify-content: flex-end; padding: 14px 0 0; margin-top: 14px; border-top: 1px solid var(--line); }
.qz-inline .modal-actions:has(.qz-acts:empty) { display: none; }
.qz-inline .qz-cards { max-height: none; }
.qz-inline .qz-list { max-height: 460px; }
/* Live quiz · the quiz's own question list + add-from-bank panel */
.qz-selhead { justify-content: space-between; align-items: center; }
.qz-selbtns { display: flex; gap: 6px; flex-wrap: wrap; }
.qz-sel { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; }
.qz-inline .qz-sel { max-height: none; }
.qz-sel li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.qz-sel li:hover { border-color: #cfc3ff; background: #fbfaff; }
.qz-num { flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: #efeaff; color: #4b32b8; font-size: 12px; }
.qz-qt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.qz-qt > span { font-size: 13px; font-weight: 600; color: var(--navy); text-align: left; }
.qz-qt small { font-size: 11px; color: var(--muted); }
.qz-qacts { display: flex; gap: 2px; flex-shrink: 0; }
.qz-qacts .icon-btn { font-size: 10px; }
.qz-qacts .icon-btn:disabled { opacity: .3; }
.qz-rm:hover { color: #b3261e; background: #fdeeee; }
.qz-empty.sm { padding: 18px; font-size: 13px; border: 1px dashed var(--line); border-radius: 12px; margin-top: 8px; }
.qz-add { margin-top: 12px; padding: 12px; border-radius: 14px; background: #f7f5ff; border: 1px solid #e3dcff; }
.qz-addhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #4b32b8; }
.qz-addhead b { display: inline-flex; align-items: center; gap: 6px; }
.qz-add .qz-list { background: #fff; }
.qz-rand { display: inline-flex; gap: 4px; align-items: center; } .qz-rand input { width: 64px !important; flex: none !important; min-width: 0 !important; }
/* ============================================================ Live quiz · "felt" style (trainer panel)
   Warm cream fabric, stitched (dashed) inner edges, soft raised pills and buttons. */
.qz-felt { --felt-bg: #fbf3e6; --felt-card: #fffaf2; --felt-stitch: #e6d5bb; --felt-edge: #eadcc6; --felt-ink: #2b2a3a; --felt-soft: #8a7a63; --felt-peach: #fde4d8; --felt-peach-b: #ef9f84; }
.modal.qz-felt { background: radial-gradient(circle at 0 0, #fff6ea, transparent 40%), var(--felt-bg); border: 1px solid var(--felt-edge); }
.modal.qz-felt .modal-title { color: var(--felt-ink); }
.page-quiz-admin { background: radial-gradient(circle at 100% 0, #fff3e2, transparent 40%), #f8efe2; }
.qz-admin-card:has(.qz-felt) { background: var(--felt-bg, #fbf3e6); border: 1px solid #eadcc6; box-shadow: 0 8px 0 #efe2cf, 0 18px 40px -20px rgba(120, 90, 50, .25); position: relative; }
.qz-admin-card:has(.qz-felt)::before { content: ''; position: absolute; inset: 9px; border: 2px dashed #e6d5bb; border-radius: 16px; pointer-events: none; }
.qz-admin-card:has(.qz-felt) > * { position: relative; }
.qz-felt .muted, .qz-felt .qz-note { color: var(--felt-soft); }
/* tabs & segmented controls → raised felt pills */
.qz-felt .exm-tabs { background: transparent; gap: 8px; padding: 0; flex-wrap: wrap; }
.qz-felt .exm-tabs button { background: var(--felt-card); border: 1.5px solid #dccab0; color: #5b4d3a; padding: 8px 18px; box-shadow: 0 3px 0 #e7d8c1; transition: transform .12s, box-shadow .12s; }
.qz-felt .exm-tabs button:hover { transform: translateY(-1px); }
.qz-felt .exm-tabs button.on { background: var(--felt-peach); border-color: var(--felt-peach-b); color: #7a2e14; box-shadow: 0 3px 0 #f2c3b1; }
/* fields */
.qz-felt input:not([type=checkbox]):not([type=radio]), .qz-felt select { background: var(--felt-card); border: 1.5px solid #e2d2b9; border-radius: 14px; box-shadow: inset 0 2px 4px rgba(120, 90, 50, .06); color: var(--felt-ink); }
.qz-felt input:focus, .qz-felt select:focus { border-color: var(--felt-peach-b); outline: none; box-shadow: 0 0 0 3px rgba(239, 159, 132, .2); }
.qz-felt .field > span, .qz-felt .qb-lbl { color: #6b5b45; }
/* buttons */
.qz-felt .btn { border-radius: 16px; font-weight: 800; }
.qz-felt .btn-outline, .qz-felt .btn-ghost { background: var(--felt-card); border: 1.5px solid #d9c7ab; color: #3f3527; box-shadow: 0 3px 0 #e5d4bb; }
.qz-felt .btn-outline:hover, .qz-felt .btn-ghost:hover { background: #fff; transform: translateY(-1px); }
.qz-felt .btn-primary { box-shadow: 0 4px 0 #a51f6b, 0 10px 18px -10px #d62f8f; }
.qz-felt .icon-btn { width: 40px; height: 40px; border-radius: 14px; background: #f6ecdd; border: 1px solid #ecdcc4; color: #3f3527; box-shadow: 0 3px 0 #e8d8c0; }
.qz-felt .icon-btn:hover:not(:disabled) { background: #fff; transform: translateY(-1px); }
.qz-felt .icon-btn.sm { width: 34px; height: 34px; border-radius: 12px; }
.qz-felt .qz-rm, .qz-felt [data-delsaved], .qz-felt [data-delres] { color: #c2410c; }
.qz-felt .qz-rm:hover { background: #fdeee6; }
/* stitched cards: quiz questions, saved & results */
.qz-felt .qz-sel { gap: 12px; }
.qz-felt .qz-sel li, .qz-felt .qz-card { position: relative; background: var(--felt-card); border: 1px solid var(--felt-edge); border-radius: 22px; padding: 16px 18px; box-shadow: 0 6px 0 #efe2cf, 0 12px 26px -18px rgba(120, 90, 50, .35); align-items: flex-start; }
.qz-felt .qz-sel li::before, .qz-felt .qz-card::before { content: ''; position: absolute; inset: 6px; border: 2px dashed var(--felt-stitch); border-radius: 17px; pointer-events: none; }
.qz-felt .qz-sel li:hover { border-color: #e2cfb2; background: #fffcf7; }
.qz-felt .qz-sel li > *, .qz-felt .qz-card > * { position: relative; }
.qz-felt .qz-num { width: 30px; height: 30px; border-radius: 10px; background: var(--felt-peach); color: #9a3412; font-size: 13px; margin-top: 2px; }
.qz-felt .qz-qt { gap: 7px; }
.qz-felt .qz-qtext { font-size: 15.5px; font-weight: 800; color: var(--felt-ink); line-height: 1.45; }
.qz-ansline { display: flex; align-items: baseline; gap: 7px; min-width: 0; font-size: 13px; color: #4b4436; }
.qz-ok { flex-shrink: 0; width: 18px; height: 18px; border-radius: 5px; background: #22a447; color: #fff; display: inline-grid; place-items: center; font-size: 12px; font-weight: 900; transform: translateY(3px); }
.qz-anstext { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qz-anstext b { font-weight: 700; color: #1f5f34; }
.qz-why { color: var(--felt-soft, #8a7a63); }
.qz-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.qz-chip { font-size: 11.5px; font-weight: 700; padding: 3px 12px; border-radius: 999px; background: #f3ece2; border: 1.5px solid #cfc3b2; color: #3f4658; }
.qz-chip--set { background: #fffaf2; border-color: #f2c48a; color: #b7791f; }
.qz-felt .qz-qacts { gap: 6px; align-self: center; }
.qz-felt .qz-qacts .icon-btn { font-size: 11px; }
.qz-felt .qz-card-main b { font-size: 15px; color: var(--felt-ink); }
.qz-felt .qz-card-main small { color: var(--felt-soft); }
/* add-from-bank panel */
.qz-felt .qz-add { background: #fff6ea; border: 2px dashed #e6c9a8; border-radius: 20px; }
.qz-felt .qz-addhead { color: #9a3412; }
.qz-felt .qz-list { background: var(--felt-card); border: 1px solid var(--felt-edge); border-radius: 16px; gap: 6px; }
.qz-felt .qz-item { border-radius: 12px; padding: 8px 10px; }
.qz-felt .qz-item:hover { background: #fdf3e6; }
.qz-itext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; text-align: left; }
.qz-itext .qz-ansline { font-size: 11.5px; }
.qz-felt .qz-editing { background: var(--felt-peach); color: #7a2e14; border: 1.5px dashed var(--felt-peach-b); }
.qz-felt .qz-empty { color: var(--felt-soft); border-color: #e6d5bb; }
.qz-felt .modal-actions, .qz-inline.qz-felt .modal-actions { border-top: 2px dashed #e6d5bb; }
.qz-felt .qz-check { color: #3f3527; }
.qz-felt .qz-qt > .qz-qtext, .qz-felt .qz-itext, .qz-felt .qz-itext > span { text-align: start; }
[dir=rtl] .qz-felt .qz-qtext, [dir=rtl] .qz-felt .qz-itext > span[dir=ltr] { text-align: right; }
.qz-felt .qz-anstext { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.5; }
/* Live quiz · running-now tab + text import */
.qz-livedot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #e11d48; box-shadow: 0 0 0 0 rgba(225, 29, 72, .5); animation: qzLive 1.6s ease infinite; vertical-align: middle; }
@keyframes qzLive { 70% { box-shadow: 0 0 0 7px rgba(225, 29, 72, 0); } 100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); } }
.qz-pin { font-family: 'JetBrains Mono', monospace; letter-spacing: .08em; color: #9a3412; }
.qi-modal textarea { width: 100%; font: inherit; font-size: 13.5px; line-height: 1.6; padding: 12px 14px; border-radius: 16px; border: 1.5px solid #e2d2b9; background: #fffaf2; resize: vertical; min-height: 220px; }
.qi-modal textarea:focus { outline: none; border-color: #ef9f84; box-shadow: 0 0 0 3px rgba(239, 159, 132, .2); }
.qi-opts { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: #4b4436; }
.qi-opts span.ok { color: #1f5f34; font-weight: 800; } .qi-opts span.ok::after { content: ' ✓'; }
.qz-felt .qz-sel li.qi-bad { background: #fff4f0; }
.qi-err { background: #fdeee6 !important; border-color: #f1a487 !important; color: #b3401a !important; }
.qi-okchip { background: #e7f6ec !important; border-color: #9ad3ad !important; color: #1f5f34 !important; }
/* ============================================================ Live quiz · race (cars + track) */
.qcar { display: block; width: 100%; height: auto; overflow: visible; }
/* phone: car picker */
.qp-cars { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 18px; background: #fbf5ea; border: 2px dashed #e8d8bf; }
.qp-cars .qp-k { text-align: start; color: #7a6a52; }
.qp-cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.qp-cpick { position: relative; display: block; min-width: 0; }
.qp-cpick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.qp-cpick > span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px 7px; border-radius: 16px; background: #f1e8da; border: 1.5px solid #dccbb1; cursor: pointer; transition: transform .12s, background .12s, border-color .12s; }
.qp-cpick .qcar { width: 76px; }
.qp-cpick b { font-size: 11.5px; font-weight: 800; color: #3f3527; text-align: center; line-height: 1.25; }
.qp-cpick:hover > span { transform: translateY(-1px); }
.qp-cpick input:checked + span { background: #e6eaf1; border-color: #8193b2; box-shadow: 0 0 0 3px rgba(129, 147, 178, .25); }
.qp-cpick input:focus-visible + span { outline: 2px solid #6d4ae0; outline-offset: 2px; }
.qp-mycar { display: flex; flex-direction: column; align-items: center; gap: 2px; animation: qtRoll .8s cubic-bezier(.2, .8, .2, 1) both; }
.qp-mycar .qcar { width: 150px; } .qp-mycar small { font-weight: 800; color: var(--muted); }
.qp-mycar.sm .qcar { width: 96px; }
@keyframes qtRoll { from { transform: translateX(-60px); opacity: 0; } }
/* host: track panel (felt card with asphalt lanes) */
.qt { --lh: 74px; --gap: 12px; --cw: 92px; margin-top: 18px; background: #fbf4e8; color: #2b2a3a; border-radius: 24px; padding: 18px 22px 20px; position: relative; box-shadow: 0 8px 0 #e8d9c1, 0 24px 40px -24px rgba(0, 0, 0, .5); }
.qt::before { content: ''; position: absolute; inset: 8px; border: 2px dashed #e3d1b4; border-radius: 18px; pointer-events: none; }
.qt > * { position: relative; }
.qt.compact { --lh: 56px; --gap: 8px; --cw: 70px; padding: 12px 18px 14px; margin-top: 14px; }
.qt-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.qt-head b { font-size: clamp(16px, 1.6vw, 22px); color: #1d4f91; font-weight: 900; }
.qt-head span { font-size: 13px; font-weight: 800; color: #7a6a52; }
.qt-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 12px; }
.qt.compact .qt-chips { margin: 6px 0 8px; }
.qt-chip { font-size: 13px; font-weight: 800; padding: 5px 14px; border-radius: 999px; background: #fff6d6; border: 2px solid #f3d36b; color: #7a5a00; animation: fadeUp .4s ease both; }
.qt-chip.hot { background: #fdeaea; border-color: #f2a3a3; color: #a33a3a; }
.qt-chip.lead { background: #e7f4ff; border-color: #8cc3f0; color: #1d4f91; }
.qt-chip.fire { background: #fff0e3; border-color: #f4b27a; color: #a4500f; }
.qt-lanes { display: flex; flex-direction: column; gap: var(--gap); }
.qt-lane { height: var(--lh); animation: qtLane .7s cubic-bezier(.3, .9, .3, 1) both; }
@keyframes qtLane { from { transform: translateY(calc(var(--dy) * (var(--lh) + var(--gap)))); } }
.qt-road { position: relative; height: 100%; border-radius: 16px; overflow: hidden; border: 4px solid #5d6270;
  background: linear-gradient(#fff 0 0) 0 50% / 100% 0 no-repeat, repeating-linear-gradient(90deg, transparent 0 22px, rgba(255,255,255,.9) 22px 52px) 0 calc(50% - 1.5px) / 100% 3px no-repeat, radial-gradient(rgba(255,255,255,.06) 1px, transparent 1.4px) 0 0 / 7px 7px, #7b808c; }
.qt-road::before, .qt-road::after { content: ''; position: absolute; inset-inline: 0; height: 2px; background: rgba(255,255,255,.75); }
.qt-road::before { top: 5px; } .qt-road::after { bottom: 5px; }
.qt-lane.pole .qt-road { border-color: #f5c518; box-shadow: 0 0 0 3px rgba(245, 197, 24, .25), 0 8px 20px -8px rgba(245, 197, 24, .6); }
.qt-flag { position: absolute; top: 0; bottom: 0; right: 0; width: 14px; background: conic-gradient(#222 25%, #fff 0 50%, #222 0 75%, #fff 0) 0 0 / 7px 7px; z-index: 1; }
.qt-pts { position: absolute; top: 6px; right: 22px; font-size: 14px; font-weight: 900; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); z-index: 1; } .qt-pts small { font-size: 11px; opacity: .9; }
.qt.compact .qt-pts { font-size: 12px; top: 4px; }
.qt-car { position: absolute; top: 4px; bottom: 4px; width: var(--cw); left: calc(8px + (100% - var(--cw) - 40px) * var(--p)); display: flex; flex-direction: column; align-items: center; justify-content: space-between; z-index: 2;
  animation: qtDrive 1.6s cubic-bezier(.25, .8, .25, 1) both; }
@keyframes qtDrive { from { left: calc(8px + (100% - var(--cw) - 40px) * var(--p0)); } }
.qt-car .qcar { width: 100%; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.qt-rank { position: absolute; top: -2px; right: -4px; width: 20px; height: 20px; border-radius: 50%; background: #fff; color: #1f2937; font-size: 11px; font-weight: 900; display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.35); z-index: 1; }
.qt-lane.pole .qt-rank { background: #f5c518; }
.qt-name { max-width: 150%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; font-weight: 900; color: #2b2a3a; background: #fff8ec; border: 2px solid #d9c7a8; border-radius: 999px; padding: 1px 10px; line-height: 1.35; }
.qt-lane.pole .qt-name { background: #e5f0ff; border-color: #7da6dc; color: #1d4f91; }
.qt.compact .qt-name { font-size: 11px; padding: 0 8px; }
.qt-more { margin: 8px 0 0; font-size: 12.5px; font-weight: 700; color: #7a6a52; text-align: center; }
.quiz-host .qt h1, .quiz-host .qt h2 { color: #2b2a3a; }
.qh-board .qt { width: min(1100px, 100%); margin-top: 4px; }
/* make room for the track under a question */
.qh-stage:has(.qt.compact) .qh-opt { min-height: 74px; padding: 12px 16px; }
.qh-stage:has(.qt.compact) .qh-q { gap: 10px; }
@media (prefers-reduced-motion: reduce) { .qt-car, .qt-lane, .qp-mycar { animation: none; } }
.qt.compact { --lh: 50px; --cw: 200px; }
.qt.compact .qt-car { flex-direction: row; justify-content: flex-start; align-items: center; gap: 6px; }
.qt.compact .qt-car .qcar { width: 66px; flex-shrink: 0; }
.qt.compact .qt-name { max-width: 126px; }
.qt.compact .qt-rank { right: auto; left: 52px; top: 0; }
.qt:not(.compact) { --lh: 64px; --gap: 10px; --cw: 84px; }
/* Live quiz · practice race (room screen + phone) */
.quiz-practice { background: #0d1736; color: #fff; display: flex; flex-direction: column; min-height: 100vh; }
.qx-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 24px; background: linear-gradient(90deg, #f5c518, #f59e0b); color: #3b2a00; }
.qx-banner p { margin: 0; font-size: 13.5px; font-weight: 600; flex: 1; min-width: 260px; }
.qx-badge { font-weight: 900; background: #fff8dc; border-radius: 999px; padding: 4px 14px; white-space: nowrap; }
.qx-grid { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 380px; min-height: 0; }
#qx-stage { min-width: 0; min-height: calc(100vh - 56px); }
.qx-side { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 16px 24px; background: rgba(0, 0, 0, .25); border-inline-start: 1px solid rgba(255, 255, 255, .08); position: sticky; top: 0; align-self: start; max-height: 100vh; }
.qx-plabel { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; opacity: .85; }
.qx-device { width: 340px; height: min(720px, calc(100vh - 120px)); border-radius: 40px; padding: 12px; background: #111827; box-shadow: 0 0 0 2px #374151, 0 30px 60px -20px rgba(0, 0, 0, .7); }
.qx-device iframe { width: 100%; height: 100%; border: 0; border-radius: 30px; background: #0d1736; }
.qx-side .btn-ghost { color: #fff; border: 1px solid rgba(255, 255, 255, .3); }
@media (max-width: 1000px) { .qx-grid { grid-template-columns: 1fr; } .qx-side { position: static; max-height: none; border: 0; } #qx-stage { min-height: 0; } }
.qz-felt .qz-try { border-color: #f2c48a; color: #9a5b0a; background: #fff6e6; }
/* ============================================================ Live quiz · race effects */
.qcar .qw { transform-box: fill-box; transform-origin: center; }
.qcar .qhl { opacity: 0; transition: opacity .15s; }
@keyframes qwSpin { to { transform: rotate(360deg); } }
/* names: full width, starting under the car so they never get cut at the lane start */
.qt-car { overflow: visible; }
.qt:not(.compact) .qt-car { align-items: flex-start; }
.qt:not(.compact) .qt-name { max-width: none; overflow: visible; align-self: flex-start; margin-inline-start: 2px; }
.qt.compact { --cw: 240px; } .qt.compact .qt-name { max-width: 170px; }
.qt-body { position: relative; display: block; width: 100%; }
.qt.compact .qt-body { width: 66px; flex-shrink: 0; }
.qt.compact .qt-car .qcar { width: 100%; }
.qt-body .qt-rank { top: -6px; right: -6px; left: auto; }
/* driving: spinning wheels, headlights on, speed lines, a puff of exhaust */
.qt-car.moving .qw { animation: qwSpin .28s linear infinite; }
.qt-car.moving .qhl, .qt-car.lights .qhl { opacity: 1; }
.qt-car.lights .qhl { animation: qtBlink .25s steps(1) 4; }
@keyframes qtBlink { 50% { opacity: 0; } }
.qt-car.moving .qt-body::before { content: ''; position: absolute; right: 100%; top: 22%; width: 46px; height: 55%; margin-right: -4px;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.75) 0 2px, transparent 2px 7px); -webkit-mask: linear-gradient(90deg, transparent, #000); mask: linear-gradient(90deg, transparent, #000); animation: qtLines .3s linear infinite; }
@keyframes qtLines { from { transform: translateX(10px); opacity: .9; } to { transform: translateX(-10px); opacity: .4; } }
.qt-car.rev .qw { animation: qwSpin .4s linear 2; }
.qt-car.rev .qt-body { animation: qtRev .45s ease 2; }
@keyframes qtRev { 30% { transform: translateY(-1.5px) rotate(-1.5deg); } 60% { transform: translateY(.5px); } }
/* exhaust: little puffs now and then (more when driving or revving) */
.qt-puffs { position: absolute; left: -2px; bottom: 18%; width: 0; height: 0; }
.qt-puffs i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: rgba(230, 232, 238, .85); opacity: 0; animation: qtPuff 4.2s ease-out infinite; animation-delay: calc(var(--rd) + var(--k, 0s)); }
.qt-puffs i:nth-child(2) { --k: .18s; } .qt-puffs i:nth-child(3) { --k: .36s; }
@keyframes qtPuff { 0% { opacity: 0; transform: translate(0, 0) scale(.4); } 3% { opacity: .9; } 16% { opacity: 0; transform: translate(-20px, -7px) scale(1.6); } 100% { opacity: 0; } }
.qt-car.moving .qt-puffs i, .qt-car.rev .qt-puffs i { animation: qtPuff 1.1s ease-out infinite; animation-delay: var(--k, 0s); }
/* horn: a speech bubble above the car */
.qt-honk { position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, 4px) scale(.6); opacity: 0; pointer-events: none; white-space: nowrap; font-size: 11px; font-weight: 900;
  background: #fff; color: #b45309; border: 2px solid #f59e0b; border-radius: 10px; padding: 1px 7px; transition: opacity .2s, transform .2s; z-index: 3; }
.qt-car.honk .qt-honk { opacity: 1; transform: translate(-50%, -2px) scale(1); }
.qt-car.honk .qt-body .qcar { animation: qtRev .3s ease 3; }
/* nitro: flame behind a car that just took the lead */
.qt-car.nitro .qt-body::after { content: ''; position: absolute; right: 100%; bottom: 22%; width: 22px; height: 9px; margin-right: -3px; border-radius: 50% 0 0 50%;
  background: radial-gradient(ellipse at right, #fff7cc 0 20%, #ffb703 40%, #fb5607 70%, transparent 72%); animation: qtFlame .12s linear infinite alternate, qtFade 2.2s ease forwards; }
@keyframes qtFlame { from { transform: scaleX(.75); } to { transform: scaleX(1.15); } }
@keyframes qtFade { 80% { opacity: 1; } to { opacity: 0; } }
/* pilots' lane: painted on the asphalt + gold badge */
.qt-polelbl { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 1; white-space: nowrap; font-size: 12px; font-weight: 900; letter-spacing: .04em;
  color: #3b2a00; background: linear-gradient(180deg, #ffe48a, #f5c518); border-radius: 999px; padding: 1px 12px; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.qt.compact .qt-polelbl { bottom: auto; top: 50%; transform: translate(-50%, -50%); font-size: 11px; opacity: .92; }
/* phone picker: the chosen car idles with its lights on */
.qp-cpick input:checked + span .qw { animation: qwSpin 1.2s linear infinite; }
.qp-cpick input:checked + span .qhl { opacity: 1; }
.qp-mycar .qw { animation: qwSpin .5s linear 3; }
@media (prefers-reduced-motion: reduce) { .qt-car .qw, .qt-puffs i, .qt-body::before, .qt-body::after, .qp-cpick .qw { animation: none !important; } }
.qt-polelbl, .qt.compact .qt-polelbl { left: auto; right: 24px; top: auto; bottom: 7px; transform: none; }
.qt.compact .qt-polelbl { bottom: 4px; font-size: 10.5px; padding: 0 10px; }
.qt-honk { bottom: auto; top: 50%; left: 100%; transform: translate(2px, -50%) scale(.6); }
.qt-car.honk .qt-honk { transform: translate(6px, -50%) scale(1); }
/* ============================================================ Live quiz · names under cars, lane notes, cinematic lane changes */
/* the racer's name always sits under the car (compact track too) */
.qt.compact { --lh: 62px; --cw: 76px; }
.qt.compact .qt-car { flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 0; }
.qt.compact .qt-body { width: 62px; }
.qt.compact .qt-name, .qt:not(.compact) .qt-name { max-width: none; overflow: visible; align-self: flex-start; margin-inline-start: 0; }
.qt.compact .qt-rank { left: auto; right: -6px; top: -6px; }
/* lane notes: a banner on the asphalt for 10 seconds, then gone */
.qt-note { position: absolute; left: 50%; top: 50%; z-index: 2; max-width: 46%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 13px; font-weight: 900; padding: 3px 12px; border-radius: 999px; background: #fffbea; color: #6b4e00; border: 2px solid #f3d36b; box-shadow: 0 3px 10px rgba(0,0,0,.25);
  transform: translate(-50%, -50%); animation: qtNote 10s ease forwards; animation-delay: var(--nd, 0s); pointer-events: none; }
.qt.compact .qt-note { font-size: 11.5px; padding: 2px 10px; }
.qt-note.jump, .qt-note.pass { background: #e8f6ff; border-color: #7cc0ef; color: #13508a; }
.qt-note.drop { background: #fff1e6; border-color: #f4b27a; color: #8a3d0a; }
.qt-note.lead { background: #fff6cc; border-color: #f5c518; color: #6b4e00; }
.qt-note.fire, .qt-note.rocket { background: #ffeee6; border-color: #fb923c; color: #9a3412; }
.qt-note.miss { background: #f3f0ff; border-color: #b9a8f5; color: #4b32b8; }
.qt-note.good { background: #ecfaef; border-color: #8fd3a3; color: #17603a; }
@keyframes qtNote { 0% { opacity: 0; transform: translate(-50%, -20%) scale(.7); } 4% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); } 7% { transform: translate(-50%, -50%) scale(1); }
  92% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -80%) scale(.9); } }
/* cinematic lane changes: overtakers hop up over the others with a bounce; droppers wobble and spin back */
.qt-lane.swap-up { position: relative; z-index: 3; animation: qtLaneUp 1.5s cubic-bezier(.34, 1.4, .5, 1) both; }
.qt-lane.swap-down { animation: qtLaneDown 1.5s cubic-bezier(.5, 0, .3, 1) both; }
@keyframes qtLaneUp { 0% { transform: translateY(calc(var(--dy) * (var(--lh) + var(--gap)))) scale(1); }
  35% { transform: translateY(calc(var(--dy) * (var(--lh) + var(--gap)) * .55)) scale(1.04); filter: drop-shadow(0 12px 14px rgba(0,0,0,.35)); }
  100% { transform: none; } }
@keyframes qtLaneDown { 0% { transform: translateY(calc(var(--dy) * (var(--lh) + var(--gap)))); } 25% { transform: translateY(calc(var(--dy) * (var(--lh) + var(--gap)))) translateX(-6px); }
  45% { transform: translateY(calc(var(--dy) * (var(--lh) + var(--gap)))) translateX(6px); } 100% { transform: none; } }
.qt-car.swap-up .qt-body { animation: qtHop 1.5s ease both; }
@keyframes qtHop { 0% { transform: none; } 20% { transform: translateY(-12px) rotate(-12deg) scale(1.12); } 45% { transform: translateY(-6px) rotate(6deg) scale(1.08); } 65% { transform: translateY(1px) rotate(-2deg) scaleY(.92); } 80%, 100% { transform: none; } }
.qt-car.swap-up .qw { animation: qwSpin .2s linear 7; }
.qt-car.swap-down .qt-body { animation: qtSpinOut 1.6s ease both; }
@keyframes qtSpinOut { 0% { transform: none; } 30% { transform: rotate(-25deg) translateX(-4px); } 55% { transform: rotate(18deg); } 75% { transform: rotate(-8deg); } 100% { transform: none; } }
.qt-fx { position: absolute; z-index: 4; pointer-events: none; font-size: 15px; line-height: 1; }
.qt-car.swap-up .qt-fx { right: 100%; top: 10%; animation: qtFx 1.6s ease forwards; }
.qt-car.swap-down .qt-fx { left: 30%; top: -12px; animation: qtDizzy 2.4s ease forwards; }
@keyframes qtFx { 0% { opacity: 0; transform: translateX(10px) scale(.5); } 20% { opacity: 1; transform: translateX(0) scale(1.2); } 100% { opacity: 0; transform: translateX(-26px) scale(.8); } }
@keyframes qtDizzy { 0% { opacity: 0; transform: rotate(0) scale(.6); } 15% { opacity: 1; } 80% { opacity: 1; transform: rotate(540deg) scale(1); } 100% { opacity: 0; transform: rotate(720deg); } }
.qt-chip.swap { background: #e8f6ff; border-color: #7cc0ef; color: #13508a; animation: qtChipPop .6s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes qtChipPop { from { transform: scale(.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .qt-lane.swap-up, .qt-lane.swap-down, .qt-car.swap-up .qt-body, .qt-car.swap-down .qt-body, .qt-fx, .qt-note { animation: none !important; } }
/* ============================================================ Live quiz · pilots'-lane celebration */
.qt-lane.pole .qt-road { overflow: visible; }
.qt-lane.pole .qt-flag { border-radius: 0 12px 12px 0; }
.qt-car.celebrate { z-index: 5; }
.qt-car.celebrate .qhl { animation: qtBlink .3s steps(1) 9; opacity: 1; }
.qt-car.celebrate .qt-body .qcar { animation: qtCheer .5s ease 4; }
@keyframes qtCheer { 40% { transform: translateY(-3px) rotate(-3deg); } 70% { transform: translateY(0) rotate(1deg); } }
/* waving a checkered flag out of the window */
.qt-wave { position: absolute; left: 50%; top: -2px; width: 0; height: 0; z-index: 4; pointer-events: none; animation: qtWaveIn 5s ease forwards; }
.qt-stick { position: absolute; left: 0; bottom: 0; width: 2px; height: 22px; background: #5b4636; border-radius: 1px; transform-origin: bottom center; animation: qtStick .45s ease-in-out infinite alternate; }
.qt-cloth { position: absolute; left: 2px; bottom: 10px; width: 18px; height: 12px; border: 1px solid #333; border-radius: 1px;
  background: conic-gradient(#111 25%, #fff 0 50%, #111 0 75%, #fff 0) 0 0 / 6px 6px; transform-origin: left center; animation: qtCloth .3s ease-in-out infinite alternate, qtStick .45s ease-in-out infinite alternate; }
@keyframes qtStick { from { transform: rotate(-14deg); } to { transform: rotate(16deg); } }
@keyframes qtCloth { from { transform: skewY(-10deg) scaleX(.85); } to { transform: skewY(8deg) scaleX(1.05); } }
@keyframes qtWaveIn { 0% { opacity: 0; transform: translateY(8px); } 8%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(6px); } }
/* balloons floating up from the window */
.qt-balloons { position: absolute; left: 50%; top: 4px; width: 0; height: 0; z-index: 4; pointer-events: none; }
.qt-balloons i { position: absolute; left: 0; bottom: 0; width: 12px; height: 15px; border-radius: 50% 50% 48% 48%; background: radial-gradient(circle at 35% 30%, #fff8 0 18%, transparent 20%), var(--c, #e11d48);
  opacity: 0; animation: qtBalloon 4.2s ease-out forwards; animation-delay: var(--d, 0s); }
.qt-balloons i::after { content: ''; position: absolute; left: 50%; top: 100%; width: 1px; height: 12px; background: rgba(60, 60, 60, .55); }
.qt-balloons i:nth-child(1) { --c: #e11d48; --x: -16px; --d: .1s; } .qt-balloons i:nth-child(2) { --c: #f5c518; --x: 6px; --d: .35s; }
.qt-balloons i:nth-child(3) { --c: #0e9e9e; --x: -4px; --d: .6s; } .qt-balloons i:nth-child(4) { --c: #6d4ae0; --x: 16px; --d: .85s; }
@keyframes qtBalloon { 0% { opacity: 0; transform: translate(0, 6px) scale(.4); } 10% { opacity: 1; transform: translate(0, 0) scale(1); }
  50% { transform: translate(calc(var(--x) * .6), -46px) rotate(-6deg); } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), -96px) rotate(8deg); } }
@media (prefers-reduced-motion: reduce) { .qt-wave, .qt-balloons i, .qt-car.celebrate .qcar { animation: none !important; } .qt-balloons { display: none; } }
/* ============================================================ Live quiz · trainer screens in "felt"
   (room screen: lobby, question, reveal, leaderboard, podium · practice screen). Cream fabric,
   stitched (dashed) inner edges, raised pills. Overrides the earlier dark theme. */
.quiz-host { --fi: #2b2a3a; --fs: #7a6a52; --fc: #fffaf2; --fe: #eadcc6; --fst: #e3d1b4; --fsh: #e8d8c0;
  background: radial-gradient(circle at 12% 8%, rgba(255,255,255,.7), transparent 40%), radial-gradient(#e6d7bf 1px, transparent 1.3px) 0 0 / 15px 15px, #f6ecdc; color: var(--fi); }
.quiz-host h1, .quiz-host h2, .quiz-host .qh-text, .quiz-host .qz-msg { color: var(--fi); }
.quiz-host .qh-brand, .quiz-host .qh-pin { color: var(--fi); } .quiz-host .qh-pin { opacity: 1; } .quiz-host .qh-pin b { color: #9a3412; }
/* raised felt pills: tools, language, player chips, tags */
.quiz-host .qh-tool, .quiz-host .lang-btn, .qx-side .btn-ghost { background: var(--fc); color: #3f3527; border: 1.5px solid #d9c7ab; box-shadow: 0 3px 0 #e5d4bb; }
.quiz-host .qh-tool:hover, .quiz-host .lang-btn:hover { background: #fff; transform: translateY(-1px); }
.quiz-host .qh-tag { background: var(--fc); border: 1.5px solid #dccbb1; color: #5b4d3a; }
/* stitched card helper look */
.quiz-host .qh-joinbox, .quiz-host .qh-why, .quiz-host .qh-board li, .quiz-host .qh-rest li, .quiz-host .qh-tcol { position: relative; }
.quiz-host .qh-joinbox::before, .quiz-host .qh-why::before, .quiz-host .qh-board li::before, .quiz-host .qh-rest li::before, .quiz-host .qh-tcol::before {
  content: ''; position: absolute; inset: 6px; border: 2px dashed var(--fst); border-radius: inherit; pointer-events: none; }
/* lobby */
.quiz-host .qh-joinbox { background: var(--fc); border: 1px solid var(--fe); box-shadow: 0 8px 0 #efe2cf, 0 26px 40px -26px rgba(120, 90, 50, .45); }
.quiz-host .qh-joinbox::before { border-radius: 22px; }
.quiz-host .qh-joinbox > * { position: relative; }
.quiz-host .qh-pinbig b { background: #f3ead9; border: 1.5px solid #e2d2b9; box-shadow: inset 0 -3px 0 #e6d6bd; color: var(--fi); }
.quiz-host .qh-count { color: var(--fi); opacity: 1; } .quiz-host .qh-count b { color: #9a3412; }
.quiz-host .qh-player { background: var(--fc); color: var(--fi); border: 1.5px solid #dccbb1; box-shadow: 0 3px 0 #e7d8c1; }
.quiz-host .qh-player:hover { background: #fdeee6; color: #b3261e; }
.quiz-host .qh-wait { color: var(--fs); opacity: 1; }
.quiz-host .qh-tcol { background: color-mix(in srgb, var(--c) 10%, #fffaf2); border: 2px solid color-mix(in srgb, var(--c) 45%, #eadcc6); box-shadow: 0 6px 0 #efe2cf; }
.quiz-host .qh-tcol::before { border-radius: 14px; border-color: color-mix(in srgb, var(--c) 30%, #e3d1b4); }
.quiz-host .qh-tcol > * { position: relative; }
.quiz-host .qh-tcol h3 { color: var(--fi); } .quiz-host .qh-tcol h3 small { color: #fff; }
/* question & reveal */
.quiz-host .qh-qhead { color: var(--fi); opacity: 1; } .quiz-host .qh-ans b { color: #9a3412; }
.quiz-host .qh-clock { background: conic-gradient(#6d4ae0 var(--p), #eadfcd 0); box-shadow: 0 4px 0 #e5d4bb; }
.quiz-host .qh-clock::before { background: var(--fc); }
.quiz-host .qh-clock b { color: var(--fi); }
.quiz-host .qh-clock.low { background: conic-gradient(#e5484d var(--p), #eadfcd 0); }
.quiz-host .qh-text-ar { color: var(--fs); opacity: 1; }
.quiz-host .qh-opt { box-shadow: 0 7px 0 color-mix(in srgb, var(--c) 62%, #000), 0 16px 26px -18px rgba(0, 0, 0, .45); }
.quiz-host .qh-opt::after { content: ''; position: absolute; inset: 6px; border: 2px dashed rgba(255, 255, 255, .42); border-radius: 13px; pointer-events: none; }
.quiz-host .qh-q.revealed .qh-opt.right { box-shadow: 0 0 0 5px #f5c518, 0 7px 0 color-mix(in srgb, var(--c) 62%, #000); }
.quiz-host .qh-why { background: var(--fc); border: 1px solid var(--fe); color: var(--fi); box-shadow: 0 5px 0 #efe2cf; }
.quiz-host .qh-why::before { border-radius: 11px; } .quiz-host .qh-why > * { position: relative; }
.quiz-host .qh-why span { color: #b45309; }
/* buttons */
.quiz-host .btn-outline, .quiz-host .btn-ghost.qh-light, .quiz-host .btn-outline.qh-light { background: var(--fc); color: #3f3527; border: 1.5px solid #d9c7ab; box-shadow: 0 4px 0 #e5d4bb; }
.quiz-host .btn-outline:hover, .quiz-host .qh-light:hover { background: #fff; transform: translateY(-1px); }
.quiz-host .btn-primary { box-shadow: 0 5px 0 #a51f6b, 0 14px 22px -12px #d62f8f; }
/* leaderboard (team board) */
.quiz-host .qh-board li { background: var(--fc); border: 1px solid var(--fe); box-shadow: 0 5px 0 #efe2cf; }
.quiz-host .qh-board li::before { border-radius: 11px; } .quiz-host .qh-board li > * { position: relative; }
.quiz-host .qh-rank { background: #fde4d8; color: #9a3412; }
.quiz-host .qh-name { color: var(--fi); } .quiz-host .qh-name em { color: #c2410c; }
.quiz-host .qh-sbar { background: #eadfcd; }
.quiz-host .qh-score { color: var(--fi); } .quiz-host .qh-sub, .quiz-host .qh-note { color: var(--fs); opacity: 1; }
/* podium */
.quiz-host .qh-pname { color: var(--fi); } .quiz-host .qh-pscore { color: var(--fs); opacity: 1; }
.quiz-host .qh-block { position: relative; box-shadow: 0 6px 0 rgba(0, 0, 0, .12); }
.quiz-host .qh-block::after { content: ''; position: absolute; inset: 7px 7px 5px; border: 2px dashed rgba(255, 255, 255, .55); border-radius: 13px 13px 4px 4px; pointer-events: none; }
.quiz-host .qh-rest li { background: var(--fc); border: 1px solid var(--fe); color: var(--fi); box-shadow: 0 4px 0 #efe2cf; }
.quiz-host .qh-rest li::before { border-radius: 9px; } .quiz-host .qh-rest li > * { position: relative; }
.quiz-host .qt { box-shadow: 0 8px 0 #e3d1b4, 0 24px 40px -26px rgba(120, 90, 50, .45); }
/* practice screen */
.quiz-practice { background: #f6ecdc; color: #2b2a3a; }
.quiz-practice .qx-banner { background: #fff3c4; color: #5b4300; border-bottom: 2px dashed #e9c766; }
.quiz-practice .qx-badge { background: #f5c518; color: #3b2a00; box-shadow: 0 3px 0 #d9a90e; }
.quiz-practice .qx-side { background: #efe3cf; border-inline-start: 2px dashed #e0cba8; }
.quiz-practice .qx-plabel { color: #5b4d3a; opacity: 1; }
.quiz-practice .qx-device { background: #2b2a3a; box-shadow: 0 0 0 3px #d9c7ab, 0 8px 0 #d9c7ab, 0 30px 50px -24px rgba(80, 60, 30, .55); }
/* Live quiz · room screen answer tiles: English in white, Arabic in black — both in Cairo */
.quiz-host .qh-otext { font-family: 'Cairo', 'IBM Plex Sans Arabic', var(--font); color: #fff; font-weight: 800; text-shadow: 0 1px 2px rgba(0, 0, 0, .18); }
.quiz-host .qh-otext small { align-self: flex-end; font-family: 'Cairo', 'IBM Plex Sans Arabic', var(--font); font-weight: 700; color: #111; opacity: 1; text-shadow: none;
  background: rgba(255, 255, 255, .82); border-radius: 8px; padding: 1px 9px; margin-top: 3px; line-height: 1.5; }
.quiz-host .qh-let { font-family: 'Cairo', var(--font); }

/* Upload questions: language switch + file button */
.qi-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; }
.qi-langl { font-weight: 700; font-size: 13px; }
.qi-seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.qi-seg button { border: 0; background: transparent; padding: 6px 14px; font: inherit; font-weight: 700; cursor: pointer; color: inherit; }
.qi-seg button.on { background: #1f6b4f; color: #fff; }
.qi-file { cursor: pointer; margin-inline-start: auto; }
.qz-upl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.qi-modal .qz-qtext[dir="ltr"], .qi-modal .qi-opts [dir="ltr"] { text-align: left; }
.qi-modal .qz-qtext[dir="rtl"], .qi-modal .qi-opts [dir="rtl"] { text-align: right; }

/* Quiz questions in Cairo, a little smaller (room screen + phone) */
.quiz-host .qh-text { font-family: 'Cairo', 'IBM Plex Sans Arabic', var(--font); font-size: clamp(20px, 2.6vw, 38px); font-weight: 700; line-height: 1.45; }
.quiz-host .qh-text-ar { font-family: 'Cairo', 'IBM Plex Sans Arabic', var(--font); font-size: clamp(16px, 1.7vw, 22px); font-weight: 700; }
.qp-text { font-family: 'Cairo', 'IBM Plex Sans Arabic', var(--font); font-size: 15px; line-height: 1.55; text-align: start; }

/* =====================================================================================
   Phase B · Business Architecture Transformation Journey (.jr) — dark "digital twin"
   ===================================================================================== */
.jr-banner { display: flex; align-items: center; gap: 18px; margin: 0 0 18px; padding: 18px 22px; border-radius: 20px; text-decoration: none; color: #e8eefc;
  background: radial-gradient(120% 160% at 0% 0%, #1e3a8a 0%, #0b1430 55%, #0a1026 100%); box-shadow: 0 18px 40px -24px #1e3a8a; position: relative; overflow: hidden; }
.jr-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.08) 45%, transparent 60%); transform: translateX(-100%); animation: jrSheen 4.5s ease-in-out infinite; }
.jr-banner-orb { flex: none; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(135deg, #3b82f6, #10b981); box-shadow: 0 0 28px -4px #3b82f6; }
.jr-banner-txt { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.jr-banner-txt b { font-family: 'Sora', 'Cairo', var(--font); font-size: 18px; }
.jr-banner-txt small { color: #a9b8dd; font-size: 13px; }
.jr-banner-path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.jr-banner-path i { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); }
.jr-banner-path em { width: 14px; height: 2px; background: linear-gradient(90deg, #60a5fa, #34d399); border-radius: 2px; }
.jr-banner .btn { position: relative; z-index: 1; flex: none; }
@keyframes jrSheen { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

.screen-journey { padding: 0 !important; }
.jr { --jb: #0a1026; --jg: rgba(255,255,255,.055); --jl: rgba(255,255,255,.12); --jt: #e8eefc; --jm: #9fb0d6;
  position: relative; min-height: calc(100vh - 140px); color: var(--jt); padding: 18px 26px 34px; margin: 0 auto; max-width: 1640px;
  background: radial-gradient(60% 50% at 10% 0%, rgba(59,130,246,.22), transparent 70%), radial-gradient(50% 45% at 100% 20%, rgba(16,185,129,.14), transparent 70%),
    radial-gradient(70% 60% at 50% 110%, rgba(167,139,250,.16), transparent 70%), linear-gradient(180deg, #0b1532, #0a1026 60%, #090e22); border-radius: 22px; overflow: hidden; }
.jr * { box-sizing: border-box; }
.jr.jr-present { max-width: none; border-radius: 0; min-height: 100vh; padding: 22px 34px; overflow: auto; }
.jr-glass { background: var(--jg); border: 1px solid var(--jl); border-radius: 18px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 20px 40px -30px #000, inset 0 1px 0 rgba(255,255,255,.06); }
.jr-muted { color: var(--jm); }
.jr-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.jr-title h1 { font-family: 'Sora', 'Cairo', var(--font); font-size: clamp(22px, 2.4vw, 32px); margin: 4px 0 4px; letter-spacing: -.01em; background: linear-gradient(90deg, #fff, #bcd3ff 60%, #a7f3d0); -webkit-background-clip: text; background-clip: text; color: transparent; }
[dir="rtl"] .jr-title h1 { font-family: 'Cairo', var(--font); letter-spacing: 0; }
.jr-title p { margin: 0; color: var(--jm); font-size: 14px; max-width: 760px; }
.jr-back { display: inline-flex; align-items: center; gap: 6px; color: var(--jm); font-size: 13px; text-decoration: none; margin-bottom: 6px; }
.jr-back:hover { color: #fff; }
.jr-eyebrow { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #7dd3fc; text-transform: uppercase; letter-spacing: .06em; }
[dir="rtl"] .jr-eyebrow { text-transform: none; letter-spacing: 0; }
.jr-eyebrow b { color: #e8eefc; text-transform: none; letter-spacing: 0; }
.jr-tools { display: flex; gap: 10px; align-items: center; }
.jr-seg { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid var(--jl); }
.jr-seg button { border: 0; background: none; color: var(--jm); font: inherit; font-weight: 700; font-size: 13px; padding: 6px 14px; border-radius: 9px; cursor: pointer; }
.jr-seg button.on { background: linear-gradient(135deg, #3b82f6, #6366f1); color: #fff; box-shadow: 0 6px 16px -8px #3b82f6; }
.jr-btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--jl); background: rgba(255,255,255,.06); color: var(--jt); font: inherit; font-weight: 700; font-size: 13px; padding: 8px 14px; border-radius: 12px; cursor: pointer; transition: background .2s, transform .15s; }
.jr-btn:hover { background: rgba(255,255,255,.12); transform: translateY(-1px); }
.jr-cta { display: inline-flex; align-items: center; gap: 8px; border: 0; font: inherit; font-weight: 800; font-size: 14px; padding: 10px 18px; border-radius: 14px; cursor: pointer; color: #fff;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6 55%, #10b981); background-size: 200% 100%; box-shadow: 0 10px 26px -12px #8b5cf6, 0 0 0 1px rgba(255,255,255,.12) inset; animation: jrGrad 6s ease infinite; transition: transform .15s; }
.jr-cta:hover { transform: translateY(-2px) scale(1.02); }
.jr-cta:disabled { opacity: .45; cursor: default; transform: none; }
@keyframes jrGrad { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.jr-x { border: 0; background: rgba(255,255,255,.08); color: var(--jt); width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; flex: none; }
.jr-x:hover { background: rgba(255,255,255,.16); }

/* stage navigator */
.jr-nav { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 6px 0 16px; padding: 10px 6px; }
.jr-track { position: absolute; left: 10%; right: 10%; top: 31px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.1); }
.jr-track i { position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: calc(var(--p) * 100%); border-radius: 3px; background: linear-gradient(90deg, #3b82f6, #a78bfa, #10b981); box-shadow: 0 0 12px #8b5cf6; transition: width .7s cubic-bezier(.2,.9,.3,1); }
[dir="rtl"] .jr-track i { background: linear-gradient(270deg, #3b82f6, #a78bfa, #10b981); }
.jr-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; color: var(--jm); font: inherit; cursor: pointer; padding: 0 4px; min-width: 0; }
.jr-dot { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #111b3d; border: 2px solid rgba(255,255,255,.16); color: var(--jm); transition: all .35s cubic-bezier(.2,.9,.3,1.3); }
.jr-step.done .jr-dot, .jr-step.past .jr-dot { border-color: #10b981; color: #6ee7b7; }
.jr-step.on .jr-dot { background: linear-gradient(135deg, #3b82f6, #8b5cf6); border-color: transparent; color: #fff; transform: scale(1.14); box-shadow: 0 0 0 6px rgba(99,102,241,.18), 0 0 26px #6366f1; }
.jr-sl { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.jr-sl b { font-size: 13.5px; color: var(--jt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.jr-sl small { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.jr-step.on .jr-sl b { color: #fff; }

/* stage transitions */
.jr-stage { position: relative; }
.jr-stage.enter-fwd { animation: jrInF .55s cubic-bezier(.2,.9,.3,1); }
.jr-stage.enter-back { animation: jrInB .55s cubic-bezier(.2,.9,.3,1); }
@keyframes jrInF { from { opacity: 0; transform: translateX(40px) scale(.985); filter: blur(4px); } }
@keyframes jrInB { from { opacity: 0; transform: translateX(-40px) scale(.985); filter: blur(4px); } }
[dir="rtl"] .jr-stage.enter-fwd { animation-name: jrInB; }
[dir="rtl"] .jr-stage.enter-back { animation-name: jrInF; }
.jr-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.jr-bar > .jr-cta, .jr-bar > .jr-btn:first-of-type { margin-inline-start: auto; }
.jr-bar > .jr-cta ~ .jr-btn { margin-inline-start: 0; }
.jr-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.jr-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: rgba(255,255,255,.05); border: 1px solid var(--jl); }
.jr-legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.jr-legend b { color: #fff; }
.jr-lg-auto { border-style: dashed !important; color: #fde68a; }
.jr-layer { font-size: 12px; color: var(--jm); display: inline-flex; gap: 5px; align-items: center; }
.jr-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 99px; color: #fff; background: color-mix(in srgb, var(--c, #3b82f6) 30%, transparent); border: 1px solid color-mix(in srgb, var(--c, #3b82f6) 70%, transparent); letter-spacing: .03em; }
.jr-chip.blue { --c: #3b82f6; } .jr-chip.green { --c: #10b981; }
.jr-emptybox { display: grid; place-items: center; gap: 12px; padding: 60px 20px; text-align: center; color: var(--jm); }

/* workspace */
.jr-ws { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 260px) minmax(0, 1fr); gap: 22px; align-items: start; }
.jr-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; overflow: visible; }
.jr-col { position: relative; z-index: 1; padding: 14px; }
.jr-col header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.jr-col header div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.jr-col header b { font-size: 14.5px; } .jr-col header small { color: var(--jm); font-size: 12px; }
.jr-n { font-family: 'Sora', var(--font); font-weight: 800; font-size: 20px; color: #fff; }
.jr-asis { border-color: rgba(96,165,250,.35); box-shadow: 0 0 0 1px rgba(59,130,246,.12), 0 30px 60px -40px #3b82f6; }
.jr-tobe { border-color: rgba(52,211,153,.35); box-shadow: 0 0 0 1px rgba(16,185,129,.12), 0 30px 60px -40px #10b981; }
.jr-ws.is-asis .jr-tobe { opacity: .45; filter: saturate(.6); }
.jr-ws.is-asis .jr-engine { opacity: .5; }
.jr-nodes { display: flex; flex-direction: column; gap: 8px; }
.jr-node { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; padding: 9px 11px; border-radius: 13px; cursor: pointer; font: inherit; color: var(--jt);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 16%, rgba(255,255,255,.03)), rgba(255,255,255,.02)); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  transition: transform .2s cubic-bezier(.2,.9,.3,1.3), box-shadow .2s, border-color .2s; animation: jrNodeIn .45s cubic-bezier(.2,.9,.3,1) both; }
.jr-nodes .jr-node:nth-child(n) { animation-delay: calc(var(--k, 0) * 30ms); }
@keyframes jrNodeIn { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.jr-node:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -14px var(--c), 0 0 0 1px var(--c); }
.jr-node.sel { box-shadow: 0 0 0 2px var(--c), 0 0 26px -4px var(--c); }
.jr-node.auto { border-style: dashed; }
.jr-node.dragging { opacity: .4; }
.jr-node.k-eliminated .jr-nb b { text-decoration: line-through; text-decoration-color: rgba(239,68,68,.7); }
.jr-nic { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--c); color: #fff; box-shadow: 0 0 14px -2px var(--c); }
.jr-nb { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.jr-nb b { font-size: 13.5px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.jr-nb small { font-size: 11px; color: var(--jm); }
.jr-dots { display: inline-flex; gap: 3px; }
.jr-dots i { width: 14px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.14); }
.jr-dots i.on { background: var(--c, #60a5fa); box-shadow: 0 0 6px var(--c, #60a5fa); }
.jr-star { color: #fbbf24; font-size: 13px; }
.jr-auto { position: absolute; top: -8px; inset-inline-end: 10px; font-size: 10px; font-weight: 800; padding: 1px 7px; border-radius: 99px; background: #78350f; color: #fde68a; border: 1px solid #f59e0b; }
.jr-addf { display: flex; gap: 6px; margin-top: 10px; }
.jr-addf input, .jr-search, .jr-drawer input, .jr-drawer textarea, .jr-drawer select, .jr-pop textarea { flex: 1; min-width: 0; font: inherit; font-size: 13.5px; color: var(--jt); background: rgba(0,0,0,.25); border: 1px solid var(--jl); border-radius: 10px; padding: 8px 10px; }
.jr-addf input:focus, .jr-search:focus, .jr-drawer :is(input, textarea, select):focus, .jr-pop textarea:focus { outline: none; border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96,165,250,.2); }
.jr-addf button { border: 0; width: 38px; border-radius: 10px; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; display: grid; place-items: center; }
.jr-drawer select option { color: #0f172a; background: #fff; }
.jr-engine { position: sticky; top: 90px; z-index: 3; display: flex; flex-direction: column; gap: 10px; align-self: center; }
.jr-core { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 16px 10px; border-radius: 16px; background: radial-gradient(circle at 50% 30%, #18245a, #0c1534 70%); border: 1px solid var(--jl); }
.jr-core b { font-size: 14px; } .jr-core small { font-size: 11.5px; color: var(--jm); }
.jr-orb { position: relative; width: 64px; height: 64px; margin-bottom: 6px; }
.jr-orb i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid transparent; border-top-color: #60a5fa; border-right-color: #a78bfa; animation: jrSpin 3s linear infinite; }
.jr-orb i:nth-child(2) { inset: 9px; border-top-color: #34d399; border-left-color: #f59e0b; animation-duration: 2.2s; animation-direction: reverse; }
.jr-orb i:nth-child(3) { inset: 21px; background: radial-gradient(circle, #fff, #a78bfa 45%, transparent 70%); border: 0; animation: jrPulse 2s ease-in-out infinite; }
@keyframes jrSpin { to { transform: rotate(360deg); } }
@keyframes jrPulse { 50% { transform: scale(1.35); opacity: .7; } }
.jr-drops { display: flex; flex-direction: column; gap: 7px; }
.jr-drop { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 12px; border: 1.5px dashed color-mix(in srgb, var(--c) 60%, transparent); background: color-mix(in srgb, var(--c) 10%, #0c1534); color: var(--jt); transition: transform .2s, background .2s, box-shadow .2s; }
.jr-drop > svg { color: var(--c); flex: none; }
.jr-drop span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.jr-drop b { font-size: 12.5px; } .jr-drop small { font-size: 10.5px; color: var(--jm); line-height: 1.3; }
.jr-drop em { font-style: normal; font-weight: 800; font-family: 'Sora', var(--font); color: var(--c); }
.jr.jr-dragging .jr-drop { animation: jrWiggle 1s ease-in-out infinite; }
.jr-drop.over { transform: scale(1.06); background: color-mix(in srgb, var(--c) 28%, rgba(10,16,38,.7)); box-shadow: 0 0 24px -4px var(--c); border-style: solid; }
.jr-drop.got { animation: jrGot .6s ease; }
@keyframes jrWiggle { 50% { transform: translateX(2px); } }
@keyframes jrGot { 40% { transform: scale(1.12); box-shadow: 0 0 34px var(--c); } }
.jr-ln { fill: none; stroke-width: 2.2; opacity: .75; stroke-linecap: round; }
.jr-ln.k-retained { stroke: #3b82f6; }
.jr-ln.k-modified { stroke: #f59e0b; stroke-dasharray: 8 6; animation: jrFlow 1.2s linear infinite; }
.jr-ln.k-new { stroke: #10b981; stroke-dasharray: 8 6; animation: jrFlow 1.2s linear infinite; }
.jr-ln.k-eliminated { stroke: #ef4444; stroke-dasharray: 3 6; opacity: .6; }
.jr-ln.k-replace { stroke: #fb923c; stroke-dasharray: 10 5; animation: jrFlow 1.2s linear infinite; }
.jr-ln.auto { opacity: .35; }
.jr-ln.hl { stroke-width: 4; opacity: 1; filter: drop-shadow(0 0 6px currentColor); }
@keyframes jrFlow { to { stroke-dashoffset: -28; } }

/* drawer + popover */
.jr-drawer { position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: min(400px, 100%); z-index: 30; background: rgba(12,20,48,.94); border-inline-start: 1px solid var(--jl); backdrop-filter: blur(18px);
  transform: translateX(105%); transition: transform .4s cubic-bezier(.2,.9,.3,1); display: flex; flex-direction: column; box-shadow: -30px 0 60px -30px #000; }
[dir="rtl"] .jr-drawer { transform: translateX(-105%); }
.jr-drawer.open { transform: none !important; }
.jr-drawer header { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--jl); background: linear-gradient(135deg, color-mix(in srgb, var(--c) 22%, transparent), transparent); }
.jr-drawer h3 { flex: 1; margin: 0; font-size: 16px; color: var(--jt); min-width: 0; overflow-wrap: anywhere; }
.jr-dbody { padding: 14px 18px 24px; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.jr-lbl { font-size: 11.5px; font-weight: 800; color: var(--jm); text-transform: uppercase; letter-spacing: .05em; margin-top: 8px; }
[dir="rtl"] .jr-lbl { text-transform: none; letter-spacing: 0; }
.jr-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(245,158,11,.12); border: 1px dashed #f59e0b; color: #fde68a; font-size: 13px; }
.jr-note span { flex: 1 1 200px; }
.jr-mats { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--jl); }
.jr-mats > div { flex: 1; display: flex; flex-direction: column; gap: 4px; --c: #60a5fa; }
.jr-mats > div:last-child { --c: #34d399; }
.jr-mats small { font-size: 11px; color: var(--jm); } .jr-mats b { font-size: 13px; }
[dir="rtl"] .jr-mats > span svg { transform: scaleX(-1); }
.jr-cls { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.jr-cls button { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 11px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--jt); background: rgba(255,255,255,.04); border: 1px solid var(--jl); transition: all .2s; }
.jr-cls button svg { color: var(--c); }
.jr-cls button:hover { border-color: var(--c); }
.jr-cls button.on { background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 0 18px -4px var(--c); }
.jr-cls button.on svg { color: #fff; }
.jr-cls button.sugg { border: 1.5px dashed var(--c); }
.jr-pkgref { margin: 0; }
.jr-link { border: 0; background: rgba(167,139,250,.14); color: #ddd6fe; font: inherit; font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 10px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.jr-del { margin-top: 14px; align-self: flex-start; color: #fca5a5 !important; }
.jr-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.jr-2 > div { display: flex; flex-direction: column; gap: 6px; }
.jr-checks { display: flex; flex-direction: column; gap: 5px; max-height: 190px; overflow: auto; flex-shrink: 0; }
.jr-checks label { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--jl); cursor: pointer; font-size: 13px; }
.jr-checks input { position: absolute; opacity: 0; pointer-events: none; }
.jr-checks i { flex: none; width: 16px; height: 16px; border-radius: 5px; border: 2px solid var(--c); }
.jr-checks input:checked + i { background: var(--c); box-shadow: 0 0 10px var(--c); }
.jr-checks span { flex: 1; min-width: 0; } .jr-checks small { font-size: 11px; color: var(--jm); }
.jr-checks label:has(input:checked) { border-color: var(--c); }
.jr-warn1 { margin: 6px 0 0; font-size: 12.5px; color: #fca5a5; display: flex; gap: 6px; }
.jr-pop { position: absolute; z-index: 40; padding: 12px; border-radius: 16px; background: rgba(14,22,52,.97); border: 1px solid rgba(255,255,255,.18); box-shadow: 0 24px 60px -20px #000; animation: jrPop .25s cubic-bezier(.2,.9,.3,1.3); display: flex; flex-direction: column; gap: 8px; }
@keyframes jrPop { from { opacity: 0; transform: translateY(-6px) scale(.96); } }
.jr-pop header { display: flex; align-items: center; gap: 8px; } .jr-pop header b { flex: 1; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.jr-popopts { display: flex; flex-direction: column; gap: 6px; }
.jr-popopts button, .jr-popconf { display: flex; align-items: center; gap: 8px; text-align: start; padding: 8px 10px; border-radius: 11px; font: inherit; font-size: 13px; font-weight: 700; color: var(--jt); cursor: pointer; background: color-mix(in srgb, var(--c, #f59e0b) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c, #f59e0b) 50%, transparent); }
.jr-popopts button svg { color: var(--c); flex: none; }
.jr-popopts button:hover { background: color-mix(in srgb, var(--c) 26%, transparent); }
.jr-popconf { --c: #f59e0b; border-style: dashed; color: #fde68a; }

/* theater (cinematic transformation) */
.jr-theater { position: fixed; inset: 0; z-index: 2000; display: flex; color: #e8eefc; background: radial-gradient(70% 60% at 50% 25%, #1b2f6e, transparent 70%), radial-gradient(50% 50% at 90% 90%, rgba(16,185,129,.18), transparent 70%), #070b1c; animation: jrFade .4s ease; }
.jr-theater .jr-pbar { position: sticky; bottom: 0; background: rgba(12,20,48,.95); }
.jr-theater[hidden] { display: none; }
@keyframes jrFade { from { opacity: 0; } }
.jr-th-in { flex: 1; display: flex; flex-direction: column; gap: 18px; padding: 28px clamp(16px, 4vw, 60px) 22px; overflow: auto; }
.jr-th-cap { --c: #60a5fa; text-align: center; min-height: 104px; }
.jr-th-k { font-size: 12px; font-weight: 800; color: var(--c); letter-spacing: .1em; }
.jr-th-cap h2 { margin: 4px 0 6px; font-family: 'Sora', 'Cairo', var(--font); font-size: clamp(22px, 3vw, 38px); color: #fff; text-shadow: 0 0 30px var(--c); transition: text-shadow .4s; }
.jr-th-cap p { margin: 0 auto; max-width: 900px; color: #c7d4f3; font-size: 15px; line-height: 1.6; }
.jr-board { flex: 1; display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start; gap: 12px; }
.jr-tc { --c0: #60a5fa; width: 200px; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 16px; position: relative;
  background: linear-gradient(135deg, rgba(96,165,250,.16), rgba(255,255,255,.03)); border: 1px solid rgba(96,165,250,.45); color: #fff;
  opacity: 0; transform: translateY(16px) scale(.9); transition: all .7s cubic-bezier(.2,.9,.3,1.2); transition-delay: calc(var(--i) * 25ms); }
.jr-tc b { font-size: 14px; line-height: 1.35; } .jr-tc small { font-size: 11.5px; color: #a9b8dd; }
.jr-tci { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: #3b82f6; transition: background .5s; }
.jr-tc.show { opacity: 1; transform: none; }
.jr-tc.lit { background: linear-gradient(135deg, color-mix(in srgb, var(--c) 30%, transparent), rgba(255,255,255,.03)); border-color: var(--c); }
.jr-tc.lit .jr-tci { background: var(--c); }
.jr-tc.hl { transform: scale(1.08); box-shadow: 0 0 0 2px var(--c), 0 0 40px -6px var(--c); z-index: 2; }
.jr-tc.hl[data-type="new"] { animation: jrArrive .9s cubic-bezier(.2,.9,.3,1.3); }
.jr-tc.hl[data-type="modified"] { animation: jrMorph 1s ease; }
.jr-tc.hl[data-type="eliminated"] { animation: jrShake .6s ease; }
.jr-tc.dim { opacity: .28; filter: saturate(.4); }
.jr-tc.gone { opacity: 0; transform: scale(.4) translateY(30px); filter: blur(6px); width: 0; padding: 0; margin: 0 -6px; border-width: 0; overflow: hidden; transition-delay: 0s; }
.jr-tc.final { box-shadow: 0 0 0 1px var(--c), 0 0 26px -10px var(--c); }
@keyframes jrArrive { from { transform: translateY(-60px) scale(.5) rotate(-6deg); opacity: 0; } 60% { transform: scale(1.14); } }
@keyframes jrMorph { 30% { transform: scale(1.12) rotateY(90deg); } 60% { transform: scale(1.12) rotateY(0); } }
@keyframes jrShake { 20%, 60% { transform: translateX(-6px) scale(1.05); } 40%, 80% { transform: translateX(6px) scale(1.05); } }
.jr-pbar { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; padding: 8px 10px; border-radius: 16px; background: rgba(255,255,255,.07); border: 1px solid var(--jl); align-self: center; }
.jr-pbar button { border: 0; background: rgba(255,255,255,.08); color: #fff; height: 34px; min-width: 34px; padding: 0 8px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; }
.jr-pbar button:hover { background: rgba(255,255,255,.16); }
.jr-pbar .jr-pp { width: 44px; height: 40px; background: linear-gradient(135deg, #3b82f6, #8b5cf6); }
[dir="rtl"] .jr-pbar [data-pv] svg, [dir="rtl"] .jr-pbar [data-pn] svg { transform: scaleX(-1); }
.jr-pdots { display: inline-flex; gap: 5px; margin: 0 6px; }
.jr-pdots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.2); transition: all .3s; }
.jr-pdots i.on { background: #a78bfa; } .jr-pdots i.cur { width: 22px; border-radius: 4px; background: #fff; }
.jr-speed { display: inline-flex; gap: 3px; padding: 2px; border-radius: 10px; background: rgba(0,0,0,.25); }
.jr-speed button { height: 28px; min-width: 34px; background: none; }
.jr-speed button.on { background: rgba(255,255,255,.18); }

/* gap matrix */
.jr-mxtools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.jr-search { flex: 0 1 240px; }
.jr-filters { display: flex; flex-wrap: wrap; gap: 5px; }
.jr-filters button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--jl); background: rgba(255,255,255,.04); color: var(--jt); font: inherit; font-size: 12.5px; font-weight: 700; padding: 5px 11px; border-radius: 99px; cursor: pointer; }
.jr-filters button i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.jr-filters button.on { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.4); }
.jr-zoom { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.jr-zoom button { border: 1px solid var(--jl); background: rgba(255,255,255,.06); color: #fff; width: 32px; height: 32px; border-radius: 9px; cursor: pointer; font-size: 16px; display: grid; place-items: center; }
.jr-zoom b { min-width: 44px; text-align: center; font-size: 12px; }
.jr-mxcard { position: relative; padding: 0; overflow: hidden; }
.jr-mxcard:fullscreen { background: #0a1026; padding: 20px; overflow: auto; }
.jr-mxwrap { overflow: auto; max-height: 68vh; font-size: calc(13px * var(--z, 1)); }
.jr-mxcard:fullscreen .jr-mxwrap { max-height: none; }
.jr-mx { border-collapse: separate; border-spacing: 4px; min-width: 100%; }
.jr-mx th { font-weight: 700; }
.jr-mx thead th { position: sticky; top: 0; z-index: 3; background: #0f1a3e; }
.jr-mx .jr-rowh, .jr-mx .jr-corner { position: sticky; inset-inline-start: 0; z-index: 2; background: #0f1a3e; }
.jr-mx .jr-corner { z-index: 4; font-size: .8em; color: var(--jm); white-space: nowrap; padding: 8px 10px; text-align: start; }
.jr-colh { vertical-align: bottom; padding: 8px 4px; min-width: 7.2em; max-width: 9em; border-bottom: 3px solid var(--c); border-radius: 8px 8px 0 0; }
.jr-colh span { display: block; font-size: .92em; line-height: 1.3; overflow-wrap: anywhere; }
.jr-elimh { background: rgba(239,68,68,.15) !important; }
.jr-rowh { text-align: start; padding: 8px 12px; min-width: 12em; max-width: 16em; border-inline-start: 3px solid var(--c); border-radius: 0 8px 8px 0; }
[dir="rtl"] .jr-rowh { border-radius: 8px 0 0 8px; }
.jr-rowh span { font-size: .95em; line-height: 1.3; }
.jr-mx th.hl { background: #1e3a8a !important; box-shadow: 0 0 0 1px #60a5fa inset; }
.jr-newrow .jr-rowh { background: rgba(16,185,129,.15) !important; }
.jr-cell { height: 3.2em; min-width: 7.2em; border-radius: 10px; text-align: center; vertical-align: middle; cursor: pointer; background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.05); transition: background .2s, transform .2s, box-shadow .2s; }
.jr-cell > i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.12); }
.jr-cell:hover { background: rgba(255,255,255,.08); transform: scale(1.04); }
.jr-cell.sel { box-shadow: 0 0 0 2px #fff, 0 0 18px #60a5fa; }
.jr-cell.on { background: color-mix(in srgb, var(--c, #3b82f6) 22%, transparent); }
.jr-cell.k-retained { --c: #3b82f6; } .jr-cell.k-modified { --c: #f59e0b; } .jr-cell.k-new { --c: #10b981; } .jr-cell.k-eliminated { --c: #ef4444; } .jr-cell.k-replace { --c: #fb923c; }
.jr-elimc { background: rgba(239,68,68,.05); }
.jr-void { cursor: default; background: none; border: 0; }
.jr-mb { display: inline-flex; align-items: center; gap: 5px; padding: .3em .7em; border-radius: 99px; font-size: .85em; font-weight: 800; color: #fff; background: var(--c); box-shadow: 0 0 14px -4px var(--c); white-space: nowrap; }
.jr-mb.k-replace { --c: #fb923c; }
.jr-mb.auto { background: transparent; border: 1.5px dashed var(--c); color: color-mix(in srgb, var(--c) 60%, #fff); box-shadow: none; }
.jr-mb em { font-style: normal; font-size: .82em; opacity: .85; }
.jr-mx.run .jr-cell { animation: jrCellIn .5s cubic-bezier(.2,.9,.3,1.3) both; animation-delay: calc(var(--i) * 14ms); }
.jr-mx.run .jr-cell.on .jr-mb { animation: jrBadge .6s cubic-bezier(.2,.9,.3,1.4) both; animation-delay: calc(var(--i) * 14ms + 250ms); }
@keyframes jrCellIn { from { opacity: 0; transform: scale(.6); } }
@keyframes jrBadge { from { opacity: 0; transform: scale(.3); } 70% { transform: scale(1.15); } }
.jr-mxcard.scan::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 90px; background: linear-gradient(180deg, transparent, rgba(96,165,250,.25), transparent); animation: jrScan 1.3s linear infinite; pointer-events: none; }
@keyframes jrScan { from { transform: translateY(-90px); } to { transform: translateY(70vh); } }
.jr-mxnote { margin: 0; padding: 10px 14px; font-size: 12.5px; color: var(--jm); display: flex; gap: 6px; align-items: center; border-top: 1px solid var(--jl); }

/* roadmap journey */
.jr-out { font-size: 12.5px; color: #c4b5fd; display: inline-flex; gap: 6px; align-items: center; max-width: 640px; }
.jr-warns { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.jr-warns span { font-size: 12.5px; color: #fde68a; display: flex; gap: 6px; align-items: center; }
.jr-warns span.bad { color: #fca5a5; }
.jr-rmcard { position: relative; padding: 0; overflow: hidden; }
.jr-rm { position: relative; width: 100%; }
.jr-band { position: absolute; top: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; padding-top: 12px; border-inline-start: 1px dashed rgba(255,255,255,.08);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 9%, transparent), transparent 60%); transition: background .25s; }
.jr-band b { font-size: 13px; color: var(--c); } .jr-band small { font-size: 11px; color: var(--jm); }
.jr-band.over { background: linear-gradient(180deg, color-mix(in srgb, var(--c) 28%, transparent), transparent 80%); }
/* Phase C: earlier-phase roadmap components shown as context under the map */
.jr-ctxrow { margin: 10px 4px 2px; padding-top: 10px; border-top: 1px dashed rgba(255,255,255,.12); }
.jr-ctxrow > b { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--jm); margin-bottom: 8px; }
.jr-ctxcols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.jr-ctxcols > div { display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); }
.jr-ctxcols small { font-size: 11px; font-weight: 700; color: var(--c); }
.jr-ctxcols i { font-style: normal; font-size: 11.5px; color: var(--jm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.jr-ctxcols i em { font-style: normal; color: var(--c); font-weight: 700; }
.jc-addflow { align-items: center; }
.jc-addflow select { flex: 1; min-width: 0; font: inherit; font-size: 12.5px; color: var(--jt); background: rgba(0,0,0,.25); border: 1px solid var(--jl); border-radius: 10px; padding: 7px 6px; }
.jc-addflow select option { color: #0f1f45; }
.jc-addflow > span { color: var(--jm); font-size: 13px; }
.jc-time, .jc-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.jc-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.jr-rmsvg { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.jr-path-bg { fill: none; stroke: rgba(255,255,255,.07); stroke-width: 10; stroke-linecap: round; }
.jr-path { fill: none; stroke: url(#jrpath); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 10 8; animation: jrFlow 1s linear infinite; filter: drop-shadow(0 0 6px rgba(167,139,250,.6)); }
.jr-end, .jr-pk, .jr-ta, .jr-gapcloud { position: absolute; transform: translate(-50%, -50%); }
.jr-end { width: 104px; height: 104px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #fff; z-index: 2; }
.jr-start { background: radial-gradient(circle at 35% 30%, #60a5fa, #1e3a8a 70%); box-shadow: 0 0 0 8px rgba(59,130,246,.15), 0 0 40px -6px #3b82f6; }
.jr-finish { background: radial-gradient(circle at 35% 30%, #6ee7b7, #047857 70%); box-shadow: 0 0 0 8px rgba(16,185,129,.15), 0 0 40px -6px #10b981; }
.jr-end b { font-family: 'Sora', var(--font); font-size: 15px; } .jr-end small { font-size: 11px; opacity: .85; }
.jr-end.hl { animation: jrBeacon 1.4s ease-in-out infinite; }
@keyframes jrBeacon { 50% { box-shadow: 0 0 0 18px rgba(255,255,255,.08), 0 0 70px 4px currentColor; transform: translate(-50%, -50%) scale(1.08); } }
.jr-pk { z-index: 3; border: 0; background: none; color: #fff; font: inherit; cursor: grab; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 150px; touch-action: none; animation: jrPkIn .6s cubic-bezier(.2,.9,.3,1.3) both; animation-delay: calc(var(--i) * 70ms); }
@keyframes jrPkIn { from { opacity: 0; transform: translate(-50%, -50%) scale(.3); } }
.jr-pkc { width: 70px; height: 70px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 70%, #fff), color-mix(in srgb, var(--c) 55%, #0a1026) 75%); box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 18%, transparent), 0 0 26px -6px var(--c); transition: transform .25s cubic-bezier(.2,.9,.3,1.3), box-shadow .25s; }
.jr-pkc b { font-family: 'Sora', var(--font); font-size: 20px; line-height: 1; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.jr-pkc small { font-size: 10.5px; display: inline-flex; gap: 2px; align-items: center; opacity: .9; }
.jr-pk:hover .jr-pkc { transform: scale(1.1); }
.jr-pk.sel .jr-pkc { box-shadow: 0 0 0 3px #fff, 0 0 30px var(--c); }
.jr-pk.pr-high .jr-pkc::after { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid #f87171; animation: jrSpin 6s linear infinite; border-top-color: transparent; }
.jr-pk.warn .jr-pkc { box-shadow: 0 0 0 3px #ef4444, 0 0 24px #ef4444; }
.jr-pk.dragging { cursor: grabbing; z-index: 10; animation: none; }
.jr-pk.dragging .jr-pkc { transform: scale(1.15); }
.jr-pkl { font-size: 12.5px; font-weight: 700; text-align: center; line-height: 1.3; max-width: 150px; padding: 3px 8px; border-radius: 8px; background: rgba(10,16,38,.75); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jr-pko { font-size: 10.5px; color: var(--jm); margin-top: -3px; }
.jr-ta { z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
.jr-ta i { width: 18px; height: 18px; transform: rotate(45deg); background: #facc15; box-shadow: 0 0 14px #facc15; border-radius: 3px; }
.jr-ta span { font-size: 10.5px; font-weight: 800; color: #fde68a; white-space: nowrap; background: rgba(10,16,38,.8); padding: 2px 7px; border-radius: 6px; margin-top: 30px; }
.jr-gapcloud { z-index: 4; width: 1px; height: 1px; pointer-events: none; }
.jr-gapcloud i { position: absolute; font-style: normal; font-size: 11px; font-weight: 700; white-space: nowrap; padding: 3px 9px; border-radius: 99px; color: #fff; background: var(--c); opacity: 0; transform: translate(-50%, -50%) scale(.3); transition: all .7s cubic-bezier(.2,.9,.3,1.3); transition-delay: calc(var(--i) * 70ms); }
.jr-gapcloud.on i { opacity: 1; transform: translate(calc(-50% + (var(--i) - 4) * 9px), calc(-90px - var(--i) * 17px)) scale(1); }
.jr-playing .jr-path { stroke-dasharray: var(--len) var(--len); stroke-dashoffset: var(--len); animation: none; opacity: 0; transition: stroke-dashoffset 1.1s ease, opacity .3s; }
.jr-playing .jr-path.on { stroke-dashoffset: 0; opacity: 1; }
.jr-playing .jr-pk { opacity: .3; filter: saturate(.3); transition: opacity .4s, filter .4s; animation: none; }
.jr-playing .jr-pk.act { opacity: 1; filter: none; }
.jr-playing .jr-pk.hl .jr-pkc { transform: scale(1.22); box-shadow: 0 0 0 8px color-mix(in srgb, var(--c) 30%, transparent), 0 0 50px var(--c); }
.jr-playing .jr-ta { opacity: 0; transition: opacity .4s; } .jr-playing .jr-ta.on { opacity: 1; animation: jrPop .5s ease; }
.jr-playing .jr-finish { opacity: .35; transition: opacity .5s; } .jr-playing .jr-finish.hl { opacity: 1; }
.jr-jcap { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 6; max-width: 80%; text-align: center; font-size: 16px; font-weight: 800; color: #fff; padding: 8px 18px; border-radius: 14px; background: rgba(10,16,38,.85); border: 1px solid rgba(167,139,250,.5); box-shadow: 0 0 30px -10px #a78bfa; }
.jr-jcap:empty { display: none; }
.jr-rmcard > .jr-pbar { position: absolute; bottom: 52px; left: 50%; transform: translateX(-50%); z-index: 6; background: rgba(10,16,38,.9); }

/* deliverables */
.jr-dh { display: block; font-size: 17px; } 
.jr-dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.jr-dcard { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 18px; text-align: start; font: inherit; color: var(--jt); cursor: pointer; transition: transform .25s cubic-bezier(.2,.9,.3,1.3), box-shadow .25s; animation: jrNodeIn .5s cubic-bezier(.2,.9,.3,1) both; animation-delay: calc(var(--i) * 60ms); }
.jr-dcard:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -24px #8b5cf6, 0 0 0 1px rgba(167,139,250,.5); }
.jr-dic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(135deg, #3b82f6, #8b5cf6); box-shadow: 0 0 20px -6px #8b5cf6; }
.jr-dnum { position: absolute; top: 14px; inset-inline-end: 16px; font-family: 'Sora', var(--font); font-weight: 800; font-size: 26px; color: rgba(255,255,255,.08); }
.jr-dcard b { font-size: 14.5px; line-height: 1.35; } .jr-dcard em { font-style: normal; font-family: 'Sora', var(--font); font-weight: 800; font-size: 22px; color: #a7f3d0; }
.jr-dgo { margin-top: auto; font-size: 12.5px; font-weight: 700; color: #c4b5fd; display: inline-flex; gap: 5px; align-items: center; }
[dir="rtl"] .jr-dgo svg, [dir="rtl"] .jr-cta svg, [dir="rtl"] .jr-banner-path em { transform: scaleX(-1); }
.jr-modal .modal-body, .jr-dwrap { max-height: 70vh; overflow: auto; }
.jr-dt { width: 100%; border-collapse: collapse; font-size: 13px; }
.jr-dt th, .jr-dt td { border: 1px solid var(--line); padding: 7px 9px; text-align: start; vertical-align: top; }
.jr-dt th { background: #f5f7fc; color: var(--navy); }
.jr-dt td.k-retained { background: #dbeafe; } .jr-dt td.k-modified { background: #fef3c7; } .jr-dt td.k-new { background: #d1fae5; } .jr-dt td.k-eliminated { background: #fee2e2; } .jr-dt td.k-replace { background: #ffedd5; }
.jr-dnote { font-size: 13px; color: var(--muted); }

@media (max-width: 1100px) {
  .jr-ws { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .jr-engine { grid-column: 1 / -1; grid-row: 1; position: static; flex-direction: row; flex-wrap: wrap; align-items: stretch; }
  .jr-core { flex: 1 1 100%; flex-direction: row; justify-content: center; padding: 8px; }
  .jr-orb { width: 40px; height: 40px; margin: 0; }
  .jr-drops { flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; }
  .jr-drop { flex: 1 1 160px; }
  .jr-links { display: none; }
}
@media (max-width: 720px) {
  .jr { padding: 14px 12px 26px; border-radius: 0; }
  .jr-ws { grid-template-columns: minmax(0, 1fr); }
  .jr-nav { gap: 2px; } .jr-sl small { display: none; } .jr-dot { width: 36px; height: 36px; } .jr-track { top: 27px; }
  .jr-sl b { font-size: 11px; }
  .jr-banner { flex-wrap: wrap; } .jr-banner .btn { width: 100%; justify-content: center; }
  .jr-tc { width: calc(50% - 8px); }
  .jr-pk { width: 110px; } .jr-pkc { width: 54px; height: 54px; } .jr-pkl { max-width: 110px; font-size: 11px; } .jr-end { width: 74px; height: 74px; }
}
@media (prefers-reduced-motion: reduce) { .jr *, .jr-banner::after { animation-duration: .01s !important; transition-duration: .01s !important; } }
.jr-pop[hidden] { display: none; }
.jr-bar > .jr-btn ~ .jr-cta { margin-inline-start: 0; }
@media (max-width: 900px) { .jr-rmcard { overflow-x: auto; } .jr-rm { min-width: 820px; } .jr-rmcard > .jr-mxnote { position: sticky; inset-inline-start: 0; } }
/* journey · batch 2: layers, owners, process flows */
.jr-layers { display: inline-flex; padding: 3px; gap: 3px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid var(--jl); flex-wrap: wrap; }
.jr-layers button { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; color: var(--jm); font: inherit; font-weight: 700; font-size: 13px; padding: 7px 13px; border-radius: 11px; cursor: pointer; transition: background .2s, color .2s; }
.jr-layers button em { font-style: normal; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 99px; background: rgba(255,255,255,.1); color: #fff; }
.jr-layers button:hover { color: #fff; }
.jr-layers button.on { color: #fff; background: linear-gradient(135deg, rgba(59,130,246,.55), rgba(16,185,129,.45)); box-shadow: 0 6px 18px -10px #3b82f6, inset 0 0 0 1px rgba(255,255,255,.18); }
.jr-own { color: #c4b5fd !important; display: inline-flex; gap: 4px; align-items: center; }
.jr-emptyl { margin: 6px 2px; padding: 16px 12px; border-radius: 12px; border: 1.5px dashed var(--jl); color: var(--jm); font-size: 13px; text-align: center; }
.jr-flowcard { margin-top: 18px; padding: 16px 18px; animation: jrNodeIn .5s ease both; }
.jr-flowhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.jr-flowhead b { font-size: 15px; display: inline-flex; align-items: center; gap: 7px; }
.jr-flowlg { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-inline-start: auto; }
.jr-flowlg span { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 99px; border: 1px solid var(--jl); }
.jr-flowlg .same { color: #93c5fd; border-color: #3b82f6; } .jr-flowlg .add { color: #6ee7b7; border-color: #10b981; } .jr-flowlg .del { color: #fca5a5; border-color: #ef4444; } .jr-flowlg .dec { color: #fde68a; border-color: #f59e0b; }
.jr-flowlane { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px dashed var(--jl); }
.jr-flowlane .jr-chip { flex: none; }
.jr-flowrow { display: flex; align-items: center; gap: 0; overflow-x: auto; padding: 10px 4px 12px; flex: 1; min-width: 0; }
.jr-fend { flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; background: radial-gradient(circle at 35% 30%, #475569, #1e293b); border: 1px solid var(--jl); }
.jr-fstep { flex: none; position: relative; max-width: 170px; min-width: 96px; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; font-weight: 700; line-height: 1.35; text-align: center; color: #fff;
  background: color-mix(in srgb, var(--fc) 20%, #0c1534); border: 1.5px solid var(--fc); box-shadow: 0 0 16px -8px var(--fc); animation: jrStepIn .45s cubic-bezier(.2,.9,.3,1.3) both; animation-delay: calc(var(--i) * 80ms); }
.jr-fstep.same { --fc: #3b82f6; } .jr-fstep.add { --fc: #10b981; } .jr-fstep.del { --fc: #ef4444; }
.jr-fstep.del span { text-decoration: line-through; text-decoration-color: rgba(255,255,255,.5); opacity: .85; }
.jr-fstep.dec { border-radius: 4px; transform: none; background: color-mix(in srgb, #f59e0b 22%, #0c1534); border: 2px solid #f59e0b; clip-path: polygon(10% 0, 90% 0, 100% 50%, 90% 100%, 10% 100%, 0 50%); padding: 12px 22px; }
.jr-fstep.dec.add { border-color: #10b981; } .jr-fstep.dec.del { border-color: #ef4444; }
@keyframes jrStepIn { from { opacity: 0; transform: translateY(10px) scale(.85); } }
.jr-farr { flex: none; position: relative; width: 26px; height: 2px; background: linear-gradient(90deg, rgba(255,255,255,.2), rgba(255,255,255,.55)); animation: jrStepIn .4s ease both; animation-delay: calc(var(--i) * 80ms); }
.jr-farr::after { content: ''; position: absolute; inset-inline-end: -1px; top: -4px; border: 5px solid transparent; border-inline-start: 7px solid rgba(255,255,255,.6); border-inline-end: 0; }
[dir="rtl"] .jr-farr { background: linear-gradient(270deg, rgba(255,255,255,.2), rgba(255,255,255,.55)); }
.jr-flownone { margin: 6px 0; font-size: 13px; }
.jr-stepsed { display: flex; flex-direction: column; gap: 4px; }
.jr-steps { display: flex; flex-direction: column; gap: 5px; }
.jr-steprow { display: flex; align-items: center; gap: 5px; }
.jr-steprow input { flex: 1; }
.jr-steprow button { flex: none; border: 1px solid var(--jl); background: rgba(255,255,255,.05); color: var(--jt); width: 28px; height: 30px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; font-size: 11px; }
.jr-steprow button:disabled { opacity: .3; cursor: default; }
.jr-steprow .jr-sdec { color: #60a5fa; font-size: 13px; }
.jr-steprow.dec .jr-sdec { color: #f59e0b; border-color: #f59e0b; }
.jr-stepadd { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.jr-dmxh { margin: 16px 0 6px; color: var(--navy); }
.jr-dmxh:first-child { margin-top: 0; }
.jr-drawer { position: fixed; top: 0; bottom: 0; z-index: 1500; }
/* journey · batch 3: undo/redo, requirements */
.jr-ur { display: inline-flex; gap: 4px; }
.jr-ur .jr-btn { padding: 8px 11px; font-size: 14px; }
.jr-ur .jr-btn span { font-size: 12.5px; }
.jr-ur .jr-btn:disabled { opacity: .35; cursor: default; transform: none; }
.jr-req { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--jl); font-size: 13px; }
.jr-req b, .jr-checks b { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: color-mix(in srgb, var(--c, #a78bfa) 70%, #fff); flex: none; }
.jr-req span { flex: 1; min-width: 0; }
.jr-req em { font-style: normal; font-size: 10.5px; font-weight: 800; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: var(--c); color: #fff; flex: none; }
.jr-small { font-size: 12.5px; margin: 2px 0; }
.jr-dbody > .jr-link { align-self: flex-start; }
@media (max-width: 720px) { .jr-ur .jr-btn span, .jr-tools [data-present] span { display: none; } }
/* Phase D journey: standards chips in the inspector */
.jd-stds { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; }
.jd-stds span { font-size: 12px; padding: 4px 9px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); color: var(--jt); }
.jd-stds b { color: var(--c); font-size: 11px; margin-inline-end: 4px; }

/* ---------- Batch 3 · end-to-end traceability (B → C → D) ---------- */
.jx-hero { display: flex; align-items: center; gap: 18px; padding: 16px 18px; margin-bottom: 14px; flex-wrap: wrap; border-color: rgba(52,211,153,.35); }
.jx-htxt { flex: 1 1 320px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.jx-htxt b { font-size: 16px; } .jx-htxt small { color: var(--jm); font-size: 12.5px; line-height: 1.55; }
.jx-hstats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.jx-hstats span { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: rgba(255,255,255,.06); border: 1px solid var(--jl); }
.jx-hstats span.warn { border-color: rgba(245,158,11,.6); color: #fcd34d; }
.jx-hbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.jx-ring { flex: none; } .jx-ring circle { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 7; } .jx-ring circle.on { stroke: #34d399; stroke-linecap: round; transition: stroke-dasharray .8s ease; }
.jx-ring text { fill: #fff; font-weight: 800; font-size: 14px; font-family: inherit; }
.jx-th { padding-top: 18px; }
.jx-ex { display: flex; flex-direction: column; gap: 14px; }
.jx-exh { display: flex; align-items: center; gap: 14px; } .jx-exh h2 { margin: 0; font-size: clamp(18px, 2.2vw, 26px); color: #fff; } .jx-exh p { margin: 2px 0 0; color: #a9b8dd; font-size: 13px; }
.jx-exh .jr-x { margin-inline-start: auto; }
.jx-exb { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.jx-caps { display: flex; flex-direction: column; gap: 6px; max-height: calc(100vh - 150px); overflow: auto; padding-inline-end: 4px; }
.jx-caps > b { font-size: 12px; color: #9fb0d6; margin-bottom: 2px; }
.jx-cap { display: flex; align-items: center; gap: 8px; text-align: start; font: inherit; font-size: 13px; color: #e8eefc; padding: 8px 10px; border-radius: 11px; cursor: pointer; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-inline-start: 3px solid var(--c); }
.jx-cap span[dir] { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jx-cap.on { background: color-mix(in srgb, var(--c) 22%, rgba(255,255,255,.04)); box-shadow: 0 0 0 1px var(--c); }
.jx-cap > i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.jx-dots { display: flex; gap: 3px; flex: none; } .jx-dots u { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.15); } .jx-dots u.on { background: #34d399; }
.jx-main { min-width: 0; }
.jx-chain { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 34px; padding: 6px 0 10px; }
.jx-links { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 0; }
.jx-links path { fill: none; stroke-width: 1.8; opacity: .75; }
.jx-col { position: relative; z-index: 1; min-width: 0; }
.jx-col h4 { margin: 0 0 10px; font-size: 12px; letter-spacing: .04em; color: #9fb0d6; text-transform: uppercase; } .jx-col h4 em { font-style: normal; color: #fff; margin-inline-start: 4px; }
.jx-card { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 10px 11px 9px; margin-bottom: 12px; border-radius: 12px; background: color-mix(in srgb, var(--c) 14%, #0c1534); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); }
.jx-card b { font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; } .jx-card.k-eliminated b { text-decoration: line-through; opacity: .8; }
.jx-card small { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #a9b8dd; } .jx-card small i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.jx-wv { position: absolute; top: -8px; inset-inline-end: 8px; font-style: normal; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 6px; background: var(--c); color: #0a1026; }
.jx-none { font-size: 12.5px; color: #9fb0d6; padding: 10px; border: 1px dashed rgba(255,255,255,.15); border-radius: 10px; margin: 0; }
.jx-ih { margin: 16px 0 8px; font-size: 13px; color: #fff; }
.jx-issues { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.jx-issues li { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.5; padding: 7px 10px; border-radius: 10px; background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.25); }
.jx-issues em { flex: none; font-style: normal; font-size: 10.5px; font-weight: 800; padding: 1px 6px; border-radius: 6px; background: var(--c); color: #0a1026; }
.jx-ok { color: #6ee7b7; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.jx-tk { display: inline-block; margin: 1px 2px; padding: 1px 7px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); font-size: 12px; }
.jx-tk.k-eliminated { text-decoration: line-through; }
.jx-rall, .jx-waves { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.jx-rw, .jx-wcol { display: flex; flex-direction: column; gap: 7px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); }
.jx-rw > b, .jx-wcol > b { font-size: 13px; color: #facc15; }
.jx-rw > span, .jx-wp { display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; padding: 7px 9px; border-radius: 10px; background: color-mix(in srgb, var(--c) 14%, transparent); border-inline-start: 3px solid var(--c); }
.jx-rw em, .jx-wp em { font-style: normal; font-weight: 800; color: var(--c); flex: none; }
/* whole-transformation playback */
.jx-pb { flex: 1; }
.jx-pb[data-view="lanes"] .jx-waves, .jx-pb[data-view="waves"] .jx-lanes { display: none; }
.jx-lanes { display: flex; flex-direction: column; gap: 12px; max-width: 1200px; margin: 0 auto; }
.jx-lane { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08); border-inline-start: 4px solid var(--p); transition: opacity .5s, box-shadow .5s; }
.jx-lane.act { box-shadow: 0 0 0 1px var(--p), 0 0 40px -14px var(--p); } .jx-lane.dim { opacity: .35; }
.jx-lh { font-size: 26px; font-weight: 800; color: var(--p); line-height: 1; } .jx-lh small { display: block; font-size: 11.5px; font-weight: 700; color: #a9b8dd; margin-top: 4px; }
.jx-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.jx-chip { font-size: 12.5px; padding: 5px 11px; border-radius: 99px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.04); opacity: 0; transform: scale(.8); transition: all .55s cubic-bezier(.2,.9,.3,1.2); white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.jx-chip.show { opacity: 1; transform: none; }
.jx-chip.lit { background: color-mix(in srgb, var(--c) 26%, transparent); border-color: var(--c); }
.jx-chip.hl { box-shadow: 0 0 0 2px var(--c), 0 0 22px -4px var(--c); transform: scale(1.06); }
.jx-chip.dim { opacity: .22; }
.jx-chip.gone { opacity: 0; transform: scale(.4); max-width: 0; padding: 0; margin: 0 -4px; border-width: 0; }
.jx-chip.jx-more { opacity: .7; transform: none; border-style: dashed; }
.jx-wcol { opacity: .2; transition: opacity .5s, box-shadow .5s; } .jx-wcol.show { opacity: 1; } .jx-wcol.hl { box-shadow: 0 0 0 1px #facc15, 0 0 40px -14px #facc15; }
.jx-pb .jx-waves { max-width: 1200px; margin: 0 auto; }
@media (max-width: 900px) {
  .jx-exb { grid-template-columns: minmax(0, 1fr); }
  .jx-caps { flex-direction: row; max-height: none; overflow-x: auto; padding-bottom: 4px; } .jx-caps > b { display: none; } .jx-cap { flex: none; max-width: 220px; }
  .jx-chain { display: flex; flex-direction: column; gap: 4px; }
  .jx-rall, .jx-waves { grid-template-columns: minmax(0, 1fr); }
  .jx-lane { grid-template-columns: minmax(0, 1fr); gap: 8px; } .jx-lh { font-size: 20px; } .jx-lh small { display: inline; margin-inline-start: 8px; }
  .jx-hbtns { width: 100%; } .jx-hbtns > * { flex: 1 1 auto; justify-content: center; }
}
.jx-more-i summary { cursor: pointer; } .jx-more-i summary em { font-style: normal; font-size: 11px; padding: 1px 7px; border-radius: 99px; background: rgba(245,158,11,.25); margin-inline-start: 4px; }
.jr-th-k { display: inline-block; direction: ltr; unicode-bidi: isolate; }
/* Trainer trial team */
.trial-box { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px; padding: 10px 12px; border-radius: 14px; border: 1px dashed color-mix(in srgb, var(--fuchsia, #d62f8f) 55%, transparent); background: color-mix(in srgb, var(--fuchsia, #d62f8f) 6%, transparent); text-align: start; }
.trial-box b { display: flex; align-items: center; gap: 6px; font-size: 13.5px; } .trial-box small { display: block; color: var(--muted, #64748b); font-size: 12px; line-height: 1.5; margin-top: 2px; }
.trial-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.trial-bar { background: linear-gradient(90deg, #6d28d9, #d62f8f); }
.tq-team.is-trial { border-style: dashed; }

/* Architecture Transformation Journey: hub banner + screen padding (the journey itself loads css/tj.css on demand) */
.screen-journeyE, .screen-journeyF { padding: 0 !important; }
.tj-banner .jr-banner-orb { background: linear-gradient(135deg, #a78bfa, #22d3ee 55%, #34d399); box-shadow: 0 0 28px -4px #a78bfa; }
.tj-banner .jr-banner-orb { background: linear-gradient(135deg, #3b82f6, #a855f7 40%, #22c55e 70%, #f97316); }
.screen-journeyH { padding: 0 !important; }
.tj-loading { display: grid; place-items: center; min-height: 50vh; }
.tj-loading .spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(167,139,250,.25); border-top-color: #a78bfa; animation: qzSpin .8s linear infinite; }
/* Arabic in SVG: letter-spacing breaks cursive joining (notably in Safari) and uppercase has no meaning */
[dir="rtl"] svg text { letter-spacing: 0 !important; text-transform: none !important; }

.jm-box { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; border-color: color-mix(in srgb, #3b82f6 55%, transparent); }
.jm-sel { max-width: 100%; font: inherit; font-size: 13px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line, #cbd5e1); background: #fff; }
.tj-pick .tj-pickl { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; }
.tj-pickr { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line, #e2e8f0); cursor: pointer; }
.tj-pickr span { display: flex; flex-direction: column; gap: 2px; } .tj-pickr small { color: var(--muted, #64748b); }

.ad-ph.ph-E { background: #6d4ae0; }

/* Native dropdown lists. Safari draws the open list itself (light grey) and applies the option text colour but not its
   background, so light option text became invisible; the closed select also kept Safari's own look and hid its text.
   Options are therefore dark text on white (readable in every browser), and selects draw their own arrow. */
.jr select, .tj select { -webkit-appearance: none; appearance: none; color-scheme: light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%239fb0d6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-size: 12px 12px !important; background-position: right 10px center !important; padding-inline-end: 30px !important; }
[dir="rtl"] .jr select, [dir="rtl"] .tj select { background-position: left 10px center !important; }
.jr select option, .tj select option, .jr .jr-drawer select option, .jr .jc-addflow select option { background-color: #fff; color: #0f172a; }
.jr select optgroup, .tj select optgroup { background-color: #f1f5f9; color: #334155; }

/* In-page dropdown list for journey selects (selectMenu.js) */
.sm-menu { position: absolute; z-index: 5000; overflow: auto; padding: 4px; border-radius: 12px; background: #0f1838; border: 1px solid rgba(255,255,255,.18); box-shadow: 0 18px 40px -12px rgba(0,0,0,.6); font: 13.5px/1.4 'IBM Plex Sans Arabic', 'Inter', system-ui, sans-serif; }
.sm-opt { display: block; width: 100%; text-align: start; padding: 7px 10px; border: 0; border-radius: 8px; background: transparent; color: #e8eefc; font: inherit; cursor: pointer; white-space: normal; }
.sm-opt:hover, .sm-opt:focus { background: rgba(96,165,250,.22); outline: none; }
.sm-opt.on { background: #3b4f9e; color: #fff; font-weight: 700; }
.sm-opt[disabled] { opacity: .45; cursor: default; }
.sm-grp { padding: 6px 10px 2px; font-size: 11px; font-weight: 800; color: #9fb0d6; text-transform: uppercase; }

/* Report · visual chapters (reportVisuals.js) — light paper, colours kept in the PDF */
.rp .rv-body, .rp .rv-body * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rp-vis { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin: 8px 0 10px; border-radius: 12px; background: #eef4ff; border: 1px solid #c7d7f5; cursor: pointer; }
.rp-vis span { display: flex; flex-direction: column; } .rp-vis small { color: #475569; font-size: 12px; }
.rv-body { color: #0f172a; font-size: 12.5px; }
.rv-h { margin: 18px 0 8px; font-size: 15px; color: #1e3a8a; border-bottom: 2px solid #dbe4f3; padding-bottom: 4px; break-after: avoid; }
.rv-h:first-child { margin-top: 4px; }
.rv-note { margin: 6px 0; font-size: 11.5px; color: #475569; }
.rv-empty { color: #94a3b8; }
.rv-t { width: 100%; border-collapse: collapse; margin: 4px 0 10px; font-size: 11.5px; break-inside: auto; }
.rv-t th { background: #1e3a8a; color: #fff; padding: 6px 8px; text-align: start; font-weight: 700; }
.rv-t td { border-bottom: 1px solid #e2e8f0; padding: 5px 8px; vertical-align: top; }
.rv-t tr:nth-child(even) td { background: #f8fafc; }
.rv-matrix td, .rv-matrix th { text-align: center; } .rv-matrix td:first-child, .rv-matrix th:first-child { text-align: start; }
.rv-raci { display: inline-grid; place-items: center; width: 24px; height: 22px; border-radius: 6px; font-weight: 800; color: #fff; background: #94a3b8; }
.rv-raci.v-A { background: #7c3aed; } .rv-raci.v-R { background: #2563eb; } .rv-raci.v-C { background: #0d9488; } .rv-raci.v-I { background: #94a3b8; }
.rv-pestel { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.rv-pcol { border-radius: 10px; border: 1px solid #e2e8f0; border-top: 5px solid var(--c); padding: 6px; background: #fff; break-inside: avoid; }
.rv-pcol > b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--c); color: #fff; }
.rv-pcol h5 { margin: 4px 0; font-size: 12px; } .rv-pcol p { margin: 3px 0; font-size: 11px; padding: 3px 5px; border-radius: 6px; background: #f8fafc; } .rv-pcol p.drv { background: #fef3c7; font-weight: 700; }
.rv-caps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.rv-cap { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; gap: 8px; align-items: center; padding: 3px 0; border-bottom: 1px dashed #e2e8f0; font-size: 11.5px; }
.rv-cap.focus span { font-weight: 800; color: #7c2d12; }
.rv-lv { display: flex; gap: 2px; } .rv-lv i { width: 14px; height: 10px; border-radius: 3px; background: #e2e8f0; } .rv-lv i.cur { background: #2563eb; } .rv-lv i.tgt { background: #93c5fd; }
.rv-heatw { display: inline-block; vertical-align: top; margin-inline-end: 16px; }
.rv-heat { border-collapse: separate; border-spacing: 3px; } .rv-heat td { width: 46px; height: 34px; border-radius: 6px; text-align: center; font-size: 11px; color: #0f172a; }
.rv-heat td b { display: inline-grid; place-items: center; min-width: 18px; height: 18px; border-radius: 99px; background: #fff; font-size: 10px; margin: 1px; }
.rv-heat th { font-size: 10px; color: #64748b; } .rv-ax { display: block; font-size: 10px; color: #64748b; text-align: center; }
.rv-legend { display: inline-block; vertical-align: top; margin: 0; padding-inline-start: 22px; font-size: 11.5px; max-width: 58%; } .rv-legend li { margin: 3px 0; }
.rv-legend b { display: inline-block; min-width: 22px; text-align: center; border-radius: 6px; color: #fff; font-size: 10.5px; padding: 1px 4px; }
.rv-land { display: flex; flex-direction: column; gap: 6px; }
.rv-band { border-radius: 10px; border: 1px solid #e2e8f0; border-inline-start: 6px solid var(--c); padding: 6px 8px; background: #fff; break-inside: avoid; }
.rv-band h5 { margin: 0 0 4px; color: var(--c); font-size: 12.5px; } .rv-band h5 small { color: #64748b; }
.rv-node { display: inline-block; margin: 2px; padding: 3px 8px; border-radius: 99px; font-size: 10.5px; border: 1.5px solid var(--s); background: #fff; }
.rv-node.s-new { background: #dcfce7; } .rv-node.s-chg { background: #fef9c3; } .rv-node.s-ret { background: #fee2e2; text-decoration: line-through; }
.rv-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; }
.rv-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.rv-steps { display: flex; align-items: stretch; gap: 6px; flex-wrap: wrap; }
.rv-step { flex: 1 1 140px; border-radius: 10px; padding: 8px; background: linear-gradient(180deg, #eff6ff, #fff); border: 1px solid #bfdbfe; margin-top: calc(var(--i) * -6px); break-inside: avoid; }
.rv-step b { background: #1d4ed8; color: #fff; border-radius: 6px; padding: 1px 7px; font-size: 11px; } .rv-step h5 { margin: 5px 0; font-size: 12px; }
.rv-step span { display: block; font-size: 10.5px; padding: 2px 0; border-top: 1px dashed #dbeafe; }
.rv-arr { align-self: center; color: #94a3b8; font-style: normal; }
.rv-wbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.rv-wcol { border-radius: 10px; border: 1px solid #e2e8f0; border-top: 4px solid #2563eb; padding: 6px 8px; break-inside: avoid; }
.rv-wcol > b { font-size: 11px; color: #2563eb; } .rv-wcol h5 { margin: 2px 0 4px; font-size: 12px; }
.rv-wcol ol { margin: 0; padding: 0; list-style: none; font-size: 10.5px; } .rv-wcol li { padding: 2px 0; border-top: 1px dashed #e2e8f0; } .rv-wcol li small { color: #64748b; } .rv-wcol li em { color: #475569; font-style: normal; }
.rv-gantt { display: block; margin: 4px 0 10px; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; }
.rv-swot { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rv-swot > div { border-radius: 10px; border: 1px solid #e2e8f0; border-top: 5px solid var(--c); padding: 6px 8px; background: #fff; break-inside: avoid; }
.rv-swot h5 { margin: 0 0 4px; font-size: 12.5px; } .rv-swot h5 b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--c); color: #fff; }
.rv-swot ul { margin: 0; padding-inline-start: 16px; font-size: 11px; } .rv-swot li b { color: #b91c1c; }
.rv-lvl, .rv-pill { display: inline-block; padding: 1px 7px; border-radius: 99px; color: #fff; font-size: 10.5px; font-weight: 700; }
.rv-okrs { display: grid; gap: 8px; }
.rv-okr { border-radius: 10px; border: 1px solid #ddd6fe; background: #faf5ff; padding: 6px 10px; break-inside: avoid; }
.rv-okr h5 { margin: 0 0 4px; font-size: 12.5px; } .rv-okr h5 b { background: #6d28d9; color: #fff; border-radius: 6px; padding: 1px 6px; }
.rv-kr { display: grid; grid-template-columns: 34px minmax(0, 1fr) 80px 110px; gap: 8px; align-items: center; font-size: 11px; padding: 2px 0; }
.rv-kr small { color: #6d28d9; font-weight: 800; } .rv-kr em { font-style: normal; color: #475569; text-align: center; }
.rv-bar { display: block; height: 8px; border-radius: 99px; background: #e2e8f0; overflow: hidden; } .rv-bar > i { display: block; height: 100%; }
.rv-dl { display: grid; grid-template-columns: 140px 1fr; gap: 4px 10px; font-size: 11.5px; } .rv-dl dt { font-weight: 800; color: #1e3a8a; } .rv-dl dd { margin: 0; }
.rv-repo { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.rv-repo > div { border-radius: 10px; border: 1px solid #e2e8f0; padding: 8px; text-align: center; background: #fff; } .rv-repo > div.on { background: #fef9c3; border-color: #facc15; }
.rv-repo b { display: block; font-size: 20px; color: #1e3a8a; } .rv-repo span { font-size: 10.5px; color: #475569; }
@media (max-width: 760px) { .rv-pestel { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rv-caps, .rv-swot { grid-template-columns: 1fr; } .rv-repo { grid-template-columns: repeat(3, minmax(0, 1fr)); } .rv-legend { max-width: none; } }

/* ADM centre · mini Architecture Repository (cycle.js) */
.rm-mini-cab { fill: rgba(8, 20, 40, .55); stroke: rgba(255,255,255,.22); stroke-width: 1; }
.rm-mini-d rect { fill: rgba(255,255,255,.12); stroke: rgba(255,255,255,.25); stroke-width: .8; }
.rm-mini-d line { stroke: rgba(255,255,255,.45); stroke-width: 1.4; stroke-linecap: round; }
.rm-mini-d text { font-size: 9px; font-weight: 800; fill: #fff; letter-spacing: 0; }
.rm-mini-d.on rect { fill: #facc15; stroke: #fde68a; } .rm-mini-d.on text { fill: #1f2937; } .rm-mini-d.on line { stroke: rgba(31,41,55,.5); }
.rm-mini-l { font-size: 8.5px; font-weight: 700; fill: #9ee7e4; letter-spacing: 0; }

.rm-mini-d { cursor: pointer; } .rm-mini-d rect { transition: fill .15s, stroke .15s; }
.rm-mini-d:hover rect, .rm-mini-d:focus rect { fill: rgba(96,165,250,.55); stroke: #bfdbfe; } .rm-mini-d.on:hover rect { fill: #fde047; }
.rm-mini-d:focus { outline: none; }

/* Phase H · Value = Benefits / Investment (valueEq.js) */
.ve { padding: 16px 18px; margin: 12px 0; border-top: 4px solid var(--vc); transition: border-color .3s; }
.ve-h h2 { margin: 0; font-size: 17px; } .ve-h p { margin: 4px 0 10px; }
.ve-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ve-tabs button { padding: 6px 14px; border-radius: 99px; border: 1.5px solid var(--c); background: transparent; color: var(--c); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; transition: background .2s, color .2s; }
.ve-tabs button.on { background: var(--c); color: #fff; } .ve-tabs button:disabled { opacity: .45; cursor: default; }
.ve-tabs small { font-size: 11px; opacity: .85; }
.ve-eq { display: grid; grid-template-columns: minmax(0, 1.4fr) auto minmax(180px, .8fr); gap: 14px; align-items: center; }
.ve-frac { display: flex; flex-direction: column; gap: 6px; }
.ve-row { display: grid; grid-template-columns: 80px minmax(0, 1fr) 64px; gap: 10px; align-items: center; }
.ve-lbl { font-size: 12.5px; font-weight: 700; color: #475569; }
.ve-bar { position: relative; height: 22px; border-radius: 8px; background: #eef2f7; overflow: visible; }
.ve-bar > i { display: block; height: 100%; border-radius: 8px; transition: width .7s cubic-bezier(.2,.9,.3,1); }
.ve-row.b .ve-bar > i { background: linear-gradient(90deg, #4ade80, #16a34a); } .ve-row.i .ve-bar > i { background: linear-gradient(90deg, #fdba74, #ea580c); }
.ve-bar > em { position: absolute; top: -4px; bottom: -4px; width: 0; border-inline-start: 2px dashed #334155; }
.ve-row b { font-family: 'Sora', sans-serif; font-size: 15px; text-align: center; }
.ve-row b.up, .ve-row b.downc { color: #16a34a; } .ve-row b.down, .ve-row b.upc { color: #dc2626; } .ve-row b.flat { color: #64748b; }
.ve-line { height: 3px; border-radius: 99px; background: #334155; margin-inline-start: 90px; margin-inline-end: 74px; }
.ve-eqs { font-size: 34px; font-weight: 800; color: #334155; }
.ve-val { display: flex; flex-direction: column; align-items: center; }
.ve-val svg { width: 100%; max-width: 200px; height: auto; }
.ve-trk { fill: none; stroke: #e2e8f0; stroke-width: 14; stroke-linecap: round; } .ve-arc { fill: none; stroke-width: 14; stroke-linecap: round; transition: stroke .3s; }
.ve-tick { stroke: #334155; stroke-width: 2; } .ve-tickl { font-size: 10px; font-weight: 800; fill: #334155; letter-spacing: 0; }
.ve-ndl { stroke: #0f172a; stroke-width: 3.5; stroke-linecap: round; } .ve-hub { fill: #0f172a; }
.ve-num { font-family: 'Sora', sans-serif; font-size: 26px; font-weight: 800; line-height: 1; margin-top: -6px; direction: ltr; }
.ve-why { margin: 12px 0 2px; font-size: 13.5px; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--vc) 10%, transparent); border-inline-start: 4px solid var(--vc); }
.ve-note { margin: 4px 0 0; font-size: 11px; color: #94a3b8; }
@media (max-width: 760px) { .ve-eq { grid-template-columns: 1fr; } .ve-eqs { text-align: center; } .ve-row { grid-template-columns: 70px minmax(0, 1fr) 56px; } .ve-line { margin-inline-start: 80px; margin-inline-end: 66px; } }
/* dark journey screens */
.tj .ve { background: rgba(15,23,42,.6); border: 1px solid rgba(255,255,255,.12); border-top: 4px solid var(--vc); border-radius: 18px; color: #e2e8f0; }
.tj .ve-h h2 { color: #fff; } .tj .ve-lbl { color: #cbd5e1; } .tj .ve-bar { background: rgba(255,255,255,.08); } .tj .ve-bar > em { border-color: #e2e8f0; }
.tj .ve-line { background: #cbd5e1; } .tj .ve-eqs { color: #e2e8f0; } .tj .ve-trk { stroke: rgba(255,255,255,.12); } .tj .ve-tick { stroke: #e2e8f0; } .tj .ve-tickl { fill: #e2e8f0; }
.tj .ve-ndl { stroke: #f8fafc; } .tj .ve-hub { fill: #f8fafc; } .tj .ve-why { color: #e2e8f0; }
/* value equation · current-state lines: benefits (green) and costs (red) */
.ve-bar > em.mb { border-inline-start: 2.5px dashed #15803d; }
.ve-bar > em.mi { border-inline-start: 2.5px dashed #b91c1c; }
.ve-bar > em span { position: absolute; bottom: calc(100% + 1px); inset-inline-start: 4px; white-space: nowrap; font-size: 10px; font-weight: 800; font-style: normal; }
.ve-bar > em.mi span { bottom: auto; top: calc(100% + 1px); }
.ve-bar > em.mb span { color: #15803d; } .ve-bar > em.mi span { color: #b91c1c; }
.ve-frac { gap: 14px; }
.tj .ve-bar > em.mb { border-color: #4ade80; } .tj .ve-bar > em.mi { border-color: #f87171; }
.tj .ve-bar > em.mb span { color: #86efac; } .tj .ve-bar > em.mi span { color: #fca5a5; }

/* value strip under each change-class lane (miniValueHtml) */
.vm { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 4px; align-items: stretch; margin: 8px 10px 4px; padding: 8px; border-radius: 12px; background: #f8fafc; border: 1px dashed #cbd5e1; }
.vm-op { align-self: center; font-weight: 800; color: #475569; font-size: 15px; }
.vm-c { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; border-radius: 9px; min-width: 0; }
.vm-c.good { background: #dcfce7; } .vm-c.bad { background: #fee2e2; } .vm-c.same { background: #f1f5f9; }
.vm-l { font-size: 10.5px; font-weight: 700; color: #475569; }
.vm-bar { position: relative; width: 100%; height: 6px; border-radius: 99px; background: rgba(15,23,42,.08); }
.vm-bar > i { display: block; height: 100%; border-radius: 99px; }
.vm-c.b .vm-bar > i { background: #16a34a; } .vm-c.i .vm-bar > i { background: #ea580c; } .vm-c.v .vm-bar > i { background: #2563eb; }
.vm-bar > em { position: absolute; top: -3px; bottom: -3px; border-inline-start: 2px dashed #334155; }
.vm-c.b .vm-bar > em { border-color: #15803d; } .vm-c.i .vm-bar > em { border-color: #b91c1c; }
.vm-c b { font-family: 'Sora', sans-serif; font-size: 13px; direction: ltr; }
.vm-c.good b { color: #15803d; } .vm-c.bad b { color: #b91c1c; } .vm-c.same b { color: #475569; }
.vm-c small { font-size: 10px; color: #64748b; font-weight: 700; }
.tj .vm { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.18); margin: 6px 0; }
.tj .vm-op, .tj .vm-l { color: #cbd5e1; } .tj .vm-c.good { background: rgba(34,197,94,.18); } .tj .vm-c.bad { background: rgba(239,68,68,.18); } .tj .vm-c.same { background: rgba(255,255,255,.06); }
.tj .vm-c.good b { color: #86efac; } .tj .vm-c.bad b { color: #fca5a5; } .tj .vm-c.same b { color: #e2e8f0; } .tj .vm-c small { color: #94a3b8; } .tj .vm-bar { background: rgba(255,255,255,.1); }

/* Trainer: close a team's current phase */
.team-phase { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.team-phase .tc-close { margin-inline-start: auto; font-size: 12px; padding: 4px 10px; color: var(--fuchsia-600); border: 1px dashed var(--fuchsia-100); }
.team-phase .tc-close:hover { background: var(--fuchsia-50); }

/* Self-study (/solo) */
.solo-panel { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: var(--navy); transition: transform .15s, box-shadow .15s; }
.solo-panel:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.solo-panel > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.solo-panel b { font-size: 15.5px; }
.solo-panel em { font-style: normal; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.solo-panel > .ic:last-child { color: var(--fuchsia); flex: none; }
[dir=rtl] .solo-panel > .ic:last-child { transform: scaleX(-1); }
.solo-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; flex: none; color: #fff; background: linear-gradient(135deg, #3a6fd8, #6d4ae0); }
.solo-auth { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: center; max-width: 980px; margin: 24px auto; }
.solo-auth .exm-auth { margin: 0; max-width: none; }
.solo-intro h1 { margin: 10px 0 8px; font-size: 30px; line-height: 1.25; color: var(--navy); }
.solo-intro p { font-size: 15px; line-height: 1.7; }
.solo-feats { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 10px; }
.solo-feats li { display: flex; gap: 10px; align-items: center; font-size: 14px; color: #3a4563; }
.solo-feats li .ic { color: var(--fuchsia); flex: none; }
.solo-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.solo-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 24px; text-align: start; text-decoration: none; color: var(--navy); font: inherit; cursor: pointer; border: 1px solid var(--line, #e3e7f1); transition: transform .15s, box-shadow .15s; }
.solo-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.solo-card .solo-ic { width: 54px; height: 54px; border-radius: 15px; margin-bottom: 6px; }
.solo-card.exam .solo-ic { background: linear-gradient(135deg, #d62f8f, #f08a3c); }
.solo-card b { font-size: 21px; }
.solo-card em { font-style: normal; color: var(--muted); font-size: 14px; line-height: 1.6; flex: 1; margin-bottom: 8px; }
.solo-card .btn { margin-top: auto; }
.solo-card:disabled { opacity: .7; cursor: progress; }
.solo-links { display: inline-flex; gap: 10px; margin-inline-start: 12px; }
.solo-links a { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--fuchsia-600); text-decoration: none; padding: 3px 9px; border-radius: 999px; background: var(--fuchsia-50); }
.solo-links a:hover { background: var(--fuchsia-100); }
@media (max-width: 760px) {
  .solo-auth, .solo-cards { grid-template-columns: minmax(0, 1fr); }
  .solo-intro h1 { font-size: 24px; }
  .solo-links { display: flex; margin: 4px 0 0; }
}
.solo-back { font-weight: 600; color: var(--fuchsia-600); }
@media (max-width: 560px) { .solo-back { display: none; } }
