/* Shared journey components, loaded on every page after theme.css (and before workspace.css on roadmap pages).
   The alias tokens below only matter on the portfolio pages; roadmap pages define the real values in workspace.css. */
:root { --text: var(--ink); --text-muted: var(--muted); --border: var(--line); --bg: var(--paper); }

/* Level card art: isometric SVG coloured from the card's --lv accent, plus real technology logos on light chips. Never mirrored. */
.lv-art { display: block; width: 100%; justify-self: end;
  --f-t: color-mix(in srgb, var(--lv) 12%, #fff); --f-r: color-mix(in srgb, var(--lv) 24%, #fff); --f-l: color-mix(in srgb, var(--lv) 36%, #fff);
  --d-t: #F1F5F9; --d-r: #E2E8F0; --d-l: #CBD5E1;
  --h-t: color-mix(in srgb, var(--lv) 70%, #fff); --h-r: color-mix(in srgb, var(--lv) 82%, #fff); --h-l: color-mix(in srgb, var(--lv) 92%, #000);
  --edge: color-mix(in srgb, var(--lv) 55%, transparent); --chip-bg: #fff; --chip-ring: var(--border); }
html[data-theme="dark"] .lv-art { --f-t: color-mix(in srgb, var(--lv) 52%, #232A38); --f-r: color-mix(in srgb, var(--lv) 38%, #232A38); --f-l: color-mix(in srgb, var(--lv) 26%, #232A38);
  --d-t: #3D475B; --d-r: #2E3748; --d-l: #232B3A;
  --h-t: color-mix(in srgb, var(--lv) 88%, #fff); --h-r: color-mix(in srgb, var(--lv) 72%, #1E232D); --h-l: color-mix(in srgb, var(--lv) 56%, #1E232D);
  --edge: color-mix(in srgb, var(--lv) 62%, transparent); --chip-bg: #EEF2F8; --chip-ring: rgba(255, 255, 255, .4); }
.lv-stage { position: relative; display: block; width: 100%; aspect-ratio: 196 / 176; transition: transform .3s ease; }
.lv-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lv-art :is(.f-t, .f-r, .f-l) { stroke: var(--edge); stroke-width: .7; stroke-linejoin: round; }
.lv-art .f-t { fill: var(--f-t); } .lv-art .f-r { fill: var(--f-r); } .lv-art .f-l { fill: var(--f-l); }
.lv-art .dim.f-t { fill: var(--d-t); } .lv-art .dim.f-r { fill: var(--d-r); } .lv-art .dim.f-l { fill: var(--d-l); }
.lv-art .hi.f-t { fill: var(--h-t); } .lv-art .hi.f-r { fill: var(--h-r); } .lv-art .hi.f-l { fill: var(--h-l); }
.lv-art .grid { fill: none; stroke: color-mix(in srgb, var(--text) 12%, transparent); stroke-width: .6; }
.lv-art .edge { fill: none; stroke: var(--edge); stroke-width: .8; }
.lv-art .scr { fill: var(--surface); stroke: var(--lv); stroke-width: 1; }
.lv-art .ln-acc { fill: var(--lv); } .lv-art .ln-dim { fill: color-mix(in srgb, var(--lv) 38%, transparent); } .lv-art .bar { fill: color-mix(in srgb, var(--lv) 75%, transparent); }
.lv-art .ln-st { fill: none; stroke: var(--lv); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lv-art .lnk { fill: none; stroke: var(--lv); stroke-width: 1.4; stroke-dasharray: 3 3; opacity: .85; } .lv-art .dot { fill: var(--lv); }
.lv-art .ring-bg { fill: none; stroke: color-mix(in srgb, var(--lv) 25%, transparent); stroke-width: 5; }
.lv-art .ring-fg { fill: none; stroke: var(--lv); stroke-width: 5; stroke-linecap: round; }
.lv-art :is(.ring-ground, .halo) { fill: none; stroke: color-mix(in srgb, var(--lv) 55%, transparent); stroke-width: 1.2; stroke-dasharray: 4 4; }
.lv-art .bound { fill: color-mix(in srgb, var(--lv) 6%, transparent); stroke: var(--lv); stroke-width: 1.2; stroke-dasharray: 5 4; stroke-linejoin: round; }
.lv-art .cloud { fill: color-mix(in srgb, var(--lv) 14%, transparent); stroke: var(--lv); stroke-width: 1.4; stroke-linejoin: round; }
.chip { position: absolute; width: 19%; height: auto; aspect-ratio: 1; padding: 4.2%; box-sizing: border-box; object-fit: contain; border-radius: 24%; background: var(--chip-bg);
  box-shadow: 0 6px 14px -4px rgba(0, 0, 0, .4), 0 0 0 1px var(--chip-ring); }
.chip-lg { width: 26%; padding: 5%; }

/* Footer: site links above the profile links, on every page. */
.footer-nav-group { display: grid; gap: 10px; justify-items: end; }
.footer-primary a { font-weight: 600; }

/* Home: start your journey (two entry points; experienced developers open a native <details>). */
.entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.entry-card { display: flex; flex-direction: column; gap: 12px; padding: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--card-shadow, none); }
.entry-primary { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.entry-tag { align-self: flex-start; padding: 2px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: 600 12px var(--font); }
.entry-card h3 { margin: 0; font: 700 22px/1.3 var(--display); }
.entry-card p { margin: 0; color: var(--muted); }
.entry-who { font-size: 14px; }
.entry-card > .button { align-self: flex-start; margin-top: 6px; }
.entry-levels { margin-top: 6px; }
.entry-levels summary { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 20px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); font-weight: 600; cursor: pointer; list-style: none; }
.entry-levels summary::-webkit-details-marker { display: none; }
.entry-levels summary::after { content: ''; width: 8px; height: 8px; border-inline-end: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s ease; }
.entry-levels[open] summary::after { transform: rotate(225deg); }
.entry-levels ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.entry-levels li a { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--border); border-radius: calc(var(--radius) - 4px); background: var(--bg); color: var(--text); text-decoration: none; }
.entry-levels li a:hover { border-color: var(--accent); }
.entry-level { color: var(--accent); font: 600 12px var(--font); }
.entry-levels li a span:last-child { color: var(--muted); font-size: 13px; line-height: 1.6; }

/* Home: the learning journey (six stages, each with its level's illustration). */
.stage-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.stage a { position: relative; display: grid; align-content: start; gap: 8px; height: 100%; padding: 18px 18px 22px; color: var(--text); text-decoration: none;
  background: radial-gradient(120% 90% at 50% 0, color-mix(in srgb, var(--lv) 13%, transparent), transparent 65%), var(--surface);
  border: 1px solid color-mix(in srgb, var(--lv) 24%, var(--border)); border-radius: var(--radius); transition: transform .2s ease, border-color .2s ease; }
.stage a:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--lv) 65%, var(--border)); }
.stage .lv-art { width: 60%; justify-self: center; margin-bottom: 4px; }
.stage-no { position: absolute; inset-block-start: 14px; inset-inline-start: 16px; color: var(--muted); font: 600 12px var(--font); }
.stage h3 { margin: 0; font: 700 19px/1.35 var(--display); }
.stage-levels { color: color-mix(in srgb, var(--lv) 60%, var(--text)); font: 600 12px var(--font); }
.stage p { margin: 0; color: var(--muted); font-size: 14px; }
.journey-note { margin: 22px 0 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: calc(var(--radius) - 2px); background: var(--surface); color: var(--muted); font-size: 14px; }

/* Home: real capstone projects. */
.build-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.build-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-inline-start: 4px solid var(--lv); border-radius: var(--radius); }
.build-level { color: color-mix(in srgb, var(--lv) 55%, var(--text)); font: 600 12px var(--font); }
.build-card h3 { margin: 0; font: 700 20px/1.35 var(--display); }
.build-card p { margin: 0; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.build-card .text-link { align-self: flex-start; margin-top: auto; padding-top: 6px; }
.build-all { display: inline-flex; margin-top: 18px; }

.about-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 28px; }
.final-cta { display: grid; justify-items: center; gap: 14px; margin-top: 72px; padding: 44px 28px; text-align: center; border: 1px solid var(--border); border-radius: var(--radius);
  background: radial-gradient(90% 120% at 50% 0, var(--accent-soft), transparent 70%), var(--surface); }
.final-cta h2 { margin: 0; font: 700 clamp(28px, 4vw, 40px)/1.2 var(--display); }
.final-cta p { margin: 0; max-width: 560px; color: var(--muted); }

@media (max-width: 1000px) { .stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .entry-grid, .stage-grid, .build-grid { grid-template-columns: minmax(0, 1fr); } .final-cta { margin-top: 48px; padding: 32px 20px; } }

/* Technology chips around the home hero photo. */
.portrait-frame { position: relative; --chip-bg: #fff; --chip-ring: var(--border); }
html[data-theme="dark"] .portrait-frame { --chip-bg: #EEF2F8; --chip-ring: rgba(255, 255, 255, .4); }
.portrait-frame .chip { width: 14%; padding: 3%; }
.portrait-frame .chip-lg { width: 17%; padding: 3.6%; }

/* Roadmap landing: the eight levels as one connected path, and the contextual pace planner. */
.journey-rail { list-style: none; margin: 28px 0 24px; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; position: relative; }
.journey-rail::before { content: ''; position: absolute; inset-inline: 6%; top: 17px; height: 2px; background: var(--border-strong, var(--border)); }
.journey-rail a { position: relative; display: grid; justify-items: center; gap: 8px; color: var(--text); text-align: center; text-decoration: none; font-size: 13px; font-weight: 600; line-height: 1.35; }
.rail-dot { z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border: 2px solid var(--lv); border-radius: 50%; background: var(--surface); color: var(--text); font: 700 14px var(--font); transition: background .2s ease, color .2s ease; }
.journey-rail a:hover .rail-dot { background: var(--lv); color: #fff; }
.planner { display: grid; gap: 18px; margin-top: 24px; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg, 12px); }
.pl-control { display: grid; gap: 10px; max-width: 420px; font-weight: 600; }
.pl-control input[type="range"] { width: 100%; min-height: 32px; accent-color: var(--accent); }
.pl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.pl-list li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) auto; gap: 12px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--border); }
.pl-level { font-weight: 600; }
.pl-hours { color: var(--text-muted); font-size: 14px; }
.pl-hours small { display: block; font-size: 12px; }
.pl-weeks { color: var(--accent-text, var(--accent)); white-space: nowrap; }
.pl-note { margin: 0; color: var(--text-muted); font-size: 13px; }
@media (max-width: 700px) {
  .journey-rail { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 18px; }
  .journey-rail::before { display: none; }
  .pl-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .pl-hours { grid-column: 1 / -1; order: 3; }
}

/* Resources: the featured roadmap card carries the same level illustration as the roadmap. */
.featured-resource { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 240px); gap: 24px; align-items: center; }
.featured-resource .lv-art { width: 100%; }
@media (max-width: 700px) { .featured-resource { grid-template-columns: minmax(0, 1fr); } .featured-resource .lv-art { order: -1; max-width: 220px; justify-self: center; } }

/* Header controls shared by every page: search icon, language dropdown, theme pill. */
.icon-link { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--text); }
.icon-link:hover { background: var(--accent-soft); text-decoration: none; }
.icon-link svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.lang-menu { position: relative; }
.lang-menu summary { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: 600 13px var(--font); cursor: pointer; list-style: none; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary svg { transition: transform .2s ease; }
.lang-menu[open] summary svg { transform: rotate(180deg); }
.lang-pop { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 80; display: grid; min-width: 150px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow, 0 14px 34px rgba(15, 23, 42, .18)); }
.lang-pop a, .lang-pop span { padding: 9px 12px; border-radius: 8px; color: var(--text); font-size: 14px; text-decoration: none; }
.lang-pop a:hover { background: var(--accent-soft); }
.lang-pop [aria-current] { color: var(--accent); font-weight: 700; }
.theme-toggle { border-radius: 10px; border-color: transparent; background: var(--accent-soft); color: var(--accent); }
.header-actions { align-items: center; }

/* Brand mark: the blue "A" glyph, drawn once and cached. */
:root { --mark-a: #245BEB; --mark-b: #5BA8FF; }
html[data-theme="dark"] { --mark-a: #FFFFFF; --mark-b: #A8CCFF; }
.ameen-mark { display: block; width: auto; height: 28px; flex: none; }
.brand .brand-name, .app-brand .brand-name { font-weight: 700; letter-spacing: -.01em; }

/* ===== Design reference pass: gradients, hero, feature strip, entry cards ===== */
:root { --card-grad: linear-gradient(180deg, #ffffff 0%, #f4f7ff 100%); --hero-grad: linear-gradient(180deg, #edf2ff 0%, #f6f8ff 55%, var(--bg, #fff) 100%); }
html[data-theme="dark"] { --card-grad: linear-gradient(180deg, #171B23 0%, #1C222D 100%); --hero-grad: linear-gradient(180deg, #151b28 0%, #11161f 60%, var(--bg, #0F1218) 100%); }
body { overflow-x: clip; }
.button, .btn { border-radius: 8px; }
.button-quiet { background: var(--surface); }

.new-hero { position: relative; isolation: isolate; padding: 40px 0 0; }
.new-hero::before { content: ''; position: absolute; z-index: -1; inset: 0 calc(50% - 50vw); background: var(--hero-grad); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 24px; align-items: center; padding: 0; }
.hero-copy { padding-bottom: 36px; }
.hero-eyebrow { margin: 0 0 18px; color: var(--accent); font: 700 13px/1.4 var(--font); letter-spacing: .06em; text-transform: uppercase; }
html[dir="rtl"] .hero-eyebrow { letter-spacing: 0; text-transform: none; font-size: 14px; }
.new-hero h1 { margin: 0; max-width: none; font: 800 clamp(42px, 5vw, 68px)/1.1 var(--display); letter-spacing: -.03em; }
html[dir="rtl"] .new-hero h1 { font-weight: 800; line-height: 1.35; letter-spacing: 0; }
.new-hero h1 em { font-style: normal; color: inherit; }
.new-hero .hero-description { max-width: 520px; margin: 20px 0 0; color: var(--muted); font-size: 18px; line-height: 1.7; }
.new-hero .hero-actions { margin-top: 28px; }
.feature-row { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; }
.feature-row li { display: grid; justify-items: center; gap: 2px; padding: 0 22px; text-align: center; }
.feature-row li:first-child { padding-inline-start: 0; }
.feature-row li + li { border-inline-start: 1px solid var(--line); }
.fr-icon { margin-bottom: 6px; color: var(--accent); }
.feature-row strong { font-size: 14px; line-height: 1.4; }
.feature-row li > span:last-child { color: var(--muted); font-size: 13px; line-height: 1.5; }

.portrait-card { width: 100%; max-width: 680px; justify-self: end; }
.portrait-frame { position: relative; aspect-ratio: 1440 / 1024; overflow: visible; }
.portrait-frame::before { content: ''; position: absolute; z-index: 0; inset: -8% -3% 0 -1%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23D9E5FF'/%3E%3Cstop offset='1' stop-color='%23EEF3FF'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23g)' d='M60 260C20 170 80 52 205 36c96-12 178 30 184 122 6 84-44 166-132 196-86 29-160-26-197-94Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
html[data-theme="dark"] .portrait-frame::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23222E4D'/%3E%3Cstop offset='1' stop-color='%23161D2E'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23g)' d='M60 260C20 170 80 52 205 36c96-12 178 30 184 122 6 84-44 166-132 196-86 29-160-26-197-94Z'/%3E%3C/svg%3E"); }
.portrait-frame picture { position: relative; z-index: 1; }
.tech-card { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; background: #fff; border-radius: 14px; box-shadow: 0 12px 26px -10px rgba(30, 55, 130, .3), 0 0 0 1px rgba(30, 55, 130, .06); font: 700 14px/1 var(--font); white-space: nowrap; }
html[data-theme="dark"] .tech-card { background: #EEF2F8; }
.tech-card img { width: 26px; height: 26px; }
.code-chip { position: absolute; z-index: 2; left: 4%; top: 24%; display: grid; place-items: center; width: 48px; height: 40px; border-radius: 10px; background: var(--accent); color: #fff; box-shadow: 0 12px 22px -8px rgba(36, 87, 240, .55); }
.portrait-card figcaption { padding-top: 12px; }

#start .section-heading { display: block; margin-bottom: 22px; }
#start .section-heading p { max-width: none; margin: 6px 0 0; color: var(--muted); }
.entry-grid { align-items: stretch; }
.entry-grid:has(> .entry-exp[open]) { align-items: start; }
.entry-card { display: block; padding: 0; gap: 0; background: var(--card-grad); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--card-shadow, none); color: var(--text); text-decoration: none; transition: transform .2s ease, border-color .2s ease; }
.entry-card:hover { border-color: var(--accent); text-decoration: none; }
.entry-link, .entry-exp > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 22px 24px; list-style: none; cursor: pointer; }
.entry-exp > summary::-webkit-details-marker { display: none; }
.entry-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; }
.entry-green { background: #def2e5; color: #2d9a55; }
.entry-blue { background: #e3eaff; color: var(--accent); }
html[data-theme="dark"] .entry-green { background: rgba(63, 160, 100, .2); color: #62d392; }
html[data-theme="dark"] .entry-blue { background: var(--accent-soft); }
.entry-text { display: grid; gap: 4px; }
.entry-text strong { font: 700 20px/1.3 var(--display); }
.entry-text span { color: var(--muted); font-size: 15px; line-height: 1.6; }
.entry-arrow { color: var(--text); flex: none; transition: transform .2s ease; }
html[dir="rtl"] .entry-link .entry-arrow { transform: scaleX(-1); }
.entry-exp[open] .entry-chevron { transform: rotate(90deg); }
html[dir="rtl"] .entry-chevron { transform: scaleX(-1); }
html[dir="rtl"] .entry-exp[open] .entry-chevron { transform: scaleX(-1) rotate(90deg); }
ul.entry-levels { margin: 0; padding: 0 24px 22px; display: grid; gap: 8px; list-style: none; }
.build-card, .planner { background: var(--card-grad); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .portrait-card { justify-self: center; max-width: 560px; }
  .hero-copy { padding-bottom: 8px; }
}
@media (max-width: 700px) {
  .entry-grid { grid-template-columns: minmax(0, 1fr); }
  .entry-link, .entry-exp > summary { padding: 16px; gap: 14px; }
  .entry-icon { width: 52px; height: 52px; }
  .tech-card { padding: 6px 9px; font-size: 12px; gap: 6px; border-radius: 10px; }
  .tech-card img { width: 18px; height: 18px; }
  .code-chip { width: 38px; height: 32px; }
  .feature-row li { padding: 0 12px; }
  .feature-row strong { font-size: 13px; }
  .feature-row li > span:last-child { font-size: 12px; }
}

/* Photo larger and slightly past the column, as in the reference; strip text stays on one line. */
.hero-grid { grid-template-columns: minmax(0, .92fr) minmax(0, 1.12fr); }
.portrait-card { max-width: 780px; margin-inline-end: -3%; }
.feature-row strong { white-space: nowrap; }
@media (max-width: 1100px) { .feature-row li { padding: 0 14px; } .feature-row strong { font-size: 13px; } .feature-row li > span:last-child { font-size: 12px; } }
@media (max-width: 900px) { .portrait-card { margin-inline-end: 0; } }

/* Single column on small screens (must follow the larger-photo rule above). */
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }

/* ===== Branching journey: specialization cards, fork connector, path navigation (all pages) ===== */
.jb { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; padding: 18px; background: var(--card-grad); border: 1px solid color-mix(in srgb, var(--lv) 30%, var(--border)); border-inline-start: 4px solid var(--lv); border-radius: 14px; color: var(--text); text-decoration: none; transition: transform .2s ease, border-color .2s ease; }
.jb:hover { transform: translateY(-3px); border-color: var(--lv); text-decoration: none; }
.jb-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: color-mix(in srgb, var(--lv) 14%, transparent); color: var(--lv); }
.jb-body { display: grid; gap: 4px; min-width: 0; }
.jb-tag { color: color-mix(in srgb, var(--lv) 60%, var(--text)); font: 700 11px/1.4 var(--font); letter-spacing: .06em; text-transform: uppercase; }
html[dir="rtl"] .jb-tag { letter-spacing: 0; text-transform: none; font-size: 12px; }
.jb strong { font: 700 18px/1.3 var(--display); }
.jb .jc-text { display: block; color: var(--text-muted); font-size: 13.5px; line-height: 1.55; }
.jb .jc-pill { justify-self: start; margin-top: 6px; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text, var(--accent)); font: 600 12px var(--font); }
.branch-heading { display: flex; align-items: center; gap: 8px; margin: 0; font: 700 1.05rem/1.3 var(--display); }
.fork-v { display: block; position: relative; height: 40px; }
.fork-v::before { content: ''; position: absolute; inset-inline-start: 50%; top: 0; height: 50%; width: 3px; margin-inline-start: -1.5px; background: var(--accent-line, var(--border)); }
.fork-v::after { content: ''; position: absolute; inset-inline: 25%; top: 50%; bottom: 0; border: 3px solid var(--accent-line, var(--border)); border-bottom: 0; border-radius: 12px 12px 0 0; }
.home-fork { margin-top: 10px; }
.home-branches > h3 { display: flex; align-items: center; gap: 10px; margin: 0; font: 700 1.25rem/1.3 var(--display); }
.home-branches > h3 svg { color: var(--accent); }
.home-branches > p { margin: 6px 0 18px; color: var(--muted); }
.journey-branches.home-branch-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.path-nav { margin-top: 36px; padding: 22px; background: var(--card-grad); border: 1px solid var(--border); border-radius: 14px; }
.path-nav h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font: 700 1.2rem/1.3 var(--display); }
.path-nav h2 svg { color: var(--accent-text, var(--accent)); }
.path-nav > p { margin: 0 0 16px; color: var(--text-muted); }
.path-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.path-nav-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
nav.path-nav { padding: 0; background: none; border: 0; }
.pn-link { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); text-decoration: none; }
.pn-link:hover { border-color: var(--accent); text-decoration: none; }
.pn-link small { color: var(--text-muted); font-size: 12px; }
@media (max-width: 760px) {
  .journey-branches.home-branch-cards, .path-choices, .path-nav-row { grid-template-columns: minmax(0, 1fr); }
  .fork-v::after { display: none; }
}

/* Narrow phones: three equal columns that may wrap, so long English labels never widen the page */
@media (max-width: 560px) {
  .feature-row { grid-template-columns: repeat(3, minmax(0, 1fr)); justify-content: stretch; }
  .feature-row li { min-width: 0; padding: 0 8px; }
  .feature-row strong { white-space: normal; overflow-wrap: anywhere; }
}

@media (max-width: 360px) {
  .header-actions { gap: 6px; }
}

@media (max-width: 360px) {
  .header-inner { gap: 8px; }
  .header-actions { gap: 5px; }
  .brand-name { font-size: 14px; }
}
