/* ==========================================================================
   Shared
   ========================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.help-breadcrumb {
    margin-bottom: 22px;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.help-breadcrumb a:hover {
    color: var(--text-primary);
}

.help-badge {
    flex: none;
    align-self: flex-start;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.5;
    text-transform: uppercase;
}

.help-badge.is-plus {
    background: var(--bg-dark);
    color: var(--text-inverse);
}

.help-badge.is-limited {
    border: 1px solid var(--border-hover);
    color: var(--text-muted);
}

/* ==========================================================================
    Index: hero
    ========================================================================== */

.help-hero {
    padding: 132px 0 52px;
    background: var(--bg-light);
}

.help-hero h1 {
    max-width: 700px;
    margin-bottom: 18px;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.025em;
}

.help-hero-copy {
    max-width: 560px;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* ==========================================================================
   Index: featured journeys
   ========================================================================== */

.help-content {
    padding: 56px 0 96px;
}

.help-featured {
    margin-bottom: 76px;
}

.help-featured-heading,
.help-category-head h2 {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.help-featured-heading {
    margin-bottom: 18px;
    color: var(--text-muted);
}

.help-featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(214px, 1fr));
    gap: 14px;
}

.help-featured-card {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 22px;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    background: var(--bg-dark);
    color: var(--text-inverse);
    transition: transform var(--duration) var(--ease-out);
}

.help-featured-card:hover {
    transform: translateY(-3px);
}

.help-featured-title {
    font-size: 1.06rem;
    font-weight: 700;
    line-height: 1.3;
}

.help-featured-tagline {
    color: rgba(240, 240, 242, 0.62);
    font-size: 0.88rem;
    line-height: 1.55;
}

.help-featured-go {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 0.78rem;
    font-weight: 600;
    opacity: 0.7;
}

/* ==========================================================================
   Index: category grids
   ========================================================================== */

.help-category {
    margin-bottom: 64px;
    scroll-margin-top: 176px;
}

.help-category-head {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-hover);
}

.help-category-head h2 {
    color: var(--text-primary);
}

.help-category-head p {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.help-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
}

.help-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-white);
    scroll-margin-top: 190px;
    transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease);
}

.help-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-light);
}

.help-card-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.help-card-title {
    color: var(--text-primary);
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.35;
}

.help-card-tagline {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* ==========================================================================
   Guide page
   ========================================================================== */

.guide-page {
    padding: 118px 0 40px;
}

.guide-header {
    max-width: 720px;
    margin-bottom: 52px;
}

.guide-header h1 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    font-size: clamp(1.9rem, 4vw, 2.9rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.guide-goal {
    color: var(--text-secondary);
    font-size: 1.04rem;
    line-height: 1.7;
}

.guide-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 348px) minmax(210px, 250px);
    align-items: start;
    gap: clamp(20px, 3vw, 44px);
}

/* --- Steps --- */

.guide-steps {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: min(74vh, 720px);
    gap: 8px;
}

.guide-steps::before {
    position: absolute;
    top: 32px;
    bottom: 32px;
    left: 33px;
    width: 1px;
    background: var(--border-hover);
    content: '';
}

.guide-step {
    position: relative;
    display: grid;
    flex: 1 1 0;
    grid-template-columns: 28px minmax(0, 1fr);
    align-content: center;
    column-gap: 16px;
    padding: 14px 16px;
    border-radius: var(--radius);
    scroll-margin-top: 128px;
    cursor: default;
    transition: background var(--duration) var(--ease);
}

.guide-step-content {
    min-width: 0;
    opacity: 0.45;
    transition: opacity var(--duration) var(--ease);
}

.guide-step.is-active {
    background: var(--bg-light);
}

.guide-step.is-active .guide-step-content {
    opacity: 1;
}

.guide-step-index {
    position: relative;
    z-index: 1;
    display: flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-hover);
    border-radius: 50%;
    background: var(--bg-white);
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.guide-step.is-active .guide-step-index {
    border-color: transparent;
    background: var(--bg-dark);
    color: var(--text-inverse);
}

.guide-step-title {
    min-height: 28px;
    font-size: 1.06rem;
    font-weight: 700;
    line-height: 28px;
    letter-spacing: -0.01em;
}

.guide-step-body {
    max-width: 48ch;
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 0.91rem;
    line-height: 1.6;
}

/* --- Variants (use cases) --- */

.guide-variants {
    max-width: 52ch;
    margin-top: 16px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-light);
}

.guide-variant-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.guide-variant-tab {
    padding: 8px 13px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font: 600 0.84rem var(--font);
    cursor: pointer;
    transition: background var(--duration) var(--ease);
}

.guide-variant-tab:hover {
    background: var(--bg-muted);
}

.guide-variant-tab[aria-selected='true'] {
    background: var(--bg-white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
}

.guide-variant-scenario {
    padding: 12px 13px 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.65;
}

.guide-variant-scenario[hidden] {
    display: none;
}

/* --- Sticky stage --- */

.guide-stage-inner {
    position: sticky;
    top: 104px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.guide-stage-frame {
    position: relative;
    height: min(74vh, 720px);
    aspect-ratio: 1359 / 2820;
}

.guide-shot {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.22s var(--ease);
    pointer-events: none;
}

.guide-shot.is-active {
    opacity: 1;
    pointer-events: auto;
}

.guide-shot[hidden] {
    display: none;
}

/* The hotspot is positioned against the image box, so the media wrapper hugs the image. */
.guide-shot-media {
    position: relative;
    display: block;
    height: 100%;
}

.guide-shot-media img {
    display: block;
    width: auto;
    height: 100%;
}

.guide-shot.is-placeholder {
    padding: 0;
}

.guide-shot-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    padding: 28px;
    border: 1px dashed var(--border-hover);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
}

/* --- Hotspot annotation --- */

.guide-hotspot {
    position: absolute;
    top: var(--hy);
    left: var(--hx);
    width: 0;
    height: 0;
    pointer-events: none;
}

.guide-hotspot-dot {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border: 0;
    background: transparent;
    color: transparent;
    font-size: 0;
}

.guide-hotspot-dot::after {
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    border: 1.5px solid rgba(17, 155, 140, 0.72);
    border-radius: 50%;
    content: '';
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.25);
}

/* The ripple starts only when its screenshot is selected, then disappears. */
.guide-shot.is-active .guide-hotspot-dot::after {
    animation: guide-hotspot-ripple 1.8s var(--ease-out) infinite;
}

@keyframes guide-hotspot-ripple {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.25);
    }

    12% {
        opacity: 0.76;
    }

    62% {
        opacity: 0.12;
        transform: translate(-50%, -50%) scale(4.5);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(5.8);
    }
}

@media (prefers-reduced-motion: reduce) {
    .guide-hotspot-dot::after {
        animation: none;
        opacity: 0.38;
        transform: translate(-50%, -50%) scale(1.5);
    }
}

/* --- Stepper --- */

.guide-stepper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.guide-stepper-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-white);
}

.guide-stepper-btn {
    display: flex;
    min-width: 30px;
    height: 30px;
    flex: none;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0 8px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}

.guide-chevron {
    display: block;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.guide-stepper-btn:hover:not(:disabled) {
    background: var(--bg-dark);
    color: var(--text-inverse);
}

.guide-stepper-btn:disabled {
    color: var(--border-hover);
    cursor: default;
}

.guide-stepper-btn-label {
    font-size: 0.72rem;
    font-weight: 700;
}

.guide-dots {
    display: flex;
    align-items: center;
    padding: 0 2px;
    list-style: none;
}

.guide-dot {
    display: block;
    width: 20px;
    height: 20px;
    padding: 6px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.guide-dot::before {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-hover);
    content: '';
    transition: background var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.guide-dot:hover::before {
    background: var(--text-muted);
    transform: scale(1.2);
}

.guide-dot.is-active::before {
    background: var(--text-primary);
}

.guide-stepper-label {
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

/* --- Continue along the learning path --- */

.guide-path-nav {
    position: sticky;
    top: 153px;
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    transform: translateY(-49px);
}

.guide-path-next,
.guide-path-complete {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 22px;
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-lg);
    background: var(--bg-white);
    color: var(--text-primary);
    box-shadow: 0 12px 28px rgba(27, 28, 30, 0.06);
}

.guide-path-next {
    transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease-out);
}

.guide-path-next:hover {
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

.guide-path-label {
    grid-column: 1;
    margin-bottom: 8px;
    color: var(--green);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.guide-path-title {
    grid-column: 1;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

.guide-path-tagline {
    grid-column: 1;
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.5;
}

.guide-path-go {
    display: flex;
    width: 36px;
    height: 36px;
    grid-row: 1 / -1;
    grid-column: 2;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--text-primary);
}

.guide-path-go .guide-chevron {
    width: 18px;
    height: 18px;
}

.guide-path-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 4px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.4;
}

.guide-path-back small {
    display: block;
    color: var(--text-muted);
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.guide-path-back:hover {
    color: var(--text-primary);
}

.guide-path-back .guide-chevron {
    width: 13px;
    height: 13px;
}

.guide-path-position {
    padding: 0 4px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.guide-path-complete {
    display: block;
}

.guide-path-complete h2 {
    margin-bottom: 8px;
    font-size: 1.08rem;
    line-height: 1.3;
}

.guide-path-complete p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.6;
}

.guide-path-complete a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 7px;
    background: var(--text-primary);
    color: var(--text-inverse);
    font-size: 0.78rem;
    font-weight: 700;
}

/* --- Notes and related --- */

.guide-notes,
.guide-related {
    max-width: 720px;
    margin-top: 64px;
}

.guide-notes h2,
.guide-related h2 {
    margin-bottom: 16px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.guide-notes ul {
    list-style: none;
}

.guide-notes li {
    padding: 14px 0 14px 22px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    line-height: 1.7;
    text-indent: -22px;
}

.guide-notes li::before {
    display: inline-block;
    width: 22px;
    color: var(--text-muted);
    content: '\2014';
    text-indent: 0;
}

.guide-related {
    margin-bottom: 96px;
}

.guide-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.guide-related-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease);
}

.guide-related-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-light);
}

.guide-related-title {
    color: var(--text-primary);
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.35;
}

.guide-related-tagline {
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.5;
}

/* ==========================================================================
   Contact
   ========================================================================== */

.help-contact {
    padding: 70px 0;
    border-top: 1px solid var(--border);
    background: var(--bg-light);
    text-align: center;
}

.help-contact h2 {
    margin-bottom: 10px;
    font-size: 1.7rem;
}

.help-contact p {
    margin-bottom: 22px;
    color: var(--text-secondary);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1200px) {
    .guide-layout {
        grid-template-columns: minmax(0, 1fr) minmax(260px, 348px);
    }

    .guide-path-nav {
        top: 104px;
        align-self: start;
        grid-column: 2;
        grid-row: 2;
        margin-top: 24px;
        transform: none;
    }
}

@media (max-width: 1000px) {
    .guide-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .guide-steps {
        min-height: 0;
    }

    .guide-step {
        flex: none;
        align-content: start;
    }

    /* Stacked mode: each step carries its own screenshot, so the stage is dropped. */
    .guide-stage {
        display: none;
    }

    .guide-path-nav {
        position: static;
        grid-column: auto;
        grid-row: auto;
        max-width: 360px;
        margin-top: 28px;
        transform: none;
    }

    .guide-step-content {
        opacity: 1;
    }

    .guide-step-shot {
        grid-column: 2;
        max-width: 280px;
        margin-top: 20px;
    }

    .guide-step-shot .guide-shot {
        position: relative;
        inset: auto;
        opacity: 1;
        pointer-events: auto;
    }

    .guide-step-shot .guide-shot-media,
    .guide-step-shot .guide-shot-media img {
        width: 100%;
        height: auto;
    }

    .guide-step-shot .guide-shot.is-placeholder {
        display: flex;
        aspect-ratio: 1359 / 2820;
    }
}

@media (max-width: 700px) {
    .help-hero {
        padding: 108px 0 40px;
    }

    .help-content {
        padding-top: 40px;
    }

    .help-featured-grid {
        grid-template-columns: 1fr;
    }

    .help-card-grid {
        grid-template-columns: 1fr;
    }

    .guide-page {
        padding-top: 100px;
    }

    .guide-header {
        margin-bottom: 34px;
    }
}
