/* The New Exegetical Edit™ — Unified Styles v1.0.0 */
/* Design system: warm cream + amber/gold. Extracted from Typology Edition. */

#nee-root {
    max-width: 760px;
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #2a2a2a;
    line-height: 1.5;
}

#nee-root * { box-sizing: border-box; }

/* ── Header ── */
.nee-header { text-align: center; margin-bottom: 1.5rem; }

.nee-tagline {
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 14px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #8a7a6a;
    margin: 0 0 0.5rem;
}

.nee-title {
    font-family: Georgia, serif;
    font-size: 32px;
    font-weight: 500;
    margin: 0 0 0.5rem;
    color: #2a2a2a;
}

.nee-intro {
    font-size: 15px;
    color: #5a5a5a;
    margin: 0 auto;
    max-width: 560px;
    line-height: 1.6;
}

/* ── Mode Selector ── */
.nee-mode-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.nee-mode-pill {
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 999px;
    border: 2px solid #8a6a3e;
    background: white;
    color: #8a6a3e;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    letter-spacing: 0.02em;
}

.nee-mode-pill:hover {
    background: #f5f0e6;
}

.nee-mode-pill.nee-mode-active {
    background: #8a6a3e;
    color: white;
}

.nee-mode-desc {
    text-align: center;
    font-size: 13px;
    color: #8a7a6a;
    font-style: italic;
    margin-bottom: 1rem;
    min-height: 20px;
}

/* ── Input card ── */
.nee-input-card {
    background: #faf7f2;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid #ece5d8;
}

#nee-input {
    width: 100%;
    font-family: inherit;
    font-size: 15px;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #d6cdb8;
    resize: vertical;
    min-height: 60px;
    background: white;
    color: #2a2a2a;
}

#nee-input:focus {
    outline: none;
    border-color: #8a6a3e;
}

.nee-buttons { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

#nee-go {
    flex: 1;
    min-width: 140px;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    background: #8a6a3e;
    color: white;
    cursor: pointer;
    font-size: 15px;
    font-family: inherit;
}

#nee-go:hover    { background: #6f5430; }
#nee-go:disabled { opacity: 0.6; cursor: not-allowed; }

#nee-clear {
    min-width: 90px;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid #d6cdb8;
    background: white;
    cursor: pointer;
    font-size: 15px;
    color: #5a5a5a;
    font-family: inherit;
}
#nee-clear:hover { background: #f5f0e6; }

.nee-suggests {
    display: flex;
    gap: 6px;
    margin-top: 14px;
    flex-wrap: wrap;
    align-items: center;
}
.nee-suggests-label { font-size: 13px; color: #8a7a6a; margin-right: 4px; }

.nee-suggest {
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid #d6cdb8;
    background: white;
    cursor: pointer;
    color: #5a5a5a;
    font-family: inherit;
}
.nee-suggest:hover { background: #f5f0e6; }

/* ── Status ── */
#nee-status {
    font-size: 14px;
    color: #5a5a5a;
    text-align: center;
    min-height: 20px;
    margin-bottom: 0.5rem;
}
.nee-error { color: #b04040; }

/* ── Shared card/section atoms ── */
.nee-card {
    background: white;
    border: 1px solid #ece5d8;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.nee-section { margin-bottom: 1.75rem; }

.nee-section > h3 {
    font-family: Georgia, serif;
    font-size: 20px;
    font-weight: 500;
    margin: 0 0 0.4rem;
    color: #2a2a2a;
}

.nee-section-sub {
    font-size: 13px;
    color: #8a7a6a;
    margin: 0 0 1rem;
}

.nee-eyebrow {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8a6a3e;
    margin-bottom: 6px;
    font-weight: 500;
}

.nee-amber-label {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8a6a3e;
    margin-bottom: 6px;
    font-weight: 500;
}

/* Inline muted text */
.nee-muted { font-size: 13px; color: #8a7a6a; font-style: italic; }

/* Subject/word header card */
.nee-word-header h3 {
    font-family: Georgia, serif;
    font-size: 28px;
    font-weight: 500;
    margin: 4px 0 6px;
    color: #2a2a2a;
}

.nee-time-period {
    font-size: 13px;
    color: #8a7a6a;
    font-style: italic;
    margin-bottom: 0.75rem;
}

.nee-orientation {
    font-size: 15px;
    color: #2a2a2a;
    line-height: 1.7;
    margin: 0;
}

/* ── Two-col grid (Type ← → Fulfillment) ── */
.nee-two-col {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: start;
    margin-bottom: 1.25rem;
}
.nee-two-col-arrow {
    font-size: 24px;
    color: #c9a875;
    padding-top: 1.5rem;
    align-self: start;
}
.nee-col-box {
    background: #faf7f2;
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid #ece5d8;
}
.nee-col-ref {
    font-family: Georgia, serif;
    font-size: 15px;
    font-weight: 500;
    color: #2a2a2a;
    margin-bottom: 8px;
}
.nee-col-text { font-size: 14px; color: #5a5a5a; line-height: 1.6; margin: 0; }

/* ── Highlight / Second Temple box ── */
.nee-stc-box {
    background: #f5f0e6;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #e8d9bf;
}
.nee-stc-box p { font-size: 14px; color: #2a2a2a; line-height: 1.65; margin: 0; }

/* ── Left-border callout ── */
.nee-callout {
    background: #fff8ec;
    border-left: 3px solid #c9a875;
    padding: 0.875rem 1rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1rem;
}
.nee-callout p { font-size: 14px; color: #2a2a2a; line-height: 1.65; margin: 0; }

/* ── Item cards (connections, passages, etc.) ── */
.nee-item-card {
    background: white;
    border: 1px solid #ece5d8;
    border-radius: 10px;
    padding: 1rem 1.125rem;
    margin-bottom: 10px;
}
.nee-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.nee-item-title {
    font-family: Georgia, serif;
    font-size: 15px;
    font-weight: 500;
    color: #2a2a2a;
}
.nee-item-refs {
    font-size: 12px;
    color: #8a6a3e;
    font-style: italic;
    white-space: nowrap;
}
.nee-item-text { font-size: 14px; color: #5a5a5a; line-height: 1.6; margin: 0; }

/* ── Not-card (caution) ── */
.nee-not-card {
    background: #fdf8f0;
    border: 1px solid #e8d9bf;
    border-radius: 10px;
    padding: 1rem 1.125rem;
    margin-bottom: 10px;
}
.nee-not-claim {
    font-family: Georgia, serif;
    font-size: 15px;
    font-style: italic;
    color: #8a6a3e;
    margin-bottom: 8px;
    font-weight: 500;
}
.nee-not-why { font-size: 14px; color: #5a5a5a; line-height: 1.6; margin: 0; }

/* ── Explicit tag pills ── */
.nee-explicit-tag {
    display: inline-block;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 999px;
    font-weight: 500;
    margin-bottom: 8px;
}
.nee-explicit-explicit { background: #e8f5e9; color: #2e7d32; }
.nee-explicit-implicit  { background: #fff3e0; color: #e65100; }
.nee-explicit-both      { background: #e3f2fd; color: #1565c0; }

/* ── Passage rows ── */
.nee-passages { display: grid; gap: 0; }
.nee-passage-row {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #ece5d8;
    align-items: baseline;
}
.nee-passage-row:last-child { border-bottom: none; }
.nee-passage-ref {
    font-family: Georgia, serif;
    font-size: 14px;
    font-weight: 500;
    color: #8a6a3e;
    min-width: 160px;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.nee-passage-badge {
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: #faf7f2;
    color: #8a6a3e;
    padding: 2px 6px;
    border-radius: 999px;
    border: 1px solid #e8d9bf;
    font-weight: 500;
}
.nee-passage-note { font-size: 14px; color: #5a5a5a; flex: 1; line-height: 1.6; }

/* ── Study / Reflection questions ── */
.nee-questions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 0.5rem;
}
.nee-questions-col {
    background: #faf7f2;
    border: 1px solid #ece5d8;
    border-radius: 12px;
    padding: 1.25rem;
}
.nee-questions-label {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8a6a3e;
    margin-bottom: 0.75rem;
    font-weight: 500;
}
.nee-questions-list { margin: 0; padding-left: 1.25rem; color: #2a2a2a; }
.nee-questions-list li {
    font-size: 14.5px;
    line-height: 1.65;
    margin-bottom: 0.75rem;
    padding-left: 0.25rem;
}
.nee-questions-list li:last-child { margin-bottom: 0; }

/* ── Arc (italic block quote style) ── */
.nee-arc {
    font-family: Georgia, serif;
    font-size: 17px;
    line-height: 1.75;
    color: #2a2a2a;
    margin: 0;
    padding-left: 1.25rem;
    border-left: 3px solid #c9a875;
    font-style: italic;
}

/* ── Full STC prose block ── */
.nee-stc-full {
    font-family: Georgia, serif;
    font-size: 16px;
    line-height: 1.75;
    color: #2a2a2a;
    padding: 1.25rem;
    background: #faf7f2;
    border-radius: 12px;
    border: 1px solid #ece5d8;
}

/* ── Footer note / Teaching angle ── */
.nee-footer-note {
    background: #faf7f2;
    border: 1px solid #ece5d8;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    font-size: 14px;
    color: #5a5a5a;
    line-height: 1.6;
    margin-bottom: 1rem;
}
.nee-footer-note strong { font-weight: 500; color: #2a2a2a; }

/* ── Print buttons ── */
.nee-actions { display: flex; gap: 8px; margin-top: 1rem; flex-wrap: wrap; }
.nee-btn {
    font-family: inherit;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #8a6a3e;
    background: #8a6a3e;
    color: white;
    cursor: pointer;
    font-weight: 500;
}
.nee-btn:hover { background: #6f5430; border-color: #6f5430; }
.nee-btn-outline { background: white; color: #8a6a3e; }
.nee-btn-outline:hover { background: #f5f0e6; color: #6f5430; }

/* ── BREATHE mode ── */
.nee-breathe-steps { display: grid; gap: 12px; }

.nee-breathe-step {
    background: white;
    border: 1px solid #ece5d8;
    border-radius: 12px;
    overflow: hidden;
}

.nee-breathe-step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    user-select: none;
    background: #faf7f2;
}

.nee-breathe-step-letter {
    font-family: Georgia, serif;
    font-size: 22px;
    font-weight: 500;
    color: #8a6a3e;
    min-width: 28px;
}

.nee-breathe-step-label {
    font-family: Georgia, serif;
    font-size: 16px;
    font-weight: 500;
    color: #2a2a2a;
    flex: 1;
}

.nee-breathe-step-chevron {
    font-size: 14px;
    color: #8a7a6a;
    transition: transform 0.2s;
}

.nee-breathe-step.nee-open .nee-breathe-step-chevron { transform: rotate(180deg); }

.nee-breathe-step-body {
    display: none;
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid #ece5d8;
}

.nee-breathe-step.nee-open .nee-breathe-step-body { display: block; }

.nee-breathe-content { font-size: 15px; color: #2a2a2a; line-height: 1.7; margin-bottom: 1rem; }

.nee-breathe-word-card {
    background: #faf7f2;
    border: 1px solid #ece5d8;
    border-radius: 8px;
    padding: 0.875rem 1rem;
    margin-bottom: 10px;
}
.nee-breathe-word { font-family: Georgia, serif; font-size: 16px; font-weight: 500; color: #8a6a3e; margin-bottom: 4px; }
.nee-breathe-word-lang { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: #8a7a6a; margin-bottom: 8px; }
.nee-breathe-word-note { font-size: 14px; color: #5a5a5a; line-height: 1.6; margin: 0; }

.nee-breathe-prompts { padding-left: 0; list-style: none; margin: 0; }
.nee-breathe-prompts li {
    font-size: 14.5px;
    color: #2a2a2a;
    line-height: 1.65;
    padding: 0.5rem 0 0.5rem 1.25rem;
    border-bottom: 1px solid #ece5d8;
    position: relative;
}
.nee-breathe-prompts li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #c9a875;
    font-weight: 500;
}
.nee-breathe-prompts li:last-child { border-bottom: none; }

.nee-breathe-verse {
    font-family: Georgia, serif;
    font-size: 18px;
    line-height: 1.75;
    color: #2a2a2a;
    font-style: italic;
    padding: 1rem 1.25rem;
    background: #faf7f2;
    border-left: 3px solid #c9a875;
    border-radius: 0 8px 8px 0;
    margin-bottom: 0.5rem;
}

.nee-breathe-verse-ref {
    font-size: 13px;
    color: #8a6a3e;
    font-weight: 500;
}

/* ── Translation comparison table ── */
.nee-translation-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 0.5rem;
}
.nee-translation-table th {
    background: #faf7f2;
    padding: 8px 12px;
    text-align: left;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8a6a3e;
    border-bottom: 2px solid #ece5d8;
    font-weight: 500;
}
.nee-translation-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #ece5d8;
    color: #2a2a2a;
    line-height: 1.55;
    vertical-align: top;
}
.nee-translation-table tr:last-child td { border-bottom: none; }
.nee-translation-table td:first-child { font-weight: 500; white-space: nowrap; color: #8a6a3e; }

/* ── Verse breakdown table ── */
.nee-verse-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 0.5rem;
}
.nee-verse-table th {
    background: #faf7f2;
    padding: 8px 10px;
    text-align: left;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8a6a3e;
    border-bottom: 2px solid #ece5d8;
    font-weight: 500;
}
.nee-verse-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #ece5d8;
    vertical-align: top;
    line-height: 1.5;
    color: #2a2a2a;
}
.nee-verse-table tr:last-child td { border-bottom: none; }
.nee-verse-table .vt-greek { font-family: Georgia, serif; font-size: 15px; font-weight: 500; color: #8a6a3e; }
.nee-verse-table .vt-grammar { font-size: 12px; color: #8a7a6a; font-style: italic; }

/* ── Stage cards (Topical canonical thread) ── */
.nee-stage-grid { display: grid; gap: 10px; }

.nee-stage-card {
    background: white;
    border: 1px solid #ece5d8;
    border-radius: 10px;
    padding: 1rem 1.125rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
}

.nee-stage-num {
    font-family: Georgia, serif;
    font-size: 28px;
    font-weight: 500;
    color: #d6cdb8;
    line-height: 1;
    min-width: 32px;
    text-align: center;
    padding-top: 2px;
}

.nee-stage-era {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8a6a3e;
    font-weight: 500;
    margin-bottom: 2px;
}

.nee-stage-title {
    font-family: Georgia, serif;
    font-size: 15px;
    font-weight: 500;
    color: #2a2a2a;
    margin-bottom: 6px;
}

.nee-stage-content { font-size: 14px; color: #5a5a5a; line-height: 1.6; margin: 0 0 6px; }

.nee-stage-shift {
    font-size: 13px;
    color: #8a6a3e;
    font-style: italic;
    margin: 0;
}

/* ── Word family pills ── */
.nee-word-family { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.nee-word-pill {
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #faf7f2;
    border: 1px solid #e8d9bf;
    color: #2a2a2a;
}

/* ── Hebrew/Greek primary word display ── */
.nee-word-big {
    font-family: Georgia, serif;
    font-size: 36px;
    font-weight: 500;
    color: #2a2a2a;
    margin: 6px 0 4px;
    line-height: 1.2;
}
.nee-word-transliteration {
    font-family: Georgia, serif;
    font-size: 18px;
    font-style: italic;
    color: #8a6a3e;
    margin-bottom: 6px;
}
.nee-word-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.nee-word-meta-badge {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #faf7f2;
    border: 1px solid #e8d9bf;
    color: #5a5a5a;
}
.nee-word-gloss {
    font-size: 16px;
    color: #5a5a5a;
    margin-bottom: 4px;
}

/* ── Disclaimer / TLV credit ── */
.nee-disclaimer {
    max-width: 760px;
    margin: 1.5rem auto 0;
    padding: 1rem 0 0;
    border-top: 1px solid #ece5d8;
}

.nee-disclaimer p {
    font-size: 11px;
    font-style: italic;
    color: #a09080;
    line-height: 1.65;
    margin: 0 0 0.5rem;
}

.nee-disclaimer p:last-child { margin-bottom: 0; }

.nee-tlv-credit {
    font-size: 12px !important;
    font-style: italic;
    color: #a09080 !important;
}

/* ── Map card ── */
.nee-map-card {
    background: #f5f0e6;
    border: 1px solid #e8d9bf;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.nee-map-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.75rem;
}

.nee-map-icon {
    font-size: 20px;
    line-height: 1;
}

.nee-map-card h4 {
    font-family: Georgia, serif;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    color: #2a2a2a;
}

.nee-map-items { display: grid; gap: 8px; }

.nee-map-item {
    background: white;
    border: 1px solid #ece5d8;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.nee-map-item-text { flex: 1; }
.nee-map-item-title { font-size: 14px; font-weight: 500; color: #2a2a2a; margin-bottom: 2px; }
.nee-map-item-desc  { font-size: 13px; color: #8a7a6a; line-height: 1.5; }

.nee-map-link {
    font-size: 13px;
    font-weight: 500;
    color: #8a6a3e;
    text-decoration: none;
    white-space: nowrap;
    padding: 5px 12px;
    border: 1px solid #c9a875;
    border-radius: 6px;
}
.nee-map-link:hover { background: #faf7f2; }

/* ── Sefaria card ── */
.nee-sefaria-card {
    background: #faf7f2;
    border: 1px solid #ece5d8;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.nee-sefaria-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.75rem;
}

.nee-sefaria-logo {
    font-size: 13px;
    font-weight: 700;
    color: #8a6a3e;
    background: #e8d9bf;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.nee-sefaria-card h4 {
    font-family: Georgia, serif;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    color: #2a2a2a;
}

.nee-sefaria-links { display: grid; gap: 6px; }

.nee-commentary-card {
    background: #fbf8f2;
    border-left: 3px solid #8a6a3e;
    border-radius: 0 4px 4px 0;
    padding: 0.7rem 0.9rem;
    margin-bottom: 0.6rem;
}
.nee-commentary-author {
    font-family: Georgia, serif;
    font-size: 15px;
    color: #8a6a3e;
    font-weight: 600;
    margin-bottom: 4px;
}
.nee-commentary-src {
    text-decoration: none;
    font-size: 12px;
    color: #b08d57;
}
.nee-commentary-text {
    font-size: 13px;
    color: #4a4034;
    line-height: 1.6;
    margin: 0;
}

.nee-sefaria-link-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #ece5d8;
    font-size: 13px;
}
.nee-sefaria-link-row:last-child { border-bottom: none; }

.nee-sefaria-link-cat {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a6a3e;
    font-weight: 500;
    white-space: nowrap;
    min-width: 90px;
}
.nee-sefaria-link-ref { color: #2a2a2a; flex: 1; }
.nee-sefaria-link-a   { color: #8a6a3e; text-decoration: none; font-weight: 500; white-space: nowrap; }
.nee-sefaria-link-a:hover { text-decoration: underline; }

.nee-sefaria-main-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 13px;
    font-weight: 500;
    color: #8a6a3e;
    text-decoration: none;
    border: 1px solid #c9a875;
    padding: 5px 14px;
    border-radius: 6px;
}
.nee-sefaria-main-link:hover { background: #f5f0e6; }

/* ── BREATHE read-first card ── */
.nee-breathe-read-first {
    background: #fff8ec;
    border: 1px solid #e8d9bf;
    border-left: 4px solid #8a6a3e;
    border-radius: 0 10px 10px 0;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    font-size: 15px;
    color: #2a2a2a;
    line-height: 1.65;
}

.nee-breathe-read-first strong { color: #8a6a3e; }

/* ── Copyright ── */
.nee-copyright {
    text-align: center;
    font-size: 12px;
    color: #8a7a6a;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #ece5d8;
    letter-spacing: 0.04em;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .nee-two-col { grid-template-columns: 1fr; }
    .nee-two-col-arrow { display: none; }
    .nee-stage-card { grid-template-columns: 1fr; }
    .nee-stage-num { display: none; }
    .nee-passage-ref { min-width: 120px; }
}

@media print {
    /* Hide UI chrome */
    .nee-mode-selector,
    .nee-input-card,
    .nee-mode-desc,
    .nee-actions,
    #nee-status,
    .nee-copy-wrap,
    #nee-history-panel,
    .nee-breathe-step-chevron { display: none !important; }

    /* Full width, no shadows */
    #nee-root,
    .nee-breathe-steps,
    .nee-breathe-step,
    .nee-output { max-width: 100% !important; box-shadow: none !important; border: none !important; }

    /* Force all accordion sections open */
    .nee-breathe-step-body { display: block !important; }

    /* Step header: clean, no hover effects */
    .nee-breathe-step-header {
        background: #f5f0e8 !important;
        border-bottom: 1px solid #d4c4a8 !important;
        cursor: default !important;
        padding: 8px 12px !important;
    }

    /* Keep step letter colored */
    .nee-breathe-step-letter { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

    /* Avoid page breaks inside a step */
    .nee-breathe-step { break-inside: avoid; page-break-inside: avoid; margin-bottom: 16px !important; }

    /* Word cards */
    .nee-breathe-word-card { break-inside: avoid; page-break-inside: avoid; border: 1px solid #d4c4a8 !important; }

    /* Maps / Substack cards — hide, they don't print well */
    .nee-map-card { display: none !important; }

    /* Passage title */
    .nee-breathe-read-first { border: 1px solid #d4c4a8 !important; }

    body { font-size: 12pt; }
}

/* ── Scholarly Perspectives ── */
.nee-perspectives {
    margin-top: 1.25rem;
    border-top: 1px solid #e8ddd0;
    padding-top: 1rem;
}
.nee-perspectives-label {
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9a8570;
    font-family: sans-serif;
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.nee-perspectives-body {
    background: #faf7f2;
    border-left: 3px solid #c8a96e;
    border-radius: 0 4px 4px 0;
    padding: 0.85rem 1rem;
    font-size: 14px;
    color: #3a3028;
    line-height: 1.65;
    margin: 0;
}

/* ── Shabbat Study Header ── */
.nee-shabbat-header { border-top: 4px solid #8a6a3e; }
.nee-shabbat-date {
    font-size: 12px;
    color: #9a8570;
    font-family: sans-serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.nee-shabbat-readings {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 1rem;
}
.nee-shabbat-reading {
    display: flex;
    gap: 10px;
    font-size: 14px;
    align-items: baseline;
}
.nee-shabbat-reading-label {
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8a6a3e;
    font-family: sans-serif;
    font-weight: 700;
    min-width: 65px;
}
.nee-shabbat-theme {
    font-size: 15px;
    font-style: italic;
    color: #5c4a38;
    border-top: 1px solid #e8ddd0;
    padding-top: 0.75rem;
    margin: 0;
    line-height: 1.6;
}

/* ── Torah Calendar Link ── */
.nee-calendar-link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: #faf7f2;
    border: 1px solid #e0d4c0;
    border-radius: 6px;
    font-size: 13px;
    color: #5c4a38;
    flex-wrap: wrap;
}
.nee-calendar-link {
    white-space: nowrap;
    font-size: 12px;
    font-family: sans-serif;
    font-weight: 600;
    color: #8a6a3e;
    text-decoration: none;
    border: 1px solid #c8a96e;
    padding: 4px 12px;
    border-radius: 4px;
    letter-spacing: 0.03em;
    transition: background 0.15s, color 0.15s;
}
.nee-calendar-link:hover {
    background: #8a6a3e;
    color: #fff;
}

/* ── Copy Button ── */
.nee-copy-wrap {
    margin-top: 2rem;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.nee-copy-btn {
    background: none;
    border: 1px solid #c8b89a;
    color: #8B6F47;
    font-size: 12px;
    font-family: inherit;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: background 0.15s, color 0.15s;
}
.nee-copy-btn:hover {
    background: #8B6F47;
    color: #fff;
}

/* ── History Panel ── */
#nee-history-panel {
    max-width: 780px;
    margin: 2rem auto 0;
    border: 1px solid #ece5d8;
    border-radius: 8px;
    overflow: hidden;
    font-family: inherit;
}
.nee-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #f9f5ef;
    border-bottom: 1px solid #ece5d8;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8B6F47;
}
.nee-history-clear {
    background: none;
    border: none;
    font-size: 11px;
    color: #b0967a;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}
.nee-history-clear:hover { color: #8B6F47; text-decoration: underline; }
.nee-history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid #f3ece0;
    cursor: pointer;
    transition: background 0.12s;
}
.nee-history-item:last-child { border-bottom: none; }
.nee-history-item:hover { background: #fdf8f2; }
.nee-history-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
    background: #8B6F47;
    border-radius: 3px;
    padding: 2px 7px;
    white-space: nowrap;
    flex-shrink: 0;
}
.nee-history-input {
    flex: 1;
    font-size: 14px;
    color: #3a2e22;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nee-history-date {
    font-size: 11px;
    color: #b0967a;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ======================================================
   TORAH PORTION READING PLAN
   ====================================================== */
.nee-torah-plan {
    max-width: 960px;
    margin: 0 auto;
    font-family: Georgia, serif;
    color: #3a2e22;
}
.nee-tp-intro {
    text-align: center;
    padding: 2.5rem 1rem 2rem;
    border-bottom: 2px solid #c8b89a;
    margin-bottom: 2rem;
}
.nee-tp-title {
    font-size: 1.75rem;
    font-family: Georgia, serif;
    color: #3a2e22;
    margin: 0 0 0.25rem;
}
.nee-tp-year {
    font-size: 1rem;
    color: #8B6F47;
    letter-spacing: 0.08em;
    margin: 0 0 1rem;
}
.nee-tp-desc {
    font-size: 0.9rem;
    color: #6b5a45;
    line-height: 1.7;
    max-width: 680px;
    margin: 0 auto;
}
.nee-tp-book {
    margin-bottom: 2.5rem;
}
.nee-tp-book-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #8B6F47;
    color: #fff;
    padding: 0.65rem 1.2rem;
    border-radius: 6px 6px 0 0;
}
.nee-tp-special-header { background: #5a7a6b; }
.nee-tp-holiday-header  { background: #6b5a8b; }
.nee-tp-book-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.nee-tp-book-hebrew {
    font-size: 1.2rem;
    font-family: serif;
    opacity: 0.85;
    direction: rtl;
}
.nee-tp-table-wrap {
    overflow-x: auto;
    border: 1px solid #e0d5c5;
    border-top: none;
    border-radius: 0 0 6px 6px;
}
.nee-tp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.nee-tp-table thead tr {
    background: #f5efe4;
}
.nee-tp-table th {
    padding: 0.6rem 0.9rem;
    text-align: left;
    font-size: 0.75rem;
    font-family: sans-serif;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8B6F47;
    border-bottom: 1px solid #e0d5c5;
}
.nee-tp-table td {
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid #f0e8d8;
    vertical-align: top;
    line-height: 1.5;
}
.nee-tp-table tr:last-child td { border-bottom: none; }
.nee-tp-row:hover td { background: #fdf8f2; }
.nee-tp-parashah {
    font-weight: 700;
    color: #3a2e22;
}
.nee-tp-hebrew {
    font-size: 1rem;
    direction: rtl;
    color: #8B6F47;
    margin-top: 2px;
}
.nee-tp-meaning {
    font-size: 0.78rem;
    font-style: italic;
    color: #9a8570;
    font-family: sans-serif;
}
.nee-tp-date {
    font-size: 0.75rem;
    font-family: sans-serif;
    color: #7a8fa0;
    margin-top: 2px;
    font-weight: 500;
}
.nee-tp-special-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-family: sans-serif;
    background: #5a7a6b;
    color: #fff;
    padding: 1px 7px;
    border-radius: 3px;
    margin-top: 4px;
    letter-spacing: 0.04em;
}
.nee-tp-combined td { background: #fdf9f4; }
.nee-tp-parts-row td { background: #f7f2ea; padding: 0.5rem 0.9rem 0.75rem 2rem; }
.nee-tp-parts-label {
    font-size: 0.72rem;
    font-family: sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8B6F47;
    margin-bottom: 0.35rem;
}
.nee-tp-parts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.nee-tp-parts-table td {
    padding: 0.3rem 0.6rem;
    border-bottom: 1px solid #ece4d4;
    color: #5a4a35;
}
.nee-tp-parts-table tr:last-child td { border-bottom: none; }
.nee-tp-part-label { font-style: italic; color: #7a6a55; }
.nee-tp-note-row td { background: #fefaf4; }
.nee-tp-note {
    font-size: 0.78rem;
    font-family: sans-serif;
    font-style: italic;
    color: #7a6a55;
    padding: 0.4rem 0.9rem 0.5rem 0.9rem !important;
}
.nee-tp-section-note {
    font-size: 0.82rem;
    font-style: italic;
    color: #7a6a55;
    margin: 0.5rem 0 0;
    padding: 0 0.2rem;
}
.nee-tp-footer {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e0d5c5;
    font-size: 0.78rem;
    font-family: sans-serif;
    font-style: italic;
    color: #9a8570;
    line-height: 1.65;
    text-align: center;
}
@media (max-width: 600px) {
    .nee-tp-table th, .nee-tp-table td { padding: 0.5rem 0.6rem; font-size: 0.8rem; }
    .nee-tp-title { font-size: 1.35rem; }
}

/* ============================================================
   SHABBAT CANDLE-LIGHTING WIDGET  [nee_candle_times]
   ============================================================ */
.nee-candle-widget {
    max-width: 540px;
    margin: 1.5rem auto;
    padding: 1.5rem 1.6rem;
    background: linear-gradient(180deg, #fbf8f2 0%, #f6efe3 100%);
    border: 1px solid #e6dcc8;
    border-radius: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #3a332a;
    box-shadow: 0 1px 3px rgba(90, 70, 40, 0.06);
}
.nee-candle-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}
.nee-candle-flame { font-size: 1.4rem; line-height: 1; }
.nee-candle-header h3 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.3rem;
    color: #7a5c34;
    font-weight: 600;
}
.nee-candle-intro {
    font-size: 0.9rem;
    line-height: 1.55;
    color: #6a6152;
    margin: 0 0 1rem;
}
.nee-candle-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.nee-candle-zip {
    flex: 1 1 120px;
    min-width: 110px;
    padding: 0.6rem 0.75rem;
    font-size: 0.95rem;
    border: 1px solid #d8ccb4;
    border-radius: 6px;
    background: #fff;
    color: #3a332a;
}
.nee-candle-zip:focus {
    outline: none;
    border-color: #b08d57;
    box-shadow: 0 0 0 2px rgba(176, 141, 87, 0.18);
}
.nee-candle-btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid #b08d57;
    border-radius: 6px;
    background: #8a6a3e;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
}
.nee-candle-btn:hover { background: #75592f; }
.nee-candle-btn:disabled { opacity: 0.55; cursor: default; }
.nee-candle-geo-btn {
    background: transparent;
    color: #8a6a3e;
}
.nee-candle-geo-btn:hover { background: #efe6d5; }
.nee-candle-status {
    min-height: 1.1rem;
    margin-top: 0.7rem;
    font-size: 0.85rem;
    color: #6a6152;
}
.nee-candle-status .nee-error { color: #a5432f; }
.nee-candle-result {
    margin-top: 1rem;
    padding: 1.1rem 1.2rem;
    background: #fff;
    border: 1px solid #ead9bd;
    border-radius: 8px;
}
.nee-candle-location {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #b08d57;
    font-weight: 600;
    margin-bottom: 0.15rem;
}
.nee-candle-parsha {
    font-family: Georgia, serif;
    font-size: 1.05rem;
    color: #5a4a30;
    margin-bottom: 0.8rem;
}
.nee-candle-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.4rem 0.8rem;
    padding: 0.5rem 0;
    border-top: 1px solid #f0e7d6;
}
.nee-candle-row-main .nee-candle-row-time { color: #7a5c34; }
.nee-candle-row-label {
    flex: 1 1 auto;
    font-size: 0.95rem;
    color: #4a4034;
    font-weight: 600;
}
.nee-candle-row-time {
    font-family: Georgia, serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #3a332a;
}
.nee-candle-row-date {
    flex-basis: 100%;
    font-size: 0.8rem;
    color: #8a8172;
}
.nee-candle-credit {
    font-size: 0.75rem;
    line-height: 1.5;
    color: #9a917f;
    margin: 1rem 0 0;
}
.nee-candle-credit a { color: #8a6a3e; }

@media (max-width: 480px) {
    .nee-candle-geo-btn { flex-basis: 100%; }
}

/* ── Torah calendar: "This week" highlight ── */
.nee-tp-row.nee-tp-current > td {
    background: #fff6e2 !important;
    box-shadow: inset 3px 0 0 #c8a96e;
}
.nee-tp-badge {
    display: inline-block;
    background: #8a6a3e;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 999px;
    margin-bottom: 5px;
}

/* ── Torah calendar: special-Shabbat Besorah substitution tag ── */
.nee-tp-besorah-sub {
    display: inline-block;
    margin-top: 4px;
    padding: 1px 7px;
    background: #efe6d5;
    color: #7a5c34;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 999px;
    white-space: nowrap;
}
