.egc-guide {
    --egc-guide-bg: #f4f6f4;
    --egc-guide-panel: #ffffff;
    --egc-guide-text: #20352c;
    --egc-guide-muted: #567265;
    --egc-guide-border: rgba(32, 53, 44, 0.12);
    --egc-guide-shadow: 0 12px 30px rgba(20, 42, 33, 0.08);
    --egc-guide-radius: 16px;
    --egc-guide-radius-sm: 12px;
    --egc-guide-green: #2f7a56;
    --egc-guide-gold: #c7922f;
    --egc-guide-red: #cb685d;
    --egc-guide-blue: #3d8fb4;
    --egc-guide-orange: #df9c37;
    --egc-guide-neutral: #dfe4e0;
    --egc-guide-font: "Manrope", "Segoe UI", system-ui, sans-serif;
    --egc-guide-base-size: 16px;
    --egc-guide-hero-title-size: 42px;
    --egc-guide-hero-subtitle-size: 22px;
    --egc-guide-section-title-size: 28px;
    --egc-guide-card-title-size: 18px;
    --egc-guide-body-size: 15px;
    --egc-guide-button-size: 16px;
    --egc-guide-small-size: 14px;
    color: var(--egc-guide-text);
    font-family: var(--egc-guide-font);
    font-size: var(--egc-guide-base-size);
    line-height: 1.45;
    background: linear-gradient(180deg, #f7faf8 0%, #f4f6f4 42%, #f7f7f6 100%);
    border: 1px solid rgba(32, 53, 44, 0.06);
    border-radius: 20px;
    overflow: clip;
}

.egc-guide *,
.egc-guide *::before,
.egc-guide *::after {
    box-sizing: border-box;
}

.egc-guide__container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

.egc-guide__section {
    padding: 26px 0 10px;
}

.egc-guide__section--last {
    padding-bottom: 34px;
}

.egc-guide__section--bordered {
    border-top: 1px solid rgba(32, 53, 44, 0.08);
    border-bottom: 1px solid rgba(32, 53, 44, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(247, 249, 247, 0.92));
}

.egc-guide__section--card {
    padding-top: 18px;
}

.egc-guide__hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(32, 53, 44, 0.1);
    background:
        radial-gradient(circle at 18% 18%, rgba(109, 163, 128, 0.14) 0 7px, transparent 8px) 0 0 / 180px 180px,
        radial-gradient(circle at 80% 20%, rgba(172, 192, 177, 0.18) 0 5px, transparent 6px) 0 0 / 170px 170px,
        linear-gradient(180deg, #f4f8f4 0%, #f7f7f5 100%);
}

.egc-guide__hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.28;
    background:
        repeating-radial-gradient(circle at 92% 12%, rgba(98, 145, 115, 0.15) 0 2px, transparent 2px 22px),
        repeating-linear-gradient(63deg, transparent 0 22px, rgba(114, 156, 128, 0.08) 22px 24px, transparent 24px 46px),
        repeating-linear-gradient(-63deg, transparent 0 22px, rgba(114, 156, 128, 0.08) 22px 24px, transparent 24px 46px);
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0.85));
}

.egc-guide__hero-inner {
    position: relative;
    padding-top: 44px;
    padding-bottom: 40px;
    text-align: center;
}

.egc-guide__title {
    margin: 0;
    font-size: var(--egc-guide-hero-title-size);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #245840;
}

.egc-guide__subtitle {
    margin: 10px auto 0;
    font-size: var(--egc-guide-hero-subtitle-size);
    color: #355f4b;
    max-width: 40ch;
}

.egc-guide__subtitle:empty {
    display: none;
}

.egc-guide__hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 22px;
}

.egc-guide__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
    box-shadow: 0 8px 18px rgba(17, 37, 28, 0.07);
    font-size: var(--egc-guide-button-size);
}

.egc-guide__btn:hover,
.egc-guide__btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 20px rgba(17, 37, 28, 0.11);
}

.egc-guide__btn:focus-visible {
    outline: 2px solid rgba(37, 101, 71, 0.35);
    outline-offset: 2px;
}

.egc-guide__btn--primary {
    background: linear-gradient(180deg, #5ba769, #4d955a);
    border-color: #418c4f;
    color: #fff;
}

.egc-guide__btn--secondary {
    background: linear-gradient(180deg, #f6e8be, #f1deae);
    border-color: #d1b16b;
    color: #413316;
}

.egc-guide__panel {
    border: 1px solid var(--egc-guide-border);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--egc-guide-shadow);
    border-radius: var(--egc-guide-radius);
    padding: 18px;
}

.egc-guide__access-card {
    max-width: 760px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--egc-guide-border);
    border-radius: var(--egc-guide-radius);
    box-shadow: var(--egc-guide-shadow);
    padding: 22px 20px;
    text-align: center;
}

.egc-guide__access-title {
    margin: 0;
    color: #274d3a;
    line-height: 1.2;
    font-size: var(--egc-guide-section-title-size);
}

.egc-guide__access-text {
    margin: 10px auto 0;
    max-width: 54ch;
    color: var(--egc-guide-muted);
    font-size: var(--egc-guide-body-size);
}

.egc-guide__access-actions {
    margin-top: 16px;
}

.egc-guide__section-title {
    margin: 0 0 14px;
    font-size: var(--egc-guide-section-title-size);
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: #274d3a;
}

.egc-guide__section-title--center {
    text-align: center;
}

.egc-guide__legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.egc-guide__legend-card {
    min-height: 64px;
    border-radius: 12px;
    border: 1px solid var(--egc-guide-border);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
    box-shadow: 0 5px 12px rgba(19, 39, 30, 0.04);
    min-width: 0;
}

.egc-guide__legend-card[href]:hover,
.egc-guide__legend-card[href]:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 16px rgba(19, 39, 30, 0.08);
    border-color: rgba(44, 99, 73, 0.28);
}

.egc-guide__legend-card[href]:focus-visible {
    outline: 2px solid rgba(37, 101, 71, 0.28);
    outline-offset: 2px;
}

.egc-guide__legend-icon {
    font-size: 1.2rem;
    line-height: 1;
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: 1.25rem;
    height: 1.25rem;
}

.egc-guide__legend-label {
    font-weight: 700;
    font-size: var(--egc-guide-card-title-size);
    line-height: 1.2;
    word-break: break-word;
}

.egc-guide__legend-icon--shape {
    width: 0.95rem;
    height: 0.95rem;
}

.egc-guide__legend-icon--dot {
    border-radius: 50%;
    background: currentColor;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.egc-guide__legend-icon--ring {
    border-radius: 50%;
    background: transparent;
    border: 2px solid currentColor;
}

.egc-guide__legend-icon--square {
    border-radius: 4px;
    background: currentColor;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14);
}

.egc-guide__legend-icon--diamond {
    width: 0.78rem;
    height: 0.78rem;
    background: currentColor;
    transform: rotate(45deg);
    border-radius: 2px;
}

.egc-guide__legend-icon--triangle {
    width: 0;
    height: 0;
    border-left: 0.5rem solid transparent;
    border-right: 0.5rem solid transparent;
    border-bottom: 0.9rem solid currentColor;
}

.egc-guide__legend-icon--green { color: #4f9f67; }
.egc-guide__legend-icon--blue { color: #418fb8; }
.egc-guide__legend-icon--red { color: #ce655b; }
.egc-guide__legend-icon--orange { color: #df9b37; }
.egc-guide__legend-icon--gold { color: #c89b3d; }
.egc-guide__legend-icon--brown { color: #8a6443; }
.egc-guide__legend-icon--pink { color: #d67aa6; }
.egc-guide__legend-icon--gray { color: #9aa2a8; }
.egc-guide__legend-icon--purple { color: #7c73b8; }

.egc-guide__legend-card .egc-guide__legend-icon--triangle {
    width: 0;
    height: 0;
}

.egc-guide__legend-card--placeholder {
    background: linear-gradient(180deg, #f0f2ef, #ecefed);
    border-style: solid;
    position: relative;
    overflow: hidden;
    justify-content: center;
    gap: 6px;
}

.egc-guide__legend-placeholder-line {
    display: block;
    width: 78%;
    height: 6px;
    border-radius: 999px;
    background: rgba(32, 53, 44, 0.08);
}

.egc-guide__flow {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.egc-guide__flow-item {
    position: relative;
    flex: 1 1 220px;
    min-width: 160px;
    max-width: 260px;
    margin: 0;
    border-radius: 12px;
    border: 1px solid var(--egc-guide-border);
    padding: 13px 16px;
    text-align: center;
    font-weight: 700;
    box-shadow: 0 6px 14px rgba(19, 39, 30, 0.04);
    font-size: var(--egc-guide-card-title-size);
}

.egc-guide__flow-item:not(:last-child) {
    margin-right: 26px;
}

.egc-guide__flow-item:not(:last-child)::after {
    content: "➜";
    position: absolute;
    top: 50%;
    right: -22px;
    transform: translateY(-50%);
    color: #4f8d67;
    font-size: 1.2rem;
}

.egc-guide__accordion {
    display: grid;
    gap: 10px;
}

.egc-guide__accordion-item {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(54, 104, 75, 0.2);
    border-radius: 12px;
    overflow: clip;
    box-shadow: 0 4px 10px rgba(19, 39, 30, 0.04);
}

.egc-guide__accordion-heading {
    margin: 0;
}

.egc-guide__accordion-trigger {
    width: 100%;
    border: 0;
    background: linear-gradient(180deg, #dff0e3, #d5eadb);
    color: #1f4734;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    text-align: left;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    font-size: var(--egc-guide-card-title-size);
}

.egc-guide__accordion-trigger:hover,
.egc-guide__accordion-trigger:focus-visible {
    background: linear-gradient(180deg, #d7ebdc, #cee6d5);
}

.egc-guide__accordion-trigger:focus-visible {
    outline: 2px solid rgba(37, 101, 71, 0.32);
    outline-offset: -2px;
}

.egc-guide__accordion-icon {
    width: 12px;
    height: 12px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex: 0 0 auto;
}

.egc-guide__accordion-trigger[aria-expanded="true"] .egc-guide__accordion-icon {
    transform: rotate(225deg);
}

.egc-guide__accordion-panel {
    padding: 0 16px;
    color: #2f4a3d;
    background: linear-gradient(180deg, rgba(250, 252, 250, 0.95), rgba(244, 248, 245, 0.95));
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.24s ease, padding-top 0.24s ease, padding-bottom 0.24s ease;
}

.egc-guide__accordion-panel.is-open {
    padding-top: 12px;
    padding-bottom: 14px;
}

.egc-guide__accordion-panel p {
    margin: 0 0 10px;
    font-size: var(--egc-guide-body-size);
}

.egc-guide__accordion-panel p:last-child {
    margin-bottom: 0;
}

.egc-guide__inheritance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.egc-guide__inheritance-card {
    border-radius: 12px;
    border: 1px solid var(--egc-guide-border);
    padding: 14px 14px 12px;
    box-shadow: 0 6px 14px rgba(19, 39, 30, 0.04);
}

.egc-guide__inheritance-title {
    margin: 0;
    font-size: var(--egc-guide-card-title-size);
    line-height: 1.2;
}

.egc-guide__inheritance-text {
    margin: 8px 0 0;
    color: var(--egc-guide-muted);
    font-size: var(--egc-guide-body-size);
}

.egc-guide__table-card {
    width: min(100%, 760px);
    margin: 0 auto;
    border: 1px solid var(--egc-guide-border);
    border-radius: var(--egc-guide-radius);
    background: #fff;
    box-shadow: var(--egc-guide-shadow);
    overflow: clip;
}

.egc-guide__table-card > .egc-guide__section-title {
    margin: 0;
    padding: 14px 18px;
    background: linear-gradient(180deg, #f6ebbd, #f2e3a9);
    border-bottom: 1px solid rgba(195, 149, 48, 0.28);
}

.egc-guide__table-wrap {
    overflow-x: auto;
    padding: 14px 18px 16px;
}

.egc-guide__table {
    width: 100%;
    min-width: 520px;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid rgba(32, 53, 44, 0.18);
    border-radius: 10px;
    overflow: hidden;
}

.egc-guide__table th,
.egc-guide__table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(32, 53, 44, 0.1);
    font-size: var(--egc-guide-body-size);
}

.egc-guide__table th {
    background: #f0f2ef;
    font-weight: 800;
    font-size: var(--egc-guide-card-title-size);
}

.egc-guide__table tbody tr:last-child td {
    border-bottom: 0;
}

.egc-guide__table tbody tr:nth-child(4n + 1) td {
    background: rgba(216, 235, 221, 0.55);
}

.egc-guide__table tbody tr:nth-child(4n + 2) td {
    background: rgba(245, 245, 245, 0.7);
}

.egc-guide__table tbody tr:nth-child(4n + 3) td {
    background: rgba(244, 223, 219, 0.58);
}

.egc-guide__table tbody tr:nth-child(4n) td {
    background: rgba(248, 234, 196, 0.58);
}

.egc-guide__demo-card {
    width: min(100%, 820px);
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(240, 250, 243, 0.95), rgba(229, 245, 234, 0.95));
    border: 1px solid rgba(54, 104, 75, 0.2);
    border-radius: var(--egc-guide-radius);
    box-shadow: var(--egc-guide-shadow);
    overflow: clip;
}

.egc-guide__demo-head {
    padding: 14px 18px 12px;
    border-bottom: 1px solid rgba(54, 104, 75, 0.14);
    background: rgba(255, 255, 255, 0.45);
}

.egc-guide__demo-head > .egc-guide__section-title {
    margin: 0;
}

.egc-guide__demo-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 14px;
    padding: 16px 18px 18px;
    align-items: start;
}

.egc-guide__demo-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.egc-guide__demo-field {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
}

.egc-guide__demo-label {
    font-weight: 700;
    color: #2a4a3c;
    font-size: var(--egc-guide-card-title-size);
}

.egc-guide__demo-select {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 132px;
    max-width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(44, 99, 73, 0.22);
    background: #fff;
    color: #2c4237;
    box-shadow: 0 2px 6px rgba(19, 39, 30, 0.03);
    font-size: var(--egc-guide-body-size);
}

.egc-guide__demo-select-value {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.egc-guide__demo-select-chevron {
    color: #587868;
    font-size: 0.9rem;
}

.egc-guide__demo-tooltip {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 10px;
    align-items: start;
    border-radius: 12px;
    border: 1px solid rgba(193, 146, 53, 0.34);
    background: linear-gradient(180deg, #f8ecbf, #f4e4a6);
    color: #4d3c1a;
    padding: 12px;
}

.egc-guide__demo-tooltip p {
    margin: 0;
    font-size: var(--egc-guide-body-size);
}

.egc-guide__demo-tooltip-icon {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #3a8b55;
    color: #fff;
    font-weight: 800;
    line-height: 1;
}

.egc-guide__tone--green {
    background: linear-gradient(180deg, rgba(211, 238, 217, 0.95), rgba(201, 232, 208, 0.95));
    border-color: rgba(61, 125, 85, 0.28);
}

.egc-guide__tone--gold {
    background: linear-gradient(180deg, rgba(246, 234, 196, 0.95), rgba(241, 226, 175, 0.95));
    border-color: rgba(193, 146, 53, 0.28);
}

.egc-guide__tone--red {
    background: linear-gradient(180deg, rgba(248, 223, 220, 0.95), rgba(244, 213, 210, 0.95));
    border-color: rgba(203, 104, 93, 0.26);
}

.egc-guide__tone--blue {
    background: linear-gradient(180deg, rgba(216, 234, 244, 0.95), rgba(205, 227, 239, 0.95));
    border-color: rgba(61, 143, 180, 0.25);
}

.egc-guide__tone--orange {
    background: linear-gradient(180deg, rgba(249, 232, 203, 0.95), rgba(246, 222, 183, 0.95));
    border-color: rgba(223, 156, 55, 0.26);
}

.egc-guide__tone--neutral {
    background: linear-gradient(180deg, rgba(240, 243, 241, 0.95), rgba(235, 239, 236, 0.95));
    border-color: rgba(32, 53, 44, 0.14);
}

.egc-guide [id] {
    scroll-margin-top: 92px;
}

.egc-guide__accordion-title.is-targeted {
    animation: egcGuidePulse 1.2s ease;
}

@keyframes egcGuidePulse {
    0% { text-shadow: 0 0 0 rgba(47, 122, 86, 0); }
    15% { text-shadow: 0 0 0 rgba(47, 122, 86, 0.35); }
    35% { text-shadow: 0 0 16px rgba(47, 122, 86, 0.35); }
    100% { text-shadow: 0 0 0 rgba(47, 122, 86, 0); }
}

@media (max-width: 960px) {
    .egc-guide__legend-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .egc-guide__inheritance-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .egc-guide__demo-body {
        grid-template-columns: 1fr;
    }

    .egc-guide__demo-tooltip {
        max-width: 100%;
    }
}

@media (max-width: 700px) {
    .egc-guide {
        border-radius: 14px;
    }

    .egc-guide__container {
        padding: 0 14px;
    }

    .egc-guide__hero-inner {
        padding-top: 30px;
        padding-bottom: 28px;
    }

    .egc-guide__title {
        font-size: min(var(--egc-guide-hero-title-size), 11vw);
    }

    .egc-guide__subtitle {
        font-size: min(var(--egc-guide-hero-subtitle-size), 5.6vw);
    }

    .egc-guide__section-title {
        font-size: min(var(--egc-guide-section-title-size), 8vw);
    }

    .egc-guide__hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .egc-guide__btn {
        justify-content: center;
    }

    .egc-guide__legend-grid {
        grid-template-columns: 1fr;
    }

    .egc-guide__flow {
        display: grid;
        gap: 10px;
        overflow: visible;
    }

    .egc-guide__flow-item {
        min-width: 0;
        max-width: none;
        width: 100%;
        margin-right: 0;
    }

    .egc-guide__flow-item:not(:last-child) {
        margin-right: 0;
        margin-bottom: 18px;
    }

    .egc-guide__flow-item:not(:last-child)::after {
        top: auto;
        bottom: -18px;
        left: 50%;
        right: auto;
        transform: translateX(-50%) rotate(90deg);
    }

    .egc-guide__inheritance-grid {
        grid-template-columns: 1fr;
    }

    .egc-guide__demo-fields {
        grid-template-columns: 1fr;
    }

    .egc-guide__table-wrap {
        padding: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .egc-guide__btn,
    .egc-guide__legend-card,
    .egc-guide__accordion-icon,
    .egc-guide__accordion-panel {
        transition: none;
    }

    .egc-guide__accordion-title.is-targeted {
        animation: none;
    }
}
