:root {
    --navy-950: #041020;
    --navy-900: #071a33;
    --navy-800: #0b294d;
    --blue-700: #1559b7;
    --blue-600: #1d6fe8;
    --blue-500: #3485f5;
    --cyan-400: #29c5db;
    --gold-400: #f4bd42;

    --slate-950: #111827;
    --slate-800: #253148;
    --slate-700: #37445b;
    --slate-600: #536078;
    --slate-500: #6d7890;
    --slate-300: #ccd4e0;
    --slate-200: #e3e8f0;
    --slate-100: #f0f3f8;
    --slate-50: #f7f9fc;

    --white: #ffffff;
    --success: #159a68;
    --danger: #c9364d;

    --shadow-sm:
        0 1px 2px rgba(5, 20, 40, 0.06),
        0 4px 14px rgba(5, 20, 40, 0.06);

    --shadow-lg:
        0 22px 70px rgba(5, 20, 40, 0.16),
        0 3px 12px rgba(5, 20, 40, 0.08);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;

    --focus-ring:
        0 0 0 4px rgba(29, 111, 232, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--slate-50);
    color-scheme: light;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--slate-950);
    background:
        radial-gradient(
            circle at 8% 5%,
            rgba(52, 133, 245, 0.12),
            transparent 26rem
        ),
        radial-gradient(
            circle at 92% 2%,
            rgba(41, 197, 219, 0.11),
            transparent 24rem
        ),
        linear-gradient(180deg, #f8fbff 0%, #f1f5fa 100%);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
input,
select {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: var(--blue-700);
}

a:hover {
    color: var(--blue-600);
}

.page-shell {
    width: min(1440px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    padding: 0 clamp(18px, 4vw, 64px);
    display: flex;
    flex-direction: column;
}

.site-header {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    color: var(--navy-900);
    text-decoration: none;
}

.brand-mark {
    width: 44px;
    height: 44px;
    padding: 3px;
    border-radius: 14px;
    background:
        linear-gradient(145deg, var(--blue-600), var(--cyan-400));
    box-shadow: 0 9px 25px rgba(29, 111, 232, 0.22);
}

.brand-mark-inner {
    width: 100%;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 11px;
    display: grid;
    place-items: center;
    color: white;
    font-size: 21px;
    font-weight: 850;
    background: rgba(7, 26, 51, 0.25);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-copy strong {
    font-size: 20px;
    letter-spacing: 0.05em;
}

.brand-copy span {
    margin-top: 3px;
    color: var(--slate-600);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.04em;
}

.security-status {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(21, 154, 104, 0.18);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #08724a;
    background: rgba(229, 251, 242, 0.8);
    font-size: 13px;
    font-weight: 700;
}

.main-content {
    flex: 1;
    padding: clamp(24px, 5vw, 72px) 0;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(420px, 0.78fr);
    gap: clamp(40px, 7vw, 112px);
    align-items: center;
}

.intro-panel {
    min-width: 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 20px;
    color: var(--blue-700);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.15em;
}

.eyebrow::before {
    width: 28px;
    height: 2px;
    content: "";
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        var(--blue-600),
        var(--cyan-400)
    );
}

h1 {
    max-width: 660px;
    margin: 0;
    color: var(--navy-900);
    font-size: clamp(40px, 5vw, 70px);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.intro-text {
    max-width: 620px;
    margin: 25px 0 0;
    color: var(--slate-600);
    font-size: clamp(16px, 1.4vw, 19px);
    line-height: 1.7;
}

.trust-points {
    margin-top: 33px;
    display: grid;
    gap: 13px;
}

.trust-point {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--slate-700);
    font-size: 14px;
    font-weight: 600;
}

.trust-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    border: 1px solid rgba(21, 154, 104, 0.2);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--success);
    background: #eafaf4;
    font-weight: 800;
}

.federation-visual {
    width: min(450px, 90%);
    aspect-ratio: 1.8;
    position: relative;
    margin-top: 48px;
    display: grid;
    place-items: center;
}

.visual-orbit {
    position: absolute;
    border: 1px dashed rgba(29, 111, 232, 0.25);
    border-radius: 50%;
}

.orbit-one {
    width: 78%;
    height: 80%;
}

.orbit-two {
    width: 100%;
    height: 100%;
    border-color: rgba(41, 197, 219, 0.18);
}

.visual-core {
    width: 116px;
    height: 116px;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 32px;
    display: grid;
    place-content: center;
    color: white;
    text-align: center;
    background:
        linear-gradient(145deg, var(--navy-800), var(--blue-600));
    box-shadow:
        0 22px 50px rgba(11, 41, 77, 0.24),
        inset 0 1px rgba(255, 255, 255, 0.25);
}

.visual-core span {
    font-size: 25px;
    font-weight: 850;
    letter-spacing: 0.05em;
}

.visual-core small {
    margin-top: 3px;
    font-size: 11px;
    opacity: 0.8;
}

.visual-node {
    position: absolute;
    min-width: 90px;
    padding: 9px 13px;
    border: 1px solid rgba(29, 111, 232, 0.12);
    border-radius: 999px;
    color: var(--navy-800);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-sm);
    font-size: 11px;
    font-weight: 750;
    text-align: center;
}

.node-one {
    top: 1%;
    left: 3%;
}

.node-two {
    right: 1%;
    top: 18%;
}

.node-three {
    bottom: 2%;
    left: 14%;
}

.discovery-card {
    width: 100%;
    min-width: 0;
    padding: clamp(25px, 3vw, 39px);
    border: 1px solid rgba(210, 220, 232, 0.92);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.step-label {
    display: block;
    margin-bottom: 7px;
    color: var(--blue-700);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.card-header h2 {
    margin: 0;
    color: var(--navy-900);
    font-size: clamp(25px, 2.3vw, 33px);
    letter-spacing: -0.035em;
}

.live-indicator {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--slate-600);
    font-size: 11px;
    font-weight: 700;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(21, 154, 104, 0.12);
}

.card-description {
    margin: 12px 0 24px;
    color: var(--slate-600);
    font-size: 14px;
    line-height: 1.6;
}

.loading-state {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    color: var(--slate-600);
    font-size: 14px;
}

.loading-state[hidden] {
    display: none;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--slate-200);
    border-top-color: var(--blue-600);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/*
 * EDS integration
 */

#idpSelect {
    min-width: 0;
    color: var(--slate-800);
}

#idpSelect:empty {
    min-height: 4px;
}

/* Reset legacy EDS layout constraints. */
#idpSelect table,
#idpSelect tbody,
#idpSelect tr,
#idpSelect td {
    width: 100% !important;
    max-width: 100% !important;
}

#idpSelect table {
    border-spacing: 0 !important;
}

#idpSelect label {
    display: block;
    margin: 0 0 8px;
    color: var(--slate-800);
    font-size: 13px;
    font-weight: 750;
}

#idpSelect input[type="text"],
#idpSelect input[type="search"],
#idpSelect select {
    width: 100% !important;
    min-height: 52px;
    padding: 0 15px;
    border: 1px solid var(--slate-300);
    border-radius: 13px;
    outline: none;
    color: var(--slate-950);
    background: var(--white);
    box-shadow:
        0 1px 2px rgba(5, 20, 40, 0.03),
        inset 0 1px rgba(5, 20, 40, 0.01);
    font-size: 15px;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;
}

#idpSelect input[type="text"]:hover,
#idpSelect input[type="search"]:hover,
#idpSelect select:hover {
    border-color: #a8b5c7;
}

#idpSelect input[type="text"]:focus,
#idpSelect input[type="search"]:focus,
#idpSelect select:focus {
    border-color: var(--blue-600);
    box-shadow: var(--focus-ring);
}

#idpSelect input::placeholder {
    color: #8993a5;
}

/* Dropdown and result containers from multiple EDS versions. */
#idpSelect ul,
#idpSelect .IdPSelectDropDown,
#idpSelect .IdPSelectPreferredIdPButton,
#idpSelect .IdPSelectIdPEntry,
#idpSelect [class*="IdPSelect"] {
    max-width: 100%;
}

#idpSelect ul {
    margin: 10px 0 0;
    padding: 7px;
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    list-style: none;
    background: var(--white);
    box-shadow: 0 15px 35px rgba(5, 20, 40, 0.13);
}

#idpSelect li {
    margin: 3px 0;
    border-radius: 10px;
}

#idpSelect li:hover {
    background: var(--slate-50);
}

#idpSelect a,
#idpSelect button,
#idpSelect [role="button"] {
    border-radius: 11px;
}

#idpSelect a {
    color: var(--navy-800);
    text-decoration: none;
}

#idpSelect li a,
#idpSelect li button,
#idpSelect .IdPSelectIdPEntry {
    width: 100%;
    min-height: 54px;
    padding: 9px 11px;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 0;
    color: var(--navy-900);
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition:
        background-color 150ms ease,
        transform 150ms ease;
}

#idpSelect li a:hover,
#idpSelect li button:hover,
#idpSelect .IdPSelectIdPEntry:hover {
    background: #f1f6ff;
}

#idpSelect input[type="submit"],
#idpSelect button[type="submit"],
#idpSelect .IdPSelectSelectButton {
    width: 100% !important;
    min-height: 50px;
    margin-top: 14px;
    padding: 0 18px;
    border: 0;
    border-radius: 13px;
    color: var(--white);
    background:
        linear-gradient(135deg, var(--blue-700), var(--blue-500));
    box-shadow: 0 11px 26px rgba(29, 111, 232, 0.25);
    font-weight: 800;
    cursor: pointer;
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        filter 160ms ease;
}

#idpSelect input[type="submit"]:hover,
#idpSelect button[type="submit"]:hover,
#idpSelect .IdPSelectSelectButton:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow: 0 14px 31px rgba(29, 111, 232, 0.3);
}

#idpSelect input[type="submit"]:active,
#idpSelect button[type="submit"]:active {
    transform: translateY(0);
}

#idpSelect a:focus-visible,
#idpSelect button:focus-visible,
#idpSelect input:focus-visible,
#idpSelect select:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.institution-avatar {
    width: 37px;
    height: 37px;
    flex: 0 0 auto;
    border-radius: 11px;
    display: grid;
    place-items: center;
    color: white;
    background:
        linear-gradient(145deg, var(--navy-800), var(--blue-600));
    font-size: 14px;
    font-weight: 850;
}

.institution-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.institution-copy strong {
    color: var(--navy-900);
    font-size: 14px;
    font-weight: 780;
}

.institution-copy small {
    overflow: hidden;
    color: var(--slate-500);
    font-size: 11px;
    font-weight: 550;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Legacy EDS notices and messages. */
#idpSelect .IdPSelectError,
#idpSelect [class*="Error"] {
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid rgba(201, 54, 77, 0.2);
    border-radius: 11px;
    color: #9f1f36;
    background: #fff1f3;
    font-size: 13px;
    line-height: 1.5;
}

#idpSelect img {
    max-width: 100%;
    height: auto;
}

.privacy-note {
    margin-top: 23px;
    padding-top: 19px;
    border-top: 1px solid var(--slate-200);
    display: flex;
    gap: 10px;
    color: var(--slate-600);
}

.privacy-note svg {
    flex: 0 0 auto;
    margin-top: 1px;
    color: var(--blue-700);
}

.privacy-note p {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
}

.site-footer {
    min-height: 80px;
    padding: 20px 0;
    border-top: 1px solid rgba(204, 212, 224, 0.75);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    color: var(--slate-500);
    font-size: 12px;
}

.site-footer p {
    margin: 0;
}

.site-footer nav {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.site-footer a {
    color: var(--slate-600);
    font-weight: 650;
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--blue-700);
}

@media (max-width: 980px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 40px;
        padding-top: 30px;
    }

    .intro-panel {
        text-align: center;
    }

    .intro-content,
    .intro-text,
    h1 {
        margin-left: auto;
        margin-right: auto;
    }

    .eyebrow {
        justify-content: center;
    }

    .trust-points {
        width: fit-content;
        margin-left: auto;
        margin-right: auto;
        text-align: left;
    }

    .federation-visual {
        display: none;
    }

    .discovery-card {
        width: min(610px, 100%);
        margin: 0 auto;
    }
}

@media (max-width: 620px) {
    .page-shell {
        padding: 0 15px;
    }

    .site-header {
        min-height: 74px;
    }

    .brand-mark {
        width: 39px;
        height: 39px;
        border-radius: 12px;
    }

    .brand-copy strong {
        font-size: 17px;
    }

    .brand-copy span {
        font-size: 10px;
    }

    .security-status {
        padding: 0 10px;
    }

    .security-status span {
        display: none;
    }

    .main-content {
        padding: 20px 0 38px;
    }

    h1 {
        font-size: clamp(36px, 11vw, 48px);
    }

    .intro-text {
        margin-top: 18px;
        font-size: 15px;
    }

    .trust-points {
        display: none;
    }

    .discovery-card {
        padding: 23px 18px;
        border-radius: 19px;
    }

    .card-header {
        display: block;
    }

    .live-indicator {
        margin-top: 12px;
    }

    #idpSelect input[type="text"],
    #idpSelect input[type="search"],
    #idpSelect select {
        min-height: 50px;
        font-size: 16px;
    }

    .site-footer {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: more) {
    .discovery-card {
        border-color: var(--slate-700);
    }

    #idpSelect input[type="text"],
    #idpSelect input[type="search"],
    #idpSelect select {
        border-color: var(--slate-700);
    }
}
