:root {
    --ed-primary: #18285d;
    --ed-primary-dark: #0f1a42;
    --ed-accent: #e3000f;
    --ed-gold: #d7ad47;
    --ed-bg: #f4f7fb;
    --ed-surface: #ffffff;
    --ed-border: #dbe3ee;
    --ed-text: #1f2937;
    --ed-muted: #617389;
    --shadow-sm: 0 10px 24px rgba(24, 40, 93, 0.08);
    --shadow-lg: 0 24px 60px rgba(24, 40, 93, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ed-text);
    background:
        radial-gradient(circle at top left, rgba(227, 0, 15, 0.07), transparent 25%),
        linear-gradient(180deg, #ffffff 0%, var(--ed-bg) 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    width: 100%;
    max-width: 100%;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(219, 227, 238, 0.95);
}

.header-inner {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0;
}

.brand-mark {
    width: auto;
    height: 46px;
    margin: 4px;
    max-height: 46px;
}

.brand-banner-mark {
    width: 189px;
    height: 46px;
    display: block;
    object-fit: contain;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.eyebrow {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ed-accent);
}

.brand-title {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--ed-primary);
}

.brand-subtitle {
    font-size: 0.92rem;
    color: var(--ed-muted);
}

.header-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.nav-link,
.nav-button,
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 6px;
    font-size: 0.92rem;
    font-weight: 800;
    transition: 0.2s ease;
}

.nav-link {
    color: var(--ed-primary);
}

.nav-link:hover {
    background: rgba(24, 40, 93, 0.08);
}

.nav-button,
.btn-primary {
    background: var(--ed-primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.nav-button:hover,
.btn-primary:hover {
    background: var(--ed-primary-dark);
}

.nav-button-profile {
    background: #fff;
    color: var(--ed-primary);
    border: 1px solid var(--ed-primary);
    box-shadow: none;
}

.nav-button-profile:hover {
    background: var(--ed-primary);
    color: #fff;
}

.btn-secondary {
    background: #fff;
    color: var(--ed-primary);
    border: 1px solid var(--ed-border);
}

.btn-secondary:hover {
    border-color: var(--ed-primary);
}

.section {
    padding: 30px 0;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    margin-bottom: 22px;
}

.section-heading h2 {
    margin: 0;
    color: var(--ed-primary);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.section-heading p {
    margin: 8px 0 0;
    max-width: 720px;
    color: var(--ed-muted);
}

.hero {
    padding: 34px 0 18px;
}

.hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 18px;
}

.hero-top h1 {
    margin: 6px 0 0;
    color: var(--ed-primary);
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 0.96;
}

.hero-top p {
    margin: 10px 0 0;
    max-width: 720px;
    color: var(--ed-muted);
    font-size: 1rem;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-placeholder {
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    border-radius: 16px;
    border: 2px dashed rgba(24, 40, 93, 0.2);
    background:
        linear-gradient(135deg, rgba(24, 40, 93, 0.08), rgba(227, 0, 15, 0.08)),
        #fff;
    box-shadow: var(--shadow-sm);
}

.hero-placeholder span {
    color: var(--ed-primary);
    font-size: clamp(1.4rem, 3vw, 2.6rem);
    font-weight: 800;
    text-align: center;
}

.hero-banner {
    min-height: 0;
    padding: 0;
    border: 1px solid var(--ed-border);
    background: #fff;
    overflow: hidden;
}

.hero-banner img {
    display: block;
    width: 100%;
    height: auto;
}

.active-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.ally-visual-card {
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid var(--ed-border);
    background: var(--ed-surface);
    box-shadow: var(--shadow-sm);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.ally-visual-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 42px rgba(24, 40, 93, 0.14);
}

.ally-figure {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #dfe7f7, #f7f9fd);
}

.ally-figure img {
    height: 100%;
    object-fit: cover;
}

.ally-logo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.03em;
}

.logo-sr { background: linear-gradient(135deg, #16367b, #4c78c9); }
.logo-cg { background: linear-gradient(135deg, #8f2d56, #e05f87); }
.logo-dd { background: linear-gradient(135deg, #00757d, #36b8b8); }
.logo-cl { background: linear-gradient(135deg, #4f2f1f, #bf7b4f); }
.logo-tp { background: linear-gradient(135deg, #8c1f14, #da5a2b); }
.logo-me { background: linear-gradient(135deg, #18285d, #405cbf); }
.logo-co { background: linear-gradient(135deg, #005a7a, #2db0d8); }
.logo-k7 { background: linear-gradient(135deg, #111827, #f97316); }
.logo-lp { background: linear-gradient(135deg, #3d4455, #7e8799); }
.logo-ov { background: linear-gradient(135deg, #8e6a14, #d8b04c); color: #18285d; }

.ally-initials {
    font-size: 2.9rem;
}

.ally-logo-name {
    display: block;
    font-size: 1.3rem;
    line-height: 1.05;
}

.ally-info {
    padding: 18px 18px 20px;
}

.ally-category {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ed-primary);
    background: rgba(24, 40, 93, 0.08);
    width: fit-content;
}

.ally-info h3 {
    margin: 0 0 8px;
    color: var(--ed-primary);
    font-size: 1.18rem;
}

.ally-benefit {
    margin: 0;
    color: var(--ed-muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

.ally-link {
    display: inline-flex;
    margin-top: 14px;
    color: var(--ed-accent);
    font-size: 0.9rem;
    font-weight: 800;
}

.mini-note {
    margin-top: 20px;
    color: var(--ed-muted);
    font-size: 0.92rem;
}

.detail-stack {
    display: grid;
    gap: 18px;
}

.detail-card {
    padding: 24px;
    border-radius: 14px;
    border: 1px solid var(--ed-border);
    background: #fff;
    box-shadow: var(--shadow-sm);
    align-items: start;
}

.detail-visual {
    min-height: 180px;
    display: flex;
    align-items: end;
    justify-content: flex-start;
    margin: -24px -24px 18px;
    color: #fff;
    overflow: hidden;
    background: #eef2f7;
}

.detail-visual picture,
.detail-visual img {
    display: block;
    width: 100%;
    height: 100%;
}

.detail-visual img {
    object-fit: cover;
    object-position: center;
}

.detail-visual-name {
    display: inline-flex;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 1.4rem;
    font-weight: 900;
    line-height: 1;
}

.detail-card h3 {
    margin: 0 0 10px;
    color: var(--ed-primary);
    font-size: 1.32rem;
}

.detail-card p {
    margin: 0 0 10px;
    color: var(--ed-muted);
}

.detail-card strong {
    color: var(--ed-text);
}

.footer {
    padding: 24px 0 48px;
    margin-top: 28px;
    border-top: 1px solid var(--ed-border);
    background: rgba(255, 255, 255, 0.72);
}

.footer-copy {
    margin: 0;
    color: var(--ed-muted);
    font-size: 0.92rem;
    text-align: center;
}

.simple-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 32px 0;
}

.simple-card {
    max-width: 760px;
    margin: 0 auto;
    padding: 36px;
    background: #fff;
    border: 1px solid var(--ed-border);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
}

.simple-card h1 {
    margin: 0 0 12px;
    color: var(--ed-primary);
    font-size: clamp(1.9rem, 4vw, 3rem);
}

.simple-card p {
    margin: 0 0 14px;
    color: var(--ed-muted);
}

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

@media (min-width: 900px) {
    .detail-card {
        display: block;
    }

    .detail-card::after {
        content: "";
        display: block;
        clear: both;
    }

    .detail-visual {
        float: left;
        width: 300px;
        min-height: 260px;
        height: 260px;
        margin: -24px 24px 16px -24px;
        border-radius: 14px 0 0 14px;
    }
}

@media (max-width: 760px) {
    .header-inner,
    .hero-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-inner {
        padding: 14px 0;
        min-height: auto;
    }

    .header-nav {
        justify-content: flex-start;
    }

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

    .detail-visual {
        float: none;
        width: auto;
        min-height: 240px;
        border-radius: 14px 14px 0 0;
    }

    .simple-card {
        padding: 28px 22px;
    }
}
