/*
 * analyzingLoadedDiceStyles.css
 * TNT | Analyzing Loaded Dice — statistics tutorial guide styles
 * Created: 10/29/2026
 * Palette: --ld-green #1e7a3e | --ld-gold #c4892b | --ld-dark #060e08 | --ld-card #0b1a0e
 */

/* ═══ CUSTOM PROPERTIES ═══ */
:root {
    --ld-green:      #1e7a3e;
    --ld-green-lt:   rgba(30,122,62,0.15);
    --ld-green-glow: rgba(30,122,62,0.28);
    --ld-gold:       #c4892b;
    --ld-gold-lt:    rgba(196,137,43,0.15);
    --ld-red:        #c03030;
    --ld-dark:       #060e08;
    --ld-card:       #0b1a0e;
    --ld-border:     rgba(30,122,62,0.22);
    --ld-ice:        #d0f0d8;
}

/* ═══ BODY ═══ */
body {
    background:
        linear-gradient(140deg, rgba(6,14,8,0.87) 0%, rgba(10,22,12,0.90) 100%),
        url('../images/Five_ivory_dice.jpg') center / cover fixed;
    color: #d5f0d8;
    font-family: 'Inter', sans-serif;
}

/* ═══ SPARK BAR — matches loadedDiceApp.html (CRAP: Repetition) ═══ */
.spark-bar {
    background: #040a08;
    border-bottom: 1px solid var(--ld-border);
    padding: 0.52rem 1.1rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    font-size: 0.83rem;
}

.spark-bar a {
    color: var(--ld-gold);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.18s;
}

.spark-bar a:hover {
    color: #e8b84a;
    text-decoration: underline;
}

.spark-bar span {
    color: rgba(196,137,43,0.42);
    font-size: 0.79rem;
}

/* ═══ HERO ═══ */
#guide-hero {
    min-height: 34vh;
    background:
        linear-gradient(135deg, rgba(6,14,8,0.82) 0%, rgba(14,30,16,0.70) 100%),
        url('../images/Five_ivory_dice.jpg') center 55% / cover no-repeat;
    background-color: var(--ld-dark);
    padding: 3.2rem 1rem 2.4rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--ld-border);
}

.hero-content { width: 100%; }

.hero-eyebrow {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(30,122,62,0.90);
    margin-bottom: 0.6rem;
}

.hero-title {
    font-family: 'Boogaloo', sans-serif;
    font-size: clamp(1.9rem, 5vw, 2.9rem);
    color: #e8f5e8;
    text-shadow: 0 0 22px var(--ld-green-glow);
    margin-bottom: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.hero-icon {
    height: 1.8rem;
    filter: drop-shadow(0 0 8px var(--ld-green-glow));
}

.hero-subtitle {
    font-size: 1.02rem;
    color: rgba(210,240,215,0.78);
    max-width: 660px;
    margin: 0 auto 1.2rem;
    line-height: 1.55;
}

/* ═══ MAIN CONTAINER ═══ */
.guide-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem 4rem;
}

/* ═══ GUIDE SECTION ═══ */
.guide-section {
    padding: 2.2rem 0 1.6rem;
    border-top: 1px solid rgba(30,122,62,0.18);
}

.guide-section:first-child {
    border-top: none;
    padding-top: 1.8rem;
}

/* ═══ TABLE OF CONTENTS ═══ */
.guide-toc {
    background: var(--ld-card);
    border: 1px solid rgba(30,122,62,0.32);
    border-radius: 10px;
    padding: 1.1rem 1.4rem;
    margin: 1.2rem 0 1.8rem;
}

.guide-toc-label {
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ld-ice);
    margin-bottom: 0.6rem;
}

.guide-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guide-toc li {
    padding: 0.22rem 0;
    font-size: 0.88rem;
    color: rgba(190,235,200,0.80);
    border-bottom: 1px solid rgba(30,122,62,0.10);
}

.guide-toc li:last-child { border-bottom: none; }

.guide-toc a {
    color: #5cd483;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s;
}

.guide-toc a:hover {
    color: var(--ld-ice);
    text-decoration: underline;
}

.guide-toc .toc-tagline {
    font-style: italic;
    color: rgba(180,220,190,0.58);
    font-size: 0.82rem;
    margin-left: 0.3rem;
}

/* ═══ ASIDE BOX ═══ */
.aside-box {
    background: rgba(5,14,7,0.90);
    border: 1px solid rgba(30,122,62,0.32);
    border-radius: 8px;
    padding: 0.9rem 1.1rem;
    margin: 1rem 0;
    font-size: 0.88rem;
    color: rgba(194,240,208,0.88);
}

.aside-label {
    font-weight: 700;
    font-size: 0.70rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ld-ice);
    margin-bottom: 0.35rem;
}

/* ═══ TEST HEADER ═══ */
.test-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.test-badge {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 50%;
    background: var(--ld-gold);
    color: #0a0a00;
    font-family: 'Boogaloo', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 14px rgba(196,137,43,0.45);
    flex-shrink: 0;
}

.test-title-block { flex: 1; }

.test-title-block h2 {
    font-family: 'Boogaloo', sans-serif;
    font-size: clamp(1.4rem, 3.5vw, 1.9rem);
    color: #e8f5e8;
    margin-bottom: 0.2rem;
    line-height: 1.2;
}

.test-tagline {
    font-style: italic;
    color: var(--ld-gold);
    font-size: 0.96rem;
    margin: 0;
}

/* ═══ FEYNMAN HOOK ═══ */
.feynman-hook {
    font-style: italic;
    font-size: 1.05rem;
    color: var(--ld-gold);
    margin-bottom: 1.2rem;
    line-height: 1.65;
    padding-left: 1rem;
    border-left: 3px solid rgba(196,137,43,0.35);
}

/* ═══ FORMULA DISPLAY ═══ */
.formula-display {
    display: block;
    text-align: center;
    background: rgba(4,12,6,0.72);
    border: 1px solid rgba(30,122,62,0.25);
    border-radius: 8px;
    padding: 0.9rem 1.2rem;
    margin: 1rem 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.92rem;
    color: #9fe8b2;
    line-height: 1.8;
}

.formula-display .formula-note {
    display: block;
    font-size: 0.80rem;
    color: rgba(160,210,175,0.65);
    margin-top: 0.35rem;
    font-style: italic;
}

/* ═══ EXAMPLE CARD ═══ */
.example-card {
    position: relative;
    background: var(--ld-card);
    border: 1px solid var(--ld-border);
    border-radius: 10px;
    padding: 1.2rem 1.2rem 1rem;
    margin: 1rem 0;
}

.example-card.pass  { border-left: 4px solid var(--ld-green); }
.example-card.fail  { border-left: 4px solid var(--ld-red);   }
.example-card.trick { border-left: 4px solid var(--ld-gold);  }

.card-badge {
    position: absolute;
    top: 0.8rem;
    right: 0.9rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    border-radius: 20px;
    padding: 0.22rem 0.65rem;
}

.card-badge.pass  { background: rgba(30,122,62,0.22);  color: #6de898; border: 1px solid rgba(30,122,62,0.40); }
.card-badge.fail  { background: rgba(192,48,48,0.18);  color: #f07070; border: 1px solid rgba(192,48,48,0.38); }
.card-badge.trick { background: rgba(196,137,43,0.18); color: #e8b84a; border: 1px solid rgba(196,137,43,0.38); }

.card-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: rgba(220,245,225,0.92);
    margin-bottom: 0.4rem;
    padding-right: 5.5rem;
    line-height: 1.4;
}

.card-desc {
    font-size: 0.84rem;
    color: rgba(188,228,200,0.75);
    margin-bottom: 0.7rem;
    line-height: 1.55;
}

/* ═══ DATASET DISPLAY ═══ */
.dataset-display {
    width: 100%;
    background: rgba(3,10,5,0.88);
    border: 1px solid rgba(30,122,62,0.22);
    border-radius: 6px;
    color: #8fe0aa;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.82rem;
    padding: 0.6rem 0.8rem;
    resize: vertical;
    line-height: 1.55;
    min-height: 5rem;
    display: block;
}

.dataset-display:focus {
    outline: none;
    border-color: rgba(30,122,62,0.45);
    box-shadow: 0 0 0 3px var(--ld-green-lt);
}

.copy-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.45rem;
}

/* ═══ COPY BUTTON ═══ */
.copy-btn {
    background: transparent;
    color: var(--ld-gold);
    border: 1px solid rgba(196,137,43,0.50);
    border-radius: 6px;
    padding: 0.30rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    white-space: nowrap;
}

.copy-btn:hover {
    background: var(--ld-gold);
    color: #0a0800;
    box-shadow: 0 0 8px rgba(196,137,43,0.35);
}

.copy-btn.copy-success {
    background: rgba(30,122,62,0.22);
    color: #6de898;
    border-color: rgba(30,122,62,0.50);
}

.copy-hint {
    font-size: 0.76rem;
    color: rgba(160,200,170,0.50);
    font-style: italic;
}

/* ═══ LIMITATION BOX ═══ */
.limitation-box {
    background: rgba(196,137,43,0.10);
    border-left: 4px solid var(--ld-gold);
    border-radius: 0 8px 8px 0;
    padding: 0.9rem 1.1rem;
    margin: 1.4rem 0 0.5rem;
    font-size: 0.86rem;
    color: rgba(240,220,170,0.88);
    line-height: 1.6;
}

.limitation-label {
    font-weight: 700;
    font-size: 0.70rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #e8b84a;
    margin-bottom: 0.35rem;
}

/* ═══ CASE STUDY REVEAL ═══ */
.case-study-reveal {
    background: rgba(196,137,43,0.14);
    border: 1px solid rgba(196,137,43,0.38);
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin: 1.2rem 0;
    font-size: 0.88rem;
    color: rgba(248,230,170,0.92);
    line-height: 1.65;
}

.case-study-label {
    font-weight: 700;
    font-size: 0.70rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #e8b84a;
    margin-bottom: 0.35rem;
}

/* ═══ WORKED EXAMPLE TABLE ═══ */
.guide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
    margin: 1rem 0;
    background: rgba(4,12,6,0.60);
    border-radius: 8px;
    overflow: hidden;
}

.guide-table thead th {
    background: rgba(30,122,62,0.25);
    color: #9fe8b2;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0.55rem 0.8rem;
    border-bottom: 1px solid rgba(30,122,62,0.30);
    text-align: left;
}

.guide-table tbody td {
    padding: 0.45rem 0.8rem;
    color: rgba(194,238,208,0.80);
    border-bottom: 1px solid rgba(30,122,62,0.10);
}

.guide-table tbody tr:last-child td { border-bottom: none; }
.guide-table tbody tr:hover td { background: rgba(30,122,62,0.08); }

.guide-table tfoot td {
    padding: 0.45rem 0.8rem;
    color: #9fe8b2;
    font-weight: 700;
    border-top: 1px solid rgba(30,122,62,0.25);
    background: rgba(30,122,62,0.08);
}

/* ═══ LABEL STRIP ILLUSTRATION ═══ */
.label-strip-wrap {
    background: rgba(4,12,6,0.72);
    border: 1px solid rgba(30,122,62,0.20);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    margin: 1rem 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.84rem;
}

.label-strip-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.3rem 0;
    flex-wrap: wrap;
}

.label-strip-seq {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.lbl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
}

.lbl-L {
    background: rgba(30,122,62,0.30);
    color: #6de898;
    border: 1px solid rgba(30,122,62,0.38);
}

.lbl-H {
    background: rgba(196,137,43,0.25);
    color: #e8b84a;
    border: 1px solid rgba(196,137,43,0.35);
}

.strip-result {
    margin-left: 0.5rem;
    color: rgba(194,240,208,0.72);
    font-size: 0.80rem;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}

.strip-result.suspicious { color: #f07070; }
.strip-result.suspicious-alt { color: #f07070; }

/* ═══ PAIRS GRID DISPLAY ═══ */
.pairs-grid-display {
    background: rgba(4,12,6,0.72);
    border: 1px solid rgba(30,122,62,0.20);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    margin: 1rem 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.82rem;
    color: #8fe0aa;
    white-space: pre;
    overflow-x: auto;
    line-height: 1.7;
}

/* ═══ SAMPLE SIZE NOTE ═══ */
.sample-size-note {
    background: rgba(30,122,62,0.10);
    border: 1px solid rgba(30,122,62,0.28);
    border-radius: 8px;
    padding: 0.8rem 1.1rem;
    margin: 1rem 0;
    font-size: 0.85rem;
    color: rgba(188,238,205,0.82);
    line-height: 1.6;
}

.sample-size-note strong { color: #9fe8b2; }

/* ═══ SECTION HEADINGS ═══ */
.section-h2 {
    font-family: 'Boogaloo', sans-serif;
    font-size: clamp(1.5rem, 3.8vw, 2rem);
    color: #e0f5e4;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-h3 {
    font-size: 0.96rem;
    font-weight: 700;
    color: #9fe8b2;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 1.2rem 0 0.5rem;
}

/* ═══ INLINE HIGHLIGHT ═══ */
.key-term {
    color: #e8b84a;
    font-weight: 600;
}

.key-term-green {
    color: #6de898;
    font-weight: 600;
}

/* ═══ FOOTER (uses tnt-base-styles for most; override text color) ═══ */
footer { color: rgba(190,225,200,0.60); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 767px) {
    .test-header     { gap: 0.7rem; }
    .test-badge      { width: 50px; height: 50px; min-width: 50px; font-size: 1.5rem; }
    .test-title-block h2 { font-size: 1.3rem; }
    .card-badge      { position: static; display: inline-block; margin-bottom: 0.4rem; }
    .card-title      { padding-right: 0; }
    .spark-bar       { font-size: 0.77rem; gap: 0.5rem; }
    .spark-bar span  { display: none; }
    .guide-toc li    { font-size: 0.84rem; }
}

/* ═══ HISTOGRAM IMAGE SLOT ═══ */
.histogram-display {
    margin: 1.2rem 0 0.5rem;
    border: 1px solid rgba(30,122,62,0.25);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(6,14,8,0.70);
}

.histogram-caption {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(150,200,165,0.80);
    padding: 0.55rem 1rem 0.4rem;
    border-bottom: 1px solid rgba(30,122,62,0.18);
    margin: 0;
}

.histogram-img {
    display: block;
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
    padding: 0.5rem;
}

.histogram-pending {
    display: none;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 1rem 1.1rem;
    font-size: 0.83rem;
    color: rgba(196,137,43,0.72);
    font-style: italic;
}

.histogram-pending i   { flex-shrink: 0; margin-top: 0.15rem; color: var(--ld-gold); }
.histogram-pending a   { color: #6de898; }
.histogram-pending code { color: #9fe8b2; font-size: 0.81rem; }

@media (max-width: 575px) {
    .guide-container { padding: 0 0.6rem 3rem; }
    .formula-display { font-size: 0.80rem; }
    .pairs-grid-display { font-size: 0.75rem; }
    .guide-section   { padding: 1.6rem 0 1.2rem; }
    .dataset-display { font-size: 0.76rem; }
}
