:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    color: #172033;
    background: #f3f5f8;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 15% 10%, rgba(15, 23, 42, .06), transparent 32rem),
        linear-gradient(145deg, #f8fafc 0%, #edf1f5 100%);
}

.portal-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 48px auto;
}

.portal-header {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 32px;
}

.portal-logo {
    flex: 0 0 auto;
    border-radius: 50%;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .14);
}

.eyebrow,
.app-kicker {
    display: block;
    color: #657084;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .1em;
    text-transform: uppercase;
}

h1 {
    margin: 4px 0 5px;
    color: #111827;
    font-size: clamp(30px, 5vw, 46px);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.portal-header p {
    margin: 0;
    color: #657084;
    font-size: 17px;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 20px;
}

.app-card {
    min-height: 242px;
    padding: 28px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 18px;
    color: inherit;
    text-decoration: none;
    border: 1px solid #dce2ea;
    border-radius: 22px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.app-card:hover,
.app-card:focus-visible {
    transform: translateY(-4px);
    border-color: #aab4c3;
    box-shadow: 0 24px 54px rgba(15, 23, 42, .14);
    outline: none;
}

.app-card-primary {
    color: #fff;
    border-color: #111827;
    background: linear-gradient(145deg, #111827, #05070b);
}

.app-card-primary .app-kicker,
.app-card-primary .app-copy > span:last-child {
    color: #b8c1cf;
}

.app-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: #111827;
    background: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .16);
}

.app-icon-energy {
    color: #7c4a03;
    background: #fef3c7;
    box-shadow: none;
}

.app-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-icon-energy svg {
    fill: currentColor;
    stroke: none;
}

.app-copy {
    align-self: stretch;
    display: flex;
    flex-direction: column;
}

.app-copy strong {
    margin: 8px 0 10px;
    font-size: 25px;
    letter-spacing: -.025em;
}

.app-copy > span:last-child {
    color: #657084;
    line-height: 1.55;
}

.app-arrow {
    align-self: end;
    font-size: 27px;
    transition: transform .18s ease;
}

.app-card:hover .app-arrow,
.app-card:focus-visible .app-arrow {
    transform: translateX(4px);
}

footer {
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: #778195;
    font-size: 13px;
}

@media (max-width: 720px) {
    .portal-shell {
        margin: 28px auto;
    }

    .portal-header {
        align-items: flex-start;
    }

    .portal-logo {
        width: 62px;
        height: 62px;
    }

    .app-grid {
        grid-template-columns: 1fr;
    }

    .app-card {
        min-height: 205px;
    }
}

@media (max-width: 460px) {
    .portal-header {
        display: block;
    }

    .portal-logo {
        margin-bottom: 18px;
    }

    .app-card {
        padding: 22px;
        grid-template-columns: auto minmax(0, 1fr);
    }

    .app-arrow {
        display: none;
    }

    footer {
        display: grid;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-card,
    .app-arrow {
        transition: none;
    }
}
