/* The interactive journeys (docs/user-guide/journeys/*.html): a hero, a sticky progress bar, stations with steps to tick,
   a decider, a calculator, tabs and a quiz - on guide.css's tokens */
/* the journey runs edge to edge: the guide's main (1060px, padded) would clip the hero's wider inner column */
main.jr { max-width: none; padding: 0; margin: 0; }
.jr-hero { background: radial-gradient(1200px 400px at 85% -10%, rgba(211,160,60,.28), transparent 60%), linear-gradient(160deg, var(--field-deep), var(--field)); color: #fff; }
.jr-hero-in { width: min(1120px, 92vw); margin-inline: auto; padding: 48px 0 40px; }
.jr-kicker { color: var(--wheat-lit); font-size: 14px; font-weight: 500; margin: 0 0 8px; }
.jr-hero h1 { font-size: clamp(26px, 4.4vw, 42px); line-height: 1.35; margin: 0 0 12px; font-weight: 700; }
.jr-hero h1 span { color: var(--wheat-lit); }
.jr-lead { max-width: 720px; font-size: 17.5px; color: rgba(255,255,255,.88); margin: 0 0 20px; }
.jr-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.jr-cta.center { justify-content: center; margin-top: 18px; }
.jr-btn { display: inline-block; padding: 10px 22px; border-radius: 999px; background: var(--wheat); color: var(--field-deep); font-weight: 600; text-decoration: none; border: 1px solid var(--wheat); }
.jr-btn:hover { background: var(--wheat-lit); }
.jr-btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.jr-why-us .jr-btn.ghost { color: var(--field); }
.jr-facts { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.jr-facts li { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius); padding: 10px 12px; }
.jr-facts b { display: block; font-size: 26px; color: var(--wheat-lit); line-height: 1.2; }
.jr-facts span { font-size: 13.5px; color: rgba(255,255,255,.85); }

/* the guide's search bar stops sticking here: the progress bar holds the top */
.gbar { position: static; }
.jr-progress { position: sticky; top: 0; z-index: 20; background: rgba(252,250,245,.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.jr-progress-in { display: flex; align-items: center; gap: 14px; padding: 8px 0; }
.jr-progress-label { font-size: 14px; white-space: nowrap; }
.jr-bar { flex: 1; height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; min-width: 60px; }
.jr-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--wheat), var(--good)); transition: width .3s; }
.jr-dots { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.jr-dots a { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 12.5px; text-decoration: none; color: var(--muted); border: 1px solid var(--line); background: var(--card); }
.jr-dots a.done { background: var(--good); border-color: var(--good); color: #fff; }
.jr-dots a.here { border-color: var(--wheat); box-shadow: 0 0 0 2px var(--wheat-soft); }

.jr-body { padding: 24px 0 8px; }
.jr-card, .jr-station { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 20px 24px; margin: 0 0 20px; }
.jr-card h2 { margin: 0 0 6px; font-size: 22px; }
.jr-card > p { color: var(--muted); margin-top: 0; }
.jr-need-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.jr-need-grid h3 { margin: 6px 0; font-size: 16.5px; color: var(--field); }
.jr-ticks { padding: 0; margin: 0; list-style: none; }
.jr-ticks li { padding-inline-start: 26px; position: relative; margin: 4px 0; }
.jr-ticks li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--good); font-weight: 700; }

.jr-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.jr-table th, .jr-table td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: start; vertical-align: top; }
.jr-table thead th { background: var(--soft); font-weight: 600; }
.jr-table.small { font-size: 14px; }
.jr-scroll { overflow-x: auto; }
.jr-num { font-family: Consolas, 'Courier New', monospace; font-size: 15.5px; background: var(--wheat-soft); color: var(--field-deep); padding: 1px 7px; border-radius: 6px; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.jr-body .copy { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 0 10px; font: inherit; font-size: 13px; cursor: pointer; color: var(--field); }
.jr-body .copy:hover { border-color: var(--field); }
.jr-warn { background: var(--warn-soft); border-inline-start: 4px solid var(--wheat); padding: 10px 14px; border-radius: 8px; color: var(--ink) !important; margin: 14px 0 0; }
.jr-more { margin-top: 12px; }
.jr-more summary { cursor: pointer; color: var(--field); font-weight: 500; }

.jr-decide { border: 2px solid var(--wheat); }
.jr-q { margin: 12px 0; }
.jr-q-title { font-weight: 600; margin: 0 0 6px; }
.jr-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.jr-opt { border: 1px solid var(--line); background: var(--soft); border-radius: 10px; padding: 8px 14px; font: inherit; cursor: pointer; color: var(--ink); }
.jr-opt.on { background: var(--field); color: #fff; border-color: var(--field); }
.jr-answer { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: var(--soft); min-height: 56px; }
.jr-answer p { margin: 6px 0; }
.jr-answer a { font-weight: 600; }
.jr-tag { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 14.5px; }
.jr-tag.std, .jr-compare th.std { background: var(--field); color: #fff; }
.jr-tag.simp, .jr-compare th.simp { background: var(--wheat); color: var(--field-deep); }
.jr-compare tbody th { background: var(--soft); white-space: nowrap; width: 1%; }
.jr-compare td[colspan] { text-align: center; color: var(--muted); }

.jr-section-title { margin: 32px 0 2px; font-size: 26px; }
.jr-section-lead { color: var(--muted); margin: 0 0 16px; }
.jr-station { position: relative; scroll-margin-top: 60px; }
.jr-station.complete { border-color: var(--good); }
.jr-station > header { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 8px; }
.jr-no { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--field); color: var(--wheat-lit); font-size: 20px; font-weight: 700; }
.jr-station.complete .jr-no { background: var(--good); color: #fff; }
.jr-st-kicker { margin: 0; font-size: 13.5px; color: var(--gold-text); font-weight: 500; }
.jr-station h3 { margin: 0; font-size: 19.5px; line-height: 1.5; }
.jr-steps { padding-inline-start: 0; list-style: none; counter-reset: st; margin: 10px 0; }
.jr-steps li { counter-increment: st; position: relative; padding: 8px 12px 8px 12px; padding-inline-start: 44px; border-radius: 10px; margin: 4px 0; background: var(--bg); border: 1px solid transparent; }
.jr-steps li::before { content: counter(st); position: absolute; inset-inline-start: 12px; top: 9px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; background: var(--wheat-soft); color: var(--field-deep); }
.jr-steps li.ticked { background: var(--good-soft); border-color: rgba(31,122,77,.25); }
.jr-steps li.ticked::before { content: "✓"; background: var(--good); color: #fff; }
.jr-steps label { cursor: pointer; }
.jr-steps input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--good); vertical-align: -3px; margin-inline-end: 4px; }
.jr-tip { background: var(--soft); border-radius: 10px; padding: 10px 14px; margin: 12px 0 0; }

.jr-calc, .jr-envs { background: var(--soft); border-radius: 12px; padding: 12px 16px; margin: 12px 0; }
.jr-calc-title { margin: 0 0 8px; font-weight: 600; }
.jr-calc label { display: inline-flex; align-items: center; gap: 8px; margin-inline-end: 12px; }
.jr-calc-in { width: 120px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.jr-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card); vertical-align: middle; flex-wrap: wrap; }
.jr-seg button { border: 0; background: transparent; padding: 5px 14px; font: inherit; font-size: 14.5px; cursor: pointer; color: var(--ink); }
.jr-seg button.on { background: var(--field); color: #fff; }
.jr-calc-out { margin: 10px 0 0; }
.jr-calc-out b { font-family: Consolas, monospace; color: var(--field); }
.jr-env { margin-top: 10px; }
.jr-env p { margin: 0; }

.jr-flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.jr-flow-step { position: relative; background: var(--soft); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.jr-flow-step span { width: 28px; height: 28px; border-radius: 50%; background: var(--wheat); color: var(--field-deep); display: grid; place-items: center; font-weight: 700; }
.jr-flow-step small { color: var(--muted); font-size: 13.5px; line-height: 1.6; }

.jr-states { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.jr-states li { border-radius: 10px; padding: 8px 12px; font-size: 14.5px; border: 1px solid var(--line); }
.jr-states b { display: block; }
.st-ok { background: var(--good-soft); } .st-ok b { color: var(--good); }
.st-wait { background: var(--soft); }
.st-retry { background: var(--warn-soft); } .st-retry b { color: var(--warn); }
.st-bad { background: #FBEDEB; } .st-bad b { color: var(--crit); }

.jr-timeline { border-inline-start: 3px solid var(--wheat); margin: 12px 8px; padding-inline-start: 16px; }
.jr-timeline div { position: relative; margin: 0 0 10px; }
.jr-timeline div::before { content: ""; position: absolute; inset-inline-start: -24px; top: 8px; width: 13px; height: 13px; border-radius: 50%; background: var(--card); border: 3px solid var(--field); }
.jr-timeline b { display: block; color: var(--field); }
.jr-timeline span { color: var(--muted); }

.jr-done { margin-top: 14px; background: linear-gradient(160deg, var(--field-deep), var(--field)); color: #fff; padding: 16px 20px; border-radius: 12px; }
.jr-done b { color: var(--wheat-lit); font-size: 18px; }
.jr-done p { margin: 4px 0 0; }

.jr-qz { border-top: 1px solid var(--line); padding: 10px 0; }
.jr-qz p { margin: 0 0 8px; font-weight: 500; }
.jr-qz button { border: 1px solid var(--line); background: var(--soft); border-radius: 10px; padding: 6px 14px; font: inherit; cursor: pointer; margin: 0 0 6px 6px; color: var(--ink); }
.jr-qz button.right { background: var(--good); border-color: var(--good); color: #fff; }
.jr-qz button.wrong { background: #FBEDEB; border-color: var(--crit); color: var(--crit); }
.jr-qz .jr-why { font-weight: 300; color: var(--muted); }
.jr-score { font-weight: 600; color: var(--field); }

.jr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.jr-grid div { background: var(--soft); border-radius: 12px; padding: 12px 14px; }
.jr-grid b { color: var(--crit); }
.jr-grid p { margin: 6px 0 0; font-size: 15px; }
.jr-terms { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.jr-terms dt { font-weight: 600; color: var(--field); direction: ltr; text-align: end; }
.jr-terms dd { margin: 0; }
.jr-links { columns: 2; padding-inline-start: 20px; }

@media (max-width: 760px) {
  .jr-facts { grid-template-columns: 1fr 1fr; }
  .jr-need-grid, .jr-flow, .jr-grid { grid-template-columns: 1fr; }
  .jr-dots { display: none; }
  .jr-card, .jr-station { padding: 16px; }
  .jr-terms { grid-template-columns: 1fr; } .jr-terms dt { text-align: start; }
  .jr-links { columns: 1; }
  .jr-compare thead { display: none; }
  .jr-compare tr { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
  .jr-compare tbody th { grid-column: 1 / -1; width: auto; white-space: normal; border: 0; }
  .jr-compare td { border: 0; font-size: 14.5px; }
  .jr-compare td[colspan] { grid-column: 1 / -1; }
  .jr-compare td:nth-of-type(1):not([colspan])::before { content: "ضريبية (B2B)"; }
  .jr-compare td:nth-of-type(2)::before { content: "مبسطة (B2C)"; }
  .jr-compare td::before { display: block; font-size: 12.5px; font-weight: 600; color: var(--gold-text); }
  .jr-testdata .jr-table td:last-child, .jr-testdata .jr-table th:last-child { display: none; }
}
@media print { .jr-progress, .jr-cta, .jr-quiz { display: none; } .jr-hero { color: #000; background: none; } }

/* the journey's video (zatca: the YouTube walkthrough): a picture until the visitor presses play, then youtube-nocookie */
.jr-video { width: min(1120px, 92vw); margin: 28px auto 6px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 28px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.jr-video h2 { font-size: clamp(20px, 2.4vw, 26px); line-height: 1.5; margin: 0 0 10px; }
.jr-video p { margin: 0 0 10px; color: var(--muted); }
.jr-video .jr-video-links { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-top: 14px; }
.jr-player { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--field-deep); }
.jr-player img, .jr-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.jr-play { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.jr-play span { width: 68px; height: 68px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: transform .15s ease; }
.jr-play span::after { content: ""; margin-inline-end: -6px; border-style: solid; border-width: 13px 0 13px 21px; border-color: transparent transparent transparent #c8102e; }
.jr-play:hover span, .jr-play:focus-visible span { transform: scale(1.08); }
.jr-play:focus-visible { outline: 3px solid var(--wheat-lit); outline-offset: -3px; }
.jr-play em { position: absolute; bottom: 12px; inset-inline: 0; text-align: center; font-style: normal; font-size: 13px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
@media (max-width: 820px) { .jr-video { grid-template-columns: 1fr; gap: 16px; padding: 16px; } .jr-player { order: -1; } }
@media print { .jr-video { display: none; } }
