/* Study components; site theme and layout are shared through style.css and studies.css. */
.history-study * { margin: 0; padding: 0; }
/* MAIN CONTAINER */
.history-study .tab-pane {
    display: none;
    animation: fadeIn 0.32s ease;
  }
.history-study .tab-pane.active {
    display: block;
  }
@keyframes  fadeIn {

    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
  }
/* INTERACTIVE SCRUBBER DECK */
.history-study .scrubber-deck {
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
  }
/* 7 CHURCH AGES RIBBON */
.history-study .ages-ribbon {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 1.1rem;
  }
.history-study .age-pill {
    font-family: var(--font-sans);
    padding: 0.45rem 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-light);
    background: var(--bg-secondary);
    cursor: pointer;
    text-align: center;
    transition: all 0.22s ease;
    position: relative;
    overflow: hidden;
  }
.history-study .age-pill:hover {
    border-color: var(--accent-gold);
    transform: translateY(-1px);
  }
.history-study .age-pill.active {
    background: linear-gradient(135deg, var(--rubric) 0%, var(--rubric-deep) 100%);
    color: #ffffff;
    border-color: var(--accent-gold-bright);
    box-shadow: 0 3px 12px rgba(22, 47, 82, 0.25);
  }
.history-study .age-pill .age-name {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
  }
.history-study .age-pill .age-dates {
    font-size: 0.68rem;
    opacity: 0.82;
    display: block;
  }
/* SCRUBBER CONTROLS ROW */
.history-study .scrubber-controls-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.9rem;
  }
.history-study .transport-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }
.history-study .ctrl-btn {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    border: 1px solid var(--border-strong);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.18s ease;
  }
.history-study .ctrl-btn:hover {
    border-color: var(--accent-gold);
    background: var(--accent-gold-soft);
  }
.history-study .ctrl-btn.play-btn {
    background: linear-gradient(135deg, var(--rubric) 0%, var(--rubric-deep) 100%);
    color: #ffffff;
    border-color: var(--rubric);
    padding: 0.5rem 1.15rem;
  }
.history-study .ctrl-btn.play-btn:hover {
    filter: brightness(1.12);
  }
.history-study .ctrl-btn.play-btn.playing {
    background: linear-gradient(135deg, #8b2226 0%, #b52d32 100%);
    border-color: #8b2226;
  }
.history-study .slider-wrapper {
    flex: 1;
    min-width: min(100%, 240px);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }
.history-study .timeline-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #166534 0%, var(--gold) 50%, #8b2226 100%);
    outline: none;
    cursor: pointer;
  }
.history-study .timeline-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    border: 4px solid var(--rubric);
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
    cursor: grab;
    transition: transform 0.15s ease;
  }
.history-study .timeline-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
  }
.history-study .scrubber-readout {
    font-family: var(--font-sans);
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
.history-study .year-badge-large {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 800;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    background: var(--accent-gold-soft);
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
    white-space: nowrap;
  }
.history-study .step-counter {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
  }
/* MILESTONE DOTS BAR */
.history-study .milestone-track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding-top: 0.4rem;
    overflow-x: auto;
  }
.history-study .milestone-dot {
    flex: 1;
    min-width: 26px;
    height: 28px;
    border-radius: 5px;
    border: 1px solid var(--border-light);
    background: var(--bg-secondary);
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
  }
.history-study .milestone-dot.stream-antioch {
    border-bottom: 3px solid var(--accent-antioch-bright);
  }
.history-study .milestone-dot.stream-alexandria {
    border-bottom: 3px solid var(--accent-crimson-bright);
  }
.history-study .milestone-dot.stream-clash {
    border-bottom: 3px solid var(--accent-gold-bright);
  }
.history-study .milestone-dot:hover {
    transform: translateY(-2px);
    border-color: var(--accent-gold);
  }
.history-study .milestone-dot.active {
    background: var(--accent-gold-bright);
    color: var(--ink);
    border-color: var(--ink);
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 2px 8px rgba(212, 163, 56, 0.4);
  }
/* STAGE GRID: ANIMATED TWO STREAMS + ACTIVE MOMENT CARD */
.history-study .stage-grid {
    display: grid;
    grid-template-columns: 1.05fr 1.25fr;
    gap: 1.5rem;
    align-items: start;
  }
.history-study .visual-panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    padding: 1.35rem;
    box-shadow: var(--shadow-md);
  }
.history-study .panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--border-light);
  }
.history-study .panel-title {
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-navy);
  }
.history-study .legend-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.85rem;
    font-family: var(--font-sans);
    font-size: 0.76rem;
    font-weight: 600;
  }
.history-study .legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
  }
.history-study .legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
  }
/* ANIMATED TWO STREAMS MAP */
.history-study .streams-svg-container {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    padding: 0.5rem;
  }
.history-study .stream-node-group {
    cursor: pointer;
    transition: all 0.25s ease;
  }
.history-study .stream-node-group:hover circle {
    r: 11px;
  }
.history-study .pulse-ring {
    animation: pulseRing 1.8s infinite ease-out;
    transform-origin: center;
    transform-box: fill-box;
  }
@keyframes  pulseRing {

    0% { transform: scale(0.9); opacity: 0.9; }
    70% { transform: scale(1.9); opacity: 0; }
    100% { transform: scale(1.9); opacity: 0; }
  }
/* ACTIVE MOMENT HERO CARD */
.history-study .moment-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    padding: 1.6rem;
    box-shadow: var(--shadow-md);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
  }
.history-study .moment-card.stream-antioch {
    border-top: 5px solid var(--accent-antioch-bright);
  }
.history-study .moment-card.stream-alexandria {
    border-top: 5px solid var(--accent-crimson-bright);
  }
.history-study .moment-card.stream-clash {
    border-top: 5px solid var(--accent-gold-bright);
  }
.history-study .moment-meta-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
    font-family: var(--font-sans);
  }
.history-study .badge {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
  }
.history-study .badge-year {
    background: var(--rubric);
    color: #ffffff;
  }
.history-study .badge-age {
    background: var(--accent-gold-soft);
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
  }
.history-study .badge-antioch {
    background: rgba(22, 101, 52, 0.15);
    color: var(--accent-antioch);
    border: 1px solid var(--accent-antioch);
  }
.history-study .badge-alexandria {
    background: rgba(139, 34, 38, 0.15);
    color: var(--accent-crimson);
    border: 1px solid var(--accent-crimson);
  }
.history-study .badge-clash {
    background: rgba(212, 163, 56, 0.2);
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
  }
.history-study .moment-title {
    font-size: 1.6rem;
    line-height: 1.25;
    color: var(--accent-navy);
    margin-bottom: 0.45rem;
  }
.history-study .moment-subtitle {
    font-family: var(--font-sans);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1.1rem;
  }
.history-study .moment-narrative {
    font-size: 1.02rem;
    margin-bottom: 1.15rem;
    color: var(--text-primary);
  }
.history-study .moment-scripture {
    background: var(--bg-scripture);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--accent-gold-bright);
    padding: 0.95rem 1.2rem;
    border-radius: 6px;
    margin-bottom: 1.15rem;
    font-style: italic;
  }
.history-study .moment-scripture cite {
    display: block;
    font-style: normal;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-navy);
    margin-top: 0.35rem;
    text-transform: uppercase;
  }
.history-study .moment-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
    margin-bottom: 1.15rem;
  }
.history-study .mini-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 0.85rem 1rem;
  }
.history-study .mini-box h4 {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-navy);
    margin-bottom: 0.4rem;
  }
.history-study .mini-box p,
.history-study .mini-box ul {
    font-size: 0.9rem;
    line-height: 1.5;
  }
.history-study .mini-box ul {
    padding-left: 1.1rem;
  }
.history-study .moment-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border-light);
  }
.history-study .action-link-btn {
    font-family: var(--font-sans);
    font-size: 0.84rem;
    font-weight: 700;
    padding: 0.55rem 1.05rem;
    border-radius: 7px;
    background: var(--accent-navy);
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
  }
.history-study .action-link-btn:hover {
    filter: brightness(1.15);
  }
/* TAB 2: 7 CHURCH AGES & SPIRITUAL LAWS */
.history-study .laws-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
  }
.history-study .cycle-stepper {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.6rem;
    margin: 1.25rem 0 2rem;
  }
.history-study .cycle-step {
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-top: 4px solid var(--accent-gold);
    border-radius: 8px;
    padding: 0.9rem 0.75rem;
    text-align: center;
    transition: transform 0.2s;
  }
.history-study .cycle-step:hover {
    transform: translateY(-3px);
  }
.history-study .cycle-num {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--accent-crimson);
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.25rem;
  }
.history-study .cycle-label {
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent-navy);
    display: block;
    margin-bottom: 0.35rem;
  }
.history-study .cycle-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.45;
  }
/* TAB 3: DOSSIER EXPLORER */
.history-study .filter-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
  }
.history-study .search-input {
    flex: 1;
    min-width: min(100%, 240px);
    padding: 0.55rem 0.95rem;
    border-radius: 7px;
    border: 1px solid var(--border-strong);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
  }
.history-study .filter-chip {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
  }
.history-study .filter-chip.active {
    background: var(--accent-navy);
    color: #ffffff;
    border-color: var(--accent-navy);
  }
.history-study .dossier-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
    gap: 1.15rem;
  }
.history-study .person-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
  }
.history-study .person-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
.history-study .person-card.align-antioch { border-left: 5px solid var(--accent-antioch-bright); }
.history-study .person-card.align-alexandria { border-left: 5px solid var(--accent-crimson-bright); }
.history-study .person-card.align-mixed { border-left: 5px solid var(--accent-gold-bright); }
/* TAB 4: INTERACTIVE QA CARDS */
.history-study .qa-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
  }
.history-study .qa-question {
    font-weight: 700;
    font-size: 1.08rem;
    color: var(--accent-navy);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
.history-study .qa-answer {
    display: none;
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border-light);
    color: var(--text-primary);
  }
.history-study .qa-card.open .qa-answer {
    display: block;
  }
/* ORIGINAL FULL REPORT STYLING (TAB 5) */
.history-study .reader-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.75rem;
    align-items: start;
  }
.history-study .reader-sidebar {
    position: sticky;
    top: 78px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    padding: 1.1rem;
  }
.history-study .reader-sidebar h3 {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-navy);
    margin-bottom: 0.75rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--border-light);
  }
.history-study .reader-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }
.history-study .reader-nav-list a {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.4rem 0.55rem;
    border-radius: 6px;
    transition: all 0.15s;
  }
.history-study .reader-nav-list a:hover {
    background: var(--accent-gold-soft);
    color: var(--accent-navy);
    font-weight: 600;
  }
.history-study section.study-section {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 2.25rem 2.5rem;
    margin-bottom: 2.25rem;
    box-shadow: var(--shadow-sm);
  }
.history-study .part-banner {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-crimson);
    margin-bottom: 0.4rem;
  }
.history-study h2.section-title {
    font-size: 1.75rem;
    color: var(--accent-navy);
    line-height: 1.3;
    margin-bottom: 1.25rem;
    padding-bottom: 0.65rem;
    border-bottom: 2px solid var(--accent-gold);
  }
.history-study h3.subsection-title {
    font-size: 1.3rem;
    color: var(--accent-navy);
    margin-top: 2rem;
    margin-bottom: 0.85rem;
    line-height: 1.35;
  }
.history-study h4.topic-heading {
    font-size: 1.08rem;
    color: var(--accent-crimson);
    margin-top: 1.35rem;
    margin-bottom: 0.5rem;
  }
.history-study section.study-section p {
    margin-bottom: 1.1rem;
    text-align: justify;
  }
.history-study section.study-section ul,
.history-study section.study-section ol {
    margin-bottom: 1.2rem;
    padding-left: 1.6rem;
  }
.history-study section.study-section li {
    margin-bottom: 0.45rem;
  }
.history-study .scripture-box {
    background-color: var(--bg-scripture);
    border: 1px solid #e6dcc5;
    border-left: 5px solid var(--accent-gold);
    padding: 1.15rem 1.4rem;
    margin: 1.35rem 0;
    border-radius: 4px;
  }
.history-study .scripture-box blockquote {
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
  }
.history-study .scripture-box cite {
    display: block;
    font-style: normal;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent-navy);
    font-family: var(--font-sans);
  }
.history-study .dispensational-callout {
    background-color: var(--bg-accent);
    border: 1px solid #cbd5e1;
    border-left: 5px solid var(--accent-navy);
    padding: 1.35rem 1.6rem;
    margin: 1.5rem 0;
    border-radius: 4px;
  }
.history-study .dispensational-callout .callout-title {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-navy);
    margin-bottom: 0.55rem;
  }
.history-study .apologetic-callout {
    background-color: var(--bg-warning);
    border: 1px solid #e5c7c3;
    border-left: 5px solid var(--accent-crimson);
    padding: 1.35rem 1.6rem;
    margin: 1.5rem 0;
    border-radius: 4px;
  }
.history-study .apologetic-callout .callout-title {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-crimson);
    margin-bottom: 0.55rem;
  }
.history-study .table-wrap {
    overflow-x: auto;
    margin: 1.4rem 0;
  }
.history-study table.study-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
  }
.history-study table.study-table th {
    background-color: var(--rubric);
    color: #ffffff;
    text-align: left;
    padding: 0.75rem 0.9rem;
    font-family: var(--font-sans);
    font-weight: 600;
    border: 1px solid var(--rubric);
  }
.history-study table.study-table td {
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border-light);
    vertical-align: top;
  }
.history-study table.study-table tr:nth-child(even) td {
    background-color: var(--bg-secondary);
  }
.history-study .comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 1.25rem;
    margin: 1.35rem 0;
  }
.history-study .stream-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    padding: 1.25rem 1.4rem;
  }
.history-study .stream-card h4 {
    font-size: 1.1rem;
    color: var(--accent-navy);
    border-bottom: 2px solid var(--accent-gold);
    padding-bottom: 0.4rem;
    margin-bottom: 0.75rem;
  }
.history-study .dossier-entry {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--accent-gold);
    padding: 1.1rem 1.35rem;
    margin-bottom: 1rem;
    border-radius: 4px;
  }
.history-study .dossier-entry .entry-label {
    font-weight: 700;
    color: var(--accent-navy);
    font-size: 1.03rem;
    margin-bottom: 0.35rem;
  }
.history-study .rating-badge {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.2rem 0.55rem;
    border-radius: 3px;
    background-color: var(--rubric);
    color: #ffffff;
    margin-left: 0.45rem;
  }
@media  (max-width: 1024px) {
.history-study .stage-grid {
      grid-template-columns: 1fr;
    }
.history-study .reader-layout {
      grid-template-columns: 1fr;
    }
.history-study .reader-sidebar {
      position: static;
      max-height: none;
    }
.history-study .ages-ribbon {
      grid-template-columns: repeat(4, 1fr);
    }
.history-study .cycle-stepper {
      grid-template-columns: repeat(2, 1fr);
    }
}
@media  (max-width: 640px) {
.history-study .ages-ribbon {
      grid-template-columns: repeat(2, 1fr);
    }
.history-study .moment-grid-2 {
      grid-template-columns: 1fr;
    }
.history-study section.study-section {
      padding: 1.35rem 1.15rem;
    }
}
