/* Gooda design system: warm paper, editorial type, calm UI for daily work. */
:root {
  --paper: #f2f0ec;
  --paper-2: #e6e8ec;
  --card: #ffffff;
  --ink: #0d2233;
  --ink-2: #3d5566;
  --muted: #7b8c99;
  --line: #d7dde3;

  /* brand */
  --navy: #01456c;
  --navy-deep: #003554;
  --brand: #0580c7;
  --brand-bright: #27bbff;
  --brand-soft: #e2f1fb;

  /* `--green` is the app's primary accent everywhere; it is Gooda blue now. */
  --green: #01456c;
  --green-soft: #e2f1fb;
  --orange: #ff6523;
  --orange-soft: #ffe9df;
  --red: #d13b2e;
  --red-soft: #fbe3e0;
  --amber: #c08400;
  --amber-soft: #fcf0d4;
  --blue: #0481c9;
  --blue-soft: #e2f1fb;
  --radius: 14px;
  --shadow: 0 1px 0 rgba(1, 69, 108, .04), 0 12px 28px -20px rgba(1, 69, 108, .45);
  --serif: 'Frank Ruhl Libre', 'David', serif;
  --sans: 'IBM Plex Sans Hebrew', 'Arial Hebrew', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c1419; --paper-2: #142029; --card: #15222b; --ink: #e8f0f5; --ink-2: #b4c6d2; --muted: #8299a8;
    --line: #263844;
    --navy: #4db2ea; --navy-deep: #3aa3e0;
    --brand: #39a8e6; --brand-bright: #6fd0ff; --brand-soft: #16303f;
    --green: #39a8e6; --green-soft: #16303f;
    --orange: #ff8650; --orange-soft: #3a2316;
    --red: #f07a6c; --red-soft: #3a211d; --amber: #e3bb5c; --amber-soft: #332c18;
    --blue: #6fd0ff; --blue-soft: #16303f;
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 14px 30px -22px #000;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
}
a { color: var(--green); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
small { font-size: 13px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side {
  background: var(--card); border-inline-end: 1px solid var(--line); padding: 20px 16px;
  display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; overflow: auto;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; margin-bottom: 18px; }
.brand-mark { width: 32px; height: 25px; display: block; flex: none; }
.brand-word { font-family: var(--sans); font-weight: 500; letter-spacing: .22em; color: var(--ink); }
.brand-slogan { font-size: 11px; color: var(--muted); letter-spacing: .01em; margin: -12px 0 14px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px;
  text-decoration: none; color: var(--ink-2); font-weight: 500;
}
.nav-item:hover { background: var(--paper-2); color: var(--ink); }
.nav-item[aria-current="page"] { background: var(--navy); color: var(--paper); font-weight: 600; }
.pill { background: var(--orange); color: #fff; border-radius: 99px; font-size: 12px; padding: 0 7px; font-weight: 700; }
.nav-item .pill { margin-inline-start: auto; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; color: var(--muted); font-size: 14px; }
.side-foot button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px 0; text-decoration: underline; }
main { padding: 26px 30px 70px; max-width: 1180px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

/* ---------- building blocks ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.muted { color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 12px; }

.btn { border: 1.5px solid var(--ink); background: transparent; border-radius: 999px; padding: 9px 18px; cursor: pointer; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { filter: brightness(1.12); }
.btn.small { padding: 5px 12px; font-size: 14px; border-width: 1px; }
.btn.ghost { border-color: var(--line); color: var(--ink-2); }
.btn.ghost:hover { background: var(--paper-2); color: var(--ink); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

input[type=text], input[type=email], input[type=tel], input[type=password], input[type=url], input[type=date], input[type=datetime-local], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
label.field { display: block; margin-bottom: 12px; }
label.field span { display: block; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
textarea { min-height: 90px; resize: vertical; }

.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); }
.tag.green { background: var(--green-soft); color: var(--green); font-weight: 600; }
.tag.orange { background: var(--orange-soft); color: var(--orange); font-weight: 600; }
.tag.red { background: var(--red-soft); color: var(--red); font-weight: 600; }
.tag.amber { background: var(--amber-soft); color: var(--amber); font-weight: 600; }
.tag.blue { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.tag.line { background: transparent; border: 1px solid var(--line); direction: ltr; }

.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.green { background: #17a673; } .dot.yellow { background: #d9a520; } .dot.red { background: #cf4436; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: start; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 13px; color: var(--muted); font-weight: 600; }
tbody tr:hover { background: var(--paper-2); }

.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-family: var(--serif); font-size: 30px; line-height: 1.15; }
.stat span { color: var(--muted); font-size: 13px; }
.stat.alert b { color: var(--red); }

.empty { text-align: center; padding: 40px 20px; border: 1.5px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.logo-box { width: 44px; height: 44px; border-radius: 10px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; flex: none; }
.logo-box img { width: 80%; height: 80%; object-fit: contain; }
.logo-box.fallback { background: var(--green-soft); color: var(--green); font-family: var(--serif); font-weight: 700; }

/* progress rail */
.rail { display: flex; align-items: center; gap: 0; margin: 6px 0 4px; }
.rail-step { flex: 1; text-align: center; position: relative; font-size: 13px; color: var(--muted); padding-top: 22px; }
.rail-step::before { content: ''; position: absolute; top: 6px; inset-inline-start: 50%; translate: -50% 0; width: 14px; height: 14px; border-radius: 50%; background: var(--paper-2); border: 2px solid var(--line); }
.rail-step::after { content: ''; position: absolute; top: 12px; inset-inline-start: 50%; width: 100%; height: 2px; background: var(--line); z-index: -1; }
.rail-step:last-child::after { display: none; }
.rail-step.done { color: var(--green); font-weight: 600; }
.rail-step.done::before { background: var(--green); border-color: var(--green); }
.rail { position: relative; z-index: 0; }

/* toast + modal */
.toast { position: fixed; inset-block-end: 24px; inset-inline-start: 24px; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 12px; z-index: 100; box-shadow: var(--shadow); animation: toast-in .25s ease both; }
@keyframes toast-in { from { opacity: 0; translate: 0 10px; } }
.modal-scrim { position: fixed; inset: 0; background: rgba(15, 22, 19, .45); z-index: 90; display: grid; place-items: center; padding: 20px; }
.modal { background: var(--paper); border-radius: 18px; width: min(680px, 100%); max-height: 88vh; overflow: auto; box-shadow: 0 30px 70px -30px rgba(0,0,0,.6); }
.modal header { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; position: sticky; top: 0; background: var(--paper); }
.modal .body { padding: 20px 22px; }
.modal footer { padding: 14px 22px 20px; display: flex; gap: 10px; justify-content: flex-start; }
.icon-btn { border: 0; background: var(--paper-2); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 18px; }

/* ---------- the phone: a bar on top, the sidebar as a drawer ----------
   The old rule let the sidebar wrap into a row, which on a 390px screen meant eight nav
   items and four footer links eating the first screenful before any content appeared. */
.topbar { display: none; }
.side-scrim { display: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }

  .topbar {
    display: flex; align-items: center; gap: 12px;
    position: sticky; top: 0; z-index: 50;
    background: var(--card); border-bottom: 1px solid var(--line); padding: 10px 14px;
  }
  .topbar .brand { margin: 0; }
  .topbar .brand-word { font-size: 15px; }
  .topbar-pill { margin-inline-start: auto; text-decoration: none; min-width: 22px; text-align: center; line-height: 22px; }
  .shell.with-banner .topbar { top: 41px; }

  .burger {
    flex: none; width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--paper-2);
    display: grid; place-content: center; gap: 4px; cursor: pointer; padding: 0;
  }
  .burger span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }

  .side-scrim { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(2, 24, 43, .45); }

  .side {
    position: fixed; z-index: 80; top: 0; bottom: 0; inset-inline-start: 0;
    width: min(284px, 82vw); height: 100dvh;
    transform: translateX(var(--nav-hidden, 100%));
    transition: transform .22s ease;
    box-shadow: 0 0 60px -20px rgba(2, 24, 43, .6);
  }
  .side .brand, .side .brand-slogan { display: none; }
  body.nav-open .side { transform: none; }

  main { padding: 18px 16px 60px; }
  .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr 1fr; }
}

/* The drawer slides in from the start edge, which is the right in Hebrew and the left in
   a left-to-right document; `translateX` is physical, so the direction is set per script. */
@media (max-width: 900px) {
  [dir="rtl"] .side { --nav-hidden: 100%; }
  [dir="ltr"] .side, html:not([dir]) .side { --nav-hidden: -100%; inset-inline-start: 0; }
}

@media (prefers-reduced-motion: reduce) { .side { transition: none; } }

@media (max-width: 620px) {
  .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; }
  .rail-step { font-size: 11px; }
}

/* ---------- impersonation banner ---------- */
.impersonation {
  position: sticky; top: 0; z-index: 60; display: flex; justify-content: center; align-items: center; gap: 14px;
  background: var(--amber-soft); color: var(--ink); border-bottom: 1px solid var(--amber); padding: 8px 16px; font-size: 14px;
}
.impersonation .btn { border-color: var(--ink); }
@media (min-width: 901px) { .shell.with-banner .side { height: calc(100vh - 41px); top: 41px; } }

/* ---------- guided tour ---------- */
.tour { position: fixed; inset: 0; z-index: 120; }
.tour::before { content: ''; position: absolute; inset: 0; background: rgba(12, 20, 16, .55); }
.tour-hole {
  position: absolute; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(12, 20, 16, .55), 0 0 0 3px var(--green);
  transition: all .3s cubic-bezier(.2, .8, .3, 1); opacity: 0; pointer-events: none;
}
.tour-card {
  position: absolute; width: 340px; background: var(--card); color: var(--ink); border-radius: 16px; padding: 18px 20px;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .7); animation: tour-in .3s cubic-bezier(.2, .9, .3, 1) both;
}
@keyframes tour-in { from { opacity: 0; transform: translateY(8px); } }
.tour-card h3 { margin-bottom: 6px; }
.tour-card p { margin: 0 0 14px; color: var(--ink-2); }
.tour-count { font-size: 12px; color: var(--muted); letter-spacing: .04em; margin-bottom: 4px; }
.tour-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
@media (prefers-reduced-motion: reduce) { .tour-hole, .tour-card { transition: none; animation: none; } }

/* ---------- onboarding ---------- */
.onb { min-height: 100vh; display: flex; flex-direction: column; }
.onb header { display: flex; justify-content: space-between; align-items: center; padding: 18px 26px; }
.onb-bar { height: 4px; background: var(--paper-2); }
.onb-bar div { height: 100%; background: var(--green); transition: width .4s cubic-bezier(.2, .8, .3, 1); }
.onb-main { width: min(760px, 100%); margin: 0 auto; padding: 42px 22px 60px; animation: step-in .35s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes step-in { from { opacity: 0; transform: translateY(12px); } }
.onb-main h1 { font-size: clamp(28px, 4vw, 40px); }
.onb-main .lead { color: var(--ink-2); font-size: 18px; margin: 8px 0 26px; }
.onb-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 30px; gap: 12px; }
.onb .tag { cursor: pointer; user-select: none; }
.onb .tag:hover { background: var(--green-soft); }
@media (prefers-reduced-motion: reduce) { .onb-main { animation: none; } .onb-bar div { transition: none; } }

/* ---------- global search ---------- */
#global-search { margin-bottom: 14px; padding: 8px 12px; font-size: 14px; background: var(--paper-2); }
.search-results {
  position: fixed; z-index: 60; width: 320px; max-height: 70vh; overflow: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px -22px rgba(0,0,0,.45); padding: 6px;
}
.search-group { padding: 6px 4px; }
.search-group + .search-group { border-top: 1px solid var(--line); }
.search-group h4 { font-size: 12px; color: var(--muted); letter-spacing: .04em; margin: 0 6px 4px; font-weight: 600; }
.search-results a { display: block; padding: 7px 8px; border-radius: 9px; text-decoration: none; color: var(--ink); }
.search-results a:hover { background: var(--paper-2); }
.search-results a b { display: block; font-weight: 600; font-size: 14px; }
.search-results a span { display: block; font-size: 12px; color: var(--muted); }

/* ---------- funnel ---------- */
.funnel { display: flex; flex-direction: column; gap: 8px; }
.funnel-row { display: grid; grid-template-columns: 120px 1fr 86px; align-items: center; gap: 10px; }
.funnel-bar { background: var(--paper-2); border-radius: 8px; height: 26px; overflow: hidden; }
.funnel-bar div { height: 100%; background: var(--green); border-radius: 8px; min-width: 2px; transition: width .4s ease; }
.funnel-row.weak .funnel-bar div { background: var(--red); }
.funnel-row small { color: var(--muted); }

/* ---------- toggles on the rules screen ---------- */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.switch i { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: background .18s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: translate .18s; }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { translate: 20px 0; }

/* ---------- learning library ---------- */
.bar { height: 8px; background: var(--paper-2); border-radius: 99px; overflow: hidden; }
.bar > div { height: 100%; background: var(--green); border-radius: 99px; transition: width .4s ease; }
.bar.thin { height: 4px; }

.lesson {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--paper); cursor: pointer;
}
.lesson:hover { background: var(--paper-2); border-color: var(--green); }
.lesson.done { background: var(--green-soft); border-color: transparent; }
.lesson-mark {
  width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--green); color: #fff; font-size: 13px;
}

.modal.player { width: min(920px, 100%); }
.player-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.player-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- chapters ---------- */
.chapter { margin-bottom: 14px; }
.chapter:last-child { margin-bottom: 0; }
.chapter h3 {
  display: flex; align-items: center; gap: 8px; cursor: pointer; margin-bottom: 8px;
  font-size: 16px; padding: 6px 0; border-bottom: 1px solid var(--line);
}
.chapter h3 .muted { margin-inline-start: auto; font-weight: 400; }
.chapter-caret { color: var(--muted); transition: rotate .18s; font-size: 12px; }
.chapter.closed .chapter-caret { rotate: -90deg; }
.chapter.closed .stack { display: none; }
.lesson.tool { text-decoration: none; color: inherit; border-style: dashed; }
.lesson.tool .lesson-mark { background: var(--brand-soft); color: var(--brand); }
.lesson.locked { cursor: default; opacity: .62; }
.lesson.locked:hover { background: var(--paper); border-color: var(--line); }
.lesson.locked .lesson-mark { background: var(--paper-2); }

/* ---------- accessibility widget ---------- */
/* Everything here is driven by one variable and four classes on <html>, set by
   /assets/a11y.js. Off by default, and it costs nothing when nobody turns it on. */

:root { --a11y-scale: 1; }
html { font-size: calc(16px * var(--a11y-scale)); }

html.a11y-contrast {
  --paper: #ffffff; --paper-2: #f0f0f0; --card: #ffffff;
  --ink: #000000; --ink-2: #1a1a1a; --muted: #3a3a3a; --line: #767676;
  --navy: #002b45; --brand: #005c91; --brand-bright: #00486f; --brand-soft: #e8f2f9;
  --green: #002b45; --green-soft: #e8f2f9;
}
html.a11y-contrast .card,
html.a11y-contrast .lesson,
html.a11y-contrast input,
html.a11y-contrast select,
html.a11y-contrast textarea { border-color: var(--line) !important; }

html.a11y-links a,
html.a11y-links .nav-item { text-decoration: underline !important; text-underline-offset: 3px; font-weight: 600; }

html.a11y-still *,
html.a11y-still *::before,
html.a11y-still *::after {
  animation-duration: 0s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0s !important;
  scroll-behavior: auto !important;
}

#a11y-guide-bar { display: none; }
html.a11y-guide #a11y-guide-bar {
  display: block; position: fixed; inset-inline: 0; height: 40px; top: 0;
  background: rgba(1, 69, 108, .14); border-block: 2px solid var(--navy);
  pointer-events: none; z-index: 2147483000;
}

#a11y-root { position: fixed; inset-block-end: 20px; left: 20px; z-index: 2147483001; direction: rtl; }
#a11y-open {
  width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px -10px rgba(1, 69, 108, .7);
}
#a11y-open svg { width: 28px; height: 28px; fill: currentColor; }
#a11y-open:hover { filter: brightness(1.15); }
#a11y-open:focus-visible, #a11y-panel button:focus-visible, #a11y-panel a:focus-visible {
  outline: 3px solid var(--orange); outline-offset: 2px;
}

#a11y-panel {
  position: absolute; inset-block-end: 64px; left: 0; width: 272px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px;
  box-shadow: 0 24px 50px -22px rgba(1, 69, 108, .55);
}
.a11y-head { font-family: var(--serif); font-weight: 700; font-size: 20px; color: var(--navy); margin-bottom: 12px; }
.a11y-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 15px; }
.a11y-size { display: flex; align-items: center; gap: 10px; }
.a11y-size button {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--paper-2); cursor: pointer; font-size: 17px; line-height: 1;
}
.a11y-size b { min-width: 46px; text-align: center; font-size: 14px; }
.a11y-toggle {
  display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 7px;
  padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--paper); cursor: pointer; font-size: 15px; text-align: start;
}
.a11y-toggle svg { width: 19px; height: 19px; fill: var(--ink-2); flex: none; }
.a11y-toggle.on { background: var(--brand-soft); border-color: var(--brand); color: var(--navy); font-weight: 600; }
.a11y-toggle.on svg { fill: var(--brand); }
.a11y-reset {
  width: 100%; margin-top: 6px; padding: 8px; border-radius: 10px;
  border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 14px; color: var(--ink-2);
}
.a11y-link { display: block; text-align: center; margin-top: 10px; font-size: 13px; color: var(--brand); }

@media print { #a11y-root, #a11y-guide-bar { display: none !important; } }

.side-legal { margin-top: 10px; font-size: 12px; color: var(--muted); }
.side-legal a { color: var(--muted); }
.side-legal a:hover { color: var(--brand); }

/* ---------- client home: the rail and the one next thing ---------- */

.rail-step.current { color: var(--navy); font-weight: 700; }
.rail-step.current::before {
  width: 20px; height: 20px; top: 3px;
  background: var(--navy); border-color: var(--navy);
  box-shadow: 0 0 0 5px var(--brand-soft);
}
.rail-step.done:not(.current) { color: var(--ink-2); }
.rail-step.done::after { background: var(--brand); }
.rail-you {
  display: block; font-size: 11px; font-weight: 600; letter-spacing: .04em;
  color: var(--brand); margin-top: 3px;
}

/* The single most important element on the screen, so it looks like it. */
.next-card {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: var(--navy); color: #fff; border-radius: var(--radius);
  padding: 26px 30px; margin-bottom: 16px; text-decoration: none;
  box-shadow: 0 20px 44px -26px rgba(1, 69, 108, .85);
  transition: transform .18s ease, box-shadow .18s ease;
}
.next-card:hover { transform: translateY(-2px); box-shadow: 0 26px 52px -24px rgba(1, 69, 108, .9); }
.next-card small { display: block; font-size: 13px; color: #9ec9e6; margin-bottom: 6px; }
.next-card h2 { font-size: 30px; line-height: 1.25; margin: 0; color: #fff; }
.next-card p { margin: 8px 0 0; color: #cfe4f2; font-size: 17px; }
.next-cta {
  flex: none; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px; padding: 12px 22px; font-weight: 600; white-space: nowrap;
}
.next-card:hover .next-cta { background: rgba(255, 255, 255, .22); }
@media (max-width: 760px) {
  .next-card { flex-direction: column; align-items: stretch; gap: 16px; }
  .next-card h2 { font-size: 25px; }
  .next-cta { text-align: center; }
}

/* The real artwork, not a reconstruction. */
img.brand-mark { width: 36px; height: 22px; object-fit: contain; display: block; flex: none; }
.brand-logo { width: 150px; height: auto; display: block; margin: 0 auto 16px; }

.login .login-mark { width: 92px; height: 56px; margin: 0 auto 10px; }
.login .brand-word { font-size: 22px; }

/* ---------- the content library: a shelf of courses, and one course per page ---------- */

.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }

.course-card {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 26px 24px; text-decoration: none; color: inherit;
  box-shadow: 0 18px 40px -32px rgba(1, 69, 108, .5);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.course-card:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: 0 26px 52px -30px rgba(1, 69, 108, .55); }
.course-card h2 { font-family: var(--serif); font-size: 27px; color: var(--navy); margin: 10px 0 8px; }
.course-card p { color: var(--ink-2); margin: 0 0 16px; line-height: 1.55; flex: 1; }
.course-card .course-facts { margin-bottom: 14px; }
.course-card.locked { opacity: .72; }

.course-facts { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 14px; }
.course-facts span { position: relative; }
.course-facts span + span::before { content: '·'; position: absolute; inset-inline-start: -9px; }

.course-hero {
  display: grid; grid-template-columns: 1fr 280px; gap: 30px; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 32px 34px;
}
.course-hero h1 { font-family: var(--serif); font-size: 42px; color: var(--navy); margin: 12px 0 10px; }
.course-sum { font-size: 20px; color: var(--ink-2); line-height: 1.55; margin: 0 0 12px; }
.course-out { font-size: 17px; color: var(--ink); margin: 0 0 16px; }
.course-progress { background: var(--paper-2); border-radius: 16px; padding: 22px; text-align: center; }
.course-ring b { display: block; font-family: var(--serif); font-size: 44px; color: var(--navy); line-height: 1; }
.course-ring span { display: block; font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.course-locked b { display: block; color: var(--navy); margin-bottom: 6px; }
.course-locked span { font-size: 14px; color: var(--ink-2); }

.module { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.module header {
  display: flex; align-items: center; gap: 14px; padding: 18px 22px; cursor: pointer;
  background: var(--paper-2); border-bottom: 1px solid var(--line);
}
.module header b { font-size: 19px; color: var(--navy); }
.module-caret { color: var(--muted); transition: rotate .2s ease; }
.module-count { margin-inline-start: auto; }
.module.closed .module-caret { rotate: 90deg; }
.module.closed .module-body { display: none; }
.module.closed header { border-bottom: 0; }
.module-body { padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; }
.lesson-meta { flex: none; white-space: nowrap; }

@media (max-width: 860px) {
  .course-hero { grid-template-columns: 1fr; }
  .course-hero h1 { font-size: 32px; }
}

.section-title {
  font-family: var(--serif); font-size: 15px; font-weight: 700; letter-spacing: .04em;
  text-transform: none; color: var(--muted); margin: 0 0 12px;
}

/* ---------- the client's job list ---------- */

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-strip .stat { padding: 16px 18px; text-align: center; }
.stat-strip .stat b { font-size: 32px; color: var(--navy); line-height: 1; }
.stat-strip .stat span { display: block; margin-top: 6px; }

.job-row {
  display: flex; align-items: center; gap: 14px; width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; cursor: pointer; text-align: start;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.job-row:hover, .job-row:focus-visible { border-color: var(--brand); box-shadow: 0 14px 30px -26px rgba(1, 69, 108, .6); }
.job-row.closed { opacity: .66; }
.job-main { flex: 1; min-width: 0; }
.job-main b { font-size: 16px; color: var(--navy); }
.job-main .muted { font-size: 14px; }
.job-side { flex: none; }

.job-avatar {
  flex: none; width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--navy);
  font-family: var(--serif); font-size: 20px; font-weight: 700;
}

.job-line { margin-top: 7px; font-size: 13.5px; border-inline-start: 3px solid var(--line); padding-inline-start: 9px; }
.job-line.you { border-color: var(--brand); color: var(--navy); font-weight: 600; }
.job-line.team { border-color: var(--green); color: var(--ink-2); }
.job-line.stale { border-color: var(--orange); color: var(--ink-2); }

.job-status { min-width: 160px; font-size: 14px; padding: 8px 10px; }

@media (max-width: 760px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .job-row { flex-wrap: wrap; }
  .job-side { width: 100%; }
  .job-status { width: 100%; }
}

/* A count beside a section heading: its own element, so bidi does not fling the digit
   to the far side of the Hebrew that names it. */
.section-title { display: flex; align-items: baseline; gap: 8px; }
.section-count {
  font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--ink-2);
  background: var(--paper-2); border-radius: 20px; padding: 2px 9px;
}

/* ---------- one rhythm for headings ----------
   The scale was always shared; the spacing was not, and every screen set its own margins
   inline. The rhythm lives here now, and a heading that shares a row with something else
   (a card header, a page head) opts out. */
h2 { margin-bottom: 12px; }
h3 { margin-bottom: 8px; }
* + h2 { margin-top: 28px; }
* + h3 { margin-top: 20px; }
.spread > * > h2, .spread > * > h3, .spread > h2, .spread > h3,
.row > h2, .row > h3, .page-head h1, .page-head h2, .modal header h2 { margin: 0; }

/* ---------- booking a first call ---------- */
.booking-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px; }
.booking-card {
  display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
  transition: border-color .15s ease;
}
.booking-card:hover { border-color: var(--brand); }
.booking-avatar {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; background: var(--brand-soft); color: var(--navy);
  font-family: var(--serif); font-size: 19px; font-weight: 700;
}
.booking-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.booking-text b { color: var(--navy); }
.booking-text .muted { font-size: 13px; }

/* ---------- the invitations table ---------- */
.invite-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.invite-table th {
  text-align: start; font-size: 13px; font-weight: 600; color: var(--muted);
  padding: 12px 14px; background: var(--paper-2); border-bottom: 1px solid var(--line);
}
.invite-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.invite-table tr:last-child td { border-bottom: 0; }
.invite-table input[type="checkbox"] { width: 17px; height: 17px; cursor: pointer; }
.email-cell {
  width: 100%; min-width: 210px; padding: 7px 10px; font-size: 14px;
  border: 1px solid transparent; border-radius: 8px; background: transparent;
}
.email-cell:hover { border-color: var(--line); }
.email-cell:focus { border-color: var(--brand); background: var(--card); outline: none; }
.email-cell::placeholder { color: var(--red); opacity: .75; }

/* A bar that follows the page while a selection is live, so the action never scrolls
   out of reach of the checkboxes that fed it. */
.action-bar {
  position: sticky; bottom: 18px; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  margin-top: 18px; padding: 14px 20px;
  background: var(--card); border: 1px solid var(--brand); border-radius: 99px;
  box-shadow: 0 20px 44px -22px rgba(1, 69, 108, .55);
}


/* ---------- the in-app guide ---------- */

/* The accessibility widget owns the bottom-left corner (it is fixed to `left` and is
   where Israeli users look for it), so the guide takes the other side. They were landing
   on top of each other. */
#helper-root { position: fixed; inset-block-end: 20px; inset-inline-start: 20px; z-index: 90; }

.helper-fab {
  display: flex; align-items: center; gap: 9px;
  background: var(--navy); color: var(--paper); border: 0; cursor: pointer;
  border-radius: 99px; padding: 13px 20px; font: inherit; font-weight: 600; font-size: 15px;
  box-shadow: 0 16px 34px -14px rgba(2, 24, 43, .6);
  transition: transform .15s ease, box-shadow .15s ease;
}
.helper-fab:hover { transform: translateY(-2px); box-shadow: 0 22px 42px -16px rgba(2, 24, 43, .7); }
.helper-fab > span:first-child {
  display: grid; place-items: center; width: 22px; height: 22px; flex: none;
  border-radius: 50%; background: var(--brand-bright); color: var(--navy); font-weight: 800; font-size: 14px;
}
#helper-root.open .helper-fab { display: none; }

.helper-panel {
  display: flex; flex-direction: column;
  width: min(390px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 100px));
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  box-shadow: 0 30px 70px -26px rgba(2, 24, 43, .55);
}
.helper-panel header {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 18px; background: var(--paper-2); border-bottom: 1px solid var(--line);
}
.helper-panel header > div:first-child { flex: 1; }
.helper-panel header b { color: var(--navy); }

.helper-log { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.helper-empty p { margin: 0 0 14px; color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.helper-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.helper-chips .tag { cursor: pointer; text-align: start; }

.helper-msg { max-width: 92%; border-radius: 14px; padding: 11px 14px; font-size: 14.5px; line-height: 1.6; white-space: pre-wrap; }
.helper-msg.me { align-self: flex-start; background: var(--brand-soft); color: var(--navy); }
.helper-msg.bot { align-self: flex-end; background: var(--paper-2); }
.helper-wait { opacity: .6; font-style: italic; }
.helper-link { display: inline-block; margin-top: 9px; font-weight: 600; color: var(--brand); text-decoration: none; }
.helper-link:hover { text-decoration: underline; }
.helper-send-advisor { display: block; margin-top: 11px; }
.helper-sent { margin-top: 9px; font-size: 13px; color: var(--green); }

.helper-ask { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--paper-2); }
.helper-ask input { flex: 1; min-width: 0; }

@media (max-width: 620px) {
  #helper-root { inset-inline: 12px; inset-block-end: 12px; }
  /* A full-width primary button at the foot of a form would otherwise sit under the
     floating accessibility control. */
  #a11y-root { inset-block-end: 84px; }
  #helper-root.open .helper-panel { width: 100%; max-height: calc(100vh - 90px); }
  .helper-fab-text { display: none; }
  .helper-fab { margin-inline-start: auto; width: 52px; height: 52px; justify-content: center; padding: 0; }
}

/* ---------- the free plan ---------- */
.nav-lock { margin-inline-start: auto; font-size: 12px; opacity: .7; }
.nav-upgrade {
  margin: 12px 0 4px; width: 100%; padding: 10px 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--orange); background: var(--orange-soft); color: var(--ink);
  font: inherit; font-weight: 600; text-align: start;
}
.nav-upgrade:hover { background: var(--orange); color: #fff; }
.upsell-reason { background: var(--amber-soft); border-radius: 10px; padding: 10px 12px; margin: 0 0 14px; }
.upsell-perks { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.upsell-perks li::before { content: '✓'; color: var(--brand); font-weight: 700; margin-inline-end: 8px; }
.upsell-page { max-width: 640px; border-color: var(--orange); }
.upsell-page h2 { margin: 10px 0 6px; }
.upsell-page .btn { margin-top: 18px; }
.plan-card { border-color: var(--orange); margin-bottom: 16px; }
.plan-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-top: 12px; }
.plan-meter b { font-size: 20px; }
.plan-meter .bar { margin-top: 6px; }
.plan-meter.full .bar > div { background: var(--orange); }

/* ---------- joining: the first screens anyone sees ---------- */
.onb-resume {
  background: var(--green-soft); border-radius: 12px; padding: 11px 14px;
  font-size: 14px; color: var(--ink); margin-bottom: 18px;
}
.onb-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
.onb-foot .linkish { margin-inline-start: auto; }
.linkish { background: none; border: 0; color: var(--brand); cursor: pointer; font: inherit; text-decoration: underline; padding: 4px; }

/* ---------- typing Latin text in a right-to-left page ----------
   The document is RTL, so an input inherited that direction and typing "business
   development manager" put the caret in the wrong place and reordered the words as they
   were typed. `plaintext` makes each field take its direction from the first strong
   character the person types — Hebrew reads right-to-left, English left-to-right, in the
   same box, with no setting to choose. */
input[type="text"], input[type="search"], input[type="url"], input[type="email"],
input[type="tel"], input[type="password"], textarea {
  unicode-bidi: plaintext;
  text-align: start;
}
/* Fields that are never Hebrew stay pinned, so a half-typed URL does not jump about. */
input[dir="ltr"], .email-cell { unicode-bidi: normal; direction: ltr; text-align: start; }
