html {
    scroll-behavior: smooth;
}

.portal-main {
    --surface: rgba(255, 255, 255, 0.94);
    --surface-soft: rgba(255, 255, 255, 0.82);
    --line: rgba(15, 23, 42, 0.12);
    --line-strong: rgba(15, 23, 42, 0.2);
    --text: #0f172a;
    --muted: #475569;
    --hero-shadow: 0 24px 56px rgba(15, 23, 42, 0.12);
    --card-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
    min-height: calc(100vh - 72px);
    padding: 88px 0 88px;
    font-family: "Noto Sans KR", "Pretendard Variable", "SUIT Variable", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    background:
        radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.18), transparent 28%),
        radial-gradient(circle at 92% 10%, rgba(14, 165, 233, 0.14), transparent 22%),
        linear-gradient(180deg, #f7fbff 0%, #eef5ff 48%, #f8fbff 100%);
}

.hero-intro .hero-eyebrow,
.hero-intro h1,
.hero-intro .hero-text,
.hero-intro .hero-actions,
.hero-intro .hero-visual {
    opacity: 0;
    transform: translateY(38px);
    filter: blur(6px);
    will-change: opacity, transform, filter;
}

.hero-intro .hero-visual {
    transform: translateY(46px) scale(0.965);
    transform-origin: center bottom;
}

.hero-intro.is-visible .hero-eyebrow,
.hero-intro.is-visible h1,
.hero-intro.is-visible .hero-text,
.hero-intro.is-visible .hero-actions,
.hero-intro.is-visible .hero-visual {
    opacity: 1;
    filter: blur(0);
}

.hero-intro .hero-eyebrow {
    transition:
        opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1) 60ms,
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 60ms,
        filter 0.7s cubic-bezier(0.22, 1, 0.36, 1) 60ms;
}

.hero-intro .hero-eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    margin-right: 8px;
    background: currentColor;
    box-shadow: 0 0 14px currentColor;
    opacity: 0.82;
}

.hero-intro h1 {
    transition:
        opacity 0.86s cubic-bezier(0.22, 1, 0.36, 1) 150ms,
        transform 0.86s cubic-bezier(0.22, 1, 0.36, 1) 150ms,
        filter 0.86s cubic-bezier(0.22, 1, 0.36, 1) 150ms;
}

.hero-intro .hero-text {
    transition:
        opacity 0.84s cubic-bezier(0.22, 1, 0.36, 1) 260ms,
        transform 0.84s cubic-bezier(0.22, 1, 0.36, 1) 260ms,
        filter 0.84s cubic-bezier(0.22, 1, 0.36, 1) 260ms;
}

.hero-intro .hero-actions {
    transition:
        opacity 0.84s cubic-bezier(0.22, 1, 0.36, 1) 360ms,
        transform 0.84s cubic-bezier(0.22, 1, 0.36, 1) 360ms,
        filter 0.84s cubic-bezier(0.22, 1, 0.36, 1) 360ms;
}

.hero-intro .hero-visual {
    transition:
        opacity 1.05s cubic-bezier(0.16, 1, 0.3, 1) 240ms,
        transform 1.05s cubic-bezier(0.16, 1, 0.3, 1) 240ms,
        filter 1.05s cubic-bezier(0.16, 1, 0.3, 1) 240ms;
}

.hero-intro.is-visible .hero-eyebrow,
.hero-intro.is-visible h1,
.hero-intro.is-visible .hero-text,
.hero-intro.is-visible .hero-actions {
    transform: translateY(0);
}

.hero-intro.is-visible .hero-visual {
    transform: translateY(0) scale(1);
}

.portal-explorer .section-heading,
.portal-explorer .service-card {
    opacity: 0;
    filter: blur(5px);
    will-change: opacity, transform, filter;
}

.portal-explorer .section-heading {
    transform: translateY(34px);
}

.portal-explorer .service-card {
    transform: translateY(42px);
}

.portal-explorer.is-visible .section-heading,
.portal-explorer.is-visible .service-card {
    opacity: 1;
    filter: blur(0);
}

.portal-explorer .section-heading {
    transition:
        opacity 0.82s cubic-bezier(0.22, 1, 0.36, 1) 220ms,
        transform 0.82s cubic-bezier(0.22, 1, 0.36, 1) 220ms,
        filter 0.82s cubic-bezier(0.22, 1, 0.36, 1) 220ms;
}

.portal-explorer.is-visible .section-heading {
    transform: translateY(0);
}

.portal-explorer .service-card {
    transition:
        opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: calc(360ms + var(--portal-card-delay, 0ms));
}

.portal-explorer.is-visible .service-card {
    transform: translateY(0);
}

[data-theme="dark"] .portal-main {
    --surface: rgba(8, 14, 25, 0.94);
    --surface-soft: rgba(11, 18, 31, 0.88);
    --line: rgba(148, 163, 184, 0.22);
    --line-strong: rgba(148, 163, 184, 0.34);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --hero-shadow: 0 30px 64px rgba(2, 6, 23, 0.36);
    --card-shadow: 0 24px 48px rgba(2, 6, 23, 0.34);
    background:
        radial-gradient(circle at 8% 0%, rgba(37, 99, 235, 0.24), transparent 28%),
        radial-gradient(circle at 92% 10%, rgba(14, 165, 233, 0.18), transparent 24%),
        linear-gradient(180deg, #050b15 0%, #070f1c 48%, #040a13 100%);
}

.portal-hero,
.portal-explorer,
.portal-directory {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
}

.portal-hero::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 48%;
    width: min(58vw, 780px);
    height: 360px;
    transform: translate(-18%, -50%);
    background:
        radial-gradient(circle at 20% 24%, rgba(244, 162, 97, 0.16), transparent 24%),
        radial-gradient(circle at 48% 48%, rgba(96, 165, 250, 0.15), transparent 22%),
        radial-gradient(circle at 78% 70%, rgba(110, 231, 183, 0.16), transparent 24%);
    filter: blur(36px);
    opacity: 0.9;
    pointer-events: none;
}

.portal-directory::before {
    content: "";
    position: absolute;
    top: -108px;
    left: 50%;
    width: min(72vw, 920px);
    height: 220px;
    transform: translateX(-50%);
    background:
        radial-gradient(circle at 18% 48%, rgba(244, 162, 97, 0.12), transparent 24%),
        radial-gradient(circle at 48% 32%, rgba(96, 165, 250, 0.12), transparent 24%),
        radial-gradient(circle at 80% 58%, rgba(110, 231, 183, 0.12), transparent 26%);
    filter: blur(30px);
    pointer-events: none;
}

.portal-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.94fr);
    align-items: center;
    gap: 48px;
}

.hero-copy {
    max-width: 640px;
}

.hero-copy h1,
.section-heading h2,
.service-heading-copy h3,
.btn-primary,
.btn-ghost {
    font-family: "Noto Sans KR", "Pretendard Variable", "SUIT Variable", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

.hero-eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    margin: 0;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    color: #2563eb;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

[data-theme="dark"] .hero-eyebrow,
[data-theme="dark"] .section-kicker {
    color: #7dd3fc;
}

.hero-copy h1 {
    margin: 18px 0 0;
    max-width: 10.8ch;
    color: var(--text);
    font-size: clamp(2.6rem, 4.8vw, 4.4rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
    font-weight: 900;
    word-break: keep-all;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.hero-text {
    margin: 18px 0 0;
    max-width: 35ch;
    color: var(--muted);
    font-size: clamp(1rem, 1.7vw, 1.12rem);
    line-height: 1.72;
    letter-spacing: -0.01em;
}

.hero-text-line {
    display: inline-block;
    white-space: nowrap;
}

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

.hero-actions .btn-primary,
.hero-actions .btn-ghost {
    min-width: 168px;
}

.hero-actions .btn-primary {
    border-color: rgba(242, 106, 67, 0.34);
    background: linear-gradient(135deg, #ff9473 0%, #f26a43 100%);
    box-shadow: 0 16px 30px rgba(242, 106, 67, 0.28);
}

.hero-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.hero-highlights li {
    min-height: 100%;
    padding: 18px 18px 16px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 54%),
        var(--surface-soft);
    box-shadow: var(--card-shadow);
}

.hero-highlights strong {
    display: block;
    color: var(--text);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero-highlights span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.62;
}

.hero-visual {
    position: relative;
    margin: 0;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.hero-visual::before,
.hero-visual::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(12px);
}

.hero-visual::before {
    width: min(22vw, 260px);
    height: min(22vw, 260px);
    top: 14%;
    left: 8%;
    background: radial-gradient(circle, rgba(244, 162, 97, 0.34) 0%, rgba(244, 162, 97, 0) 72%);
}

.hero-visual::after {
    width: min(20vw, 230px);
    height: min(20vw, 230px);
    right: 6%;
    bottom: 16%;
    background: radial-gradient(circle, rgba(110, 231, 183, 0.26) 0%, rgba(110, 231, 183, 0) 74%);
}

[data-theme="dark"] .hero-highlights li {
    background:
        radial-gradient(circle at top right, rgba(148, 163, 184, 0.08), transparent 30%),
        linear-gradient(180deg, rgba(11, 18, 31, 0.94) 0%, rgba(7, 15, 28, 0.9) 100%);
}

.hero-visual-image {
    position: relative;
    z-index: 1;
    display: block;
    width: min(100%, 590px);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 36px 62px rgba(15, 23, 42, 0.18));
}

[data-theme="dark"] .hero-visual-image {
    filter: drop-shadow(0 40px 72px rgba(2, 6, 23, 0.44));
}

.portal-explorer,
.portal-directory {
    margin-top: 56px;
}

#service-overview,
#services,
.service-card {
    scroll-margin-top: 104px;
}

.section-heading {
    max-width: 780px;
}

.section-heading h2 {
    margin: 14px 0 0;
    color: var(--text);
    font-size: clamp(1.9rem, 3vw, 2.7rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
    font-weight: 900;
}

.section-lead {
    margin: 14px 0 0;
    max-width: 62ch;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.72;
}

.explorer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.explorer-card,
.service-card {
    --accent: #2563eb;
    --accent-soft: rgba(37, 99, 235, 0.12);
    --accent-line: rgba(37, 99, 235, 0.24);
}

.explorer-card[data-slug="kids"],
.service-card[data-slug="kids"] {
    --accent: #bf8642;
    --accent-soft: rgba(191, 134, 66, 0.12);
    --accent-line: rgba(191, 134, 66, 0.24);
}

.explorer-card[data-slug="lite"],
.service-card[data-slug="lite"] {
    --accent: #557a2c;
    --accent-soft: rgba(85, 122, 44, 0.12);
    --accent-line: rgba(85, 122, 44, 0.24);
}

.explorer-card[data-slug="day"],
.service-card[data-slug="day"] {
    --accent: #18b6bd;
    --accent-soft: rgba(24, 182, 189, 0.12);
    --accent-line: rgba(24, 182, 189, 0.24);
}

.explorer-card[data-slug="moco"],
.service-card[data-slug="moco"] {
    --accent: #2d9fda;
    --accent-soft: rgba(45, 159, 218, 0.12);
    --accent-line: rgba(45, 159, 218, 0.24);
}

[data-theme="dark"] .explorer-card[data-slug="kids"],
[data-theme="dark"] .service-card[data-slug="kids"] {
    --accent: #f0c278;
    --accent-soft: rgba(240, 194, 120, 0.16);
    --accent-line: rgba(240, 194, 120, 0.28);
}

[data-theme="dark"] .explorer-card[data-slug="lite"],
[data-theme="dark"] .service-card[data-slug="lite"] {
    --accent: #9dc665;
    --accent-soft: rgba(157, 198, 101, 0.16);
    --accent-line: rgba(157, 198, 101, 0.28);
}

[data-theme="dark"] .explorer-card[data-slug="day"],
[data-theme="dark"] .service-card[data-slug="day"] {
    --accent: #54ddd7;
    --accent-soft: rgba(84, 221, 215, 0.16);
    --accent-line: rgba(84, 221, 215, 0.28);
}

[data-theme="dark"] .explorer-card[data-slug="moco"],
[data-theme="dark"] .service-card[data-slug="moco"] {
    --accent: #67c8f2;
    --accent-soft: rgba(103, 200, 242, 0.16);
    --accent-line: rgba(103, 200, 242, 0.28);
}

.explorer-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 100%;
    padding: 22px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, var(--accent-soft) 0%, transparent 40%),
        linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
    box-shadow: var(--card-shadow);
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.explorer-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-line);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
}

.explorer-card-top,
.service-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.service-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--accent-line);
    background: rgba(255, 255, 255, 0.82);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

[data-theme="dark"] .service-chip {
    background: rgba(15, 23, 42, 0.72);
}

.service-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.service-heading-icon {
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    padding: 4px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.service-title-icon {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
}

.service-heading-copy {
    min-width: 0;
}

.service-heading-copy h3 {
    margin: 0;
    color: var(--text);
    font-size: 1.4rem;
    line-height: 1.18;
    letter-spacing: -0.02em;
    font-weight: 800;
}

.explorer-card .service-heading-copy h3 {
    font-size: 1.2rem;
}

.service-caption {
    margin: 6px 0 0;
    color: var(--accent);
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.45;
}

.explorer-description,
.service-description {
    margin: 0;
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.68;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.service-tags li {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--accent-line);
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
}

.service-card-top {
    flex-wrap: nowrap;
    min-height: 32px;
}

.service-session-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin-left: auto;
    min-height: 32px;
    padding: 3px 6px 3px 4px;
    border-radius: 999px;
    border: 1px solid var(--accent-line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%),
        var(--accent-soft);
}

.service-session-inline-profile {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.service-session-inline-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--accent-line);
    color: var(--accent);
    font-size: 0.66rem;
    font-weight: 900;
    flex: 0 0 24px;
}

[data-theme="dark"] .service-session-inline {
    background:
        linear-gradient(180deg, rgba(148, 163, 184, 0.06) 0%, transparent 100%),
        rgba(15, 23, 42, 0.38);
}

[data-theme="dark"] .service-session-inline-avatar {
    background: rgba(15, 23, 42, 0.78);
}

.service-session-inline-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-session-inline-profile strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 800;
    max-width: 74px;
}

.btn-ghost.btn-inline-action {
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.explorer-card-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 800;
}

.explorer-card-link i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--accent);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.service-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 100%;
    padding: 24px;
    border-radius: 28px;
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, var(--accent-soft) 0%, transparent 42%),
        linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.service-card::after {
    content: "";
    position: absolute;
    right: -10%;
    bottom: -16%;
    width: 180px;
    height: 180px;
    border-radius: 999px;
    background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
    filter: blur(8px);
    pointer-events: none;
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-line);
    box-shadow: 0 28px 56px rgba(15, 23, 42, 0.16);
}

.service-card:target {
    border-color: var(--accent-line);
    box-shadow: 0 0 0 1px var(--accent-line), 0 28px 56px rgba(15, 23, 42, 0.16);
}

[data-theme="dark"] .explorer-card,
[data-theme="dark"] .service-card {
    background:
        radial-gradient(circle at top right, rgba(148, 163, 184, 0.08), transparent 28%),
        linear-gradient(180deg, rgba(11, 18, 31, 0.94) 0%, rgba(7, 15, 28, 0.9) 100%);
}

.service-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.service-actions.has-secondary {
    grid-template-columns: minmax(0, 1fr) minmax(188px, 208px);
}

.service-card-cta {
    width: 100%;
}

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 18px;
    border-radius: 16px;
    border: 1px solid var(--line);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
    border-color: rgba(37, 99, 235, 0.24);
    background: linear-gradient(135deg, #2563eb 0%, #0f7ae5 100%);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
    color: #fff;
}

.service-card[data-slug="kids"] .btn-primary {
    background: linear-gradient(135deg, #cc9550 0%, #8f5a23 100%);
    box-shadow: 0 14px 28px rgba(143, 90, 35, 0.22);
}

.service-card[data-slug="lite"] .btn-primary {
    background: linear-gradient(135deg, #7d9c44 0%, #557a2c 100%);
    box-shadow: 0 14px 28px rgba(85, 122, 44, 0.22);
}

.service-card[data-slug="moco"] .btn-primary {
    background: linear-gradient(135deg, #31abe5 0%, #1e84d4 100%);
    box-shadow: 0 14px 28px rgba(30, 132, 212, 0.22);
}

.service-card[data-slug="day"] .btn-primary {
    background: linear-gradient(135deg, #18c0c1 0%, #1497ad 100%);
    box-shadow: 0 14px 28px rgba(20, 151, 173, 0.22);
}

.btn-primary:hover,
.btn-ghost:hover {
    transform: translateY(-1px);
}

.btn-primary:hover {
    color: #fff;
}

.btn-ghost {
    background: var(--surface-soft);
    color: var(--text);
}

.btn-ghost:hover {
    border-color: var(--line-strong);
    background: var(--surface);
    color: var(--accent, #2563eb);
}

.download-menu {
    position: relative;
}

.btn-download,
.btn-download-link {
    width: 100%;
    min-width: 188px;
    gap: 8px;
    cursor: pointer;
    position: relative;
    justify-content: center;
    padding-left: 18px;
    padding-right: 42px;
}

.btn-download {
    list-style: none;
}

.btn-download.is-direct-download {
    padding-right: 18px;
}

.btn-download::marker {
    content: "";
}

.btn-download::-webkit-details-marker {
    display: none;
}

.download-summary-caret {
    position: absolute;
    right: 18px;
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.download-menu[open] .download-summary-caret {
    transform: rotate(180deg);
}

.btn-download.is-direct-download .download-summary-caret {
    display: none;
}

.download-popover {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    min-width: 176px;
    border-radius: 16px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    box-shadow: 0 20px 38px rgba(15, 23, 42, 0.16);
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 20;
}

.download-menu[open] .download-popover {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.download-popover-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 700;
}

.download-popover-item + .download-popover-item {
    border-top: 1px solid var(--line);
}

.download-popover-item:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.download-popover-item i,
.btn-download-link i {
    width: 16px;
    text-align: center;
}

.btn-primary:focus-visible,
.btn-ghost:focus-visible,
.explorer-card:focus-visible,
.service-card:focus-visible,
.download-popover-item:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.24);
}

@media (max-width: 1040px) {
    .portal-hero::after,
    .portal-directory::before {
        display: none;
    }

    .portal-hero-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .hero-copy,
    .section-heading,
    .hero-copy h1,
    .hero-text {
        max-width: 100%;
    }

    .hero-visual {
        min-height: 380px;
    }

}

@media (max-width: 768px) {
    .portal-main {
        min-height: calc(100vh - 68px);
        padding: 64px 0 56px;
    }

    .portal-hero,
    .portal-explorer,
    .portal-directory {
        padding-left: 14px;
        padding-right: 14px;
    }

    .hero-copy h1 {
        font-size: clamp(2rem, 8vw, 3rem);
        line-height: 1.08;
    }

    .hero-text,
    .section-lead {
        font-size: 0.92rem;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
        margin-top: 24px;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-ghost {
        width: 100%;
        min-width: 0;
    }

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

    .hero-visual {
        min-height: 300px;
    }

    .hero-visual-image {
        width: min(100%, 420px);
    }

    .section-heading h2 {
        font-size: clamp(1.6rem, 6vw, 2.2rem);
    }

    .explorer-card,
    .service-card {
        padding: 20px;
        border-radius: 22px;
    }

    .service-actions.has-secondary {
        grid-template-columns: 1fr;
    }

    .service-session-inline {
        flex: 0 1 auto;
        width: auto;
        max-width: 68%;
        justify-content: flex-end;
        margin-left: auto;
        gap: 6px;
        padding: 2px 5px 2px 3px;
    }

    .service-session-inline-profile {
        gap: 5px;
    }

    .service-session-inline-profile strong {
        max-width: 56px;
        font-size: 0.72rem;
    }

    .service-session-inline-avatar {
        width: 22px;
        height: 22px;
        flex: 0 0 22px;
        font-size: 0.62rem;
    }

    .btn-ghost.btn-inline-action {
        min-height: 24px;
        padding: 0 8px;
        font-size: 0.68rem;
    }

}

@media (max-width: 520px) {
    .hero-copy h1 {
        font-size: clamp(1.85rem, 9vw, 2.45rem);
    }

    .hero-text,
    .explorer-description,
    .service-description {
        font-size: 0.86rem;
        line-height: 1.62;
    }

    .service-heading-copy h3 {
        font-size: 1.24rem;
    }

    .explorer-card .service-heading-copy h3 {
        font-size: 1.12rem;
    }

}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .hero-intro .hero-eyebrow,
    .hero-intro h1,
    .hero-intro .hero-text,
    .hero-intro .hero-actions,
    .hero-intro .hero-visual,
    .portal-explorer .section-heading,
    .portal-explorer .service-card {
        opacity: 1;
        transform: none;
        filter: none;
        transition: none;
    }

    .explorer-card,
    .service-card,
    .btn-primary,
    .btn-ghost,
    .download-summary-caret,
    .download-popover {
        transition: none;
    }
}
