/* ===========================================================
   Nursync — Design System
   Clean medical / professional. Bilingual AR/EN.
   =========================================================== */

:root {
  /* Surfaces */
  --bg: #eef3f5;
  --bg-2: #f7fafb;
  --surface: #ffffff;
  --surface-ink: #0c1f29;          /* deep slate-teal ink panels */
  --surface-ink-2: #103040;

  /* Ink / text */
  --ink: #0d2330;
  --ink-2: #3a5562;
  --ink-3: #6f8893;
  --ink-on-dark: #eaf6f7;
  --ink-on-dark-2: #9fc2c8;

  /* Brand */
  --teal: #0e7c86;
  --teal-deep: #0a5d66;
  --teal-600: #0c6e77;
  --cyan: #14b8c4;
  --cyan-soft: #d6f1f3;
  --mint: #e7f4f3;

  /* Lines */
  --line: #dde7ea;
  --line-strong: #c6d6da;
  --line-on-dark: rgba(255,255,255,.12);

  /* Shift palette */
  --sh-m: #f4a72b;   --sh-m-bg: #fdf0d8;   --sh-m-ink: #7a4d05;   /* Morning  */
  --sh-e: #ef6c54;   --sh-e-bg: #fde3dd;   --sh-e-ink: #7c2c1c;   /* Evening  */
  --sh-n: #4456b8;   --sh-n-bg: #e2e5f7;   --sh-n-ink: #232c66;   /* Night    */
  --sh-o: #9fb0b8;   --sh-o-bg: #eef2f4;   --sh-o-ink: #4a5d65;   /* Off      */
  --sh-al: #2aa775;  --sh-al-bg: #d8f0e6;  --sh-al-ink: #135239;  /* Annual   */
  --sh-sl: #d4495b;  --sh-sl-bg: #fbe0e4;  --sh-sl-ink: #7a1f2b;  /* Sick     */
  --sh-ml: #a25fc4;  --sh-ml-bg: #f0e2f7;  --sh-ml-ink: #5a2c72;  /* Maternity*/
  --sh-ce: #2b88c8;  --sh-ce-bg: #dcecf8;  --sh-ce-ink: #134063;  /* Cont.Edu */
  --sh-cov: #0e9d9d; --sh-cov-bg: #d4f0ef; --sh-cov-ink: #0a4d4d; /* Cover    */

  /* Semantic */
  --good: #2aa775;
  --warn: #e0972a;
  --bad: #d4495b;

  /* Geometry */
  --r-xs: 7px;
  --r-sm: 11px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --shadow-sm: 0 1px 2px rgba(13,35,48,.06), 0 1px 3px rgba(13,35,48,.05);
  --shadow: 0 6px 22px -10px rgba(13,35,48,.22), 0 2px 6px rgba(13,35,48,.05);
  --shadow-lg: 0 30px 70px -32px rgba(10,60,70,.42), 0 8px 24px -14px rgba(13,35,48,.18);
  --shadow-ink: 0 30px 80px -30px rgba(5,30,40,.7);

  /* Type */
  --font: "Readex Pro", "IBM Plex Sans Arabic", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --maxw: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
  overflow-x: hidden;
}

/* English mode tightens line-height a touch */
html[lang="en"] body { line-height: 1.55; }

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-weight: 700;
  color: var(--ink);
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Latin numerals everywhere for clarity in mixed content */
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.mono { font-family: var(--font-mono); }

/* ------- Layout helpers ------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 28px; }
.section { padding-block: clamp(64px, 9vw, 120px); position: relative; }
.section--ink { background: var(--surface-ink); color: var(--ink-on-dark); }
.section--ink h1, .section--ink h2, .section--ink h3, .section--ink h4 { color: #fff; }
.section--soft { background: var(--bg-2); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal);
  padding: 6px 13px; border-radius: 999px;
  background: var(--mint);
  border: 1px solid var(--cyan-soft);
}
.section--ink .eyebrow { color: var(--cyan); background: rgba(20,184,196,.1); border-color: rgba(20,184,196,.24); }

.h-display { font-size: clamp(34px, 5.4vw, 62px); line-height: 1.05; }
.h-title   { font-size: clamp(27px, 3.6vw, 42px); }
.lede { font-size: clamp(16px, 1.5vw, 19px); color: var(--ink-2); max-width: 62ch; }
.section--ink .lede { color: var(--ink-on-dark-2); }

.grid { display: grid; gap: 22px; }

/* ------- Buttons ------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 22px; border-radius: 999px;
  font-weight: 600; font-size: 15px;
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--teal); color: #fff; box-shadow: 0 10px 24px -12px rgba(14,124,134,.8); }
.btn--primary:hover { background: var(--teal-deep); box-shadow: 0 14px 30px -12px rgba(14,124,134,.9); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn--on-dark { background: rgba(255,255,255,.1); color:#fff; border-color: rgba(255,255,255,.2); }
.btn--on-dark:hover { background: rgba(255,255,255,.18); }

/* ------- Cards ------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }

.pill {
  display:inline-flex; align-items:center; gap:6px;
  font-size: 12.5px; font-weight:600; padding: 4px 10px; border-radius: 999px;
  background: var(--mint); color: var(--teal-deep); border: 1px solid var(--cyan-soft);
}

/* ------- Shift chips ------- */
.chip {
  display:inline-flex; align-items:center; justify-content:center;
  min-width: 34px; height: 30px; padding: 0 8px;
  border-radius: 8px; font-weight: 700; font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.chip--m   { background: var(--sh-m-bg);   color: var(--sh-m-ink);   }
.chip--e   { background: var(--sh-e-bg);   color: var(--sh-e-ink);   }
.chip--n   { background: var(--sh-n-bg);   color: var(--sh-n-ink);   }
.chip--o   { background: var(--sh-o-bg);   color: var(--sh-o-ink);   }
.chip--al  { background: var(--sh-al-bg);  color: var(--sh-al-ink);  }
.chip--sl  { background: var(--sh-sl-bg);  color: var(--sh-sl-ink);  }
.chip--ml  { background: var(--sh-ml-bg);  color: var(--sh-ml-ink);  }
.chip--ce  { background: var(--sh-ce-bg);  color: var(--sh-ce-ink);  }
.chip--cov { background: var(--sh-cov-bg); color: var(--sh-cov-ink); }

/* ------- Reveal on scroll ------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  html { scroll-behavior: auto; }
}

/* ------- Nav ------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: saturate(1.4) blur(14px);
  background: rgba(247,250,251,.82);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.nav.is-stuck { border-color: var(--line); box-shadow: 0 8px 24px -18px rgba(13,35,48,.35); }
.nav__inner { display:flex; align-items:center; gap: 18px; height: 70px; }
.nav__links { display:flex; align-items:center; gap: 4px; margin-inline: auto; }
.nav__link { padding: 8px 13px; border-radius: 999px; font-size: 14.5px; font-weight: 500; color: var(--ink-2); transition: color .15s, background .15s; }
.nav__link:hover { color: var(--ink); background: rgba(14,124,134,.08); }

/* ------- Logo ------- */
.logo { display:inline-flex; align-items:center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; color: var(--ink); }
.logo__mark { width: 34px; height: 34px; flex: 0 0 auto; }
.logo__mark--lg { width: 56px; height: 56px; }
.logo span b { color: var(--teal); font-weight: 800; }

/* ------- Utility ------- */
.muted { color: var(--ink-3); }
.center { text-align: center; }
.flex { display:flex; }
.between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-s { gap: 10px; } .gap-m { gap: 18px; } .gap-l { gap: 28px; }
.wrap-w { flex-wrap: wrap; }
.stat-num { font-weight: 800; font-size: clamp(30px,4vw,48px); line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

/* scrollbars inside demos */
.scroll-x { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.scroll-x::-webkit-scrollbar { height: 9px; }
.scroll-x::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }

/* focus */
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 6px; }

/* selection */
::selection { background: var(--cyan); color: #04282c; }

/* ===================== NAV extras ===================== */
.lang-toggle {
  display:inline-flex; align-items:center; gap:2px;
  background: var(--surface); border:1px solid var(--line-strong);
  border-radius: 999px; padding: 3px; font-weight: 700; font-size: 12.5px;
}
.lang-toggle span { padding: 5px 10px; border-radius: 999px; color: var(--ink-3); line-height:1; transition: all .18s; }
.lang-toggle span.on { background: var(--teal); color:#fff; }
@media (max-width: 880px){ .nav__links { display:none; } .nav__cta { display:none; } }

/* ===================== HERO ===================== */
.hero { position: relative; padding-top: clamp(48px,7vw,90px); padding-bottom: 0; overflow: hidden; }
.hero__glow {
  position:absolute; inset-block-start:-220px; inset-inline-end:-160px; width: 720px; height: 720px;
  background: radial-gradient(circle at center, rgba(20,184,196,.34), rgba(20,184,196,0) 62%);
  filter: blur(8px); pointer-events:none;
}
.hero__grid-bg {
  position:absolute; inset:0; pointer-events:none; opacity:.5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 78%);
          mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 78%);
}
.hero__inner {
  position: relative; display:grid; gap: clamp(28px,4vw,56px);
  grid-template-columns: 1.05fr .95fr; align-items: center;
  padding-bottom: clamp(40px,6vw,72px);
}
@media (max-width: 980px){ .hero__inner { grid-template-columns: 1fr; } }
.hero__accent { color: var(--teal); }
.hero__accent { background: linear-gradient(120deg, var(--teal), var(--cyan)); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color: transparent; }
.hero__stats { display:flex; gap: clamp(22px,4vw,46px); margin-top: 38px; flex-wrap: wrap; }
.hero__stat { display:flex; flex-direction: column; gap: 4px; }
.hero__stat .stat-num { color: var(--teal-deep); }

/* roster card */
.roster-card {
  background: var(--surface); border:1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); overflow: hidden; transform: perspective(1400px) rotateY(-1.5deg);
}
.roster-card__bar { display:flex; align-items:center; gap: 12px; padding: 13px 16px; border-bottom:1px solid var(--line); background: var(--bg-2); }
.roster-card__dot { width:10px; height:10px; border-radius:50%; background: var(--line-strong); display:inline-block; }
.roster-card__title { font-weight:700; font-size: 13.5px; margin-inline: auto; color: var(--ink-2); }
.roster-card__head, .roster-card__row {
  display:grid; grid-template-columns: 1.5fr repeat(7, 1fr); align-items:center;
  gap: 6px; padding: 7px 14px;
}
.roster-card__head { padding-block: 10px; border-bottom:1px solid var(--line); }
.roster-card__day { text-align:center; font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.roster-card__day.is-wknd { color: var(--teal); }
.roster-card__row { border-bottom:1px solid var(--bg); animation: rowIn .55s both cubic-bezier(.16,1,.3,1); }
@keyframes rowIn { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform:none; } }
.roster-card__name { display:flex; align-items:center; gap: 7px; font-size: 13px; }
.roster-card__name b { font-weight: 600; white-space: nowrap; overflow:hidden; text-overflow:ellipsis; }
.roster-card__cell { display:flex; justify-content:center; }
.roster-card__cell.is-wknd { background: rgba(20,184,196,.05); border-radius:6px; }
.tagdot { font-size: 9px; font-weight: 800; padding: 1px 5px; border-radius: 5px; font-style: normal; }
.tagdot--sr { background: var(--cyan-soft); color: var(--teal-deep); }
.tagdot--jr { background: #eef2f4; color: var(--ink-3); }
.roster-card__foot { display:flex; align-items:center; gap: 8px; padding: 12px 16px; font-size: 13px; font-weight:600; color: var(--good); background: var(--bg-2); border-top:1px solid var(--line); }

/* marquee */
.marquee { position: relative; border-block: 1px solid var(--line); background: var(--surface); overflow:hidden; }
.marquee__track { display:flex; gap: 38px; padding: 14px 0; width: max-content; animation: marq 38s linear infinite; }
[dir="rtl"] .marquee__track { animation-direction: reverse; }
.marquee__item { display:inline-flex; align-items:center; gap: 9px; font-size: 14px; font-weight:600; color: var(--ink-2); white-space:nowrap; }
.marquee__item svg { color: var(--teal); }
@keyframes marq { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce){ .marquee__track { animation:none; } }

/* ===================== badges / cards ===================== */
.ico-badge { width: 46px; height: 46px; border-radius: 13px; display:flex; align-items:center; justify-content:center; background: var(--mint); color: var(--teal); }
.ico-badge--bad { background: var(--sh-sl-bg); color: var(--sh-sl); }
.ico-badge--warn { background: var(--sh-m-bg); color: var(--sh-m-ink); }

/* ===================== SOLUTION ===================== */
.solution__split { display:grid; grid-template-columns: 1.1fr .9fr; gap: clamp(30px,5vw,64px); align-items:start; }
@media (max-width: 940px){ .solution__split { grid-template-columns: 1fr; } }
.steps { display:flex; flex-direction:column; gap: 4px; }
.step { display:flex; gap: 18px; padding: 18px 0; border-top:1px solid var(--line); }
.step:first-child { border-top: none; }
.step__n { flex:0 0 auto; font-size: 15px; font-weight:700; color:#fff; background: var(--teal); width: 38px; height: 38px; border-radius: 11px; display:flex; align-items:center; justify-content:center; }
.solution__aside { position: sticky; top: 92px; }
.mission-card { background: var(--surface-ink); color:#fff; border-radius: var(--r-xl); padding: 34px; box-shadow: var(--shadow-ink); position: relative; overflow:hidden; }
.mission-card::after { content:''; position:absolute; inset-block-start:-80px; inset-inline-end:-80px; width: 220px; height:220px; border-radius:50%; background: radial-gradient(circle, rgba(20,184,196,.4), transparent 65%); }
.mission-card__ico { color: var(--cyan); margin-bottom: 18px; }
.mission-card__line { height:1px; background: var(--line-on-dark); margin: 26px 0; }

/* ===================== AUDIENCE ===================== */
.roles { display:flex; flex-wrap:wrap; gap: 12px; justify-content:center; }
.role-chip { display:flex; align-items:center; gap: 10px; padding: 13px 20px; background: var(--surface); border:1px solid var(--line); border-radius: 999px; font-weight:600; box-shadow: var(--shadow-sm); transition: all .2s; }
.role-chip:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-2px); }
.role-chip svg { color: var(--teal); }

/* ===================== SHIFT LEGEND ===================== */
.shift-legend { display:grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap: 14px; }
.shift-legend__item { display:flex; align-items:center; gap: 14px; padding: 16px 18px; background: var(--surface); border:1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }

/* ===================== RULES ===================== */
.rules-stack { display:flex; flex-direction:column; gap: 22px; }
.rule-block { background: var(--surface); border:1px solid var(--line); border-radius: var(--r-xl); padding: clamp(24px,3vw,40px); box-shadow: var(--shadow-sm); }
.rule-block--feature { background: linear-gradient(180deg, #fbfdfd, var(--surface)); border-color: var(--cyan-soft); }
.rule-block__head { display:flex; align-items:center; gap: 16px; margin-bottom: 14px; }
.rule-tag { flex:0 0 auto; width: 40px; height: 40px; border-radius: 11px; background: var(--mint); color: var(--teal-deep); display:flex; align-items:center; justify-content:center; font-weight:700; font-size: 14px; }
.rule-tag--accent { background: var(--teal); color:#fff; }
.muted-on-dark { color: var(--ink-on-dark-2); }

/* coverage */
.cov-grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 16px; }
.cov-card { background: var(--bg-2); border:1px solid var(--line); border-radius: var(--r); padding: 20px; }
.cov-card__top { display:flex; align-items:center; gap: 12px; margin-bottom: 16px; }
.cov-card__nums { display:flex; align-items:center; gap: 16px; }
.cov-num { font-size: 34px; font-weight:800; line-height:1; color: var(--teal-deep); font-variant-numeric: tabular-nums; }
.cov-div { width:1px; align-self:stretch; background: var(--line-strong); }
.mix-row { margin-top: 22px; padding-top: 22px; border-top:1px dashed var(--line-strong); display:flex; flex-wrap:wrap; align-items:center; gap: 16px; justify-content: space-between; }
.mix-row__label { display:flex; align-items:center; gap: 10px; font-weight:700; color: var(--ink); }
.mix-row__label svg { color: var(--teal); }
.mix-row__chips { display:flex; flex-wrap:wrap; gap: 10px; }
.mix-chip { display:inline-flex; align-items:center; gap: 7px; padding: 7px 13px; border-radius: 999px; background: var(--bg-2); border:1px solid var(--line); font-size: 13.5px; font-weight:600; }
.mix-chip b { color: var(--teal-deep); }
.mix-chip--accent { background: var(--mint); border-color: var(--cyan-soft); color: var(--teal-deep); }

/* hours */
.hours-grid { display:grid; grid-template-columns: .9fr 1fr 1.1fr; gap: 16px; }
@media (max-width: 860px){ .hours-grid { grid-template-columns: 1fr; } }
.hours-card { background: var(--bg-2); border:1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.hours-card--ink { background: var(--surface-ink); color:#fff; display:flex; flex-direction:column; justify-content:center; }
.hours-big { font-size: 56px; font-weight:800; line-height:1; letter-spacing:-.03em; color: var(--cyan); }
.hours-big span { font-size: 24px; color: var(--ink-on-dark-2); }
.eq { display:flex; align-items:center; gap: 12px; }
.eq__chip { font-weight:800; font-size: 22px; padding: 10px 16px; border-radius: 12px; background: var(--sh-m-bg); color: var(--sh-m-ink); }
.eq__chip--off { background: var(--sh-al-bg); color: var(--sh-al-ink); font-size: 16px; }
.eq__op { font-size: 24px; font-weight:700; color: var(--ink-3); }
.eq-track { display:grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-top: 18px; }
.eq-track span { font-size: 11.5px; text-align:center; padding: 8px 4px; border-radius: 9px; background: var(--bg); border:1px solid var(--line); color: var(--ink-2); font-weight:600; }

/* sequences */
.seq-grid { display:grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
@media (max-width: 860px){ .seq-grid { grid-template-columns: 1fr; } }
.seq-card { background: var(--bg-2); border:1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.seq-card--center { text-align:center; }
.seq-card--center .streak { justify-content:center; }
.seq-list { display:flex; flex-direction:column; gap: 9px; }
.seq-line { display:flex; align-items:center; gap: 9px; padding: 9px 12px; border-radius: 10px; background: var(--surface); border:1px solid var(--line); }
.seq-line svg { color: var(--ink-3); }
.seq-mark { color: var(--good) !important; margin-inline-start: auto; }
.seq-x { margin-inline-start: auto; color: var(--bad); font-weight:800; }
.seq-line--no { background: var(--sh-sl-bg); border-color: #f3c9cf; }
.streak { display:flex; align-items:center; gap: 7px; margin-top: 14px; }
.streak__on { width: 22px; height: 30px; border-radius: 6px; background: var(--teal); }
.streak__cap { width: 30px; height: 36px; border-radius: 7px; background: var(--teal-deep); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:800; }
.streak__off { width: 22px; height: 30px; border-radius: 6px; background: var(--sh-o-bg); }
.rest-after { margin-top: 18px; padding-top: 16px; border-top:1px dashed var(--line-strong); }
.seq-card--center .rest-after .flex { justify-content:center; }
.night-list { display:flex; flex-direction:column; gap: 8px; }
.night-row { display:flex; align-items:center; justify-content:space-between; padding: 11px 14px; background: var(--surface); border:1px solid var(--line); border-radius: 10px; font-size: 14px; font-weight:600; }
.night-range { font-weight:800; color: var(--sh-n); background: var(--sh-n-bg); padding: 3px 11px; border-radius: 8px; }

/* nationality */
.nat-row { margin-top: 20px; }
.nat-row__label { display:flex; align-items:center; gap: 10px; font-weight:700; margin-bottom: 12px; }
.nat-row__label svg { color: var(--teal); }
.nat-bar { display:flex; height: 44px; border-radius: 12px; overflow:hidden; border:1px solid var(--line); }
.nat-bar__seg { display:flex; align-items:center; justify-content:center; font-weight:700; font-size: 13.5px; color:#fff; }
.nat-bar__seg--a { background: var(--teal); }
.nat-bar__seg--b { background: var(--cyan); color: #04323a; }

/* weekend */
.wk-layout { display:grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items:stretch; }
@media (max-width: 860px){ .wk-layout { grid-template-columns: 1fr; } }
.wk-types { display:flex; flex-direction:column; gap: 10px; }
.wk-type { display:flex; align-items:center; gap: 14px; padding: 16px 18px; background: var(--surface); border:1px solid var(--line); border-radius: var(--r); text-align:start; transition: all .2s; }
.wk-type:hover { border-color: var(--cyan); }
.wk-type.is-active { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(20,184,196,.15); background: #fbfeff; }
.wk-type__badge { width: 30px; height: 30px; border-radius: 9px; background: var(--mint); color: var(--teal-deep); display:flex; align-items:center; justify-content:center; font-weight:800; flex:0 0 auto; }
.wk-type.is-active .wk-type__badge { background: var(--teal); color:#fff; }
.wk-type__name { font-weight:700; font-size: 14.5px; flex: 1; }
.wk-type__mini { display:flex; gap: 5px; }
.wk-cell { display:inline-flex; align-items:center; justify-content:center; }
.wk-cell--work { padding: 4px 10px; border-radius: 8px; background: var(--teal); color:#fff; font-size: 12px; font-weight:700; }
.wk-stage { background: var(--surface-ink); border-radius: var(--r-lg); padding: 30px; color:#fff; display:flex; flex-direction:column; align-items:center; justify-content:center; gap: 18px; }
.wk-stage__cal { display:flex; gap: 16px; }
.wk-stage__col { display:flex; flex-direction:column; align-items:center; gap: 12px; background: rgba(255,255,255,.06); border:1px solid var(--line-on-dark); border-radius: 14px; padding: 20px 26px; }
.wk-stage__d { font-size: 13px; color: var(--ink-on-dark-2); font-weight:600; }
.wk-stage .wk-cell--off .chip { height: 44px; min-width: 56px; font-size: 18px; }
.wk-stage .wk-cell--work { padding: 11px 22px; font-size: 15px; }
.wk-stage__caption { font-size: 18px; font-weight:700; }
.wk-goal { display:flex; align-items:center; gap: 9px; font-size: 13px; color: var(--cyan); background: rgba(20,184,196,.1); padding: 9px 14px; border-radius: 999px; text-align:center; }

/* ===================== ENGINE ===================== */
.engine { overflow: hidden; }
.engine__glow { position:absolute; inset-block-start:10%; inset-inline-start:-10%; width: 600px; height:600px; background: radial-gradient(circle, rgba(20,184,196,.22), transparent 65%); pointer-events:none; }
.engine__bar { display:flex; align-items:center; justify-content:space-between; gap: 20px; flex-wrap:wrap; margin-bottom: 18px; }
.engine__metrics { display:flex; gap: 12px; }
.emetric { background: rgba(255,255,255,.06); border:1px solid var(--line-on-dark); border-radius: 14px; padding: 12px 18px; min-width: 84px; text-align:center; transition: box-shadow .3s, background .3s; }
.emetric.is-flash { background: rgba(20,184,196,.22); box-shadow: 0 0 0 3px rgba(20,184,196,.3); }
.emetric__v { font-size: 26px; font-weight:800; color: var(--cyan); line-height:1; }
.emetric__l { font-size: 12px; color: var(--ink-on-dark-2); margin-top: 4px; }
.engine__regen .spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.engine__sheet { position: relative; background: #0a2530; border:1px solid var(--line-on-dark); border-radius: var(--r-lg); padding: 10px; box-shadow: var(--shadow-ink); transition: opacity .3s; }
.engine__sheet.is-busy { opacity: .55; }
.sheet { display:grid; gap: 4px; min-width: max-content; align-items: stretch; }
.sheet__corner, .sheet__cov-label { position: sticky; inset-inline-start: 0; z-index: 3; background: #0a2530; display:flex; align-items:center; font-size: 12px; font-weight:700; color: var(--ink-on-dark-2); padding: 6px 10px; }
.sheet__dh { display:flex; align-items:center; justify-content:center; font-size: 11px; font-weight:700; color: var(--ink-on-dark-2); padding-block: 6px; border-radius: 6px; }
.sheet__dh.is-wknd { background: rgba(20,184,196,.12); color: var(--cyan); }
.sheet__name { position: sticky; inset-inline-start: 0; z-index: 2; background: #0c2c38; border-radius: 9px; padding: 6px 11px; display:flex; flex-direction:column; gap: 2px; justify-content:center; }
.sheet__nm { font-size: 13px; font-weight:600; color: #fff; white-space:nowrap; }
.sheet__sen { font-size: 10px; font-weight:700; color: var(--ink-on-dark-2); }
.sheet__sen--sh { color: var(--cyan); }
.sheet__cell { display:flex; align-items:center; justify-content:center; border-radius: 7px; position: relative; padding: 3px 0; transition: box-shadow .3s, transform .3s; }
.sheet__cell.is-wknd { background: rgba(255,255,255,.035); }
.sheet__cell.is-hot { box-shadow: 0 0 0 2px var(--cyan); transform: scale(1.08); z-index: 4; }
.sheet__cell .chip { min-width: 26px; height: 24px; font-size: 11px; padding: 0 4px; }
.sheet__ic { position:absolute; inset-block-start: 0; inset-inline-end: 1px; font-size: 9px; color: var(--sh-m); }
.sheet__cov-label { font-size: 11.5px; }
.sheet__cov { display:flex; align-items:center; justify-content:center; font-size: 11px; font-weight:700; color: var(--cyan); background: rgba(20,184,196,.08); border-radius: 6px; padding-block: 5px; font-variant-numeric: tabular-nums; }
.sheet__cov.is-low { color: #ffd0d0; background: rgba(212,73,91,.25); }

.engine__loader { position:absolute; inset-block-start:50%; inset-inline-start:50%; transform: translate(-50%,-50%); display:flex; gap: 8px; }
[dir="rtl"] .engine__loader { transform: translate(50%,-50%); }
.engine__loader span { width: 12px; height: 12px; border-radius:50%; background: var(--cyan); animation: bounce .9s ease-in-out infinite; }
.engine__loader span:nth-child(2){ animation-delay:.15s; } .engine__loader span:nth-child(3){ animation-delay:.3s; }
@keyframes bounce { 0%,80%,100%{ transform: scale(.4); opacity:.5; } 40%{ transform: scale(1); opacity:1; } }

/* AI */
.ai { margin-top: 22px; background: rgba(255,255,255,.05); border:1px solid var(--line-on-dark); border-radius: var(--r-lg); padding: 24px; }
.ai__head { display:flex; align-items:center; justify-content:space-between; gap: 12px; flex-wrap:wrap; margin-bottom: 16px; }
.ai__title { display:flex; align-items:center; gap: 9px; font-weight:700; color:#fff; }
.ai__title svg { color: var(--cyan); }
.ai__hint { font-size: 12.5px; color: var(--ink-on-dark-2); }
.ai__input { display:flex; align-items:center; gap: 10px; background: #0a2530; border:1px solid var(--line-on-dark); border-radius: 999px; padding: 6px 6px 6px 18px; }
[dir="rtl"] .ai__input { padding: 6px 18px 6px 6px; }
.ai__input-ico { color: var(--cyan); flex:0 0 auto; }
.ai__input input { flex:1; background: transparent; border: none; color:#fff; font-family: inherit; font-size: 15px; outline: none; min-width: 0; }
.ai__input input::placeholder { color: var(--ink-on-dark-2); }
.ai__presets { display:flex; flex-wrap:wrap; gap: 8px; margin-top: 14px; }
.ai__preset { font-size: 12.5px; color: var(--ink-on-dark); background: rgba(255,255,255,.07); border:1px solid var(--line-on-dark); border-radius: 999px; padding: 7px 13px; transition: all .18s; }
.ai__preset:hover { background: rgba(20,184,196,.18); border-color: var(--cyan); }
.ai__log { display:flex; flex-direction:column; gap: 8px; margin-top: 16px; }
.ai__msg { display:flex; align-items:center; gap: 9px; font-size: 13.5px; color: var(--ink-on-dark); background: rgba(20,184,196,.1); border-radius: 10px; padding: 10px 13px; }
.ai__msg svg { color: var(--cyan); flex:0 0 auto; }
.ai__msg.is-err { background: rgba(212,73,91,.16); }
.ai__msg.is-err svg { color: #ff9aa6; }

/* ===================== FAIRNESS ===================== */
.fair-top { display:grid; grid-template-columns: auto 1fr; gap: 22px; align-items:stretch; }
@media (max-width: 900px){ .fair-top { grid-template-columns: 1fr; } }
.fair-scores { display:flex; gap: 10px; flex-wrap:wrap; justify-content:center; background: var(--surface); border:1px solid var(--line); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.radial { text-align:center; padding: 6px; }
.radial__label { font-weight:700; font-size: 14.5px; margin-top: 6px; }
.radial__sub { font-size: 12px; }
.wkf { background: var(--surface); border:1px solid var(--line); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-sm); height:100%; }
.wkf__head { display:flex; align-items:center; justify-content:space-between; gap: 14px; flex-wrap:wrap; margin-bottom: 18px; }
.wkf__legend { display:flex; gap: 14px; flex-wrap:wrap; }
.wkf__leg { display:inline-flex; align-items:center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.wkf__leg i { width: 12px; height: 12px; border-radius: 4px; display:inline-block; }
.wkf__rows { display:flex; flex-direction:column; gap: 11px; }
.wkf__row { display:grid; grid-template-columns: 64px 1fr auto; align-items:center; gap: 12px; }
.wkf__name { font-size: 14px; font-weight:600; }
.wkf__bar { display:flex; gap: 5px; }
.wkf__seg { flex:1; height: 22px; border-radius: 6px; }
.wkf__count { font-size: 13px; color: var(--ink-3); font-weight:700; }

/* KPIs */
.kpi-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 16px; }
.kpi-card { background: var(--surface); border:1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s; }
.kpi-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.kpi-card__v { color: var(--teal-deep); margin-top: 14px; }
.kpi-card__l { font-size: 14px; color: var(--ink-2); margin-top: 4px; font-weight:600; }

/* ===================== APPS ===================== */
.apps__split { display:grid; grid-template-columns: auto 1fr; gap: clamp(24px,4vw,52px); align-items:start; }
@media (max-width: 900px){ .apps__split { grid-template-columns: 1fr; justify-items:center; } }
.apps__cap { display:flex; align-items:center; gap: 8px; font-weight:700; font-size: 13.5px; color: var(--teal-deep); margin-bottom: 14px; }
.apps__phone { display:flex; flex-direction:column; align-items:center; }
.apps__dash { width: 100%; }

/* phone */
.phone { width: 310px; max-width: 84vw; background: #0a2530; border-radius: 44px; padding: 12px; box-shadow: var(--shadow-lg); position: relative; }
.phone__notch { position:absolute; inset-block-start: 20px; inset-inline-start:50%; transform: translateX(-50%); width: 110px; height: 26px; background:#0a2530; border-radius: 999px; z-index: 5; }
[dir="rtl"] .phone__notch { transform: translateX(50%); }
.phone__screen { background: var(--bg-2); border-radius: 34px; overflow:hidden; height: 600px; display:flex; flex-direction:column; }
.phone__status { display:flex; justify-content:space-between; align-items:center; padding: 14px 26px 6px; font-size: 13px; font-weight:700; }
.phone__bars { display:flex; gap: 3px; align-items:flex-end; }
.phone__bars i { width: 4px; background: var(--ink); border-radius: 2px; }
.phone__bars i:nth-child(1){ height: 7px; } .phone__bars i:nth-child(2){ height: 10px; } .phone__bars i:nth-child(3){ height: 13px; }
.phone__app { flex:1; display:flex; flex-direction:column; min-height:0; }
.papp__top { display:flex; justify-content:space-between; align-items:center; padding: 12px 20px 16px; }
.papp__hello { font-size: 13px; }
.papp__name { font-weight:800; font-size: 19px; }
.papp__avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--teal); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:800; font-size: 14px; }
.papp__body { flex:1; overflow-y:auto; padding: 0 18px 14px; display:flex; flex-direction:column; gap: 14px; }
.papp__card { background: var(--surface); border:1px solid var(--line); border-radius: 18px; padding: 18px; }
.papp__card--accent { background: var(--surface-ink); color:#fff; border:none; }
.papp__shiftbig { font-size: 22px; font-weight:800; }
.papp__week { display:flex; gap: 6px; justify-content:space-between; }
.papp__day { display:flex; flex-direction:column; align-items:center; gap: 6px; flex:1; }
.papp__dow { font-size: 11px; color: var(--ink-3); font-weight:700; }
.papp__btn { display:flex; align-items:center; justify-content:center; gap: 8px; width:100%; padding: 14px; border-radius: 14px; background: var(--mint); border:1px solid var(--cyan-soft); color: var(--teal-deep); font-weight:700; font-size: 14px; }
.papp__stat-row { display:flex; gap: 12px; }
.papp__stat { flex:1; background: var(--surface); border:1px solid var(--line); border-radius: 16px; padding: 16px; text-align:center; }
.papp__stat-v { font-size: 26px; font-weight:800; color: var(--teal-deep); }
.papp__stat-l { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.papp__prog { height: 8px; background: var(--bg); border-radius: 999px; margin-top: 8px; overflow:hidden; }
.papp__prog span { display:block; height:100%; background: var(--teal); border-radius:999px; }
.papp__note { display:flex; align-items:center; gap: 8px; font-size: 13px; color: var(--good); font-weight:600; }
.papp__note svg { flex:0 0 auto; }
.papp__req { background: var(--surface); border:1px solid var(--line); border-radius: 16px; padding: 15px; }
.papp__req--cover { border-color: var(--cyan-soft); background: #fbfeff; }
.rtag { font-size: 11px; font-weight:700; padding: 3px 9px; border-radius: 999px; }
.rtag--pend { background: var(--sh-m-bg); color: var(--sh-m-ink); }
.rtag--new { background: var(--sh-cov-bg); color: var(--sh-cov-ink); }
.rtag--ok { background: var(--sh-al-bg); color: var(--sh-al-ink); }
.rbtn { flex:1; padding: 9px; border-radius: 11px; font-weight:700; font-size: 13px; border:none; }
.rbtn--yes { background: var(--teal); color:#fff; }
.rbtn--no { background: var(--bg); color: var(--ink-2); }
.papp__tabs { display:flex; background: var(--surface); border-top:1px solid var(--line); padding: 8px 6px 14px; }
.papp__tab { flex:1; display:flex; flex-direction:column; align-items:center; gap: 3px; padding: 6px; color: var(--ink-3); font-size: 11px; font-weight:600; background:none; border:none; border-radius: 12px; transition: color .15s, background .15s; }
.papp__tab.is-active { color: var(--teal); background: var(--mint); }

/* dashboard */
.dash { background: var(--surface); border:1px solid var(--line); border-radius: var(--r-lg); overflow:hidden; box-shadow: var(--shadow); }
.dash__bar { display:flex; align-items:center; gap: 12px; padding: 13px 18px; border-bottom:1px solid var(--line); background: var(--bg-2); }
.dash__body { padding: 22px; display:grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px){ .dash__body { grid-template-columns: 1fr; } }
.dash__kpis { grid-column: 1 / -1; display:grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
@media (max-width: 560px){ .dash__kpis { grid-template-columns: repeat(2,1fr); } }
.dash__kpi { background: var(--bg-2); border:1px solid var(--line); border-radius: 14px; padding: 16px; text-align:center; }
.dash__kpi-v { font-size: 26px; font-weight:800; line-height:1; }
.dash__kpi-l { font-size: 12px; color: var(--ink-3); margin-top: 5px; }
.dash__kpi--good .dash__kpi-v { color: var(--good); }
.dash__kpi--warn .dash__kpi-v { color: var(--warn); }
.dash__kpi--bad .dash__kpi-v { color: var(--bad); }
.dash__panel { background: var(--bg-2); border:1px solid var(--line); border-radius: 16px; padding: 18px; }
.dash__panel-h { font-size: 13.5px; font-weight:700; margin-bottom: 14px; color: var(--ink-2); }
.dash__cov { display:flex; align-items:center; gap: 10px; margin-bottom: 11px; }
.dash__cov-bar { flex:1; height: 9px; background: var(--bg); border-radius:999px; overflow:hidden; }
.dash__cov-bar span { display:block; height:100%; background: var(--teal); border-radius:999px; transition: width .8s; }
.dash__cov-bar span.is-low { background: var(--bad); }
.dash__cov-num { font-size: 12.5px; font-weight:700; color: var(--ink-2); min-width: 36px; text-align:end; }
.dash__cov-num.is-low { color: var(--bad); }
.dash__appr { display:flex; align-items:center; gap: 10px; padding: 10px 0; border-top:1px solid var(--line); }
.dash__appr:first-of-type { border-top:none; }
.dash__ok, .dash__no { width: 30px; height: 30px; border-radius: 9px; border:none; font-weight:800; display:flex; align-items:center; justify-content:center; }
.dash__ok { background: var(--sh-al-bg); color: var(--sh-al-ink); }
.dash__no { background: var(--bg); color: var(--ink-3); }

/* ===================== WORKFLOWS ===================== */
.wf-tabs { display:flex; gap: 10px; flex-wrap:wrap; justify-content:center; margin-bottom: 30px; }
.wf-tab { display:flex; align-items:center; gap: 9px; padding: 12px 20px; border-radius: 999px; background: var(--surface); border:1px solid var(--line); font-weight:700; font-size: 14.5px; color: var(--ink-2); transition: all .2s; }
.wf-tab:hover { border-color: var(--cyan); }
.wf-tab.is-active { background: var(--teal); color:#fff; border-color: var(--teal); box-shadow: 0 10px 24px -14px rgba(14,124,134,.8); }
.wf-flow { display:flex; align-items:stretch; gap: 12px; flex-wrap:wrap; justify-content:center; }
.wf-step { flex:1; min-width: 200px; display:flex; align-items:center; gap: 14px; background: var(--surface); border:1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow-sm); }
.wf-step__n { flex:0 0 auto; width: 34px; height: 34px; border-radius: 10px; background: var(--mint); color: var(--teal-deep); display:flex; align-items:center; justify-content:center; font-weight:800; }
.wf-step__t { font-weight:600; font-size: 15px; }
.wf-arrow { display:flex; align-items:center; color: var(--teal); align-self:center; }
[dir="rtl"] .wf-arrow svg { transform: scaleX(-1); }
.wf-tags { display:flex; flex-wrap:wrap; gap: 10px; justify-content:center; margin-top: 24px; }

/* personal requests */
.pr-split { display:grid; grid-template-columns: 1fr 1fr; gap: clamp(28px,5vw,60px); align-items:center; }
@media (max-width: 860px){ .pr-split { grid-template-columns: 1fr; } }
.pr-list { display:flex; flex-direction:column; gap: 12px; }
.pr-item { display:flex; align-items:center; gap: 14px; padding: 18px 20px; background: var(--surface); border:1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); font-weight:600; font-size: 15.5px; transition: transform .2s, box-shadow .2s; }
.pr-item:hover { transform: translateX(0) translateY(-2px); box-shadow: var(--shadow); }
.pr-check { flex:0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--mint); color: var(--teal); display:flex; align-items:center; justify-content:center; }

/* roadmap */
.road { display:grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
@media (max-width: 800px){ .road { grid-template-columns: 1fr; } }
.road__item { position: relative; background: rgba(255,255,255,.04); border:1px solid var(--line-on-dark); border-radius: var(--r-lg); padding: 28px; padding-top: 34px; }
.road__item.is-now { border-color: var(--cyan); background: rgba(20,184,196,.08); }
.road__dot { position:absolute; inset-block-start: 26px; inset-inline-start: 28px; width: 12px; height: 12px; border-radius:50%; background: var(--ink-on-dark-2); }
.road__item.is-now .road__dot { background: var(--cyan); box-shadow: 0 0 0 6px rgba(20,184,196,.2); }
.road__tag { display:inline-block; margin-inline-start: 22px; font-size: 12.5px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color: var(--cyan); }

/* advantage */
.adv-grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 12px; }
.adv-item { display:flex; align-items:center; gap: 13px; padding: 16px 18px; background: var(--surface); border:1px solid var(--line); border-radius: var(--r); font-weight:600; font-size: 15px; box-shadow: var(--shadow-sm); transition: all .2s; }
.adv-item:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: var(--shadow); }
.adv-check { flex:0 0 auto; width: 28px; height: 28px; border-radius: 8px; background: var(--teal); color:#fff; display:flex; align-items:center; justify-content:center; }

/* footer */
.footer { background: var(--surface-ink); color: var(--ink-on-dark); padding-top: clamp(56px,8vw,96px); }
.footer__cta { text-align:center; max-width: 720px; margin-inline:auto; display:flex; flex-direction:column; align-items:center; }
.footer__cta h2 { margin-inline:auto; }
.footer__bar { display:flex; align-items:center; justify-content:space-between; gap: 16px; flex-wrap:wrap; margin-top: clamp(48px,7vw,80px); padding: 26px 0; border-top:1px solid var(--line-on-dark); }
.footer__copy { font-size: 13px; color: var(--ink-on-dark-2); }

/* ===================== THEME TOGGLE ===================== */
.icon-toggle {
  display:inline-flex; align-items:center; justify-content:center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface); border:1px solid var(--line-strong); color: var(--ink-2);
  transition: color .18s, border-color .18s, background .18s, transform .3s;
}
.icon-toggle:hover { color: var(--teal); border-color: var(--teal); }
.icon-toggle:active { transform: rotate(-30deg); }

body { transition: background-color .35s ease, color .35s ease; }

/* ===================== DARK MODE ===================== */
[data-theme="dark"] {
  --bg: #08171d;
  --bg-2: #0c222a;
  --surface: #102c36;
  --surface-ink: #06141a;
  --surface-ink-2: #0c2733;

  --ink: #e9f3f4;
  --ink-2: #aac4cb;
  --ink-3: #7c98a0;
  --ink-on-dark: #eaf6f7;
  --ink-on-dark-2: #9fc2c8;

  --teal: #12909b;
  --teal-deep: #56ccd6;
  --teal-600: #1aa0ab;
  --cyan: #22c7d3;
  --cyan-soft: rgba(34,199,211,.30);
  --mint: rgba(34,199,211,.12);

  --line: rgba(255,255,255,.085);
  --line-strong: rgba(255,255,255,.18);

  --good: #36cc8d;
  --warn: #ecae45;
  --bad: #ed6677;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.45);
  --shadow: 0 10px 30px -14px rgba(0,0,0,.65);
  --shadow-lg: 0 34px 80px -34px rgba(0,0,0,.78), 0 8px 24px -14px rgba(0,0,0,.5);
  --shadow-ink: 0 30px 80px -30px rgba(0,0,0,.8);
}

/* component fixes for hardcoded-light backgrounds */
[data-theme="dark"] .nav { background: rgba(8,23,29,.82); }
[data-theme="dark"] .nav.is-stuck { box-shadow: 0 10px 26px -18px rgba(0,0,0,.8); }
[data-theme="dark"] .rule-block--feature { background: linear-gradient(180deg, #123843, var(--surface)); }
[data-theme="dark"] .wk-type.is-active { background: #0f3742; }
[data-theme="dark"] .papp__req--cover { background: #0f3540; }
[data-theme="dark"] .mission-card { background: var(--surface-ink-2); border: 1px solid var(--line); }
[data-theme="dark"] .role-chip,
[data-theme="dark"] .card,
[data-theme="dark"] .kpi-card,
[data-theme="dark"] .pr-item,
[data-theme="dark"] .adv-item,
[data-theme="dark"] .wf-step,
[data-theme="dark"] .shift-legend__item { background: var(--surface); }
[data-theme="dark"] .seq-line--no { background: rgba(212,73,91,.16); border-color: rgba(212,73,91,.35); }
[data-theme="dark"] .seq-line--no .seq-x { color: #ff9aa6; }
[data-theme="dark"] .phone { background: #04222b; }
[data-theme="dark"] .hero__grid-bg { opacity: .35; }
[data-theme="dark"] .eyebrow { color: var(--cyan); }
[data-theme="dark"] .ico-badge { color: var(--teal-deep); }
[data-theme="dark"] .ico-badge--bad { color: #ff9aa6; }

/* =====================================================================
   MOBILE / PORTRAIT PHONE TUNING  (added)
   Fixes content clipping on narrow screens. Root cause was CSS-grid
   "blowout": grid/flex items default to min-width:auto, so a wide child
   (the roster table, schedule sheet, etc.) forced its column wider than
   the viewport and the right edge got clipped.
   ===================================================================== */

/* 1) Anti-blowout: let grid/flex items shrink below their content size.
      NOTE: .scroll-x children are intentionally excluded — they keep
      min-width:max-content so the schedule sheet stays horizontally
      scrollable inside its scroll container. */
.hero__inner > *,
.solution__split > *,
.pr-split > *,
.fair-top > *,
.apps__split > *,
.wk-layout > *,
.seq-grid > *,
.hours-grid > *,
.dash__body > *,
.wkf__row > *,
.roster-card__name { min-width: 0; }
.roster-card__name b { min-width: 0; }

@media (max-width: 640px) {
  /* tighter side gutters give content more room */
  .wrap { padding-inline: 18px; }
  .section { padding-block: clamp(48px, 12vw, 72px); }

  /* headings/lede scale down a touch and never overflow */
  .h-display { font-size: clamp(30px, 8.5vw, 40px); }
  .h-title   { font-size: clamp(23px, 6.4vw, 32px); }
  .lede { font-size: 15.5px; max-width: none; }

  /* HERO roster preview: compress so all 7 days fit the phone width */
  .hero__stats { gap: 20px; margin-top: 28px; }
  .roster-card { transform: none; }            /* drop the 3D tilt that pushed edges off-screen */
  .roster-card__head,
  .roster-card__row { padding-inline: 10px; gap: 4px; }
  .roster-card__bar,
  .roster-card__foot { padding-inline: 12px; }
  .roster-card__name { gap: 5px; font-size: 12px; }
  .roster-card__day { font-size: 10px; }
  .roster-card .chip,
  .roster-card .tagdot { min-width: 20px; height: 22px; padding: 0 3px; font-size: 11px; }

  /* schedule sheet: keep it scrollable and hint that it scrolls */
  .scroll-x { -webkit-overflow-scrolling: touch; }

  /* phone mockup centered and not too tall */
  .phone { max-width: 78vw; }
  .phone__screen { height: 540px; }

  /* dashboard KPIs: 2-up already kicks in at 560 — make labels fit */
  .dash__body { padding: 16px; }
  .dash__kpi { padding: 13px; }
  .dash__kpi-v { font-size: 22px; }

  /* workflow steps full-width stacked */
  .wf-step { min-width: 0; width: 100%; }
  .wf-flow { flex-direction: column; }
  .wf-arrow { transform: rotate(90deg); }
  [dir="rtl"] .wf-arrow svg { transform: none; }

  /* buttons: let the two hero CTAs go full width & wrap cleanly */
  .hero__copy .btn { flex: 1 1 auto; justify-content: center; }
}

@media (max-width: 400px) {
  .wrap { padding-inline: 14px; }
  .hero__stats { gap: 16px; }
  .hero__stat .stat-num { font-size: 30px; }
  /* extra squeeze for the 7-day roster on very small phones */
  .roster-card__head,
  .roster-card__row { padding-inline: 8px; gap: 3px; }
  .roster-card .chip,
  .roster-card .tagdot { min-width: 17px; padding: 0 2px; font-size: 10px; }
  .dash__kpi-v { font-size: 20px; }
}
