/* ============================================================
   AI Operator reader pages: ai-operator-series.html and
   ai-operator-course.html. Loaded after styles.css, polish.css and
   books.css (which also styles the books/ pages and is not edited
   here), scoped to <body class="polished operator-page">.
   Brings the shared book components to the homepage language:
   left-aligned navy headings, hairline cards, no gradient fills
   behind text that fails AA, no glass panels.
   Tokens from styles.css only.
   ============================================================ */

/* ---------- Hero ---------- */
.operator-page .book-hero {
    padding: 120px 0 80px;
}

.operator-page .book-hero::before {
    display: none;
}

.operator-page .book-breadcrumb {
    padding: 0;
    margin: 0 0 1.75rem;
    background: none;
}

.operator-page .book-breadcrumb ol {
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.operator-page .book-breadcrumb li + li::before {
    color: var(--white);
}

/* Specific enough to beat polish.css's inline-link blue, which is meant
   for light surfaces */
body.operator-page main .book-breadcrumb li a:not(.btn),
body.operator-page main .book-breadcrumb li a:not(.btn):hover {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--white);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

body.operator-page main .book-breadcrumb li a:not(.btn):hover {
    text-decoration-thickness: 2px;
}

.operator-page .book-breadcrumb a:focus-visible,
.operator-page .book-hero .btn:focus-visible,
.operator-page .book-cta .btn:focus-visible {
    outline: 3px solid var(--signal-on-dark);
    outline-offset: 3px;
}

.operator-page .book-hero .hero-title {
    max-width: 22ch;
    margin: 0 0 1.25rem;
    font-size: clamp(2.2rem, 4.4vw, 3.4rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

.operator-page .book-hero .hero-subtitle {
    max-width: 62ch;
    margin: 0;
    font-size: clamp(1.05rem, 1.5vw, 1.2rem);
    line-height: 1.7;
}

.operator-page .book-hero .hero-buttons {
    justify-content: flex-start;
    margin: 2rem 0 0;
}

/* The hero already sits on --gradient-cta: a gradient button would vanish */
.operator-page .book-hero .btn-primary {
    background: var(--white);
    color: var(--blue-text);
    box-shadow: none;
}

.operator-page .book-hero .btn-primary:hover {
    color: var(--dark-blue);
}

/* ---------- Section headings: left-aligned, navy ---------- */
.operator-page .section-header {
    max-width: none;
    margin: 0 0 2.5rem;
    text-align: left;
}

.operator-page .section-header h2,
.operator-page .series-intro h2,
.operator-page .bundle-section h2,
.operator-page .operator-faq h2,
.operator-page .book-cta h2 {
    max-width: 26ch;
    margin: 0 0 1rem;
    color: var(--dark-gray);
    font-family: var(--font-primary);
    font-size: clamp(1.9rem, 3.2vw, 2.6rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.operator-page .section-header p,
.operator-page .series-intro p,
.operator-page .bundle-section > .container > p {
    max-width: 62ch;
    margin: 0;
    color: var(--medium-gray);
    font-size: 1.1rem;
    line-height: 1.7;
}

.operator-page .series-intro {
    padding: var(--polish-section) 0;
}

.operator-page .series-intro .container {
    max-width: var(--polish-container);
    text-align: left;
}

.operator-page .series-intro p + p {
    margin-top: 1rem;
}

.operator-page .books-section,
.operator-page .community-benefits,
.operator-page .book-quiz-section,
.operator-page .bundle-section,
.operator-page .video-section {
    padding: var(--polish-section) 0;
}

/* ---------- Book cards ---------- */
.operator-page .books-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 0;
}

.operator-page .book-card {
    border: 1px solid var(--border-light);
    box-shadow: var(--polish-card-shadow);
}

.operator-page .book-card:hover {
    transform: none;
    box-shadow: var(--polish-card-shadow);
}

.operator-page .book-card-header {
    padding: 1.5rem 1.75rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--white);
    text-align: left;
}

.operator-page .book-card-header .book-number {
    margin-bottom: 0.75rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: var(--info-surface);
    color: var(--blue-text);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.78rem;
    font-weight: 500;
}

.operator-page .book-card-header h3 {
    margin: 0;
    color: var(--dark-gray);
    font-size: 1.3rem;
}

.operator-page .book-card--planned .book-card-header {
    background: var(--light-gray);
}

.operator-page .book-card--planned .book-number {
    background: var(--white);
    color: var(--medium-gray);
}

.operator-page .book-card-body {
    padding: 1.25rem 1.75rem 0.5rem;
}

.operator-page .book-card-body .book-topics li::before {
    color: var(--green-text);
}

.operator-page .book-card-footer {
    margin-top: auto;
    padding: 0 1.75rem 1.75rem;
}

.operator-page .book-card-footer .btn {
    flex: 1 1 10rem;
    min-width: 0;
    padding: 10px 18px;
    font-size: 0.95rem;
}

/* ---------- Quiz ---------- */
.operator-page .quiz-container {
    max-width: 720px;
    margin: 0;
    text-align: left;
}

.operator-page .quiz-question {
    margin-bottom: 1.25rem;
    font-family: var(--font-primary);
    font-size: 1.25rem;
}

.operator-page .quiz-question:focus {
    outline: none;
}

.operator-page .quiz-option {
    min-height: 52px;
    border: 1px solid var(--border-light);
    background: var(--white);
    box-shadow: var(--polish-card-shadow);
}

.operator-page .quiz-option:hover {
    border-color: var(--primary-blue);
    background: var(--light-blue);
}

.operator-page .quiz-option:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

.operator-page .quiz-option.selected {
    border-color: var(--green-text);
    background: var(--light-green);
}

.operator-page .quiz-result {
    padding: clamp(1.5rem, 3vw, 2rem);
    border: 1px solid var(--border-light);
    background: var(--light-gray);
    text-align: left;
}

.operator-page .quiz-result:not([hidden]) {
    display: block;
}

.operator-page .quiz-result:focus {
    outline: none;
}

.operator-page .quiz-restart {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: 1rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--blue-text);
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.operator-page .quiz-restart[hidden] {
    display: none;
}

.operator-page .quiz-restart:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 3px;
}

/* ---------- Getting the books: quiet cards on a light band ---------- */
.operator-page .bundle-section {
    background: var(--light-gray);
    color: var(--dark-gray);
    text-align: left;
}

.operator-page .bundle-section > .container > p {
    margin-bottom: 2.5rem;
}

.operator-page .pricing-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    max-width: none;
}

.operator-page .pricing-card {
    display: flex;
    flex-direction: column;
    padding: clamp(1.5rem, 3vw, 1.75rem);
    background: var(--white);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.operator-page .pricing-card:hover {
    transform: none;
}

.operator-page .pricing-card h3 {
    margin-bottom: 0.6rem;
    color: var(--dark-gray);
    font-size: 1.2rem;
}

.operator-page .pricing-card p {
    max-width: none;
    margin: 0 0 1.25rem;
    color: var(--medium-gray);
    font-size: 1rem;
    line-height: 1.65;
}

.operator-page .pricing-card ul {
    margin: 0;
    border-top: 1px solid var(--border-light);
}

.operator-page .pricing-card ul li {
    padding: 0;
    border-bottom: 1px solid var(--border-light);
}

.operator-page .pricing-card ul li::before {
    display: none;
}

.operator-page .pricing-card ul li a {
    display: flex;
    align-items: center;
    min-height: 44px;
    font-weight: 600;
}

.operator-page .pricing-card .btn {
    align-self: flex-start;
    width: auto;
    margin-top: auto;
}

/* ---------- Course page: what is available ---------- */
.operator-page .benefits-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 0;
}

.operator-page .benefit-card {
    padding: 1.75rem 1.5rem;
    background: var(--white);
    text-align: left;
}

.operator-page .benefit-card h3 {
    font-size: 1.15rem;
}

.operator-page .benefit-card p {
    margin: 0;
}

.operator-page .books-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.operator-page .books-grid--four .book-card-footer .btn {
    flex: 0 1 auto;
}

/* ---------- Course page: videos ---------- */
.operator-page .video-section {
    background: var(--white);
}

.operator-page .video-note {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1.25rem 1.5rem;
    align-items: center;
    max-width: 880px;
    padding: clamp(1.5rem, 3vw, 2rem);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--polish-card-shadow);
}

.operator-page .video-note .icon-tile {
    margin: 0;
}

.operator-page .video-note h3 {
    margin: 0 0 0.35rem;
    color: var(--dark-gray);
    font-family: var(--font-primary);
    font-size: 1.15rem;
}

.operator-page .video-note p {
    margin: 0;
    color: var(--medium-gray);
    line-height: 1.6;
}

/* ---------- Course page: FAQ, heading left, hairline list right ---------- */
.operator-page .operator-faq-grid {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    column-gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
}

.operator-page .faq-list {
    border-top: 1px solid var(--border-light);
}

.operator-page .faq-list details.faq-item {
    overflow: visible;
}

.operator-page .faq-item summary h3 {
    margin: 0;
    color: var(--dark-gray);
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.35;
    transition: color var(--transition-fast);
}

.operator-page .faq-item summary:hover h3 {
    color: var(--blue-text);
}

.operator-page .faq-item p {
    max-width: 68ch;
    margin: 0 0 1.5rem;
    color: var(--medium-gray);
    line-height: 1.7;
}

/* ---------- Closing band ---------- */
.operator-page .book-cta {
    padding: var(--polish-section) 0;
}

.operator-page .book-cta h2 {
    margin-left: auto;
    margin-right: auto;
    color: var(--white);
}

.operator-page .book-cta p {
    max-width: 60ch;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

.operator-page .book-cta-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.operator-page .book-cta .btn-ghost {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.operator-page .book-cta .btn-ghost:hover {
    background: var(--white);
    color: var(--blue-text);
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .operator-page .books-grid,
    .operator-page .books-grid--four,
    .operator-page .benefits-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .operator-page .pricing-cards {
        grid-template-columns: 1fr;
        max-width: 640px;
    }
}

@media (max-width: 768px) {
    .operator-page .book-hero {
        padding: 104px 0 64px;
    }

    .operator-page .operator-faq-grid {
        grid-template-columns: 1fr;
    }

    .operator-page .video-note {
        grid-template-columns: 1fr;
    }

    .operator-page .video-note .btn {
        justify-self: start;
    }
}

@media (max-width: 640px) {
    .operator-page .books-grid,
    .operator-page .books-grid--four,
    .operator-page .benefits-grid {
        grid-template-columns: 1fr;
    }

    .operator-page .book-cta-actions .btn,
    .operator-page .pricing-card .btn {
        width: 100%;
        align-self: stretch;
    }
}
