/* ══════════════════════════════════════════════════════════════════════════════
   bellCurveTutorialStyles.css
   TNT | Bell Curve Tutorial
   Created: 10/31/2026
   Palette: navy/steel-blue/gold — shared with Galton Board Simulator
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── CSS Variables (mirror galtonBoardSimAppStyles.css) ───────────────────────── */
:root {
    --gb-bg:            #0d1219;
    --gb-blue:          #3280cc;
    --gb-gold:          #f2ae24;
    --gb-light:         #cee0f2;
    --gb-card:          #181d29;
    --gb-border:        rgba(50, 128, 204, 0.25);
    --gb-border-solid:  #2c4359;
}

/* ── Body ─────────────────────────────────────────────────────────────────────── */
body {
    background-color: var(--gb-bg);
    color: var(--gb-light);
    font-family: 'Inter', sans-serif;
    font-size: 0.97rem;
    line-height: 1.72;
}

/* ── Hero ─────────────────────────────────────────────────────────────────────── */
#hero {
    min-height: 32vh;
    background:
        linear-gradient(180deg, rgba(13,18,25,0.92) 0%, rgba(13,18,25,0.55) 100%),
        url('../images/robotGaltonBoard2.jpg') center 30% / cover no-repeat;
    padding: 4rem 1rem 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    max-width: 820px;
}

.hero-eyebrow {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--gb-gold);
    margin-bottom: 0.65rem;
    opacity: 0.88;
}

.hero-title {
    font-family: 'Boogaloo', sans-serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    color: #fff;
    margin-bottom: 0.55rem;
    line-height: 1.15;
}

.hero-subtitle {
    font-size: 1rem;
    color: rgba(255,255,255,0.70);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ── SPARK bar ────────────────────────────────────────────────────────────────── */
.spark-bar {
    background: rgba(13,18,25,0.95);
    border-bottom: 1px solid var(--gb-border-solid);
    padding: 0.45rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1.4rem;
    flex-wrap: wrap;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.spark-bar a {
    color: var(--gb-blue);
    text-decoration: none;
    transition: color 0.18s;
}

.spark-bar a:hover { color: var(--gb-gold); }
.spark-bar span    { color: rgba(255,255,255,0.35); margin-left: auto; }

/* ── Tutorial container ───────────────────────────────────────────────────────── */
.tut-container {
    max-width: 860px;
    padding: 3rem 1rem 4rem;
}

/* ── Section ─────────────────────────────────────────────────────────────────── */
.tut-section {
    position: relative;
    margin-bottom: 3.5rem;
    padding: 2rem 2rem 1.5rem;
    background: var(--gb-card);
    border: 1px solid var(--gb-border-solid);
    border-radius: 12px;
    border-left: 4px solid var(--gb-blue);
}

.tut-section-cta {
    border-left-color: var(--gb-gold);
}

/* ── Section number bubble ──────────────────────────────────────────────────────*/
.tut-section-num {
    position: absolute;
    top: -18px;
    left: 1.8rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gb-blue);
    color: #fff;
    font-family: 'Boogaloo', sans-serif;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--gb-bg);
    z-index: 1;
}

.tut-section-cta .tut-section-num {
    background: var(--gb-gold);
    color: #1a1000;
}

/* ── Section heading ─────────────────────────────────────────────────────────── */
.tut-heading {
    font-family: 'Boogaloo', sans-serif;
    font-size: 1.55rem;
    color: var(--gb-gold);
    margin-bottom: 0.9rem;
    margin-top: 0.1rem;
    line-height: 1.2;
}

.tut-subheading {
    font-family: 'Boogaloo', sans-serif;
    font-size: 1.2rem;
    color: var(--gb-light);
    margin: 1.2rem 0 0.6rem;
    line-height: 1.25;
}

.tut-subheading-sm {
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--gb-gold);
    margin: 1rem 0 0.4rem;
}

/* ── Section divider line ─────────────────────────────────────────────────────── */
.gb-hr {
    border: none;
    border-top: 1px solid var(--gb-border-solid);
    margin: 1.4rem 0;
}

/* ── Insight box ─────────────────────────────────────────────────────────────── */
.insight-box {
    background: rgba(242,174,36,0.08);
    border: 1px solid rgba(242,174,36,0.35);
    border-left: 3px solid var(--gb-gold);
    border-radius: 0 8px 8px 0;
    padding: 0.9rem 1.1rem;
    margin: 1.2rem 0;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.82);
    line-height: 1.6;
}

.clt-box {
    font-size: 0.92rem;
    padding: 1.1rem 1.3rem;
}

/* ── Blockquote ──────────────────────────────────────────────────────────────── */
.tut-quote {
    border-left: 3px solid var(--gb-blue);
    padding: 0.65rem 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: rgba(255,255,255,0.65);
    background: rgba(50,128,204,0.07);
    border-radius: 0 6px 6px 0;
    font-size: 0.95rem;
}

/* ── Formula display ─────────────────────────────────────────────────────────── */
.formula-display {
    background: rgba(0,0,0,0.35);
    border: 1px solid var(--gb-border-solid);
    border-radius: 8px;
    padding: 0.85rem 1.4rem;
    font-family: 'Courier New', monospace;
    font-size: 1.05rem;
    color: var(--gb-gold);
    text-align: center;
    margin: 1.1rem 0;
}

.formula-big {
    font-size: 1.25rem;
    padding: 1.1rem 1.4rem;
}

/* Fraction display inside formula boxes */
.frac {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    vertical-align: middle;
    margin: 0 0.3rem;
}

.frac-num {
    border-bottom: 1px solid var(--gb-gold);
    padding-bottom: 2px;
    font-size: 0.9em;
}

.frac-den {
    padding-top: 2px;
    font-size: 0.9em;
}

/* ── Path tree ───────────────────────────────────────────────────────────────── */
.path-tree-wrap {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

.path-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.pt-level {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    position: relative;
}

.pt-ball {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gb-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: #1a1000;
}

.pt-label-start {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.40);
    margin-left: 0.4rem;
}

.pt-peg {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gb-blue);
    border: 2px solid rgba(50,128,204,0.60);
}

.pt-branch-labels {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gb-gold);
}

.pt-branch-labels-wide {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gb-gold);
}

.pt-left  { color: var(--gb-gold); }
.pt-right { color: #4ade80; }

.pt-bins {
    display: flex;
    gap: 1rem;
    margin-top: 1.2rem;
}

.pt-bin {
    background: rgba(50,128,204,0.12);
    border: 1px solid var(--gb-border-solid);
    border-radius: 6px;
    padding: 0.5rem 0.8rem;
    text-align: center;
    min-width: 80px;
}

.pt-bin-mid {
    background: rgba(242,174,36,0.15);
    border-color: rgba(242,174,36,0.50);
}

.pt-bin-label {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.50);
    margin-bottom: 0.2rem;
}

.pt-bin-path {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gb-light);
}

.pt-bin-count {
    font-size: 0.72rem;
    color: var(--gb-gold);
    margin-top: 0.2rem;
}

/* ── Pascal's triangle ───────────────────────────────────────────────────────── */
.pascal-wrap {
    margin: 1.5rem auto;
    max-width: 520px;
}

.pascal-row {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
}

.pascal-row-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.35);
    margin-bottom: 0.15rem;
    margin-top: 0.5rem;
}

.pc {
    width: 2.4rem;
    height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(50,128,204,0.14);
    border: 1px solid rgba(50,128,204,0.35);
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--gb-light);
    transition: background 0.2s;
}

.pc-one   { background: rgba(50,128,204,0.08); }
.pc-mid   { background: rgba(242,174,36,0.14); border-color: rgba(242,174,36,0.40); color: var(--gb-gold); }
.pc-peak  { background: rgba(242,174,36,0.30); border-color: rgba(242,174,36,0.75); color: var(--gb-gold); font-size: 1rem; }

/* ── Binomial expansion ──────────────────────────────────────────────────────── */
.binomial-expansion {
    background: rgba(0,0,0,0.28);
    border: 1px solid var(--gb-border-solid);
    border-radius: 8px;
    padding: 1rem 1.3rem;
    margin: 1.2rem 0;
}

.binom-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.6rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(50,128,204,0.12);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.binom-row:last-child { border-bottom: none; }

.binom-power  { color: var(--gb-gold); font-weight: 700; min-width: 90px; }
.binom-eq     { color: rgba(255,255,255,0.45); }
.binom-result { color: var(--gb-light); flex: 1; }
.binom-coeffs { font-size: 0.75rem; color: rgba(255,255,255,0.45); font-family: 'Inter', sans-serif; }

.bc { color: var(--gb-gold); font-weight: 900; }
.pc-peak-text { color: #f2ae24; font-size: 1.05em; font-weight: 900; }

/* ── Probability table ───────────────────────────────────────────────────────── */
.prob-table-wrap {
    overflow-x: auto;
    margin: 1.1rem 0;
}

.prob-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.87rem;
}

.prob-table th {
    background: rgba(50,128,204,0.18);
    color: var(--gb-gold);
    padding: 0.5rem 0.8rem;
    text-align: center;
    font-weight: 700;
    border-bottom: 1px solid var(--gb-border-solid);
}

.prob-table td {
    padding: 0.42rem 0.8rem;
    text-align: center;
    border-bottom: 1px solid rgba(50,128,204,0.10);
    color: rgba(255,255,255,0.78);
}

.prob-row-mid td {
    background: rgba(242,174,36,0.08);
    color: var(--gb-gold);
    font-weight: 700;
}

.prob-count-mid {
    color: var(--gb-gold);
    font-weight: 900;
    font-size: 1.05em;
}

/* ── Row comparison bars ─────────────────────────────────────────────────────── */
.row-comparison {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.row-comp-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    padding: 0.8rem 1rem;
    background: rgba(0,0,0,0.28);
    border: 1px solid var(--gb-border-solid);
    border-radius: 8px;
    min-width: 120px;
}

.row-comp-label {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.45);
    align-self: flex-start;
    margin-bottom: 0.4rem;
}

.row-comp-caption {
    font-size: 0.72rem;
    color: var(--gb-gold);
    align-self: flex-start;
    margin-top: 0.4rem;
    font-style: italic;
}

.row-comp-bar {
    height: 8px;
    background: var(--gb-blue);
    border-radius: 2px;
    width: calc(var(--bar) * 0.7);
    min-width: 3px;
    max-width: 70px;
}

/* ── Tutorial figure / image ─────────────────────────────────────────────────── */
.tut-figure {
    margin: 1.4rem 0;
    text-align: center;
}

.tut-img {
    max-width: 100%;
    width: 340px;         /* natural canvas width scaled down nicely */
    border-radius: 8px;
    border: 1px solid var(--gb-border-solid);
    display: block;
    margin: 0 auto 0.6rem;
}

.tut-figure figcaption {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.45);
    font-style: italic;
    line-height: 1.5;
    max-width: 480px;
    margin: 0 auto;
}

/* ── Image request placeholder ───────────────────────────────────────────────── */
.img-request {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: rgba(50,128,204,0.06);
    border: 2px dashed rgba(50,128,204,0.40);
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin: 1.3rem 0;
}

.img-req-icon {
    font-size: 1.8rem;
    color: rgba(50,128,204,0.60);
    flex-shrink: 0;
    padding-top: 0.1rem;
}

.img-req-desc {
    font-size: 0.83rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.55;
}

.img-req-desc strong { color: var(--gb-light); }
.img-req-desc code   { color: var(--gb-gold); font-size: 0.8rem; background: rgba(0,0,0,0.3); padding: 1px 4px; border-radius: 3px; }

/* ── Tutorial list ───────────────────────────────────────────────────────────── */
.tut-list {
    padding-left: 1.2rem;
}

.tut-list li {
    margin-bottom: 0.65rem;
}

/* ── Try-it cards ────────────────────────────────────────────────────────────── */
.try-card {
    background: rgba(0,0,0,0.28);
    border: 1px solid var(--gb-border-solid);
    border-radius: 8px;
    padding: 1rem 1.2rem;
    height: 100%;
}

.try-card-title {
    font-family: 'Boogaloo', sans-serif;
    font-size: 1.05rem;
    color: var(--gb-gold);
    margin-bottom: 0.5rem;
}

.try-card p {
    font-size: 0.84rem;
    color: rgba(255,255,255,0.68);
    margin: 0;
}

/* ── Launch button ───────────────────────────────────────────────────────────── */
.btn-tut-launch {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gb-gold);
    color: #1a1000;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    transition: background 0.18s, transform 0.12s;
}

.btn-tut-launch:hover {
    background: #e09f14;
    color: #1a1000;
    transform: translateY(-2px);
    text-decoration: none;
}

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.tnt-footer {
    background: rgba(0,0,0,0.55);
    border-top: 1px solid var(--gb-border-solid);
    padding: 1.5rem 1rem;
    color: rgba(255,255,255,0.40);
    font-size: 0.78rem;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .tut-section { padding: 1.5rem 1.1rem 1.1rem; }
    .hero-title  { font-size: 1.75rem; }
    .spark-bar span { display: none; }
    .binomial-expansion { padding: 0.75rem 0.9rem; }
    .binom-row   { font-size: 0.78rem; }
    .row-comparison { gap: 0.75rem; }
    .pc          { width: 2rem; height: 2rem; font-size: 0.78rem; }
}
