/* Huntica account portal. All brand colors, fonts, buttons and animations are
   inherited from the existing theme. This file only owns the new composition. */
.is-portal {
    --portal-sidebar-width: 240px;
    --portal-brand-height: 190px;
    --portal-gutter: clamp(24px, 3vw, 64px);
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}
.is-portal [hidden] { display: none !important; }
.portal-shell { height: 100%; isolation: isolate; }
.portal-background { position: fixed; inset: 0 0 0 var(--portal-sidebar-width); z-index: -1; }
.portal-background .cine-bg__gradient { background: linear-gradient(180deg, rgb(0 0 0 / .08), rgb(0 0 0 / .3)); }
.portal-background .cine-bg__tint { background: rgb(0 0 0 / .2); }
.portal-background .cine-bg__vignette { opacity: .6; }
.portal-masthead {
    position: fixed; inset: 0 auto auto 0; width: var(--portal-sidebar-width);
    height: var(--portal-brand-height); display: flex; align-items: center;
    justify-content: center; padding: 20px 26px 8px; z-index: 32; background: var(--bg-secondary);
}
.portal-masthead .brand { margin: 0; justify-content: center; width: 100%; }
.portal-masthead .brand__logo { width: 100%; max-width: 184px; height: auto; max-height: 150px; object-fit: contain; }
/* The approved logo has a black ground; screen composites it into the dark UI. */
.brand__logo[src*="huntica-logo-minimal.png"] { mix-blend-mode: screen; filter: none; }
.portal-menu-toggle, .portal-mobile-account { display: none; }
.portal-sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--portal-sidebar-width);
    padding: var(--portal-brand-height) 18px 18px; z-index: 30;
    display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
    background: var(--bg-secondary); border-right: 1px solid var(--border-strong);
    box-shadow: var(--shadow-soft);
}
.portal-sidebar__rule, .portal-explore__rule { display: flex; align-items: center; gap: 12px; margin: 6px auto 25px; width: 80%; }
.portal-sidebar__rule::before, .portal-sidebar__rule::after,
.portal-explore__rule::before, .portal-explore__rule::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-deep)); }
.portal-sidebar__rule::after, .portal-explore__rule::after { transform: rotate(180deg); }
.portal-sidebar__rule i, .portal-explore__rule i { width: 5px; height: 5px; background: var(--gold-primary); transform: rotate(45deg); }
.portal-nav { margin-inline: -18px; }
.portal-nav__row { position: relative; display: flex; align-items: stretch; }
.portal-nav__link {
    display: flex; align-items: center; gap: 16px; min-height: 54px; width: 100%;
    padding: 14px 22px; padding-right: 44px; border-left: 2px solid transparent;
    color: var(--text-secondary); font-size: var(--text-nav); letter-spacing: var(--tracking-nav);
    text-transform: uppercase; transition: background var(--duration-fast), color var(--duration-fast);
}
.portal-nav__link > .icon { flex: 0 0 22px; width: 22px; height: 22px; color: var(--gold-primary); }
.portal-nav__link:hover, .portal-nav__link:focus-visible { color: var(--gold-bright); background: rgb(var(--gold-rgb) / .06); }
.portal-nav__link.is-active { color: var(--gold-bright); border-left-color: var(--gold-primary); background: linear-gradient(90deg, rgb(var(--gold-cta-rgb) / .2), transparent); }
.portal-nav__expand { position: absolute; inset: 6px 6px 6px auto; width: 36px; display: grid; place-items: center; border: 0; background: transparent; color: var(--gold-muted); cursor: pointer; }
.portal-nav__expand:disabled { cursor: default; opacity: .65; }
.portal-nav__expand .icon { transition: transform var(--duration-fast); }
.portal-nav__expand[aria-expanded=true] .icon { transform: rotate(180deg); }
.portal-nav__children { display: grid; gap: 2px; margin: 0; padding: 5px 12px 12px 30px; list-style: none; }
.portal-nav__children a { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 8px 10px; border-left: 1px solid var(--border-default); font-size: var(--text-small); line-height: 1.3; color: var(--text-secondary); transition: color var(--duration-fast), background var(--duration-fast), border-color var(--duration-fast); }
.portal-nav__children a > .icon { flex: 0 0 17px; width: 17px; height: 17px; color: var(--gold-muted); }
.portal-nav__children a:hover, .portal-nav__children a:focus-visible { color: var(--gold-bright); background: rgb(var(--gold-rgb) / .06); }
.portal-nav__children a[aria-current=page] { color: var(--gold-bright); border-left-color: var(--gold-primary); background: linear-gradient(90deg, rgb(var(--gold-cta-rgb) / .15), rgb(var(--gold-rgb) / .025)); }
.portal-nav__children a[aria-current=page] > .icon { color: var(--gold-primary); }
.portal-sidebar__bottom { display: grid; gap: 16px; margin-top: auto; padding-top: 30px; }
.portal-help { display: flex; gap: 10px; align-items: center; font-size: var(--text-caption); color: var(--text-secondary); padding: 0 8px; }
.portal-help .icon { color: var(--gold-primary); }
.portal-sidebar .lang-switch { justify-content: center; }
.portal-sidebar .lang-switch__item { min-height: 36px; }
.portal-copyright { border-top: 1px solid var(--border-default); padding-top: 15px; text-align: center; color: var(--text-secondary); font-size: var(--text-caption); }
.portal-main {
    position: fixed; inset: 0 0 0 var(--portal-sidebar-width); display: grid; place-items: center;
    padding: var(--portal-gutter); min-width: 0; outline: none;
}
.portal-frame {
    position: relative; width: min(1160px, 100%); height: min(850px, 100%);
    min-height: 0; min-width: 0; display: flex; flex-direction: column;
    border: 1px solid var(--gold-deep); outline: 1px solid var(--border-default); outline-offset: -6px;
    background: var(--bg-secondary); box-shadow: var(--shadow-deep);
    container-type: inline-size;
}
.portal-frame--home { width: min(960px, 90%); height: min(670px, 94%); }
.portal-frame::before { content: ''; position: absolute; inset: 7px; background-image: var(--texture-noise); opacity: .07; pointer-events: none; }
.portal-frame__corners { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.portal-frame__corners i { position: absolute; width: 9px; height: 9px; border: 1px solid var(--gold-primary); background: var(--bg-secondary); transform: rotate(45deg); }
.portal-frame__corners i:nth-child(1) { top: -4px; left: -4px; }
.portal-frame__corners i:nth-child(2) { top: -4px; right: -4px; }
.portal-frame__corners i:nth-child(3) { bottom: -4px; right: -4px; }
.portal-frame__corners i:nth-child(4) { bottom: -4px; left: -4px; }
.portal-frame__header { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-shrink: 0; padding: 23px 32px 16px; }
.portal-frame__header .t-eyebrow { font-size: var(--text-caption); color: var(--gold-primary); }
.portal-login { display: inline-flex; gap: 8px; align-items: center; font-size: var(--text-caption); text-transform: uppercase; letter-spacing: var(--tracking-nav); color: var(--gold-primary); }
.portal-scroll { position: relative; flex: 1; min-height: 0; min-width: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scroll-behavior: smooth; scroll-padding: 24px; }
.portal-frame__footer { position: relative; text-align: center; flex-shrink: 0; padding: 13px 22px 20px; font-size: var(--text-caption); color: var(--text-secondary); }
.portal-footer-extra { margin-top: 5px; }
.portal-home, .portal-welcome { min-height: 100%; }
.portal-welcome { display: flex; flex-direction: column; justify-content: center; }
.portal-welcome .hero { padding: 20px 25px 16px; min-height: 0; display: block; background: none; overflow: visible; }
.portal-welcome .hero > .cine-bg { display: none; }
.portal-welcome .hero .container { padding: 0; }
.portal-welcome .hero__content { padding: 0; max-width: 760px; gap: 0; }
.portal-welcome .hero__rule { margin: 0 auto 27px; width: min(310px, 65%); }
.portal-welcome .hero__title { font-size: clamp(32px, 5.8cqi, 64px); line-height: 1.12; margin: 0 auto; }
.portal-welcome .hero__lede { font-size: clamp(15px, 2cqi, 18px); margin: 21px auto 0; max-width: 580px; }
.portal-welcome .hero__actions { margin-top: 30px; gap: 18px; }
.portal-welcome .hero__actions .fbtn { min-width: 205px; }
.portal-explore { padding: 8px 30px 20px; text-align: center; }
.portal-explore__rule { width: min(340px, 70%); margin: 14px auto 23px; }
.portal-explore h2 { color: var(--gold-primary); margin-bottom: 25px; font-weight: var(--weight-ui); }
.portal-explore nav { display: flex; justify-content: center; flex-wrap: wrap; }
.portal-explore a { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 24px; color: var(--text-primary); font-size: var(--text-small); }
.portal-explore a + a { border-left: 1px solid var(--border-strong); }
.portal-explore a > .icon:first-child { height: 28px; width: 28px; color: var(--gold-primary); }
.portal-explore a > .icon:last-child { height: 13px; width: 13px; color: var(--gold-primary); transition: transform var(--duration-fast); }
.portal-explore a:hover > .icon:last-child { transform: translateX(4px); }
.portal-motion { position: fixed; right: 12px; bottom: 10px; width: 36px; height: 36px; z-index: 5; background: var(--surface-overlay); }
.portal-background.is-paused *, .portal-background.is-paused *::before, .portal-background.is-paused *::after { animation-play-state: paused !important; }
.portal-backdrop { position: fixed; inset: 0; z-index: 29; background: rgb(0 0 0 / .72); }
/* Existing pages render intact inside the scrollable frame. */
.is-portal .portal-scroll .container { width: 100%; max-width: 100%; padding-inline: clamp(18px, 4cqi, 40px); }
.is-portal .page-hero { padding: 14px 0 0; min-height: 0; background: none; }
.is-portal .page-hero > .cine-bg { display: none; }
.is-portal .page-hero > .container { padding-block: 20px 0; }
.is-portal .page-hero__title { margin-bottom: 18px; }
.is-portal .page-hero .section-title__heading { font-size: clamp(25px, 4cqi, 42px); }
.is-portal .page-hero .section-title__ornament { display: none; }
.is-portal .subnav { margin-top: 18px; }
.is-portal .subnav__list { flex-wrap: wrap; gap: 4px 16px; justify-content: center; overflow: visible; mask-image: none; -webkit-mask-image: none; }
.is-portal .subnav__link { padding-block: 9px; font-size: var(--text-caption); white-space: normal; }
.is-portal .page-body { padding: 25px 0; }
.is-portal .portal-scroll .home-news { padding: 18px 0 24px; }
.is-portal .portal-scroll .home-pulse { padding: 24px 0; }
.is-portal .portal-scroll .section-title { margin-bottom: 26px; }
.is-portal .portal-scroll .features { padding: 30px 0; min-height: 0; }
.is-portal .portal-scroll .features__inner { gap: 35px; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.portal-guide-links { padding: 20px 30px 30px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.is-portal .portal-scroll .vocations { padding: 20px 0 35px; }
.is-portal .portal-scroll .vocations__inner { grid-template-columns: minmax(140px, .7fr) minmax(160px, .9fr) minmax(200px, 1.1fr); gap: 25px; }
.is-portal .portal-scroll .vocations__stage { width: 100%; max-width: 280px; }
.is-portal .portal-scroll .vocations__name { font-size: clamp(25px, 4cqi, 40px); }
.is-portal .portal-scroll .vocations__detail .t-body-lg { font-size: var(--text-body); }
.is-portal .portal-scroll .vocations__detail .fbtn { min-width: 0; }
.is-portal .portal-scroll .auth { grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); }
.is-portal .portal-scroll .legacy { min-width: 0; overflow-wrap: anywhere; overflow: visible; }
.is-portal .portal-scroll .world, .is-portal .portal-scroll .hs, .is-portal .portal-scroll .hall { margin-inline: 0; width: 100%; }
.is-portal .portal-scroll .fbtn { max-width: 100%; }
/* The old fieldset rule sets every legend to 100% width. Keep visually hidden
   legends from extending the narrow character cards' scrollable area. */
.is-portal .portal-scroll .fieldset > legend.visually-hidden { width: 1px; height: 1px; float: none; left: 0; top: 0; }
@container (max-width: 800px) {
    .portal-explore a { padding-inline: 17px; }
    .is-portal .portal-scroll .vocations__inner { grid-template-columns: minmax(135px, .8fr) minmax(0, 1.2fr); }
    .is-portal .portal-scroll .vocations__stage { width: 100%; max-width: 270px; justify-self: center; }
    .is-portal .portal-scroll .vocations__details { grid-column: 1 / -1; }
    .is-portal .portal-scroll .vocations__detail { max-width: 100%; }
    .is-portal .portal-scroll .features__inner { grid-template-columns: minmax(0, 1fr); }
    .is-portal .portal-scroll .auth { grid-template-columns: minmax(0, 1fr); }
    .is-portal .portal-scroll .auth__aside { display: none; }
}
@container (max-width: 560px) {
    .portal-welcome .hero { padding: 18px 18px 8px; }
    .portal-welcome .hero__title { font-size: clamp(29px, 8cqi, 44px); }
    .portal-welcome .hero__rule { margin-bottom: 20px; }
    .portal-welcome .hero__lede { margin-top: 17px; }
    .portal-welcome .hero__actions { flex-direction: column; gap: 14px; margin-top: 22px; align-items: center; }
    .portal-welcome .hero__actions .fbtn { width: min(300px, 100%); min-width: 0; }
    .portal-explore { padding: 5px 20px 12px; }
    .portal-explore__rule { margin-block: 16px 19px; }
    .portal-explore h2 { margin-bottom: 15px; }
    .portal-explore nav { flex-direction: column; align-items: center; }
    .portal-explore a { width: min(300px, 100%); justify-content: flex-start; padding: 10px 12px; gap: 16px; }
    .portal-explore a + a { border: 0; }
    .portal-explore a > .icon:last-child { margin-left: auto; }
    .portal-explore a > .icon:first-child { height: 24px; width: 24px; }
    .is-portal .portal-scroll .page-body .container { padding-inline: 14px; }
    .is-portal .portal-scroll .vocations__inner { display: flex; flex-direction: column; }
    .is-portal .portal-scroll .vocations__inner > .dlist { display: flex; flex-wrap: wrap; gap: 6px 16px; }
    .is-portal .portal-scroll .vocations__inner > .dlist .dlist__sub { display: none; }
    .is-portal .portal-scroll .vocations__stage { max-width: 220px; }
    .is-portal .portal-scroll .subnav__list { justify-content: flex-start; }
}
@media (max-width: 1023.98px) {
    .is-portal { --portal-sidebar-width: 0px; --portal-brand-height: 82px; --portal-gutter: 20px; }
    .portal-masthead { width: 100%; height: var(--portal-brand-height); padding: 4px 18px; display: grid; grid-template-columns: 44px 1fr 44px; background: var(--surface-overlay); border-bottom: 1px solid var(--border-default); }
    .portal-masthead .brand__logo { width: 110px; max-height: 73px; }
    .portal-masthead .brand { max-width: 150px; justify-self: center; }
    .portal-menu-toggle, .portal-mobile-account { display: inline-grid; place-items: center; width: 44px; height: 44px; }
    .portal-sidebar { width: min(300px, 86vw); top: var(--portal-brand-height); padding: 12px 18px 18px; transform: translateX(-105%); visibility: hidden; transition: transform var(--duration-base) var(--ease-cine), visibility var(--duration-base); }
    .portal-sidebar.is-open { transform: translateX(0); visibility: visible; }
    .portal-nav__children a { min-height: 42px; }
    .portal-sidebar__rule { display: none; }
    .portal-main { top: var(--portal-brand-height); padding: 22px 20px 28px; }
    .portal-frame, .portal-frame--home { width: 100%; height: 100%; max-height: 860px; }
    .portal-frame__header { padding: 18px 22px 10px; }
    .portal-frame__header .portal-login { display: none; }
    .portal-frame__footer { padding: 10px 20px 16px; }
    .portal-motion { width: 32px; height: 32px; bottom: 5px; right: 3px; }
}
@media (min-width: 1024px) and (max-height: 780px) {
    .is-portal { --portal-brand-height: 146px; --portal-gutter: 30px; }
    .portal-masthead .brand__logo { max-width: 152px; max-height: 115px; }
    .portal-nav__link { min-height: 46px; padding-block: 11px; }
    .portal-sidebar__rule { margin-bottom: 15px; }
    .portal-sidebar__bottom { gap: 12px; padding-top: 20px; }
    .portal-welcome .hero { padding-top: 8px; }
    .portal-welcome .hero__title { font-size: clamp(32px, 5.3cqi, 56px); }
    .portal-welcome .hero__rule { margin-bottom: 20px; }
    .portal-welcome .hero__actions { margin-top: 24px; }
    .portal-explore { padding-top: 0; }
}
@media (max-width: 600px) and (max-height: 760px) {
    .is-portal { --portal-brand-height: 68px; }
    .portal-masthead .brand__logo { max-height: 60px; width: 80px; }
    .portal-main { padding: 13px 14px 23px; }
    .portal-frame__header { padding: 14px 18px 5px; }
    .portal-welcome .hero { padding-top: 10px; }
    .portal-welcome .hero__rule { margin-bottom: 14px; }
    .portal-welcome .hero__title { font-size: clamp(27px, 7.6cqi, 36px); }
    .portal-welcome .hero__lede { font-size: 14px; margin-top: 13px; }
    .portal-welcome .hero__actions { margin-top: 16px; gap: 11px; }
    .portal-welcome .hero__actions .fbtn { min-height: 46px; padding-block: 12px; }
    .portal-explore__rule { margin-block: 12px 14px; }
    .portal-explore h2 { margin-bottom: 8px; }
    .portal-explore a { padding-block: 7px; min-height: 38px; }
    .portal-frame__footer { padding: 5px 18px 13px; }
}
@media (prefers-reduced-motion: reduce) {
    .portal-scroll { scroll-behavior: auto; }
    .portal-sidebar { transition: none; }
    .portal-nav__expand .icon, .portal-nav__children a { transition: none; }
}
