:root {
    --isa-dark: #0a4b59;
    --isa-primary: #16808c;
    --isa-primary-soft: rgba(22, 128, 140, .10);
    --isa-gradient: linear-gradient(135deg, #0a4b59 0%, #16808c 100%);
    --background: #ffffff;
    --surface: #f8fafc;
    --text: #102a43;
    --text-light: #5b7083;
    --border: #e5e7eb;
    --shadow-soft: 0 1px 2px rgba(16, 42, 67, .04), 0 8px 24px -12px rgba(16, 42, 67, .12);
    --shadow-lift: 0 1px 2px rgba(16, 42, 67, .04), 0 18px 48px -16px rgba(10, 75, 89, .22);
}

* { box-sizing: border-box; }

html {
    min-height: 100%;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: var(--surface);
    font-family: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }
a, button { -webkit-tap-highlight-color: transparent; }

::selection {
    color: var(--isa-dark);
    background: rgba(22, 128, 140, .18);
}

:focus-visible {
    outline: 2px solid var(--isa-primary);
    outline-offset: 3px;
    border-radius: 6px;
}

.skip-link {
    position: fixed;
    left: 16px;
    top: -80px;
    z-index: 100;
    border-radius: 10px;
    padding: 10px 14px;
    color: #fff;
    background: var(--isa-dark);
    transition: top .2s ease;
}

.skip-link:focus { top: 16px; }

.public-portal { background: var(--surface); }

.landing-shell {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.landing-header {
    display: flex;
    min-height: 80px;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, .86);
    padding: 14px 24px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.landing-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--isa-dark);
    font-size: 1.18rem;
    font-weight: 600;
    letter-spacing: -.025em;
}

.landing-brand img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.landing-main {
    width: min(1160px, calc(100% - 40px));
    flex: 1;
    margin: 0 auto;
    padding: 70px 0 76px;
}

.landing-hero {
    margin-bottom: 56px;
    text-align: center;
}

.landing-hero h1 {
    margin: 0;
    color: var(--isa-dark);
    font-size: clamp(2.5rem, 5.2vw, 3.85rem);
    font-weight: 600;
    letter-spacing: -.055em;
    line-height: 1.06;
}

.landing-hero > p {
    max-width: 610px;
    margin: 18px auto 0;
    color: var(--text-light);
    font-size: clamp(1rem, 2vw, 1.18rem);
    line-height: 1.6;
}

.landing-hero-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    color: #94a3b8;
    font-size: .84rem;
}

.landing-hero-links a {
    color: var(--isa-primary);
    font-weight: 600;
}

.landing-hero-links a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.landing-platform-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.landing-platform-card {
    display: flex;
    min-height: 182px;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: #fff;
    padding: 24px;
    box-shadow: var(--shadow-soft);
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease, opacity .3s ease;
}

.landing-platform-card[href]:hover {
    transform: translateY(-5px);
    border-color: rgba(22, 128, 140, .3);
    box-shadow: var(--shadow-lift);
}

.landing-platform-primary {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.landing-platform-icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: var(--isa-primary);
    background: var(--isa-primary-soft);
    transition: color .35s ease, background .35s ease, transform .35s ease;
}

.landing-platform-card[href]:hover .landing-platform-icon {
    color: #fff;
    background: var(--isa-gradient);
    transform: scale(1.07);
}

.landing-platform-copy { min-width: 0; }

.landing-platform-copy strong {
    display: block;
    color: var(--isa-dark);
    font-size: 1.06rem;
    font-weight: 600;
    letter-spacing: -.02em;
}

.landing-platform-copy small {
    display: -webkit-box;
    margin-top: 6px;
    overflow: hidden;
    color: var(--text-light);
    font-size: .82rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.landing-platform-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
    border-top: 1px solid var(--border);
    padding-top: 15px;
}

.landing-platform-footer code {
    min-width: 0;
    overflow: hidden;
    color: var(--text-light);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.landing-platform-footer span {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
    color: var(--isa-primary);
    font-size: .78rem;
    font-weight: 600;
    transition: gap .2s ease;
}

.landing-platform-card[href]:hover .landing-platform-footer span { gap: 8px; }

.landing-platform-card-disabled {
    cursor: not-allowed;
    opacity: .66;
}

.landing-platform-card-disabled .landing-platform-icon {
    color: #64748b;
    background: #f1f5f9;
}

.landing-platform-unavailable { color: #64748b !important; }

.landing-empty {
    grid-column: 1 / -1;
    display: grid;
    min-height: 220px;
    place-items: center;
    align-content: center;
    gap: 10px;
    border: 1px dashed #cbd5e1;
    border-radius: 24px;
    padding: 32px;
    color: var(--text-light);
    background: rgba(255, 255, 255, .72);
    text-align: center;
}

.landing-empty svg { color: var(--isa-primary); }
.landing-empty strong { color: var(--isa-dark); font-size: 1.05rem; }
.landing-empty p { max-width: 440px; margin: 0; line-height: 1.6; }

.landing-footer {
    border-top: 1px solid var(--border);
    background: #fff;
    padding: 22px 20px;
    text-align: center;
}

.landing-footer p {
    margin: 0;
    color: var(--text-light);
    font-size: .72rem;
}

.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .42s cubic-bezier(.22, 1, .36, 1), transform .42s cubic-bezier(.22, 1, .36, 1);
    transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 980px) {
    .landing-platform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .landing-header { min-height: 72px; }
    .landing-main { width: min(100% - 28px, 1160px); padding: 50px 0 56px; }
    .landing-hero { margin-bottom: 38px; }
    .landing-platform-grid { grid-template-columns: 1fr; gap: 14px; }
    .landing-platform-card { min-height: 170px; padding: 20px; border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
}
