/* CSS Reset & Custom Properties */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Page-specific overrides for the post-CTA confirmation layout
   These are scoped under `.confirm-contents` to avoid changing global
   styles elsewhere. They adjust positioning, sizing and spacing only
   (no color values are changed). */
.confirm-contents {
    /* ensure content inherits the intended accent color without changing tokens */
    color: var(--color-accent-cream);
}

.confirm-contents .hero-title {
    position: static !important; /* use normal flow instead of absolute */
    margin: 0 auto 18px;
    text-align: center;
    color: var(--color-accent-cream) !important; /* use existing color token */
    font-size: 36px; /* match visual scale in Figma for mobile */
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    opacity: 1; /* match other text color (no faint treatment) */
}

.confirm-contents .company-name {
    position: static !important; /* override global absolute placement */
    display: block !important;
    margin-top: 14px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: auto !important;
    text-align: center;
    font-size: var(--font-size-heading);
    font-weight: 700;
    line-height: 1.31884765625;
    color: var(--color-accent-cream) !important;
}

/* Center the OR separator between the CTA and the email details in the confirm block */
.confirm-contents .or-sep {
    display: block !important;
    width: 100% !important;
    /* balance spacing: CTA has 30px bottom, email-details has 18px top.
       Give OR 0 top and 12px bottom so: 30 + 0 == 12 + 18 */
    margin: 0 auto 12px !important;
    text-align: center !important;
}

/* Ensure logo image stacks above the company name */
.confirm-contents img.footer-logo-img {
    display: block !important;
    margin: 0 auto !important;
}

/* Ensure the CTA in the confirm block matches Figma sizing/vertical rhythm. */
.confirm-contents .announcement-access {
    width: 121px !important;
    height: 29px !important;
    font-size: 14px;
    line-height: 29px; /* vertically center text inside the button */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    font-family: var(--font-family);
    letter-spacing: 0.06em;
}

/* Slightly tighten paragraph spacing inside confirm contents to match Figma */
.confirm-contents p {
    margin-bottom: 12px;
}


/* Home page specific layout: center main footer content; pin links to bottom */
.home-page .footer {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.home-page .footer-content {
    position: static;
    top: auto;
    left: auto;
    transform: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home-page .footer-links {
    position: absolute;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
}

/* Home Intro (index) — vertically centered main content using the logo and badges */
.home-intro {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    background-color: var(--color-primary-dark);
}

.home-intro-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-primary-dark);
}

.home-intro-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home-links {
    position: absolute;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-small);
    line-height: 18px;
    text-transform: uppercase;
    color: var(--color-accent-cream);
}

.home-intro .company-name {
    position: static;
    width: auto;
    height: auto;
    margin-top: 14px;
    font-size: var(--font-size-heading);
    font-weight: 700;
    line-height: 1.31884765625;
    text-align: center;
    color: var(--color-accent-cream);
}

/* Home badges replicate footer badge visuals without footer semantics */
.home-badges {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-badges .badge-group {
    position: static;
    width: 131.35px;
    height: 51.16px;
}

.home-badges .logo-badge {
    position: relative;
    width: 131.35px;
    height: 24.32px;
    top: 0;
}

.home-badges .logo-badge + .logo-badge {
    margin-top: 2.84px;
}

.home-badges .logo-badge:first-child,
.home-badges .logo-badge:last-child {
    top: 0;
}

.home-badges .badge-rect {
    width: 100%;
    height: 100%;
    border: 1px solid var(--color-accent-cream);
    background: transparent;
}

.home-badges .badge-text {
    position: absolute;
    top: 0.84px;
    left: 50%;
    transform: translateX(-50%);
    width: 113.76px;
    height: 21.81px;
    font-size: var(--font-size-body);
    font-weight: 400;
    line-height: 1.31884765625;
    text-align: center;
    color: var(--color-accent-cream);
}

.home-link {
    color: var(--color-accent-cream);
    text-decoration: none;
}

.home-link:hover {
    text-decoration: underline;
}

.home-links .separator {
    color: var(--color-accent-cream);
}

:root {
    /* Container Widths */
    --container-mobile: 393px;
    /* Unified content width */
    --content-max-width: 363px;
    --card-width: 185px;
    --button-width: 231px;

    /* Horizontal page margins (use one token for section x padding) */
    --margin-page: 16px;
    --margin-content: var(--margin-page);
    --margin-section: var(--margin-page);

    /* Vertical spacing scale (8px base) */
    --space-1: 8px;
    --space-2: 12px;
    --space-3: 16px;
    --space-4: 24px;
    --space-5: 32px;
    --space-6: 40px;

    /* Component Spacing */
    --gap-grid: 10px;
    --gap-card-internal: 11px;
    --padding-card: 11px 5px;
    --padding-button: 6px;

    /* Icon Sizes (defaults) */
    --icon-small: 36px;   /* generic small */
    --icon-medium: 40px;  /* generic medium */
    --icon-large: 35px;   /* generic large */

    /* Fixed Heights */
    --header-height: 127px;
    --title-height: 67px;
    --button-height: 54px;
    --divider-width: 155px;
    
    /* Section Header Spacing (standardize across sections) */
    --section-header-padding-top: var(--space-6); /* distance from section separator to title/intro block */
    --section-header-gap-to-grid: var(--space-4);  /* gap from title/intro block to framework grid */

    /* Colors */
    --color-primary-dark: #111111;
    --color-primary-text: #191717;
    --color-light: #FFFFFF;
    --color-accent-cream: #FFFEF2;
    --color-secondary: #EEE7E2;
    --color-muted: #B9B9B9;

    /* Typography */
    --font-family: 'Roboto Mono', monospace;
    --font-size-large: 36px;
    --font-size-section: 30px;
    --font-size-heading: 20px;
    --font-size-body: 16px;
    --font-size-small: 14px;
    --font-size-micro: 10px;

    /* Motion */
    --motion-fast: 160ms;
    --motion-med: 220ms;
    --easing-sharp: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Announcement banner (anchored 66px from top, centered) — sizes matched to Figma */
.announcement-banner {
    position: fixed;
    top: 66px; /* anchored 66px from the top edge */
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    align-items: flex-start; /* ensure content top-aligns so expansion grows downward */
    gap: 12px;
    width: 319px; /* Figma frame width */
    padding: 12px;
    background: rgba(17,17,17,0.9); /* dark shell to contrast cream button */
    color: var(--color-accent-cream);
    border: 1px solid #FFFEF2; /* outer surround color per request */
    border-radius: 0; /* sharp edges per request */
}

.announcement-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* left align title, text and button */
    gap: 8px; /* tighten spacing so label and first line feel visually grouped */
    width: auto; /* allow content to size naturally */
}

.announcement-label {
    font-weight: 700;
    font-size: 14px;
    text-decoration: underline;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.announcement-message {
    font-size: 14px;
    margin-top: 4px;
    text-transform: uppercase;
}

.announcement-message-line {
    display: block; /* ensure stacked lines */
}

/* Ensure consistent letter-spacing for announcement text and CTA */
.announcement-message,
.announcement-access {
    letter-spacing: 0.0em;
}

.announcement-actions {
    /* left-aligned actions to match label and message */
    margin-left: 0;
    display: flex;
    align-items: center;
}

.announcement-access {
    width: 121px; /* Figma button width */
    height: 29px; /* Figma button height */
    background: var(--color-accent-cream);
    color: var(--color-primary-dark);
    border: 1px solid #FFFEF2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Match Figma: semi-bold */
    font-weight: 600;
    font-size: 14px;
    /* Force font family, spacing and height to avoid inheritance differences */
    font-family: var(--font-family);
    letter-spacing: 0.06em;
    line-height: 14px;
    cursor: pointer;
    text-transform: uppercase;
}

.announcement-close {
    position: absolute;
    right: 8px;
    top: 8px;
    background: transparent;
    color: var(--color-accent-cream);
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

/* Toggle button (replace close): same positioning and visuals */
.announcement-toggle {
    position: absolute;
    /* align the toggle inside the announcement padding so it's visually centered
       with the announcement content */
    right: 12px;
    top: 12px;
    background: transparent;
    color: var(--color-accent-cream);
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

/* Announcement body reveal: animate vertical expansion while keeping width constant */
.announcement-body {
    max-height: none; /* default expanded */
    opacity: 1;
    overflow: hidden;
    /* much faster expand/collapse so content appears effectively
       immediately after the container finishes expanding */
    transition: max-height 80ms cubic-bezier(0.2, 0, 0, 1), opacity 80ms cubic-bezier(0.2, 0, 0, 1);
    will-change: max-height, opacity;
}

/* Keep 20px spacing between the message and CTA inside the reveal body */
.announcement-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Inner-body children fade behavior: when contents are hidden, remove
   transitions and hide instantly to avoid flicker; when class is removed
   they will fade in via the transition defined here. */
.announcement-body > .announcement-message,
.announcement-body > .announcement-actions {
    /* visible by default with no transition so they appear instantly */
    opacity: 1;
    visibility: visible;
}

.announcement-body.contents-hidden > .announcement-message,
.announcement-body.contents-hidden > .announcement-actions {
    /* hide instantly while container animates (no transition) */
    transition: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none;
}

.announcement-toggle-icon {
    display: block;
    /* reduce icon size by 20% (both expanded and collapsed states) */
    width: calc(18px * 0.9);
    height: calc(18px * 0.9);
    transition: transform 240ms ease, opacity 180ms ease;
    transform-origin: center center;
    /* keep a uniform scale so we don't rely on layout-changing width/height */
    transform: scale(0.9);
}


/* Collapsed state: shrink to a compact bar but remain visible (not dismissible) */
.announcement-banner {
    /* Only animate non-layout properties to avoid layout jumps during
       inner max-height transitions. Avoid animating height or padding. */
    transition: width var(--motion-fast) var(--easing-sharp),
                opacity var(--motion-fast) var(--easing-sharp),
                transform var(--motion-fast) var(--easing-sharp);
}

.announcement-banner.collapsed {
    height: auto; /* let body control vertical size */
    width: 319px; /* keep fixed width when collapsed */
    /* keep same vertical padding as expanded to avoid layout shift */
    padding: 12px;
}

/* When collapsed, hide non-label message blocks and remove gaps so the
   visible label has equal padding above and below inside the banner. */
.announcement-banner.collapsed .announcement-content {
    gap: 0; /* remove internal spacing so label sits with equal padding */
}

/* Hide the direct-message placeholder (and any other message blocks) when
   collapsed so they don't contribute to layout/gap spacing. */
.announcement-banner.collapsed > .announcement-content > .announcement-message {
    display: none;
}

/* collapsed state hides the body via max-height; label remains visible */
.announcement-banner.collapsed .announcement-body {
    max-height: 0px;
    opacity: 0;
}

.announcement-banner .announcement-label {
    /* ensure label stays visible and aligned when collapsed */
    display: block;
    align-self: flex-start;
}

.announcement-banner.collapsed .announcement-toggle-icon {
    /* rotate but maintain the same 0.8 scale used in the default state */
    transform: rotate(180deg) scale(0.8);
}

/* Toggle icon larger on desktop to match visual scale */
@media (min-width: 1024px) {
    .announcement-toggle {
        font-size: 28px;
        right: 36px;
        top: 36px;
    }
}

@media (min-width: 768px) {
    .announcement-banner {
        width: 319px; /* keep fixed width on larger screens too */
    }
}

/* Base Styles */
body {
    font-family: var(--font-family);
    background-color: var(--color-primary-dark);
    color: var(--color-accent-cream);
    line-height: 1.375;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: var(--container-mobile);
    margin: 0 auto;
}

/* Header Styles */
.header {
    width: 100%;
    height: var(--header-height);
    background-color: var(--color-primary-dark);
    position: relative;
}

.header-container {
    width: 100%;
    height: 100%;
    position: relative;
    max-width: var(--container-mobile);
    margin: 0 auto;
}

.header-tagline {
    position: absolute;
    top: 91px;
    left: 50%;
    transform: translateX(-50%);
    width: 285.94px;
    height: 12px;
    font-size: var(--font-size-micro);
    font-weight: 400;
    line-height: 1.171875;
    text-align: center;
    color: var(--color-accent-cream);
    text-shadow: 0px 4px 4px rgba(255, 255, 255, 0.1);
}

.logo-container {
    position: absolute;
    top: 26px;
    left: 50%;
    transform: translateX(-50%);
    width: 205px;
    height: 51.16px;
}

.logo-badges {
    position: relative;
    width: 100%;
    height: 100%;
}

.badge-group {
    position: absolute;
    top: 38px;
    left: 1px;
    width: 109.06px;
    height: 51.16px;
}

.logo-badge {
    position: absolute;
    width: 109.06px;
    height: 24.32px;
}

.logo-badge:first-child {
    top: 0;
}

.logo-badge:last-child {
    top: 26.84px;
}

.badge-rect {
    width: 100%;
    height: 100%;
    border: 1px solid var(--color-accent-cream);
    background: transparent;
}

.badge-text {
    position: absolute;
    top: 0.84px;
    left: 6.82px;
    width: 94.45px;
    height: 21.81px;
    font-size: var(--font-size-body);
    font-weight: 400;
    line-height: 1.31884765625;
    text-align: center;
    color: var(--color-accent-cream);
}

.company-group {
    position: absolute;
    top: 0;
    left: 0;
    width: 104px;
    height: 48px;
}

.company-text {
    position: absolute;
    top: 27px;
    left: 0;
    width: 104px;
    height: 21px;
    font-size: var(--font-size-heading);
    font-weight: 700;
    line-height: 1.171875;
    color: var(--color-accent-cream);
}

.company-name {
    position: absolute;
    top: 0;
    left: 0;
    width: 73.19px;
    height: 22px;
    font-size: var(--font-size-heading);
    font-weight: 700;
    line-height: 1.31884765625;
    text-align: left;
    color: var(--color-accent-cream);
}

/* Header-specific logo sizing to match Figma header (node 13:166) */
.header .logo-badges {
    filter: drop-shadow(0px 4px 4px rgba(255, 255, 255, 0.1));
}

.header .badge-group {
    top: 0;
    left: 73.65px;
    width: 131.35px;
    height: 51.16px;
}

.header .logo-badge {
    width: 131.35px;
    height: 24.32px;
}

.header .badge-text {
    left: 8.21px;
    width: 113.76px;
}

/* Subtle optical centering for top badge ("ADVANCED") in header */
.header .logo-badge:last-child .badge-text {
    top: 1.2px;
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    max-width: var(--container-mobile);
    margin: 0 auto;
    height: 268px; /* Ensures downloads-line bottom at 230px has 19px to title-break start: 268 - 19 = 249 visual start */
    background-color: var(--color-secondary);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 268px; /* Match hero height */
    background-color: var(--color-secondary);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: var(--margin-page);
    height: 100%;
}

.hero-title {
    position: absolute;
    top: 26px; /* Figma: 153 (title top) - 127 (hero start) */
    left: var(--margin-page);
    width: 336px; /* Figma width */
    height: 99px; /* Match Figma block height for title */
    font-size: var(--font-size-large);
    font-weight: 700;
    line-height: 32px; /* Figma: leading 32px */
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--color-primary-text);
}

.hero-subtitle {
    position: absolute;
    top: 134px; /* Title top (26) + title height (99) + desired gap (9) */
    left: var(--margin-page);
    width: 314px; /* Figma width */
    height: 36px; /* Figma height */
    font-size: var(--font-size-small);
    font-weight: 400;
    line-height: 18px; /* Figma: 18px leading */
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary-text);
    margin: 0; /* Remove default p margins to ensure precise spacing */
}

/* Badge + Rating row positions */
.page-count-badge {
    position: absolute;
    right: var(--margin-page); /* mirror left margin; keeps away from right edge */
    top: 200px;  /* 30px below subtitle bottom (134 + 36 + 30) */
    width: 86px;
    height: 25px;
}

.page-count-badge .badge-rect {
    border: 2px solid var(--color-primary-dark);
    box-shadow: none;
}

.page-count-badge .badge-text {
    position: absolute;
    top: 3.5px; /* precise centering for 18px text inside 25px box */
    left: 50%;
    transform: translateX(-50%);
    width: 79px; /* Figma */
    height: 18px;
    font-size: var(--font-size-small);
    font-weight: 700;
    line-height: 18px;
    text-transform: uppercase;
    text-align: center;
    color: var(--color-primary-text);
}

/* Page rating block to the LEFT of the badge, centered vertically to the badge, with 9px gap */
.page-rating {
    position: absolute;
    top: 197.5px; /* center 30px-tall block to 25px badge (was 200px) */
    /* Place to the LEFT of the pages badge with a 9px gap.
       Badge width is 86px; keep the same gap regardless of content width. */
    right: calc(var(--margin-page) + 86px + 9px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* align rating-line top exactly to 200px */
    align-items: flex-end;
    height: auto; /* allow natural height: 16 + 2 + 12 = 30px */
    gap: 2px;
    text-transform: uppercase;
    text-align: right;
    color: var(--color-primary-text);
    white-space: nowrap;
}

.page-rating .rating-line {
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    letter-spacing: 0.08em;
}

.page-rating .downloads-line {
    font-size: 10px;
    font-weight: 700;
    line-height: 12px;
    letter-spacing: 0.06em;
}

/* Title Break Section */
.title-break {
    width: 100%;
    max-width: var(--container-mobile);
    margin: 0 auto;
    height: 95px;
    position: relative;
    background-color: var(--color-secondary);
    overflow: hidden;
    margin-top: -19px; /* Overlap hero image by 19px per Figma */
}

.title-break-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: top center;
    background-color: var(--color-secondary);
}

/* Main Content */
.main-content {
    width: 100%;
    max-width: var(--container-mobile);
    margin: 0 auto;
    background-color: var(--color-secondary);
    position: relative;
}

/* Section Styles */
.section-title {
    font-size: var(--font-size-section);
    font-weight: 700;
    line-height: 1.1;
    color: var(--color-primary-text);
    margin-bottom: var(--space-4);
    padding: 0;
}

/* Align specific section titles with their content widths */
.debrief-section .section-title {
    max-width: var(--content-max-width);
    margin-left: auto;
    margin-right: auto;
}

.protocol-outline .section-title {
    max-width: var(--content-max-width);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--space-4);
}

/* Protocol Outline Accordion */
.protocol-outline {
    position: relative;
    padding: var(--section-header-padding-top) var(--margin-page) var(--space-6);
}

.accordion-controls {
    max-width: var(--content-max-width);
    margin: 0 auto var(--space-3);
    display: none; /* mobile default hidden; enabled on desktop */
}

.accordion-toggle {
    appearance: none;
    -webkit-appearance: none;
    border-radius: 0;
    font: inherit;
    background: transparent;
    border: 1px solid var(--color-primary-dark);
    color: var(--color-primary-dark);
    padding: 8px 12px;
    cursor: pointer;
}

.protocol-outline .protocol-images {
    max-width: var(--content-max-width);
    margin: 0 auto var(--space-4);
}

.accordion {
    max-width: var(--content-max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0; /* stack items tightly without gaps */
}

.accordion-item {
    background: transparent;
    margin: 0;
}

/* Remove double borders between stacked headers */
.accordion-item + .accordion-item .accordion-header {
    border-top: 0;
}

.accordion-header {
    appearance: none;
    -webkit-appearance: none;
    border-radius: 0;
    font: inherit;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 1px solid var(--color-primary-dark);
    color: var(--color-primary-dark);
    padding: var(--space-3) var(--space-4); /* add a bit more breathing room */
    display: flex;
    align-items: center;
    justify-content: space-between;
    column-gap: 12px; /* ensure space between text and chevron */
    cursor: pointer;
    line-height: 1.2;
    min-height: 52px; /* slightly taller rows for better feel */
    transition: background-color var(--motion-fast) var(--easing-sharp),
        color var(--motion-fast) var(--easing-sharp),
        border-color var(--motion-fast) var(--easing-sharp),
        box-shadow var(--motion-fast) var(--easing-sharp);
}

/* When expanded, let the panel's top border serve as the separator */
.accordion-header[aria-expanded="true"] {
    border-bottom: 0;
}

.accordion-header:hover,
.accordion-header:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 1px var(--color-primary-dark), 0 0 0 1px transparent, 0 0 0 0 rgba(0,0,0,0);
    background: rgba(17, 17, 17, 0.03);
}

.accordion-title {
    font-size: var(--font-size-heading);
    font-weight: 700;
    line-height: 1.1;
    margin: 0; /* prevent default margins affecting height */
}

.accordion-chevron {
    width: 14px;
    height: 14px;
    border-right: 2px solid var(--color-primary-dark);
    border-bottom: 2px solid var(--color-primary-dark);
    transform: rotate(45deg);
    transition: transform var(--motion-fast) var(--easing-sharp);
    flex-shrink: 0;
}

.accordion-header[aria-expanded="true"] .accordion-chevron {
    transform: rotate(-135deg);
}

.accordion-panel {
    border-left: 1px solid var(--color-primary-dark);
    border-right: 1px solid var(--color-primary-dark);
    border-top: 1px solid var(--color-primary-dark);
    border-bottom: 1px solid var(--color-primary-dark);
    color: var(--color-primary-dark);
    overflow: hidden;
    height: auto;
    padding: var(--space-3);
    opacity: 1;
    transition: height var(--motion-fast) cubic-bezier(0.2, 0, 0, 1),
        opacity var(--motion-fast) cubic-bezier(0.2, 0, 0, 1);
    will-change: height, opacity;
    contain: layout paint;
    overflow-anchor: none;
}

/* Ensure list bullets inside accordion panels are fully visible and nicely spaced */
.accordion-panel ul {
    list-style: disc inside;
    margin: var(--space-2) 0 var(--space-3);
    padding-left: 8px; /* keeps bullets from hugging the border */
}

.accordion-panel li {
    margin-bottom: var(--space-1);
}

.accordion-panel.is-collapsing,
.accordion-panel.is-expanding {
    overflow: hidden;
}

.accordion-panel[hidden] {
    display: none !important;
}

.accordion-panel .panel-inner {
    opacity: 1;
    transform-origin: top;
    transform: scaleY(0.98) translateZ(0);
    transition: opacity var(--motion-fast) cubic-bezier(0.2, 0, 0, 1),
        transform var(--motion-fast) cubic-bezier(0.2, 0, 0, 1);
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Final state for visible panel content */
.accordion-panel:not([hidden]) .panel-inner {
    transform: scaleY(1) translateZ(0);
}

.accordion-panel.is-collapsing .panel-inner,
.accordion-panel.is-expanding .panel-inner {
    will-change: transform, opacity;
}

/* Prevent re-entrancy during transitions for smoother animation */
.accordion-panel.is-collapsing,
.accordion-panel.is-expanding {
    pointer-events: none;
}

.access-section .section-title {
    max-width: var(--content-max-width);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--space-4);
}

.faq-section .section-title {
    max-width: var(--content-max-width);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--space-4);
}

.section-intro {
    font-size: 18px;
    font-weight: 400;
    font-style: italic;
    line-height: 1.25;
    color: var(--color-light);
    margin-bottom: var(--section-header-gap-to-grid);
    padding: 0;
}

.section-divider {
    width: 100%;
    height: 1px;
    background-color: var(--color-primary-dark);
    margin: 20px 0;
}

/* Edge-to-edge divider that spans full viewport width and hugs section edges */
.edge-divider {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    max-width: 100vw;
    height: 1px;
    background-color: var(--color-primary-dark);
}

.edge-divider.bottom {
    top: auto;
    bottom: 0;
}

/* Debrief Section */
.debrief-section {
    position: relative;
    padding: var(--section-header-padding-top) var(--margin-page) var(--space-6);
}

.debrief-content {
    max-width: var(--content-max-width);
    margin: 0 auto;
}

.debrief-content p {
    font-size: var(--font-size-body);
    font-weight: 400;
    line-height: 1.375;
    color: var(--color-primary-dark);
    margin-bottom: 20px;
}

/* Drives of Failure Section */
.drives-failure {
    position: relative;
    width: 100%;
    background-color: var(--color-primary-dark);
    /* Apply symmetric side padding at the section level to mirror other sections */
    padding: var(--section-header-padding-top) var(--margin-page) var(--space-6);
}

.drives-failure .section-content {
    padding: 0;
}

/* Align the Drives intro with the first column and control spacing */
.drives-failure .section-intro {
    max-width: var(--content-max-width);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--section-header-gap-to-grid); /* standardized gap before framework grid */
    padding-left: 0;
    padding-right: 0;
    text-align: left;
}

/* Framework Grid */
.framework-grid {
    display: flex;
    flex-direction: column;
    gap: var(--gap-grid);
    max-width: var(--content-max-width);
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
}

.framework-row {
    display: flex;
    gap: var(--gap-grid);
    align-items: stretch;
    justify-content: center;
}

.framework-card {
    width: var(--card-width);
    padding: var(--padding-card);
    display: flex;
    flex-direction: column;
    gap: var(--gap-card-internal);
    background: transparent;
}

.icon-container {
    width: var(--icon-small);
    height: var(--icon-small);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-container.icon-metabolic { /* Frame icon (node 62_532) ~ size-9 */
    width: 36px; /* 9 * 4px */
    height: 36px;
}

.icon-container.icon-nutrient { /* Frame1 ~ size-9 */
    width: 36px;
    height: 36px;
}

.icon-container.icon-inflammation { /* Frame2 ~ size-10 */
    width: 40px; /* 10 * 4px */
    height: 40px;
}

.icon-container.icon-circadian { /* Frame3 ~ size-9 */
    width: 36px;
    height: 36px;
}

.icon-container.icon-toxic { /* Frame4 ~ 35px square in Figma */
    width: 35px;
    height: 35px;
}

.icon-container.icon-hpa { /* Vector ~ 22x35, keep container 35x35, non-circular */
    width: 35px;
    height: 35px;
    border-radius: 0; /* match non-circular feel around vector */
}

.icon-container.medium {
    width: var(--icon-medium);
    height: var(--icon-medium);
}

.icon-container.large {
    width: var(--icon-large);
    height: var(--icon-large);
}

.failure-icon {
    /* Use dark background so light SVG fill is visible when loaded via <img> */
    background-color: var(--color-primary-dark);
    color: var(--color-accent-cream);
    --fill-0: var(--color-accent-cream);
}

.solution-icon {
    background-color: transparent;
    color: var(--color-primary-dark);
}

.card-icon {
    width: 70%;
    height: 70%;
}

/* Raster/SVG icon from Figma */
.card-icon-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.card-title {
    font-size: var(--font-size-heading);
    font-weight: 700;
    line-height: 1.1;
    color: var(--color-accent-cream);
    margin-bottom: 8px;
}

.solution-card .card-title {
    color: var(--color-primary-dark);
}

.card-divider {
    width: var(--divider-width);
    height: 1px;
    background: var(--color-light);
}

.solution-card .card-divider {
    background: var(--color-primary-dark);
}

.card-description {
    font-size: var(--font-size-body);
    font-weight: 400;
    line-height: 1.375;
    color: var(--color-accent-cream);
    flex: 1;
}

.solution-card .card-description {
    color: var(--color-primary-dark);
}

/* Apex Framework Section */
.apex-framework {
    position: relative; /* enable local positioning for edge divider */
    padding: var(--section-header-padding-top) var(--margin-page);
    background-color: var(--color-secondary);
}

.framework-intro {
    max-width: var(--content-max-width);
    margin: 0 auto 40px;
    padding-left: 0;
    padding-right: 0;
}

.framework-intro p {
    font-size: var(--font-size-body);
    font-weight: 400;
    line-height: 1.375;
    color: var(--color-primary-text);
    margin-bottom: 20px;
}

.apex-framework > p {
    max-width: var(--content-max-width);
    margin: 0 auto 40px;
    padding-left: 0;
    padding-right: 0;
    font-size: var(--font-size-body);
    font-weight: 400;
    line-height: 1.375;
    color: var(--color-primary-text);
}

.framework-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-primary-text);
    margin: var(--space-5) 0 var(--section-header-gap-to-grid);
    padding-left: 0;
    padding-right: 0;
}

/* Align the Apex framework title with the first column/grid content */
.apex-framework .framework-title {
    max-width: var(--content-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
}

/* Ensure Apex grid aligns with its title/content block */
.apex-framework .framework-grid {
    margin-left: auto;
    margin-right: auto;
}

/* Increase logo/icon size by 20% for the third row in Apex Framework */
.apex-framework .framework-grid .framework-row:nth-of-type(3) .icon-container.solution-icon.medium {
    width: calc(var(--icon-medium) * 1.2);
    height: calc(var(--icon-medium) * 1.2);
}

/* Protocol Outline Section */
.protocol-outline {
    position: relative;
    padding: var(--section-header-padding-top) var(--margin-page) var(--space-6);
    background-color: var(--color-secondary);
}

.protocol-images {
    margin: 40px 0;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.protocol-image {
    width: 267.28px;
    height: 188.91px;
    background-color: var(--color-muted);
    border: 0.1px solid var(--color-primary-dark);
}

/* static image placeholder; if you add a background-image, it will fill */

.protocol-content {
    max-width: var(--content-max-width);
    margin: 0 auto;
}

.protocol-content h3 {
    font-size: var(--font-size-body);
    font-weight: 700;
    color: var(--color-primary-text);
    margin: var(--space-5) 0 var(--space-2);
}

.protocol-content p {
    font-size: var(--font-size-body);
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-primary-text);
    margin-bottom: var(--space-2);
}

.protocol-content ul {
    margin: var(--space-2) 0 var(--space-4) 20px;
}

.protocol-content li {
    font-size: var(--font-size-body);
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-primary-text);
    margin-bottom: var(--space-1);
}

/* Testimonial Section */
.testimonial {
    width: 100%;
    max-width: var(--container-mobile);
    margin: 0 auto;
    min-height: 430px;
    background-color: var(--color-secondary);
    position: relative;
}

.testimonial-divider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--color-primary-dark);
}

.testimonial-content {
    position: absolute;
    top: 32.42px; /* space below the top separator */
    left: 28px;
    width: 334px;
    bottom: calc(56px + 16px); /* keep content above dots with breathing room */
    display: flex;
    align-items: center; /* vertical centering between top separator and dots */
    justify-content: center;
    text-align: center;
}

.testimonial-dots {
    position: absolute;
    top: auto;
    bottom: 56px;
    left: 50%;
    transform: translateX(-50%);
    width: 35px;
    height: 5.07px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.dot {
    width: 5px;
    height: 5.07px;
    border-radius: 50%;
    background-color: var(--color-muted);
    transition: background-color 400ms ease;
}

.dot.active {
    background-color: var(--color-primary-dark);
}

.testimonial-quote {
    font-size: var(--font-size-heading);
    font-weight: 700;
    line-height: 1.6;
    text-align: center;
    color: var(--color-primary-dark);
    width: 100%;
    margin: 0 auto;
    opacity: 1;
    transition: opacity 400ms ease;
    will-change: opacity;
}

.testimonial-quote.fade-out {
    opacity: 0;
}

/* Access Section */
.access-section {
    position: relative;
    /* Ensure the gap below the title matches the top padding above it */
    --section-header-gap-to-grid: var(--section-header-padding-top);
    padding: var(--section-header-padding-top) var(--margin-content) var(--space-6);
    max-width: var(--container-mobile);
    margin: 0 auto;
    background-color: var(--color-secondary);
}

.pricing-container {
    /* Match Figma content width for Access copy blocks */
    max-width: 363px;
    margin: 0 auto;
}

.pricing-card {
    /* Slightly tighter card stack to match Figma vertical rhythm */
    margin-bottom: 30px;
    background: transparent;
}

.card-header {
    width: 132px;
    height: 36.74px;
    position: relative;
    /* Space from label box to pricing copy */
    margin-bottom: 16px;
}

.header-rect {
    width: 100%;
    height: 34.29px;
    border: 2px solid var(--color-primary-dark);
    background: transparent;
}

.header-text {
    position: absolute;
    top: 4.9px;
    left: 8.04px;
    width: 115.93px;
    height: 31.84px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.31884765625;
    text-align: center;
    color: var(--color-primary-dark);
}

.pricing-content {
    display: flex;
    flex-direction: column;
    /* Tighten internal gaps between pricing text and CTA */
    gap: 16px;
}

.pricing-text {
    font-size: var(--font-size-body);
    font-weight: 400;
    line-height: 1.375;
    color: var(--color-primary-text);
}

.pricing-text strong {
    font-weight: 700;
}

.strikethrough {
    text-decoration: line-through;
}

.pricing-text ul {
    margin: 15px 0;
    padding-left: 0;
    list-style: none;
}

.pricing-text li {
    margin-bottom: 5px;
}

.enterprise-card .pricing-text {
    font-weight: 700;
}

/* CTA Buttons */
.cta-button-container {
    display: flex;
    justify-content: center;
    /* Bring button closer to the copy per Figma */
    margin: 14px 0;
}

.cta-button {
    width: var(--button-width);
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font-family);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0; /* no subtitle note below button */
}

.button-rect {
    width: 122px;
    height: var(--button-height);
    margin: 0 auto;
    background-color: var(--color-primary-text);
    border: 1px solid var(--color-primary-text);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px; /* allow wrapping with side padding */
}

.enterprise-button .button-rect {
    border: 1px solid var(--color-primary-text);
}

.button-text {
    position: static;
    width: 100%;
    max-width: 100%;
    height: auto;
    font-size: var(--font-size-body);
    font-weight: 400;
    line-height: 1.25;
    text-align: center;
    color: var(--color-light);
    white-space: normal;
    overflow-wrap: anywhere;
}

.enterprise-button .button-text {
    color: var(--color-accent-cream);
}

.button-note {
    position: static;
    width: 100%;
    font-size: var(--font-size-small);
    font-weight: 700;
    line-height: 1.5714285714285714;
    text-align: center;
    color: var(--color-primary-text);
    text-decoration: underline;
}

/* Disclaimer */
.disclaimer {
    /* Align disclaimer spacing with section header rhythm */
    margin-top: var(--section-header-padding-top);
    padding: 20px 0;
}

.disclaimer p {
    font-size: var(--font-size-body);
    font-weight: 400;
    line-height: 1.375;
    color: var(--color-primary-dark);
    text-align: left;
}

/* FAQ Section */
.faq-section {
    position: relative;
    padding: var(--section-header-padding-top) var(--margin-content) var(--space-6);
    max-width: var(--container-mobile);
    margin: 0 auto;
    background-color: var(--color-secondary);
}

.faq-content {
    max-width: var(--content-max-width);
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 30px;
}

.faq-item h3 {
    font-size: var(--font-size-body);
    font-weight: 700;
    line-height: 1.375;
    color: var(--color-primary-text);
    margin-bottom: 10px;
}

.faq-item p {
    font-size: var(--font-size-body);
    font-weight: 400;
    line-height: 1.375;
    color: var(--color-primary-text);
}

/* Footer */
.footer {
    width: 100%;
    height: 150px;
    position: relative;
    background-color: var(--color-primary-dark);
}

.footer-background {
    width: 100%;
    height: 100%;
    background-color: var(--color-primary-dark);
}

.footer-logo {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 110.3px;
    height: 89.16px;
}

.footer .logo-badges {
    position: absolute;
    top: 38px;
    left: 1px;
    width: 109.06px;
    height: 51.16px;
    filter: drop-shadow(0px 4px 4px rgba(255, 255, 255, 0.1));
}

/* Footer stack: logo -> 14px -> AXIOM -> 18px -> links */
.footer-content {
    position: absolute;
    top: 50%; /* center vertically within 150px footer */
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-logo-img {
    display: block;
    width: 79px;
    height: 30px;
}

.footer .company-name {
    position: static; /* override global absolute positioning */
    width: auto;
    height: auto;
    margin-top: 14px; /* 14px above AXIOM per spec */
    font-size: var(--font-size-heading);
    font-weight: 700;
    line-height: 1.31884765625;
    text-align: center;
    color: var(--color-accent-cream);
}

/* Footer Links (Figma node 29:172) */
.footer-badges {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Reuse landing header badge structure and dimensions */
.footer-badges .badge-group {
    position: static;
    width: 131.35px;
    height: 51.16px;
}

.footer-badges .logo-badge {
    position: relative;
    width: 131.35px;
    height: 24.32px;
    top: 0; /* reset any inherited offset */
}

.footer-badges .logo-badge + .logo-badge {
    margin-top: 2.84px; /* vertical gap between stacked badges */
}

/* Ensure global first/last-child offsets don't apply in footer */
.footer-badges .logo-badge:first-child,
.footer-badges .logo-badge:last-child {
    top: 0;
}

.footer-badges .badge-rect {
    width: 100%;
    height: 100%;
    border: 1px solid var(--color-accent-cream);
    background: transparent;
}

.footer-badges .badge-text {
    position: absolute;
    top: 0.84px;
    left: 50%;
    transform: translateX(-50%);
    width: 113.76px; /* header variant width */
    height: 21.81px;
    font-size: var(--font-size-body);
    font-weight: 400;
    line-height: 1.31884765625;
    text-align: center;
    color: var(--color-accent-cream);
}

.footer-links {
    margin-top: 18px; /* 18px below AXIOM per spec */
    display: flex;
    align-items: center;
    gap: 8px; /* space around the slash */
    font-size: var(--font-size-small); /* 14px */
    line-height: 18px; /* Figma leading */
    text-transform: uppercase;
    color: var(--color-accent-cream);
}

.footer-link {
    color: var(--color-accent-cream);
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
}

.footer .separator {
    color: var(--color-accent-cream);
}

/* Hover Effects */
.cta-button:hover .button-rect {
    background-color: var(--color-light);
}

.cta-button:hover .button-text {
    color: var(--color-primary-dark);
}

.cta-button:active {
    transform: translateY(1px);
}

/* Responsive Design - Tablet */
@media (min-width: 768px) {
    body {
        max-width: var(--container-mobile);
    }
    
    .framework-row {
        justify-content: center;
        gap: 40px;
    }
    
    .framework-card {
        width: 240px;
    }
    
    .pricing-container {
        display: flex;
        gap: 40px;
        max-width: 800px;
        align-items: flex-start;
    }
    
    .pricing-card {
        flex: 1;
        margin-bottom: 0;
    }
}

/* Responsive Design - Desktop */
@media (min-width: 1024px) {
    body {
        max-width: var(--container-mobile);
    }
    
    .section-title,
    .debrief-section,
    .apex-framework,
    .protocol-outline,
    .access-section,
    .faq-section {
        padding-left: 60px;
        padding-right: 60px;
    }
    
    /* show expand/collapse control on desktop */
    .accordion-controls {
        display: flex;
        justify-content: flex-end;
    }
    
    .framework-grid {
        max-width: 800px;
    }
    
    .hero-title {
        font-size: 48px;
    }
    
    .testimonial-content {
        left: 50%;
        transform: translateX(-50%);
    }

    /* Desktop: use large, spacious announcement card per Figma desktop artboard */
    .announcement-banner {
        width: calc(100% - 96px); /* hug viewport with side gutters */
        left: 50%;
        transform: translateX(-50%);
        padding: 40px 48px;
        background: var(--color-primary-dark);
        border: 4px solid var(--color-accent-cream);
        border-radius: 4px;
        box-sizing: border-box;
    }

    .announcement-content {
        width: auto; /* allow message to span */
    }

    .announcement-label {
        font-size: 36px;
        line-height: 1;
        margin-bottom: 18px;
        text-decoration-thickness: 3px;
        letter-spacing: 0.02em;
    }

    .announcement-message {
        font-size: 48px;
        line-height: 1.08;
        margin-top: 8px;
        max-width: 100%;
        white-space: normal;
        letter-spacing: 0.06em;
    }

    .announcement-actions {
        margin-left: 0;
        margin-top: 32px;
        display: block;
    }

    .announcement-access {
        width: 231px; /* larger desktop CTA */
        height: 54px;
        font-size: 28px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 18px;
    }

    .announcement-close {
        right: 36px;
        top: 36px;
        font-size: 28px;
        color: var(--color-accent-cream);
    }
}