/* ─────────────────────────────────────────────────────────────────────
   computingDigitsOfPiWithPythonStyles.css
   TNT | LoadedDice2026-10-28
   Computing Digits of Pi — Python & JavaScript Tutorial
   Created: 10/30/2026
   Palette: LoadedDice green/gold/dark (matches analyzingLoadedDice)
   Code panels: adapted from graysonsSongStg2CTrainingStyles.css
──────────────────────────────────────────────────────────────────────── */

/* ═══ CUSTOM PROPERTIES ═══ */
:root {
    /* ── LoadedDice core palette (matches analyzingLoadedDice) ── */
    --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-dark:       #060e08;
    --ld-card:       #0b1a0e;
    --ld-border:     rgba(30,122,62,0.22);
    --ld-ice:        #d0f0d8;

    /* ── Language paper colors (from GraysonsSong pattern) ── */
    --py-paper:      #f0fdf4;   /* light green parchment for Python  */
    --py-border:     #16a34a;
    --py-header-bg:  #14532d;
    --py-header-fg:  #dcfce7;

    --js-paper:      #fefce8;   /* light yellow parchment for JavaScript */
    --js-border:     #a16207;
    --js-header-bg:  #713f12;
    --js-header-fg:  #fef9c3;

    /* ── Code syntax highlighting (shared across both panels) ── */
    --ct-keyword: #0055cc;
    --ct-comment: #6a737d;
    --ct-string:  #006400;
    --ct-number:  #c0450a;
}

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

/* ═══ SPARK BAR — matches analyzingLoadedDice pattern ═══ */
.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 ═══ */
#pi-hero {
    min-height: 36vh;
    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', cursive;
    font-size: clamp(1.9rem, 5vw, 2.9rem);
    color: #e8f5e8;
    text-shadow: 0 0 22px var(--ld-green-glow);
    margin-bottom: 0.7rem;
    line-height: 1.2;
}

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

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

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

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

/* ═══ SECTION HEADINGS ═══ */
.section-h2 {
    font-family: 'Boogaloo', cursive;
    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;
}

/* ═══ FEYNMAN-STYLE OPENER ═══ */
.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);
}

/* ═══ MATH FORMULA BLOCK ═══ */
.math-formula {
    display: block;
    background: rgba(4,12,6,0.88);
    border: 1px solid rgba(30,122,62,0.30);
    border-left: 4px solid var(--ld-green);
    border-radius: 0 8px 8px 0;
    padding: 1.1rem 1.4rem;
    margin: 1rem 0;
    font-family: 'Source Code Pro', 'Courier New', monospace;
    font-size: 0.90rem;
    color: #9fe8b2;
    line-height: 2.2;
    overflow-x: auto;
}

.math-formula .mf-label {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--ld-gold);
    margin-bottom: 0.55rem;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}

.math-formula .mf-note {
    display: block;
    font-size: 0.79rem;
    color: rgba(160,210,175,0.62);
    margin-top: 0.5rem;
    font-style: italic;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

/* ═══ LANGUAGE PANELS (from GraysonsSong pattern) ═══ */
.lang-panel {
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0,0,0,0.40);
    margin-bottom: 2rem;
}

.lang-header {
    padding: 0.6rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.lang-header-py { background: var(--py-header-bg); color: var(--py-header-fg); }
.lang-header-js { background: var(--js-header-bg); color: var(--js-header-fg); }

.lang-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.lang-dot-py { background: #86efac; }
.lang-dot-js { background: #fde68a; }

.lang-name     { font-size: 0.88rem; font-weight: 700; flex: 1; }
.lang-filename { font-family: 'Source Code Pro', monospace; font-size: 0.72rem; opacity: 0.70; }

/* Copy button inside panel header */
.lang-copy-btn {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.80);
    border-radius: 5px;
    padding: 0.22rem 0.55rem;
    font-size: 0.70rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: background 0.2s;
    margin-left: auto;
}

.lang-copy-btn:hover { background: rgba(255,255,255,0.22); color: #fff; }
.copy-label { font-weight: 600; }

/* ── Code paper (vintage-paper scrollable panel) ── */
.code-paper {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 620px;
}

.code-paper-py { background: var(--py-paper); border: 1px solid var(--py-border); }
.code-paper-js { background: var(--js-paper); border: 1px solid var(--js-border); }

.code-paper ol {
    margin: 0;
    padding: 0;
    list-style-type: decimal;
    padding-left: 3rem;
    font-family: 'Source Code Pro', 'Courier New', monospace;
    font-size: 0.74rem;
    line-height: 1.60;
}

.code-paper ol li { padding: 0 0.6rem 0 0.3rem; white-space: pre; }
.code-paper ol li::marker { font-size: 0.66rem; color: #999; }

/* Alternating greenbar stripe */
.code-paper-py li:nth-child(even) { background: rgba(22,163,74,0.05); }
.code-paper-js li:nth-child(even) { background: rgba(202,138,7,0.06); }

/* Default text color inside each paper */
.code-paper-py li { color: #0a2010; }
.code-paper-js li { color: #3a2000; }

/* ── Panel footer bar ── */
.lang-footer {
    padding: 0.5rem 0.85rem;
    font-size: 0.74rem;
}

.lang-footer-py { background: #bbf7d0; color: #14532d; border-top: 1px solid var(--py-border); }
.lang-footer-js { background: #fef08a; color: #713f12; border-top: 1px solid var(--js-border); }
.lang-footer a { font-weight: 700; text-decoration: underline; }
.lang-footer-py a { color: #14532d; }
.lang-footer-js a { color: #713f12; }

/* ═══ COPY NOTE CALLOUT ═══ */
.copy-note {
    background: rgba(196,137,43,0.07);
    border: 1px solid rgba(196,137,43,0.25);
    border-left: 4px solid var(--ld-gold);
    border-radius: 0 8px 8px 0;
    padding: 0.85rem 1.1rem;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: rgba(240,220,170,0.88);
    line-height: 1.65;
}

.copy-note strong { color: var(--ld-gold); }
.copy-note code {
    background: rgba(196,137,43,0.12);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.82em;
    font-family: 'Source Code Pro', monospace;
}

/* ═══ NOTE CARD ═══ */
.note-card {
    background: var(--ld-card);
    border: 1px solid rgba(30,122,62,0.30);
    border-radius: 12px;
    padding: 1.4rem 1.75rem;
    margin-top: 2rem;
}

.note-card h3 {
    font-family: 'Boogaloo', cursive;
    font-size: 1.3rem;
    color: #6de898;
    margin-bottom: 0.6rem;
}

.note-card p {
    font-size: 0.88rem;
    color: rgba(194,240,208,0.80);
    line-height: 1.72;
    margin-bottom: 0.6rem;
}

.note-card p:last-child { margin-bottom: 0; }

.note-card code {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.86em;
    color: #9fe8b2;
    background: rgba(30,122,62,0.12);
    padding: 1px 4px;
    border-radius: 3px;
}

/* ═══ CONCEPT CARDS ═══ */
.concept-card {
    background: var(--ld-dark);
    border: 1px solid rgba(30,122,62,0.20);
    border-radius: 12px;
    padding: 1.3rem 1.2rem;
    height: 100%;
}

.concept-card-icon {
    font-size: 1.5rem;
    color: var(--ld-gold);
    margin-bottom: 0.6rem;
}

.concept-card-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: rgba(220,245,225,0.88);
    margin-bottom: 0.45rem;
    line-height: 1.3;
}

.concept-card-body {
    font-size: 0.83rem;
    color: rgba(194,240,208,0.70);
    line-height: 1.6;
}

/* ═══ COMPARISON TABLE ═══ */
.compare-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;
}

.compare-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.9rem;
    border-bottom: 1px solid rgba(30,122,62,0.30);
    text-align: left;
}

.compare-table tbody td {
    padding: 0.50rem 0.9rem;
    color: rgba(194,238,208,0.80);
    border-bottom: 1px solid rgba(30,122,62,0.10);
    vertical-align: top;
    line-height: 1.55;
}

.compare-table tbody td:first-child {
    color: #9fe8b2;
    font-weight: 600;
    font-size: 0.82rem;
    white-space: nowrap;
}

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

/* ═══ 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);
    line-height: 1.65;
}

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

/* ═══ TRY-IT BOX ═══ */
.try-it-box {
    background: rgba(30,122,62,0.10);
    border: 1px solid rgba(30,122,62,0.30);
    border-radius: 8px;
    padding: 0.9rem 1.1rem;
    margin-top: 1.2rem;
    font-size: 0.88rem;
    color: rgba(190,240,205,0.88);
    line-height: 1.60;
}

.try-it-label {
    font-weight: 700;
    font-size: 0.70rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #6de898;
    margin-bottom: 0.4rem;
}

.try-it-box a { color: #6de898; font-weight: 700; }
.try-it-box a:hover { color: var(--ld-ice); }

/* ═══ INLINE HIGHLIGHTS ═══ */
.key-term       { color: #e8b84a; font-weight: 600; }
.key-term-green { color: #6de898; font-weight: 600; }

/* ═══ SYNTAX HIGHLIGHT SPANS (applied if highlighter is added later) ═══ */
.ct-keyword { color: var(--ct-keyword); font-weight: 600; }
.ct-comment { color: var(--ct-comment); font-style: italic; }
.ct-string  { color: var(--ct-string); }
.ct-number  { color: var(--ct-number); }

/* ═══ FOOTER ═══ */
footer {
    color: rgba(190,225,200,0.60);
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 767px) {
    .spark-bar       { font-size: 0.77rem; gap: 0.5rem; }
    .spark-bar span  { display: none; }
    .code-paper      { max-height: 440px; }
    .math-formula    { font-size: 0.82rem; line-height: 1.9; }
}

@media (max-width: 575px) {
    .pi-container    { padding: 0 0.6rem 3rem; }
    .math-formula    { font-size: 0.76rem; }
    .pi-section      { padding: 1.6rem 0 1.2rem; }
    .compare-table   { font-size: 0.80rem; }
    .compare-table tbody td:first-child { white-space: normal; }
}
