/* HonourStage GH v1.45.0 — cross-portal content parity and density system.
   Shared presentation only: Admin, Organizer, public, auth, judge/team lifecycle surfaces. */

:root {
    --hs-parity-gap: clamp(.85rem, 1.2vw, 1.2rem);
    --hs-parity-gap-lg: clamp(1rem, 1.55vw, 1.55rem);
    --hs-parity-radius: 18px;
    --hs-parity-radius-lg: 24px;
    --hs-parity-control-h: 44px;
    --hs-parity-shadow: 0 14px 38px rgba(2, 8, 23, .09);
    --hs-parity-shadow-hover: 0 22px 52px rgba(2, 8, 23, .14);
    --hs-parity-ease: cubic-bezier(.2, .75, .2, 1);
}

html[data-theme="light"], html[data-bs-theme="light"], html[data-workspace-theme="light"] {
    --hs-parity-shadow: 0 14px 38px rgba(15, 23, 42, .07);
    --hs-parity-shadow-hover: 0 22px 52px rgba(15, 23, 42, .11);
}

/* ------------------------------------------------------------
   Workspace portals — Admin + Organizer
   ------------------------------------------------------------ */
body.workspace-portal .content.container-fluid {
    padding: clamp(.85rem, 1.35vw, 1.35rem) !important;
}

body.workspace-portal .content.container-fluid > :where(section, .row, .card, .workspace-panel, .al-workspace-hero, .al-workspace-grid, .organizer-hero, .admin-page-hero) + :where(section, .row, .card, .workspace-panel, .al-workspace-hero, .al-workspace-grid, .organizer-hero, .admin-page-hero) {
    margin-top: var(--hs-parity-gap-lg);
}

body.workspace-portal :where(
    .admin-page-hero,
    .admin-dashboard-hero,
    .organizer-hero,
    .campaign-ops-hero,
    .fin-hero,
    .payment-channel-hero,
    .launch-onboarding-hero,
    .onboarding-hero,
    .al-workspace-hero
) {
    min-height: 0 !important;
    padding: clamp(1.25rem, 1.8vw, 1.75rem) !important;
    border-radius: var(--hs-parity-radius-lg) !important;
}

body.workspace-portal :where(
    .admin-page-hero,
    .admin-dashboard-hero,
    .organizer-hero,
    .campaign-ops-hero,
    .fin-hero,
    .payment-channel-hero,
    .launch-onboarding-hero,
    .onboarding-hero,
    .al-workspace-hero
) h1 {
    max-width: 18ch;
    margin-block: .3rem .65rem !important;
    font-size: clamp(2rem, 3.45vw, 3.65rem) !important;
    line-height: 1.02 !important;
    letter-spacing: -.045em !important;
}

body.workspace-portal :where(.admin-page-hero, .organizer-hero, .campaign-ops-hero, .fin-hero, .payment-channel-hero, .launch-onboarding-hero, .onboarding-hero, .al-workspace-hero) p {
    max-width: 72ch;
    margin-bottom: .8rem;
    line-height: 1.55;
}

body.workspace-portal .al-workspace-hero {
    align-items: center !important;
    gap: 1.25rem !important;
}

body.workspace-portal .al-workspace-hero .al-kpi {
    min-width: 140px !important;
    padding: .9rem 1rem !important;
    border-radius: 16px !important;
}
body.workspace-portal .al-workspace-hero .al-kpi strong { font-size: clamp(1.8rem, 2.6vw, 2.55rem) !important; }

body.workspace-portal :where(.admin-kpi-grid, .workspace-kpi-grid, .organizer-metric-grid, .payment-channel-kpis, .al-metric-grid) {
    gap: var(--hs-parity-gap) !important;
}

body.workspace-portal :where(.admin-stat-card, .workspace-kpi, .fin-kpi, .payment-channel-kpi, .al-metric-grid article) {
    min-height: 0 !important;
    padding: 1rem 1.05rem !important;
    border-radius: var(--hs-parity-radius) !important;
}

body.workspace-portal :where(.admin-stat-card__value, .workspace-kpi strong, .fin-kpi strong, .payment-channel-kpi strong, .al-metric-grid strong) {
    font-size: clamp(1.45rem, 2.25vw, 2.15rem) !important;
    line-height: 1.05 !important;
}

body.workspace-portal :where(.admin-stat-card__meta, .workspace-kpi p, .fin-kpi p, .payment-channel-kpi p) {
    margin-top: .45rem !important;
    line-height: 1.45 !important;
}

body.workspace-portal :where(.workspace-panel, .organizer-section-card, .organizer-ops-card, .admin-operations-card, .fin-panel, .al-panel) {
    min-width: 0;
    padding: clamp(1rem, 1.45vw, 1.35rem) !important;
    border-radius: var(--hs-parity-radius) !important;
}

body.workspace-portal .al-workspace-grid {
    grid-template-columns: minmax(270px, .72fr) minmax(0, 1.58fr) !important;
    align-items: start !important;
    gap: var(--hs-parity-gap-lg) !important;
}
body.workspace-portal .al-workspace-grid > * { min-width: 0; align-self: start; }
body.workspace-portal .al-card-grid { gap: var(--hs-parity-gap) !important; }

body.workspace-portal :where(.form-control, .form-select, .al-form input, .al-form select, .al-form textarea) {
    min-height: var(--hs-parity-control-h);
}
body.workspace-portal :where(.al-form, .workspace-payment-filters, .organizer-ops-toolbar, .admin-operations-toolbar) { gap: .8rem !important; }

body.workspace-portal :where(.table-responsive, .admin-directory-table-wrap, .organizer-directory-table-wrap) {
    position: relative;
    border-radius: 14px;
    scrollbar-width: thin;
}
body.workspace-portal :where(.table, .admin-table, .organizer-table) > :where(thead, tbody) > tr > :where(th, td) {
    padding-block: .72rem !important;
}

body.workspace-portal .hs-parity-scroll {
    --hs-scroll-shadow: rgba(2, 8, 23, .18);
    box-shadow: inset 0 0 0 transparent;
}
body.workspace-portal .hs-parity-scroll:not(.is-at-start)::before,
body.workspace-portal .hs-parity-scroll:not(.is-at-end)::after,
body.ac-site .hs-parity-scroll:not(.is-at-start)::before,
body.ac-site .hs-parity-scroll:not(.is-at-end)::after,
body.al-lifecycle-page .hs-parity-scroll:not(.is-at-start)::before,
body.al-lifecycle-page .hs-parity-scroll:not(.is-at-end)::after {
    content: "";
    position: sticky;
    z-index: 8;
    top: 0;
    bottom: 0;
    width: 22px;
    height: 100%;
    pointer-events: none;
}
body.workspace-portal .hs-parity-scroll:not(.is-at-start)::before,
body.ac-site .hs-parity-scroll:not(.is-at-start)::before,
body.al-lifecycle-page .hs-parity-scroll:not(.is-at-start)::before {
    left: 0;
    float: left;
    background: linear-gradient(90deg, rgba(2,8,23,.2), transparent);
}
body.workspace-portal .hs-parity-scroll:not(.is-at-end)::after,
body.ac-site .hs-parity-scroll:not(.is-at-end)::after,
body.al-lifecycle-page .hs-parity-scroll:not(.is-at-end)::after {
    right: 0;
    float: right;
    background: linear-gradient(270deg, rgba(2,8,23,.2), transparent);
}

/* Organizer lifecycle pages still using the feature-train layout. */
body.workspace-portal.al-lifecycle-page .al-panel h2 { margin-block: .15rem .65rem; font-size: clamp(1.25rem, 1.9vw, 1.85rem) !important; }
body.workspace-portal.al-lifecycle-page .al-definition { margin-block: .8rem !important; }
body.workspace-portal.al-lifecycle-page .al-definition div { padding-bottom: .55rem !important; }
body.workspace-portal.al-lifecycle-page .al-actions { gap: .55rem !important; }
body.workspace-portal.al-lifecycle-page .al-btn { min-height: 42px; padding: .65rem .9rem !important; }

/* ------------------------------------------------------------
   Public portal — directory/detail/results/lifecycle pages
   ------------------------------------------------------------ */
body.ac-site :where(.ac-page-hero, .al-public-hero, .results-hub-hero, .results-archive-hero, .event-results-hero, .category-results-hero, .ac-organizer-public-hero) {
    min-height: 0 !important;
}
body.ac-site .ac-page-hero {
    padding-block: clamp(2.4rem, 4.5vw, 4.5rem) !important;
}
body.ac-site .ac-page-hero--short { padding-block: clamp(1.9rem, 3.4vw, 3.25rem) !important; }
body.ac-site .ac-page-hero :where(h1, h2),
body.ac-site .al-public-hero h1,
body.ac-site :where(.results-hub-hero, .results-archive-hero, .event-results-hero, .category-results-hero) h1 {
    max-width: 17ch;
    font-size: clamp(2.3rem, 5vw, 4.9rem) !important;
    line-height: 1 !important;
    letter-spacing: -.045em !important;
}
body.ac-site .al-public-hero { padding: clamp(2.6rem, 5vw, 4.8rem) max(4vw, 1.25rem) !important; }
body.ac-site .al-public-grid {
    gap: var(--hs-parity-gap-lg) !important;
    padding: clamp(1.5rem, 3.5vw, 3.2rem) max(4vw, 1.25rem) !important;
}
body.ac-site .ac-page-section { padding-block: clamp(2.5rem, 5vw, 5.25rem) !important; }
body.ac-site .ac-page-section--compact { padding-block: clamp(1.8rem, 3.5vw, 3.4rem) !important; }
body.ac-site :where(.ac-section-heading, .results-section-heading) { margin-bottom: clamp(1.1rem, 2vw, 1.8rem) !important; }
body.ac-site :where(.ac-purposeful-empty, .results-empty, .ac-directory-empty) {
    min-height: 0 !important;
    padding: clamp(1.35rem, 2.6vw, 2.25rem) !important;
    border-radius: var(--hs-parity-radius) !important;
}
body.ac-site :where(.ac-filter-bar, .ac-nominee-filters, .results-filter-bar) {
    gap: .7rem !important;
    padding: .85rem !important;
    border-radius: 16px !important;
}
body.ac-site :where(input, select, textarea) { max-width: 100%; }
body.ac-site :where(.al-panel, .ac-contact-panel) { border-radius: var(--hs-parity-radius) !important; }
body.ac-site :where(.ac-nominee-grid, .results-grid, .results-event-grid, .results-archive-grid, .al-public-grid) > * { min-width: 0; }

/* ------------------------------------------------------------
   Authentication portal — compact, consistent form rhythm
   ------------------------------------------------------------ */
body.auth-page .auth-content { padding-block: clamp(2.1rem, 5vh, 3.8rem) !important; }
body.auth-page .auth-content h1 { font-size: clamp(2.25rem, 3.7vw, 3.8rem) !important; }
body.auth-page .auth-lead { margin-bottom: 1.35rem !important; }
body.auth-page .auth-form { gap: 1rem !important; }
body.auth-page .auth-input input { min-height: 48px !important; border-radius: 12px !important; }
body.auth-page .auth-submit { min-height: 48px !important; border-radius: 12px !important; }
body.auth-page .auth-secondary { margin-top: 1.15rem !important; padding-top: 1rem !important; }
body.auth-page .auth-trust-row { margin-top: 1rem !important; }
body.auth-page .auth-story { margin-block: clamp(4rem, 12vh, 9rem) 2rem !important; }
body.auth-page .auth-story h2 { font-size: clamp(2.35rem, 4vw, 4.65rem) !important; }

/* ------------------------------------------------------------
   Judge + organizer-team secure mini portals
   ------------------------------------------------------------ */
body.al-judge-body {
    --hs-mini-bg: #07101f;
    --hs-mini-surface: #0e1c33;
    --hs-mini-surface-2: #102442;
    --hs-mini-line: #263958;
    --hs-mini-text: #eef4ff;
    --hs-mini-muted: #afbed7;
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 0%, rgba(49,89,239,.16), transparent 30rem),
        var(--hs-mini-bg) !important;
    color: var(--hs-mini-text) !important;
}
html[data-theme="light"] body.al-judge-body,
html[data-bs-theme="light"] body.al-judge-body {
    --hs-mini-bg: #f3f6fb;
    --hs-mini-surface: #ffffff;
    --hs-mini-surface-2: #f7f9fc;
    --hs-mini-line: #dce4ef;
    --hs-mini-text: #101827;
    --hs-mini-muted: #66758c;
    background: radial-gradient(circle at 10% 0%, rgba(49,89,239,.09), transparent 28rem), var(--hs-mini-bg) !important;
}
body.al-judge-body .al-judge-shell { min-height: 100svh; padding: clamp(1rem, 3vw, 2.5rem) !important; }
body.al-judge-body .al-judge-card {
    width: min(100%, 620px);
    max-width: none !important;
    padding: clamp(1.35rem, 3vw, 2rem) !important;
    border-color: var(--hs-mini-line) !important;
    background: var(--hs-mini-surface) !important;
    color: var(--hs-mini-text) !important;
    box-shadow: var(--hs-parity-shadow);
}
body.al-judge-body .al-judge-workspace {
    width: min(100%, 1220px);
    max-width: none !important;
    padding: clamp(1rem, 2.4vw, 2rem) !important;
}
body.al-judge-body .al-judge-header {
    align-items: center !important;
    gap: 1rem !important;
    margin-bottom: 1rem;
    padding: clamp(1.1rem, 2.2vw, 1.6rem) !important;
    border: 1px solid var(--hs-mini-line) !important;
    border-radius: var(--hs-parity-radius-lg);
    background: var(--hs-mini-surface);
    box-shadow: var(--hs-parity-shadow);
}
body.al-judge-body .al-judge-header h1 {
    margin: .25rem 0 .45rem !important;
    font-size: clamp(2rem, 4vw, 3.75rem) !important;
    line-height: 1 !important;
}
body.al-judge-body .al-judge-header p,
body.al-judge-body .al-score-card p { color: var(--hs-mini-muted) !important; }
body.al-judge-body .al-kpi {
    min-width: 120px !important;
    padding: .8rem .95rem !important;
    border-color: var(--hs-mini-line) !important;
    background: var(--hs-mini-surface-2);
}
body.al-judge-body .al-kpi strong { font-size: 2rem !important; }
body.al-judge-body .al-judge-guidance,
body.al-judge-body .al-score-card,
body.al-judge-body .al-conflict,
body.al-judge-body .al-panel {
    border-color: var(--hs-mini-line) !important;
    background: var(--hs-mini-surface) !important;
    color: var(--hs-mini-text) !important;
}
body.al-judge-body .al-judge-guidance { margin-block: .85rem !important; padding: .85rem 1rem !important; }
body.al-judge-body .al-score-grid { gap: .85rem !important; }
body.al-judge-body .al-score-card { gap: 1rem !important; padding: 1rem !important; border-radius: var(--hs-parity-radius) !important; }
body.al-judge-body .al-score-card__person img { width: 70px !important; height: 70px !important; border-radius: 14px !important; }
body.al-judge-body .al-score-fields { gap: .65rem !important; }
body.al-judge-body .al-score-fields input,
body.al-judge-body .al-score-fields textarea,
body.al-judge-body .al-form input,
body.al-judge-body .al-form select,
body.al-judge-body .al-form textarea {
    min-height: 44px;
    border-color: var(--hs-mini-line) !important;
    background: var(--hs-mini-surface-2) !important;
    color: var(--hs-mini-text) !important;
}
body.al-judge-body .al-sticky-actions {
    bottom: .75rem !important;
    margin-block: .85rem !important;
    padding: .75rem !important;
    border-color: var(--hs-mini-line) !important;
    background: color-mix(in srgb, var(--hs-mini-bg) 90%, transparent) !important;
    backdrop-filter: blur(14px);
}
body.al-judge-body .al-card-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: .85rem !important; }
body.al-judge-body .al-alert { border-radius: 14px; }

/* Recognition certificate screen keeps print geometry; only screen chrome is normalized. */
@media screen {
    body.al-certificate-body { min-height: 100svh; }
    body.al-certificate-body .al-certificate-actions { gap: .55rem !important; flex-wrap: wrap; }
}

/* ------------------------------------------------------------
   Shared scroll, focus and responsive rules
   ------------------------------------------------------------ */
.hs-parity-scroll { position: relative; overflow: auto; outline: 0; }
.hs-parity-scroll:focus-visible { box-shadow: 0 0 0 3px rgba(49,89,239,.22); }

@media (max-width: 1180px) {
    body.workspace-portal .al-workspace-grid { grid-template-columns: minmax(240px, .78fr) minmax(0, 1.22fr) !important; }
}

@media (max-width: 900px) {
    body.workspace-portal .al-workspace-grid { grid-template-columns: 1fr !important; }
    body.workspace-portal :where(.admin-page-hero, .organizer-hero, .campaign-ops-hero, .fin-hero, .payment-channel-hero, .launch-onboarding-hero, .onboarding-hero, .al-workspace-hero) h1 { max-width: none; }
    body.ac-site .al-public-grid { grid-template-columns: 1fr !important; }
    body.al-judge-body .al-judge-header { align-items: flex-start !important; }
}

@media (max-width: 680px) {
    body.workspace-portal .content.container-fluid { padding: .75rem !important; }
    body.workspace-portal :where(.admin-page-hero, .organizer-hero, .campaign-ops-hero, .fin-hero, .payment-channel-hero, .launch-onboarding-hero, .onboarding-hero, .al-workspace-hero) { padding: 1rem !important; border-radius: 18px !important; }
    body.workspace-portal :where(.admin-page-hero, .organizer-hero, .campaign-ops-hero, .fin-hero, .payment-channel-hero, .launch-onboarding-hero, .onboarding-hero, .al-workspace-hero) h1 { font-size: clamp(1.75rem, 8vw, 2.55rem) !important; }
    body.ac-site .ac-page-hero { padding-block: 2rem !important; }
    body.ac-site .al-public-hero { padding: 2.2rem 1rem !important; }
    body.auth-page .auth-content { padding-block: 1.8rem !important; }
    body.al-judge-body .al-score-card { grid-template-columns: 1fr !important; }
}

@media (prefers-reduced-motion: reduce) {
    .hs-parity-scroll,
    body.workspace-portal :where(.admin-stat-card, .workspace-kpi, .al-panel),
    body.ac-site :where(.ac-event-row, .ac-nominee-card, .al-panel),
    body.al-judge-body :where(.al-score-card, .al-panel) {
        transition: none !important;
        animation: none !important;
    }
}

/* Audit completions for public/results and Organizer onboarding classes that existed without a dedicated rule. */
body.ac-site .event-results-hero__copy { min-width: 0; align-self: center; }
body.ac-site .leader-score {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
    margin-top: .9rem;
}
body.ac-site .leader-score__primary,
body.ac-site .leader-score__share {
    min-width: 0;
    padding: .8rem .9rem;
    border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, currentColor 4%, transparent);
}
body.ac-site .leader-score :where(span, strong) { display: block; }
body.ac-site .leader-score span { opacity: .7; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
body.ac-site .leader-score strong { margin-top: .3rem; font-size: clamp(1.3rem, 2vw, 1.8rem); }
body.ac-site .results-filter-button--quiet { background: transparent; }
body.workspace-portal .onboarding-steps { display: grid; gap: .75rem; }

@media (max-width: 540px) {
    body.ac-site .leader-score { grid-template-columns: 1fr; }
}
