:root {
    color-scheme: dark;
    --eg-bg: #08131f;
    --eg-surface: #111e2b;
    --eg-surface-2: #172536;
    --eg-border: #273648;
    --eg-text: #f3f0e8;
    --eg-muted: #9ca8b7;
    --eg-orange: #ff5c2b;
    --eg-amber: #ffb52c;
    --eg-mint: #50e3ae;
}

html,
body {
    min-height: 100%;
    margin: 0;
    background: var(--eg-bg);
    color: var(--eg-text);
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

a {
    color: var(--eg-amber);
}

a:hover {
    color: #ffd372;
}

h1,
h2,
h3 {
    font-family: Impact, 'Arial Narrow', Arial, sans-serif;
    font-weight: 500;
    letter-spacing: .015em;
}

h1:focus {
    outline: none;
}

.product-intro {
    max-width: 820px;
    margin-bottom: 1.75rem;
}

.product-intro h1 {
    margin: .35rem 0 .8rem;
    color: var(--eg-text);
    font-size: clamp(2.6rem, 5vw, 4.6rem);
    line-height: 1;
}

.product-intro > p:last-child {
    max-width: 740px;
    color: var(--eg-muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

.eyebrow,
.phase-label,
.section-kicker {
    margin: 0;
    color: var(--eg-amber);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.phase-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.phase-card {
    display: flex;
    min-height: 510px;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--eg-border);
    border-radius: 1rem;
    background: var(--eg-surface);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .2);
}

.phase-photo {
    position: relative;
    height: 150px;
    flex: 0 0 150px;
    background-position: center;
    background-size: cover;
    filter: saturate(.45) contrast(1.05);
}

.phase-photo::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 19, 31, .05), var(--eg-surface));
    content: '';
}

.phase-inspect .phase-photo {
    background-image: url('../images/inspect.jpg');
    background-position: center 38%;
}

.phase-insights .phase-photo {
    background-image: url('../images/switchboard.jpg');
}

.phase-monitor .phase-photo {
    background-image: url('../images/perth.jpg');
}

.phase-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 0 1.1rem 1.1rem;
}

.phase-content h2 {
    margin: .7rem 0 .35rem;
    font-size: 1.65rem;
}

.phase-content > p:not(.phase-label) {
    min-height: 3rem;
    color: var(--eg-muted);
}

.phase-content ul {
    display: grid;
    gap: .5rem;
    margin: .6rem 0 1.2rem;
    padding: 0;
    list-style: none;
}

.phase-content li {
    position: relative;
    padding-left: 1rem;
    color: #d7dde4;
    font-size: .88rem;
}

.phase-content li::before {
    position: absolute;
    top: .52rem;
    left: 0;
    width: .34rem;
    height: .34rem;
    border-radius: 50%;
    background: var(--eg-mint);
    content: '';
}

.phase-action {
    width: 100%;
    margin-top: auto;
    border: 0;
    border-radius: .65rem;
    background: var(--eg-amber);
    color: #09131f;
    font-weight: 700;
}

.phase-action:hover:not(:disabled) {
    background: #ffc657;
    color: #09131f;
}

.phase-action:disabled {
    background: #29394a;
    color: #7e8a98;
    opacity: 1;
}

.comparison-section {
    margin-top: 2.2rem;
}

.comparison-wrap {
    margin-top: .8rem;
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    color: #dde2e7;
}

.comparison-table th,
.comparison-table td {
    padding: .9rem .75rem;
    border-bottom: 1px solid var(--eg-border);
    text-align: left;
}

.comparison-table thead th {
    color: #f6f2e9;
    font-size: .7rem;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.comparison-table tbody th {
    color: #8593a3;
    font-size: .76rem;
    font-weight: 500;
}

.role-entry {
    position: relative;
    margin-top: 3rem;
    padding: clamp(2rem, 5vw, 4.25rem);
    overflow: hidden;
    border: 1px solid #263548;
    border-radius: 1.1rem;
    background:
        linear-gradient(90deg, rgba(8, 19, 31, .99) 0%, rgba(8, 19, 31, .93) 48%, rgba(8, 19, 31, .72) 100%),
        url('../images/switchboard.jpg') right center / cover no-repeat;
}

.role-copy {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.role-copy h2 {
    margin: .75rem 0 1rem;
    font-size: clamp(2.4rem, 5vw, 4.5rem);
    line-height: 1.02;
}

.role-copy h2 span {
    display: block;
    color: var(--eg-orange);
}

.role-copy > p:last-of-type {
    max-width: 650px;
    color: var(--eg-muted);
    font-size: 1rem;
    line-height: 1.65;
}

.role-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.5rem;
}

.btn-primary {
    border-color: var(--eg-orange);
    background: var(--eg-orange);
    color: #fff;
    font-weight: 700;
}

.btn-primary:hover {
    border-color: #ff744e;
    background: #ff744e;
}

.role-cards {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .55rem;
    margin-top: 3.25rem;
}

.role-cards article {
    display: grid;
    gap: .45rem;
    min-height: 145px;
    padding: 1rem;
    border: 1px solid #2c3c50;
    border-radius: .8rem;
    background: rgba(18, 32, 48, .92);
}

.role-cards small {
    color: var(--eg-orange);
    font-size: .58rem;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.role-cards strong {
    color: #fff;
}

.role-cards span {
    color: #929eac;
    font-size: .78rem;
    line-height: 1.45;
}

.bootstrap-note {
    margin-top: 1rem;
    padding: 1rem 1.15rem;
    border: 1px solid #2c3c50;
    border-left: 3px solid var(--eg-amber);
    border-radius: .5rem;
    background: #111e2b;
    color: #a6b2bf;
    font-size: .85rem;
}

.telerik-proof {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    margin-top: 1rem;
    padding: 1.25rem;
    border: 1px solid #2c3c50;
    border-left: 3px solid var(--eg-orange);
    border-radius: .85rem;
    background: #111e2b;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
}

.telerik-proof > div {
    flex: 1 1 360px;
}

.telerik-proof h2,
.telerik-proof p {
    margin-bottom: .35rem;
}

.telerik-proof h2 {
    color: #fff;
}

.telerik-proof p:not(.eyebrow) {
    color: var(--eg-muted);
}

.telerik-proof .k-button-primary,
.telerik-proof .k-button-solid-primary {
    border-color: var(--eg-orange);
    background: var(--eg-orange);
    color: #fff;
}

.telerik-proof output {
    flex-basis: 100%;
    color: var(--eg-mint);
    font-weight: 700;
}

.auth-card {
    max-width: 570px;
    margin: 2rem auto;
    padding: 2.25rem;
    border: 1px solid var(--eg-border);
    border-top: 3px solid var(--eg-orange);
    border-radius: 1rem;
    background:
        linear-gradient(rgba(17, 30, 43, .96), rgba(17, 30, 43, .96)),
        url('../images/switchboard.jpg') center / cover;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .32);
}

.auth-card h1 {
    margin-top: .45rem;
    font-size: clamp(2rem, 4vw, 3.1rem);
}

.auth-card > p {
    color: var(--eg-muted);
}

.auth-card form {
    display: grid;
    gap: .65rem;
    margin: 1.5rem 0;
}

.auth-card label {
    margin: .2rem 0 -.25rem;
    color: #cbd3dc;
    font-size: .8rem;
    font-weight: 600;
}

.auth-card .form-control {
    min-height: 44px;
    border: 1px solid #3a4a5e;
    border-radius: .45rem;
    background: #0b1724;
    color: #fff;
}

.auth-card .form-control:focus {
    border-color: var(--eg-amber);
    background: #0b1724;
    color: #fff;
    box-shadow: 0 0 0 .2rem rgba(255, 181, 44, .14);
}

.auth-card form .btn {
    margin-top: .75rem;
}

.auth-switch {
    margin: 1rem 0 0;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem 0;
    color: #728093;
}

.auth-divider::before,
.auth-divider::after {
    height: 1px;
    flex: 1;
    background: #334256;
    content: '';
}

.status-pill {
    display: inline-block;
    margin-bottom: 1rem;
    padding: .35rem .75rem;
    border: 1px solid rgba(80, 227, 174, .35);
    border-radius: 99px;
    background: rgba(80, 227, 174, .12);
    color: var(--eg-mint);
    font-weight: 700;
}

.valid.modified:not([type='checkbox']) {
    outline: 1px solid var(--eg-mint);
}

.invalid {
    outline: 1px solid #ff6d65;
}

.validation-message,
.validation-errors {
    color: #ff8b83;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    padding: .75rem 1.25rem;
    background: #f2b11f;
    color: #111;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, .3);
}

#blazor-error-ui .dismiss {
    position: absolute;
    top: .55rem;
    right: .75rem;
    cursor: pointer;
}

.loading-progress {
    position: absolute;
    top: 20vh;
    left: calc(50% - 4rem);
    width: 8rem;
    height: 8rem;
}

.loading-progress circle {
    fill: none;
    stroke: #26374a;
    stroke-width: .6rem;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.loading-progress circle:last-child {
    stroke: var(--eg-orange);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * .8), 500%;
    transition: stroke-dasharray .05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    top: calc(20vh + 3.2rem);
    left: 0;
    width: 100%;
    color: #fff;
    text-align: center;
}

@media (max-width: 1180px) {
    .phase-grid {
        grid-template-columns: 1fr;
    }

    .phase-card {
        min-height: 0;
    }

    .role-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .content {
        padding-right: 1rem !important;
        padding-left: 1rem !important;
    }

    .top-row {
        padding-right: 1rem !important;
        padding-left: 1rem !important;
    }

    .role-entry,
    .auth-card {
        padding: 1.4rem;
    }

    .role-cards {
        grid-template-columns: 1fr;
    }
}
