/* RebbeDaf shared reading contract. One shell for articles and idea models. */
:root{--rd-ink:#131d26;--rd-paper:#f5f1e8;--rd-gold:#c7a15d;--rd-rule:#c9c1b1}
body.rd-night-study>.rd-header,body.rd-unified-model>.rd-header{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:24px!important;padding:0 clamp(20px,4vw,64px)!important;min-height:72px!important;background:var(--rd-ink)!important;color:#f5f1e8!important;border-bottom:1px solid #34414b!important;font:14px/1.4 var(--util,system-ui)!important}
body.rd-night-study>.rd-header #rd-primary,body.rd-unified-model>.rd-header #rd-primary{margin-left:auto!important;align-items:center;gap:clamp(18px,2vw,32px);justify-content:flex-end}
body.rd-night-study>.rd-header :is(.rd-wordmark,.rd-menu,nav a),body.rd-unified-model>.rd-header :is(.rd-wordmark,.rd-menu,nav a){color:#f5f1e8!important}
body.rd-night-study>.rd-header .rd-mark,body.rd-unified-model>.rd-header .rd-mark{color:var(--rd-gold)!important;border-color:var(--rd-gold)!important}
body.rd-night-study .rd-vision-hero{background:var(--rd-ink)!important}
/* A source row has one circular number and unboxed descriptive text. */
body.rd-night-study .rd-vision-source{border:0!important;border-bottom:1px solid var(--rd-rule)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;padding:16px 2px!important}
body.rd-night-study .rd-vision-source-number{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:32px!important;height:32px!important;min-width:32px!important;aspect-ratio:1;border:1px solid #947344!important;border-radius:50%!important;padding:0!important;background:transparent!important;box-shadow:none!important;line-height:1!important}
body.rd-night-study .rd-vision-source-category{border:0!important;box-shadow:none!important;background:none!important;padding:0!important}
body.rd-night-study #synthesis :is(.rd-citation-pill,.rd-rebuild-cite,.rd-source-citation){display:inline-flex!important;align-items:center!important;justify-content:center!important;width:28px!important;min-width:28px!important;height:28px!important;min-height:28px!important;padding:0!important;border:1px solid #ab8c59!important;border-radius:50%!important;box-shadow:none!important;background:#f5ecdc!important;color:#714628!important;font:600 12px/1 var(--util,system-ui)!important;text-indent:0!important;vertical-align:middle!important;text-decoration:none!important}
/* Notes are a separate action, never the footer of a tracing card. */
body.rd-night-study :is(.rh-right-margin,.rd-trace-margin)>.rd-public-desktop{position:static!important;margin-top:56px!important;padding:20px 0 0!important;border-top:0!important;background:transparent!important;box-shadow:none!important}
body.rd-night-study :is(.rh-margin,.rd-trace-controls){border:0!important;background:transparent!important;box-shadow:none!important;padding:0!important}
.rd-simple-choices{display:flex;flex-direction:column;gap:8px;margin:16px 0}
.rd-simple-choices button,.rd-trace-choices button{font:500 13px/1.5 var(--util,system-ui)!important;text-align:left;border:1px solid #b8ac94!important;border-radius:5px!important;padding:10px 12px!important;background:#f5f1e8!important;color:#263b34!important;white-space:normal}
.rd-simple-choices button[aria-pressed=true],.rd-trace-choices button[aria-pressed=true]{background:#263b34!important;color:#fff8e7!important;border-color:#263b34!important}
.rh-intro>.rh-eyebrow{font:600 17px/1.4 var(--util,system-ui)!important;letter-spacing:0!important;text-transform:none!important;color:#263b34!important}
.rh-intro>p{font:13px/1.6 var(--util,system-ui)!important}.rh-launch{display:none!important}.rh-controls[hidden]{display:none!important}
.rh-controls{margin-top:20px}.rh-controls>select[hidden]{display:none!important}.rh-status{font:600 12px/1.5 var(--util,system-ui)!important;margin:14px 0!important}.rh-nav{display:flex;gap:8px;justify-content:space-between}.rh-nav button{min-height:44px;font:12px/1.4 var(--util,system-ui)!important;padding:8px!important}
.rh-stage-details{margin:18px 0;font:13px/1.6 var(--util,system-ui)}.rh-stage-details summary{cursor:pointer}.rh-stage-details .rh-stage-card{display:none!important}.rh-stage-details .rh-stage-card.is-current{display:block!important;border:0!important;padding:12px 0!important}.rh-focus-hint{font-size:11px!important}.rh-exit{font:12px/1.4 var(--util,system-ui)!important}
/* Model shell: exact article hero above a shared reading/diagram workspace. */
body.rd-unified-model{margin:0;background:var(--rd-paper);color:#1c2428;font:18px/1.65 var(--display,Georgia)}
.rd-unified-model *{box-sizing:border-box}.rd-unified-model .rd-model-shell{max-width:none;margin:0;padding:0}
.rd-unified-model .rd-vision-hero{display:grid;grid-template-columns:100px minmax(0,1.15fr) minmax(0,1fr);gap:40px;align-items:start;padding:56px max(24px,calc((100vw - 1320px)/2));color:#f5f1e8;margin:0;width:100%}
.rd-unified-model .rd-vision-story h1{font:400 clamp(32px,3.5vw,56px)/1.08 var(--display,Georgia);margin:0 0 22px;color:#f5f1e8}.rd-unified-model .rd-vision-deck{font:17px/1.7 var(--display,Georgia);color:#d2d5d4;margin:0 0 24px}.rd-unified-model .rd-vision-identity{color:var(--rd-gold);display:flex;flex-direction:column;gap:8px}.rd-unified-model .rd-vision-identity strong{font:14px var(--util,system-ui);text-transform:uppercase}.rd-unified-model .rd-vision-identity b{font:50px/1.1 var(--display,Georgia)}
.rd-unified-model .rd-vision-evidence .cited{margin:0;padding:28px;border:1px solid #435056;background:#1c2933;color:#f5f1e8;box-shadow:none}.rd-unified-model .cited .lbl{display:block;font:11px var(--util,system-ui);text-transform:uppercase;letter-spacing:.1em;color:#d1b77f;margin-bottom:18px}.rd-unified-model .cited .he{font:26px/1.8 var(--hebrew,Georgia);direction:rtl;text-align:right}.rd-unified-model .cited .en{font:19px/1.6 var(--display,Georgia);margin-top:16px}.rd-unified-model .cited :is(.note,.attrib,.rd-audio-status){font:12px/1.6 var(--util,system-ui)!important;color:#c2c8c8!important}.rd-unified-model .player{margin-top:20px}.rd-unified-model audio{max-width:100%}
.rd-unified-model .rd-hero-actions{display:flex;flex-wrap:wrap;gap:12px}.rd-unified-model .rd-hero-actions :is(a,button){display:inline-flex;align-items:center;justify-content:center;padding:12px 18px;min-height:44px;border:1px solid #bda26b;background:transparent;color:#f5f1e8;font:600 13px var(--util,system-ui);text-decoration:none;border-radius:3px;cursor:pointer}.rd-unified-model .rd-hero-actions button{background:#d4b477;color:#14212b}
.rd-model-returnbar{position:sticky;top:72px;z-index:50;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px clamp(20px,4vw,64px);background:var(--rd-paper);border-bottom:1px solid var(--rd-rule);font:13px/1.5 var(--util,system-ui)}.rd-model-returnbar a{color:#35463e;font-weight:600;text-underline-offset:4px}.rd-model-returnbar span{color:#62695d}
.rd-model-workspace{max-width:1440px;padding:42px 32px 80px;margin:auto;scroll-margin-top:140px}.rd-model-workspace>h2{font:400 36px/1.2 var(--display,Georgia);margin:0 0 10px}.rd-model-intro{font:16px/1.6 var(--display,Georgia);max-width:850px}.rd-model-paths{display:flex;flex-wrap:wrap;gap:8px;margin:25px 0}
.rd-model-paths button,.rd-step-controls button,.rd-model-reading button,.rd-view-toggle{min-height:44px;border:1px solid #a89673;border-radius:4px;background:#f5f1e8;color:#263b34;padding:10px 13px;cursor:pointer;font:13px/1.4 var(--util,system-ui)}.rd-model-paths button[aria-pressed=true]{background:#263b34;color:#fff8e7}.rd-step-controls button:disabled{opacity:.4;cursor:default}
.rd-model-layout{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(340px,1fr);gap:32px;align-items:start}.rd-model-graph{min-width:0;position:sticky;top:146px}.rd-model-graph svg{display:block;width:100%;height:auto;overflow:visible;margin-top:16px}.rd-model-caption{font:12px/1.6 var(--util,system-ui);color:#676e64}.rd-model-reading{padding:24px;background:#fffaf1;border:1px solid #c7b89b;border-radius:5px;position:sticky;top:146px;max-height:calc(100dvh - 166px);overflow:auto;scroll-margin-top:142px;min-width:0}.rd-model-reading h3{font:400 26px/1.25 var(--display,Georgia);margin:16px 0}.rd-model-reading h4{font:600 13px/1.5 var(--util,system-ui);margin:22px 0 10px}.rd-model-reading blockquote{margin:14px 0;padding-left:18px;border-left:2px solid var(--rd-gold);font:18px/1.75 var(--display,Georgia)}.rd-model-reading p{font:16px/1.7 var(--display,Georgia)}.rd-model-reading details{font:14px/1.6 var(--util,system-ui);margin-top:24px}.rd-model-reading summary{cursor:pointer}.rd-model-reading .he{direction:rtl;text-align:right;font:22px/1.9 var(--hebrew,Georgia)}.rd-model-reading .en{font:17px/1.7 var(--display,Georgia)}.rd-model-source{border-top:1px solid var(--rd-rule);padding-top:10px;margin-top:20px}.rd-model-source .row{display:block!important}.rd-model-source .he p,.rd-model-source .en p{font:inherit}
.rd-model-reading .rd-eyebrow{font:600 11px/1.5 var(--util,system-ui);letter-spacing:.07em;text-transform:uppercase;color:#76654a}.rd-step-controls{display:flex;align-items:center;justify-content:space-between;gap:8px;position:sticky;top:-24px;background:#fffaf1;padding:10px 0;z-index:2;font:12px var(--util,system-ui)}
.rd-model-stage{fill:#e5ddcc;stroke:#c1b394}.rd-model-stage.daf{fill:#e5dfcf}.rd-model-stage.avodah{fill:#dde4d7}.rd-model-stage-title{fill:#48564e;font:600 13px system-ui}.rd-model-gap{fill:#6c756a;font:italic 12px system-ui}.rd-model-edge{fill:none;stroke:#aa9060;stroke-width:2;stroke-dasharray:4 5}.rd-model-edge.is-active{stroke:#895e24;stroke-width:4}.rd-model-edge-hit{fill:none;stroke:transparent;stroke-width:18;cursor:pointer}.rd-model-node{cursor:pointer}.rd-model-node rect{fill:#fcf8ee;stroke:#aa987b;stroke-width:1.3}.rd-model-node text{fill:#31483b;font:12px system-ui}.rd-model-node .rd-model-number{font:600 10px system-ui;fill:#94703f}.rd-model-node.is-active rect{fill:#263b34;stroke:#c7a15d;stroke-width:3}.rd-model-node.is-active text{fill:#fff8e7}.rd-model-node:focus-visible{outline:2px solid #8e4a29;outline-offset:4px}
.rd-unified-model .rd-source-dialog{z-index:250}.rd-unified-model .rd-source-dialog-bar{display:flex;justify-content:space-between;align-items:center;background:#172631;color:#fff;padding:16px 22px;gap:18px}.rd-unified-model .rd-source-dialog-close{color:#fff;background:transparent;border:1px solid #bda26b;padding:10px;cursor:pointer;min-height:44px}.rd-unified-model .rd-source-dialog-body{max-height:calc(90dvh - 150px);overflow:auto}.rd-unified-model .rd-source-dialog-body .row{display:block!important}.rd-unified-model .rd-source-dialog .he{direction:rtl;text-align:right}
@media(max-width:900px){.rd-unified-model .rd-vision-hero{grid-template-columns:70px minmax(0,1fr);gap:24px;padding:36px 24px}.rd-unified-model .rd-vision-evidence{grid-column:2}.rd-model-layout{grid-template-columns:1fr}.rd-model-graph,.rd-model-reading{position:static;max-height:none}.rd-model-reading{overflow:visible}.rd-step-controls{position:static}.rd-model-graph{max-width:780px}.rd-model-workspace{padding:30px 20px 80px}}
@media(min-width:761px){body.rd-night-study>.rd-header #rd-primary,body.rd-unified-model>.rd-header #rd-primary{display:flex!important}body.rd-unified-model>.rd-header .rd-menu{display:none}}
@media(max-width:760px){body.rd-night-study>.rd-header,body.rd-unified-model>.rd-header{min-height:64px!important;gap:12px!important;padding:0 18px!important}.rd-unified-model>.rd-header .rd-menu{display:block;margin-left:auto}.rd-unified-model>.rd-header #rd-primary{display:none;position:absolute;top:64px;left:0;right:0;padding:20px;background:var(--rd-ink);flex-wrap:wrap}.rd-unified-model>.rd-header #rd-primary.is-open{display:flex!important}.rd-model-returnbar{top:64px;align-items:flex-start;flex-direction:column;gap:4px}.rd-model-returnbar span{font-size:11px}.rd-unified-model .rd-vision-hero{grid-template-columns:1fr;gap:26px}.rd-unified-model .rd-vision-identity{flex-direction:row;align-items:baseline;gap:12px}.rd-unified-model .rd-vision-identity b{font-size:30px}.rd-unified-model .rd-vision-evidence{grid-column:1}.rd-unified-model .rd-vision-story h1{font-size:38px}.rd-model-workspace>h2{font-size:30px}.rd-model-paths{flex-direction:column}.rd-model-paths button{text-align:left}.rd-model-reading{padding:18px}.rd-model-graph svg{min-height:0}.rd-unified-model .rd-vision-hero .cited{padding:22px}}
@media(prefers-reduced-motion:reduce){.rd-unified-model *{scroll-behavior:auto!important;transition:none!important}}
@media print{.rd-model-returnbar,.rd-model-paths,.rd-step-controls,.rd-view-toggle{display:none!important}.rd-model-layout{display:block}.rd-model-reading{max-height:none;overflow:visible;position:static}}

.rd-unified-model .rd139-phrase{display:block;border:0;border-bottom:1px solid #435056;padding:12px 0;background:transparent;color:#f5f1e8;text-align:right}.rd-unified-model .rd139-phrase span{display:block;font:22px/1.8 var(--hebrew,Georgia)}.rd-unified-model .rd139-phrase small{display:block;font:13px/1.6 var(--util,system-ui);color:#cbd0cc;text-align:left}.rd-unified-model .rd139-phrase:last-child{border-bottom:0}

body.rd-night-study .rd-vision-source>strong{border:0!important;background:transparent!important;box-shadow:none!important}
