/* =========================================================
   Histamine in Biology & Geology - د/ أحمد دغيش
   Night-lab navy, glowing cyan, leaf green (from landing / login / register / logo).
   Loaded after index-mk.css on the landing, login, register, privacy and terms pages.
   ========================================================= */
:root {
    --hs-night: #040d24;
    --hs-navy: #08193f;
    --hs-navy-2: #0d2559;
    --hs-cyan: #22c3ee;
    --hs-cyan-2: #0891d1;
    --hs-ice: #9be7ff;
    --hs-leaf: #36d399;
    --hs-violet: #a78bfa;
    --hs-rose: #fb7185;
    --hs-ink: #0b1b3a;
    --hs-muted: #5b6b86;
    --hs-paper: #f2f8fd;
    --hs-ease: cubic-bezier(0.16, 1, 0.3, 1);

    /* the shared navbar / buttons of index-mk.css take the new colours */
    --mk-night: #040d24;
    --mk-navy: #08193f;
    --mk-navy-soft: #0d2559;
    --mk-teal: #22c3ee;
    --mk-teal-soft: #9be7ff;
    --mk-sky: #0891d1;
    --mk-amber: #36d399;
    --mk-orange: #22c3ee;
    --mk-red: #fb7185;
    --mk-cream: #f2f8fd;
    --mk-ink: #0b1b3a;
    --mk-muted: #5b6b86;
}

.mk-home { background: var(--hs-paper); color: var(--hs-ink); }

.mk-nav {
    background: rgba(4, 13, 36, 0.82) !important;
    border-bottom: 1px solid rgba(34, 195, 238, 0.22) !important;
}
.mk-nav .mk-logo { height: 46px; }

/* ---------- Hero ---------- */
.hs-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #e8f6ff;
    padding: 138px 0 0;
    background:
        radial-gradient(900px 520px at 85% 10%, rgba(34, 195, 238, 0.22), transparent 60%),
        radial-gradient(700px 520px at 5% 90%, rgba(54, 211, 153, 0.14), transparent 60%),
        linear-gradient(180deg, var(--hs-night) 0%, var(--hs-navy) 60%, var(--hs-navy-2) 100%);
}

.hs-hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hs-hero-bg::before {                       /* honeycomb of a molecule */
    content: "";
    position: absolute; inset: 0;
    opacity: .16;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='98' viewBox='0 0 56 98'%3E%3Cpath d='M28 66L0 50V16L28 0l28 16v34L28 66zm0 32L0 82V66l28 16 28-16v16L28 98z' fill='none' stroke='%239be7ff' stroke-width='1'/%3E%3C/svg%3E");
    -webkit-mask-image: radial-gradient(70% 70% at 70% 40%, #000, transparent 75%);
    mask-image: radial-gradient(70% 70% at 70% 40%, #000, transparent 75%);
}
.hs-orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: hsFloat 14s ease-in-out infinite; }
.hs-orb-1 { width: 360px; height: 360px; background: #0891d1; top: -80px; left: 8%; }
.hs-orb-2 { width: 300px; height: 300px; background: #13b981; bottom: -60px; right: 30%; opacity: .32; animation-delay: -6s; }
.hs-cell {                                   /* floating cells */
    position: absolute; border-radius: 50%;
    border: 1px solid rgba(155, 231, 255, 0.4);
    background: radial-gradient(circle at 35% 35%, rgba(155, 231, 255, 0.35), rgba(34, 195, 238, 0.06) 55%, transparent 70%);
    box-shadow: inset 0 0 18px rgba(34, 195, 238, 0.25);
    animation: hsDrift 18s ease-in-out infinite;
}
.hs-cell::after { content: ""; position: absolute; inset: 34%; border-radius: 50%; background: rgba(54, 211, 153, 0.55); filter: blur(1px); }
.hs-cell-1 { width: 70px; height: 70px; top: 22%; left: 4%; }
.hs-cell-2 { width: 42px; height: 42px; top: 70%; left: 44%; animation-delay: -5s; }
.hs-cell-3 { width: 26px; height: 26px; top: 16%; left: 48%; animation-delay: -11s; }

.hs-helix { position: absolute; top: -40px; left: 1.5%; width: 90px; height: calc(100% + 80px); opacity: .5; }
.hs-helix path { fill: none; stroke-width: 3; stroke-linecap: round; }
.hs-helix-a { stroke: var(--hs-cyan); filter: drop-shadow(0 0 6px rgba(34, 195, 238, .8)); }
.hs-helix-b { stroke: var(--hs-leaf); filter: drop-shadow(0 0 6px rgba(54, 211, 153, .7)); }
.hs-helix-rungs line { stroke: rgba(155, 231, 255, .55); stroke-width: 2; stroke-linecap: round; }

@keyframes hsFloat { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, 24px); } }
@keyframes hsDrift { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(18px, -26px) scale(1.06); } 66% { transform: translate(-14px, 14px) scale(.96); } }

.hs-hero-in {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 3rem;
    align-items: center;
    padding-bottom: 5.5rem;
}

.hs-in { opacity: 0; animation: hsUp .9s var(--hs-ease) forwards; animation-delay: calc(.2s + var(--d, 0s)); }
@keyframes hsUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

.hs-badge {
    display: inline-flex; align-items: center; gap: .55rem;
    padding: .45rem 1rem .45rem .8rem;
    border-radius: 999px;
    background: rgba(34, 195, 238, 0.1);
    border: 1px solid rgba(155, 231, 255, 0.35);
    color: var(--hs-ice);
    font-size: .85rem; letter-spacing: .04em;
    direction: ltr;
}
.hs-badge i { color: var(--hs-leaf); }
.hs-badge b { letter-spacing: .18em; color: #fff; }
.hs-badge span { font-style: italic; opacity: .85; }

.hs-title { margin: 1.9rem 0 .4rem; line-height: 1.02; font-size: clamp(3rem, 7vw, 5.6rem); display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .9rem; }
.hs-title-prefix { font-size: .38em; color: var(--hs-leaf); align-self: flex-start; margin-top: .35em; }
.hs-title-first { color: #fff; text-shadow: 0 6px 30px rgba(34, 195, 238, .35); }
.hs-title-last {
    background: linear-gradient(100deg, var(--hs-ice) 0%, var(--hs-cyan) 45%, var(--hs-leaf) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 6px 24px rgba(34, 195, 238, .45));
}

.hs-role { font-size: 1.15rem; font-weight: 700; color: #cfefff; margin: 0 0 1rem; }
.hs-role i { color: var(--hs-cyan); margin-inline-end: .35rem; }
.hs-role span { color: var(--hs-leaf); margin: 0 .35rem; }

.hs-lead { font-size: 1.08rem; line-height: 2; color: rgba(222, 240, 255, .82); max-width: 34rem; margin: 0 0 1.8rem; }

.hs-cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.hs-btn {
    display: inline-flex; align-items: center; gap: .55rem;
    padding: .9rem 1.6rem; border-radius: 14px;
    font-weight: 800; font-size: 1.02rem; text-decoration: none;
    transition: transform .35s var(--hs-ease), box-shadow .35s ease, background .35s ease;
}
.hs-btn-primary {
    color: #04182f;
    background: linear-gradient(135deg, var(--hs-ice), var(--hs-cyan) 50%, var(--hs-leaf));
    box-shadow: 0 14px 34px rgba(34, 195, 238, .38), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.hs-btn-primary:hover { transform: translateY(-3px); color: #04182f; box-shadow: 0 20px 44px rgba(34, 195, 238, .5); }
.hs-btn-ghost { color: #e8f6ff; border: 1px solid rgba(155, 231, 255, .4); background: rgba(255, 255, 255, .04); }
.hs-btn-ghost:hover { color: #fff; transform: translateY(-3px); background: rgba(34, 195, 238, .14); }

.hs-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 0; margin: 2.1rem 0 0; padding: 1.1rem 0 0; border-top: 1px solid rgba(155, 231, 255, .16); }
.hs-stats li { display: flex; align-items: baseline; gap: .45rem; padding-inline: 1.1rem; border-inline-start: 1px solid rgba(155, 231, 255, .16); color: rgba(222, 240, 255, .8); font-weight: 700; font-size: .95rem; }
.hs-stats li:first-child { padding-inline-start: 0; border: 0; }
.hs-stats b { font-size: 1.6rem; line-height: 1; color: #fff; font-family: "Segoe UI", Tahoma, sans-serif; }
.hs-stats b i { font-size: 1.1rem; color: var(--hs-leaf); }

/* the poster */
.hs-poster { position: relative; margin: 0; }
.hs-poster-frame {
    position: relative; border-radius: 26px; overflow: hidden;
    border: 1px solid rgba(155, 231, 255, .45);
    box-shadow: 0 0 0 6px rgba(34, 195, 238, .08), 0 30px 80px rgba(0, 0, 0, .55), 0 0 60px rgba(34, 195, 238, .25);
    transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
    transition: transform .8s var(--hs-ease);
}
.hs-poster:hover .hs-poster-frame { transform: perspective(1400px) rotateY(0) rotateX(0); }
.hs-poster-frame img { display: block; width: 100%; height: auto; }
.hs-poster-frame::after {                    /* glass sheen */
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(115deg, rgba(255, 255, 255, .16) 0%, transparent 32%, transparent 70%, rgba(34, 195, 238, .12) 100%);
}
.hs-poster-ring {
    position: absolute; inset: -18px -18px auto auto; width: 140px; height: 140px; border-radius: 50%;
    border: 2px dashed rgba(54, 211, 153, .55); animation: hsSpin 26s linear infinite; z-index: -1;
}
@keyframes hsSpin { to { transform: rotate(360deg); } }

.hs-float {
    position: absolute; display: flex; align-items: center; gap: .7rem;
    padding: .7rem 1rem; border-radius: 16px;
    background: rgba(8, 25, 63, .78); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border: 1px solid rgba(155, 231, 255, .35); color: #e8f6ff;
    box-shadow: 0 16px 34px rgba(0, 0, 0, .4);
    animation: hsBob 6s ease-in-out infinite;
}
.hs-float i { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 1rem; color: #04182f; background: linear-gradient(135deg, var(--hs-ice), var(--hs-cyan)); }
.hs-float span { display: flex; flex-direction: column; font-size: .78rem; color: rgba(222, 240, 255, .75); }
.hs-float b { font-size: .95rem; color: #fff; }
.hs-float-1 { bottom: -22px; right: 6%; }
.hs-float-2 { bottom: 16%; left: -26px; animation-delay: -3s; }   /* clear of the logo printed in the photo */
.hs-float-2 i { background: linear-gradient(135deg, #b8f5dc, var(--hs-leaf)); }
@keyframes hsBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ticker */
.hs-ticker { position: relative; border-top: 1px solid rgba(155, 231, 255, .14); background: rgba(4, 13, 36, .55); overflow: hidden; padding: .85rem 0; }
.hs-ticker-track { display: flex; width: max-content; animation: hsTick 34s linear infinite; }
.hs-ticker-track span { font-family: 'CooperArabic', inherit; font-size: 1.05rem; color: rgba(222, 240, 255, .85); padding: 0 1.6rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 1.6rem; }
.hs-ticker-track span::after { content: "✦"; color: var(--hs-leaf); font-size: .8rem; }
@keyframes hsTick { to { transform: translateX(50%); } }

/* ---------- Steps ---------- */
.hs-steps { position: relative; z-index: 2; margin-top: -1px; padding: 3rem 0 1rem; }
.hs-steps-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.hs-step {
    display: flex; gap: 1rem; align-items: flex-start;
    padding: 1.5rem; border-radius: 22px; background: #fff;
    border: 1px solid #e3eef8; box-shadow: 0 18px 40px rgba(8, 25, 63, .08);
    transition: transform .4s var(--hs-ease), box-shadow .4s ease;
}
.hs-step:hover { transform: translateY(-6px); box-shadow: 0 26px 50px rgba(8, 25, 63, .14); }
.hs-step h3 { font-size: 1.12rem; font-weight: 800; margin: .1rem 0 .3rem; color: var(--hs-ink); }
.hs-step p { margin: 0; color: var(--hs-muted); line-height: 1.8; font-size: .95rem; }
.hs-step-no { font-family: "Segoe UI", Tahoma, sans-serif; font-weight: 800; font-size: .8rem; color: var(--hs-cyan-2); letter-spacing: .1em; }

.hs-hex {
    --c: var(--hs-cyan);
    flex: 0 0 56px; width: 56px; height: 62px; display: grid; place-items: center;
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    background: linear-gradient(160deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c));
    color: #fff; font-size: 1.25rem;
}
.hs-hex-leaf { --c: var(--hs-leaf); }
.hs-hex-violet { --c: var(--hs-violet); }

/* ---------- Curriculum ---------- */
.hs-section { padding: 4.5rem 0 3rem; }
.hs-head { text-align: center; max-width: 44rem; margin: 0 auto 2.6rem; }
.hs-eyebrow { display: inline-flex; gap: .45rem; align-items: center; direction: ltr; padding: .35rem .9rem; border-radius: 999px; background: #e3f6fd; color: var(--hs-cyan-2); font-weight: 700; font-size: .85rem; }
.hs-eyebrow i { color: #13b981; }
.hs-h2 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin: .8rem 0 .4rem; color: var(--hs-ink); }
.hs-h2 em { font-style: normal; background: linear-gradient(100deg, var(--hs-cyan-2), var(--hs-leaf)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hs-sub { color: var(--hs-muted); font-size: 1.05rem; margin: 0; }

.hs-units { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.hs-unit {
    --c: var(--hs-cyan);
    position: relative; overflow: hidden;
    padding: 1.6rem 1.5rem 1.4rem; border-radius: 24px; background: #fff;
    border: 1px solid #e3eef8; box-shadow: 0 14px 34px rgba(8, 25, 63, .07);
    transition: transform .45s var(--hs-ease), box-shadow .45s ease, border-color .45s ease;
}
.hs-unit::before {                           /* a cell glowing in the corner */
    content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%;
    top: -70px; inset-inline-end: -60px;
    background: radial-gradient(circle, color-mix(in srgb, var(--c) 24%, transparent), transparent 70%);
    transition: transform .6s var(--hs-ease);
}
.hs-unit:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--c) 45%, #fff); box-shadow: 0 24px 48px color-mix(in srgb, var(--c) 22%, transparent); }
.hs-unit:hover::before { transform: scale(1.25); }
.hs-unit .hs-hex { --c: inherit; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 65%, #fff), var(--c)); }
.hs-unit-top { position: relative; display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.hs-unit-no { font-size: 2.4rem; line-height: 1; color: color-mix(in srgb, var(--c) 30%, #fff); }
.hs-unit h3 { position: relative; font-size: 1.22rem; font-weight: 800; color: var(--hs-ink); margin: 0 0 .4rem; }
.hs-unit p { position: relative; color: var(--hs-muted); line-height: 1.85; font-size: .95rem; margin: 0 0 1rem; }
.hs-unit ul { position: relative; list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.hs-unit li { padding: .3rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 700; color: color-mix(in srgb, var(--c) 70%, #0b1b3a); background: color-mix(in srgb, var(--c) 12%, #fff); }

/* ---------- Numbers and rules ---------- */
.hs-lab { padding: 1rem 0 4rem; }
.hs-lab-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.3rem; align-items: start; }
.hs-facts, .hs-rules { border-radius: 26px; padding: 1.8rem; }
.hs-facts {
    color: #e8f6ff;
    background:
        radial-gradient(500px 260px at 90% 0%, rgba(34, 195, 238, .25), transparent 70%),
        linear-gradient(160deg, var(--hs-navy), var(--hs-night));
    box-shadow: 0 24px 60px rgba(8, 25, 63, .25);
}
.hs-facts h3, .hs-rules h3 { font-size: 1.5rem; margin: 0 0 1.2rem; }
.hs-facts h3 i { color: var(--hs-leaf); margin-inline-end: .4rem; }
.hs-facts dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin: 0; }
.hs-facts dl > div { padding: 1rem; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(155, 231, 255, .16); }
.hs-facts dd { margin: 0; font-family: "Segoe UI", Tahoma, sans-serif; font-weight: 800; font-size: 2rem; line-height: 1.1;
               background: linear-gradient(100deg, var(--hs-ice), var(--hs-leaf)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hs-facts dt { font-weight: 600; font-size: .85rem; color: rgba(222, 240, 255, .78); }
.hs-rules { background: #fff; border: 1px solid #e3eef8; box-shadow: 0 14px 34px rgba(8, 25, 63, .07); }
.hs-rules h3 { color: var(--hs-ink); }
.hs-rules h3 i { color: var(--hs-cyan-2); margin-inline-end: .4rem; }
.hs-rule { display: flex; flex-direction: column; gap: .2rem; padding: .85rem 1rem; border-radius: 14px; background: var(--hs-paper); border-inline-start: 4px solid var(--hs-cyan); margin-bottom: .7rem; }
.hs-rule:nth-child(odd) { border-inline-start-color: var(--hs-leaf); }
.hs-rule code { direction: ltr; text-align: right; font-size: 1rem; font-weight: 700; color: var(--hs-navy-2); background: none; padding: 0; }
.hs-rule span { color: var(--hs-muted); font-size: .9rem; }

/* ---------- Login / register (shared mk markup) ---------- */
body:not(.mk-home) { background: var(--hs-paper); }
body:not(.mk-home) .mk-nav { background: var(--hs-night) !important; }   /* solid over the light page */
.login-btn2, .register-btn2, .btn-register-submit {
    background: linear-gradient(135deg, var(--hs-cyan-2), var(--hs-cyan) 55%, var(--hs-leaf)) !important;
    border: 0 !important; color: #fff !important;
    box-shadow: 0 14px 30px rgba(8, 145, 209, .35) !important;
}
.login-image-card, .register-image-card { background: var(--hs-night) !important; }
.main-image { object-position: 30% 20%; }
/* the login poster carries its own title and logo: shown whole on the night background */
.login-side-visual .login-image-card .main-image[src*="login"] { object-fit: contain !important; object-position: center; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .hs-hero { padding-top: 112px; }
    .hs-hero-in { grid-template-columns: 1fr; gap: 2.4rem; padding-bottom: 4rem; text-align: center; }
    .hs-title { justify-content: center; }
    .hs-lead { margin-inline: auto; }
    .hs-cta, .hs-stats { justify-content: center; }
    .hs-poster-frame { transform: none; }
    .hs-helix { opacity: .25; }
    .hs-steps-grid, .hs-units { grid-template-columns: 1fr 1fr; }
    .hs-lab-grid { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
    .hs-hero-in { gap: 2rem; }
    .hs-btn { flex: 1 1 100%; justify-content: center; }
    .hs-stats li { padding-inline: .7rem; font-size: .85rem; }
    .hs-stats b { font-size: 1.3rem; }
    .hs-float-2 { left: -6px; bottom: 22%; }
    .hs-cell { display: none; }
    .hs-float { padding: .5rem .7rem; }
    .hs-float i { width: 32px; height: 32px; }
    .hs-steps-grid, .hs-units { grid-template-columns: 1fr; }
    .hs-facts dl { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .hs-in { opacity: 1; animation: none; }
    .hs-orb, .hs-cell, .hs-float, .hs-poster-ring, .hs-ticker-track { animation: none !important; }
}

/* ---------- Curriculum: the six units along a DNA strand ---------- */
.hs-curr {
    position: relative; isolation: isolate; overflow: hidden;
    padding: 5rem 0 6.5rem; margin-top: 3rem; color: #e8f6ff;
    background:
        radial-gradient(800px 420px at 15% 0%, rgba(34, 195, 238, .18), transparent 65%),
        radial-gradient(700px 420px at 90% 100%, rgba(54, 211, 153, .14), transparent 65%),
        linear-gradient(180deg, var(--hs-navy) 0%, var(--hs-night) 100%);
}
.hs-curr-bg {
    position: absolute; inset: 0; z-index: -1; opacity: .12; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='98' viewBox='0 0 56 98'%3E%3Cpath d='M28 66L0 50V16L28 0l28 16v34L28 66zm0 32L0 82V66l28 16 28-16v16L28 98z' fill='none' stroke='%239be7ff' stroke-width='1'/%3E%3C/svg%3E");
}
.hs-head-dark .hs-h2 { color: #fff; }
.hs-head-dark .hs-sub { color: rgba(222, 240, 255, .75); }
.hs-head-dark .hs-eyebrow { background: rgba(34, 195, 238, .12); color: var(--hs-ice); border: 1px solid rgba(155, 231, 255, .3); }
.hs-head-dark .hs-eyebrow i { color: var(--hs-leaf); }
.hs-head-dark .hs-h2 em { background: linear-gradient(100deg, var(--hs-ice), var(--hs-cyan) 50%, var(--hs-leaf)); -webkit-background-clip: text; background-clip: text; }
.hs-curr-stats { list-style: none; padding: 0; margin: 1.4rem 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.hs-curr-stats li { padding: .45rem 1rem; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(155, 231, 255, .22); font-weight: 700; font-size: .92rem; color: rgba(222, 240, 255, .9); }
.hs-curr-stats b { font-family: "Segoe UI", Tahoma, sans-serif; color: #fff; margin-inline-end: .2rem; }
.hs-curr-stats i { color: var(--hs-leaf); margin-inline-end: .3rem; }

/* the strand down the middle, the units on both sides of it */
.hs-path { position: relative; list-style: none; margin: 3rem auto 0; padding: 0 0 118px; max-width: 1100px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 5.5rem; row-gap: 1.6rem; }
.hs-path::before, .hs-path::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 46px; margin-left: -23px; pointer-events: none;
    background-repeat: repeat-y; background-size: 46px 180px;
}
.hs-path::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='180' viewBox='0 0 46 180'%3E%3Cpath d='M6 0C40 45 40 45 6 90S-28 135 6 180' fill='none' stroke='%2322c3ee' stroke-width='3'/%3E%3Cpath d='M40 0C6 45 6 45 40 90S74 135 40 180' fill='none' stroke='%2336d399' stroke-width='3'/%3E%3Cpath d='M13 22h20M17 45h12M13 68h20M13 112h20M17 135h12M13 158h20' stroke='%239be7ff' stroke-opacity='.55' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    filter: drop-shadow(0 0 8px rgba(34, 195, 238, .55));
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(180deg, transparent, #000 6%, #000 94%, transparent);
    animation: hsStrand 8s linear infinite;
}
@keyframes hsStrand { to { background-position: 0 180px; } }
.hs-path::after { width: 2px; margin-left: -1px; background: linear-gradient(180deg, transparent, rgba(155, 231, 255, .15), transparent); }

.hs-node { --c: var(--hs-cyan); position: relative; overflow: visible !important; }   /* the number hexagon sits outside the card, on the strand */
.hs-node:nth-child(even) { transform: translateY(118px); }   /* the two sides step down like a ladder */
.hs-node-dot {
    position: absolute; top: 26px; width: 48px; height: 54px; display: grid; place-items: center; z-index: 2;
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    background: linear-gradient(160deg, color-mix(in srgb, var(--c) 60%, #fff), var(--c));
    color: #04182f; font-size: 1.05rem;
    filter: drop-shadow(0 0 14px color-mix(in srgb, var(--c) 70%, transparent));
}
/* RTL: odd units are in the right column, so their dot sits on their left edge, on the strand */
.hs-node:nth-child(odd) .hs-node-dot { left: calc(-2.75rem - 24px); }
.hs-node:nth-child(even) .hs-node-dot { right: calc(-2.75rem - 24px); }

.hs-node-card {
    position: relative; overflow: hidden; padding: 1.4rem 1.4rem 1.2rem; border-radius: 22px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03));
    border: 1px solid rgba(155, 231, 255, .18);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .3);
    transition: transform .45s var(--hs-ease), border-color .45s ease, box-shadow .45s ease;
}
.hs-node-card::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
    background: linear-gradient(90deg, transparent, var(--c), transparent);
}
.hs-node-card::after {
    content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; top: -110px; inset-inline-start: -80px;
    background: radial-gradient(circle, color-mix(in srgb, var(--c) 28%, transparent), transparent 70%); pointer-events: none;
    transition: transform .6s var(--hs-ease);
}
.hs-path .hs-node:hover .hs-node-card { transform: translateY(-6px);   /* stronger than the scroll animation's own transform */
     border-color: color-mix(in srgb, var(--c) 60%, transparent); box-shadow: 0 26px 54px rgba(0, 0, 0, .45), 0 0 30px color-mix(in srgb, var(--c) 25%, transparent); }
.hs-node:hover .hs-node-card::after { transform: scale(1.3); }

.hs-node-head { position: relative; display: flex; align-items: center; gap: .9rem; margin-bottom: .7rem; }
.hs-node-icon {
    flex: 0 0 50px; width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; font-size: 1.25rem;
    color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
}
.hs-node-kicker { display: block; font-size: .78rem; font-weight: 700; color: var(--c); }
.hs-node-head h3 { margin: .1rem 0 0; font-size: 1.25rem; font-weight: 800; color: #fff; }
.hs-node-card p { position: relative; margin: 0 0 .9rem; color: rgba(222, 240, 255, .72); line-height: 1.85; font-size: .94rem; }
.hs-node-card ul { position: relative; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .45rem .8rem; }
.hs-node-card li { display: flex; align-items: center; gap: .45rem; font-size: .88rem; font-weight: 600; color: rgba(232, 246, 255, .9); }
.hs-node-card li i { font-size: .62rem; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; color: #04182f; background: var(--c); flex: 0 0 18px; }

.hs-curr + .hs-lab { padding-top: 3.5rem; }

@media (max-width: 991.98px) {
    /* one column; the strand runs down the right edge (where RTL text starts) */
    .hs-path { grid-template-columns: 1fr; padding-inline-start: 4.2rem; padding-bottom: 0; row-gap: 1.2rem; }
    .hs-path::before { left: auto; right: 0; margin-left: 0; }
    .hs-path::after { left: auto; right: 22px; margin-left: 0; }
    .hs-node:nth-child(even) { transform: none; }
    .hs-node:nth-child(odd) .hs-node-dot, .hs-node:nth-child(even) .hs-node-dot { left: auto; right: -4.2rem; }
    .hs-curr { padding-bottom: 4.5rem; }
}
@media (max-width: 575.98px) {
    .hs-curr { padding: 3.6rem 0 4rem; }
    .hs-path { padding-inline-start: 3.2rem; }
    .hs-node:nth-child(odd) .hs-node-dot, .hs-node:nth-child(even) .hs-node-dot { right: -3.2rem; width: 38px; height: 44px; font-size: .9rem; }
    .hs-path::before { background-size: 38px 150px; width: 38px; }
    .hs-path::after { right: 18px; }
    .hs-node-card ul { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .hs-path::before { animation: none; } }

/* ---------- Arabic headings: room above and below the letters ----------
   The display face has tall hamzas and deep tails (أ, ش, ج, ي's dots). With a tight line height they were cut, and
   the gradient words were cut most, because a gradient is painted only inside the word's own box: that box now gets
   padding above and below so the whole letter is inside it. */
.hs-title { line-height: 1.22; row-gap: 0; padding-top: .25em; }
.hs-title-first, .hs-title-last { display: inline-block; padding: .18em .06em .32em; margin: -.18em 0 -.32em; }
.hs-title-prefix { margin-top: .55em; }
.hs-h2 { line-height: 1.55; padding-bottom: .1em; }
.hs-h2 em { display: inline-block; padding: .15em .08em .3em; margin: -.15em 0 -.3em; }
.hs-node-head h3, .hs-step h3, .hs-facts h3, .hs-rules h3 { line-height: 1.55; }
.hs-facts dd { padding: .1em 0 .15em; }



/* ---------- Geology: four cards under the biology strand ---------- */
.hs-geo { margin-top: 4.5rem; }
.hs-geo-head { text-align: center; margin-bottom: 2rem; }
.hs-geo-head .hs-eyebrow { background: rgba(245, 158, 11, .12); color: #fcd34d; border: 1px solid rgba(252, 211, 77, .3); }
.hs-geo-head .hs-eyebrow i { color: #fbbf24; }
.hs-geo-head .hs-h2 { color: #fff; }
.hs-geo-head .hs-h2 em { background: linear-gradient(100deg, #fde68a, #f59e0b 55%, #fb7185); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hs-geo-head .hs-sub { color: rgba(222, 240, 255, .75); }
.hs-geo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; max-width: 1100px; margin: 0 auto; }
.hs-geo-card { --c: #f59e0b; height: 100%; }
.hs-geo-card ul { grid-template-columns: 1fr; }
.hs-geo-grid .hs-geo-card:hover { transform: translateY(-6px) !important; border-color: color-mix(in srgb, var(--c) 60%, transparent); }
.hs-geo-card:hover::after { transform: scale(1.3); }
@media (max-width: 1199.98px) { .hs-geo-grid { grid-template-columns: repeat(2, 1fr); } .hs-geo-card ul { grid-template-columns: 1fr 1fr; } }
@media (max-width: 575.98px) { .hs-geo { margin-top: 3rem; } .hs-geo-grid { grid-template-columns: 1fr; } }
