/* The study page opens on the Guemara. Site navigation stays one line. */
#tq-shell.reader-shell{display:flex;align-items:center;justify-content:space-between;gap:10px;max-width:1000px;margin:0 auto;padding:4px 12px;min-height:48px;border-bottom:1px solid #ded8c8;background:transparent;position:static}
.reader-shell .reader-back{display:inline-flex;align-items:center;min-height:40px;color:#244a77;font-size:14px;text-decoration:none;font-weight:650;white-space:nowrap}
.reader-shell .reader-brand{font-size:11px;letter-spacing:.08em;color:#6d725f;white-space:nowrap}
#tq-shell.reader-shell .tq-language{display:flex;gap:2px;flex-shrink:0;margin:0;padding:0;border:0;background:transparent}
#tq-shell.reader-shell .tq-language button{min-height:40px;min-width:36px;padding:5px;border:0;border-radius:6px;font-size:12px;background:transparent;color:#52637a}
#tq-shell.reader-shell .tq-language button[aria-pressed=true]{background:#eaf0f8;color:#173d70;font-weight:700}
.study-main.reader-main{width:calc(100% - 24px);padding-top:8px!important}
.reader-context{display:flex;align-items:center;justify-content:space-between;gap:8px;position:relative;min-height:52px}
.reader-context .reader-heading{min-width:0;margin:0}
.reader-context .reader-heading h1{font-size:20px;line-height:1.2;margin:0;color:#112d56}
.reader-context .reader-heading p{font-size:12px;line-height:1.5;margin:3px 0 0;color:#55708e}
.reader-context .change-page{margin:0;flex-shrink:0;font-size:12px}
.reader-context .change-page>summary{display:flex;align-items:center;gap:5px;min-height:44px;padding:8px;color:#254c7b;border:1px solid #d1dced;border-radius:8px;background:#fff;cursor:pointer;list-style:none}
.reader-context .change-page>summary::-webkit-details-marker{display:none}
.reader-context .change-page>summary::after{content:'⌄';font-size:16px}
.reader-context .change-page[open]>summary::after{content:'⌃'}
.passage-menu-content{position:absolute;top:calc(100% + 4px);inset-inline:0;z-index:10;padding:16px;background:#fff;border:1px solid #bdcee7;border-radius:12px;box-shadow:0 12px 30px #162c5826;max-height:70dvh;overflow:auto}
.passage-menu-content .text-chooser{display:grid;grid-template-columns:1fr;gap:10px;margin:0}
.passage-menu-content .text-chooser label{min-width:0}
.passage-menu-content .text-chooser select{width:100%;min-width:0;min-height:44px}
.passage-menu-content .unit-position{margin:12px 0;padding:12px;border-radius:10px}
.passage-menu-content .unit-position .unit-control select{font-size:15px}
.passage-menu-content .back-link{display:inline-flex;align-items:center;min-height:44px;margin:0;font-size:14px}
.reader-main .reader-actions{display:flex;gap:6px;margin:8px 0 10px}
.reader-main .reader-actions button{flex:1;justify-content:center;font-size:14px;min-height:42px;padding:6px 10px;border-radius:8px}
.reader-main #text-passages{margin-top:0}
.reader-main #reading-status{margin:8px 0}
.reader-main .column-headings>span{padding:6px 10px}
.reader-main .column-headings{font-size:11px;line-height:1.4}
.reader-main .passage-source{padding:4px 10px}
.reader-main>.unit-turns{position:static;box-shadow:none;margin:18px 0}
.reader-main .reading-settings,.reader-main .reading-extras{margin:8px 0}
.reader-shell a:focus-visible,.reader-shell button:focus-visible,.reader-context summary:focus-visible{outline:3px solid #315f9b;outline-offset:2px}
@media(max-width:360px){.reader-shell .reader-brand{display:none}.reader-context .reader-heading h1{font-size:18px}.reader-context .change-page>summary{padding:7px 6px;font-size:11px}}
@media(min-width:750px){#tq-shell.reader-shell{padding-inline:0}.reader-context .reader-heading{display:flex;align-items:baseline;gap:12px}.reader-context .reader-heading p{margin:0}.reader-main .reader-actions button{flex:0 1 150px}}

/* Always-visible location controls keep the text within the first screen. */
.reader-main .passage-choices{display:grid;grid-template-columns:96px 96px minmax(0,1fr);gap:8px;margin:4px 0 8px}
.passage-choices label{display:grid;gap:3px;min-width:0;margin:0;font-size:12px;font-weight:650;color:#365579}
.passage-choices select{display:block;box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:44px;margin:0;padding:8px 6px;border:1px solid #bdcee7;border-radius:8px;background:#fff;color:#173d70;font:inherit;font-size:16px;text-overflow:ellipsis}
.passage-choices select:focus-visible{outline:3px solid #315f9b;outline-offset:2px}
.passage-choices select:disabled{opacity:.55}
.passage-choices #daf-number-choice,.passage-choices #daf-choice{font-size:14px}
@media(min-width:750px){.reader-main .passage-choices{grid-template-columns:112px 112px minmax(180px,420px)}}

.reader-main .reader-actions button[hidden],.reader-main .secondary-actions button[hidden]{display:none!important}
.reader-main .reader-actions button{min-width:0;padding-inline:8px}
@media(max-width:360px){.reader-main .reader-actions{gap:4px}.reader-main .reader-actions button{font-size:13px;padding-inline:6px}}

.reader-main .passage-choices{grid-template-columns:100px 94px minmax(0,1fr)}
.passage-choices label{grid-template-rows:1fr 44px}
@media(min-width:750px){.reader-main .passage-choices{grid-template-columns:110px 110px minmax(180px,420px)}}

@media(max-width:360px){.reader-main .passage-choices{grid-template-columns:88px 80px minmax(0,1fr)}.passage-choices #unit-choice{font-size:14px}}

/* Keep sequential navigation visible above the activities and below the lesson. */
.reader-main>.unit-turns{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:8px;direction:ltr}
.reader-main>.unit-turns-top{position:sticky;top:6px;z-index:12;margin:6px 0 8px;padding:6px 8px;background:#f3f6fc;border:1px solid #d1dced;border-radius:10px}
.reader-main>.unit-turns button{min-width:0;min-height:44px;font-size:14px;padding:8px;line-height:1.4}
.reader-main>.unit-turns span{font-size:12px;text-align:center;white-space:normal}
.reader-main>.unit-turns button:focus-visible{outline:3px solid #315f9b;outline-offset:2px}
.reader-main>.unit-turns button:disabled{opacity:.4;cursor:default}
html[dir=rtl] .reader-main>.unit-turns{direction:rtl}
@media(max-width:480px){.reader-main>.unit-turns{grid-template-columns:1fr 1fr}.reader-main>.unit-turns>span{display:none}.reader-main>.unit-turns button{font-size:13px}}

.reader-main #text-view,.reader-main #practice-view,.reader-main #images-view,.reader-main #comics-view{scroll-margin-top:80px}
