/* ============================================================
   Addis Ababa University — SSO landing page
   Keycloak welcome theme, served at sso.aau.edu.et/
   No framework, no build step.
   ============================================================ */

:root {
    --navy:   #0e1b33;
    --ink:    #1f2a3d;
    --text:   #4b5568;
    --muted:  #6b7488;
    --faint:  #98a1b3;
    --line:   #e7ebf1;
    --line-2: #eff2f6;
    --bg:     #ffffff;
    --bg-alt: #f6f8fb;
    --card:   #ffffff;
    --nav-bg: rgba(255, 255, 255, .88);

    --blue:      #146396;   /* AAU brand blue */
    --blue-600:  #0f4c72;
    --blue-700:  #0b3a58;
    --blue-tint: #e9f1f6;
    --gold:      #e0a92e;

    --c-blue: #2563eb; --c-purple: #6d4bd8; --c-green: #1a8f5a;
    --c-gold: #c98f30; --c-red: #dc4b4b;

    /* night navy, graded from the gate photo at dusk — owns the hero and the close */
    --night:   #071a2e;
    --night-2: #0c2844;
    --gold-hi: #f2c14e;
    /* Ethiopian flag, used once as a hairline, never as decoration fill */
    --et-green: #078930; --et-yellow: #fcdd09; --et-red: #da121a;

    --wrap: 1200px;
    --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --display: 'Schibsted Grotesk', 'Poppins', -apple-system, 'Segoe UI', sans-serif;
    --ge: 'Noto Sans Ethiopic', 'Nyala', 'Abyssinica SIL', sans-serif;
    --r: 16px;
    --sec-y: clamp(62px, 8.5vw, 108px);   /* vertical rhythm between sections */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: light; }
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.62;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(20px, 5vw, 40px); }

/* dotted side gutters — quiet, static texture on both edges */
.pagedots { position: fixed; inset: 0; z-index: 4; pointer-events: none; }
.pagedots::before, .pagedots::after {
    content: ""; position: absolute; top: 0; bottom: 0;
    width: clamp(46px, 8vw, 150px);
    background-image: radial-gradient(#334155 1.4px, transparent 1.7px);
    background-size: 24px 24px;
    opacity: .12;
    animation: dotsDrift 60s linear infinite, dotsBreathe 9s ease-in-out infinite;
}
.pagedots::before {
    left: 0;
    -webkit-mask-image: linear-gradient(90deg, #000 20%, transparent);
            mask-image: linear-gradient(90deg, #000 20%, transparent);
}
.pagedots::after {
    right: 0;
    -webkit-mask-image: linear-gradient(-90deg, #000 20%, transparent);
            mask-image: linear-gradient(-90deg, #000 20%, transparent);
    animation-direction: reverse;
}
@keyframes dotsDrift { to { background-position: 0 240px; } }
@keyframes dotsBreathe { 0%, 100% { opacity: .1; } 50% { opacity: .16; } }
@media (prefers-reduced-motion: reduce) { .pagedots::before, .pagedots::after { animation: none; } }
@media (max-width: 640px) { .pagedots::before, .pagedots::after { width: 30px; opacity: .1; } }

/* ---- shared bits ---- */
.kicker {
    font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
    color: var(--blue);
}
.kicker--gold { color: var(--gold); }

.btn {
    display: inline-flex; align-items: center; gap: 10px;
    font: inherit; font-size: .92rem; font-weight: 600;
    border: 1px solid transparent; border-radius: 10px; cursor: pointer;
    padding: 13px 24px;
    transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn__arw { width: 16px; height: 16px; transition: transform .16s ease; }
.btn:hover .btn__arw { transform: translateX(3px); }
.btn--primary { color: #fff; background: var(--blue); }
.btn--primary:hover { background: var(--blue-600); }
.btn--white { color: var(--blue-700); background: #fff; }
.btn--white:hover { background: #f1f5f9; }
.btn--gold {
    color: #2a1d02; background: linear-gradient(180deg, var(--gold-hi), var(--gold));
    box-shadow: 0 1px 0 rgba(255, 255, 255, .45) inset, 0 14px 30px -14px rgba(224, 169, 46, .7);
}
.btn--gold:hover { background: linear-gradient(180deg, #f6cd67, #e8b23a); }
.btn--gold:active { transform: translateY(1px); }
.btn--glass {
    color: #fff; background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .28);
    backdrop-filter: blur(6px);
}
.btn--glass:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .45); }
.btn--line { color: var(--navy); background: #fff; border-color: #d9e1ec; box-shadow: 0 1px 2px rgba(14, 27, 51, .05); }
.btn--line:hover { border-color: #b9c7d9; background: #fbfcfe; }
.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* ============================================================ NAV */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 40;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.nav.is-solid {
    background: var(--nav-bg);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom-color: var(--line);
    box-shadow: 0 10px 30px -24px rgba(14, 27, 51, .4);
}

.nav__inner { display: flex; align-items: center; gap: 32px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand__text { display: flex; flex-direction: column; gap: 1px; }
.brand__en {
    font-size: 1rem; font-weight: 700; line-height: 1.25;
    letter-spacing: -.005em; color: var(--blue);
}
.brand__am {
    font-style: normal;
    font-family: 'Noto Sans Ethiopic', 'Nyala', 'Abyssinica SIL', var(--font);
    font-size: .92rem; font-weight: 500; line-height: 1.3; letter-spacing: .01em;
    color: #c1121f;
}

.nav__links { margin-left: auto; display: flex; gap: 30px; }
.nav__links a { font-size: .9rem; font-weight: 500; color: var(--ink); transition: color .15s ease; }
.nav__links a:hover { color: var(--blue); }

/* --- app launcher (9-dot) --- */
.apps { position: relative; margin-left: 6px; flex: 0 0 auto; }
.apps__btn {
    width: 42px; height: 42px; border-radius: 12px;
    display: grid; place-items: center;
    background: #fff; border: 1px solid #e7ebf1; color: #1a2233;
    box-shadow: 0 8px 18px -8px rgba(14, 27, 51, .35), 0 2px 4px rgba(14, 27, 51, .08);
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, color .15s ease;
}
.apps__btn svg { width: 22px; height: 22px; }
.apps__btn:hover { transform: translateY(-1px); box-shadow: 0 12px 22px -8px rgba(14, 27, 51, .42), 0 2px 4px rgba(14, 27, 51, .1); }

.apps__scrim {
    position: fixed; inset: 0; z-index: 39;
    background: rgba(1, 50, 78, .28);
    -webkit-backdrop-filter: blur(9px) saturate(1.1); backdrop-filter: blur(9px) saturate(1.1);
    opacity: 0; visibility: hidden;
    transition: opacity .22s ease, visibility .22s;
}
.apps__scrim.is-on { opacity: 1; visibility: visible; }
.apps.is-open .apps__btn { box-shadow: 0 0 0 4px rgba(20, 99, 150, .14), 0 8px 18px -8px rgba(14, 27, 51, .35); }

.apps__panel {
    position: absolute; top: calc(100% + 14px); right: -4px;
    width: 316px; padding: 0; overflow: hidden; z-index: 60;
    background: #fff; border: 1px solid var(--line); border-radius: 20px;
    box-shadow: 0 44px 80px -30px rgba(1, 30, 50, .5), 0 6px 16px -8px rgba(14, 27, 51, .18);
    transform-origin: calc(100% - 28px) 0;
    opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.94);
    transition: opacity .18s ease, transform .26s cubic-bezier(.2, .8, .2, 1), visibility .26s;
}
.apps__panel::before { display: none; }
.apps::after {
    content: ""; position: absolute; top: calc(100% + 8px); right: 15px; width: 14px; height: 14px; z-index: 61;
    background: #0d4f78; border-radius: 3px 0 0 0; transform: rotate(45deg);
    opacity: 0; visibility: hidden; transition: opacity .18s ease, visibility .18s;
}
.apps.is-open::after { opacity: 1; visibility: visible; }
.apps.is-open .apps__panel { opacity: 1; visibility: visible; transform: none; }

.apps__head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 15px 18px 14px; color: #fff;
    background: radial-gradient(120% 140% at 100% 0, rgba(234, 179, 8, .22), transparent 55%), linear-gradient(160deg, #0d4f78, #01324e);
    border-bottom: 2px solid #eab308;
}
.apps__head span:first-child { font-family: var(--display, inherit); font-size: .98rem; font-weight: 800; letter-spacing: -.02em; }
.apps__hint { font-size: .66rem; color: #f5cf55; letter-spacing: .04em; text-transform: uppercase; font-weight: 600; }

.apps__grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 92px; gap: 4px; padding: 14px 12px 10px; }
.apps__foot {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    padding: 10px 14px; font-size: .68rem; font-weight: 500; color: #5b6b80;
    background: #f6f9fc; border-top: 1px solid var(--line-2);
}
.apps__foot svg { width: 13px; height: 13px; color: #1a8f3f; flex: none; }
.apps__app {
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px;
    padding: 8px 4px 0; border-radius: 15px; text-align: center;
    background: transparent; border: 0;
    opacity: 0; transform: translateY(8px);
    transition: transform .2s cubic-bezier(.2, .7, .2, 1), box-shadow .2s ease, background-color .15s ease, border-color .15s ease, opacity .25s ease;
}
.apps.is-open .apps__app { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 28ms + 60ms), 0s, 0s, 0s, calc(var(--i, 0) * 28ms + 60ms); }
.apps.is-open .apps__app:hover { transform: translateY(-3px); background: color-mix(in srgb, var(--c) 9%, #fff); transition-delay: 0s; }
/* per-system brand colour (--c, shared with the connected-systems rail) */
.apps__ic {
    width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff;
    background: linear-gradient(160deg, color-mix(in srgb, var(--c) 78%, #fff) 0%, var(--c) 100%);
    box-shadow: 0 9px 14px -7px var(--c), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.apps__ic svg { width: 21px; height: 21px; }
.apps.is-open .apps__app:hover .apps__ic { box-shadow: 0 12px 18px -8px var(--c), inset 0 1px 0 rgba(255, 255, 255, .35); }
.apps__name { font-family: var(--display, inherit); font-size: .66rem; font-weight: 700; line-height: 1.15; color: var(--navy); }


/* ============================================================ HERO
   Light, no photograph: the argument is carried by type and by one
   staged 3D object. The gate photo lives in the closing band instead. */
.hero {
    position: relative; isolation: isolate; overflow: hidden;
    min-height: 100svh;
    display: flex; flex-direction: column;
    padding-top: 76px;
    color: var(--text);
    background:
        radial-gradient(55% 60% at 78% 42%, rgba(20, 99, 150, .09), transparent 70%),
        radial-gradient(40% 45% at 70% 88%, rgba(224, 169, 46, .10), transparent 70%),
        linear-gradient(180deg, #fbfcfe 0%, #f3f6fa 100%);
}
.hero::before {                      /* a hairline column grid, felt more than seen */
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image: linear-gradient(90deg, rgba(14, 27, 51, .045) 1px, transparent 1px);
    background-size: calc((min(100vw, var(--wrap)) - 80px) / 12) 100%;
    background-position: center top;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 70%, transparent);
            mask-image: linear-gradient(180deg, transparent, #000 18%, #000 70%, transparent);
}

.hero__grid { width: 100%; }
.hero .trustbar { width: min(calc(100% - 2 * clamp(20px, 5vw, 40px)), calc(var(--wrap) - 80px)); padding-inline: 0; }
.hero__grid {
    flex: 1;
    display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    align-items: center; gap: clamp(28px, 4vw, 64px);
    padding-block: clamp(16px, 4vh, 56px);
}
.hero__title {
    /* the hero headline is the page's one moment that must out-say every
       other heading on it — .flow__title (the "how it works" section)
       topped out at 3.3rem while this sat at 3.1rem, so the page's biggest
       type belonged to a secondary section, not the hero. Sized past it
       here, with a weight step (700 → 800 on the payoff line) doing the
       rest of the work "louder everywhere" would otherwise try to do. */
    margin: 0 0 clamp(16px, 2.8vh, 24px);
    font-family: var(--display);
    font-size: clamp(2.2rem, min(4.4vw, 7.2vh), 3.7rem);
    font-weight: 700; line-height: 1.08; letter-spacing: -.032em; color: var(--navy);
    text-wrap: balance;
}
.hero__title em { position: relative; z-index: 0; display: inline-block; font-style: normal; white-space: nowrap; }
.hero__blue {
    position: relative; z-index: 1; display: inline-block;
    font-weight: 800;
    padding-bottom: .14em; margin-bottom: -.14em;     /* gradient text only paints inside the box: keep the descenders in it */
    background: linear-gradient(100deg, #1d78b5 0%, var(--blue) 45%, var(--blue-700) 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero__title em::after {             /* gold highlighter stroke that draws itself in behind the words */
    content: ""; position: absolute; z-index: 0;
    left: -.03em; right: -.05em; bottom: .1em; height: .24em; border-radius: .12em;
    background: linear-gradient(90deg, rgba(242, 193, 78, .75), rgba(224, 169, 46, .5));
    transform-origin: left center;
    animation: markDraw .9s cubic-bezier(.65, 0, .35, 1) .7s both;
}
@keyframes markDraw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero__lead { max-width: 40ch; font-size: clamp(1rem, 1.25vw, 1.1rem); line-height: 1.65; color: var(--text); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(20px, 4vh, 34px); }
.hero__ctas .btn { padding: 15px 26px; font-size: .95rem; border-radius: 12px; }
.hero__proof {
    margin-top: 34px; display: flex; align-items: center; gap: 14px;
    font-size: .8rem; color: var(--muted);
}

.hero__copy > * { animation: riseIn .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero__copy > :nth-child(2) { animation-delay: .08s; }
.hero__copy > :nth-child(3) { animation-delay: .16s; }
.hero__copy > :nth-child(4) { animation-delay: .24s; }
@keyframes riseIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---- the live demo: the real sign-in, then a split-flap board opening every system ---- */
.demo {
    justify-self: end; width: min(100%, 540px);
    animation: riseIn 1s cubic-bezier(.2, .7, .2, 1) .2s both;
}
.win {
    border-radius: 18px; overflow: hidden; background: #fff;
    border: 1px solid #dbe3ee;
    box-shadow: 0 1px 0 #fff inset, 0 50px 90px -46px rgba(14, 27, 51, .5), 0 18px 30px -24px rgba(14, 27, 51, .25);
}
.win__bar { display: flex; align-items: center; gap: 7px; padding: clamp(7px, 1.2vh, 11px) 14px; background: #f4f7fb; border-bottom: 1px solid #e6ecf3; }
.win__bar i { width: 10px; height: 10px; border-radius: 50%; background: #d8dfe8; }
.win__url {
    margin-left: 10px; flex: 1; display: flex; align-items: center; gap: 7px;
    padding: 5px 12px; border-radius: 8px; background: #fff; border: 1px solid #e3e9f1;
    font-size: .74rem; color: var(--muted);
}
.win__url svg { width: 12px; height: 12px; color: #16a34a; flex: 0 0 auto; }
.stage { position: relative; min-height: 318px; }

/* sign-in step */
.signin {
    position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 20px;
    background: #fff;
    opacity: 0; transform: translateY(-14px) scale(.98); pointer-events: none;
    transition: opacity .45s ease, transform .55s cubic-bezier(.2, .7, .2, 1);
}
.demo.is-signing .signin { opacity: 1; transform: none; }
.signin__card { width: min(100%, 310px); text-align: center; }
.signin__card img { width: 48px; height: 48px; margin: 0 auto; }
.signin__card b { display: block; margin: 10px 0 16px; font-family: var(--display); font-size: 1.1rem; letter-spacing: -.02em; color: var(--navy); }
.field {
    display: flex; align-items: center; gap: 9px; height: 42px; margin-top: 10px; padding: 0 12px;
    border-radius: 10px; border: 1px solid #d5deea; background: #fbfcfe;
    font-size: .84rem; color: var(--navy); text-align: left;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.field.is-focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(20, 99, 150, .14); background: #fff; }
.field svg { width: 15px; height: 15px; color: #8a96a8; flex: 0 0 auto; }
.field__val { white-space: nowrap; overflow: hidden; }
.field__caret { display: none; width: 1.5px; height: 17px; background: var(--blue); animation: caret 1s steps(1) infinite; }
.field.is-focus .field__caret { display: block; }
@keyframes caret { 50% { opacity: 0; } }
.signin__go {
    margin-top: 14px; height: 42px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: .88rem; font-weight: 600; color: #2a1d02;
    background: linear-gradient(180deg, var(--gold-hi), var(--gold));
    box-shadow: 0 10px 22px -12px rgba(224, 169, 46, .8), inset 0 1px 0 rgba(255, 255, 255, .45);
    transition: transform .12s ease;
}
.signin__go.is-press { transform: scale(.96); }
.signin__spin { display: none; width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(42, 29, 2, .25); border-top-color: #2a1d02; animation: spin .7s linear infinite; }
.signin__go.is-busy .signin__spin { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* the board, in daylight: paper-white flaps with a hinge line, status in green once open */
.board { padding: clamp(10px, 1.7vh, 16px) 16px clamp(8px, 1.2vh, 12px); }
/* same navy-rail surface as .sysbar__rail (the approved "connected systems"
   panel below) — keeps the identity card on brand instead of the cream/gold
   pastel it used before, which read like a generic SaaS mockup. */
.board__who {
    display: flex; align-items: center; gap: 11px;
    padding: clamp(7px, 1.2vh, 11px) 12px; border-radius: 13px;
    background:
        radial-gradient(120% 130% at 100% 0%, rgba(255, 255, 255, .12), transparent 55%),
        #01324e;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
}
.board__who img { width: clamp(28px, 3.8vh, 34px); height: clamp(28px, 3.8vh, 34px); flex: 0 0 auto; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35)); }
.board__who div { min-width: 0; }
.board__who b { display: block; font-family: var(--display); font-size: .92rem; letter-spacing: -.01em; color: #fff; line-height: 1.2; }
.board__who span:not(.flap):not(.flaps) { font-size: .72rem; color: rgba(255, 255, 255, .58); }
.board__cols {
    display: flex; justify-content: space-between; padding: clamp(8px, 1.5vh, 14px) 6px clamp(4px, .7vh, 6px);
    font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
    font-size: .6rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #9aa6b8;
}
.board__rows { border-top: 1px solid #e8edf4; }
.brow {
    display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 13px;
    padding: clamp(5px, .9vh, 9px) 6px; border-bottom: 1px solid #eef2f7;
}
.brow:last-child { border-bottom: 0; }
/* one brand color for every icon (not per-system), no backdrop shape */
.brow__ic { width: 20px; height: 20px; display: grid; place-items: center; color: var(--blue); }
.brow__ic svg { width: 15px; height: 15px; }
.brow__name { font-family: var(--display); font-size: .89rem; font-weight: 600; letter-spacing: -.01em; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.flaps { display: flex; gap: 3px; margin-left: auto; }
.flap {
    position: relative; display: grid; place-items: center;
    width: clamp(16px, 2.1vh, 19px); height: clamp(21px, 2.9vh, 26px); border-radius: 4px;
    font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: .8rem; font-weight: 700;
    color: #a3adbb;
    background: linear-gradient(180deg, #ffffff 0 49%, #f1f4f8 51% 100%);
    box-shadow: 0 0 0 1px #e1e7ef, 0 2px 3px -1px rgba(14, 27, 51, .12);
    transition: color .25s ease, background-color .25s ease;
}
.flap::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(14, 27, 51, .1); }
.flap.tick { animation: flapTick .07s linear; }
@keyframes flapTick { 50% { transform: scaleY(.2); } }
.flaps.is-open .flap {
    color: #13894a;
    background: linear-gradient(180deg, #f3fcf6 0 49%, #e4f6eb 51% 100%);
    box-shadow: 0 0 0 1px #bfe6cf, 0 2px 3px -1px rgba(19, 137, 74, .15);
}
.flaps--me .flap {
    color: #9a6a08;
    background: linear-gradient(180deg, #fffdf6 0 49%, #fbf1d8 51% 100%);
    box-shadow: 0 0 0 1px #efdcaa, 0 2px 3px -1px rgba(154, 106, 8, .15);
}

.demo__status {
    margin-top: clamp(8px, 1.4vh, 14px);
    display: flex; align-items: center; justify-content: center; gap: 9px;
    font-size: .8rem; font-weight: 500; color: var(--muted);
}
.demo__dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }
.demo.is-signing .demo__dot { background: var(--gold); box-shadow: 0 0 0 3px rgba(224, 169, 46, .2); animation: blink .9s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }

@media (prefers-reduced-motion: reduce) {
    .hero__copy > *, .demo, .hero__title em::after { animation: none; }
}

/* ---- trust strip: the hero's last line, on the night ground ---- */
.trustbar {
    position: relative;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid #e3e9f1;
}
.trustbar__item { display: flex; align-items: center; gap: 13px; padding: clamp(12px, 2.2vh, 22px) 22px clamp(14px, 2.6vh, 26px); }
.trustbar__item:first-child { padding-left: 0; }
.trustbar__item:not(:last-child) { border-right: 1px solid #e3e9f1; }
.trustbar__item svg { flex: 0 0 auto; width: 22px; height: 22px; color: var(--blue); }
.trustbar__item span { display: flex; flex-direction: column; font-size: .76rem; color: var(--muted); line-height: 1.4; }
.trustbar__item b { font-size: .88rem; font-weight: 600; color: var(--navy); }

/* ============================================================
   FINALE — stats + CTA merged, over a full campus photo, at the bottom
   ============================================================ */
.finale {
    position: relative; overflow: hidden;
    margin-top: 0;
    padding-block: calc(var(--sec-y) + 12px) clamp(96px, 11vw, 168px);
    color: #c6d2e6;
    background:
        radial-gradient(60% 90% at 88% 110%, rgba(224, 169, 46, .16), transparent 60%),
        radial-gradient(50% 70% at 0% 0%, rgba(20, 99, 150, .35), transparent 65%),
        var(--night);
}
.finale__bg {
    position: absolute; inset: 0; z-index: 0;
    width: 100%; height: 100%; object-fit: cover; object-position: center 58%;
}
.finale::after {
    content: ""; position: absolute; inset: 0; z-index: 0;
    background:
        linear-gradient(90deg, rgba(7, 26, 46, .94) 0%, rgba(7, 26, 46, .8) 45%, rgba(7, 26, 46, .62) 100%),
        linear-gradient(180deg, rgba(7, 26, 46, .3) 0%, transparent 40%, var(--night) 100%);
}
.tricolor {
    position: absolute; top: 0; left: 0; right: 0; height: 4px; z-index: 2;
    background: linear-gradient(90deg, var(--et-green) 0 33.34%, var(--et-yellow) 33.34% 66.67%, var(--et-red) 66.67% 100%);
}
/* the university's name in Ge'ez, set as architecture rather than a caption */
.finale__mark {
    position: absolute; z-index: 1; left: 50%; bottom: clamp(14px, 2vw, 30px); transform: translateX(-50%);
    font-family: var(--ge); font-weight: 800; line-height: 1; white-space: nowrap;
    font-size: clamp(2.6rem, 7.4vw, 7rem); letter-spacing: .01em;
    color: rgba(255, 255, 255, .06);
    pointer-events: none; user-select: none;
}

.finale__inner { position: relative; z-index: 2; }
.finale__top {
    display: grid; grid-template-columns: 1fr auto;
    gap: clamp(30px, 5vw, 72px); align-items: center;
}
.finale__intro { max-width: 56ch; }
.finale .kicker {
    text-transform: none; letter-spacing: .02em;
    font-size: .84rem; font-weight: 600;
}
.finale__title {
    margin: 14px 0 16px;
    font-size: clamp(1.8rem, 3.8vw, 2.7rem);
    font-weight: 800; line-height: 1.12; letter-spacing: -.024em; color: #fff;
}
.finale__lead { max-width: 46ch; font-size: .98rem; color: #b6c5dd; }

/* stats on the right, in a horizontal row */
.finale__stats {
    display: flex; align-items: center;
    padding-left: clamp(22px, 3vw, 36px);
    border-left: 2px solid rgba(255, 255, 255, .22);
}
.stat { padding: 0 clamp(16px, 2vw, 26px); }
.stat:first-child { padding-left: 0; }
.stat + .stat { border-left: 1px solid rgba(255, 255, 255, .2); }
.stat b {
    display: block; font-size: clamp(1.4rem, 2.2vw, 1.8rem); font-weight: 700;
    color: #fff; letter-spacing: -.01em; font-variant-numeric: tabular-nums;
    transition: text-shadow .5s ease;
}
.stat span { font-size: .74rem; color: #9db0cd; }
/* count-in reveal (only active once JS runs) */
.finale.js-count .stat b {
    opacity: 0; transform: translateY(12px) scale(.94);
    transition: opacity .6s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
}
.finale.js-count .stat b.is-in { opacity: 1; transform: none; }
.finale.js-count .stat.is-active b { text-shadow: 0 0 26px rgba(224, 169, 46, .5); }

.finale__cta {
    margin-top: clamp(32px, 4vw, 48px); padding-top: clamp(28px, 3.5vw, 40px);
    border-top: 1px solid rgba(255, 255, 255, .2);
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.finale__ctatext h3 { font-size: clamp(1.25rem, 2.6vw, 1.7rem); font-weight: 700; letter-spacing: -.02em; color: #fff; }
.finale__ctatext p { margin-top: 8px; font-size: .95rem; color: #b6c5dd; }
.finale__cta .btn--white { flex: 0 0 auto; }

/* one display face for every headline */
.netz__head h2, .flow__title, .finale__title, .finale__ctatext h3, .sysbar__panelname {
    font-family: var(--display); letter-spacing: -.03em;
}

/* ============================================================ SECTIONS
   Rhythm: each section owns its top gap (--sec-y); the section above
   contributes no bottom margin, so gaps never double up. */
.section { padding-block: var(--sec-y) clamp(20px, 3vw, 36px); }
.section--alt {
    background: var(--bg-alt);
    max-width: none; padding-inline: 0;
    border-block: 1px solid var(--line);
}
.section--alt > * { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(20px, 5vw, 40px); }

.section__head { text-align: center; max-width: 40ch; margin-inline: auto; }
.section__head h2 {
    font-size: clamp(1.55rem, 3.2vw, 2.1rem);
    font-weight: 700; letter-spacing: -.022em; color: var(--navy);
}
.section__rule { display: block; width: 52px; height: 3px; border-radius: 3px; margin: 16px auto 14px; }
.section__rule--gold { background: var(--gold); }
.section__rule--blue { background: var(--blue); }
.section__head p { font-size: .95rem; color: var(--muted); }

/* ============================================================
   CONNECTED SYSTEMS  (.netz  -  system list joined to the SSO hub)
   ============================================================ */
.netz__head { text-align: center; margin-inline: auto; }
.netz__head .kicker { display: block; margin-bottom: 12px; }
.netz__head h2 {
    font-size: clamp(1.6rem, 3.4vw, 2.3rem);
    font-weight: 700; letter-spacing: -.025em; line-height: 1.12; color: var(--navy);
}

/* ---- sidebar: a rail of systems, one detail panel ---- */
.sysbar { margin-top: clamp(32px, 4.4vw, 52px); }
.sysbar__radio { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.sysbar__inner {
    position: relative;
    display: grid; grid-template-columns: 270px minmax(0, 1fr);
    gap: 0; padding: 10px;
    border: 1px solid var(--line); border-radius: 24px;
    background: #fff;
    box-shadow: 0 46px 100px -46px rgba(14, 27, 51, .38);
}
/* a hairline gold seal across the top — the one flourish that says
   "official institution," not decoration for its own sake */
.sysbar__inner::before {
    content: ""; position: absolute; top: 0; left: 14%; right: 14%; height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold-hi, #f2c14e) 20%, var(--gold, #e0a92e) 50%, var(--gold-hi, #f2c14e) 80%, transparent);
    border-radius: 0 0 3px 3px;
}

/* left rail — its own brand-blue surface */
.sysbar__rail {
    position: relative;
    padding: 14px 10px 10px; border-radius: 16px;
    background:
        radial-gradient(120% 70% at 100% 0%, rgba(255, 255, 255, .1), transparent 55%),
        #01324e;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
}
.sysbar__raillabel {
    display: block; margin: 0 3px 10px;
    font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: rgba(255, 255, 255, .48);
}
.sysbar__tabs { position: relative; display: flex; flex-direction: column; gap: 2px; }
.sysbar__marker {
    position: absolute; left: 0; right: 0; top: 0; height: 52px;
    border-radius: 11px; background: #fff;
    box-shadow: 0 14px 26px -8px rgba(8, 20, 38, .5), inset 0 0 0 1px rgba(20, 99, 150, .06), inset 3px 0 0 var(--gold, #e0a92e);
    transition: transform .36s cubic-bezier(.2, .7, .2, 1);
}
.sysbar__tab {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: 12px;
    height: 52px; padding: 0 14px; border-radius: 11px; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.sysbar__tabic {
    width: 32px; height: 32px; flex: 0 0 auto; border-radius: 10px;
    display: grid; place-items: center; color: #fff;
    background: linear-gradient(155deg, rgba(255, 255, 255, .32), rgba(255, 255, 255, 0) 60%), var(--c, var(--blue));
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .18), 0 4px 10px -4px rgba(0, 0, 0, .35);
    transition: transform .2s ease, box-shadow .2s ease;
}
.sysbar__tabic svg { width: 15px; height: 15px; }
.sysbar__tabname {
    flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    font-family: var(--display); font-size: .87rem; font-weight: 600; color: rgba(255, 255, 255, .82);
    transition: color .18s ease;
}
.sysbar__tabchev {
    width: 14px; height: 14px; flex: 0 0 auto;
    color: var(--blue); opacity: 0; transform: translateX(-4px);
    transition: opacity .2s ease, transform .2s ease;
}
.sysbar__tab:hover .sysbar__tabname { color: #fff; }

.sysbar__stage { position: relative; min-height: 500px; display: flex; flex-direction: column; }
.sysbar__panel {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: space-between;
    padding: clamp(20px, 2.4vw, 30px);
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: opacity .3s ease, transform .3s ease;
}
.sysbar__paneltop { position: relative; width: 100%; }
.sysbar__panelhead { position: relative; display: flex; align-items: center; justify-content: center; }
.sysbar__status {
    position: absolute; right: 0; top: 50%; transform: translateY(-50%);
    display: inline-flex; align-items: center; gap: 7px;
    font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--c-green, #1a8f5a);
}
.sysbar__dot { position: relative; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(26, 143, 90, .16); }
.sysbar__dot::after {
    content: ""; position: absolute; inset: -4px; border-radius: 50%;
    border: 1px solid currentColor; animation: sysbarPulse 2.2s cubic-bezier(.2, .6, .4, 1) infinite;
}
@keyframes sysbarPulse { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(1.9); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sysbar__dot::after { animation: none; } }
.sysbar__panelname {
    font-size: clamp(1.2rem, 1.9vw, 1.42rem); font-weight: 800; letter-spacing: -.025em; color: var(--navy);
    text-align: center;
}
.sysbar__paneldesc {
    margin-top: 10px; font-size: .87rem; line-height: 1.55; color: var(--muted); text-align: left;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.sysbar__points {
    list-style: none; margin: 16px 0 0; padding: 0;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 12px;
}
.sysbar__points li {
    display: flex; flex-direction: row; align-items: center; gap: 9px;
    text-align: left;
    font-size: .78rem; font-weight: 500; color: var(--text); line-height: 1.3;
}
.sysbar__pointic {
    flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
    display: grid; place-items: center; color: #fff;
    background: var(--c, var(--blue));
}
.sysbar__pointic svg { width: 12px; height: 12px; }

/* ---- one sign-in, centred at the bottom of every panel — the same solid
   gold CTA used for the page's primary actions elsewhere, not a pale grey
   pill; the system detail's one moment of real commitment. ---- */
.sysbar__signin {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; gap: 11px;
    margin-top: 22px; padding: 13px 22px 13px 14px; border-radius: 30px;
    border: none; background: linear-gradient(180deg, var(--gold-hi), var(--gold) 65%, #c98f30);
    font-size: .85rem; font-weight: 700; color: #2a1d02;
    box-shadow: 0 14px 26px -12px rgba(224, 169, 46, .65), inset 0 1px 0 rgba(255, 255, 255, .5);
    transition: box-shadow .16s ease, transform .16s ease;
}
.sysbar__signin:hover { box-shadow: 0 18px 32px -12px rgba(224, 169, 46, .75), inset 0 1px 0 rgba(255, 255, 255, .5); transform: translateY(-1px); }
.sysbar__signinic {
    flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
    display: grid; place-items: center; color: var(--gold, #e0a92e); background: #fff;
}
.sysbar__signinic svg { width: 13px; height: 13px; }
.sysbar__signingo {
    width: 16px; height: 16px; color: #6b4c0a;
    transition: transform .16s ease;
}
.sysbar__signin:hover .sysbar__signingo { transform: translateX(3px); }

/* ---- selected state, one block per index ---- */
.sysbar__radio:nth-of-type(1):checked ~ .sysbar__inner .sysbar__marker { transform: translateY(0); }
.sysbar__radio:nth-of-type(1):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(1) .sysbar__tabic { transform: scale(1.08); box-shadow: 0 0 0 2px #fff, 0 6px 14px -4px var(--c, var(--blue)); }
.sysbar__radio:nth-of-type(1):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(1) .sysbar__tabname { color: var(--navy); font-weight: 700; }
.sysbar__radio:nth-of-type(1):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(1) .sysbar__tabchev { opacity: 1; transform: none; color: var(--blue); }
.sysbar__radio:nth-of-type(1):checked ~ .sysbar__inner .sysbar__panel:nth-of-type(1) { position: relative; opacity: 1; visibility: visible; transform: none; }

.sysbar__radio:nth-of-type(2):checked ~ .sysbar__inner .sysbar__marker { transform: translateY(54px); }
.sysbar__radio:nth-of-type(2):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(2) .sysbar__tabic { transform: scale(1.08); box-shadow: 0 0 0 2px #fff, 0 6px 14px -4px var(--c, var(--blue)); }
.sysbar__radio:nth-of-type(2):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(2) .sysbar__tabname { color: var(--navy); font-weight: 700; }
.sysbar__radio:nth-of-type(2):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(2) .sysbar__tabchev { opacity: 1; transform: none; color: var(--blue); }
.sysbar__radio:nth-of-type(2):checked ~ .sysbar__inner .sysbar__panel:nth-of-type(2) { position: relative; opacity: 1; visibility: visible; transform: none; }

.sysbar__radio:nth-of-type(3):checked ~ .sysbar__inner .sysbar__marker { transform: translateY(108px); }
.sysbar__radio:nth-of-type(3):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(3) .sysbar__tabic { transform: scale(1.08); box-shadow: 0 0 0 2px #fff, 0 6px 14px -4px var(--c, var(--blue)); }
.sysbar__radio:nth-of-type(3):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(3) .sysbar__tabname { color: var(--navy); font-weight: 700; }
.sysbar__radio:nth-of-type(3):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(3) .sysbar__tabchev { opacity: 1; transform: none; color: var(--blue); }
.sysbar__radio:nth-of-type(3):checked ~ .sysbar__inner .sysbar__panel:nth-of-type(3) { position: relative; opacity: 1; visibility: visible; transform: none; }

.sysbar__radio:nth-of-type(4):checked ~ .sysbar__inner .sysbar__marker { transform: translateY(162px); }
.sysbar__radio:nth-of-type(4):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(4) .sysbar__tabic { transform: scale(1.08); box-shadow: 0 0 0 2px #fff, 0 6px 14px -4px var(--c, var(--blue)); }
.sysbar__radio:nth-of-type(4):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(4) .sysbar__tabname { color: var(--navy); font-weight: 700; }
.sysbar__radio:nth-of-type(4):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(4) .sysbar__tabchev { opacity: 1; transform: none; color: var(--blue); }
.sysbar__radio:nth-of-type(4):checked ~ .sysbar__inner .sysbar__panel:nth-of-type(4) { position: relative; opacity: 1; visibility: visible; transform: none; }

.sysbar__radio:nth-of-type(5):checked ~ .sysbar__inner .sysbar__marker { transform: translateY(216px); }
.sysbar__radio:nth-of-type(5):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(5) .sysbar__tabic { transform: scale(1.08); box-shadow: 0 0 0 2px #fff, 0 6px 14px -4px var(--c, var(--blue)); }
.sysbar__radio:nth-of-type(5):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(5) .sysbar__tabname { color: var(--navy); font-weight: 700; }
.sysbar__radio:nth-of-type(5):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(5) .sysbar__tabchev { opacity: 1; transform: none; color: var(--blue); }
.sysbar__radio:nth-of-type(5):checked ~ .sysbar__inner .sysbar__panel:nth-of-type(5) { position: relative; opacity: 1; visibility: visible; transform: none; }

.sysbar__radio:nth-of-type(6):checked ~ .sysbar__inner .sysbar__marker { transform: translateY(270px); }
.sysbar__radio:nth-of-type(6):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(6) .sysbar__tabic { transform: scale(1.08); box-shadow: 0 0 0 2px #fff, 0 6px 14px -4px var(--c, var(--blue)); }
.sysbar__radio:nth-of-type(6):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(6) .sysbar__tabname { color: var(--navy); font-weight: 700; }
.sysbar__radio:nth-of-type(6):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(6) .sysbar__tabchev { opacity: 1; transform: none; color: var(--blue); }
.sysbar__radio:nth-of-type(6):checked ~ .sysbar__inner .sysbar__panel:nth-of-type(6) { position: relative; opacity: 1; visibility: visible; transform: none; }

.sysbar__radio:nth-of-type(7):checked ~ .sysbar__inner .sysbar__marker { transform: translateY(324px); }
.sysbar__radio:nth-of-type(7):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(7) .sysbar__tabic { transform: scale(1.08); box-shadow: 0 0 0 2px #fff, 0 6px 14px -4px var(--c, var(--blue)); }
.sysbar__radio:nth-of-type(7):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(7) .sysbar__tabname { color: var(--navy); font-weight: 700; }
.sysbar__radio:nth-of-type(7):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(7) .sysbar__tabchev { opacity: 1; transform: none; color: var(--blue); }
.sysbar__radio:nth-of-type(7):checked ~ .sysbar__inner .sysbar__panel:nth-of-type(7) { position: relative; opacity: 1; visibility: visible; transform: none; }

.sysbar__radio:nth-of-type(8):checked ~ .sysbar__inner .sysbar__marker { transform: translateY(378px); }
.sysbar__radio:nth-of-type(8):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(8) .sysbar__tabic { transform: scale(1.08); box-shadow: 0 0 0 2px #fff, 0 6px 14px -4px var(--c, var(--blue)); }
.sysbar__radio:nth-of-type(8):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(8) .sysbar__tabname { color: var(--navy); font-weight: 700; }
.sysbar__radio:nth-of-type(8):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(8) .sysbar__tabchev { opacity: 1; transform: none; color: var(--blue); }
.sysbar__radio:nth-of-type(8):checked ~ .sysbar__inner .sysbar__panel:nth-of-type(8) { position: relative; opacity: 1; visibility: visible; transform: none; }

.sysbar__radio:focus-visible ~ .sysbar__inner .sysbar__marker { outline: 2px solid var(--blue); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    .sysbar__marker, .sysbar__panel, .sysbar__tabic, .sysbar__tabchev { transition: none; }
}
@media (max-width: 860px) {
    .sysbar__inner { grid-template-columns: 1fr; }
    .sysbar__marker { display: none; }
    .sysbar__raillabel { display: none; }
    .sysbar__tabs { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
    .sysbar__tab { flex: 0 0 auto; height: 44px; padding: 0 12px; }
    .sysbar__tabname { max-width: 120px; }
    .sysbar__tabchev { display: none; }
    .sysbar__stage { min-height: 0; }
}


.section__more {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 36px; font-size: .9rem; font-weight: 600; color: var(--blue);
}
.section__more svg { width: 16px; height: 16px; transition: transform .16s ease; }
.section__more:hover svg { transform: translateX(3px); }

/* ============================================================
   HOW SINGLE SIGN-ON WORKS — numbered editorial list
   ============================================================ */
.flow__defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.flow { position: relative; padding-block: var(--sec-y); }

/* header sits above the component, centered — same pattern as .netz__head
   above .sysbar, for consistency between the two sections. */
.flow__head { text-align: center; max-width: 56ch; margin: 0 auto clamp(28px, 3.8vw, 44px); }
.flow__title {
    font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 700;
    letter-spacing: -.025em; line-height: 1.12; color: var(--navy);
}
.flow__intro { margin-top: 14px; font-size: .95rem; color: var(--muted); line-height: 1.6; }
.flow__meta {
    margin-top: 18px; display: inline-flex; align-items: center; gap: 10px;
    font-size: .8rem; font-weight: 600; color: var(--navy);
}
.flow__meta span {
    display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
    font-family: var(--display); font-size: .95rem; font-weight: 800; color: #fff;
    background: linear-gradient(160deg, var(--blue), var(--night-2));
}

.flow__list { list-style: none; position: relative; max-width: 900px; margin-inline: auto; }
/* the centre spine: a faint gradient track + a solid fill that draws as you scroll */
.flow__list::before, .flow__list::after {
    content: ""; position: absolute; left: 50%; top: 6px; width: 2px;
    transform: translateX(-50%); border-radius: 2px;
}
.flow__list::before { bottom: 6px; background: linear-gradient(180deg, var(--blue), var(--gold)); opacity: .26; }
.flow__list::after  { height: calc(var(--fill, 0) * (100% - 12px)); background: var(--blue); }

.flow__row {
    position: relative;
    display: grid; grid-template-columns: 1fr clamp(54px, 6.6vw, 68px) 1fr;
    align-items: center;
    padding-block: clamp(14px, 1.8vw, 24px);
}

/* numbered marker: neutral until the step is reached, then it fills like the line */
.flow__num {
    grid-column: 2; grid-row: 1; justify-self: center; z-index: 1;
    width: clamp(48px, 6vw, 58px); height: clamp(48px, 6vw, 58px);
    border-radius: 50%; display: grid; place-items: center;
    font-size: clamp(.9rem, 1.5vw, 1.1rem); font-weight: 800; letter-spacing: -.02em;
    color: var(--faint); background: #fff;
    box-shadow: 0 0 0 5px var(--bg-alt), inset 0 0 0 2px var(--line);
    transition: color .35s ease, background-color .35s ease, box-shadow .4s ease, transform .3s ease;
}
.flow__row.is-lit .flow__num {
    color: #fff; background: var(--blue);
    box-shadow: 0 0 0 5px var(--bg-alt), 0 12px 24px -12px rgba(20, 99, 150, .55);
}
.flow__row:hover .flow__num { transform: scale(1.05); }

/* left half: the step, right half (opposite): its detail — balanced */
.flow__body, .flow__aside {
    grid-row: 1; min-width: 0;
    border-radius: 15px; padding: clamp(15px, 1.9vw, 22px) clamp(16px, 2vw, 24px);
    position: relative;
}
.flow__body {
    background:
        radial-gradient(120% 140% at 100% 100%, rgba(20, 99, 150, .06), transparent 55%),
        linear-gradient(158deg, #ffffff, #f4f8fc);
    border: 1px solid var(--line);
    box-shadow: 0 16px 34px -26px rgba(14, 27, 51, .3);
    transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.flow__body::before {
    content: attr(data-n);
    position: absolute; right: 14px; bottom: 8px; z-index: 0;
    font-size: clamp(3rem, 5.4vw, 4.2rem); font-weight: 800; line-height: 1;
    letter-spacing: -.05em; color: var(--blue); opacity: .07;
    pointer-events: none;
}
.flow__name, .flow__desc { position: relative; z-index: 1; }
.flow__row:hover .flow__body {
    border-color: #cfdaea; transform: translateY(-3px);
    box-shadow: 0 26px 46px -28px rgba(14, 27, 51, .34);
}
.flow__aside {
    background: var(--bg-alt); border: 1px solid var(--line-2);
    display: flex; align-items: flex-start; gap: 14px;
}
.flow__row:nth-child(odd)  .flow__body  { grid-column: 1; }
.flow__row:nth-child(odd)  .flow__aside { grid-column: 3; }
.flow__row:nth-child(even) .flow__body  { grid-column: 3; }
.flow__row:nth-child(even) .flow__aside { grid-column: 1; }

/* --- one type scale for every step --- */
.flow__name {
    font-size: 1.05rem; font-weight: 700; line-height: 1.3;
    letter-spacing: -.015em; color: var(--navy);
}
.flow__desc {
    margin-top: 12px; font-size: .875rem; font-weight: 400;
    color: var(--muted); line-height: 1.6;
}

.flow__ic {
    width: 44px; height: 44px; flex: 0 0 auto; border-radius: 12px;
    display: grid; place-items: center; color: var(--blue);
    background: #fff; border: 1px solid #d7e4f0;
    transition: background .3s ease, border-color .3s ease, color .3s ease, transform .25s cubic-bezier(.2, .7, .2, 1);
}
.flow__ic svg { width: 22px; height: 22px; }
.flow__row:hover .flow__ic { background: var(--blue); border-color: var(--blue); color: #fff; transform: scale(1.08); }

/* points: one flowing row of compact items */
.flow__points { list-style: none; display: flex; flex-wrap: wrap; gap: 7px 14px; }
.flow__points li {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .76rem; font-weight: 400; color: var(--text); line-height: 1.35;
}
.flow__chk {
    width: 15px; height: 15px; flex: 0 0 auto;
    border-radius: 50%; display: grid; place-items: center;
    color: var(--blue); background: var(--blue-tint);
}
.flow__chk svg { width: 9px; height: 9px; }

/* scroll-reveal: each half slides in from its own side, marker pops */
.flow.is-anim .flow__row:nth-child(odd)  .flow__body  { opacity: 0; transform: translateX(-36px); }
.flow.is-anim .flow__row:nth-child(odd)  .flow__aside { opacity: 0; transform: translateX(36px); }
.flow.is-anim .flow__row:nth-child(even) .flow__body  { opacity: 0; transform: translateX(36px); }
.flow.is-anim .flow__row:nth-child(even) .flow__aside { opacity: 0; transform: translateX(-36px); }
.flow.is-anim .flow__row .flow__num { opacity: 0; transform: scale(.4); }
.flow.is-anim .flow__row.is-in .flow__body,
.flow.is-anim .flow__row.is-in .flow__aside {
    opacity: 1; transform: none;
    transition: opacity .5s ease, transform .58s cubic-bezier(.2, .7, .2, 1);
}
.flow.is-anim .flow__row.is-in .flow__num {
    opacity: 1; transform: none;
    /* exponential ease-out, not the earlier overshoot curve (cubic-bezier
       .2,.8,.4,1.5 — the >1 endpoint makes it bounce past the resting
       state, a dated-looking effect); real objects decelerate smoothly */
    transition: opacity .32s ease, transform .42s cubic-bezier(.16, 1, .3, 1) .08s,
                color .35s ease, background-color .35s ease, box-shadow .4s ease;
}

@media (max-width: 780px) {
    .flow__aside { flex-direction: column; align-items: flex-start; }
    .flow__list::before, .flow__list::after { left: 21px; }
    .flow__row { grid-template-columns: 44px 1fr; column-gap: 16px; align-items: start; padding-block: 14px; }
    .flow__num { grid-column: 1; width: 40px; height: 40px; font-size: .9rem; }
    .flow__row:nth-child(odd) .flow__body,  .flow__row:nth-child(even) .flow__body  { grid-column: 2; grid-row: 1; }
    .flow__row:nth-child(odd) .flow__aside, .flow__row:nth-child(even) .flow__aside { grid-column: 2; grid-row: 2; margin-top: 10px; }
    .flow.is-anim .flow__row .flow__body, .flow.is-anim .flow__row .flow__aside { transform: translateY(16px); }
}

/* ============================================================ CTA */
.cta {
    position: relative; overflow: hidden;
    margin-block: clamp(40px, 7vw, 88px);
    padding: clamp(34px, 5vw, 56px) clamp(28px, 5vw, 60px);
    border-radius: 22px;
    background: linear-gradient(120deg, #0e2a4f 0%, #124a7a 55%, #14639a 100%);
    color: #fff;
}
.cta__body { position: relative; z-index: 2; max-width: 32em; }
.cta__body h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; letter-spacing: -.02em; }
.cta__body p { margin: 10px 0 22px; font-size: .95rem; color: #cadcee; }
.cta__art {
    position: absolute; right: -40px; top: 50%; transform: translateY(-50%);
    width: 460px; max-width: 52%;
    mix-blend-mode: screen; opacity: .9;
    pointer-events: none;
}

/* ============================================================ FOOTER
   The whole footer is a designed AAU-blue band; a white wave dips
   out of the page above into it, and a gold edge closes the bottom. */
.footer {
    position: relative; overflow: hidden;
    margin-top: 0;
    background: linear-gradient(120deg, #0c2244 0%, #123f6d 55%, #14639a 100%);
    color: #a9bcd6;
    border-bottom: 3px solid var(--gold);
    padding-top: clamp(40px, 5vw, 64px);
}
/* wave carries the dark finale colour down into the blue footer — no white gap */
.footer__wave {
    position: absolute; left: 0; top: 0; width: 100%;
    height: clamp(26px, 3.4vw, 44px); color: var(--night); display: block;
}

.footer__grid {
    position: relative;
    display: grid; grid-template-columns: 1fr 1fr 1.25fr 1fr; gap: 24px;
    padding-block: 4px clamp(24px, 3.5vw, 36px);
}
.footer__col h4 {
    font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: #fff; margin-bottom: 9px;
}
.footer__col a, .footer__col p {
    display: flex; align-items: center; gap: 8px;
    font-size: .79rem; color: #9db0cc; margin-bottom: 6px;
    transition: color .15s ease;
}
.footer__col a::before {
    content: ""; width: 4px; height: 4px; border-radius: 50%; flex: 0 0 auto;
    background: rgba(255, 255, 255, .4); transition: background-color .15s ease;
}
.footer__col a:hover { color: #fff; }
.footer__col a:hover::before { background: #fff; }
.footer__col svg { width: 14px; height: 14px; flex: 0 0 auto; color: #fff; }

.footer__social { display: flex; flex-direction: column; gap: 8px; }
.footer__social a {
    display: flex; align-items: center; gap: 10px;
    font-size: .79rem; font-weight: 500; color: #9db0cc;
    transition: color .15s ease;
}
.footer__social a:hover { color: #fff; }
.footer__social .si {
    width: 27px; height: 27px; border-radius: 50%; flex: 0 0 auto;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, .1); color: #fff;
    transition: background-color .15s ease;
}
.footer__social a:hover .si { background: rgba(255, 255, 255, .22); }
.footer__social svg { width: 13px; height: 13px; }

.footer__endbar {
    border-top: 1px solid rgba(255, 255, 255, .14);
    text-align: center; color: #8ea3c1; font-size: .76rem; letter-spacing: .01em;
    padding: 13px 0;
}

/* first-run admin bootstrap (rare) */
.setup {
    position: fixed; right: 16px; bottom: 16px; z-index: 90;
    background: var(--card); border: 1px solid var(--line); border-radius: 12px;
    padding: 14px; box-shadow: 0 20px 40px -20px rgba(14,27,51,.3);
}
.setup input { display: block; width: 220px; margin-bottom: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.setup button { width: 100%; padding: 9px; border: none; border-radius: 8px; background: var(--blue); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }

/* ============================================================ RESPONSIVE */
@media (max-width: 1040px) {
    .steps { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
    .step:not(:last-child)::after { display: none; }
    .step__num { left: calc(50% + 18px); }
}
@media (max-width: 900px) {
    .nav__links { display: none; }
    .apps { margin-left: auto; }
    .apps { position: static; }
    .apps__panel { position: fixed; top: 74px; right: 12px; left: 12px; width: auto; }
    .apps::after { position: fixed; top: 67px; right: 28px; }
    .hero { min-height: 0; padding-top: 70px; }
    .hero::before { display: none; }
    .hero__grid { grid-template-columns: 1fr; gap: 28px; padding-block: 36px 36px; }
    .demo { justify-self: center; width: 100%; max-width: 560px; }
    .trustbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .trustbar__item { padding: 18px 16px; }
    .trustbar__item:nth-child(2n) { border-right: none; }
    .trustbar__item:nth-child(2n-1) { padding-left: 0; }
    .trustbar__item:nth-child(n+3) { border-top: 1px solid #e3e9f1; }
    .finale__top { grid-template-columns: 1fr; gap: 24px; }
    .finale__stats {
        flex-direction: row; flex-wrap: wrap; gap: 18px 0;
        padding-left: 0; border-left: none;
    }
    .finale__stats .stat { flex: 1 0 33%; padding-right: 18px; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .hero__title { font-size: clamp(2.1rem, 11vw, 2.9rem); }
    .hero__ctas .btn { flex: 1 1 auto; justify-content: center; }
    .flap { width: 15px; height: 22px; font-size: .68rem; }
    .flaps { gap: 2px; }
    .brow__name { font-size: .78rem; }
    .board { padding: 12px 10px 8px; }
    .trustbar { grid-template-columns: 1fr; }
    .trustbar__item { border-right: none !important; padding: 14px 0 !important; }
    .trustbar__item:not(:first-child) { border-top: 1px solid #e3e9f1; }
    .finale__stats .stat { flex-basis: 50%; }
    .finale__cta { flex-direction: column; align-items: flex-start; }
    .finale__cta .btn--white { width: 100%; justify-content: center; }
    .footer__grid { grid-template-columns: 1fr; }
}

/* ---- systems detail panel: editorial, left-aligned, owned by the system's colour ---- */
.sysbar__panel {
    align-items: flex-start; justify-content: flex-start;
    padding: clamp(26px, 3vw, 40px) clamp(24px, 3.2vw, 44px);
    overflow: hidden; border-radius: 16px;
    background: radial-gradient(70% 80% at 100% 100%, color-mix(in srgb, var(--c) 9%, transparent), transparent 70%);
}
.sysbar__big {
    position: absolute; right: -18px; bottom: -22px; z-index: 0;
    width: clamp(120px, 14vw, 170px); height: clamp(120px, 14vw, 170px);
    color: var(--c); opacity: .16; pointer-events: none;
}
.sysbar__big svg { width: 100%; height: 100%; stroke-width: 1.2; }
.sysbar__paneltop, .sysbar__signin { position: relative; z-index: 1; }
.sysbar__panelhead { justify-content: center; }
.sysbar__panelname { text-align: center; font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1.08; }
.sysbar__status {
    position: absolute; top: 0; right: 0; transform: none;
    padding: 5px 10px; border-radius: 99px; background: #e6f5ec;
}
.sysbar__paneldesc { margin-top: 14px; max-width: none; font-size: .98rem; line-height: 1.6; color: var(--text); -webkit-line-clamp: 4; }
.sysbar__pointshead {
    display: block; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line);
    font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.sysbar__points {
    margin-top: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 18px;
}
.sysbar__pointic { background: var(--c); }
.sysbar__signin { margin-top: auto; align-self: center; }
.sysbar__signinic { background: #fff; color: var(--c); }
@media (max-width: 860px) {
    .sysbar__points { grid-template-columns: 1fr 1fr; }
    .sysbar__signin { margin-top: 26px; }
}

.sysbar__panel { flex: 1 1 auto; }
@media (max-width: 860px) {
    .sysbar__inner { grid-template-columns: minmax(0, 1fr); }
    .sysbar__rail { min-width: 0; }
    .sysbar__tabs { scrollbar-width: none; }
    .sysbar__tabs::-webkit-scrollbar { display: none; }
    .sysbar__radio:nth-of-type(1):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(1) { background: #fff; }
    .sysbar__radio:nth-of-type(2):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(2) { background: #fff; }
    .sysbar__radio:nth-of-type(3):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(3) { background: #fff; }
    .sysbar__radio:nth-of-type(4):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(4) { background: #fff; }
    .sysbar__radio:nth-of-type(5):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(5) { background: #fff; }
    .sysbar__radio:nth-of-type(6):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(6) { background: #fff; }
    .sysbar__radio:nth-of-type(7):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(7) { background: #fff; }
    .sysbar__radio:nth-of-type(8):checked ~ .sysbar__inner .sysbar__tab:nth-of-type(8) { background: #fff; }
    .sysbar__panel { padding: 24px 18px; }
    .sysbar__points { grid-template-columns: 1fr; gap: 12px; }
}

/* ============================================================
   RESPONSIVE v2 — tablet (<=1024) / large phone (<=780) / phone (<=560)
   Appended last on purpose: it owns the small-screen behaviour and
   overrides the older scattered rules above.
   ============================================================ */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.flow { overflow-x: clip; }

/* ---- small laptops / landscape tablets: the systems rail narrows ---- */
@media (max-width: 1100px) and (min-width: 861px) {
    .sysbar__inner { grid-template-columns: 228px minmax(0, 1fr); }
    .sysbar__points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sysbar__panelname { font-size: clamp(1.5rem, 2.8vw, 1.9rem); }
}

/* ---- tablet and below ---- */
@media (max-width: 900px) {
    /* hero: drop the Secure / Fast / Simple / Anywhere strip */
    .trustbar { display: none; }
    .hero__grid { padding-block: 28px 52px; }
    /* hero: the animation leads, the headline sits centred beneath it — two
       lines, each on one row (size scales with width so line 2 never wraps) */
    .demo { order: 1; }
    .hero__copy { order: 2; text-align: center; }
    .hero__title { font-size: clamp(1rem, 5vw, 2rem); line-height: 1.16; margin-bottom: 0; white-space: nowrap; text-wrap: nowrap; }
    .hero__lead, .hero__ctas { display: none; }

    /* footer: all four columns, two across and two down */
    .footer__grid { grid-template-columns: 1fr 1fr; gap: 26px 22px; }
    .footer__col h4 { font-size: .74rem; margin-bottom: 10px; }
    .footer__col a, .footer__col p { font-size: .88rem; margin-bottom: 4px; padding-block: 5px; align-items: flex-start; }
    .footer__col p svg { margin-top: 3px; }
    .footer__endbar { font-size: .8rem; padding: 14px 0 calc(14px + env(safe-area-inset-bottom, 0px)); }
}

/* ---- connected systems: the rail becomes a horizontal strip at <=860 ---- */
@media (max-width: 860px) {
    .sysbar__inner { padding: 8px; border-radius: 20px; }
    .sysbar__rail { padding: 8px; border-radius: 14px; }
    .sysbar__tabs {
        scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
        gap: 6px; padding-bottom: 0;
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent 100%);
                mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent 100%);
    }
    .sysbar__tab { scroll-snap-align: center; height: 42px; gap: 8px; padding: 0 14px 0 8px; border-radius: 10px; background: rgba(255, 255, 255, .06); }
    .sysbar__tabic { width: 26px; height: 26px; border-radius: 8px; }
    .sysbar__tabic svg { width: 13px; height: 13px; }
    .sysbar__tabname { max-width: none; font-size: .82rem; }
    .sysbar__panel { padding: 54px 22px 26px; }
    /* "Connected" pinned to the panel's top-right corner; the title sits centred below it.
       paneltop/panelhead go static so the badge anchors to the panel itself. */
    .sysbar__paneltop { position: static; }
    .sysbar__paneltop > *, .sysbar__panelname { position: relative; z-index: 1; }
    .sysbar__panelhead { position: static; }
    .sysbar__status { position: absolute; top: 14px; right: 14px; z-index: 2; padding: 4px 9px; font-size: .62rem; }
    .sysbar__panelname { font-size: clamp(1.45rem, 4.6vw, 1.9rem); }
    .sysbar__paneldesc { display: block; -webkit-line-clamp: unset; overflow: visible; font-size: .93rem; margin-top: 12px; }
    .sysbar__pointshead { margin-top: 18px; padding-top: 16px; }
    .sysbar__points { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
    .sysbar__points li { font-size: .84rem; }
    .sysbar__points li:nth-child(n+7) { display: none; }   /* the first six say it; keep the panel scannable */
    .sysbar__big { width: 120px; height: 120px; opacity: .1; right: -14px; bottom: -16px; }
    .sysbar__signin { margin-top: 24px; }
}

/* ---- large phone / small tablet portrait ---- */
@media (max-width: 780px) {
    :root { --sec-y: clamp(52px, 11vw, 70px); }
    .nav__inner { gap: 16px; padding-block: 11px; }

    /* How it works: original mobile layout; steps arrive from alternating sides */
    .flow.is-anim .flow__row:not(.is-in):nth-child(odd)  :is(.flow__body, .flow__aside) { opacity: 0; transform: translateX(-34px); }
    .flow.is-anim .flow__row:not(.is-in):nth-child(even) :is(.flow__body, .flow__aside) { opacity: 0; transform: translateX(34px); }

    /* finale */
    .finale__title { font-size: clamp(1.6rem, 7vw, 2.1rem); }
    .finale__lead { font-size: .95rem; }
    .finale__ctatext h3 { font-size: clamp(1.2rem, 5vw, 1.5rem); }
    .finale__ctatext p { font-size: .92rem; }
    .finale__cta .btn { width: 100%; justify-content: center; }
}

/* ---- phone ---- */
@media (max-width: 560px) {
    .nav__inner { gap: 10px; }
    .hero { padding-top: 62px; }
    .hero__grid { gap: 24px; padding-block: 20px 44px; }
    .demo__status { font-size: .76rem; }

    .netz__head h2 { font-size: clamp(1.5rem, 7vw, 1.9rem); }

    /* connected systems on a phone */
    .sysbar { margin-top: 26px; }
    .sysbar__inner { padding: 6px; border-radius: 18px; }
    .sysbar__tab { height: 40px; padding: 0 12px 0 7px; }
    .sysbar__tabname { font-size: .8rem; }
    .sysbar__panel { padding: 50px 16px 22px; border-radius: 14px; }
    .sysbar__big { display: none; }
    .sysbar__panelname { font-size: clamp(1.4rem, 6.6vw, 1.7rem); }
    .sysbar__paneldesc { font-size: .92rem; line-height: 1.58; }
    .sysbar__points { grid-template-columns: 1fr; gap: 11px; }
    .sysbar__points li { font-size: .88rem; }
    .sysbar__signin { align-self: stretch; justify-content: center; margin-top: 22px; }

    /* finale stats stay on one tidy row */
    .finale__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
    .finale__stats .stat { padding: 0 10px; flex: none; }
    .finale__stats .stat:first-child { padding-left: 0; }
    .stat b { font-size: clamp(1.15rem, 5.6vw, 1.45rem); }
    .stat span { font-size: .7rem; line-height: 1.35; display: block; margin-top: 2px; }
    .finale__cta { gap: 18px; }

    /* footer: two compact columns */
    .footer__grid { grid-template-columns: 1fr 1fr; gap: 22px 16px; }
    .footer__col a, .footer__col p { font-size: .84rem; }
}

/* ---- narrow phones (320–400) ---- */
@media (max-width: 400px) {
    .brand img { width: 38px; height: 38px; }
    .brand__en { font-size: .9rem; }
    .brand__am { font-size: .8rem; }
    .footer__col a::before { display: none; }
}

/* ---- touch devices: no sticky hover lifts ---- */
@media (hover: none) {
    .flow__row:hover .flow__body { transform: none; }
    .flow__row:hover .flow__ic, .flow__row:hover .flow__num { transform: none; }
}

/* --- sign-in: nav login / user chip --- */
.nav__login {
    height: 40px; padding: 0 20px; border-radius: 11px; cursor: pointer;
    font: 700 .86rem/1 var(--display, inherit); letter-spacing: -.005em; color: #2a1d02;
    background: linear-gradient(180deg, var(--gold-hi), var(--gold)); border: 1px solid rgba(160, 110, 0, .35);
    box-shadow: 0 8px 16px -10px rgba(160, 110, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .5);
    transition: transform .15s ease, box-shadow .15s ease;
}
.nav__login:hover { transform: translateY(-1px); box-shadow: 0 12px 20px -10px rgba(160, 110, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .5); }
.nav__user { display: flex; align-items: center; gap: 10px; }
.nav__user[hidden] { display: none; }
.nav__av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 800 .85rem var(--display, inherit); color: #fff; background: linear-gradient(160deg, #146396, #01324e); }
.nav__uname { font-size: .86rem; font-weight: 600; color: var(--navy); }
.nav__out { background: none; border: 0; cursor: pointer; font: 600 .8rem var(--body, inherit); color: var(--faint); padding: 6px 4px; }
.nav__out:hover { color: var(--blue); }
html.is-authed .nav__login { display: none; }

/* ============================================================ SIGNED-IN VIEW
   Same visual language as the sign-in page: dotted corner, eyebrow, display title, wave footer.
   Left: greeting, search, recent systems. Right: a white card listing the user's systems.
   Fewer than five systems -> one detailed column; five or more -> two columns. */
html:not(.is-authed) .portal__wave, html:not(.is-authed) .portal { display: none; }
html:not(.is-authed) .apps, html:not(.is-authed) .apps__scrim { display: none !important; }
html.is-authed .hero, html.is-returning .hero, html.is-authed .nav__links, html.is-authed #systems, html.is-authed #how,
html.is-authed #cta, html.is-authed .footer, html.is-authed .nav__login { display: none; }
html.is-authed .nav { position: absolute; background: transparent !important; backdrop-filter: none !important; box-shadow: none !important; border-bottom-color: transparent !important; }
html.is-authed .nav__inner { max-width: 1320px; padding-inline: clamp(18px, 4vw, 56px); }
html.is-authed .nav__user { margin-left: auto; }

/* account button + menu in the navbar */
.nav__user { position: relative; display: flex; align-items: center; }
.nav__user[hidden] { display: none; }
.nav__acct { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px 0 5px; border-radius: 99px; cursor: pointer; background: #fff; border: 1px solid #e6ebf2; color: #94a3b8; box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 16px -10px rgba(16, 43, 66, .28); transition: box-shadow .16s ease, border-color .16s ease; }
.nav__acct:hover { border-color: #cdd7e4; }
.nav__acct[aria-expanded="true"] { border-color: #146396; box-shadow: 0 0 0 4px rgba(20, 99, 150, .12), 0 8px 16px -10px rgba(16, 43, 66, .28); }
.nav__av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(155deg, #2d7fb8, #146396 55%, #0b3a58); }
.nav__av svg { width: 18px; height: 18px; }
.nav__chev { width: 16px; height: 16px; transition: transform .2s ease; }
.nav__acct[aria-expanded="true"] .nav__chev { transform: rotate(180deg); }
.acctmenu { position: absolute; top: calc(100% + 12px); right: 0; z-index: 70; width: 330px; max-width: calc(100vw - 32px); padding: 22px; background: #fff; border: 1px solid #e4e9f1; border-radius: 18px; box-shadow: 0 1px 1px rgba(15, 23, 42, .04), 0 14px 30px -10px rgba(16, 43, 66, .2), 0 40px 70px -26px rgba(11, 58, 88, .3); animation: acctIn .18s ease both; }
.acctmenu[hidden] { display: none; }
@keyframes acctIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.acctmenu__who { display: flex; align-items: center; gap: 14px; }
.acctmenu__av { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; background: linear-gradient(155deg, #2d7fb8, #146396 55%, #0b3a58); }
.acctmenu__av svg { width: 22px; height: 22px; }
.acctmenu__who b { display: block; font-size: 1rem; font-weight: 700; color: #0f172a; line-height: 1.25; }
.acctmenu__who small { display: block; font-size: .84rem; color: #64748b; overflow-wrap: anywhere; }
.acctmenu__rows { margin-top: 16px; border-top: 1px solid #eef1f6; }
.acctmenu__rows div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid #eef1f6; font-size: .88rem; }
.acctmenu__rows dt { color: #64748b; }
.acctmenu__rows dd { font-weight: 600; color: #0f172a; text-align: right; }
.acctmenu__out { width: 100%; height: 46px; margin-top: 16px; font: inherit; font-size: .92rem; font-weight: 600; color: #fff; background: #dc2626; border: 1px solid #dc2626; border-radius: 9px; cursor: pointer; box-shadow: 0 8px 16px -10px rgba(220, 38, 38, .6); transition: background-color .14s; }
.acctmenu__out:hover { background: #b91c1c; border-color: #b91c1c; }
.acctmenu__out:focus-visible { outline: 3px solid rgba(220, 38, 38, .35); outline-offset: 2px; }
.acctmenu__help { margin-top: 14px; text-align: center; font-size: .8rem; color: #64748b; }
.acctmenu__help a { color: #146396; font-weight: 600; }

/* page */
.portal {
    position: relative; overflow: hidden; min-height: 100svh; display: flex; flex-direction: column; padding-top: 76px;
    background:
        radial-gradient(1000px 640px at 84% -8%, rgba(20, 99, 150, .07), transparent 62%),
        radial-gradient(760px 520px at -6% 102%, rgba(224, 169, 46, .06), transparent 58%), #fff;
}
.portal[hidden] { display: none; }
.portal__dots {
    position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .14;
    background-image: radial-gradient(rgba(20, 99, 150, .9) 1.4px, transparent 1.7px), radial-gradient(rgba(15, 23, 42, .7) 1px, transparent 1.3px);
    background-size: 26px 26px, 44px 44px;
    -webkit-mask-image: radial-gradient(1500px 1100px at 108% -8%, #000 0%, #000 20%, transparent 66%);
            mask-image: radial-gradient(1500px 1100px at 108% -8%, #000 0%, #000 20%, transparent 66%);
}
.portal__wave { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: clamp(52px, 9vh, 96px); z-index: 0; pointer-events: none; }
.portal__hero {
    position: relative; z-index: 1; flex: 1 1 auto; width: 100%; max-width: 1180px; margin: 0 auto; text-align: center;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 12px clamp(18px, 4vw, 56px) clamp(90px, 13vh, 130px);
}
.portal .eyebrow { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #ca8a04; }
.portal .eyebrow__dash { width: 22px; height: 2px; border-radius: 2px; background: #eab308; }
.portal__title { margin-top: 14px; font-family: var(--display); font-size: clamp(1.7rem, 3.4vw + .5rem, 3.4rem); font-weight: 800; line-height: 1.08; letter-spacing: -.04em; color: #0f172a; white-space: nowrap; }
.portal__title .blue { background: linear-gradient(100deg, #2d7fb8 0%, #146396 55%, #0b3a58 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.portal__search { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 560px; height: 52px; margin-top: 28px; padding: 0 12px 0 16px; text-align: left; background: #fff; border: 1.5px solid #d3dbe8; border-radius: 12px; color: #94a3b8; box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 16px -10px rgba(16, 43, 66, .22); transition: border-color .18s ease, box-shadow .2s ease; }
.portal__search:hover { border-color: #b4c2d6; }
.portal__search:focus-within { border-color: #146396; box-shadow: 0 0 0 4px rgba(20, 99, 150, .14), 0 12px 24px -12px rgba(20, 99, 150, .45); }
.portal__search svg { width: 18px; height: 18px; flex: none; }
.portal__search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: .95rem; color: #1f2a3d; }
.portal__search kbd, .portal__hint kbd { font: 500 .72rem var(--body, inherit); color: #64748b; border: 1px solid #e2e8f0; border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; background: #fff; }
.portal__hint { margin-top: 26px; font-size: .84rem; color: #94a3b8; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.portal__hint[hidden] { display: none; }

.psys { width: 100%; margin-top: 38px; display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; text-align: left; }
.pcard {
    position: relative; display: flex; flex-direction: column; flex: 0 1 252px; min-height: 190px; padding: 22px 22px 18px;
    background: #fff; border: 1px solid #e4e9f1; border-radius: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 14px 26px -20px rgba(16, 43, 66, .3);
    transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s ease, border-color .2s ease;
    animation: tileIn .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 55ms + 100ms);
}
.pcard[hidden] { display: none; }
@keyframes tileIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.pcard__chip { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #146396; background: #e9f1f6; transition: background-color .25s ease, color .25s ease, transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease; }
.pcard__chip svg { width: 22px; height: 22px; stroke-width: 1.8; }
.pcard__name { margin-top: 16px; font-family: var(--display); font-size: 1.06rem; font-weight: 700; letter-spacing: -.02em; color: #0f172a; }
.pcard__desc { margin-top: 4px; font-size: .84rem; line-height: 1.45; color: #64748b; }
.pcard__open { margin-top: auto; padding-top: 12px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .85rem; color: #146396; opacity: 0; transform: translateX(-6px); transition: opacity .2s ease, transform .25s cubic-bezier(.2, .8, .2, 1); }
.pcard__open svg { width: 16px; height: 16px; }
.pcard__k { position: absolute; top: 18px; right: 18px; font: 500 .72rem var(--body, inherit); color: #94a3b8; border: 1px solid #e2e8f0; border-bottom-width: 2px; border-radius: 6px; padding: 0 7px; min-width: 24px; text-align: center; background: #fff; }
.pcard__k:empty { display: none; }
.pcard:hover, .pcard:focus-visible { transform: translateY(-4px); border-color: #b9d3e6; box-shadow: 0 2px 4px rgba(15, 23, 42, .05), 0 28px 40px -22px rgba(20, 99, 150, .5); }
.pcard:hover .pcard__chip, .pcard:focus-visible .pcard__chip { background: #146396; color: #fff; transform: scale(1.06); box-shadow: 0 12px 20px -10px rgba(20, 99, 150, .8); }
.pcard:hover .pcard__open, .pcard:focus-visible .pcard__open { opacity: 1; transform: none; }
.pcard:focus-visible { outline: 3px solid rgba(20, 99, 150, .35); outline-offset: 2px; }
.pcard:active { transform: translateY(-1px) scale(.99); }
.portal__nomatch, .portal__empty { margin-top: 24px; font-size: .92rem; color: #64748b; max-width: 52ch; }
.portal__nomatch[hidden], .portal__empty[hidden] { display: none; }
.portal__empty a { color: #146396; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .pcard { animation: none; } }
@media (hover: none) { .pcard__open { opacity: 1; transform: none; } .pcard__k { display: none; } .portal__hint { display: none; } }
@media (max-width: 760px) {
    .portal { padding-top: 70px; }
    .portal__hero { padding-bottom: 96px; }
    .portal__title { white-space: normal; font-size: clamp(1.5rem, 7vw, 2.2rem); }
    .psys { gap: 12px; margin-top: 28px; }
    .pcard { flex: 1 1 100%; min-height: 0; flex-direction: row; flex-wrap: wrap; column-gap: 14px; align-items: center; padding: 16px; }
    .pcard__chip { grid-row: span 2; }
    .pcard__name { margin: 0; flex: 1; }
    .pcard__desc { flex: 1 1 100%; margin: 6px 0 0 60px; }
    .pcard__open { display: none; }
    .acctmenu { right: -4px; }
}

/* "not connected yet" notice */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 90; transform: translate(-50%, 16px); opacity: 0; display: flex; align-items: flex-start; gap: 12px; width: max-content; max-width: min(92vw, 520px); padding: 14px 18px; border-radius: 12px; background: #0f172a; color: #e8eef6; font-size: .9rem; line-height: 1.45; box-shadow: 0 18px 40px -12px rgba(15, 23, 42, .5); transition: opacity .22s ease, transform .22s ease; }
.toast[hidden] { display: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 20px; height: 20px; flex: none; margin-top: 1px; color: #f3d27a; }
.toast b { color: #fff; font-weight: 600; }
.toast a { color: #f3d27a; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
/* /apps: stay blank while the page decides between the launcher and the sign-in redirect */
html.is-apps:not(.is-authed) body > *, html.is-returning:not(.is-authed) body > * { display: none !important; }
/* coming back from the sign-in page: no marketing sections flashing by, just a small spinner until the launcher is ready */
html.is-apps:not(.is-authed), html.is-returning:not(.is-authed) { background: #fff; }
html.is-apps:not(.is-authed)::after, html.is-returning:not(.is-authed)::after {
    content: ""; position: fixed; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px;
    border-radius: 50%; border: 3px solid #dbe6f0; border-top-color: #146396; animation: aauSpin .8s linear infinite;
}
@keyframes aauSpin { to { transform: rotate(360deg); } }
/* Log in buttons: a little wider, arrow in the navbar one too */
.nav__login { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-width: 132px; padding: 0 22px; }
.nav__login svg { width: 16px; height: 16px; transition: transform .18s ease; }
.nav__login:hover svg { transform: translateX(3px); }
.hero__ctas .btn--gold { min-width: 196px; justify-content: center; }
@media (max-width: 900px) { .nav__login { min-width: 116px; padding: 0 18px; } }
html.is-authed .apps { margin-left: 0 !important; }
}

/* ---- /apps polish: full-page drifting dots, and cards with an always-visible Open button ---- */
.portal__dots {
    opacity: .16;
    -webkit-mask-image: radial-gradient(1800px 1200px at 50% 38%, #000 0%, rgba(0, 0, 0, .55) 55%, rgba(0, 0, 0, .25) 100%);
            mask-image: radial-gradient(1800px 1200px at 50% 38%, #000 0%, rgba(0, 0, 0, .55) 55%, rgba(0, 0, 0, .25) 100%);
    animation: portalDrift 64s linear infinite, portalBreathe 10s ease-in-out infinite;
}
@keyframes portalDrift { to { background-position: 260px 182px, -190px 150px; } }
@keyframes portalBreathe { 0%, 100% { opacity: .11; } 50% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .portal__dots { animation: none; opacity: .13; } }

.psys { gap: 20px; }
.pcard {
    flex: 0 1 246px; min-height: 0; padding: 24px 22px 22px; border-radius: 20px; overflow: hidden;
    background: linear-gradient(180deg, #fff 0%, #f8fafd 100%); border: 1px solid #e1e8f1;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 18px 32px -22px rgba(16, 43, 66, .38);
}
.pcard::before { content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 3px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, #2d7fb8, #146396 60%, #0b3a58); transform: scaleX(0); transform-origin: left; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.pcard::after { content: ""; position: absolute; right: -40px; top: -40px; width: 150px; height: 150px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(45, 127, 184, .14), transparent 68%); opacity: 0; transition: opacity .35s ease; }
.pcard__chip { width: 54px; height: 54px; border-radius: 16px; color: #fff; background: linear-gradient(155deg, #3a8bc4 0%, #146396 58%, #0b3a58 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -1px 0 rgba(0, 0, 0, .12), 0 14px 20px -10px rgba(20, 99, 150, .75); }
.pcard__chip svg { width: 25px; height: 25px; }
.pcard__name { margin-top: 18px; font-size: 1.12rem; }
.pcard__desc { margin-top: 5px; font-size: .85rem; min-height: 2.9em; }
.pcard__open {
    opacity: 1; transform: none; margin-top: 20px; padding: 0 16px; height: 46px; width: 100%; justify-content: space-between;
    border-radius: 12px; font-size: .92rem; font-weight: 700; color: #fff; letter-spacing: .01em;
    background: linear-gradient(180deg, #2a86bd 0%, #146396 55%, #0f4c72 100%);
    box-shadow: 0 1px 2px rgba(11, 58, 88, .3), 0 12px 20px -12px rgba(20, 99, 150, .9), inset 0 1px 0 rgba(255, 255, 255, .3);
    transition: box-shadow .25s ease, background .25s ease, transform .2s ease;
}
.pcard__open svg { width: 30px; height: 30px; padding: 7px; border-radius: 50%; background: rgba(255, 255, 255, .2); transition: transform .3s cubic-bezier(.2, .8, .2, 1), background-color .2s; }
.pcard:hover, .pcard:focus-visible { transform: translateY(-6px); border-color: #b9d3e6; box-shadow: 0 2px 4px rgba(15, 23, 42, .05), 0 34px 46px -24px rgba(20, 99, 150, .6); }
.pcard:hover::before, .pcard:focus-visible::before { transform: scaleX(1); }
.pcard:hover::after, .pcard:focus-visible::after { opacity: 1; }
.pcard:hover .pcard__chip, .pcard:focus-visible .pcard__chip { background: linear-gradient(155deg, #3a8bc4 0%, #146396 58%, #0b3a58 100%); color: #fff; transform: scale(1.07) rotate(-4deg); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 18px 26px -10px rgba(20, 99, 150, .95); }
.pcard:hover .pcard__open, .pcard:focus-visible .pcard__open { opacity: 1; transform: none; background: linear-gradient(180deg, #f4ce5c 0%, #eab308 55%, #dc9d0b 100%); color: #3a2a05; box-shadow: 0 1px 2px rgba(120, 80, 0, .25), 0 14px 22px -12px rgba(202, 138, 4, .9), inset 0 1px 0 rgba(255, 255, 255, .55); }
.pcard:hover .pcard__open svg, .pcard:focus-visible .pcard__open svg { transform: translateX(3px); background: rgba(58, 42, 5, .14); }
.pcard__k { top: 20px; right: 20px; }
@media (hover: none) { .pcard__open { opacity: 1; } }
@media (max-width: 760px) {
    .psys { gap: 14px; }
    .pcard { flex: 1 1 100%; flex-direction: column; flex-wrap: nowrap; align-items: stretch; padding: 20px; }
    .pcard__chip { grid-row: auto; }
    .pcard__name { margin: 16px 0 0; flex: none; }
    .pcard__desc { flex: none; margin: 4px 0 0; min-height: 0; }
    .pcard__open { display: inline-flex; width: 100%; height: 46px; margin: 16px 0 0; padding: 0 16px; gap: 0; }
    .pcard__open svg { width: 30px; height: 30px; padding: 7px; }
}

/* ---- /apps v3: grouped sections, horizontal cards, compact Open pill ---- */
.portal__hero { max-width: 1120px; }
.psys { display: block; margin-top: 44px; text-align: left; }
.pgroup { margin-top: 34px; }
.pgroup:first-child { margin-top: 0; }
.pgroup[hidden] { display: none; }
.pgroup__head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; font-family: var(--display); font-size: 1.12rem; font-weight: 800; letter-spacing: -.02em; color: #0f172a; }
.pgroup__head i { flex: 1; height: 1px; background: linear-gradient(90deg, #dbe3ee, transparent); }
.pgroup__head em { font: 500 .8rem var(--body, inherit); font-style: normal; letter-spacing: 0; color: #94a3b8; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.pcard {
    flex: none; min-height: 0; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 16px;
    padding: 18px 18px 18px 18px; border-radius: 18px; background: #fff; border: 1px solid #e3e9f1;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 14px 24px -20px rgba(16, 43, 66, .35);
}
.pcard::before, .pcard::after { display: none; }
.pcard__chip { grid-row: span 2; width: 52px; height: 52px; border-radius: 15px; }
.pcard__txt { display: block; min-width: 0; }
.pcard__name { margin: 0; font-size: 1.06rem; display: block; }
.pcard__desc { display: block; margin-top: 3px; min-height: 0; font-size: .82rem; line-height: 1.4; }
.pcard__open {
    grid-column: 3; grid-row: 1 / span 2; width: auto; height: 38px; margin: 0; padding: 0 8px 0 16px; gap: 10px; justify-content: center;
    border-radius: 99px; font-size: .86rem; font-weight: 700; color: #146396; background: #fff; border: 1.5px solid #bcd3e4;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05); opacity: 1; transform: none; transition: background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.pcard__open svg { width: 24px; height: 24px; padding: 5px; border-radius: 50%; background: #e9f1f6; color: #146396; transition: transform .3s cubic-bezier(.2, .8, .2, 1), background-color .2s, color .2s; }
.pcard__k { position: static; display: none; }
.pcard:hover, .pcard:focus-visible { transform: translateY(-3px); border-color: #b9d3e6; box-shadow: 0 2px 4px rgba(15, 23, 42, .05), 0 26px 36px -22px rgba(20, 99, 150, .5); }
.pcard:hover .pcard__open, .pcard:focus-visible .pcard__open { background: linear-gradient(180deg, #f4ce5c 0%, #eab308 55%, #dc9d0b 100%); border-color: #d9a006; color: #3a2a05; box-shadow: 0 1px 2px rgba(120, 80, 0, .2), 0 12px 18px -10px rgba(202, 138, 4, .85), inset 0 1px 0 rgba(255, 255, 255, .55); }
.pcard:hover .pcard__open svg, .pcard:focus-visible .pcard__open svg { background: rgba(58, 42, 5, .14); color: #3a2a05; transform: translateX(3px); }
@media (max-width: 760px) {
    .psys { margin-top: 30px; }
    .pgrid { grid-template-columns: 1fr; gap: 12px; }
    .pcard { grid-template-columns: auto 1fr; padding: 16px; }
    .pcard__open { grid-column: 1 / -1; grid-row: auto; width: 100%; justify-content: space-between; margin-top: 10px; height: 42px; padding: 0 8px 0 18px; border-radius: 12px; }
    .pcard__chip { grid-row: auto; }
}
/* one even 2-column board: groups only order the cards */
.psys { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 40px; max-width: 1020px; margin-inline: auto; }
.pgroup, .pgrid { display: contents; }
.pgroup__head { display: none; }
.pcard { padding: 20px 20px 20px 20px; }
@media (max-width: 860px) { .psys { grid-template-columns: 1fr; } }

/* ---- /apps v4: every system listed (locked ones muted), name + email in the navbar, 9-dot before the account ---- */
html.is-authed .apps { margin-left: auto !important; order: 1; }
html.is-authed .nav__user { margin-left: 12px; order: 2; }
.nav__acct { padding-right: 14px; gap: 12px; height: 52px; }
.nav__acct .nav__av { width: 40px; height: 40px; }
.nav__who { display: flex; flex-direction: column; align-items: flex-start; text-align: left; line-height: 1.2; min-width: 0; }
.nav__who b { font-size: .88rem; font-weight: 700; color: #0f172a; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav__who small { font-size: .74rem; color: #64748b; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acctmenu { width: 320px; }
.pcard.is-locked { background: #f7f9fc; box-shadow: none; order: 2; }
.pcard.is-locked .pcard__chip { background: #e6ebf2; color: #94a3b8; box-shadow: none; }
.pcard.is-locked .pcard__name { color: #64748b; }
.pcard.is-locked .pcard__desc { color: #94a3b8; }
.pcard.is-locked .pcard__open { color: #94a3b8; border-color: #dbe3ee; background: transparent; box-shadow: none; padding: 0 16px; }
.pcard.is-locked .pcard__open svg { display: none; }
.pcard.is-locked:hover, .pcard.is-locked:focus-visible { transform: none; border-color: #dbe3ee; box-shadow: none; }
.pcard.is-locked:hover .pcard__chip { transform: none; background: #e6ebf2; color: #94a3b8; box-shadow: none; }
.pcard.is-locked:hover .pcard__open { background: transparent; border-color: #dbe3ee; color: #94a3b8; box-shadow: none; }
@media (max-width: 860px) { .nav__who small { display: none; } .nav__who b { max-width: 110px; } }
@media (max-width: 560px) { .nav__who { display: none; } .nav__acct { height: 46px; padding-right: 12px; } .nav__acct .nav__av { width: 36px; height: 36px; } }
.acctmenu__who { display: none; } .acctmenu__rows { margin-top: 0; border-top: 0; }

/* ---- /apps v5: only approved systems, three columns ---- */
.portal__hero { max-width: 1200px; }
.psys { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1120px; gap: 20px; }
.pcard { grid-template-columns: auto 1fr; align-items: start; gap: 6px 16px; padding: 22px; }
.pcard__chip { grid-row: 1 / span 2; width: 54px; height: 54px; }
.pcard__txt { grid-column: 2; }
.pcard__open { grid-column: 1 / -1; grid-row: 3; justify-self: stretch; width: 100%; height: 42px; margin-top: 12px; padding: 0 8px 0 18px; justify-content: space-between; border-radius: 12px; }
@media (max-width: 1060px) { .psys { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .psys { grid-template-columns: 1fr; } }
/* centre an incomplete last row */
.psys { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.pcard { flex: 0 0 calc((100% - 40px) / 3); max-width: calc((100% - 40px) / 3); }
@media (max-width: 1060px) { .pcard { flex-basis: calc((100% - 20px) / 2); max-width: calc((100% - 20px) / 2); } }
@media (max-width: 700px) { .pcard { flex-basis: 100%; max-width: 100%; } }

/* ---- /apps v6: back to two columns, horizontal cards with the Open pill on the right ---- */
.psys { max-width: 1020px; gap: 18px; }
.pcard { flex: 0 0 calc((100% - 18px) / 2); max-width: calc((100% - 18px) / 2); grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 16px; padding: 20px; }
.pcard__chip { grid-row: span 2; }
.pcard__txt { grid-column: auto; }
.pcard__open { grid-column: 3; grid-row: 1 / span 2; justify-self: auto; width: auto; height: 38px; margin: 0; padding: 0 8px 0 16px; gap: 10px; justify-content: center; border-radius: 99px; }
@media (max-width: 860px) {
    .pcard { flex-basis: 100%; max-width: 100%; }
}
@media (max-width: 700px) {
    .pcard { grid-template-columns: auto 1fr; padding: 18px; }
    .pcard__open { grid-column: 1 / -1; grid-row: auto; width: 100%; height: 42px; margin-top: 10px; border-radius: 12px; justify-content: space-between; padding: 0 8px 0 18px; }
    .pcard__chip { grid-row: auto; }
}

/* ---- navbar account: plain icon + name + email (no button chrome), tighter spacing; search icon on the right ---- */
html.is-authed .nav__user { margin-left: 4px; }
html.is-authed .nav__inner { gap: 8px; }
.nav__acct { height: auto; padding: 4px 6px; gap: 10px; border: 0; border-radius: 12px; background: transparent; box-shadow: none; }
.nav__acct:hover { background: rgba(20, 99, 150, .07); border: 0; }
.nav__acct[aria-expanded="true"] { background: rgba(20, 99, 150, .09); border: 0; box-shadow: none; }
.nav__chev { display: none; }
.portal__search { padding: 0 16px 0 20px; }
.portal__search input { order: 1; }
.portal__search svg { order: 2; margin-left: 10px; color: #64748b; }
.portal__search:focus-within svg { color: #146396; }
.portal__search input::-webkit-search-cancel-button { display: none; }

/* ---- /apps: less white. Tinted page, a soft stage behind the cards, concentric rings, stronger colour washes ---- */
.portal {
    background:
        radial-gradient(900px 520px at 88% -6%, rgba(45, 127, 184, .20), transparent 64%),
        radial-gradient(760px 520px at -4% 96%, rgba(234, 179, 8, .16), transparent 62%),
        radial-gradient(620px 420px at 50% 6%, rgba(20, 99, 150, .10), transparent 70%),
        linear-gradient(180deg, #e7f0f8 0%, #eff5fa 38%, #f6f9fc 72%, #eef4f9 100%);
}
.portal::before {
    content: ""; position: absolute; left: 50%; top: 150px; width: 1500px; height: 1500px; margin-left: -750px; z-index: 0; pointer-events: none; border-radius: 50%;
    background: repeating-radial-gradient(circle at center, transparent 0, transparent 118px, rgba(20, 99, 150, .075) 119px, transparent 121px);
    -webkit-mask-image: radial-gradient(circle at center, #000 0%, rgba(0, 0, 0, .55) 38%, transparent 66%);
            mask-image: radial-gradient(circle at center, #000 0%, rgba(0, 0, 0, .55) 38%, transparent 66%);
}
.portal__dots { opacity: .2; }
.portal__search { background: rgba(255, 255, 255, .92); }
.psys {
    padding: 22px; border-radius: 30px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .22));
    border: 1px solid rgba(255, 255, 255, .9);
    box-shadow: 0 0 0 1px rgba(20, 99, 150, .10), 0 30px 60px -36px rgba(11, 58, 88, .35), inset 0 1px 0 rgba(255, 255, 255, .9);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.pcard { border-color: #dde7f1; }
@media (max-width: 700px) { .psys { padding: 12px; border-radius: 22px; } .portal::before { top: 220px; } }

/* no panel behind the systems: the cards sit straight on the tinted page */
.psys { padding: 0; border-radius: 0; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
@media (max-width: 700px) { .psys { padding: 0; border-radius: 0; } }

/* The launcher's tiles are shown or hidden through the [hidden] attribute (set by the page script from the user's roles).
   `.apps__app { display: flex }` would otherwise override it and show every system, so this rule must win. Keep it last. */
.apps__app[hidden], .pcard[hidden], .pgroup[hidden] { display: none !important; }

/* the shared launcher sits in the navbar of the signed-in page; visitors who are not signed in do not see it */
.nav__launcher { flex: 0 0 auto; display: flex; align-items: center; }
html:not(.is-authed) .nav__launcher { display: none !important; }
html.is-authed .nav__launcher { margin-left: auto; order: 1; }
