/* Gemara Clarity v5 — one stylesheet (replaces styles.css + redesign*.css). Base mechanics first, then the v5 design. */
@font-face{font-family:'Noto Rashi Hebrew';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/noto-rashi-hebrew-normal-400-hebrew.woff2) format('woff2');unicode-range:U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;}
@font-face{font-family:'Noto Rashi Hebrew';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/noto-rashi-hebrew-normal-600-hebrew.woff2) format('woff2');unicode-range:U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;}
@font-face{font-family:'Spectral';font-style:italic;font-weight:400;font-display:swap;src:url(fonts/spectral-italic-400-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'Spectral';font-style:italic;font-weight:400;font-display:swap;src:url(fonts/spectral-italic-400-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Spectral';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/spectral-normal-400-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'Spectral';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/spectral-normal-400-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Spectral';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/spectral-normal-600-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'Spectral';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/spectral-normal-600-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Frank Ruhl Libre';font-style:normal;font-weight:300 900;font-display:swap;src:url(fonts/frank-ruhl-hebrew.woff2) format('woff2');unicode-range:U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;}
*,*::before,*::after{box-sizing:border-box}
:root{
  --scale:1;
  --he-size:calc(22px * var(--scale));
  --en-size:calc(17px * var(--scale));
  --radius:3px;
  --max:880px;
  --top-h:48px;
  --he-font:'Frank Ruhl Libre','SBL Hebrew','Taamey Frank CLM','Times New Roman',serif;
  --ui-font:'Spectral',Georgia,'Frank Ruhl Libre',serif;--sc-font:'Spectral SC','Spectral',Georgia,serif;--rashi-font:'Noto Rashi Hebrew','Frank Ruhl Libre',serif;
}
body.theme-dark{
  color-scheme:dark;
  --binding:#14100c;--binding-hi:#211a13;--gold:#c9a24e;--gold-ink:#c9a24e;--on-binding:#ece3d2;--desk:#14100c;
  --bg:#1c1813;--panel:#1c1813;--panel-2:#241f18;--raise:#221d17;--ink:#ece3d2;--rule:#352d24;
  --border:#352d24;--border-2:#2c251e;
  --text:#ddd3c1;--muted:#a89e8c;--faint:#a89e8c;--accent:#ece3d2;--accent-ink:#1c1813;
  --mimra:#4da9f2;--kashya:#f65058;--terutz:#63f6af;--raaya:#a274fa;--dechiya:#e9a470;--sheelah:#e3d440;--teshuvah:#64e9f7;--maskana:#e79ec5;--mishnah:#8a9f72;
  --tint:.12;--warn-bg:rgba(201,162,78,.12);--warn:#c9a24e;--good:#63f6af;--bad:#f65058;
}
body.theme-light{
  color-scheme:light;
  --binding:#2a1d15;--binding-hi:#3a291e;--gold:#b08a3e;--gold-ink:#85662a;--on-binding:#f3ece0;--desk:#e9e5dc;
  --bg:#fbf9f4;--panel:#fbf9f4;--panel-2:#f3efe6;--raise:#fbf9f4;--ink:#1a1612;--rule:#e3ddd0;
  --border:#e3ddd0;--border-2:#ebe6db;
  --text:#2a241d;--muted:#6b6358;--faint:#6b6358;--accent:#1a1612;--accent-ink:#fbf9f4;
  --mimra:#0959c6;--kashya:#831228;--terutz:#147b41;--raaya:#3d058b;--dechiya:#bc450d;--sheelah:#856810;--teshuvah:#14707e;--maskana:#ba0ea5;--mishnah:#2d3609;
  --tint:.08;--warn-bg:#f6efdc;--warn:#7a4a0c;--good:#147b41;--bad:#831228;
}
body.theme-sepia{
  color-scheme:light;
  --binding:#33241a;--binding-hi:#43301f;--gold:#b08a3e;--gold-ink:#7d5f24;--on-binding:#f3ece0;--desk:#e6dcc4;
  --bg:#f4ead3;--panel:#f4ead3;--panel-2:#ecdfc2;--raise:#f7efdc;--ink:#20180f;--rule:#dccdaa;
  --border:#dccdaa;--border-2:#e4d7b8;
  --text:#2b2216;--muted:#5e4f39;--faint:#6b5b42;--accent:#20180f;--accent-ink:#f4ead3;
  --mimra:#0959c6;--kashya:#760f23;--terutz:#13753e;--raaya:#3d058b;--dechiya:#b1410c;--sheelah:#7d620e;--teshuvah:#14707e;--maskana:#b60da1;--mishnah:#2d3609;
  --tint:.09;--warn-bg:#efe0b8;--warn:#7c4a03;--good:#13753e;--bad:#760f23;
}
html{-webkit-text-size-adjust:100%;scroll-padding-top:calc(var(--top-h) + 12px)}
body{margin:0;background:var(--bg);color:var(--text);font-family:var(--ui-font);font-size:16px;line-height:1.55;min-height:100vh;padding-bottom:calc(84px + env(safe-area-inset-bottom))}
button,input,select{font:inherit;color:inherit}
button{cursor:pointer}
a{color:var(--accent)}
:focus-visible{outline:3px solid var(--accent);outline-offset:2px;border-radius:3px}
.skip{position:absolute;left:-9999px}.skip:focus{left:8px;top:8px;z-index:99;background:var(--panel);padding:8px 12px}
[hidden]{display:none!important}
.he{font-family:var(--he-font);direction:rtl;text-align:right;unicode-bidi:plaintext}
.en-he{font-family:var(--he-font)}

/* top bar */
.topbar{position:sticky;top:0;z-index:30;height:calc(var(--top-h) + env(safe-area-inset-top));padding:env(safe-area-inset-top) 12px 0;display:flex;align-items:center;gap:8px;background:color-mix(in srgb,var(--bg) 88%,transparent);border-bottom:1px solid var(--border-2)}
.brand{display:flex;align-items:center;gap:9px;background:none;border:0;padding:6px 4px;font-weight:800;letter-spacing:-.01em;font-size:17px}
.brand-mark{display:grid;grid-template-columns:1fr;gap:2.5px;width:20px}
.brand-mark i{display:block;height:3.5px;border-radius:3px}
.brand-mark i:nth-child(1){background:var(--mimra);width:100%}.brand-mark i:nth-child(2){background:var(--kashya);width:70%}
.brand-mark i:nth-child(3){background:var(--terutz);width:85%}.brand-mark i:nth-child(4){background:var(--maskana);width:55%}
.refbtn{margin-left:auto;display:flex;align-items:center;gap:6px;min-height:40px;padding:6px 12px 6px 14px;border-radius:3px;border:1px solid var(--border);background:var(--panel);font-weight:700;font-size:15px;max-width:52vw}
.refbtn span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.refbtn svg,.bb-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;flex:none}
.top-actions{display:flex;gap:6px}
.iconbtn{min-width:40px;height:40px;border-radius:3px;border:1px solid var(--border);background:var(--panel);display:inline-flex;align-items:center;justify-content:center;font-weight:700}
.aa{font-family:Georgia,serif;font-size:16px}
.progress{position:absolute;left:0;right:0;bottom:-1px;height:3px}
.progress div{height:100%;width:0;background:linear-gradient(90deg,var(--mimra),var(--terutz),var(--maskana));transition:width .15s}

/* layout */
.layout{max-width:1240px;margin:0 auto;display:block;padding:0 14px}
.sidebar,.side-wrap,.side-show{display:none}
main{max-width:var(--max);margin:0 auto;padding:14px 0 30px;outline:none}
@media (min-width:1100px){
  .layout.with-side{display:grid;grid-template-columns:var(--side-w,300px) minmax(0,1fr);gap:28px;max-width:max(1240px,calc(var(--side-w,300px) + var(--max) + 56px))}
  .layout.with-side .side-wrap{display:block;position:sticky;top:calc(var(--top-h) + 14px);align-self:start}
  .layout.with-side .sidebar{display:block;max-height:calc(100vh - var(--top-h) - var(--bb-space,110px) - 44px);overflow:auto;padding:0 4px 14px 0;margin-top:44px}
  .layout.with-side main{margin:0}
  body.side-collapsed .layout.with-side{grid-template-columns:minmax(0,1fr);max-width:1240px}
  body.side-collapsed .layout.with-side .side-wrap{display:none}
  body.side-collapsed .layout.with-side main{margin:0 auto}
  body.side-collapsed .layout.with-side .side-show{display:flex}
  body.side-collapsed .layout.with-side ~ .bottombar #flowBtn{display:flex}
  .flowbtn-mobile{display:none!important}
}
.card{background:var(--panel);border:1px solid var(--border);border-radius:var(--radius)}

/* home */
.hero{text-align:center;padding:6px 8px 20px}
.hero h1{font-size:clamp(30px,7vw,44px);line-height:1.1;margin:8px 0 8px;letter-spacing:-.02em}
.hero p{margin:0 auto;max-width:520px;color:var(--muted);font-size:17px}
.searchbox{display:flex;align-items:center;gap:10px;width:100%;max-width:560px;margin:18px auto 0;padding:14px 16px;border-radius:3px;border:1px solid var(--border);background:var(--panel);color:var(--muted);font-size:16px;text-align:left}
.searchbox svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2}
.home-grid{display:grid;gap:14px;margin-top:8px}
@media (min-width:720px){.home-grid.two{grid-template-columns:1fr 1fr}}
.tile{display:block;width:100%;text-align:left;padding:16px 18px;border-radius:var(--radius);border:1px solid var(--border);background:var(--panel);text-decoration:none;color:inherit}
.tile .k{font-size:12px;text-transform:uppercase;letter-spacing:.1em;font-weight:800;color:var(--muted)}
.tile .v{font-size:22px;font-weight:800;margin-top:2px}
.tile .s{color:var(--muted);font-size:14px;margin-top:2px}
.tile.accent{border-color:color-mix(in srgb,var(--accent) 40%,var(--border));background:color-mix(in srgb,var(--accent) 8%,var(--panel))}
.section-h{font-size:13px;text-transform:uppercase;letter-spacing:.12em;font-weight:800;color:var(--muted);margin:28px 4px 10px;display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.section-h small{text-transform:none;letter-spacing:0;font-weight:500}
.lib{display:grid;gap:10px}
.lib-row{padding:12px 14px}
.lib-row h3{margin:0 0 8px;font-size:16px;display:flex;justify-content:space-between;gap:8px}
.lib-row h3 .he{font-weight:500;color:var(--muted);font-size:18px}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chip{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:6px 12px;border-radius:3px;border:1px solid var(--border);background:var(--panel-2);font-weight:650;font-size:14px;text-decoration:none;color:inherit}
.chip.on{border-color:var(--accent);color:var(--accent)}
.chip .x{opacity:.6;font-weight:400}
.legend{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:8px}
.lg{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border-radius:3px;background:var(--panel);border:1px solid var(--border)}
.lg b{display:block}
.lg .d{color:var(--muted);font-size:14px;line-height:1.4}
.swatch{width:12px;height:12px;border-radius:4px;margin-top:6px;flex:none;background:var(--c)}
.empty{color:var(--muted);font-size:15px;padding:4px}

/* step colour classes */
.t-mimra{--c:var(--mimra)}.t-kashya{--c:var(--kashya)}.t-terutz{--c:var(--terutz)}.t-raaya{--c:var(--raaya)}
.t-dechiya{--c:var(--dechiya)}.t-sheelah{--c:var(--sheelah)}.t-teshuvah{--c:var(--teshuvah)}.t-maskana{--c:var(--maskana)}
body.no-colors .step,body.no-colors .fnode,body.no-colors .strip span,body.no-colors .typecount{--c:var(--faint)!important}

/* daf header */
.dafhead{padding:18px 18px 16px;margin-top:4px}
.dafhead .refline{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:wrap}
.dafhead h1{margin:0;font-size:26px;letter-spacing:-.01em}
.dafhead .he{font-size:22px;color:var(--muted)}
.topic{font-size:calc(19px * var(--scale));font-weight:700;margin:10px 0 6px;line-height:1.4}
.overview{color:var(--muted);margin:0;font-size:calc(16px * var(--scale))}
.typecounts{display:flex;flex-wrap:wrap;gap:6px;margin-top:14px}
.typecount{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:700;padding:4px 10px;border-radius:3px;background:color-mix(in srgb,var(--c) calc(var(--tint)*100%),transparent);color:var(--c);border:1px solid color-mix(in srgb,var(--c) 35%,transparent)}
.headactions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:42px;padding:8px 14px;border-radius:3px;border:1px solid var(--border);background:var(--panel-2);font-weight:700;font-size:14.5px;text-decoration:none;color:inherit}
.btn.primary{background:var(--accent);color:var(--accent-ink);border-color:transparent}
.btn.on{color:var(--accent);border-color:var(--accent)}
.btn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.tabs{display:flex;gap:4px;padding:4px;border-radius:3px;background:var(--panel-2);border:1px solid var(--border);margin:14px 0 6px}
.tabs button{flex:1;min-height:40px;border:0;border-radius:3px;background:none;font-weight:700;color:var(--muted)}
.tabs button[aria-selected=true]{background:var(--panel);color:var(--text);box-shadow:none}
.note-ai{font-size:13px;color:var(--faint);margin:10px 2px 0}
.notice{padding:14px 16px;border-radius:3px;background:var(--warn-bg);border:1px solid color-mix(in srgb,var(--warn) 30%,transparent);margin:12px 0}
.notice b{color:var(--warn)}
.notice p{margin:4px 0 0;color:var(--muted)}
.notice .btn{margin-top:10px}

/* strip (navigator) */
.strip{display:flex;gap:2px;height:12px;margin:14px 0 4px;border-radius:6px;overflow:hidden}
.strip span{flex:1;background:var(--c);opacity:.55;cursor:pointer;border:0;padding:0}
.strip span.cur{opacity:1}
.strip-cap{display:flex;justify-content:space-between;font-size:12px;color:var(--faint)}

/* flow map */
.flow{display:flex;flex-direction:column;gap:2px}
.flow h2{font-size:13px;text-transform:uppercase;letter-spacing:.12em;color:var(--muted);margin:0 0 8px 6px}
.sidebar .flow h2{padding-right:40px;min-height:22px}
.phase{font-size:12.5px;text-transform:uppercase;letter-spacing:.1em;font-weight:800;color:var(--faint);margin:12px 0 4px 6px}
.phase:first-of-type{margin-top:0}
.fnode{display:grid;grid-template-columns:28px 1fr;gap:9px;align-items:start;padding:7px 8px;border-radius:3px;text-decoration:none;color:var(--text);margin-left:calc(var(--d,0) * 16px);border-left:2px solid transparent}
.fnode:hover{background:var(--panel)}
.fnode.cur{background:color-mix(in srgb,var(--c) calc(var(--tint)*100%),var(--panel));border-left-color:var(--c)}
.fnode .dot{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;font-size:12px;font-weight:800;background:var(--c);color:#06101c}
.fnode .ft{font-size:14px;line-height:1.35}
.fnode .fty{display:block;font-size:12px;font-weight:700;color:var(--c)}
.fnode .fty .he{display:inline;font-size:13px}

/* steps */
.steps{display:flex;flex-direction:column;gap:14px;margin-top:14px}
.step{background:var(--panel);border:1px solid var(--border);border-left:5px solid var(--c);border-radius:var(--radius);overflow:hidden;scroll-margin-top:calc(var(--top-h) + 14px)}
.step.cur{box-shadow:0 0 0 1px color-mix(in srgb,var(--c) 45%,transparent)}
.sh{display:flex;align-items:center;gap:10px;width:100%;border:0;text-align:left;padding:12px 16px;background:color-mix(in srgb,var(--c) calc(var(--tint)*100%),transparent)}
.sh .num{width:30px;height:30px;border-radius:50%;flex:none;display:grid;place-items:center;font-weight:800;font-size:13px;background:var(--c);color:#06101c}
.sh .tname{font-weight:800;color:var(--c);font-size:14.5px;display:flex;align-items:baseline;gap:7px;flex-wrap:wrap}
.sh .tname .he{font-size:18px;font-weight:700}
.sh .chev{margin-left:auto;width:20px;height:20px;fill:none;stroke:var(--muted);stroke-width:2.2;transition:transform .2s}
.step.open .sh .chev{transform:rotate(180deg)}
.sbody{padding:4px 16px 16px}
.srel{position:relative;z-index:0;margin:8px 0 0;font-size:max(12px,calc(13px * var(--scale)));line-height:1.5;color:var(--muted)}
.srel a{display:inline-block;position:relative;pointer-events:none;min-width:28px;padding:3px 6px;margin:-3px 0;text-align:center;border-radius:3px;color:var(--accent);font-weight:700;text-decoration:underline;text-underline-offset:2px}
.srel a:hover,.srel a:focus-visible{background:var(--panel-2)}
.srel-sep{position:relative;margin-left:-4px}
.srel a::before,.srel a::after{content:"";position:absolute;left:calc(2px - .275em);right:calc(2px - .275em);top:3px;bottom:3px;z-index:2;pointer-events:auto}
.srel a::after{top:-8px;bottom:-8px;z-index:-2}
.srel::before{content:"";position:absolute;inset:0 -4px;z-index:-1}
@media (max-width:640px){.srel a::after{top:-4px;bottom:-4px}}
.step:focus{outline:none}
.step.arrive{animation:stepArrive 1.5s ease-out}
@keyframes stepArrive{0%,35%{box-shadow:0 0 0 3px var(--accent);background:color-mix(in srgb,var(--accent) 12%,var(--panel))}100%{box-shadow:0 0 0 0 transparent}}
@media (prefers-reduced-motion:reduce){.step.arrive{animation:none;box-shadow:0 0 0 3px var(--accent)}}
.stitle{font-size:calc(18.5px * var(--scale));line-height:1.35;margin:10px 0 4px}
.ssum{margin:0 0 6px;color:var(--muted);font-size:calc(15.5px * var(--scale))}
.maybe{font-size:13px;color:var(--faint);margin:2px 0 6px}
.phrases{display:flex;flex-direction:column;margin-top:10px;border-top:1px solid var(--border-2)}
.ph{display:grid;grid-template-columns:1fr;gap:3px;padding:11px 0;border-bottom:1px solid var(--border-2)}
.ph:last-child{border-bottom:0}
.ph .pa{font-size:var(--he-size);line-height:1.65}
.ph .pe{font-size:var(--en-size);line-height:1.5}
.pnote{font-size:calc(13.5px * var(--scale));color:var(--faint);margin-top:2px}
body.hide-translation .ph .pe,body.hide-translation .seg .en{display:none}
body.hide-notes .pnote{display:none}
body.hide-terms .terms{display:none}
body.hide-logic .logic{display:none}
@media (min-width:760px){
  .ph{grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);gap:22px;align-items:baseline}
  .ph .pa{order:2}.ph .pe{order:1}
  body.hide-translation .ph{grid-template-columns:1fr}
}
.explain-btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;margin-top:12px;min-height:44px;border-radius:3px;border:1px dashed color-mix(in srgb,var(--c) 55%,var(--border));background:color-mix(in srgb,var(--c) 6%,transparent);color:var(--c);font-weight:800;font-size:14.5px}
.explain{margin-top:12px;display:grid;gap:12px}
.explain h4{margin:0 0 3px;font-size:12px;text-transform:uppercase;letter-spacing:.1em;color:var(--muted)}
.explain p{margin:0;font-size:calc(15.5px * var(--scale))}
.box{padding:12px 14px;border-radius:3px;background:var(--panel-2);border:1px solid var(--border-2)}
.box.remember{border-color:color-mix(in srgb,var(--terutz) 35%,transparent)}
.box.remember h4{color:var(--terutz)}
.box.alert{background:var(--warn-bg);border-color:color-mix(in srgb,var(--warn) 30%,transparent)}
.box.alert h4{color:var(--warn)}
.terms .chips .chip{cursor:default;align-items:baseline;flex-wrap:wrap;border-radius:3px}
.terms .chip .he{font-size:calc(18px * var(--scale));font-weight:600}
.terms .chip .m{font-weight:500;color:var(--muted)}
.logic dl{margin:0;display:grid;grid-template-columns:minmax(110px,max-content) 1fr;gap:4px 12px;font-size:14px}
.logic dt{color:var(--faint);font-weight:700}
.logic dd{margin:0}

/* full text */
.segs{margin-top:14px;display:flex;flex-direction:column;gap:2px}
.seg{display:grid;grid-template-columns:1fr;gap:6px;padding:14px 16px;border-radius:3px}
.seg:nth-child(odd){background:var(--panel)}
.seg .he{font-size:var(--he-size);line-height:1.7}
.seg .en{font-size:var(--en-size);color:var(--muted);line-height:1.55}
.seg .en b{color:var(--text);font-weight:650}
.seg .num{font-size:12px;color:var(--faint);font-weight:700}
@media (min-width:760px){.seg{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:start}.seg .he{order:2}.seg .en{order:1}body.hide-translation .seg{grid-template-columns:1fr}.seg.mstart::before{grid-column:1/-1}}
.src{font-size:12.5px;color:var(--faint);margin:16px 4px}

.endnav{display:flex;gap:10px;margin-top:20px}
.endnav .btn{flex:1;min-height:52px}

/* bottom bar */
.bottombar{position:fixed;left:0;right:0;bottom:0;z-index:30;display:flex;gap:6px;justify-content:center;padding:8px 10px calc(8px + env(safe-area-inset-bottom));background:color-mix(in srgb,var(--bg) 90%,transparent);border-top:1px solid var(--border-2)}
.bb-btn{flex:1;max-width:190px;min-height:50px;display:flex;align-items:center;justify-content:center;gap:4px;border-radius:3px;border:1px solid var(--border);background:var(--panel);font-weight:750;font-size:14px;padding:4px 8px}
.bb-btn:disabled{opacity:.35}
.bb-mid{flex-direction:column;gap:0;line-height:1.15}
.bb-sub{font-size:11.5px;color:var(--muted);font-weight:600}
@media (min-width:1100px){.layout.with-side ~ .bottombar #flowBtn{display:none}}
.bb-toggle{flex:none;width:36px;min-height:50px;display:flex;align-items:center;justify-content:center;border-radius:3px;border:1px solid var(--border-2);background:transparent;color:var(--muted);padding:0}
.bb-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s}
.bb-toggle:hover{color:var(--text);background:var(--panel)}
@media (min-width:760px){.bb-toggle{position:absolute;right:14px;top:15px;height:36px;min-height:0;border-radius:3px}}
/* bottom bar hidden: only a small handle stays, bottom-right */
body.bb-collapsed{padding-bottom:calc(24px + env(safe-area-inset-bottom));--bb-space:40px}
body.bb-collapsed .bottombar{left:auto;right:12px;bottom:calc(10px + env(safe-area-inset-bottom));padding:0;background:none;border:0;}
body.bb-collapsed .bottombar .bb-btn{display:none!important}
body.bb-collapsed .bb-toggle{position:static;width:40px;height:40px;min-height:0;border-radius:3px;border:1px solid var(--border);background:color-mix(in srgb,var(--panel) 92%,transparent);color:var(--text);box-shadow:none;opacity:.75}
body.bb-collapsed .bb-toggle:hover,body.bb-collapsed .bb-toggle:focus-visible{opacity:1}
body.bb-collapsed .bb-toggle svg{transform:rotate(180deg)}
body.bb-collapsed .toast{bottom:calc(64px + env(safe-area-inset-bottom))}

/* desktop flow sidebar: drag the right edge to resize, hide it, bring it back */
.side-hide{position:absolute;top:10px;right:8px;z-index:2;width:30px;height:30px;border-radius:3px;border:1px solid var(--border-2);background:var(--bg);color:var(--muted);display:flex;align-items:center;justify-content:center;padding:0}
.side-hide svg,.side-show svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;flex:none}
.side-hide:hover{color:var(--text);border-color:var(--border);background:var(--panel)}
.side-resize{position:absolute;top:0;bottom:0;right:-17px;width:12px;cursor:col-resize;touch-action:none;border-radius:6px}
.side-resize::after{content:"";position:absolute;top:14px;bottom:14px;left:5px;width:2px;border-radius:2px;background:var(--border-2);transition:background .15s}
.side-resize:hover::after,.side-resize:focus-visible::after,body.side-resizing .side-resize::after{background:var(--accent);left:4px;width:4px}
body.side-resizing{cursor:col-resize;user-select:none;-webkit-user-select:none}
body.side-resizing *{cursor:col-resize!important}
.side-show{position:fixed;left:0;top:calc(var(--top-h) + env(safe-area-inset-top) + 18px);z-index:25;flex-direction:column;align-items:center;gap:4px;padding:10px 6px 12px 4px;border:1px solid var(--border);border-left:0;border-radius:0 12px 12px 0;background:var(--panel);color:var(--muted);font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.side-show span{writing-mode:vertical-rl}
.side-show:hover{color:var(--text)}

/* sheet */
.sheet-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:40}
.sheet{position:fixed;z-index:41;left:0;right:0;bottom:0;max-height:88vh;display:flex;flex-direction:column;background:var(--bg);border-top-left-radius:8px;border-top-right-radius:8px;border:1px solid var(--border);box-shadow:none;padding-bottom:env(safe-area-inset-bottom)}
@media (min-width:760px){.sheet{left:50%;right:auto;top:50%;bottom:auto;transform:translate(-50%,-50%);width:min(640px,94vw);max-height:84vh;border-radius:3px}}
.sheet-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px 8px}
.sheet-head h2{margin:0;font-size:19px}
.sheet-body{overflow:auto;padding:4px 16px 20px;-webkit-overflow-scrolling:touch}
.input{width:100%;min-height:48px;padding:10px 14px;border-radius:3px;border:1px solid var(--border);background:var(--panel);font-size:16px}
.sugg{display:flex;flex-direction:column;gap:6px;margin:10px 0}
.sugg .chip{justify-content:space-between;border-radius:3px;min-height:46px;font-size:15.5px}
.seder{margin:16px 0 6px;font-size:12px;text-transform:uppercase;letter-spacing:.12em;font-weight:800;color:var(--faint)}
.masgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:6px}
.masbtn{display:flex;justify-content:space-between;align-items:center;gap:6px;padding:9px 12px;min-height:46px;border-radius:3px;border:1px solid var(--border);background:var(--panel);text-align:left;font-weight:650;font-size:14.5px}
.masbtn .he{font-size:16px;color:var(--muted);font-weight:500}
.masbtn .badge{font-size:11px;font-weight:800;color:var(--accent);margin-left:4px}
.dafgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(66px,1fr));gap:6px;margin-top:10px}
.dafcell{display:flex;border:1px solid var(--border);border-radius:3px;overflow:hidden;background:var(--panel)}
.dafcell .dn{flex:1;display:grid;place-items:center;font-weight:800;font-size:13px;color:var(--muted);min-width:22px}
.dafcell button{flex:1;min-height:40px;border:0;border-left:1px solid var(--border-2);background:none;font-weight:700;font-size:13px;padding:0}
.dafcell button.has{background:color-mix(in srgb,var(--accent) 20%,transparent);color:var(--accent)}
.dafcell button.cur{outline:2px solid var(--accent);outline-offset:-2px}
.dafcell button:disabled{opacity:.15}
.legend-mini{display:flex;gap:12px;align-items:center;font-size:13px;color:var(--muted);margin-top:8px}
.legend-mini i{display:inline-block;width:14px;height:14px;border-radius:4px;background:color-mix(in srgb,var(--accent) 20%,transparent);border:1px solid var(--accent);vertical-align:-2px;margin-right:4px}
/* perakim */
.perekline{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;margin:6px 0 0;padding:0;border:0;background:none;color:var(--muted);font-weight:650;font-size:14px;text-align:left;cursor:pointer}
.perekline .he{font-size:16px;font-weight:600;color:var(--text)}
.perekline .pk-next{font-weight:600;color:var(--faint)}
.perekline .pk-next .he{color:var(--muted)}
@media (hover:hover){.perekline:hover>span:first-child{text-decoration:underline;text-underline-offset:3px}}
.legend-mini{flex-wrap:wrap;row-gap:4px}
.legend-mini i.mid{background:var(--panel) linear-gradient(135deg,transparent 0 60%,color-mix(in srgb,var(--muted) 45%,transparent) 60% 100%);border-color:var(--border)}
.pk-jump{position:sticky;top:-4px;z-index:2;display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;margin:10px -16px 0;padding:8px 16px;background:var(--bg);border-bottom:1px solid var(--border-2)}
.pk-jump::-webkit-scrollbar{display:none}
.pk-jump .chip{flex:none;min-height:34px;padding:4px 11px;font-size:13.5px}
.pk-jump .chip .he{font-size:15px;font-weight:500;color:var(--muted)}
.pk-jump .chip.on .he{color:inherit}
.pk-h{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin:18px 0 0;font-size:14px;font-weight:750;color:var(--muted)}
.pk-h .he{font-size:17px;font-weight:650;color:var(--text)}
.pk-h .pk-r{font-size:12.5px;font-weight:650;color:var(--faint);white-space:nowrap}
.pk .dafgrid{margin-top:8px}
.dafcell .ph{flex:1;min-height:40px;border-left:1px solid var(--border-2)}
.dafcell button.mid{background-image:linear-gradient(135deg,transparent 0 76%,color-mix(in srgb,var(--muted) 40%,transparent) 76% 100%)}
@media (hover:hover) and (pointer:fine){.pk-jump{scrollbar-width:thin;padding-bottom:6px}.pk-jump::-webkit-scrollbar{display:block;height:6px}.pk-jump::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}}
.setrow{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 2px;border-bottom:1px solid var(--border-2)}
.setrow .lbl b{display:block}.setrow .lbl span{font-size:13px;color:var(--muted)}
.switch{position:relative;width:52px;height:32px;flex:none}
.switch input{position:absolute;opacity:0;inset:0;margin:0;cursor:pointer;z-index:1}
.switch span{position:absolute;inset:0;border-radius:3px;background:var(--panel-2);border:1px solid var(--border);transition:.2s}
.switch span::after{content:"";position:absolute;width:24px;height:24px;left:3px;top:3px;border-radius:50%;background:var(--muted);transition:.2s}
.switch input:checked+span{background:var(--accent)}
.switch input:checked+span::after{transform:translateX(20px);background:var(--accent-ink)}
.switch input:focus-visible+span{outline:3px solid var(--accent);outline-offset:2px}
.seg3{display:flex;gap:4px;padding:3px;border-radius:3px;background:var(--panel-2);border:1px solid var(--border)}
.seg3 button{border:0;background:none;min-height:36px;padding:0 12px;border-radius:3px;font-weight:700;font-size:14px;color:var(--muted)}
.seg3 button[aria-pressed=true]{background:var(--panel);color:var(--text)}
.sizer{display:flex;align-items:center;gap:8px}
.sizer button{width:42px;height:42px;border-radius:3px;border:1px solid var(--border);background:var(--panel);font-weight:800}
.preview-he{font-family:var(--he-font);font-size:var(--he-size);direction:rtl;text-align:right;padding:10px 0 2px}
.preview-en{font-size:var(--en-size);color:var(--muted)}
.small{font-size:13px;color:var(--muted)}

/* review */

.toast{position:fixed;left:50%;bottom:calc(90px + env(safe-area-inset-bottom));transform:translateX(-50%) translateY(20px);opacity:0;pointer-events:none;background:var(--text);color:var(--bg);padding:10px 16px;border-radius:3px;font-weight:700;font-size:14px;transition:.25s;z-index:60;max-width:90vw;text-align:center}
.toast.show{opacity:1;transform:translateX(-50%)}
.loading{padding:40px 10px;text-align:center;color:var(--muted)}
.spinner{width:28px;height:28px;border-radius:50%;border:3px solid var(--border);border-top-color:var(--accent);margin:0 auto 12px;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.skel{height:14px;border-radius:7px;background:var(--panel);margin:10px 0}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
/* Nov 5 review fix: index.html ships a fallback line inside <main>; the app replaces it at once. It stays hidden for 3 s so only people whose browser can't run the app ever see it. */
.boot-msg{max-width:36em;margin:40px auto;padding:0 16px;color:var(--muted);font:400 16px/1.6 var(--ui-font);text-align:center;animation:boot-wait 3s}
@keyframes boot-wait{from,to{visibility:hidden}}

@media print{
  body{background:#fff!important;color:#000!important;padding:0}
  body{--panel:#fff;--panel-2:#f6f6f6;--text:#000;--muted:#333;--faint:#555;--border:#ccc;--border-2:#e5e5e5}
  .topbar,.bottombar,.sidebar,.side-wrap,.side-show,.headactions,.tabs,.explain-btn,.strip,.strip-cap,.sheet,.sheet-backdrop,.toast,.endnav,.flowbtn-mobile{display:none!important}
  .explain{display:grid!important}
  .explain[hidden]{display:grid!important}
  .step{break-inside:avoid-page;page-break-inside:avoid}
  .layout{display:block!important}
}

/* phone: compact daf header so the first step shows sooner */
@media (max-width:640px){
  .dafhead{padding:14px 14px 12px}
  .dafhead h1{font-size:22px}.dafhead .he{font-size:19px}
  .topic{font-size:calc(17px * var(--scale));margin:8px 0 4px}
  .overview{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;cursor:pointer;font-size:calc(15px * var(--scale))}
  .overview.full{display:block}
  .typecounts{gap:5px;margin-top:10px}.typecount{font-size:12px;padding:3px 8px}
  .headactions{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:6px;margin-top:12px}
  .headactions .btn{flex-direction:column;gap:2px;min-height:52px;padding:6px 4px;font-size:12px}
  .tabs{margin-top:12px}
}

/* Mishnah badge: where a step stands (the Mishnah itself), shown beside its type */
.t-mishnah{--c:var(--mishnah)}
.mbadge{display:inline-flex;align-items:baseline;gap:4px;font-size:11.5px;font-weight:800;letter-spacing:.02em;line-height:1;padding:4px 8px;border-radius:3px;color:var(--mishnah);background:color-mix(in srgb,var(--mishnah) 14%,transparent);border:1px solid color-mix(in srgb,var(--mishnah) 55%,transparent);white-space:nowrap}
.mbadge .he{font-size:13px!important;font-weight:700}
.step.is-mishnah{box-shadow:inset 0 3px 0 var(--mishnah)}
.step.is-mishnah .sh .num{box-shadow:0 0 0 2px var(--panel),0 0 0 4px var(--mishnah)}
.fnode.is-mishnah .dot{box-shadow:0 0 0 2px var(--bg),0 0 0 4px var(--mishnah)}
.fnode .fty .mbadge{margin-left:6px;font-size:11.5px;padding:3px 7px;vertical-align:1px}
.strip span.is-mishnah{box-shadow:inset 0 4px 0 var(--mishnah)}
.seg.seg-mishnah{box-shadow:inset 3px 0 0 var(--mishnah)}
.seg.mstart::before{content:"Mishnah · משנה";display:block;font-size:11.5px;font-weight:800;color:var(--mishnah);letter-spacing:.02em}
body.no-colors .mbadge,body.no-colors .step.is-mishnah{--mishnah:var(--muted)}

/* ===== Design pass (Oct 2026): library, type pairing, calmer daf header, picker ===== */
/* 1. Hebrew inside English text: set in the same Frank Ruhl as the Aramaic, scaled to sit level with the English */
@font-face{font-family:'Frank Ruhl Inline';font-style:normal;font-weight:300 900;font-display:swap;src:url(fonts/frank-ruhl-hebrew.woff2) format('woff2');unicode-range:U+0590-05FF, U+FB1D-FB4F;size-adjust:118%;}
:root{--ui-font:'Spectral','Frank Ruhl Inline',Georgia,serif;--serif-en:'Spectral',Georgia,serif}
body.theme-dark{--faint:#8593ab;--memorial:#d8bd84}
body.theme-light{--memorial:#8a6a2c}
body.theme-sepia{--memorial:#7a5520}

.hero{padding-top:2px}

/* 3. Library: one tidy row per masechet, tap to open its amudim */
.lib{gap:8px}
.lib-row{padding:0}
.lib-row summary{list-style:none;display:flex;align-items:center;gap:10px;min-height:56px;padding:10px 14px 10px 16px;cursor:pointer}
.lib-row summary::-webkit-details-marker{display:none}

.lib-row .chev{width:18px;height:18px;fill:none;stroke:var(--faint);stroke-width:2.2;transition:transform .2s;flex:none}
.lib-row[open] .chev{transform:rotate(180deg)}
.lib-row[open] summary{border-bottom:1px solid var(--border-2)}
.lib-row .chips{padding:12px 14px 14px;display:grid;grid-template-columns:repeat(auto-fill,minmax(58px,1fr));gap:7px}
.lib-row .chip{justify-content:center;min-height:42px;padding:6px 4px;border-radius:3px;font-variant-numeric:tabular-nums}

/* 4. Daf page: quieter header, clearer reading hierarchy */
.dafhead{padding:20px 18px 16px}
.dafhead h1{font-size:28px}
.dafhead .refline .he{font-size:24px}
.topic{font-size:calc(19.5px * var(--scale));line-height:1.35;margin:12px 0 8px}
.overview{line-height:1.6}
.typecounts{gap:6px 14px;margin-top:14px}
.typecount{background:none;border:0;padding:2px 0;color:var(--muted);font-weight:650}
.typecount::before{content:"";width:9px;height:9px;border-radius:50%;background:var(--c);flex:none}
.headactions{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:16px}
.headactions .btn{flex-direction:column;gap:3px;min-height:56px;padding:8px 4px;font-size:12.5px;font-weight:650}
.headactions .btn svg{width:20px;height:20px}
.note-ai{text-align:center}
.sh{padding:12px 16px 12px 14px}
.sh .tname{font-size:14px;letter-spacing:.01em}
.stitle{font-size:calc(19px * var(--scale));line-height:1.4;margin:12px 0 6px}
.ssum{line-height:1.6;color:color-mix(in srgb,var(--text) 72%,var(--bg))}
.ph{padding:13px 0;gap:5px}
.ph .pa{line-height:1.7}
.ph .pe{line-height:1.55}
.pnote{line-height:1.5}

/* 5. Picker: names never squeezed, count as a quiet badge */
.masgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.masbtn{align-items:center;min-height:60px;padding:10px 12px}
.mb-names{display:flex;flex-direction:column;gap:1px;min-width:0}
.mb-en{font-weight:700;font-size:15px;line-height:1.25}
.mb-he{font-family:var(--he-font);font-size:17px;color:var(--muted);font-weight:500;line-height:1.3}
.masbtn .badge{margin-left:auto;flex:none;font-size:11.5px;font-weight:750;color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,transparent);border-radius:3px;padding:2px 8px}
.lib-row summary>span{line-height:1.25}
/* home library: dapim grouped by perek, like the picker (always on) */
.lib{grid-template-columns:minmax(0,1fr)}
.lib-row{min-width:0}
.lib-body{padding:0 14px 14px}
.lib-body>.chips{padding:12px 0 0}
.lib-row .pk .chips{padding:8px 0 0}
.lib-row .pk-h{margin-top:16px}
.lib-row .pk-jump{top:calc(var(--top-h) + env(safe-area-inset-top));z-index:3;margin:0 -14px;padding:8px 14px;background:var(--panel)}
.lib-row .legend-mini{margin-top:10px}
.lib-row .chip.mid{background-image:linear-gradient(135deg,transparent 0 72%,color-mix(in srgb,var(--muted) 40%,transparent) 72% 100%)}

/* ---------- Ameilus mode (#/<Masechet>/<daf>/ameilus): the Shiur/Ameilus switch, then the module, all prefixed am- ---------- */
.modesw{display:flex;border:1px solid var(--border);border-radius:3px;background:var(--panel);padding:2px;flex:none}
.modesw[hidden]{display:none}
.modesw-a{padding:7px 11px;border-radius:3px;font-size:14px;font-weight:700;color:var(--muted);text-decoration:none;white-space:nowrap;line-height:1.2}
.modesw-a.on{background:var(--accent);color:var(--accent-ink)}
.am-mapbtn{display:none}
.am-mapbtn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
body.am-mode .am-mapbtn{display:inline-flex}
body.am-mode .am-mapbtn[aria-pressed="true"]{border-color:var(--accent);color:var(--accent)}
@media (max-width:560px){
  body.has-modesw .brand-name{display:none}
  body.has-modesw .topbar{gap:6px;padding-left:10px;padding-right:10px}
  body.has-modesw .refbtn{max-width:40vw;padding:6px 8px 6px 11px;font-size:14.5px;gap:3px}
  .modesw-a{padding:6px 9px;font-size:13.5px}
}
@media (max-width:360px){.modesw-a{padding:6px 7px;font-size:13px}body.has-modesw .refbtn{max-width:32vw}}
body.theme-dark{--done:#b9c6dc}
body.theme-light{--done:#3d4757}
body.theme-sepia{--done:#4a3d2a}
body.am-mode{--bar-h:150px;--daf-size:calc(25px * var(--scale))}
body.am-mode,body.am-mode.bb-collapsed{padding-bottom:calc(var(--bar-h) + env(safe-area-inset-bottom))}
body.am-mode .side-wrap,body.am-mode .side-show,body.am-mode .bottombar{display:none !important}
body.am-mode .layout,body.am-mode .layout.with-side{display:block;max-width:none;padding:0}
body.am-mode main{max-width:none;padding:0}
.am-notice{margin:16px 14px}
:is(.am-card,.am-bar,.am-word,.am-map,.am-head) .he{unicode-bidi:isolate} /* Hebrew inside English keeps the quote marks and ’s in place */
.am-mw{list-style:none;margin:4px 0 0;padding:0}.am-mw li{padding:4px 0;border-top:1px solid var(--border-2)}.am-mw .he{font-size:1.15em;margin-right:6px}
.am{max-width:1320px;margin:0 auto;padding:10px 14px 24px}
.am-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin:4px 0 8px}
.am-title{font-size:18px;margin:0;font-weight:800}
.am-hetitle{font-weight:600;color:var(--muted);margin-left:6px;font-size:18px}
.am-sub{color:var(--faint);font-size:13px}
.am-headnav{display:flex;gap:6px}
.am-headnav .iconbtn{font-size:20px;color:var(--text);text-decoration:none;line-height:1}
.am-tip[hidden]{display:none}
.am-tip{display:flex;align-items:center;gap:10px;justify-content:space-between;background:var(--panel);border:1px solid var(--border);border-radius:3px;padding:8px 8px 8px 12px;font-size:14px;color:var(--muted);margin-bottom:8px}
.am-tip .iconbtn{min-width:30px;height:30px;font-size:13px}
.am-daf{font-family:var(--he-font);font-size:var(--daf-size);line-height:1.85;word-spacing:.12em;text-align:right;
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.am-daf .w{border-radius:6px;padding:0 1px;cursor:pointer;transition:background .1s}
@media (hover:hover){.am-daf .w:hover{background:color-mix(in srgb,var(--accent) 12%,transparent)}}
.am-daf .w.done{color:var(--done);opacity:.9;font-size:.92em}
.am-daf .w.done::after{content:none}
.am-daf .w.sel{background:color-mix(in srgb,var(--accent) 16%,transparent)}
.am-daf .w.mark{background:color-mix(in srgb,var(--accent) 34%,transparent);box-shadow:-3px 0 0 var(--accent)}
.am-daf .w.sig{text-decoration:underline;text-decoration-color:var(--warn);text-decoration-thickness:2px;text-underline-offset:6px}
.am-daf .w.pressed{background:color-mix(in srgb,var(--warn) 28%,transparent)}
.am-daf .cut{display:inline-block;width:2px;height:1.05em;vertical-align:-.15em;margin:0 .25em;background:var(--border);border-radius:2px}
.am-daf .cut-step{background:var(--faint);width:3px}
.am-card{display:block;word-spacing:normal;font-family:var(--ui-font);font-size:15.5px;line-height:1.5;text-align:left;background:var(--panel);border:1px solid var(--border);border-radius:3px;padding:12px 14px;margin:10px 0 14px;-webkit-user-select:text;user-select:text}
.am-card .he{font-size:1.12em}
.am-fb{margin:0 0 8px;font-weight:650}
.am-fb-exact,.am-fb-beyond{color:var(--good)}.am-fb-inner{color:var(--teshuvah)}
.am-check{border-top:1px solid var(--border-2);padding-top:8px;margin-top:4px}
.am-q{margin:0 0 8px;font-weight:700}.am-opt{font-weight:400;color:var(--faint);font-size:13px;margin-left:4px}
.am-opts{display:flex;flex-direction:column;gap:6px}
.am-optbtn{display:block;text-align:start;width:100%;font-size:15px;color:var(--text);border:1px solid var(--border);background:var(--panel-2);border-radius:3px;padding:9px 12px;line-height:1.4}
button.am-optbtn:hover{border-color:var(--accent)}
.am-optbtn.ok{border-color:var(--good);box-shadow:inset 3px 0 0 var(--good)}
.am-optbtn.miss{opacity:.7;text-decoration:line-through;text-decoration-color:var(--faint)}
:is(.am,.am-word) .linkbtn{background:none;border:0;color:var(--accent);padding:6px 0;margin-top:4px}
.am-own{margin:6px 0;color:var(--muted)}
:is(.am,.am-bar,.am-word) .btn{border:1px solid var(--border);background:var(--panel-2);border-radius:3px;padding:9px 14px;font-weight:700;min-height:42px;color:var(--text);text-decoration:none;display:inline-flex;align-items:center;gap:4px}
:is(.am,.am-bar,.am-word) .btn.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
:is(.am,.am-bar,.am-word) .btn.ghost{background:transparent}
:is(.am,.am-bar,.am-word) .btn.sm{min-width:42px;padding:9px 0;justify-content:center;font-size:18px}
:is(.am,.am-bar,.am-word) .btn.on{background:var(--warn);color:#111;border-color:var(--warn)}
:is(.am,.am-bar,.am-word) .btn .rung{font-weight:500;color:var(--faint);font-size:12px;margin-left:2px}
.am-read{border-left:3px solid var(--c,var(--mimra));padding:2px 0 2px 10px;margin:10px 0}
.am-kind{font-size:13px;color:var(--muted);margin-bottom:4px}
.kchip{display:inline-block;background:color-mix(in srgb,var(--c,var(--mimra)) 9%,transparent);color:var(--c,var(--mimra));border-radius:3px;padding:1px 9px;font-weight:700;font-size:12px}
.am-tr{margin:4px 0 8px}
.am-wh{color:var(--muted);margin:8px 0}
.am-ph{border-top:1px solid var(--border-2);padding:6px 0}.am-ph .he{text-align:right;font-size:1.15em}
.am details summary{cursor:pointer;color:var(--accent);font-size:14px}
.am-shiur{font-size:13px}
.am-finish .am-fin{font-weight:700;margin:0 0 10px}.am-finacts{display:flex;gap:8px;flex-wrap:wrap}
.k-mimra{--c:var(--mimra)}.k-kashya{--c:var(--kashya)}.k-terutz{--c:var(--terutz)}.k-raaya{--c:var(--raaya)}.k-dechiya{--c:var(--dechiya)}.k-sheelah{--c:var(--sheelah)}.k-teshuvah{--c:var(--teshuvah)}.k-maskana{--c:var(--maskana)}
.step.t-mimra:is(.cur,.open) .ph :is(.pa,.pe),.am-daf .w.done.k-mimra{color:color-mix(in srgb,var(--c) 80%,var(--text))}.step.t-kashya:is(.cur,.open) .ph :is(.pa,.pe),.am-daf .w.done.k-kashya{color:color-mix(in srgb,var(--c) 80%,var(--text))}.step.t-terutz:is(.cur,.open) .ph :is(.pa,.pe),.am-daf .w.done.k-terutz{color:color-mix(in srgb,var(--c) 80%,var(--text))}.step.t-raaya:is(.cur,.open) .ph :is(.pa,.pe),.am-daf .w.done.k-raaya{color:color-mix(in srgb,var(--c) 80%,var(--text))}.step.t-dechiya:is(.cur,.open) .ph :is(.pa,.pe),.am-daf .w.done.k-dechiya{color:color-mix(in srgb,var(--c) 80%,var(--text))}.step.t-sheelah:is(.cur,.open) .ph :is(.pa,.pe),.am-daf .w.done.k-sheelah{color:color-mix(in srgb,var(--c) 80%,var(--text))}.step.t-teshuvah:is(.cur,.open) .ph :is(.pa,.pe),.am-daf .w.done.k-teshuvah{color:color-mix(in srgb,var(--c) 80%,var(--text))}.step.t-maskana:is(.cur,.open) .ph :is(.pa,.pe),.am-daf .w.done.k-maskana{color:color-mix(in srgb,var(--c) 80%,var(--text))} /* v99x: kind-coloured text at 80% (step-card source and translation on the current or open step; marked daf words), one rule per kind; unmarked text stays neutral */
body.no-colors .step.t-mimra:is(.cur,.open) .ph :is(.pa,.pe){color:var(--text)}body.no-colors .am-daf .w.done.k-mimra{color:var(--done)}body.no-colors .step.t-kashya:is(.cur,.open) .ph :is(.pa,.pe){color:var(--text)}body.no-colors .am-daf .w.done.k-kashya{color:var(--done)}body.no-colors .step.t-terutz:is(.cur,.open) .ph :is(.pa,.pe){color:var(--text)}body.no-colors .am-daf .w.done.k-terutz{color:var(--done)}body.no-colors .step.t-raaya:is(.cur,.open) .ph :is(.pa,.pe){color:var(--text)}body.no-colors .am-daf .w.done.k-raaya{color:var(--done)}body.no-colors .step.t-dechiya:is(.cur,.open) .ph :is(.pa,.pe){color:var(--text)}body.no-colors .am-daf .w.done.k-dechiya{color:var(--done)}body.no-colors .step.t-sheelah:is(.cur,.open) .ph :is(.pa,.pe){color:var(--text)}body.no-colors .am-daf .w.done.k-sheelah{color:var(--done)}body.no-colors .step.t-teshuvah:is(.cur,.open) .ph :is(.pa,.pe){color:var(--text)}body.no-colors .am-daf .w.done.k-teshuvah{color:var(--done)}body.no-colors .step.t-maskana:is(.cur,.open) .ph :is(.pa,.pe){color:var(--text)}body.no-colors .am-daf .w.done.k-maskana{color:var(--done)} /* v99x: colours off: step-card text back to var(--text); marked daf words keep the settled var(--done) */
body.no-kindtext .step.t-mimra:is(.cur,.open) .ph :is(.pa,.pe){color:var(--text)}body.no-kindtext .am-daf .w.done.k-mimra{color:var(--done)}body.no-kindtext .step.t-kashya:is(.cur,.open) .ph :is(.pa,.pe){color:var(--text)}body.no-kindtext:not(.no-colors) .am-daf .w.done.k-kashya{color:color-mix(in srgb,var(--kashya) 45%,var(--done))}body.no-kindtext .step.t-terutz:is(.cur,.open) .ph :is(.pa,.pe){color:var(--text)}body.no-kindtext:not(.no-colors) .am-daf .w.done.k-terutz{color:color-mix(in srgb,var(--terutz) 40%,var(--done))}body.no-kindtext .step.t-raaya:is(.cur,.open) .ph :is(.pa,.pe){color:var(--text)}body.no-kindtext .am-daf .w.done.k-raaya{color:var(--done)}body.no-kindtext .step.t-dechiya:is(.cur,.open) .ph :is(.pa,.pe){color:var(--text)}body.no-kindtext:not(.no-colors) .am-daf .w.done.k-dechiya{color:color-mix(in srgb,var(--terutz) 40%,var(--done))}body.no-kindtext .step.t-sheelah:is(.cur,.open) .ph :is(.pa,.pe){color:var(--text)}body.no-kindtext .am-daf .w.done.k-sheelah{color:var(--done)}body.no-kindtext .step.t-teshuvah:is(.cur,.open) .ph :is(.pa,.pe){color:var(--text)}body.no-kindtext .am-daf .w.done.k-teshuvah{color:var(--done)}body.no-kindtext .step.t-maskana:is(.cur,.open) .ph :is(.pa,.pe){color:var(--text)}body.no-kindtext .am-daf .w.done.k-maskana{color:var(--done)} /* v99y: Color the text off = live v99w: step-card text var(--text); marked daf words var(--done), except Challenge 45% and Answer/Pushback 40% over var(--done), the live tints; :not(.no-colors) keeps Step colours off winning, so it still neutralises all eight */

/* action bar */
.am-bar{word-spacing:normal;position:fixed;left:0;right:0;bottom:0;z-index:25;background:color-mix(in srgb,var(--bg) 94%,transparent);border-top:1px solid var(--border-2);padding:8px 10px calc(8px + env(safe-area-inset-bottom))}
.am-msg{font-size:14px;color:var(--muted);text-align:center;min-height:21px;margin:0 auto 6px;max-width:760px;line-height:1.4}
.am-msg .he{font-size:1.15em}
.am-msg-try{color:var(--warn)}.am-msg-hint{color:var(--text)}
.am-acts{display:flex;gap:6px;justify-content:center;flex-wrap:nowrap;max-width:760px;margin:0 auto}
@media (max-width:400px){.am-acts .btn.btn{padding:9px 10px;font-size:14.5px}.am-acts .btn.btn.sm{min-width:38px}}
/* Hints (Oct 15 2026): every hint is its own button, any order. Vowels/Punctuation are page-wide on/off toggles. */
.am-hints{display:flex;gap:5px;justify-content:center;align-items:center;flex-wrap:nowrap;max-width:760px;margin:0 auto}
.am-hints .hb{border:1px solid var(--border);background:var(--panel-2);border-radius:3px;padding:7px 12px;font:inherit;font-weight:700;font-size:14px;min-height:38px;color:var(--text);white-space:nowrap;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.am-hints .hb.ic{min-width:38px;padding:7px 0;font-size:17px}
.am-hints .hb.on{background:var(--warn-bg);border-color:var(--warn);color:var(--text)}
.am-hints .hb.on[data-act=toggle]::before{content:"✓";margin-right:4px;color:var(--warn)}
.am-hints .hb.warn{border-color:var(--bad);color:var(--bad)}
.am-hints .hb:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.am-hints .hb-s{display:none}
.am-bar .am-acts{margin-top:6px}
@media (max-width:480px){.am-hints{gap:4px}.am-hints .hb{padding:7px 7px;font-size:13.5px}.am-hints .hb-l{display:none}.am-hints .hb-s{display:inline}.am-hints .hb.ic{min-width:34px;padding:7px 0}.am-hints .hb.on[data-act=toggle]::before{margin-right:2px}}
@media (max-width:374px){.am-hints{gap:3px}.am-hints .hb{padding:6px 5px;font-size:12.5px}.am-hints .hb.ic{min-width:30px}}
@media (max-width:340px){.am-hints .hb.on[data-act=toggle]::before{display:none}}

/* sugya map */
.am-map{display:none}
.am-maph{font-size:15px;margin:0 0 2px}.am-mapsub{font-size:12.5px;color:var(--faint);margin:0 0 8px}
.am-phase{font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--faint);margin:10px 0 4px}
.am-node{display:flex;align-items:flex-start;gap:6px;width:100%;text-align:left;background:none;border:0;border-left:1px dashed var(--border);margin-left:calc(var(--d) * 14px);padding:5px 6px;border-radius:0 8px 8px 0;font-size:13.5px;line-height:1.35;width:calc(100% - var(--d) * 14px)}
button.am-node:hover{background:var(--panel)}
.am-node .kdot{width:8px;height:8px;border-radius:50%;background:var(--c,var(--faint));flex:none;margin-top:5px}
.am-nk{color:var(--c);font-weight:700;flex:none}.am-nt{color:var(--muted)}
.am-node.here .am-nt{color:var(--accent);font-weight:700}
.am-node.here .kdot{background:var(--accent)}
body.map-open .am-map{display:block;position:fixed;z-index:35;left:0;right:0;bottom:0;max-height:62vh;overflow:auto;background:var(--bg);border-top:1px solid var(--border);border-radius:3px 18px 0 0;padding:14px 16px calc(20px + env(safe-area-inset-bottom));box-shadow:none}
@media (min-width:1100px){
  body.am-mode{--daf-size:calc(30px * var(--scale))}
  .am{display:grid;grid-template-columns:330px minmax(0,1fr);gap:28px;align-items:start}
  .am-main{order:2;max-width:820px}
  .am-map{display:block;order:1;position:sticky;top:calc(var(--top-h) + 14px);max-height:calc(100vh - var(--top-h) - var(--bar-h) - 30px);overflow:auto;background:var(--panel-2);border:1px solid var(--border-2);border-radius:3px;padding:14px}
  body.map-open .am-map{position:sticky;max-height:calc(100vh - var(--top-h) - var(--bar-h) - 30px);border-radius:3px;box-shadow:none;padding:14px}
  body.am-mode .am-mapbtn{display:none}
}

/* word sheet: non-modal, bottom, never covers the text you were reading */
.am-word{position:fixed;z-index:36;left:0;right:0;bottom:0;max-height:46vh;display:flex;flex-direction:column;background:var(--raise);border-top:1px solid var(--border);border-radius:3px 18px 0 0;box-shadow:none;padding:10px 16px calc(12px + env(safe-area-inset-bottom))}
.am-word[hidden]{display:none}
@media (min-width:1100px){.am-word{left:auto;right:24px;bottom:calc(var(--bar-h) + 10px);width:420px;border-radius:3px;border:1px solid var(--border)}}
body.am-mode.am-word-open,body.am-mode.bb-collapsed.am-word-open{padding-bottom:48vh}
.am-word-head{display:flex;justify-content:space-between;align-items:center;gap:10px}
.am-word-w{font-family:var(--he-font);font-size:30px;font-weight:600}
.am-word-body{overflow:auto;-webkit-overflow-scrolling:touch}
.am-ent{border-top:1px solid var(--border-2);padding:8px 0}
.am-ent-he .he{font-size:21px}.am-ent-g{font-weight:650}.am-ent-u{color:var(--muted);font-size:14.5px}.am-ent-p{font-size:13px;color:var(--faint)}
.am-ent.held{color:var(--faint)}
.am-src{font-size:12px;color:var(--faint)}
.am-none{color:var(--muted)}
.am-word-acts{display:flex;gap:8px;padding-top:8px;flex-wrap:wrap}
:is(.am,.am-word) .chip{border:1px solid var(--border);background:var(--panel);border-radius:3px;padding:7px 12px;font-size:14px}
:is(.am,.am-word) .chip[aria-pressed="true"]{border-color:var(--good);color:var(--good)}

/* ---------- UI pass, Oct 15 2026: folded overview, numbered step strip, home example, contrast, compact phone layout ---------- */
.sh .num,.fnode .dot{color:var(--bg)}
.tname .he,.fty .he,.ds-t .he,.demo-ref .he{unicode-bidi:isolate}
/* daf head: topic + one row (overview toggle, actions); the overview itself folds */
.dafhead .topic{margin:10px 0 0}
.dafhead:not(.ov-open) .topic{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.headbar{display:flex;align-items:center;gap:8px;margin-top:12px;flex-wrap:wrap}
.ovbtn{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:6px 10px 6px 14px;border-radius:3px;border:1px solid var(--border);background:var(--panel-2);font-weight:700;font-size:14.5px;color:var(--text)}
.ovbtn .chev{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.2;transition:transform .2s;flex:none}
.ovbtn[aria-expanded=true] .chev{transform:rotate(180deg)}
.headbar .headactions{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 0 auto}
.headbar .headactions .btn{min-height:40px;padding:6px 12px}
.ovpanel{margin-top:12px}
.ovpanel .overview{display:block;cursor:auto;margin:0}
.ovpanel .typecounts{margin-top:12px}
.tabs button small{font-weight:600;color:var(--muted);font-size:12.5px;margin-left:5px}
.tabs button[aria-selected=true] small{color:var(--muted)}
.note-ai{margin:8px 2px 0;font-size:12.5px}
/* step strip: a numbered button per step, in its step colour, with the current step named under it */
.strip{display:flex;gap:4px;height:auto;margin:14px 0 0;padding:2px 1px 4px;border-radius:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
.strip::-webkit-scrollbar{display:none}
.strip button{flex:1 0 36px;min-width:36px;max-width:58px;height:40px;padding:0;border-radius:3px;border:1px solid color-mix(in srgb,var(--c) 40%,transparent);border-bottom:4px solid var(--c);background:color-mix(in srgb,var(--c) calc(var(--tint)*100%),var(--panel));color:var(--text);font-weight:800;font-size:14px;font-variant-numeric:tabular-nums;scroll-snap-align:center;cursor:pointer}
.strip button.cur{background:var(--c);border-color:var(--c);color:var(--bg)}
.strip button.is-mishnah{box-shadow:inset 0 3px 0 var(--mishnah)}
@media (hover:hover){.strip button:hover{background:color-mix(in srgb,var(--c) 30%,var(--panel))}.strip button.cur:hover{background:var(--c)}}
.strip-cap{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:2px;font-size:14px;color:var(--muted)}
.strip-now b{color:var(--c);font-weight:800}
.strip-flow{display:inline-flex;align-items:center;gap:2px;min-height:36px;padding:4px 2px 4px 10px;border:0;background:none;color:var(--accent);font-weight:700;font-size:14px;flex:none}
.strip-flow svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
@media (min-width:1100px){body:not(.side-collapsed) .layout.with-side .strip-flow{display:none}}
body.no-colors .strip button{--c:var(--faint)!important}
/* step header: English type name, Hebrew beside it, and an Explain toggle that replaces the full-width button */
.sh .tname{align-items:center;gap:8px}
.sh .tname .he{font-size:16.5px;font-weight:600}
.sh .sh-x{margin-left:auto;display:inline-flex;align-items:center;gap:3px;flex:none;font-size:13px;font-weight:750;color:var(--c);padding:4px 7px 4px 11px;border-radius:3px;border:1px solid color-mix(in srgb,var(--c) 40%,transparent);white-space:nowrap}
.sh .sh-x .chev{margin-left:0;width:16px;height:16px;stroke:currentColor}
.step:not(.open) .explain-btn{display:none}
.explain-btn{min-height:40px;margin-top:10px;font-size:14px}
.explain .maybe{margin:0}
/* home: a real exchange up top */
.demo{padding:16px 16px 16px;margin-top:6px}
.demo-h{display:flex;align-items:baseline;justify-content:space-between;gap:4px 10px;flex-wrap:wrap}
.demo-h h2{margin:0;font-size:19px;letter-spacing:-.01em}
.demo-ref{font-size:14px;font-weight:700;color:var(--muted)}
.demo-ref .he{font-size:16px;font-weight:600}
.demo-sub{margin:6px 0 12px;color:var(--muted);font-size:15px;line-height:1.45}
.demo-steps{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.demo-steps .skel{height:92px;border-radius:3px;margin:0}
.demo-step{border:1px solid var(--border);border-left:5px solid var(--c);border-radius:3px;padding:10px 12px 4px;background:color-mix(in srgb,var(--c) 5%,var(--panel))}
.ds-h{display:flex;align-items:center;gap:8px}
.ds-h .num{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;font-size:12px;font-weight:800;background:var(--c);color:var(--bg);flex:none}
.ds-t{font-weight:800;color:var(--c);font-size:14px;display:flex;gap:8px;align-items:center}
.ds-t .he{font-size:16px;font-weight:600}
.ds-title{font-weight:700;margin:6px 0 0;font-size:15.5px;line-height:1.35}
.demo-step .ph{padding:6px 0;border-bottom:1px solid var(--border-2)}
.demo-step .ph:last-child{border-bottom:0}
.demo-step .ph .pa{font-size:calc(21px * var(--scale));line-height:1.55}
.demo-step .ph .pe{font-size:calc(15.5px * var(--scale));line-height:1.45}
.demo-go{display:flex;align-items:center;gap:8px 16px;flex-wrap:wrap;margin-top:14px}
.demo-go .btn svg{width:16px;height:16px;margin-right:-4px}
.demo-jump{font-size:14.5px;font-weight:650}
.home-grid{margin-top:14px}
/* Shiur / Ameilus: each says what it is */
.modesw-a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;padding:4px 12px;line-height:1.1}
.modesw-a b{font-weight:750}
.modesw-a small{font-size:11px;font-weight:600;letter-spacing:.01em;white-space:nowrap}

@media (max-width:640px){
  main{padding-top:8px}
  .hero{padding:2px 6px 12px}
  .hero p{font-size:16px}
  .searchbox{margin-top:14px}
  .demo{padding:14px 12px 14px}
  .dafhead{padding:12px 12px 12px}
  .dafhead .topic{margin-top:8px;font-size:calc(16.5px * var(--scale));line-height:1.35}
  .headbar{flex-wrap:nowrap;gap:6px;margin-top:10px}
  .ovbtn{flex:1;justify-content:space-between;min-width:0;font-size:14px;padding-left:12px}
  .headbar .headactions{display:flex;gap:6px;margin:0;flex:none}
  .headbar .headactions .btn{width:40px;min-height:40px;padding:0;flex-direction:row;gap:0}
  .headbar .headactions .hl{display:none}
  .tabs{margin:10px 0 0}
  .tabs button{min-height:36px}
  .tabs button small{display:none}
  .sh .mbadge .mb-he{display:none}
  .sh .sh-x{padding:4px 6px 4px 9px}
  .note-ai{margin-top:6px}
  .strip{margin-top:10px;-webkit-mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 28px),transparent);padding-right:24px}
  .steps{gap:10px;margin-top:8px}
  .sh{padding:7px 8px 7px 10px;gap:8px}
  .sh .num{width:26px;height:26px;font-size:12.5px}
  .sh .tname{font-size:14px;gap:6px}
  .sh .tname .he{font-size:15.5px}
  .sbody{padding:0 12px 10px}
  .stitle{font-size:calc(17px * var(--scale));line-height:1.3;margin:8px 0 2px}
  .ssum{font-size:calc(15px * var(--scale));line-height:1.45;margin:0 0 2px}
  .phrases{margin-top:6px}
  .ph{padding:7px 0;gap:1px}
  .ph .pa{line-height:1.55}
  .ph .pe{line-height:1.42}
  .pnote{line-height:1.4;margin-top:1px}
  .explain{gap:10px;margin-top:8px}
  .explain-btn{margin-top:8px}
  .endnav{margin-top:14px}
}
@media (max-width:560px){
  .modesw-a{padding:3px 9px}
  .modesw-a small{font-size:10.5px}
}
@media (max-width:360px){.modesw-a{padding:3px 6px}.modesw-a small{font-size:10px}}
@media (max-width:340px){.modesw-a{padding:3px 4px}body.has-modesw .topbar{gap:4px;padding-left:8px;padding-right:8px}}
@media print{.headbar .ovbtn,.strip-flow{display:none!important}.ovpanel[hidden]{display:block!important}.dafhead .topic{display:block!important;-webkit-line-clamp:unset!important}}

/* ---------- Two paths: Shiur and Ameilus (Oct 15 2026) ---------- */
.home-paths{margin-top:2px}
.home-paths .section-h{margin-top:4px}
.paths{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.path{position:relative;display:flex;gap:12px;align-items:flex-start;padding:16px 16px 14px;border-radius:var(--radius);border:1px solid var(--border);background:var(--panel);color:var(--text);text-decoration:none;transition:border-color .15s,background .15s}
.path:hover{border-color:color-mix(in srgb,var(--accent) 55%,var(--border))}
.path:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.path-ic{flex:none;width:40px;height:40px;border-radius:3px;display:grid;place-items:center;background:color-mix(in srgb,var(--accent) 14%,var(--panel));color:var(--accent)}
.path-ic svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.path-tx{display:flex;flex-direction:column;gap:4px;min-width:0}
.path-h{font-size:17.5px;font-weight:800;line-height:1.25;letter-spacing:-.01em}
.path:has(.path-last) .path-h{padding-right:78px}
.path-p{font-size:15px;line-height:1.45;color:var(--muted)}
.path-go{margin-top:6px;font-size:14.5px;font-weight:750;color:var(--accent)}
.path-last{position:absolute;top:12px;right:12px;font-size:12px;font-weight:700;color:var(--muted);border:1px solid var(--border);border-radius:3px;padding:2px 8px;background:var(--panel-2)}
@media (max-width:640px){.paths{grid-template-columns:1fr;gap:10px}.path{padding:14px 14px 12px}.path-h{font-size:17px}}
/* the amud chooser: shown when an amud opens and no way of learning is remembered yet */
.chooser .choose-h{font-size:18px;font-weight:800;margin:16px 0 10px;letter-spacing:-.01em}
.chooser .topic{display:block;-webkit-line-clamp:unset;overflow:visible}
.chooser .paths{grid-template-columns:1fr 1fr}
.chooser .path{background:var(--panel-2)}
.choose-note{margin:12px 2px 0;font-size:14px;color:var(--muted);line-height:1.45}
@media (max-width:640px){.chooser .paths{grid-template-columns:1fr}}
/* the compact chooser on every amud once a choice is remembered: two equal options, full labels */
.modebar{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;margin:12px 0 2px;border:1px solid var(--border);border-radius:3px;background:var(--panel-2)}
.mb-o{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-height:46px;padding:5px 8px;border-radius:3px;text-decoration:none;color:var(--muted);text-align:center;line-height:1.2}
.mb-o b{font-size:15px;font-weight:800;color:var(--text)}
.mb-o span{font-size:12.5px;font-weight:600}
.mb-o:hover b{color:var(--accent)}
.mb-o.on{background:var(--panel);box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 55%,transparent) inset}
.mb-o.on b{color:var(--accent)}
.mb-o:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.am .modebar{margin:0 0 10px;max-width:560px}
/* Ameilus first-use walkthrough, round 2 (Oct 15 2026): a short sheet at the bottom, the amud's first lines stay in view; once per device, the ? in the head reopens it */
.am-help{font-size:16px !important;font-weight:800}
.am-tip:has(.am-walk){display:block;padding:0;margin:0;background:none;border:0;color:var(--text)}
.am-walk{position:fixed;z-index:30;left:50%;transform:translateX(-50%);bottom:calc(10px + env(safe-area-inset-bottom));width:min(520px,calc(100% - 20px));max-height:min(420px,52vh);overflow:auto;box-sizing:border-box;
  background:var(--panel);border:1px solid color-mix(in srgb,var(--accent) 40%,var(--border));border-radius:3px;padding:10px 14px 12px;font-size:15px;line-height:1.45;box-shadow:none}
body.am-walk-open .am-bar{visibility:hidden}
body.am-walk-open .am-daf{opacity:.92}
.am-walk-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.am-walk-k{font-size:12px;text-transform:uppercase;letter-spacing:.1em;font-weight:800;color:var(--muted)}
.am-walk-top .iconbtn{min-width:32px;height:32px;font-size:14px}
.am-walk-h{font-size:19px;font-weight:800;letter-spacing:-.01em;margin:0 0 6px;line-height:1.25;outline:0}
.am-walk-steps{margin:0 0 8px;padding-left:18px;display:grid;gap:2px;color:var(--text)}
.am-walk-steps li::marker{color:var(--accent)}
.am-walk-ex{border:1px solid var(--border);border-radius:3px;background:var(--panel-2);padding:4px 10px 6px}
.am-ex-he{font-family:var(--he-font);font-size:calc(20px * var(--scale));line-height:1.8;margin:0;text-align:right}
.ex-w{border-radius:6px;padding:0 3px}
.ex-end{background:color-mix(in srgb,var(--good) 22%,transparent);box-shadow:0 0 0 1.5px var(--good) inset}
.ex-near{background:color-mix(in srgb,var(--warn) 16%,transparent);border:1.5px dashed var(--warn)}
.am-ex-key{margin:2px 0 0;font-size:13px;color:var(--muted);display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px}
.am-ex-k{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;margin-right:10px}
.exk{flex:none;width:18px;height:18px;border-radius:50%;display:inline-grid;place-items:center;font-size:12px;font-weight:800}
.exk-end{background:var(--good);color:var(--panel)}
.exk-near{background:var(--warn);color:var(--panel)}
.am-walk-acts{margin-top:10px;display:flex;justify-content:flex-end;gap:8px}
.am-walk-acts .btn{min-height:40px;padding:8px 18px}
.am-walk :is(.he,[lang=he]){unicode-bidi:isolate}
/* Ameilus bar, round 2 (Oct 15 2026): idle = the prompt + one row (Hints · Word help · ↺); the four hints open from Hints in a panel above the row */
body.am-mode,body.am-mode.bb-collapsed{padding-bottom:calc(var(--am-bar-h,var(--bar-h)) + 16px + env(safe-area-inset-bottom))}
.am-bar{padding:6px 10px calc(7px + env(safe-area-inset-bottom))}
.am-msg{margin-bottom:5px}
.am-hints .hb{gap:0}
.am-row{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr) 40px;gap:6px;max-width:440px}
.am-row .hb{min-width:0}
.am-row .hb.ic{min-width:0}
.hb-h .hb-n{margin-left:6px;font-size:12px;font-weight:700;color:var(--text);background:var(--warn-bg);border:1px solid var(--warn);border-radius:3px;padding:0 6px;line-height:18px}
.hb-h .hb-car{margin-left:6px;font-size:12px;color:var(--muted)}
.am-hints .hb-h.open{border-color:var(--accent)}
.am-hintpanel{display:grid;grid-template-columns:repeat(4,auto);justify-content:center;gap:6px;margin:0 auto 6px;padding:0 0 6px;border-bottom:1px solid var(--border-2);max-width:620px}
.am-hintpanel.am-hints-bare{grid-template-columns:auto}
.am-acts[dir=rtl] .btn{direction:ltr;unicode-bidi:isolate} /* the arrow glyphs are not mirrored: › points right, ‹ points left */
@media (max-width:560px){
  body.am-mode{--bar-h:82px}
  .am-hintpanel{grid-template-columns:repeat(2,minmax(0,1fr));max-width:none}
  .am-hints .hb{padding:6px 6px;font-size:14px;min-height:38px;white-space:nowrap}
  .am-hints .hb-l{display:inline;overflow:hidden;text-overflow:ellipsis}
  .am-hints.am-reset{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
  .am-hints.am-reset .hb{white-space:normal;line-height:1.2}
  .am-hints .hb.on[data-act=toggle]::before{margin-right:3px;display:inline}
}
@media (max-width:374px){.am-hints .hb{font-size:13px;padding:6px 3px}.mb-o b{font-size:14px}.mb-o span{font-size:12px}}
/* reading area, round 2: more air between lines, slightly larger Hebrew, a comfortable measure; finished pieces settle back, the unread text stays full strength */
@media (max-width:1099px){body.am-mode{--daf-size:calc(26.5px * var(--scale))}}
.am-daf{line-height:2.05;word-spacing:.16em;max-width:36em}
.am-daf .w.done{font-size:.9em;opacity:1} /* settled: muted colour (AA: dark 6.9, light 5.3, sepia 5.5 on the page) and a touch smaller */
.am-daf .w.next{box-shadow:inset 0 -2px 0 color-mix(in srgb,var(--accent) 70%,transparent)}
body.theme-dark{--done:#8f9db5}
body.theme-light{--done:#5b6577}
body.theme-sepia{--done:#6a5a42}
/* phone top bar in Ameilus names the masechet with the daf ("Berakhot 2a"); the brand word gives way to make room */
@media (max-width:560px){
  body.am-mode .brand-name{display:none}
  body.am-mode .ref-m{display:inline}
  body.am-mode .am-head{margin:0 0 6px}
  body.am-mode .am-title{font-size:16px}
  body.am-mode .am .modebar{margin-bottom:8px}
  body.am-mode .mb-o{padding-top:6px;padding-bottom:6px}
}
body.choosing #flowBtn{visibility:hidden}
/* Home, round 2 (Oct 15 2026): a shorter hero, compact equal path cards, one "continue where you left off" beside Daf Yomi, the colour key folded away below the library */
.hero.hero-r2{padding:0 8px 6px}
.hero-r2 h1{font-size:clamp(26px,6vw,36px);margin:4px 0 4px}
.hero-r2 p{font-size:16px}
.hero-r2 .searchbox{margin-top:12px;padding:11px 14px}
.home-paths .section-h{margin:16px 4px 8px}
.paths .path:not(:has(.path-go)){align-items:center;padding:12px 40px 12px 14px}
.paths .path:not(:has(.path-go)) .path-tx{gap:2px}
.paths .path:not(:has(.path-go)) .path-ic{width:36px;height:36px;border-radius:3px}
.paths .path:not(:has(.path-go)) .path-p{font-size:14.5px;line-height:1.4}
.path-def{font-size:13px;line-height:1.35;color:var(--muted)}
.path-def::before{content:"";display:inline-block;width:14px;height:1px;background:currentColor;vertical-align:middle;margin-right:6px;opacity:.7}
.path-chev{position:absolute;right:14px;top:50%;transform:translateY(-50%);font-size:24px;line-height:1;color:var(--accent);font-weight:400}
.path:has(.path-chev):has(.path-last) .path-last{top:8px;right:34px}
.home-quick{margin-top:10px;gap:10px}
.home-quick .tile.qt{padding:10px 14px}
.home-quick .tile.qt .v{font-size:18px;display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.home-quick .tile.qt .v .s{font-size:14px;font-weight:600;color:var(--muted);margin:0}
.home-quick:has(.tile:only-child){grid-template-columns:1fr}
.legend-wrap{margin-top:8px}
.legend-wrap>summary{cursor:pointer;list-style:none;justify-content:flex-start}
.legend-wrap>summary::-webkit-details-marker{display:none}
.legend-wrap>summary::after{content:"›";font-size:16px;letter-spacing:0;transform:rotate(90deg);display:inline-block;margin-left:auto}
.legend-wrap[open]>summary::after{transform:rotate(-90deg)}
.legend-wrap>summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:6px}

/* Round 3 (Oct 15 2026). (b) On phones the Ameilus heading drops the English name the top bar already shows ("Berakhot 2a"):
   the Hebrew name and the progress stay; the English stays in the heading for screen readers. */
@media (max-width:560px){
  body.am-mode .am-entitle{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
  body.am-mode .am-hetitle{margin-left:0;color:var(--text);font-size:19px;font-weight:700}
}
/* (a) the home top bar keeps "Gemara Clarity" on one line down to 360px: the word never wraps, the bar tightens a little
   under 380px, the daf button's label can ellipsize, and below 330px the word gives way to the logo alone. */
.brand-name{white-space:nowrap}
#refBtnText{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.refbtn{min-width:0}
@media (max-width:380px){
  body:not(.has-modesw) .topbar{gap:6px;padding-left:10px;padding-right:10px}
  body:not(.has-modesw) .brand{gap:7px;font-size:16px;padding:6px 2px}
  body:not(.has-modesw) .refbtn{padding:6px 9px 6px 12px;font-size:14px;gap:4px}
}
@media (max-width:330px){body:not(.has-modesw) .brand-name{display:none}}

/* ---------- Round 4 (Oct 15 2026: in Ameilus the explanation scrolls and the rest of the screen stays put) ----------
   Ameilus is an app shell: the page never scrolls. The top bar and the Shiur/Ameilus bar stay put, the amud scrolls in its own
   box (.am-dafwrap), the explanation scrolls in its own panel (.am-exp). Phones: the panel is a sheet above the controls
   (up to 45% of the space, 80% when made taller). 900px and wider: the panel is a column left of the amud (where the Hebrew
   lines end; English beside Hebrew, as on Sefaria), above the sugya map from 1100px. The column is always there on wide
   screens, so a new explanation never changes the amud's width. */
html.am-shell,html.am-shell body{overflow:hidden;overscroll-behavior:none}
html.am-shell body.am-mode,html.am-shell body.am-mode.bb-collapsed,html.am-shell body.am-mode.am-word-open{padding-bottom:0}
html.am-shell .am{position:fixed;top:calc(var(--top-h) + env(safe-area-inset-top));bottom:var(--am-bar-h,var(--bar-h));left:0;right:0;margin:0 auto;max-width:1320px;box-sizing:border-box;padding:8px 14px 0;display:flex;flex-direction:column}
html.am-shell .am-main{flex:1 1 0;min-height:0;display:flex;flex-direction:column;max-width:none}
html.am-shell .am-head,html.am-shell .am .modebar,html.am-shell .am-tip{flex:none}
html.am-shell .am-dafwrap{flex:1 1 0;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;margin:0 -14px;padding:2px 14px 18px;scrollbar-width:thin;scrollbar-color:var(--border) transparent}
html.am-shell .am-dafwrap:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
html.am-shell .am-daf{margin:0 0 0 auto}
.am-daf .cut-here{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--accent);vertical-align:.15em;margin:0 .2em 0 0}
html.am-shell .am-side{flex:none;display:flex;flex-direction:column;min-height:0;max-height:45%}
html.am-shell .am.exp-tall .am-side{max-height:80%}
html.am-shell body.am-word-open .am{bottom:max(var(--am-bar-h,var(--bar-h)),var(--am-word-h,0px))}
html.am-shell body.map-open .am{z-index:40} /* the phone map sheet lives inside the shell; lift it over the controls as before */
/* the explanation panel */
.am-exp{position:relative;display:flex;flex-direction:column;min-height:0;flex:0 1 auto;background:var(--panel);border:1px solid var(--border);border-bottom:0;border-radius:3px 16px 0 0;margin:8px -14px 0;box-shadow:none}
.am-exp.empty{display:none}
.am-exp-head{display:flex;align-items:center;gap:6px;padding:5px 8px 5px 14px;border-bottom:1px solid var(--border-2);flex:none}
.am-exp-h{flex:1;margin:0;font-size:12.5px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.am-exp-head .iconbtn{min-width:34px;height:34px;font-size:14px;color:var(--muted)}
.am-exp.scrolled .am-exp-head{box-shadow:none}
.am-exp-body{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:0 14px 16px;scrollbar-width:thin;scrollbar-color:var(--faint) transparent}
.am-exp-body:focus-visible{outline:2px solid var(--accent);outline-offset:-3px;border-radius:0 0 12px 12px}
.am-exp-body::-webkit-scrollbar{width:8px}.am-exp-body::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}
.am-exp::after{content:"";position:absolute;left:1px;right:12px;bottom:0;height:40px;pointer-events:none;background:linear-gradient(to bottom,transparent,var(--panel) 85%);opacity:0;transition:opacity .15s;border-radius:0 0 14px 14px}
.am-exp.more::after{opacity:1}
.am-exp .am-card{margin:0;border:0;border-radius:0;background:none;padding:10px 0 2px;box-shadow:none}
.am-exp-empty{margin:0;padding:14px 0 6px;color:var(--muted);font-size:14.5px;line-height:1.45}
@media (min-width:900px){
  html.am-shell .am{display:grid;grid-template-columns:clamp(300px,34vw,420px) minmax(0,1fr);grid-template-rows:minmax(0,1fr);grid-template-areas:"side main";gap:24px;padding:10px 20px 10px}
  html.am-shell .am-main{grid-area:main;order:0;max-width:820px;height:100%}
  html.am-shell .am-side{grid-area:side;order:0;max-height:none;height:100%;gap:12px}
  html.am-shell .am.exp-tall .am-side{max-height:none}
  html.am-shell .am-dafwrap{margin:0;padding:2px 10px 18px 0}
  .am-exp{margin:0;border-bottom:1px solid var(--border);border-radius:3px;box-shadow:none;max-height:100%}
  .am-exp.empty{display:flex;flex:none;background:var(--panel-2);border-color:var(--border-2)}
  .am-exp.empty .am-exp-head .iconbtn{display:none}
  .am-exp-grow{display:none}
  .am-exp::after{border-radius:0 0 14px 14px}
}
@media (min-width:1100px){
  html.am-shell .am{grid-template-columns:clamp(300px,30vw,400px) minmax(0,1fr)}
  html.am-shell .am-map,html.am-shell body.map-open .am-map{display:block;position:static;flex:1 0 150px;min-height:150px;max-height:none;overflow-y:auto;overscroll-behavior:contain;box-shadow:none;border-radius:3px;padding:12px 14px}
}
/* short laptop windows (1024x600): a tighter head so the amud keeps its room */
@media (min-width:900px) and (max-height:720px){
  html.am-shell .am{padding-top:6px;gap:18px}
  html.am-shell .am-head{margin:0 0 4px}
  html.am-shell .am-title,html.am-shell .am-hetitle{font-size:16px}
  html.am-shell .am .modebar{margin-bottom:6px}
  html.am-shell .am .mb-o{padding-top:5px;padding-bottom:5px}
}
@media (max-width:899px){html.am-shell .am-exp-grow{display:inline-flex;align-items:center;justify-content:center}}
@media (prefers-reduced-motion:reduce){.am-exp::after{transition:none}}

/* ---------- first-visit notice (Oct 15 2026): the whole site, once per device; only "I understand" closes it ---------- */
.disc-back{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(5,8,14,.72);}
.disc{box-sizing:border-box;width:min(460px,100%);max-height:calc(100dvh - 32px);overflow:auto;background:var(--raise,var(--panel));color:var(--text);border:1px solid var(--border);border-radius:3px;padding:22px 22px 20px;box-shadow:none;text-align:center}
.disc-ic{width:44px;height:44px;margin:0 auto 10px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:900;font-size:22px;color:var(--warn);border:2px solid var(--warn);background:var(--warn-bg)}
.disc-h{margin:0 0 10px;font-size:22px;font-weight:800;letter-spacing:-.01em}
.disc-b{margin:0 0 18px;font-size:16.5px;line-height:1.55;color:var(--text);text-align:left}
.disc-ok{width:100%;min-height:48px;font-size:16.5px;justify-content:center}
.disc .btn.primary{background:var(--accent);border:1px solid var(--accent);color:var(--accent-ink);border-radius:3px;font-weight:800;display:inline-flex;align-items:center;cursor:pointer}
.disc-ok:focus-visible{outline:3px solid var(--text);outline-offset:3px}
body.disc-open{overflow:hidden}
.disc-link{background:none;border:0;padding:4px 0;color:var(--accent);font:inherit;font-weight:700;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
@media (max-width:400px){.disc{padding:18px 16px 16px;border-radius:3px}.disc-h{font-size:20px}.disc-b{font-size:15.5px;margin-bottom:14px}}

/* round 4: the polite live region is for screen readers only (it showed under the amud once the page stopped scrolling) */
.am-live.sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
/* the amud's own box fades at its bottom edge so it reads as "more below" */
html.am-shell .am-dafwrap{-webkit-mask-image:linear-gradient(to bottom,#000 calc(100% - 22px),transparent);mask-image:linear-gradient(to bottom,#000 calc(100% - 22px),transparent)}
/* short phones (e.g. 360x640): the head and the Shiur/Ameilus bar get compact so the amud keeps more room above the panel */
@media (max-width:899px) and (max-height:720px){
  html.am-shell .am{padding-top:4px}
  html.am-shell .am-head{margin:0 0 4px}
  html.am-shell .am-headnav .iconbtn{min-width:36px;height:36px}
  html.am-shell .am .modebar{margin-bottom:4px;padding:3px}
  html.am-shell .am .mb-o{padding-top:4px;padding-bottom:4px}
  html.am-shell .am .mb-o span{display:none}
  html.am-shell .am-side{max-height:42%}
}
@media (max-width:899px) and (max-height:720px){html.am-shell .am .mb-o{min-height:40px}}

/* ---------- quoted pasuk references (Oct 15 2026): the reference is a quiet button; the pasuk opens in a small pop-up over the page ---------- */
.pasuk-ref{display:inline;font:inherit;font-size:inherit;color:var(--accent);background:none;border:0;padding:0 1px;margin:0;border-bottom:1px dotted currentColor;border-radius:2px;cursor:pointer;line-height:inherit;text-align:inherit}
.pasuk-ref:hover{background:color-mix(in srgb,var(--accent) 12%,transparent)}
.pasuk-ref:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.pasuk-ref .he{unicode-bidi:isolate}
.pasuk-cv{unicode-bidi:isolate;direction:ltr;display:inline-block}
.am-pnote{font-size:13.5px;color:var(--muted);margin-top:2px}
.pz-back{position:fixed;inset:0;z-index:90;display:flex;align-items:center;justify-content:center;padding:14px;background:rgba(5,8,14,.55)}
.pz{box-sizing:border-box;width:min(380px,100%);max-height:min(560px,calc(100dvh - 28px));display:flex;flex-direction:column;background:var(--raise,var(--panel));color:var(--text);border:1px solid var(--border);border-radius:3px;box-shadow:none;overflow:hidden}
.pz-head{display:flex;align-items:center;gap:8px;padding:10px 8px 8px 16px;border-bottom:1px solid var(--border-2)}
.pz-h{flex:1;margin:0;font-size:17px;font-weight:800;line-height:1.3}
.pz-h .he{font-size:1.1em}.pz-en{font-size:13px;font-weight:600;color:var(--muted);margin-left:6px;white-space:nowrap}
.pz-x{min-width:36px;height:36px;font-size:14px}
.pz-body{overflow-y:auto;overscroll-behavior:contain;padding:12px 16px 4px}
.pz-he{font-family:var(--he-font);font-size:22px;line-height:1.8;text-align:right;margin:0 0 10px}
.pz-tr{font-size:15.5px;line-height:1.5;margin:0 0 10px;color:var(--text)}
.pz-load{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:14.5px;padding:8px 0 14px}
.pz-load .spinner{width:18px;height:18px;margin:0}
.pz-fail{color:var(--muted);margin:0 0 10px;font-size:14.5px}
.pz-sef{display:block;padding:10px 16px 12px;border-top:1px solid var(--border-2);font-size:14px;font-weight:700;color:var(--accent);text-decoration:none}
.pz-sef:hover{text-decoration:underline}
@media (max-width:480px){.pz-back{align-items:center;padding:12px}.pz{width:100%}}

/* ===== calm preview (gc2-calm-1): everything still reachable, one thing in focus at a time ===== */
/* 1. one colour at a time: only the step you are on (or have opened) carries its type colour */
.step:not(.cur):not(.open){--c:var(--muted)} /* calm4: steps you are not on use the muted colour (was faint) so scrolling back stays readable; the current step keeps its type colour, filled badge, card and edge */
.step{border:0;border-left:3px solid transparent;background:transparent;transition:background .2s,border-color .2s}
.step.cur,.step.open{background:var(--panel);border-left-color:var(--c)}
.step.cur{box-shadow:none}
.steps{gap:22px}
.sh{background:none;padding:12px 16px 6px}
.sh .num{background:transparent;color:var(--c);box-shadow:inset 0 0 0 1.5px currentColor;width:28px;height:28px;font-weight:700}
.step.cur .sh .num{background:var(--c);color:#06101c;box-shadow:none}
body.theme-light:not(.no-colors) .step.cur .sh .num,body.theme-sepia:not(.no-colors) .step.cur .sh .num{color:#fff} /* v99w: the digit on the filled current-step circle in light and sepia is white, the higher-contrast choice for every kind (at least 4.5:1); dark keeps #06101c */
.sh .tname{font-weight:650;font-size:13.5px;letter-spacing:.01em}
.sh .tname .he{font-size:16px;font-weight:600}
.sh .sh-x{border-color:transparent;color:var(--faint);font-weight:600}
.step:not(.cur):not(.open) .sh .sh-x{opacity:0}
.step:not(.cur):not(.open) .sh:hover .sh-x,.step:not(.cur):not(.open) .sh:focus-visible .sh-x{opacity:1}
.mbadge{background:none;border-color:color-mix(in srgb,var(--mishnah) 30%,transparent)}
/* steps you are not on step back a little */
.steps .step:not(.cur) .sbody{opacity:.94;transition:opacity .25s} /* calm4: was .8, which took the summary below AA in light and sepia */
.steps .step.cur .sbody{opacity:1}
.srel{font-size:12.5px;color:var(--faint)}
/* fewer lines: phrases separated by space, not rules */
.phrases{border-top:0}
.ph{border-bottom:0;padding:12px 0}
/* 2. the explanation: core first, the deeper layers behind one quiet fold */
.explain-btn{border:0;background:none;color:var(--accent);font-weight:650;justify-content:flex-start;padding:0;min-height:40px;width:auto}
.explain{gap:18px}
.explain h4{letter-spacing:.06em;font-weight:650;color:var(--faint)}
.box{background:none;border:0;border-left:2px solid var(--border);border-radius:0;padding:2px 0 2px 14px}
.box.remember{border-left-color:color-mix(in srgb,var(--terutz) 55%,transparent)}
.box.alert{background:none;border-left-color:color-mix(in srgb,var(--warn) 70%,transparent)}
.more{border-top:1px solid var(--border-2);padding-top:6px}
.more>summary{list-style:none;cursor:pointer;display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;min-height:40px;padding:8px 0;color:var(--muted)}
.more>summary::-webkit-details-marker{display:none}
.more>summary::after{content:"›";margin-left:auto;font-size:20px;line-height:1;color:var(--faint);transition:transform .2s}
.more[open]>summary::after{transform:rotate(90deg)}
.more .more-k{font-weight:700;font-size:14px;color:var(--text)}
.more .more-l{font-size:13px;color:var(--faint)}
.more-b{display:grid;gap:18px;padding:6px 0 4px}
.terms .chips .chip{border-color:transparent;background:var(--panel-2)}
/* 3. one clear next action */
.next-step{display:flex;align-items:center;justify-content:center;gap:4px;margin:16px 0 2px auto;min-height:44px;padding:8px 20px;border-radius:3px;border:1px solid var(--border);background:transparent;color:var(--muted);font-weight:700;font-size:15px}
.step.cur .next-step{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
/* 4. phrase notes (calm4): always shown in full; a caveat is never cut off. The "Note ·" lead-in stays */
.pnote{display:block;margin-top:4px}
.pnote::before{content:"Note · ";font-weight:700;color:var(--muted)}
body.hide-notes .pnote{display:none}
/* 5. quieter chrome: no outlines on bars, no counters shouting, a one-colour progress line */
.brand-mark i{background:var(--muted)!important;opacity:.75}
.refbtn,.topbar .iconbtn{border-color:transparent;background:transparent}
.progress div{background:var(--accent);opacity:.7}
.bottombar{border-top:1px solid var(--border-2)}
.bb-btn{border-color:transparent;background:transparent;color:var(--muted);font-weight:650}
.bb-btn:hover{background:var(--panel);color:var(--text)}
.bb-sub{color:var(--faint);font-weight:500} /* nothing hidden: the step counter stays, just quieter */
.bb-toggle{border-color:transparent}
/* desktop flow list: colour only on the step you are on */
.fnode:not(.cur){--c:var(--faint)}
.fnode .dot{background:transparent;color:var(--muted);box-shadow:inset 0 0 0 1.5px var(--border);font-weight:700}
.fnode.cur .dot{background:var(--c);color:#06101c;box-shadow:none}
.fnode .fty{font-weight:600}
.fnode:not(.cur) .ft{color:var(--muted)}
.strip button:not(.cur){--c:var(--faint);border-color:transparent;border-bottom-color:var(--border)}
/* 6. calm picker: flat cells, quiet legend and perek chips */
.dafcell{border-color:transparent;background:var(--panel-2)}
.dafcell button{border-left-color:transparent}
.dafcell button.has{background-color:color-mix(in srgb,var(--accent) 12%,transparent)}
.dafgrid{gap:8px}
.legend-mini{font-size:12px;color:var(--faint);gap:6px 14px}
.legend-mini i{border-color:transparent}
.pk-jump{border-bottom:0}
.pk-jump .chip,.sheet .seder .chip,#yomiSlot .chip{border-color:transparent;background:transparent}
.pk-jump .chip.on{background:var(--panel)}
.masbtn{border-color:transparent;background:var(--panel-2)}
.sheet-head .iconbtn{border-color:transparent;background:transparent}
.pk-h{margin-top:24px}
body.hide-logic .more .ml-logic,body.hide-logic details.more.only-logic{display:none}

/* ===== classics1 (Oct 16 2026): Classics, ported from the Classics v1 preview and set in the calm style (flat panels, one accent) ===== */
.cl-entry{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0 0;padding:12px 16px;border-radius:var(--radius);border:1px solid var(--border-2);background:var(--panel);color:inherit;text-decoration:none}
.cl-entry-t{display:flex;flex-direction:column;gap:2px;min-width:0}.cl-entry-t b{font-size:16px}.cl-entry-t span{font-size:14px;color:var(--muted)}
.cl-entry svg{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;color:var(--faint)}
.cl-entry:hover{background:var(--panel-2)}
.cl-entry:focus-visible,.cl-card a:focus-visible,.cl-seg button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.cl-wrap{max-width:760px;margin:0 auto;padding:6px 2px 40px}
.cl-h{font-size:26px;margin:10px 4px 4px}
.cl-intro{margin:0 4px 14px;color:var(--muted);font-size:15px;line-height:1.5}
.cl-seg{display:inline-flex;border:1px solid var(--border-2);border-radius:3px;overflow:hidden;margin:0 4px 6px}
.cl-seg button{min-height:40px;padding:6px 14px;background:transparent;border:0;color:var(--muted);font-weight:650;font-size:14px}
.cl-seg button[aria-pressed="true"]{background:var(--panel);color:var(--text);box-shadow:inset 0 -2px 0 var(--accent)}
.cl-theme{margin-top:8px}
.cl-gi{margin:-2px 4px 6px;font-size:14px;color:var(--faint)}
.cl-card{background:var(--panel);border:0;border-radius:var(--radius);padding:16px 16px 14px;margin:10px 0 16px;scroll-margin-top:calc(var(--top-h) + 14px)}
.cl-card.arrive{box-shadow:0 0 0 2px var(--accent)}
.cl-ref{font-size:13px;font-weight:650;color:var(--muted);display:flex;flex-wrap:wrap;gap:4px 10px;align-items:baseline}
.cl-ref .he{font-weight:500;unicode-bidi:isolate}
.cl-q{font-size:19px;line-height:1.3;margin:6px 0 6px}
.cl-sum{margin:0 0 10px;font-size:15px;line-height:1.5}
.cl-facts{margin:0 0 8px;display:grid;gap:6px}
.cl-facts>div{display:grid;grid-template-columns:118px 1fr;gap:8px;align-items:baseline}
.cl-facts dt{font-size:12.5px;font-weight:700;color:var(--faint);text-transform:uppercase;letter-spacing:.06em}
.cl-facts dd{margin:0;font-size:15px;line-height:1.45}
.cl-facts .he,.cl-am .he{font-family:var(--he-font, "Frank Ruhl Libre", serif);font-size:1.12em;unicode-bidi:isolate}
.cl-ex,.cl-ctx,.cl-am,.cl-status,.cl-then-ref{font-size:14px;line-height:1.45;color:var(--muted);margin:6px 0}
.cl-ctx a,.cl-status a{color:var(--accent)}
.cl-go{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 4px}
.cl-go .btn{flex:1 1 150px}
.cl-then{margin:14px 0 0;padding:12px 0 0 14px;border-left:2px solid var(--border);scroll-margin-top:calc(var(--top-h) + 14px)}
.cl-then-h{font-size:16px;line-height:1.3;margin:0 0 2px}
.cl-then .cl-sum{margin:4px 0 6px}
.cl-status{border-top:1px solid var(--border-2);padding-top:8px;margin-top:12px}
.cl-then-f{margin:2px 0 6px}
@media (max-width:420px){.cl-facts>div{grid-template-columns:1fr;gap:1px}.cl-go .btn{flex-basis:100%}}
.classic-mark{margin:10px 0;padding:8px 12px;border-radius:0;font-size:14px;line-height:1.45;border:0;border-left:2px solid var(--accent);background:color-mix(in srgb,var(--accent) 7%,transparent)}
.classic-mark a{color:var(--accent)}
/* a Classic in Ameilus */
.am-cl{margin:6px 0 4px;padding:7px 12px;border:0;border-left:2px solid var(--accent);border-radius:0;background:var(--panel-2);font-size:13.5px;line-height:1.45}
.am-cl a{color:var(--accent)}
.am-cl .am-cl-r,.am-cl .am-cl-skip{color:var(--muted)}
.am-cl .am-cl-full{white-space:nowrap;font-weight:700}
.am-daf .w.cl-skipped{opacity:.42} /* not ".skip": that is the skip-to-content link, moved off-screen */
.am-daf .w.after-cl{opacity:.6}
.am-daf .cl-mk{display:block;width:max-content;max-width:100%;font:650 12px/1.3 system-ui,-apple-system,sans-serif;letter-spacing:.01em;color:var(--accent);border:1px solid color-mix(in srgb,var(--accent) 70%,transparent);border-radius:3px;padding:2px 9px;margin:8px 0;direction:ltr;unicode-bidi:isolate;word-spacing:normal;text-align:left} /* its own line, so it can't read as a label on the words after it */
.am-msg-info{color:var(--text)}
@media (max-height:520px){.am-cl{margin:2px 0;padding:4px 10px;font-size:12.5px}}
/* keyboard focus flow: "Go to the first word" shows only when focused (its own class: .skip is taken by the skip link) */
.am-jump{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;padding:0}
.am-jump:focus{position:static;width:auto;height:auto;clip:auto;overflow:visible;display:inline-block;margin:4px 0 0;padding:6px 12px;border-radius:3px;border:1px solid currentColor;background:transparent;color:inherit;font:inherit;font-size:.9rem}
.am-title:focus,.am-fin:focus,.cl-h:focus,#view h1:focus,#view h2:focus,.cl-q:focus,.cl-then-h:focus,.stitle:focus{outline:none}
.am-title:focus-visible,.am-fin:focus-visible,#view h1:focus-visible,#view h2:focus-visible,.cl-q:focus-visible,.cl-then-h:focus-visible,.stitle:focus-visible{outline:3px solid var(--accent,#2b6cb0);outline-offset:3px;border-radius:4px}
h3.am-fin{font-size:inherit;line-height:inherit}
.am-finish:not(:first-child){margin-top:18px;padding-top:14px;border-top:1px solid var(--border)}

/* ===== home3 (Oct 16 2026, staging mock): three ways in on home; the Classics library by Seder ===== */
.hero.hero-h3{padding:8px 8px 2px}
.hero-h3 h1{font-size:clamp(28px,7.4vw,40px);line-height:1.08;margin:6px 0 6px;letter-spacing:-.025em;font-weight:800}
.hero-h3 p{font-size:16.5px;color:var(--muted);margin:0 auto}

.home-quick{margin-top:12px}
.home-quick .tile.qt{border-radius:3px;padding:12px 16px}
@media (min-width:760px){
  
  
  
  
  
  
  
  
  
  
  
  .hero.hero-h3{padding-top:18px}
  
}

/* the daf picker, opened from a home card: says which way the daf opens */
.pick-mode{display:flex;align-items:center;gap:10px;margin:0 0 12px;padding:10px 12px;border-radius:3px;font-size:14.5px;line-height:1.35;color:var(--muted);background:color-mix(in srgb,var(--mimra) 10%,var(--panel-2))}
.pick-mode b{color:var(--text)}
.pick-mode .pm-dot{flex:none;width:10px;height:10px;border-radius:3px;background:var(--mimra)}
.pick-mode.pm-ameilus{background:color-mix(in srgb,var(--terutz) 11%,var(--panel-2))}
.pick-mode.pm-ameilus .pm-dot{background:var(--terutz)}

/* Classics library */
.clx{max-width:780px}
.clx-head{padding:6px 4px 0}
.clx-eyebrow{margin:6px 0 0;font-size:12.5px;text-transform:uppercase;letter-spacing:.14em;font-weight:800;color:color-mix(in srgb,var(--sheelah) 80%,var(--text))}
.clx .cl-h{font-size:clamp(24px,6.2vw,32px);line-height:1.15;letter-spacing:-.02em;margin:4px 0 8px}
.clx .cl-intro{margin:0 0 16px}
.clx-tools{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:0 0 10px}
.clx-search{flex:1 1 260px;display:flex;align-items:center;gap:10px;min-height:46px;padding:0 14px;border-radius:3px;border:1px solid var(--border);background:var(--panel);color:var(--muted)}
.clx-search:focus-within{border-color:color-mix(in srgb,var(--accent) 60%,var(--border));box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 18%,transparent)}
.clx-search svg{width:19px;height:19px;flex:none;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
.clx-search input{flex:1;min-width:0;border:0;background:transparent;outline:none;font-size:16px;color:var(--text);padding:10px 0}
.clx-search input::placeholder{color:var(--faint)}
.clx .cl-seg{margin:0;border-radius:3px;background:var(--panel-2);border-color:var(--border-2);padding:3px;gap:2px}
.clx .cl-seg button{min-height:38px;border-radius:3px;padding:6px 14px}
.clx .cl-seg button[aria-pressed="true"]{background:var(--panel);box-shadow:none}
.clx-jump{position:sticky;top:calc(var(--top-h) + env(safe-area-inset-top));z-index:5;display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;margin:0 -14px;padding:10px 14px;background:color-mix(in srgb,var(--bg) 90%,transparent);}
@media (max-width:759px){.clx-jump{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent)}}
.clx-chip{flex:none;display:inline-flex;align-items:center;gap:7px;min-height:36px;padding:5px 12px 5px 14px;border-radius:3px;border:1px solid var(--border);background:var(--panel);font-weight:700;font-size:14px;color:var(--text)}
.clx-chip.on{border-color:color-mix(in srgb,var(--accent) 60%,var(--border));color:var(--accent)}
.clx-kinds{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0 2px}
.clx-kind[aria-pressed="true"]{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,var(--panel));color:var(--accent)}
.clx-kind:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.clx-cn{font-size:12px;font-weight:700;color:var(--muted);background:var(--panel-2);border-radius:3px;padding:0 7px;min-width:22px;text-align:center;font-variant-numeric:tabular-nums}
.clx-status{border:0;padding:0;margin:4px 4px 14px;font-size:13px;color:var(--faint)}
.clx-seder{margin:0 0 12px;border-radius:3px;background:var(--panel);border:1px solid var(--border-2);box-shadow:none;scroll-margin-top:calc(var(--top-h) + 64px)}
.clx-seder>summary{list-style:none;display:flex;align-items:center;gap:12px;min-height:72px;padding:14px 16px 14px 18px;cursor:pointer;border-radius:3px}
.clx-seder>summary::-webkit-details-marker{display:none}
.clx-seder>summary:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.clx-seder .chev{width:20px;height:20px;flex:none;fill:none;stroke:var(--faint);stroke-width:2.2;transition:transform .2s;margin-left:auto}
.clx-seder[open]>summary .chev{transform:rotate(180deg)}
.clx-seder[open]>summary{border-bottom:1px solid var(--border-2);border-radius:3px 20px 0 0}
.clx-sw{display:flex;flex-direction:column;gap:3px;min-width:0}
.clx-sn{display:flex;align-items:baseline;gap:8px;font-size:19px;letter-spacing:-.01em}
.clx-sn b{font-weight:800}
.clx-dot{color:var(--faint)}
.clx-she{font-family:var(--he-font);font-size:21px;font-weight:600;color:color-mix(in srgb,var(--text) 82%,var(--muted));unicode-bidi:isolate;direction:rtl}
.clx-ss{font-size:13.5px;color:var(--muted);line-height:1.35;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.clx-body{padding:4px 14px 14px}
.clx-mas{margin-top:14px}
.clx-mh{display:flex;align-items:baseline;gap:10px;margin:6px 4px 10px;font-size:15px;font-weight:800;letter-spacing:.01em}
.clx-mhe{font-family:var(--he-font);font-size:18px;font-weight:500;color:var(--muted);unicode-bidi:isolate}
.clx-mc{margin-left:auto;font-size:12px;font-weight:700;color:var(--muted);background:var(--panel-2);border-radius:3px;padding:1px 8px}
.clx-rows{display:grid;gap:10px}
.clx-row{position:relative;padding:14px 14px 10px;border-radius:3px;background:var(--panel-2);border:1px solid var(--border-2);scroll-margin-top:calc(var(--top-h) + 70px)}
.clx-row.arrive{box-shadow:0 0 0 2px var(--accent)}
.clx-top{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px}
.clx-ref{font-size:12.5px;font-weight:700;color:var(--muted);font-variant-numeric:tabular-nums}
.clx-lv{font-size:12px;font-weight:700;color:color-mix(in srgb,var(--sheelah) 85%,var(--text));background:color-mix(in srgb,var(--sheelah) 12%,transparent);border-radius:3px;padding:1px 8px}
.clx-draft{font-size:12px;font-weight:750;letter-spacing:.06em;text-transform:uppercase;color:var(--faint);border:1px dashed color-mix(in srgb,var(--faint) 70%,transparent);border-radius:3px;padding:0 7px}
.clx-t{font-size:17px;line-height:1.3;font-weight:750;margin:6px 0 3px;letter-spacing:-.01em}
.clx-hook{margin:0;font-size:14.5px;line-height:1.45;color:var(--muted);unicode-bidi:isolate;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.he-in{font-family:var(--he-font);font-size:1.1em;unicode-bidi:isolate}
.clx-meta{margin:6px 0 0;font-size:12.5px;color:var(--faint);font-weight:600}
.clx-row .cl-go{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0 2px}
.clx-row .cl-go .btn{min-height:42px;padding:8px 8px;font-size:14px;border-radius:3px;white-space:nowrap}
.clx-row .cl-go .btn:not(.primary){background:var(--panel);border-color:var(--border)}
@media (max-width:360px){.clx-row .cl-go{grid-template-columns:1fr}}
.clx-wait{margin:10px 0 2px;font-size:13px;color:var(--faint)}
.clx-then{margin:12px 0 0;padding:10px 0 0 12px;border-left:2px solid var(--border);scroll-margin-top:calc(var(--top-h) + 70px)}
.clx-then .clx-t{font-size:15.5px;margin-top:4px}
.clx-more{margin-top:8px}
.clx-more>summary{list-style:none;cursor:pointer;font-size:13px;font-weight:650;color:var(--accent);padding:12px 0;margin:-8px 0;display:inline-flex;align-items:center;gap:4px}
.clx-more>summary::-webkit-details-marker{display:none}
.clx-more>summary::after{content:"›";transform:rotate(90deg);display:inline-block;transition:transform .15s}
.clx-more[open]>summary::after{transform:rotate(-90deg)}
.clx-more .cl-facts{margin:8px 0 4px}
.clx-more .cl-facts>div{grid-template-columns:76px 1fr}
.clx-more .cl-facts dd{font-size:14px}
.clx-none,.clx-empty{margin:10px 4px;color:var(--faint);font-size:14px}
.clx-row.is-draft{background:color-mix(in srgb,var(--panel-2) 70%,var(--panel));border-style:dashed}
.clx-draftlist{margin:4px 0 16px}
.clx-draftlist .clx-row{background:var(--panel)}
@media (min-width:760px){
  .clx-body{padding:4px 18px 18px}
  .clx-rows{grid-template-columns:1fr 1fr;gap:12px}
  .clx-row{display:flex;flex-direction:column}
  .clx-row .cl-go{margin-top:auto;padding-top:12px}
  .clx-jump{margin:0;padding:10px 0;border-radius:0}
}

body.theme-dark .clx-seder{box-shadow:none}

/* home3b (Oct 16 2026: Explain at the end of the step): no Explain chip in the step header; the Explain button sits
   at the end of every step card, after the last text line and its translation, and the explanation opens right below it. */
.step:not(.open) .explain-btn{display:inline-flex}
.explain-btn{gap:4px;align-items:center}
.explain-btn .chev{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;transition:transform .2s;flex:none}
.step.open .explain-btn .chev{transform:rotate(180deg)}
.step:not(.cur):not(.open) .explain-btn{color:var(--muted)}

/* kt3 (Oct 16 2026): tap a word of the Gemara text in Sugya Flow for its meaning. No underline or marker; the pointer changes over a word on
   desktop, and the word you tapped gets a soft tint while its help is open. Background/box-shadow only, so no text moves. */
.pa .fw{cursor:pointer;border-radius:4px;-webkit-tap-highlight-color:transparent}
.pa .fw.on{background:var(--panel-2);box-shadow:0 0 0 2px var(--panel-2)}
@media (hover:hover) and (pointer:fine){.pa .fw:hover{background:var(--panel-2);box-shadow:0 0 0 2px var(--panel-2)}}
.wf-word{z-index:37}
@media (min-width:1100px){.wf-word{bottom:calc(84px + env(safe-area-inset-bottom))}} /* Sugya Flow has no --bar-h (that is Ameilus's); sit above the floating bottom bar */

/* home3c (Oct 16 2026): Classic cards have one way in (Sugya Flow) now that Classic-in-Ameilus is gone */
.clx-row .cl-go{grid-template-columns:1fr}
/* home3c: an empty Seder (Kodashim, Taharos) shows a clear message when opened */
.clx-none{margin:12px 4px 6px;padding:14px 16px;border:1px dashed var(--border);border-radius:3px;background:var(--panel-2);color:var(--muted);font-size:15px;line-height:1.45}
/* nb3: unlabeled divider where the unheaded Suggested-order cards begin */ .section-sep{height:0;border:0;border-top:1px solid var(--border);margin:34px 4px 14px}
.clx-then.arrive,.cl-then.arrive{box-shadow:0 0 0 2px var(--accent)}
.clx-row.arrive .clx-t:focus-visible,.cl-card.arrive .cl-q:focus-visible,.clx-then.arrive:focus-visible,.cl-then.arrive .cl-then-h:focus-visible{outline:none}
/* v99o: the homepage colour key, also under the strip caption of the steps view: a tighter fold there; not shown when step colours are off (the steps are all one colour then) or in print (the strip is not printed either) */
#dafBody .legend-wrap{margin-top:0}#dafBody .legend-wrap>summary{margin:2px 4px 0;min-height:44px;align-items:center}#dafBody .legend-wrap>.legend{margin:6px 0 8px}body.no-colors #dafBody .legend-wrap{display:none}@media print{#dafBody .legend-wrap{display:none}}

/* markers (v99u): optional step tags on the existing chip (Unresolved, Story, End marker, from step.marks) and the story band in the steps list; outlined, no fill, no new colour */
.stag{display:inline-flex;align-items:center;font-family:var(--ui-font);font-size:12px;font-weight:750;letter-spacing:.02em;line-height:1;padding:3px 6px;border-radius:5px;color:var(--c,var(--muted));background:none;border:1px solid currentColor;white-space:nowrap}
.stag.stag-end-marker,.stag.stag-story{color:var(--muted)}
.vh{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.sh .tname .stag{align-self:center}
.fnode .fty .stag,.strip-now .stag,.am-node .stag{padding:2px 5px}
.fnode .fty .stag{margin-left:6px;vertical-align:1px}
.strip-now .stag{vertical-align:1px}
.am-node .am-nt .stag{vertical-align:1px;margin-right:2px}
.legend .lg-sub{grid-column:1/-1;margin:6px 2px 0;font-size:12.5px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--faint)}
.lg-tag .stag{flex:none;margin-top:3px;color:var(--muted)}
.fband{margin:6px 0;padding:4px 0 4px;border-left:3px solid color-mix(in srgb,var(--muted) 45%,transparent);border-radius:0 10px 10px 0;background:color-mix(in srgb,var(--muted) 4%,transparent)}
.fband .fband-cap{margin:2px 0 2px 10px;padding:2px 5px}

/* Mishnah index (Oct 19 2026): "By daf | By Mishnah" in the daf picker, and the band over the step where a Mishnah starts; the app's own colours (--mishnah, --accent) in every theme */
.mi-tabs{margin:12px 0 4px}
.mi-tabs button{min-height:44px;font-size:15px}
.mi-pk .pk-h{margin-top:22px}
.mi-list{list-style:none;margin:8px 0 0;padding:0;border:1px solid var(--border);border-radius:3px;background:var(--panel);overflow:hidden}
.mi-list li+li{border-top:1px solid var(--border-2)}
.mi-row{display:flex;align-items:center;gap:12px;width:100%;min-height:60px;padding:10px 12px;margin:0;border:0;border-radius:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}
.mi-row:hover{background:color-mix(in srgb,var(--mishnah) 5%,transparent)}
.mi-row:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.mi-n{flex:none;display:inline-flex;flex-direction:column;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:2px 6px;border-radius:3px;background:color-mix(in srgb,var(--mishnah) 12%,transparent);color:var(--mishnah);font-weight:800;font-size:15px;line-height:1.05;font-variant-numeric:tabular-nums;white-space:nowrap}
.mi-n small{display:block;margin-top:2px;font-size:12px;font-weight:700;color:var(--muted)}
.mi-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:currentColor;opacity:.75}
.mi-he{flex:1;min-width:0;font-family:var(--he-font);direction:rtl;text-align:right;font-size:18.5px;line-height:1.5;color:var(--text);overflow-wrap:anywhere}
.mi-loc{flex:none;display:inline-flex;align-items:center;justify-content:flex-end;gap:2px;min-width:44px;font-size:13.5px;font-weight:750;color:var(--accent)}
.mi-loc svg,.mi-nb svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.mi-err{margin-top:14px}
.mi-band{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:14px 0 8px;padding:10px 12px;border-radius:3px;border:1px solid color-mix(in srgb,var(--mishnah) 40%,transparent);background:color-mix(in srgb,var(--mishnah) 9%,var(--panel))}
.mi-bt{display:flex;flex-direction:column;gap:2px;min-width:0}
.mi-bt b{font-size:15.5px;font-weight:800;color:var(--mishnah);letter-spacing:.01em}
.mi-bt span{font-size:13px;font-weight:650;color:var(--muted)}
.mi-bt .he{font-family:var(--he-font);font-size:15px;color:var(--text)}
.mi-nav{display:flex;gap:6px;flex:none}
.mi-nb{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:0;border-radius:3px;border:1px solid var(--border);background:var(--panel);color:var(--text);cursor:pointer}
.mi-nb svg{width:18px;height:18px}
.mi-nb:disabled{opacity:.4;cursor:default}
.step.mi-landed{outline:2px solid color-mix(in srgb,var(--mishnah) 70%,transparent);outline-offset:2px}
body.no-colors .mi-n,body.no-colors .mi-bt b{color:var(--text)}

/* offline (v105, Oct 19 2026): "Save <masechta> for offline" under the masechet heading in the daf picker (save, saving with a thin bar, paused, saved),
   and "Saved masechtot" in Settings -> Offline. The app's own colours only (--panel, --panel-2, --border, --border-2, --accent, --good, --muted); every
   button is at least 44px tall; the smallest text is 13px. */
.ofl-slot{margin:12px 0 2px}
.ofl{padding:12px 14px;border-radius:3px;background:var(--panel);border:1px solid var(--border)}
.ofl-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.ofl-save{width:100%;min-height:48px;justify-content:flex-start;background:var(--panel);text-align:left}
.ofl-save .sz,.ofl-all .sz{margin-left:auto;color:var(--muted);font-weight:600;font-size:14px}
.ofl-all{min-height:44px}.ofl-all .sz{margin-left:8px}
.ofl-save svg{width:18px;height:18px;flex:none}
.ofl-save .ic{color:var(--accent);display:inline-flex}
.ofl-t{font-weight:700;font-size:14.5px;display:flex;align-items:center;gap:7px}
.ofl-ok{color:var(--good)}
.ofl-n{font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.ofl-bar{height:6px;border-radius:3px;background:var(--panel-2);border:1px solid var(--border-2);margin:10px 0;overflow:hidden}
.ofl-bar i{display:block;height:100%;background:var(--accent);border-radius:3px;transition:width .3s}
.ofl-btns{display:flex;gap:8px}.ofl-btns .btn{flex:1;min-height:44px}
.ofl-sub{display:block;font-size:13px;color:var(--muted);margin-top:8px}
.ofl[data-st=saved] .ofl-sub{margin-top:2px}
.ofl-rm{min-height:44px;min-width:44px;padding:0 6px;border:0;background:none;color:var(--accent);font-weight:700;font-size:14.5px;flex:none}
.sv-h{margin:18px 0 2px;font-size:14.5px}
.sv-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 2px;border-bottom:1px solid var(--border-2);min-height:56px}
.sv-row .lbl b{display:block;font-size:15px}.sv-row .lbl span{font-size:13px;color:var(--muted)}
.sv-row .rt{display:flex;align-items:center;gap:10px}.sv-row .mb{font-size:14px;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.sv-row .btn{min-height:44px;padding:6px 12px;font-size:14px}
.sv-tot{display:flex;justify-content:space-between;align-items:center;padding:12px 2px 4px;font-size:14.5px}
.sv-none{margin:6px 0}.sv-hint{margin:2px 0 10px}
.ofl-rmall{width:100%;min-height:44px}

/* Guess the kind first (opt-in in Aa > Ameilus, v106-chip): two taps before "Show our reading" */
.am-guess{margin:2px 0 12px;padding:12px;border:1px solid var(--border);border-radius:3px;background:var(--panel-2)}
.am-gtop{display:flex;justify-content:space-between;gap:8px;font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.am-gq{margin:6px 0 10px;font-weight:700;font-size:16px;line-height:1.35}
.am-ghint{margin:0 0 10px;padding:9px 11px;border-radius:3px;border-left:3px solid var(--accent);background:color-mix(in srgb,var(--accent) 9%,transparent);font-size:14.5px;line-height:1.45}
.am-gopts{display:grid;gap:8px}
.am-gopt{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;min-height:52px;padding:9px 12px;border:1px solid var(--border);border-radius:3px;background:var(--panel);color:inherit;font:inherit;font-size:15px;line-height:1.3;text-align:left;cursor:pointer}
.am-gopt>span{font-size:13px;color:var(--muted)}
.am-gopt.am-gkind{border-left:4px solid var(--c,var(--mimra))}
.am-gopt.am-gkind>b{color:var(--c,var(--mimra))}
.am-gopt.tried{opacity:.55;cursor:default}
.am-gopt>.am-gtried{font-size:12px;font-weight:700;color:var(--muted)}
.am-gacts{display:flex;gap:8px;margin-top:10px}
.am-gacts .btn{min-height:44px;min-width:44px}
.am-gdone{margin:0 0 8px;font-weight:650;line-height:1.45}
.am-gdone .kchip{font-size:13px}

/* Help (Oct 20 2026): the ? beside Aa (44px), and the Help sheet: "On this screen", "What's new", all topics. On a wide screen it is a panel on the right, over the daf.
   The app's own theme colours in every theme; kind colours from the theme's kind variables. */
.iconbtn.hp-q{min-width:44px;height:44px;font-size:20px;font-weight:800}
.hp{font-size:16px}
.hp-gh{margin:18px 4px 8px;font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.hp>.hp-gh:first-child{margin-top:6px}
.hp-gh small{letter-spacing:0;text-transform:none;font-weight:600;font-size:13px;margin-left:6px;color:var(--faint)}
.hp-gh2{margin-top:14px;font-size:12px;letter-spacing:.06em}
.hp-card{background:var(--panel);border:1px solid var(--border);border-radius:3px;overflow:hidden}
.hp-row{display:grid;grid-template-columns:38px 1fr auto;align-items:center;gap:12px;width:100%;min-height:62px;padding:10px 14px;background:none;border:0;border-top:1px solid var(--border);color:var(--text);font:inherit;text-align:left;cursor:pointer}
.hp-card>.hp-item:first-child .hp-row{border-top:0}
.hp-ic{width:38px;height:38px;border-radius:3px;display:grid;place-items:center;background:color-mix(in srgb,var(--accent) 12%,transparent)}
.hp-ic svg{width:21px;height:21px;fill:none;stroke:var(--accent);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.hp-t{display:block;font-weight:700;font-size:16px;line-height:1.3}
.hp-s{display:block;color:var(--muted);font-size:14px;line-height:1.35;margin-top:2px}
.hp-chev{width:20px;height:20px;fill:none;stroke:var(--faint);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s}
.hp-item.open .hp-chev{transform:rotate(90deg)}
.hp-new{display:inline-block;margin-left:7px;padding:1px 8px;border-radius:3px;background:var(--accent);color:var(--bg);font-size:12px;font-weight:800;vertical-align:2px}
.hp-body{padding:0 16px 16px 64px}
.hp-body p{margin:0 0 8px;font-size:15.5px;line-height:1.5}
.hp-act{min-height:44px;display:inline-flex;align-items:center;padding:0 16px;margin-top:4px;border-radius:3px;border:1px solid var(--accent);background:none;color:var(--accent);font:inherit;font-weight:700;font-size:15px;cursor:pointer}
.hp-msg{display:block;margin-top:8px;font-size:14px;color:var(--muted)}
.hp-msg:empty{margin-top:0}
.hp-kinds{display:grid;gap:6px;margin:6px 0 10px}
.hp-k{display:grid;grid-template-columns:12px 1fr;gap:10px;align-items:start;font-size:14.5px;line-height:1.35}
.hp-k i{width:12px;height:12px;border-radius:4px;margin-top:4px;background:var(--c)}
.hp-k b{color:var(--c)}
.hp-k[data-k=mimra]{--c:var(--mimra)}.hp-k[data-k=kashya]{--c:var(--kashya)}.hp-k[data-k=terutz]{--c:var(--terutz)}.hp-k[data-k=raaya]{--c:var(--raaya)}.hp-k[data-k=dechiya]{--c:var(--dechiya)}.hp-k[data-k=sheelah]{--c:var(--sheelah)}.hp-k[data-k=teshuvah]{--c:var(--teshuvah)}.hp-k[data-k=maskana]{--c:var(--maskana)}
/* Help redone Nov 5 2026: numbered first steps, a plain colour key, a contact line; on phones the text uses the full width */
.hp-kinds{list-style:none;padding:0}
.hp-steps{margin:2px 0 12px;padding-left:22px}
.hp-steps li{margin:0 0 6px;padding-left:2px;font-size:15.5px;line-height:1.5}
.hp-steps li::marker{font-weight:700;color:var(--accent)}
.hp-foot{margin:18px 4px 4px;font-size:14px;color:var(--muted)}
.hp-row:focus-visible,.hp-act:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
@media (max-width:600px){.hp-body{padding:0 14px 14px}}
@media (min-width:900px){
  .sheet.hp-sheet{left:auto;right:16px;top:calc(var(--top-h) + 10px);bottom:16px;transform:none;width:440px;max-height:none;border-radius:3px}
  body.help-open .sheet-backdrop{opacity:.4}
}
/* Help: the ? needs room in the phone top bar. On a daf page the words "Gemara Clarity" give way to the logo, which still goes home (Ameilus already did this);
   on home the bar tightens a little so "Gemara Clarity" and "Choose a daf" both fit beside ? and Aa down to 360px. */
@media (max-width:560px){body.on-daf .brand-name{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}}
@media (max-width:440px){
  body:not(.on-daf) .topbar{gap:4px;padding-left:8px;padding-right:6px}
  body:not(.on-daf) .brand{gap:6px;font-size:15.5px;padding:6px 2px}
  body:not(.on-daf) .refbtn{padding:6px 4px 6px 8px;gap:2px;font-size:14px}
  body:not(.on-daf) .refbtn svg{width:15px;height:15px}
  body:not(.on-daf) .top-actions{gap:0}
}
@media (max-width:370px){
  body:not(.on-daf) .topbar{padding-left:6px}
  body:not(.on-daf) .brand{gap:5px;font-size:15px}
}

/* v106-acct (Oct 20 2026): the Settings controls that measured under 44px now meet 44×44 (close 40, A−/A+ 42, theme 36, AI-disclaimer link 28, Clear my data 42) */
.sheet-head .iconbtn{min-width:44px;height:44px}
.sheet-head{padding-top:12px;padding-bottom:6px} /* the head keeps its 62px height, so nothing below it moves */
.sizer button{width:44px;height:44px}
.seg3 button{min-height:44px}
.disc-link{display:inline-flex;align-items:center;min-height:44px}
#clearData{min-height:44px}

/* My words (Oct 25 2026): its own screen, #/words (list) and #/words/cards (flashcards) */
.mw{max-width:640px;margin:0 auto;padding:0 4px 24px}
.mw-hero p{font-size:15px}
.mw-tabs{display:flex;gap:4px;padding:4px;margin:6px auto 16px;max-width:360px;border:1px solid var(--border);border-radius:3px;background:var(--panel-2)}
.mw-tab{flex:1;display:flex;align-items:center;justify-content:center;min-height:44px;border-radius:3px;font-weight:750;font-size:15px;color:var(--muted);text-decoration:none}
.mw-tab[aria-current="page"]{background:var(--panel);color:var(--text);box-shadow:0 0 0 1px var(--border)}
.mw-tools{display:flex;gap:8px;align-items:center;margin-bottom:10px}
.mw-search{flex:1}
.mw-search input{width:100%;min-height:44px;padding:9px 14px;border-radius:3px;border:1px solid var(--border);background:var(--panel);font-size:16px}
.mw-go{min-height:44px}
.mw-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.mw-it{display:flex;align-items:center;gap:10px;padding:12px 8px 12px 16px;border:1px solid var(--border);border-radius:var(--radius);background:var(--panel)}
.mw-tx{flex:1;min-width:0;display:grid;gap:2px}
.mw-he{font-size:calc(24px * var(--scale));line-height:1.35;text-align:left;direction:rtl;justify-self:start}
.mw-en{font-size:16px;font-weight:600;overflow-wrap:anywhere}
.mw-none{color:var(--muted);font-weight:500;font-style:normal}
.mw-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;font-size:13px;color:var(--muted)}
.mw-meta a{display:inline-flex;align-items:center;min-height:28px;font-weight:650}
.mw-st,.mw-tag{display:inline-block;padding:2px 9px;border-radius:3px;font-size:12px;font-weight:750;border:1px solid var(--border);color:var(--muted)}
.mw-st.st-learning,.mw-tag.st-learning{color:var(--warn);border-color:color-mix(in srgb,var(--warn) 45%,transparent)}
.mw-st.st-known,.mw-tag.st-known{color:var(--good);border-color:color-mix(in srgb,var(--good) 45%,transparent)}
.mw-del{flex:none;width:44px;height:44px;display:flex;align-items:center;justify-content:center;border-radius:3px;border:1px solid transparent;background:none;color:var(--muted)}
.mw-del:hover{border-color:var(--border);color:var(--bad)}
.mw-del svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
.mw-nomatch,.mw-empty{color:var(--muted);text-align:center;padding:18px 8px;list-style:none}
.mw-empty{border:1px dashed var(--border);border-radius:var(--radius);font-size:15px}
.mw-empty p{margin:4px 0}.mw-empty b{color:var(--text)}
.mw-cards{display:grid;gap:12px}
.mw-bar{display:flex;justify-content:space-between;align-items:center;gap:10px}
.mw-n{font-size:14px;font-weight:700;color:var(--muted)}
.mw-bar .btn{min-height:44px}
.mw-bar .btn[aria-pressed="true"]{color:var(--accent);border-color:var(--accent)}
.mw-card{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;width:100%;min-height:min(46vh,340px);padding:36px 18px 28px;border-radius:3px;border:1px solid var(--border);background:var(--panel);text-align:center;-webkit-tap-highlight-color:transparent}
.mw-card.flipped{border-color:color-mix(in srgb,var(--accent) 40%,var(--border));background:color-mix(in srgb,var(--accent) 6%,var(--panel))}
.mw-card .mw-tag{position:absolute;top:12px;left:12px}
.mw-big{font-size:calc(42px * var(--scale));line-height:1.3;text-align:center;direction:rtl}
.mw-mean{font-size:20px;font-weight:700;max-width:30ch}
.mw-from{font-size:13px;color:var(--muted)}
.mw-tip{font-size:14px;color:var(--muted)}
.mw-row{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
.mw-marks .btn{flex:1;min-height:52px;font-size:16px;max-width:260px}
.mw-again{color:var(--warn);border-color:color-mix(in srgb,var(--warn) 45%,var(--border))}
.mw-open{text-align:center;margin:0}.mw-open a{display:inline-flex;align-items:center;min-height:44px}
.mw-done{text-align:center;padding:28px 12px;border:1px solid var(--border);border-radius:3px;background:var(--panel)}
.mw-done h2{margin:0 0 4px;font-size:24px}.mw-done p{margin:6px 0}
.mw-done .btn{min-height:46px}
a.setrow.mw-setlink{text-decoration:none;color:inherit;min-height:56px;margin-top:6px}
.mw-chev{font-size:24px;color:var(--muted);padding:0 6px}
.mw-homechips .chip{min-height:44px;padding:8px 16px}
@media (max-height:720px){.mw-hero{padding-top:0}.mw-hero h1{font-size:28px;margin:2px 0}.mw-tabs{margin:4px auto 10px}.mw-card{min-height:200px;padding:28px 18px 20px;gap:6px}.mw-big{font-size:calc(36px * var(--scale))}}

/* ===================================================================================================
   Mechanics (carried from the old v2–v4 layers, which are gone): one step at a time, the bottom bar, the edge zones
   =================================================================================================== */
#endnav{display:flex;justify-content:space-between;gap:20px;margin:24px 0 0;padding:0}
body.onestep #endnav{display:none}
body.onestep #dafBody .steps .step:not(.cur){display:none}
body.onestep #dafBody .rib-cur{display:none}
body.onestep .step .sh{pointer-events:none}
.topbar .progress{display:none}
.steps .step::before,.dafhead::before{display:none;content:none}
.legend-wrap>summary small,.tabs button small{display:none}
.bottombar{position:fixed;left:0;right:0;bottom:0;transform:none;width:auto;height:auto;min-height:0;padding:0 0 env(safe-area-inset-bottom);margin:0;display:block;background:var(--bg);border:0;border-top:1px solid var(--rule);border-radius:0;box-shadow:none;z-index:30}
.bottombar[hidden],body:not(.onestep) .bottombar{display:none}
.bottombar .sbar{display:block;width:100%;min-height:44px;padding:0;margin:0;background:none;border:0;border-radius:0;cursor:pointer;text-align:center;color:var(--muted);font:400 14px/44px var(--ui-font)}
.bottombar .sbar-line{display:none}
.bottombar .sc-n{color:var(--ink);font-weight:600;font-variant-numeric:tabular-nums}
.bottombar .sc-k{color:var(--c);margin-left:8px}
.bottombar .sbar:hover{color:var(--ink)}
/* Nov 5 review fix: the sidebar only shows from 1100px, and the layout is centred, so nothing may assume the sidebar starts at the screen's edge.
   The bottom bar moves right only while the sidebar is really showing. */
@media (min-width:1100px){.bottombar{left:var(--side-w,300px)} body:has(.layout:not(.with-side)) .bottombar,body.side-collapsed .bottombar{left:0}}
.edge{display:none}
@media (min-width:1000px){
  /* The invisible prev/next click zones live only in the empty margin beside the reading column, never over the text or the sidebar:
     their width is the margin that is actually free (capped at 64px), and they disappear when there is none. */
  body.onestep{--edge-w:clamp(0px, calc((100vw - var(--max)) / 2 - 24px), 64px)}
  body.onestep .edge{display:flex;position:fixed;top:48px;bottom:45px;width:var(--edge-w);align-items:center;justify-content:center;background:none;border:0;border-radius:0;padding:0;cursor:pointer;color:transparent;z-index:5;overflow:hidden}
  body.onestep .edge-next{right:0}
  body.onestep .edge-prev{left:0}
}
@media (min-width:1100px){
  /* While the steps sidebar is showing, the list itself is the way back, so there is no left zone; the right zone keeps to the margin outside the layout. */
  body.onestep:has(.layout.with-side):not(.side-collapsed){--edge-w:clamp(0px, calc((100vw - max(1240px, calc(var(--side-w,300px) + var(--max) + 56px))) / 2 - 4px), 64px)}
  body.onestep:has(.layout.with-side):not(.side-collapsed) .edge-prev{display:none}
}
@media (min-width:1000px){
  body.onestep .edge svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.4}
  body.onestep .edge:hover{color:var(--muted)}
  body.onestep.at-last .edge-next{display:none}
}
@media print{.bottombar,.edge,.ticks{display:none}}

/* ===================================================================================================
   Gemara Clarity v5 — "an open gemara, marked in pencil" (state/design/gc-design-bible.md)
   One stylesheet. The page is a Shas page; the binding is the frame; the step colours are the pencils
   and the only colour. Spacing scale 4 · 8 · 12 · 16 · 24 · 32 · 48.
   =================================================================================================== */
html{scroll-padding-top:64px}
body{font-family:var(--ui-font);font-size:17px;line-height:1.6;color:var(--text);background:var(--bg);font-kerning:normal;-webkit-tap-highlight-color:transparent;padding-bottom:calc(64px + env(safe-area-inset-bottom))}
h1,h2,h3,h4{text-wrap:balance}
p{text-wrap:pretty}
a{color:var(--ink);text-decoration-thickness:1px;text-underline-offset:3px}
:focus-visible{outline:2px solid var(--ink);outline-offset:2px;border-radius:2px}
.he,.en-he,[lang="he"]{font-family:var(--he-font);font-style:normal;letter-spacing:0;text-transform:none}
.pe .he,.ssum .he,.stitle .he,.topic .he,.explain .he,.pnote .he{font-size:1.12em;line-height:1;unicode-bidi:isolate}
.rashi,.tosafos,[data-layer="rashi"]{font-family:var(--rashi-font)}

/* ---------- the binding: header band ---------- */
.topbar{height:calc(48px + env(safe-area-inset-top));background:var(--binding);color:var(--on-binding);border-bottom:1px solid var(--gold);padding:env(safe-area-inset-top) 12px 0 16px;gap:4px}
.topbar .brand{gap:10px;padding:0;min-height:44px;color:var(--gold);font-weight:400;align-items:baseline}
.topbar .brand-he{display:inline;font:800 25px/1 var(--he-font);color:var(--gold);letter-spacing:0}
.topbar .brand-logo{display:block;flex:none;align-self:center;width:28px;height:28px;margin-right:-2px;position:relative;top:-2px}
.topbar .brand-name{font:500 13px/1 var(--sc-font);letter-spacing:.04em;color:var(--gold)}
body.on-daf .topbar .brand-name,body.am-mode .topbar .brand-name{display:none}
.topbar .refbtn{margin-left:auto;min-height:44px;padding:0 8px;border:0;border-radius:0;background:none;color:var(--on-binding);font:400 15px var(--ui-font);max-width:56vw}
.topbar .refbtn:hover span{text-decoration:underline;text-underline-offset:3px}
.topbar .refbtn svg{width:16px;height:16px;stroke-width:1.6;opacity:.8}
.topbar .iconbtn{min-width:44px;height:44px;border:0;border-radius:0;background:none;color:var(--on-binding);box-shadow:none}
.topbar .iconbtn svg{width:20px;height:20px;stroke:currentColor;stroke-width:1.5;fill:none}
.topbar .iconbtn:active,.topbar .refbtn:active{background:var(--binding-hi)}
.topbar .aa{font:400 17px var(--ui-font);color:var(--on-binding)}
.topbar .modesw{display:none}

/* ---------- home: today's amud as a marked page ---------- */

.h5 .amud{padding:0}

/* Nov 5 2026 (review #63): while today's amud loads, its placeholder holds about the room the painted amud takes, so the sections below do not jump */

.btn-primary{display:inline-flex;align-items:center;justify-content:center;height:44px;padding:0 24px;border-radius:22px;background:var(--binding);color:var(--on-binding);font:600 15px/1 var(--ui-font);text-decoration:none;transition:transform .1s ease-out}
.btn-primary:active{background:var(--binding-hi);transform:scale(.98)}
.btn-primary:hover{background:var(--binding-hi)}

.h5 .section-h,.legend-wrap>summary.section-h{display:block;margin:0 0 8px;padding:0;font:400 15px/22px var(--ui-font);color:var(--muted);letter-spacing:0;text-transform:none;border:0}
.h5 .section-h [lang="he"],.legend-wrap>summary [lang="he"]{font:500 18px/22px var(--he-font);color:var(--ink);margin-right:6px}

.h5 .legend-wrap{margin:32px 0 0;border:0;background:none;padding:0}
.legend-wrap>summary{cursor:pointer;list-style:none}
.legend-wrap>summary::-webkit-details-marker{display:none}
.legend-wrap>summary::after{content:" ›";color:var(--muted)}
.legend-wrap[open]>summary::after{content:" ‹"}
.legend{display:block;margin:0;padding:0;border:0;background:none}
.legend .lg{display:grid;grid-template-columns:24px 1fr;gap:10px;align-items:baseline;padding:8px 0;border-top:1px solid var(--rule);background:none;border-radius:0}
.legend .swatch{display:block;width:24px;height:0;border:0;border-bottom:2px solid var(--c);border-radius:0;background:none;align-self:center}
.legend .lg b{font:400 15px/22px var(--ui-font);color:var(--c)}
.legend .lg b .en-he{font:500 18px/22px var(--he-font);color:var(--c);margin-right:6px}
.legend .lg .d{font:400 15px/22px var(--ui-font);color:var(--text)}
.t-mishnah{--c:var(--mishnah)}

/* ---------- the sugya's shape: pencil ticks ---------- */
.ticks{display:flex;align-items:flex-end;gap:2px;height:16px;margin:16px 0 0;padding:0}
.ticks .tk{display:block;flex:1 1 0;min-width:0;height:3px;margin:0;padding:0;border:0;border-radius:0;background:var(--c);opacity:.9;cursor:pointer}
.ticks .tk.cur{height:8px;opacity:1}
.ticks .tk:hover{height:6px}
body.no-colors .ticks .tk{--c:var(--muted)}

/* ---------- the daf page: running head, title, step ---------- */
body.on-daf #view{display:flex;flex-direction:column}
body.on-daf #view>*{min-width:0}
.dafhead:not(.chooser){display:contents}
.dafhead:not(.chooser)>.runhead{order:1}
.dafhead:not(.chooser)>.refline{order:2}
.dafhead:not(.chooser)>.modebar{order:3}
.dafhead:not(.chooser)>.topic{order:4}
#view>.notice{order:5}
#view>#dafBody{order:6}
.dafhead:not(.chooser)>.headbar{order:7}
.dafhead:not(.chooser)>.ovpanel{order:8}
.dafhead:not(.chooser)>.note-ai{order:9}
#view>#endnav{order:10}
.dafhead{background:none;border:0;border-radius:0;box-shadow:none;padding:0;margin:0}
.dafhead.chooser{padding:16px 0 0}
.runhead{display:flex;direction:rtl;align-items:baseline;justify-content:space-between;gap:12px;margin:12px 0 0;padding:0 0 4px;border-bottom:1px solid var(--rule);font:500 16px/24px var(--he-font);color:var(--muted)}
.runhead .he{font-size:16px;color:var(--muted)}
.runhead #perekSlot{flex:1;text-align:center;margin:0;padding:0;min-width:0}
.runhead .perekline{display:inline-flex;flex-direction:column;align-items:center;gap:0;margin:0;padding:0;min-height:0;border:0;border-radius:0;background:none;color:var(--muted);font:500 16px/24px var(--he-font);cursor:pointer;direction:rtl}
.runhead .perekline:hover .he{color:var(--ink)}
.runhead .perekline .pk-next{font:400 13px/18px var(--ui-font);color:var(--muted);direction:ltr}
.runhead .perekline .pk-next .he{font-size:14px}
.refline{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;margin:16px 0 0;padding:0}
.refline .he{order:0;font:700 26px/32px var(--he-font);color:var(--ink);margin:0}
.refline h1{order:1;margin:0;font:400 15px/22px var(--ui-font);color:var(--muted);letter-spacing:0}
.modebar{display:flex;gap:20px;margin:8px 0 0;padding:0;border:0;background:none;border-radius:0}
.modebar .mb-o{display:inline-flex;align-items:center;min-height:36px;padding:0;margin:0;border:0;border-radius:0;background:none;color:var(--muted);font:400 15px var(--ui-font);text-decoration:none;box-shadow:none}
.modebar .mb-o b{font-weight:400}
.modebar .mb-o.on{color:var(--ink);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:6px}
.modebar .mb-o.on b{font-weight:600}
.modebar .mb-o small,.modebar .mb-o span{display:none}
.dafhead .topic{margin:8px 0 0;font:400 17px/27px var(--ui-font);color:var(--text);max-width:34em}
.headbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 20px;margin:32px 0 0;padding:12px 0 0;border-top:1px solid var(--rule)}
.headbar .ovbtn,.headactions .btn{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0;margin:0;border:0;border-radius:0;background:none;color:var(--ink);font:400 15px var(--ui-font);text-decoration:underline;text-underline-offset:3px;box-shadow:none}
.headactions{display:flex;gap:20px;margin:0}
.headactions .btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.5}
.headactions .btn.on svg{fill:currentColor}
.headbar .ovbtn svg{width:16px;height:16px}
.ovpanel{margin:8px 0 0;padding:0;border:0;background:none}
.ovpanel .overview{font:400 17px/27px var(--ui-font);color:var(--text);max-width:34em}
.typecounts{display:flex;flex-wrap:wrap;gap:4px 16px;margin:8px 0 0}
.typecount{border:0;background:none;padding:0;border-radius:0;font:400 15px var(--ui-font);color:var(--c);text-decoration:underline;text-decoration-color:var(--c);text-decoration-thickness:2px;text-underline-offset:5px}
.note-ai{margin:12px 0 0;font:400 12px/16px var(--ui-font);color:var(--muted)}
#view>#endnav a{font:400 15px var(--ui-font);color:var(--ink)}
.notice{margin:16px 0 0;padding:12px 0;border:0;border-top:1px solid var(--rule);border-bottom:1px solid var(--rule);border-radius:0;background:none}
.notice .btn{border:0;background:none;padding:0;min-height:44px;color:var(--ink);text-decoration:underline;text-underline-offset:3px;border-radius:0}

/* steps */
#dafBody{margin:0;padding:0}
#dafBody>.legend-wrap{display:none}
.steps{margin:0;padding:0;gap:0}
.steps .step{background:none;border:0;border-radius:0;box-shadow:none;margin:0;padding:0}
body.onestep #dafBody .steps .step.cur{margin:0;padding:16px 0 0;border:0;animation:gc-step-in .18s cubic-bezier(.2,.8,.2,1)}
@keyframes gc-step-in{from{opacity:0;transform:translateX(-24px)}to{opacity:1;transform:none}}
.step .sh{display:flex;align-items:baseline;gap:10px;width:100%;margin:0;padding:0;min-height:0;border:0;border-radius:0;background:none;text-align:left;color:var(--c)}
body.onestep .step .sh .num{display:none}
.step .sh .num{background:none;border:0;color:var(--c);font:600 15px var(--ui-font);width:auto;height:auto;min-width:0;padding:0;border-radius:0}
.step .sh .tname{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px;font:400 15px/22px var(--ui-font);color:var(--c)}
.step .sh .tname .he{order:0;margin:0;font:500 18px/24px var(--he-font);color:var(--c)}
.step .sh .tname .ten{order:1;font:400 15px/22px var(--ui-font);color:var(--c)}
.step .sh .tname .stag,.step .sh .tname .mbadge{order:2;font:400 12px/16px var(--ui-font);color:var(--muted);border:1px solid var(--rule);background:none;border-radius:2px;padding:1px 6px;text-transform:none;letter-spacing:0}
.step .sh .mbadge .he{font-size:14px;color:var(--muted)}
.step .sbody{padding:0;margin:0}
.step .stitle{margin:8px 0 0;font:600 20px/26px var(--ui-font);color:var(--ink);letter-spacing:0;text-align:left;max-width:34em}
.step .ssum{margin:8px 0 0;font:400 17px/27px var(--ui-font);font-style:normal;color:var(--text);text-align:left;max-width:34em}
.step .classic-mark{margin:0 0 8px;padding:0;border:0;font:400 15px/22px var(--ui-font);color:var(--muted)}
.step .classic-mark a{color:var(--ink)}
.phrases{margin:16px 0 0;border:0;gap:0}
.ph{gap:4px;padding:12px 0;border:0;border-bottom:1px solid var(--rule)}
.ph:last-child{border-bottom:0}
.ph .pa{font:400 var(--he-size)/1.75 var(--he-font);color:var(--ink);text-align:justify;text-align-last:right}
.step .ph .pa{text-decoration:none}
.ph .pe{font:400 var(--en-size)/1.6 var(--ui-font);color:var(--text);max-width:34em}
.ph .pnote{margin:4px 0 0;font:400 15px/22px var(--ui-font);color:var(--muted);background:none;border:0;padding:0}
.explain-btn{display:inline-flex;align-items:center;gap:6px;margin:16px 0 0;min-height:44px;padding:0;border:0;border-radius:0;background:none;color:var(--ink);font:600 15px var(--ui-font);text-decoration:underline;text-underline-offset:3px;box-shadow:none}
.explain-btn svg{width:16px;height:16px}
.explain{margin:8px 0 0;padding:0;border:0;background:none;max-width:34em}
.explain h4,.explain .box h4,.explain section h4{margin:16px 0 4px;font:600 15px/22px var(--ui-font);color:var(--ink);letter-spacing:0;text-transform:none}
.explain p{margin:0 0 8px;font:400 17px/27px var(--ui-font);color:var(--text)}
.explain .box{margin:16px 0 0;padding:12px 0 0;border:0;border-top:1px solid var(--rule);border-radius:0;background:none}
.explain details{border:0;border-top:1px solid var(--rule);background:none;border-radius:0;padding:0}
.explain details>summary{min-height:44px;display:flex;align-items:center;font:400 15px var(--ui-font);color:var(--ink);cursor:pointer}
.explain dl{font:400 15px/22px var(--ui-font)}
.stepnav{display:flex;justify-content:space-between;align-items:center;margin:24px 0 0;padding:0;border:0}
.stepnav button{display:inline-flex;align-items:center;justify-content:center;width:48px;height:44px;margin:0;padding:0;border:0;border-radius:0;background:none;color:var(--ink);box-shadow:none}
.stepnav .fwd{margin-left:auto}
.stepnav button:active{background:var(--panel-2)}
.related,.rel-line{font:400 15px/22px var(--ui-font);color:var(--muted)}

/* desktop: Hebrew on the right, English on the left, the binding full width, the page in a centred column */
@media (min-width:1024px){
  :root{--he-size:calc(24px * var(--scale));--en-size:calc(18px * var(--scale))}
  body{background:var(--bg)}
  .refline .he{font-size:30px;line-height:36px}
  
  
  
  .ph{grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:32px}
  .ph .pa{order:2}
  .ph .pe{order:1;padding-top:4px}
  body.on-daf main#view{max-width:760px;margin:0 auto;padding:0 32px 48px}
}

/* ---------- sidebar (desktop step list) ---------- */
.sidebar{background:var(--bg);border-color:var(--rule)}
.fnode{border:0;border-radius:0;background:none;box-shadow:none;font:400 15px/22px var(--ui-font);color:var(--text)}
.fnode.cur{background:var(--panel-2);color:var(--ink)}
.fnode .he{font-size:16px}
.side-hide,.side-show{border:0;border-radius:0;background:none;box-shadow:none;color:var(--muted)}

/* ---------- sheets: picker, settings, help ---------- */
.sheet-backdrop{background:rgba(26,22,18,.38)}
.sheet{background:var(--bg);border:0;border-radius:8px 8px 0 0;box-shadow:0 8px 24px rgba(42,29,21,.18);animation:gc-sheet .2s cubic-bezier(.2,.8,.2,1)}
@keyframes gc-sheet{from{transform:translateY(24px);opacity:0}to{transform:none;opacity:1}}
@media (min-width:760px){.sheet{width:min(560px,94vw);border-radius:4px;animation:none}}
.sheet-head{padding:12px 20px 8px;border-bottom:1px solid var(--rule);background:none}
.sheet-head h2{font:600 18px/26px var(--ui-font);color:var(--ink);letter-spacing:0}
.sheet-head .iconbtn{border:0;background:none;border-radius:0;min-width:44px;height:44px;color:var(--ink);font-size:18px}
.sheet-body{padding:8px 20px 24px}
.sheet .input,#gotoInput{width:100%;height:44px;padding:0;border:0;border-bottom:1px solid var(--ink);border-radius:0;background:none;color:var(--ink);font:400 16px var(--ui-font);box-shadow:none}
.sheet .input:focus{outline:0;border-bottom-width:2px}
.sugg button,.sugg a{border:0;border-bottom:1px solid var(--rule);border-radius:0;background:none;font:400 15px var(--ui-font);color:var(--ink)}
.sheet .chip{border:0;border-radius:0;background:none;box-shadow:none;padding:0;min-height:44px;font:400 15px var(--ui-font);color:var(--ink)}
#yomiSlot{margin:8px 0 0}
#yomiSlot .chip{color:var(--gold-ink);gap:8px}
#yomiSlot .chip::before{content:"דף היומי";font:500 18px/1 var(--he-font);color:var(--gold-ink);margin-right:8px}
#yomiSlot .chip b{font-weight:400;color:var(--gold-ink)}
#yomiSlot .chip .x{display:none}
.dp-seder,.sheet .seder{margin:24px 0 4px;padding:0;font:500 18px/26px var(--he-font);color:var(--ink);letter-spacing:0;text-transform:none;border:0;background:none}
.dp-seder .en-he::before{content:"סדר "}
.masgrid.dp-list{display:block;margin:0;padding:0;border-bottom:1px solid var(--rule)}
.masbtn{display:flex;align-items:baseline;gap:12px;width:100%;min-height:48px;margin:0;padding:12px 0;border:0;border-top:1px solid var(--rule);border-radius:0;background:none;text-align:left;box-shadow:none;color:var(--ink)}
.masbtn .mb-names{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;min-width:0}
.masbtn .mb-he{order:-1;font:500 18px/24px var(--he-font);color:var(--ink)}
.masbtn .mb-en{font:400 15px/22px var(--ui-font);color:var(--muted)}
.masbtn .dp-n{margin-left:auto;font:400 12px/16px var(--ui-font);color:var(--muted);font-variant-numeric:tabular-nums;background:none;border:0;padding:0;white-space:nowrap}
.masbtn:active{background:var(--panel-2)}
#pickBody>h3{margin:8px 0 0;font:700 26px/32px var(--he-font);color:var(--ink)}
.sheet .seder .chip{color:var(--ink);text-decoration:underline;text-underline-offset:3px;font-family:var(--ui-font);font-size:15px}
.ofl-slot{margin:4px 0 0}
.ofl-save,.sheet .btn{border:0;border-radius:0;background:none;box-shadow:none;padding:0;min-height:44px;color:var(--ink);font:400 15px var(--ui-font);text-decoration:underline;text-underline-offset:3px}
.ofl-save .ic svg{width:16px;height:16px}
.ofl-save .sz{color:var(--muted);text-decoration:none}
.tabs,.mi-tabs{display:flex;gap:20px;border:0;background:none;padding:0;margin:8px 0 0;border-radius:0}
.tabs button,.mi-tabs button{min-height:40px;padding:0;border:0;border-radius:0;background:none;color:var(--muted);font:400 15px var(--ui-font);box-shadow:none}
.tabs button.on,.tabs button[aria-selected="true"],.mi-tabs button.on,.mi-tabs button[aria-selected="true"]{color:var(--ink);font-weight:600;text-decoration:underline;text-underline-offset:6px}
.mi-tabs{justify-content:flex-start}.mi-tabs button{flex:none} /* Oct 30: "By daf | By Mishnah" sit together at the start of the line, not stretched to opposite halves */
.legend-mini{margin:8px 0 0;font:400 12px/16px var(--ui-font);color:var(--muted);gap:12px}
.legend-mini i{width:5px;height:5px;border-radius:50%;background:var(--ink);border:0;vertical-align:2px}
.legend-mini i.mid{background:none;border:1px solid var(--ink)}
.pk-jump{display:none}
.pk{margin:24px 0 0}
.pk-h{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin:0;padding:0 0 4px;border-bottom:1px solid var(--ink);font:500 18px/26px var(--he-font);color:var(--ink);direction:rtl}
.pk-h .he{font-size:18px}
.pk-r{font:400 12px/16px var(--ui-font);color:var(--muted);font-variant-numeric:tabular-nums;direction:ltr}
/* Oct 30 2026 (David: the daf picker looked "off balance"): one even ledger for every perek. Each daf is a cell of the same width on a fixed
   column grid (5 across on a phone, 10 on a wider screen), filled from the right, so a short last row lines up under the full row above it and
   the columns line up from perek to perek. The ruled lines are drawn by the grid itself, one under every row and the full width of the perek,
   so a short row is ruled as wide as a full one. Each daf's two amudim sit as a pair close under its number (the tap area still fills each
   half of the cell), with clear room between one daf and the next; an amud that belongs to the neighbouring perek leaves a faint dash so the
   pair keeps its shape. */
.dafgrid{--row:90px;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-rows:var(--row);gap:0;margin:0;direction:rtl;border:0;background:linear-gradient(to top,var(--rule) 1px,transparent 1px) 0 0/100% var(--row) repeat-y}
.dafcell{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto;align-content:start;column-gap:2px;min-width:0;padding:0 4px;border:0;border-radius:0;background:none;overflow:visible;direction:rtl}
.dafcell .dn{grid-column:1 / 3;display:flex;flex-direction:column;align-items:center;padding:7px 0 2px;min-width:0;font-weight:400;color:var(--ink)}
.dafcell .dn b{font:500 18px/22px var(--he-font);color:var(--ink)}
.dafcell .dn small{font:400 11px/14px var(--ui-font);color:var(--muted);font-variant-numeric:tabular-nums}
.dafcell button,.dafcell .am-x{--o:0px;display:block;min-width:0;min-height:40px;margin:0;border:0;border-radius:0;background:none;color:var(--muted);font:400 15px/1 var(--ui-font);text-align:center;padding:0;position:relative;isolation:isolate}
.dafcell>:nth-child(2){--o:-6px;padding-right:12px}
.dafcell>:nth-child(3){--o:6px;padding-left:12px}
.dafcell button::before{content:"";position:absolute;z-index:-1;top:50%;left:calc(50% + var(--o));width:22px;height:30px;transform:translate(-50%,-50%);border-radius:3px;background:transparent}
.dafcell .am-x::before{content:"";position:absolute;left:calc(50% + var(--o));top:50%;width:8px;height:1px;margin-left:-4px;background:var(--rule)}
.dafcell button.has{background:none;color:var(--ink);font-weight:600}
.dafcell button.has::after{content:"";position:absolute;left:calc(50% + var(--o));bottom:5px;width:4px;height:4px;margin-left:-2px;border-radius:50%;background:var(--ink)}
.dafcell button.mid{background-image:none}
.dafcell button.has.mid::after{background:none;border:1px solid var(--ink);width:5px;height:5px;margin-left:-2.5px}
.dafcell button:hover{background:none}
.dafcell button:hover::before{background:var(--panel-2)}
.dafcell button.cur{outline:0;background:none;color:var(--on-binding)}
.dafcell button.cur::before{background:var(--binding)}
.dafcell button.cur::after{background:var(--on-binding);bottom:8px}
.dafcell button.cur.has.mid::after{background:none;border-color:var(--on-binding)}
.dafcell button:disabled{opacity:.3}
@media (min-width:600px){
  .dafgrid{--row:84px;grid-template-columns:repeat(10,minmax(0,1fr))}
  .dafcell{padding:0 3px}
  .dafcell button,.dafcell .am-x{min-height:36px}
  .dafcell>:nth-child(2){--o:-4px;padding-right:8px}
  .dafcell>:nth-child(3){--o:4px;padding-left:8px}
  .dafcell button::before{width:18px;height:28px}
}

/* settings and other sheet lists: rows, quiet controls */
.sheet .seg,.sheet .segmented{border:1px solid var(--rule);border-radius:3px;background:none}
.sheet .seg button,.sheet [data-theme],.sheet .segmented button{border-radius:0;box-shadow:none}
.sheet .seg button.on,.sheet [data-theme].on,.sheet [aria-pressed="true"]{background:var(--binding);color:var(--on-binding);border-color:var(--binding)}
.sheet label,.sheet .row{font:400 15px/22px var(--ui-font)}
.sheet h3,.sheet h4{font:600 15px/22px var(--ui-font);color:var(--ink);letter-spacing:0;text-transform:none}

/* ---------- Ameilus ---------- */
.am-head{padding:16px 0 0;border:0;background:none}
.am-title{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;margin:0}
.am-title .am-hetitle{order:0;font:700 26px/32px var(--he-font);color:var(--ink)}
.am-title .am-entitle{order:1;font:400 15px/22px var(--ui-font);color:var(--muted)}
.am-sub{font:400 15px/22px var(--ui-font);color:var(--muted)}
.am-daf{font-family:var(--he-font);color:var(--ink)}
.am .iconbtn,.am-headnav .iconbtn{border:0;background:none;border-radius:0;box-shadow:none}
.am .btn,.am-bar .btn,.am-walk .btn{border-radius:3px;box-shadow:none}
.am-bar,.am-walk,.am-panel{background:var(--bg);border-color:var(--rule);box-shadow:none}

/* ---------- toast, first-visit notice, help ---------- */
.toast{background:var(--binding);color:var(--on-binding);border-radius:3px;box-shadow:none;font:400 15px var(--ui-font)}
.btn{box-shadow:none}

@media (prefers-reduced-motion:reduce){
  body.onestep #dafBody .steps .step.cur,.sheet{animation:none}
  .btn-primary{transition:none}
}

/* v5 fixes after the first look */
#view:focus,#view:focus-visible,main:focus{outline:none}
.topbar #settingsBtn.pf{border:0;background:none;color:var(--on-binding);padding:0 8px}
.topbar #settingsBtn.pf:hover,.topbar #settingsBtn.pf.open{background:var(--binding-hi);border:0}
.topbar #settingsBtn.pf .pf-chev{color:var(--on-binding);opacity:.7}
.topbar .hp-q{font:400 17px var(--ui-font);color:var(--on-binding)}
/* v5b: no pencil underlines; the step's colour lives in the tick strip, its label and the key; the words stay ink */
.headbar .ovbtn{width:auto;flex:none;justify-content:flex-start}
.headbar .headactions .hl{display:inline}
.headbar .headactions{margin-left:0}

.step .classic-mark,.step .classic-mark.start{background:none;border:0;padding:0;border-radius:0}
.headactions .btn{width:auto;min-width:0;flex:none}
.headactions .btn svg{display:inline-block}
.masbtn .mb-names{flex-direction:row;flex:1 1 auto}
.dp-seder{display:flex;flex-direction:row-reverse;justify-content:flex-end;align-items:baseline;gap:10px;font:400 15px/22px var(--ui-font);color:var(--muted)}
.dp-seder .en-he{font:500 18px/26px var(--he-font);color:var(--ink)}
#yomiSlot .chip::before{content:none}

/* desktop step list: a quiet index, kind colour as a short pencil mark */
.flow{padding:16px 12px 48px 16px}
.flow h2{font:500 18px/26px var(--he-font);color:var(--ink);margin:0 0 8px;letter-spacing:0;text-transform:none}
.flow h2::before{content:"שלבים ";}
.flow .phase{margin:16px 0 4px;font:400 14px/20px var(--ui-font);color:var(--muted);letter-spacing:0;text-transform:none}
.fnode{display:grid;grid-template-columns:24px 1fr;gap:8px;padding:8px 8px 8px calc(4px + var(--d,0) * 12px);border:0;border-radius:0;background:none;color:var(--text);text-decoration:none;font:400 15px/22px var(--ui-font)}
.fnode .dot{width:auto;height:auto;min-width:0;border:0;border-radius:0;background:none;color:var(--muted);font:400 14px/22px var(--ui-font);font-variant-numeric:tabular-nums;text-align:right;box-shadow:none}
.fnode .dot::after,.fnode::before{content:none;display:none}
.fnode .fty{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;font:400 14px/20px var(--ui-font);color:var(--c);text-decoration:underline;text-decoration-color:var(--c);text-decoration-thickness:2px;text-underline-offset:5px;margin-bottom:4px;letter-spacing:0;text-transform:none}
.fnode .fty .he{order:-1;font:500 16px/20px var(--he-font);color:var(--c)}
.fnode .fty .mbadge,.fnode .fty .stag{font:400 12px/16px var(--ui-font);color:var(--muted);border:0;background:none;padding:0;text-decoration:none}
.fnode .mbadge .mb-he{display:none}
.fnode.cur{background:var(--panel-2)}
.fnode.cur .dot{color:var(--ink);font-weight:600}
.fnode:hover{background:var(--panel-2)}
.fband{border:0;background:none;padding:0;margin:0}
.side-resize{background:none;border-left:1px solid var(--rule)}

.flow .fnode .dot,.flow .fnode.cur .dot,.layout .sidebar .fnode .dot{width:auto;height:auto;min-width:0;border:0;border-radius:0;background:none;color:var(--muted);box-shadow:none;outline:0}
.flow .fnode.cur .dot,.layout .sidebar .fnode.cur .dot{color:var(--ink);font-weight:600}
@media (min-width:1024px){body.on-daf .topbar .brand-name{display:inline}}

.sheet .dp-seder{display:flex;flex-direction:row-reverse;justify-content:flex-end;align-items:baseline;gap:10px;font:400 15px/22px var(--ui-font);color:var(--muted)}
.sheet .dp-seder .en-he{font:500 18px/26px var(--he-font);color:var(--ink)}
.am button.btn,.am-bar button,.am-actions button{background:none;border:1px solid var(--rule);border-radius:3px;box-shadow:none;color:var(--ink);font-family:var(--ui-font)}

.dafhead .refline{justify-content:flex-start;gap:4px 12px}
.dafhead .refline .he{font-size:26px;line-height:32px}
@media (min-width:1024px){.dafhead .refline .he{font-size:30px;line-height:36px}}

/* ===== Ways to learn, option B (Oct 30 2026 test): one stage, three modes; each mode drawn as its own object ===== */

/* Flow: a small deck of the day's real steps */

/* Ameilus: a worksheet line in pencil */

/* Classics: the volumes on a shelf */

/* Nov 5 2026: "Report a mistake" links (amud note and the end of each step's explanation) */
.explain .report{margin:16px 0 2px;font:400 14px/1.4 var(--ui-font)}
.explain .report a,.note-ai a{color:var(--muted);text-decoration:underline;text-underline-offset:2px}
.explain .report a:hover,.note-ai a:hover{color:var(--ink)}
/* Nov 5 2026: on phones the Bookmark and Share labels show, so their buttons must grow to fit them (they ran together as "BookmarkShare") */
@media (max-width:640px){.headbar .headactions{gap:14px}.headbar .headactions .btn{width:auto;gap:5px}}
/* Nov 5 2026: a one-line "what this is" for first-time visitors (hidden once they have history) */

/* Nov 5 2026: the A-/A+ text size (Settings, 85-170%) now enlarges the explanations too, not only the Aramaic and English lines.
   The phrase rows already scale through --he-size/--en-size; these blocks are zoomed by the same factor. */
.stitle,.ssum,.explain,.dafhead .topic,.dafhead .overview,.note-ai,.stepnav,.srel{zoom:var(--scale)}
/* Rashi and Tosfos (Nov 6 2026): two quiet buttons under each step; each opens its commentary on that step, Hebrew in Rashi script with the English under it */
.rt{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.rt:empty{display:none}
.rt-btn{display:inline-flex;align-items:center;gap:7px;min-height:40px;padding:0 14px;border-radius:3px;border:1px solid var(--border);background:var(--panel);color:var(--text);font:inherit;font-weight:700;font-size:14.5px;cursor:pointer}
.rt-btn:hover{border-color:var(--muted)}
.rt-btn[aria-expanded=true]{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,var(--panel))}
.rt-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.rt-heb{font-family:var(--rashi-font);font-weight:400;font-size:15px;color:var(--muted)}
.rt-n{min-width:22px;padding:0 6px;border-radius:9px;background:color-mix(in srgb,var(--accent) 12%,transparent);font-size:12.5px;font-weight:800;text-align:center}
.rt-panel{flex-basis:100%;margin-top:2px;padding:4px 16px 10px;border-left:3px solid var(--border);background:color-mix(in srgb,var(--accent) 3%,transparent)}
.rt-c{padding:12px 0;border-bottom:1px solid var(--border-2)}
.rt-c:last-of-type{border-bottom:0}
.rt-he{margin:0 0 6px;font-family:var(--rashi-font);font-size:calc(19px * var(--scale,1));line-height:1.75;text-align:right}
.rt-he b{font-weight:600}
.rt-en{margin:0;font-size:calc(15.5px * var(--scale,1));line-height:1.55;color:var(--text)}
.rt-none{color:var(--muted);font-style:italic;font-size:14px}
.rt-src{margin:8px 0 0;font-size:13px;color:var(--muted)}

/* ===================================================================================================
   v6 "Clear and Calm" (Nov 9 2026, chosen by David from three mockups). The last word over every layer above.
   A clean page; the phone's own sans-serif for everything you tap or scan, the book serif (Spectral) for what you read,
   Frank Ruhl for the Hebrew. One accent (navy) for actions; the eight step colours stay as they were and live in
   soft pills, the step strip and the step list. Soft cards, rounded controls, no heavy frame.
   =================================================================================================== */
:root{
  --ui-font:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Frank Ruhl Libre",sans-serif;
  --sc-font:var(--ui-font);
  --read-font:'Spectral',Georgia,'Frank Ruhl Libre',serif;
  --r-sm:10px;--r-md:14px;--r-lg:20px;
}
body.theme-light{
  --bg:#ffffff;--panel:#ffffff;--panel-2:#f3f4f7;--raise:#ffffff;--ink:#0f1218;--text:#30343b;--muted:#5b6270;--faint:#5b6270;
  --rule:#e5e7ec;--border:#e5e7ec;--border-2:#eef0f3;--accent:#1d3f9e;--accent-ink:#ffffff;--desk:#f3f4f7;
  --binding:#1d3f9e;--binding-hi:#16327e;--on-binding:#ffffff;--gold:#b08a3e;--gold-ink:#1d3f9e;
  --shade:rgba(15,18,24,.08);--scrim:rgba(15,18,24,.40);--toast-bg:#0f1218;--toast-ink:#ffffff;
}
body.theme-sepia{
  --bg:#f7f1e3;--panel:#f7f1e3;--panel-2:#efe6d2;--raise:#faf5ea;--ink:#1d170e;--text:#3a3226;--muted:#5f5445;--faint:#5f5445;
  --rule:#e3d8c0;--border:#e3d8c0;--border-2:#eadfc9;--accent:#2a4086;--accent-ink:#ffffff;--desk:#efe6d2;
  --binding:#2a4086;--binding-hi:#22356f;--on-binding:#ffffff;--gold:#b08a3e;--gold-ink:#2a4086;
  --shade:rgba(40,28,10,.10);--scrim:rgba(30,22,10,.40);--toast-bg:#1d170e;--toast-ink:#f7f1e3;
}
body.theme-dark{
  --bg:#101215;--panel:#101215;--panel-2:#1a1d22;--raise:#16191d;--ink:#f1f3f6;--text:#cfd3da;--muted:#9aa1ad;--faint:#9aa1ad;
  --rule:#262a31;--border:#262a31;--border-2:#1f2328;--accent:#a9bdff;--accent-ink:#0b1020;--desk:#0b0d10;
  --binding:#a9bdff;--binding-hi:#c3d0ff;--on-binding:#0b1020;--gold:#d2ad5e;--gold-ink:#a9bdff;
  --shade:rgba(0,0,0,.35);--scrim:rgba(0,0,0,.55);--toast-bg:#f1f3f6;--toast-ink:#101215;
}
body{font-family:var(--ui-font);font-size:16px;line-height:1.55}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:6px}
a{color:var(--accent)}

/* what you read is in the book serif */
.step .ssum,.ph .pe,.ph .pnote,.explain p,.explain dl,.dafhead .topic,.ovpanel .overview,.rt-en{font-family:var(--read-font)}

/* ---------- top bar: a clean bar in the page colour, a hairline under it ---------- */
.topbar{background:var(--bg);color:var(--ink);border-bottom:1px solid var(--rule);padding:env(safe-area-inset-top) 10px 0 14px;height:calc(52px + env(safe-area-inset-top))}
.topbar .brand{color:var(--ink);align-items:center;gap:8px}
.topbar .brand-he{font:800 22px/1 var(--he-font);color:var(--ink)}
.topbar .brand-logo{top:0;width:26px;height:26px}
.topbar .brand-name{font:600 15px/1 var(--ui-font);letter-spacing:-.01em;color:var(--ink)}
.topbar .refbtn{min-height:36px;padding:0 12px;border-radius:999px;background:var(--panel-2);color:var(--ink);font:500 15px var(--ui-font);gap:4px}
.topbar .refbtn:hover span{text-decoration:none}
.topbar .refbtn:hover{background:color-mix(in srgb,var(--ink) 8%,var(--panel-2))}
.topbar .iconbtn,.topbar .aa,.topbar .hp-q,.topbar #settingsBtn.pf,.topbar #settingsBtn.pf .pf-chev{color:var(--ink);font-family:var(--ui-font)}
.topbar .iconbtn{border-radius:10px}
.topbar .iconbtn:active,.topbar .refbtn:active,.topbar #settingsBtn.pf:hover,.topbar #settingsBtn.pf.open{background:var(--panel-2)}
.topbar #settingsBtn.pf{border-radius:10px;font-weight:500}

/* ---------- buttons: one accent, rounded ---------- */
.btn-primary{height:46px;padding:0 22px;border-radius:999px;background:var(--accent);color:var(--accent-ink);font:600 15px/1 var(--ui-font)}
.btn-primary:hover,.btn-primary:active{background:color-mix(in srgb,var(--accent) 88%,var(--ink))}

.toast{background:var(--toast-bg);color:var(--toast-ink);border-radius:12px;font:500 15px var(--ui-font);box-shadow:0 8px 24px -8px var(--shade)}

/* ---------- home ---------- */

.h5 .amud{background:var(--panel-2);border-radius:var(--r-lg);padding:16px 18px 20px}

#yomiS{color:var(--muted);font-weight:400}

.h5 .section-h,.legend-wrap>summary.section-h{font:600 13px/20px var(--ui-font);color:var(--muted)}

.legend .swatch{width:12px;height:12px;border:0;border-radius:3px;background:var(--c)}
.legend .lg{grid-template-columns:12px 1fr;align-items:center}
.legend .lg b{font-family:var(--ui-font);font-weight:600}

/* ---------- the daf page ---------- */
.runhead{border-bottom:0;font-size:14px}
.runhead .he,.runhead .perekline{font-size:14px}
.refline .he{font-weight:700}
.modebar{gap:4px;margin:12px 0 0;padding:3px;border-radius:999px;background:var(--panel-2);width:max-content;max-width:100%}
.modebar .mb-o{min-height:34px;padding:0 14px;border-radius:999px;color:var(--muted);font:500 14px var(--ui-font)}
.modebar .mb-o.on{text-decoration:none;color:var(--ink);background:var(--bg);box-shadow:0 1px 2px var(--shade)}
.dafhead .topic{font-size:17px}
.headbar{border-top-color:var(--rule)}
.headbar .ovbtn,.headactions .btn,.notice .btn,.explain-btn{min-height:38px;padding:0 14px;border-radius:999px;background:var(--panel-2);color:var(--ink);font:500 14px var(--ui-font);text-decoration:none}
.headbar .ovbtn:hover,.headactions .btn:hover,.explain-btn:hover{background:color-mix(in srgb,var(--ink) 7%,var(--panel-2))}
.headactions{gap:8px}
.typecount{font-family:var(--ui-font);text-decoration:none;padding:3px 10px;border-radius:999px;background:color-mix(in srgb,var(--c) var(--pill-a),transparent)}
.notice{border:0;border-radius:var(--r-md);background:var(--panel-2);padding:12px 16px}

/* the strip: the shape of the sugya; the current step is the long, solid one */
.ticks{gap:4px;height:10px;align-items:center;margin:18px 0 0}
.ticks .tk{height:6px;border-radius:3px;opacity:.38}
.ticks .tk.cur{height:6px;opacity:1;flex-grow:2.4}
.ticks .tk:hover{height:6px;opacity:.7}

/* the step: its kind in soft pills, the Aramaic and English together on one card */
body.onestep #dafBody .steps .step.cur{padding-top:20px}
.step .sh .tname{gap:6px;font-family:var(--ui-font)}
.step .sh .tname .he,.step .sh .tname .ten{padding:4px 11px;border-radius:999px;background:color-mix(in srgb,var(--c) var(--pill-a),transparent);color:var(--c)}
.step .sh .tname .he{font:600 16px/22px var(--he-font)}
.step .sh .tname .ten{font:600 14px/22px var(--ui-font)}
.step .sh .tname .stag,.step .sh .tname .mbadge{font:500 12px/18px var(--ui-font);border-radius:999px;border-color:var(--rule);padding:2px 9px;align-self:center}
.step .stitle{margin-top:12px;font:650 21px/1.3 var(--ui-font);letter-spacing:-.01em}
.step .ssum{font-size:17px;line-height:1.6}
.phrases{margin-top:18px;padding:4px 18px;border-radius:var(--r-lg);background:var(--panel-2)}
.ph{padding:14px 0;border-bottom-color:var(--rule)}
.ph .pe{font-size:var(--en-size)}
.ph .pnote{font-size:15px}
.rt-btn{min-height:40px;padding:0 14px;border:0;border-radius:999px;background:var(--panel-2);color:var(--ink);font:600 14px var(--ui-font)}
.rt-btn:hover{background:color-mix(in srgb,var(--ink) 7%,var(--panel-2))}
.rt-btn[aria-expanded=true]{background:color-mix(in srgb,var(--accent) 14%,var(--panel-2))}
.rt-n{background:var(--bg)}
.rt-panel{border-left:0;border-radius:var(--r-md);background:var(--panel-2);padding:4px 16px 10px}
.explain .box,.explain details{border-top-color:var(--rule)}
.explain h4{font-family:var(--ui-font)}

/* the bottom bar: back, where you are (tap for every step), Next */
.bottombar{display:flex;align-items:center;gap:10px;padding:8px max(12px,calc((100% - var(--max)) / 2)) calc(10px + env(safe-area-inset-bottom));background:color-mix(in srgb,var(--bg) 92%,transparent);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
.bottombar[hidden],body:not(.onestep) .bottombar{display:none}
.bottombar .sbar{flex:1;width:auto;min-width:0;min-height:44px;border-radius:999px;font:400 14px/44px var(--ui-font);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bottombar .sbar:hover{background:var(--panel-2)}
.bottombar .sc-k{color:var(--c);font-weight:600}
.bb-step{flex:none;display:inline-flex;align-items:center;justify-content:center;gap:6px;height:44px;border:0;border-radius:999px;font:600 15px/1 var(--ui-font);cursor:pointer}
.bb-step svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.bb-prev{width:44px;background:var(--panel-2);color:var(--ink)}
.bb-next{padding:0 14px 0 18px;background:var(--accent);color:var(--accent-ink);max-width:58vw}
.bb-next span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bb-step:disabled{opacity:.35;cursor:default}
.bb-next[hidden]{display:none}
body.onestep .stepnav{display:none}

/* ---------- desktop step list ---------- */
.flow h2{font:600 13px/20px var(--ui-font);color:var(--muted)}
.flow h2::before{content:none}
.flow .phase{font:600 12px/18px var(--ui-font);color:var(--muted)}
.fnode{border-radius:var(--r-sm);font-family:var(--ui-font);font-size:14px;line-height:1.4}
.fnode .fty{text-decoration:none;font:600 13px/18px var(--ui-font);margin-bottom:2px}
.fnode .fty .he{font-size:15px}
.fnode:hover{background:var(--panel-2)}
.fnode.cur{background:color-mix(in srgb,var(--c,var(--accent)) var(--pill-a),transparent)}
.side-resize{border-left-color:var(--rule)}

/* ---------- sheets: picker, settings, Menu, Help ---------- */
.sheet-backdrop{background:var(--scrim)}
.sheet{border-radius:var(--r-lg) var(--r-lg) 0 0;box-shadow:0 -8px 40px -12px var(--shade)}
@media (min-width:760px){.sheet{border-radius:var(--r-lg);box-shadow:0 24px 60px -20px var(--shade)}}
.sheet-head{border-bottom:0;padding:14px 20px 6px}
.sheet-head h2{font:700 19px/26px var(--ui-font);letter-spacing:-.01em}
.sheet-head .iconbtn{border-radius:999px;background:var(--panel-2);min-width:36px;height:36px;font-size:15px}
.sheet .input,#gotoInput{height:48px;padding:0 16px;border:0;border-radius:var(--r-md);background:var(--panel-2);font-family:var(--ui-font)}
.sheet .input:focus,#gotoInput:focus{outline:2px solid var(--accent);outline-offset:0;border:0}
.masbtn{border-top-color:var(--rule)}
.masbtn .mb-en{font-family:var(--ui-font)}
.ofl-save,.sheet .btn,.sheet .seder .chip{font-family:var(--ui-font)}
.tabs button.on,.tabs button[aria-selected="true"],.mi-tabs button.on,.mi-tabs button[aria-selected="true"]{text-decoration:none;color:var(--ink);box-shadow:inset 0 -2px var(--accent)}
.sheet .seg,.sheet .segmented{border:0;border-radius:999px;background:var(--panel-2);padding:3px}
.sheet .seg button,.sheet [data-theme],.sheet .segmented button{border-radius:999px;border:0}
.sheet .seg button.on,.sheet [data-theme].on,.sheet [aria-pressed="true"]{background:var(--bg);color:var(--ink);box-shadow:0 1px 3px var(--shade)}
.pk-h{border-bottom-color:var(--rule)}
.dafcell button::before{border-radius:8px}
.dafcell button.has::after{background:var(--accent)}

/* ---------- Ameilus ---------- */
.am .btn,.am-bar .btn,.am-walk .btn,.am button.btn,.am-bar button,.am-actions button{border-radius:999px;font-family:var(--ui-font)}
.step .sh .tname .mbadge .he,.step .sh .tname .stag .he{padding:0;background:none;color:var(--muted);font-size:14px;line-height:18px}

#homeAmud .ticks .tk{opacity:.85}

/* v6: the rounder shapes everywhere else (older layers drew 3px corners on every control and card) */
.btn,.chip,.clx-chip,.seg3 button,.cl-seg button,.clx .cl-seg button,.disc .btn.primary,.am-optbtn,.kchip,.hp-act,.mw-tab,.clx-row .cl-go .btn,.sugg .chip,.sizer button,.pick-mode,.am-gopt,.am-guess,.next-step,.pasuk-ref,:is(.am,.am-bar,.am-word) .btn,:is(.am,.am-word) .chip,.srel a,.ovbtn{border-radius:999px}
.switch span{border-radius:999px;border:0;background:color-mix(in srgb,var(--ink) 14%,var(--panel-2))}
.switch span::after{background:var(--bg);box-shadow:0 1px 3px var(--shade)}
.switch input:checked+span::after{background:var(--accent-ink)}
.seg3,.cl-seg,.clx .cl-seg{border-radius:999px;border:0;background:var(--panel-2)}
.seg3 button[aria-pressed=true],.cl-seg button[aria-pressed="true"],.clx .cl-seg button[aria-pressed="true"]{background:var(--bg);color:var(--ink);box-shadow:0 1px 3px var(--shade)}
.disc{border-radius:var(--r-lg);border:0;box-shadow:0 24px 60px -20px var(--shade)}
.disc .btn.primary{font-weight:600;min-height:48px}
.am-walk{border-radius:var(--r-lg)}
.am-card,.am-word,.am-exp,.hp-card,.mw-card,.pz,.clx-seder,.box,.am-tip,.ofl,.am-hints .hb{border-radius:var(--r-md)}
.clx-row,.mi-band,.demo-step{border-radius:var(--r-sm)}
.clx-search,.searchbox,.input,.mw-search input{border-radius:var(--r-md)}
.clx-search{border:0;background:var(--panel-2)}
.clx-chip{border-color:var(--rule)}
.clx-chip.on{background:color-mix(in srgb,var(--accent) 10%,var(--bg));border-color:transparent;color:var(--accent)}
.clx-eyebrow{color:var(--accent);letter-spacing:.08em;font-weight:700;font-family:var(--ui-font)}
.clx-seder{border-color:var(--rule)}
.hp-act{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.sheet h3,.sheet h4,#pickBody>h3,.clx-t,.cl-h,.am-walk-h{font-family:var(--ui-font)}
@media (min-width:1100px){.layout.with-side ~ .bottombar #flowBtn{display:block}}
/* v6: how strongly a step's colour tints its pill; kept light enough that the coloured words on it stay at 4.5:1 or better */
body.theme-light,body.theme-sepia{--pill-a:7%}
body.theme-dark{--pill-a:12%}

/* Ameilus: the guided first passage after the walkthrough's Start (Nov 9 2026). The passage is shaded, its last word boxed. */
.am-daf .w.guide{background:color-mix(in srgb,var(--accent) 9%,transparent)}
.am-daf .w.guide-end{background:color-mix(in srgb,var(--accent) 18%,transparent);box-shadow:0 0 0 2px var(--accent) inset;border-radius:6px}
.am-daf .w.guide-end.mark{background:color-mix(in srgb,var(--accent) 34%,transparent)}
.am-coach{max-width:760px;margin:0 auto 8px;padding:10px 14px;border-radius:var(--r-md);background:var(--panel-2);color:var(--text);font:400 14px/1.45 var(--ui-font);text-align:left}
.am-coach-h{display:block;font:600 14px/20px var(--ui-font);color:var(--ink)}
.am-coach p{margin:2px 0 0}
.am-coach .am-coach-do{font-weight:600;color:var(--accent)}
.am-coach .btn{margin-top:8px;min-height:36px;padding:0 16px;border:0;border-radius:999px;background:var(--bg);color:var(--ink);font:500 14px var(--ui-font)}

/* ===================================================================================================
   v7 "Weight" (Nov 12 2026, chosen by David from the A2 mockups). The last word over every layer above.
   v6 was clear but too plain: white on white, the step colours only in pale pills, a narrow column.
   v7 keeps v6's single column and fonts and adds weight: a dark frame (navy bar, gold wordmark), a tinted page
   with white cards on it, and the step's own colour as a SOLID surface: the header of the step you are on,
   the number chips in the step list, the strip, and the Next button (which takes the colour of the step to come).
   --on-c is the text colour that sits on a solid step colour (white in light and sepia, near-black in dark).
   =================================================================================================== */
body.theme-light{
  --desk:#e8ecf4;--panel-2:#eef1f6;--rule:#dfe3ec;--border:#dfe3ec;--border-2:#e8ebf2;--muted:#4b5263;--faint:#4b5263;
  --accent:#14275f;--binding:#14275f;--binding-hi:#0c1a44;--on-binding:#ffffff;--gold:#d9b45f;--gold-ink:#14275f;--on-c:#ffffff;
}
body.theme-sepia{
  --desk:#e9dfc8;--binding:#22356f;--binding-hi:#1a2a5a;--on-binding:#ffffff;--gold:#dcb968;--gold-ink:#22356f;--on-c:#ffffff;
}
body.theme-dark{
  --desk:#0b0d10;--bg:#16191d;--panel:#16191d;--raise:#1b1f24;--binding:#0b0d10;--binding-hi:#16191d;--on-binding:#f1f3f6;--gold:#d9b45f;--gold-ink:#a9bdff;--on-c:#0b0d10;
}
html,body{background:var(--desk)}
:root{--max:980px;--top-h:56px}
.layout{max-width:1400px;padding:0 20px}

/* ---------- the frame: a navy bar, the wordmark in gold ---------- */
.topbar{background:var(--binding);color:var(--on-binding);border-bottom:0;padding:env(safe-area-inset-top) 12px 0 18px;height:calc(56px + env(safe-area-inset-top))}
body.theme-dark .topbar{border-bottom:1px solid var(--rule)}
.topbar .brand,.topbar .brand-name{color:var(--on-binding)}
.topbar .brand-he{color:var(--gold);font-size:25px}
.topbar .brand-name{font-weight:600;font-size:16px}
.topbar .refbtn{min-height:40px;padding:0 14px;border-radius:10px;background:#ffffff;color:#14275f;font:700 15px var(--ui-font)}
.topbar .refbtn:hover{background:#eef1f6}
body.theme-dark .topbar .refbtn{background:var(--panel-2);color:var(--ink)}
.topbar .iconbtn,.topbar .aa,.topbar .hp-q,.topbar #settingsBtn.pf,.topbar #settingsBtn.pf .pf-chev{color:var(--on-binding)}
.topbar .iconbtn:active,.topbar .refbtn:active,.topbar #settingsBtn.pf:hover,.topbar #settingsBtn.pf.open,.topbar .iconbtn:hover{background:rgba(255,255,255,.14)}
.topbar :focus-visible{outline-color:var(--gold)}
.topbar .modesw-a{color:var(--on-binding)}

/* ---------- controls: squarer, heavier ---------- */
.btn-primary{border-radius:12px;font-weight:700}
.modebar{background:var(--panel);border-radius:12px;padding:4px}
.modebar .mb-o{border-radius:9px;min-height:36px;font-weight:500;color:var(--text)}
.modebar .mb-o.on{background:var(--accent);color:var(--accent-ink);box-shadow:none}
.modebar .mb-o.on b{font-weight:700}
.headbar .ovbtn,.headactions .btn{background:var(--panel)}
.notice{background:var(--panel)}

/* ---------- the strip: every step in its full colour; the one you are on stands tall ---------- */
.ticks{gap:4px;height:30px;align-items:center;margin:18px 0 0}
.ticks .tk,.ticks .tk:hover{height:12px;border-radius:4px;opacity:1}
.ticks .tk.cur{height:28px;opacity:1;flex-grow:1.4}

/* ---------- the step you are on: a white card under a solid header in the step's own colour ---------- */
body.onestep #dafBody .steps .step.cur{margin-top:16px;padding:0;border:0;border-radius:16px;overflow:hidden;background:var(--panel);box-shadow:0 1px 2px var(--shade)}
body.onestep .step.cur .sh{display:flex;align-items:baseline;gap:12px;width:100%;margin:0;padding:26px 36px 4px;border-radius:0;background:var(--c);color:var(--on-c)}
body.onestep .step.cur .sh .num,body.theme-light:not(.no-colors) .step.cur .sh .num,body.theme-sepia:not(.no-colors) .step.cur .sh .num{order:9;margin-left:auto;width:auto;height:auto;border-radius:0;background:none;box-shadow:none;color:var(--on-c);font:600 15px/1 var(--ui-font)}
body.onestep .step.cur .sh .num::before{content:"Step "}
body.onestep .step.cur .sh .tname{gap:12px;align-items:baseline}
body.onestep .step.cur .sh .tname .he,body.onestep .step.cur .sh .tname .ten{padding:0;border-radius:0;background:none;color:var(--on-c)}
body.onestep .step.cur .sh .tname .he{font:700 30px/1.1 var(--he-font)}
body.onestep .step.cur .sh .tname .ten{font:700 19px/1.2 var(--ui-font)}
body.onestep .step.cur .sh .tname .stag,body.onestep .step.cur .sh .tname .mbadge,body.onestep .step.cur .sh .tname .mbadge .he,body.onestep .step.cur .sh .tname .stag .he{color:var(--on-c);border-color:color-mix(in srgb,var(--on-c) 55%,transparent)}
body.onestep .step.cur .sbody{padding:0 0 22px;opacity:1}
body.onestep .step.cur .sbody>:not(.phrases):not(.phrases ~ *){margin:0;padding:8px 36px 0;background:var(--c);color:var(--on-c)}
body.onestep .step.cur .sbody>:not(.phrases):not(.phrases ~ *) a{color:var(--on-c)}
body.onestep .step.cur .stitle{font:600 34px/1.18 var(--read-font);letter-spacing:0}
body.onestep .step.cur .ssum{font-size:19px;line-height:1.5}
body.onestep .step.cur .phrases{margin:0;padding:0;border-radius:0;background:none;border-top:26px solid var(--c)}
body.onestep .step.cur .ph{padding:0;gap:0;border-bottom:1px solid var(--rule)}
body.onestep .step.cur .ph .pa{padding:16px 20px 2px;font-size:calc(var(--he-size) * 1.25)}
body.onestep .step.cur .ph .pe{padding:2px 20px 16px;font-size:calc(var(--en-size) * 1.1)}
body.onestep .step.cur .phrases ~ *{margin-left:20px;margin-right:20px}
body.onestep .step.cur .explain-btn{margin-top:16px;min-height:44px;padding:0 18px;border:2px solid var(--ink);border-radius:12px;background:var(--panel);color:var(--ink);font:700 15px var(--ui-font)}
body.onestep .step.cur .explain h4{color:var(--c)}
@media (min-width:760px){
  body.onestep:not(.hide-translation) .step.cur .ph{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  body.onestep:not(.hide-translation) .step.cur .ph .pa{grid-column:2;grid-row:1}
  body.onestep:not(.hide-translation) .step.cur .ph .pe{grid-column:1;grid-row:1;align-self:center}
  body.onestep .step.cur .ph .pa{padding:22px 36px;font-size:calc(var(--he-size) * 1.5);background:color-mix(in srgb,var(--c) 6%,transparent)}
  body.onestep .step.cur .ph .pe{padding:22px 36px;font-size:calc(var(--en-size) * 1.3)}
  body.onestep .step.cur .phrases ~ *{margin-left:36px;margin-right:36px}
}
@media (max-width:759px){
  body.onestep .step.cur .sh{padding:18px 20px 2px}
  body.onestep .step.cur .sbody>:not(.phrases):not(.phrases ~ *){padding:6px 20px 0}
  body.onestep .step.cur .stitle{font-size:25px}
  body.onestep .step.cur .ssum{font-size:17px}
  body.onestep .step.cur .phrases{border-top-width:18px}
  body.onestep #dafBody .steps .step.cur{margin-left:-14px;margin-right:-14px;border-radius:0}
}

/* ---------- the bottom bar: Next wears the colour of the step to come ---------- */
.bottombar{background:color-mix(in srgb,var(--desk) 90%,transparent)}
.bb-step{height:48px;border-radius:12px;font-weight:700}
.bb-prev{width:48px;background:var(--panel);box-shadow:inset 0 0 0 2px var(--ink)}
.bb-next{padding:0 16px 0 20px;background:var(--accent);color:var(--accent-ink)}
body:not(.no-colors) .bb-next[class*=" t-"]{background:var(--c);color:var(--on-c)}
.bottombar .sbar{border-radius:12px}
.bottombar .sbar:hover{background:var(--panel)}

/* ---------- the step list: a white card; each step's number on a chip of its colour ---------- */
@media (min-width:1100px){
  .layout.with-side .sidebar{margin-top:44px;padding:14px 10px;border-radius:16px;background:var(--panel)}
  .side-resize{border-left-color:transparent}
}
.fnode{margin-left:0;border-left:0;border-radius:10px;padding:8px 10px;grid-template-columns:30px 1fr;gap:10px;align-items:start}
.fnode.t-mimra:not(.cur){--c:var(--mimra)}.fnode.t-kashya:not(.cur){--c:var(--kashya)}.fnode.t-terutz:not(.cur){--c:var(--terutz)}.fnode.t-raaya:not(.cur){--c:var(--raaya)}
.fnode.t-dechiya:not(.cur){--c:var(--dechiya)}.fnode.t-sheelah:not(.cur){--c:var(--sheelah)}.fnode.t-teshuvah:not(.cur){--c:var(--teshuvah)}.fnode.t-maskana:not(.cur){--c:var(--maskana)}
.fnode .dot,.fnode.cur .dot{width:30px;height:26px;border-radius:7px;background:var(--c);color:var(--on-c);box-shadow:none;font:700 13px/1 var(--ui-font)}
.fnode:not(.cur) .ft{color:var(--text)}
.fnode .fty{color:var(--c);font-weight:700}
.fnode:hover{background:var(--panel-2)}
.fnode.cur{background:var(--c);color:var(--on-c)}
.fnode.cur .ft,.fnode.cur .fty,.fnode.cur .fty .he{color:var(--on-c)}
.fnode.cur .dot{background:var(--on-c);color:var(--c)}
/* v7 fixes over older layers */
.modebar .mb-o.on,.modebar .mb-o.on b{color:var(--accent-ink)}
@media (min-width:1100px){body.on-daf main#view{max-width:var(--max)}}
body.onestep .step.cur .sbody>:not(.phrases):not(.phrases ~ *){max-width:none}
body.onestep .step.cur .sh .num{display:block}
body.onestep .step.cur .ph .pa{text-align:start;text-align-last:auto}
.layout .sidebar .flow .fnode .dot,.layout .sidebar .flow .fnode.cur .dot{display:grid;place-items:center;width:30px;height:26px;border-radius:7px;background:var(--c);color:var(--on-c);font:700 13px/1 var(--ui-font);text-align:center}
.layout .sidebar .flow .fnode.cur .dot{background:var(--on-c);color:var(--c)}
@media (min-width:760px){
  body.onestep:not(.hide-translation) .step.cur .ph{background:linear-gradient(to right,transparent 50%,color-mix(in srgb,var(--c) 6%,transparent) 50%)}
  body.onestep:not(.hide-translation) .step.cur .ph .pa{background:none;align-self:center}
}

/* ---------- v7 home: the headline on the navy frame, white cards below, the eight kinds as solid tiles ---------- */

.h5 .amud{background:var(--panel);box-shadow:0 1px 2px var(--shade)}
#homeAmud .ticks{height:16px}
#homeAmud .ticks .tk{height:12px;opacity:1;border-radius:3px}

/* ---------- v7 Ameilus: the amud on a white card; a finished passage is tinted in its kind's colour; the marker is gold ---------- */
.am-dafwrap{padding:18px 26px;border-radius:16px;background:var(--panel);box-shadow:0 1px 2px var(--shade)}
.am-exp,.am-exp.empty,.am-map{border:0;border-radius:16px;background:var(--panel);box-shadow:0 1px 2px var(--shade)}
body:not(.no-colors) .am-daf .w.done[class*="k-"]{background:color-mix(in srgb,var(--c) 10%,transparent)}
.am-daf .w.sel{background:color-mix(in srgb,var(--accent) 12%,transparent)}
.am-daf .w.mark{background:var(--gold);color:#12141a;box-shadow:none;border-radius:6px}
.am-node{margin-left:0;width:100%;border-left:0;border-radius:10px;padding:8px}
.am-node .kdot{display:none}
body:not(.no-colors) .am-node[class*="k-"] .am-nk{padding:2px 9px;border-radius:7px;background:var(--c);color:var(--on-c);font-weight:700}
.am-node.here{background:color-mix(in srgb,var(--gold) 30%,transparent)}
.am-node.here .am-nt{color:var(--ink);font-weight:700}
.am-bar{border-top:1px solid var(--rule)}
.am-bar .btn,.am-bar button{border-radius:12px}
.am-bar .btn.primary{font-weight:700}

.am-dafwrap{padding:0}
.am-daf{box-sizing:border-box;width:100%;padding:18px 26px}
/* v7: the strip is gone from the step page (David, Nov 12 2026): the step list and "10 of 19" already say where you are. It stays on the home page's Today's daf card. */
#dafBody .ticks{display:none}
/* v7 trims (David, Nov 12 2026): less above the step. The amud summary shows only with the overview open; the small running
   head is gone (the title and the top bar already name the daf); Help lives in the Menu, not on its own "?" button;
   the raw Aramaic block is gone from the home page's Today's daf card. "In plain words" is no longer drawn (app.js). */
body.onestep .dafhead:not(.ov-open) .topic{display:none}
body.on-daf .dafhead:not(.chooser)>.runhead{display:none}
.topbar .hp-q{display:none}

.more-b .srel{margin:10px 0 0}

/* ===================================================================================================
   v7.1 (Nov 12 2026, David, after seeing v7 live): two typefaces only, and a lighter step header.
   - One sans for every Latin word (titles, summaries, the English beside the Aramaic); Frank Ruhl for Hebrew. No book serif.
   - The step's colour is a slim band with its kind, not a tall block: the title and summary sit on the white card below it.
   - The step you are on in the list is tinted, not filled.
   - A− / A+ sit on the page beside the Sugya Flow / Ameilus switch.
   =================================================================================================== */
:root{--read-font:var(--ui-font)}

body.onestep .step.cur .sh{align-items:center;padding:12px 36px}
body.onestep .step.cur .sh .tname{align-items:center}
body.onestep .step.cur .sh .tname .he{font:700 22px/1.1 var(--he-font)}
body.onestep .step.cur .sh .tname .ten{font:700 16px/1.2 var(--ui-font)}
body.onestep .step.cur .sh .num{font-size:14px}
body.onestep .step.cur .sbody>:not(.phrases):not(.phrases ~ *){padding:16px 36px 0;background:none;color:var(--text)}
body.onestep .step.cur .sbody>:not(.phrases):not(.phrases ~ *) a{color:var(--accent)}
body.onestep .step.cur .stitle{padding-top:22px;font:700 28px/1.22 var(--ui-font);letter-spacing:-.015em;color:var(--ink)}
body.onestep .step.cur .ssum{padding-top:10px;font-size:17px;line-height:1.55;color:var(--text)}
body.onestep .step.cur .phrases{margin-top:24px;border-top:1px solid var(--rule)}
@media (min-width:760px){body.onestep .step.cur .ph .pe{font-size:calc(var(--en-size) * 1.18)}}
@media (max-width:759px){
  body.onestep .step.cur .sh{padding:10px 20px}
  body.onestep .step.cur .sbody>:not(.phrases):not(.phrases ~ *){padding:12px 20px 0}
  body.onestep .step.cur .stitle{padding-top:16px;font-size:22px}
  body.onestep .step.cur .ssum{font-size:16px}
  body.onestep .step.cur .phrases{margin-top:18px;border-top-width:1px}
}
.fnode.cur{background:color-mix(in srgb,var(--c) 12%,transparent);color:var(--ink)}
.fnode.cur .ft{color:var(--ink)}
.fnode.cur .fty,.fnode.cur .fty .he{color:var(--c)}
.layout .sidebar .flow .fnode.cur .dot{background:var(--c);color:var(--on-c)}
/* the on-page text size buttons: on the same row as the mode switch, at its right end */
.pgsize{display:flex;justify-content:flex-end;gap:6px;height:44px;margin-top:-44px;pointer-events:none}
.dafhead:not(.chooser)>.pgsize{order:3}
.pgsize button{pointer-events:auto;min-width:44px;height:44px;padding:0 10px;border:0;border-radius:12px;background:var(--panel);color:var(--ink);font:700 15px/1 var(--ui-font);cursor:pointer;box-shadow:0 1px 2px var(--shade)}
.pgsize button:hover{background:var(--panel-2)}
@media print{.pgsize{display:none}}
.am-main .pgsize{margin-top:-50px;margin-bottom:6px}
/* v7.1: a calmer top of the step: the kind, the title, one summary. The Classics note sits at the foot of the step. */
body.onestep .step.cur .classic-mark{margin-top:14px;font-size:14px;color:var(--muted)}
body.onestep .step.cur .ssum{color:var(--muted)}
body.onestep .step.cur .stitle{padding-bottom:2px}

/* ===================================================================================================
   v8 "Plain frame" (Nov 15 2026, chosen by David from screenshots of the real app). The last word over every layer above.
   v7 put the step's colour in six places at once (text, band, tinted column, chip, tinted row, Next button) on a navy and
   blue-grey frame, and it read as a toy. v8 has ONE rule: the coloured text is the only colour on the page.
   - Kept: the Aramaic and its translation in the step's colour ("Color the text"), and the small label naming the kind.
   - Neutral: white page, grey hairlines, black titles, black buttons, a white top bar. One radius. No shadows.
   - Gone: the colour band, the tinted Aramaic column, coloured number chips, the tinted page, the colour-changing Next.
   - Light only: Dark and Sepia are retired (app.js forces theme-light; their token blocks above stay for the tests).
   =================================================================================================== */
/* v9 (Nov 27 2026): the values are Pammy's; the v8 neutral values were bg #fff, soft #f4f4f5, ink #18181b, ink-2 #3f3f46, muted #63636b, rule #e4e4e7, accent #18181b, r 8px, no card border */
html{--L-bg:#f3f8fb;--L-surface:#ffffff;--L-soft:#eaf3f7;--L-side:#ffffff;--L-ink:#162a44;--L-ink-2:#43576c;--L-muted:#4f6273;--L-rule:#dfe7ee;--L-accent:#d6085a;--L-on-accent:#ffffff;--L-bar:#ffffff;--L-on-bar:#162a44;--L-bar-rule:#dfe7ee;--L-bar-chip:#eaf4f7;--L-brand:#162a44;--L-r:10px;--L-card-border:1px solid var(--L-rule)}
html,body{background:var(--L-bg)}
body.theme-light{--desk:var(--L-bg);--bg:var(--L-surface);--panel:var(--L-surface);--panel-2:var(--L-soft);--raise:var(--L-surface);--ink:var(--L-ink);--text:var(--L-ink);--muted:var(--L-muted);--faint:var(--L-muted);--rule:var(--L-rule);--border:var(--L-rule);--border-2:var(--L-rule);--accent:var(--L-accent);--accent-ink:var(--L-on-accent);--binding:var(--L-bar);--on-binding:var(--L-on-bar);--gold:var(--L-brand);--shade:transparent}
html .topbar{border-bottom:1px solid var(--L-bar-rule)}
html .topbar .brand-name{font-weight:600;letter-spacing:-.01em}
html .topbar .refbtn{background:var(--L-bar-chip);color:var(--L-on-bar);border-radius:var(--L-r);font-weight:600}
html .modebar{background:var(--L-soft);border-radius:var(--L-r);padding:3px}
html .modebar .mb-o{border-radius:calc(var(--L-r) - 2px);color:var(--L-muted)}
html .modebar .mb-o.on{background:var(--L-surface);box-shadow:0 1px 2px rgba(0,0,0,.1)}
html .modebar .mb-o.on,html .modebar .mb-o.on b{color:var(--L-ink)}
html .pgsize button{background:none;border:1px solid var(--L-rule);border-radius:var(--L-r);box-shadow:none;font-weight:600;color:var(--L-muted)}
html .refline .he{font-weight:700}
/* step */
html body.onestep #dafBody .steps .step.cur{border-radius:var(--L-r);box-shadow:none;border:var(--L-card-border);background:var(--L-surface)}
html body.onestep .step.cur .sh{background:none;color:var(--L-muted);padding:30px 44px 0}
html body.onestep .step.cur .sh .tname .he{color:var(--c);font:700 21px/1 var(--he-font)}
html body.onestep .step.cur .sh .tname .ten{color:var(--c);font:600 12.5px/1 var(--ui-font);letter-spacing:.08em;text-transform:uppercase}
html body.onestep .step.cur .sh .num{color:var(--L-muted)!important;font-weight:500;font-size:13px}
html body.onestep .step.cur .sbody>:not(.phrases):not(.phrases ~ *){padding:0 44px}
html body.onestep .step.cur .stitle{padding-top:12px;font:700 30px/1.2 var(--ui-font);letter-spacing:-.02em;color:var(--L-ink)}
html body.onestep .step.cur .phrases{margin-top:28px;border-top:1px solid var(--L-rule)}
html body.onestep .step.cur .ph{background:none!important;border-bottom:1px solid var(--L-rule)}
html body.onestep .step.cur .phrases ~ *{margin-left:44px;margin-right:44px}
html body.onestep .step.cur .explain-btn{border:1px solid var(--L-rule);border-radius:var(--L-r);font-weight:600;font-size:14px;color:var(--L-ink)}
html body.onestep .step.cur .explain h4{color:var(--L-muted);font:600 12px/1.4 var(--ui-font);letter-spacing:.08em;text-transform:uppercase}
@media (min-width:760px){html body.onestep .step.cur .ph .pa,html body.onestep .step.cur .ph .pe{padding:20px 44px}}
@media (max-width:759px){html body.onestep .step.cur .sh{padding:20px 20px 0}html body.onestep .step.cur .sbody>:not(.phrases):not(.phrases ~ *){padding:0 20px}html body.onestep .step.cur .stitle{font-size:23px}html body.onestep .step.cur .phrases ~ *{margin-left:20px;margin-right:20px}html body.onestep .step.cur .phrases{margin-top:20px}}
/* step list */
html .layout.with-side .sidebar{background:var(--L-side);border-radius:var(--L-r);border:var(--L-card-border);padding:10px 8px}
html .fnode{border-radius:6px;padding:7px 10px;grid-template-columns:22px 1fr;gap:8px}
html .layout .sidebar .flow .fnode .dot,html .layout .sidebar .flow .fnode.cur .dot{display:block;width:22px;height:auto;background:none;color:var(--L-muted);font:500 13px/20px var(--ui-font);text-align:right;border-radius:0}
html .fnode .fty{font-size:11.5px;font-weight:600;letter-spacing:.02em;color:var(--c)}
html .fnode .fty .he{font-size:13px}
html .fnode:not(.cur) .ft{color:var(--L-ink-2)}
html .fnode.cur{background:var(--L-soft)}
html .fnode.cur .ft{color:var(--L-ink);font-weight:600}
html .layout .sidebar .flow .fnode.cur .dot{color:var(--L-ink);font-weight:700}
html .flow .phase,html .flow h2{color:var(--L-muted)}
/* bottom bar */
html .bottombar{background:color-mix(in srgb,var(--L-bg) 94%,transparent);border-top:1px solid var(--L-rule)}
html .bb-step{border-radius:var(--L-r);height:44px;font-weight:600}
html .bb-prev{box-shadow:none;border:1px solid var(--L-rule);background:var(--L-surface);width:44px}
html .bb-next,html body .bb-next[class*=" t-"]{background:var(--L-accent);color:var(--L-on-accent)}
html .bottombar .sc-k{color:var(--L-muted)}
/* home */

html .h5 .amud{box-shadow:none;border:1px solid var(--L-rule);border-radius:var(--L-r);background:var(--L-surface)}
html .btn-primary{border-radius:var(--L-r);font-weight:600}

html body.onestep .step.cur .ph .pa{font-weight:500}
html .layout.with-side .sidebar{border-right:1px solid var(--L-rule);border-radius:0}
html body.onestep .step.cur .sh{padding-top:8px}
html .topbar .iconbtn:hover,html .topbar .iconbtn:active,html .topbar .refbtn:hover,html .topbar .refbtn:active,html .topbar #settingsBtn.pf:hover,html .topbar #settingsBtn.pf.open{background:var(--L-soft)}
html .topbar :focus-visible{outline-color:var(--L-ink)}
html .headbar .ovbtn,html .headactions .btn,html .notice{background:var(--L-soft);border-radius:var(--L-r)}
/* Ameilus: the same rule. A finished passage keeps its coloured text; nothing else is coloured. */
html .am-dafwrap,html .am-exp,html .am-exp.empty,html .am-map{box-shadow:none;border:1px solid var(--L-rule);border-radius:var(--L-r);background:var(--L-surface)}
html body:not(.no-colors) .am-daf .w.done[class*="k-"]{background:none}
html .am-daf .w.sel{background:var(--L-soft)}
html .am-daf .w.mark{background:var(--L-ink);color:var(--L-on-accent);border-radius:4px}
html body:not(.no-colors) .am-node[class*="k-"] .am-nk{padding:0;background:none;color:var(--c);font-weight:600}
html .am-node.here{background:var(--L-soft)}
html .am-bar .btn,html .am-bar button{border-radius:var(--L-r)}
html .am-bar .btn.primary{background:var(--L-accent);color:var(--L-on-accent)}
html body:not(.x) .bb-next,html body:not(.x) .bb-next[class*=" t-"]{background:var(--L-accent);color:var(--L-on-accent)}
html body.onestep .step.cur .sh{padding-bottom:8px}

/* ===================================================================================================
   v9 "Pammy" (Nov 27 2026, chosen by David from screenshots of Pammy's redesign beside the live site).
   Their look on our app: navy ink, a magenta accent, a pale blue-grey page, Plus Jakarta Sans for all Latin text,
   Frank Ruhl for Hebrew. David lifted the v8 "coloured text is the only colour" rule for this layer.
   Kept from before: the coloured Aramaic and translation, light theme only, two typefaces, our headline spacing
   (theirs was squeezed until "Learn" read as "Leam"), and everything removed from the step page in v7 and v8.
   Three parts: (1) tokens and the header, (2) the study screens, ported from their study.css,
   (3) the home page, the daf library and the footer (gc-* classes), ported from their styles.css.
   The colour tokens themselves are set once, in the v8 token line above.
   =================================================================================================== */
@font-face{font-family:"Plus Jakarta Sans";src:url(fonts/plus-jakarta-sans.woff2) format("woff2");font-weight:400 800;font-style:normal;font-display:swap}
html{--gc-ink:#162a44;--gc-slate:#556476;--gc-line:#dfe7ee;--gc-tint:#f3f8fb;--gc-teal:#1f8298;--gc-link:#116b7e;--gc-accent:#d6085a;--gc-accent-hover:#b9074e;--gc-sans:"Plus Jakarta Sans","Frank Ruhl Inline",system-ui,-apple-system,"Segoe UI",sans-serif;--gc-shadow:0 12px 40px rgb(68 96 124 / 7%)}
/* ---------- (1) header ---------- */
html body .topbar .brand{background:none;border:0;cursor:pointer}
html body .topbar .brand-he{display:none}
html body .topbar .brand-name{display:inline;color:var(--L-ink);letter-spacing:-.03em;text-transform:lowercase;white-space:nowrap}
html body .topbar .refbtn{margin-left:auto}
html body .topbar .refbtn.go{background:var(--L-accent);border-color:var(--L-accent);color:#fff}
html body .topbar .refbtn.go:hover{background:var(--gc-accent-hover)}
html body .topbar #settingsBtn.pf{border:1px solid var(--L-rule);border-radius:9px;min-height:44px;background:#fff;color:var(--L-ink);font:750 14px var(--ui-font)}
.study-nav a[aria-current="page"]{color:var(--gc-link)}
@media (min-width:760px){html body .topbar .refbtn{margin-left:0}html body .topbar .study-nav{margin-inline:auto}}
/* the home page and the daf library run the full width of the window; their sections centre themselves */
body:has(#view > .gc-site) .layout{display:block;max-width:none;padding:0;margin:0}
body:has(#view > .gc-site) #view{max-width:none;padding:0;margin:0}
body:has(#view > .gc-site){background:#fff}
/* the bottom bar lines up with the step above it (app.js measures the step column into --col-l / --col-r) */
@media (min-width:1000px){html body:not(.x) .bottombar{padding-left:var(--col-l,12px);padding-right:var(--col-r,12px);justify-content:space-between}}
/* ---------- (2) the study screens ---------- */
html { --L-bg: #f3f8fb; --L-surface: #fff; --L-soft: #eaf3f7; --L-side: #fff; --L-ink: #162a44; --L-ink-2: #43576c; --L-muted: #4f6273; --L-rule: #dfe7ee; --L-accent: #d6085a; --L-on-accent: #fff; --L-bar: #fff; --L-on-bar: #162a44; --L-bar-rule: #dfe7ee; --L-bar-chip: #eaf4f7; --L-brand: #162a44; --L-r: 10px; --L-card-border: 1px solid var(--L-rule); }
html body { --top-h: 64px; --ui-font: "Plus Jakarta Sans", "Frank Ruhl Inline", system-ui, sans-serif; --he-ui: "Frank Ruhl Libre", "Times New Roman", serif; --he-size: calc(25px * var(--scale)); --en-size: calc(16px * var(--scale)); background: var(--L-bg); font-family: var(--ui-font); color: var(--L-ink); }
html body [hidden] { display: none !important; }
html body :focus-visible { outline: 2px solid #1f8298; outline-offset: 2px; }
html body .topbar { height: calc(var(--top-h) + env(safe-area-inset-top)); padding-inline: max(12px, calc((100vw - 1240px) / 2)); gap: 9px; background: var(--L-bar); color: var(--L-on-bar); }
html body .topbar .brand { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; flex: 0 0 auto; padding: 0; text-decoration: none; color: var(--L-ink); }
html body .topbar .brand-logo { width: 30px; height: 30px; }
html body .topbar .brand-name { font-size: 18px; font-weight: 800; letter-spacing: -.025em; }
html body .brand-dot { color: var(--L-accent); }
html body .topbar .refbtn { display: flex; gap: 5px; align-items: center; justify-content: center; flex: 0 1 auto; min-height: 44px; padding: 0 9px; background: var(--L-bar-chip); border: 1px solid var(--L-rule); font-size: 14px; font-weight: 800; }
html body .topbar .refbtn svg { width: 15px; height: 15px; }
html body .topbar .top-actions { gap: 4px; flex: 0 0 auto; }
html body .topbar .iconbtn, html body .sheet-head .iconbtn { min-width: 44px; min-height: 44px; background: transparent; border-radius: 9px; }
html body .topbar .iconbtn svg { width: 20px; height: 20px; }
html body .topbar .iconbtn:hover, html body .topbar .iconbtn:active { background: var(--L-bar-chip); }
.study-nav { display: none; }
html body .sheet :is(.input, #gotoInput, input[type="search"]) { font-size: 16px; }
html body :is(.legend-wrap > summary, .more > summary) { min-height: 44px; align-content: center; }
html body .step .rt-btn { min-height: 44px; font-size: 14px; }
html body .headbar :is(.ovbtn,.headactions .btn) { min-height: 44px; }
html body .layout { max-width: 1240px; padding-inline: 14px; }
html body #view { padding-top: 9px; min-width: 0; }
body.onestep #dafBody .step.cur { touch-action: pan-y pinch-zoom; }
html body .dafhead .runhead { margin-top: 0; align-items: center; }
html body .dafhead .runhead .perekline { min-height: 44px; justify-content: center; }
html body .runhead .perekline .pk-next { font-size: 14px; }
html body .dafhead .refline { margin-top: 5px; justify-content: flex-start; }
html body .dafhead .refline h1 { order: 0; font: 800 clamp(1.75rem, 5vw, 2.55rem)/1.1 var(--ui-font); letter-spacing: -.025em; color: var(--L-ink); }
html body .dafhead .refline .he { order: 1; font-size: 22px; color: #286f81; }
html body .dafhead .modebar { margin-top: 10px; }
html body .modebar .mb-o { min-height: 44px; padding-inline: 10px; color: var(--L-ink-2); font: 750 14px/1.2 var(--ui-font); }
html body .modebar .mb-o.on { box-shadow: 0 1px 3px rgb(22 42 68 / 12%); }
html body .pgsize { margin-top: -47px; height: 44px; margin-bottom: 3px; }
html body .pgsize button { background: #fff; padding-inline: 7px; }
html body.onestep #dafBody .steps .step.cur { margin: 4px 0 0; padding: 0; border-radius: 13px; border: 1px solid var(--L-rule); box-shadow: 0 10px 34px rgb(22 42 68 / 5%); }
html body.onestep .step.cur .sh { padding: 10px 14px 1px; align-items: center; min-height: 46px; gap: 7px; }
html body.onestep .step.cur .sh .tname { flex-wrap: wrap; justify-content: flex-start; gap: 4px 8px; }
html body.onestep .step.cur .sh .tname .ten { font: 800 14px/1.35 var(--ui-font); letter-spacing: .025em; text-transform: none; }
html body.onestep .step.cur .sh .tname .he { font-size: 18px; color: var(--c); }
html body.onestep .step.cur .sh .tname :is(.mbadge,.stag) { font: 600 14px/1.3 var(--ui-font); padding: 2px 5px; }
html body.onestep .step.cur .sh .tname :is(.mbadge,.stag) .he { font-size: 14px; }
html body.onestep .step.cur .sh .num { min-height: 20px; flex-shrink: 0; font-weight: 700; font-size: 14px; }
html body.onestep .step.cur .sbody > .stitle { margin: 0 14px; padding: 5px 0 0; font: 800 calc(22px * var(--scale))/1.23 var(--ui-font); letter-spacing: -.025em; overflow-wrap: anywhere; }
html body.onestep .step.cur .phrases { margin-top: 11px; border-top: 1px solid var(--L-rule); background: #fff; }
html body.onestep .step.cur .ph { min-width: 0; }
html body.onestep .step.cur .ph .pa { font-size: clamp(23px, calc(28px * var(--scale)), 50px); padding: 9px 15px 0; line-height: 1.55; text-align: right; unicode-bidi: isolate; overflow-wrap: anywhere; }
html body.onestep .step.cur .ph .pe { font-size: clamp(16px, var(--en-size), 29px); padding: 1px 15px 10px; line-height: 1.56; overflow-wrap: anywhere; }
html body.onestep .step.cur .phrases ~ * { margin-left: 14px; margin-right: 14px; }
html body.onestep .step.cur .explain-btn { min-height: 44px; }
html body.onestep .step.cur .explain h4 { font-size: 14px; }
html body .step.cur .explain :is(p,dd,.mal,.more summary) { font-size: 16px; overflow-wrap: anywhere; }
html body .step.cur .explain dt { font-size: 14px; }
.study-report-link, .study-passage-report a { display: inline-flex; min-height: 44px; align-items: center; gap: 6px; font: 650 14px/1.3 var(--ui-font); color: #38687a; text-decoration: underline; text-underline-offset: 3px; }
html body .study-passage-report { margin-top: 2px; margin-bottom: 0; color: #38687a; }
html body .study-passage-report svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
html body .step.cur .sbody { padding-bottom: 6px; }
html body .legend-wrap > summary.section-h, html body .legend-wrap > summary small { font-size: 14px; }
html body .legend-wrap { padding-inline: 4px; margin-block: 0; }
html body .layout .sidebar .flow .fnode .dot { font-size: 14px; }
html body .layout .sidebar .flow :is(.phase,h2), html body .flow .fnode .fty { font-size: 14px; }
html body .flow .fnode .ft { overflow-wrap: anywhere; }
html body .side-show { min-height: 44px; }
html body .bottombar { padding-inline: max(12px, calc((100vw - 1188px) / 2)); }
html body .bottombar :is(.sc-k,.sc-n,.sbar-t) { font-size: 14px; }
html body .bottombar .sbar { text-overflow: ellipsis; min-height: 44px; }
html body .progress > div { background: #2c9fb5; }
html body .bottombar .sbar-line > span { background: #2c9fb5; }
html.am-shell body .am-main .modebar { margin-bottom: 4px; }
html.am-shell body .am-head { margin: 0 0 4px; padding: 4px 0 0; }
html body .am-title { color: var(--L-ink); font: 800 clamp(1.45rem, 4vw, 2.2rem)/1.2 var(--ui-font); letter-spacing: -.025em; }
html body .am-title .am-hetitle { color: #286f81; font-size: 21px; }
html body .am-sub { font-size: 14px; }
html body .am-main .pgsize { margin-top: -51px; margin-bottom: 7px; }
html.am-shell body .am-dafwrap { margin: 0; padding: 8px 12px 15px; border: 1px solid var(--L-rule); border-radius: 12px; mask-image: none; -webkit-mask-image: none; }
html body .am-daf { color: var(--L-ink); font-size: clamp(23px, calc(27px * var(--scale)), 46px); line-height: 1.85; overflow-wrap: anywhere; }
html body .am-daf .w { padding-block: 4px; }
html body .am-exp .am-exp-head .iconbtn { width: 44px; min-width: 44px; height: 44px; }
html body .am-exp .am-exp-head .am-exp-h, html body .am-map :is(.am-phase,.am-mh,.am-nk) { font-size: 14px; }
html body .am-ph { grid-template-columns: 1fr; padding-block: 8px; }
html body .am-ph .he { font-size: 25px; text-align: right; }
html body .am-ph .he + div { font-size: 16px; }
html body .am-card :is(summary, .am-shiur), html body .am-nav a { min-height: 44px; align-content: center; }
html body .am-bar :is(.hb,.btn) { min-height: 44px; }
html body .am-bar :is(.am-msg,.am-msg-idle,.hb-l,.hb-n) { font-size: 14px; }
html body .am-bar .am-hintpanel { overflow-wrap: anywhere; }
html body .am-bar .hb-car { font-size: 14px; }
html body .disc { border-radius: 15px; padding: 19px 20px 21px; }
html body .disc-b { font-size: 16px; text-align: left; }
html body .disc-ok { background: var(--L-accent); color: white; min-height: 48px; }
@media (min-width: 760px) {
  html body .topbar { gap: 15px; }
  html body .topbar .brand-logo { width: 34px; height: 34px; }
  html body .topbar .brand-name { font-size: 21px; }
  html body .topbar .refbtn { padding-inline: 13px; }
  .study-nav { display: flex; align-items: center; gap: clamp(11px, 2.5vw, 35px); margin-inline: auto; }
  .study-nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font: 750 14px var(--ui-font); color: var(--L-ink); }
  .study-nav a:hover { color: #146e81; }
  html body.onestep .step.cur .ph :is(.pa,.pe) { padding: 12px 24px; align-self: center; }
  html body.onestep .step.cur .sh { padding-inline: 22px; }
  html body.onestep .step.cur .sbody > .stitle { margin-inline: 22px; font-size: calc(28px * var(--scale)); }
  html body.onestep .step.cur .phrases ~ * { margin-left: 22px; margin-right: 22px; }
}
@media (min-width: 1000px) {
  html body #view { padding-top: 13px; }
  html body .layout.with-side .sidebar { border-radius: 12px; border: 1px solid var(--L-rule); }
  html body .side-wrap { margin-top: 13px; }
  html body .flow h2 { margin: 4px 10px 8px; font-weight: 800; }
  html body .am-daf { font-size: clamp(26px, calc(32px * var(--scale)), 54px); }
  html.am-shell body .am { gap: 21px; max-width: 1240px; }
  html.am-shell body .am-dafwrap { padding: 11px 21px 19px; }
}
@media (max-width: 759px) {
  html body .topbar .brand-name { display: none; }
  html body .topbar .refbtn { max-width: none; }
  html body .topbar #refBtnText .ref-m { display: inline; }
  html body .topbar #refBtnText { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html body .topbar .brand { min-width: 44px; justify-content: center; }
  html body .modebar .mb-o { min-width: 0; }
}
html body #view :is(h1, h2, h3)[tabindex="-1"]:focus, html body main[tabindex="-1"]:focus { outline: none; }
html body :is(.rt-n, .ml, .am-walk-k, .am-ex-k, .am-mapsub, .am-nt,
  .clx-eyebrow, .clx-cn, .clx-status, .clx-ss, .clx-mc, .clx-ref, .clx-meta,
  .clx details summary, .clx dt, .mw-meta, .mw-st, .mw-tag, .mw-from) { font-size: max(14px, 1em); }
html body :is(.clx-chip, .clx .cl-seg button, .clx-row .cl-go .btn, .clx summary,
  .mw-meta a, .am-node, .side-hide) { min-height: 44px; }
html body :is(.wf-title, .wf-mean, .am-word-mean, .am-walk-p) { font-size: max(14px, 1em); }
html body .flow .mbadge, html body .flow .mbadge .he { font-size: 14px; }
html body .am-title .am-entitle { position: static; order: 0; clip: auto; clip-path: none; overflow: visible; white-space: normal; font: inherit; color: var(--L-ink); width: auto; height: auto; }
html body .am-title .am-hetitle { order: 1; }
html body.onestep .step.cur .sbody > .stitle { zoom: 1; }
html body .clx h1, html body .mw-hero h1 { color: var(--L-ink); }
html body .clx input, html body .mw-search input { font-size: 16px; }
html body .clx .clx-status { color: var(--L-muted); }
@media (max-width: 759px) {
  html body.am-mode .am-title .am-entitle { position: static; width: auto; height: auto; clip: auto; clip-path: none; overflow: visible; white-space: normal; }
}
html body .rt-src { font-size: 14px; }
html body :is(.rt-src a,.classic-mark a,.srel a) { box-decoration-break: clone; padding-block: 13px; }
html body .layout .sidebar .flow .fnode.cur .dot, html body .flow .fnode .mbadge .he { font-size: 14px; }
html body .sheet :is(.setrow .lbl span, .small, .legend-mini span, .pk-r, .dafcell .dn small, .mi-loc, .mi-n small, .sz), html body .am-word .am-src { font-size: 14px; }
html body .sheet :is(.dafcell button, .ofl-rm, .disc-link), html body .am-word :is(.am-word-head .iconbtn, .chip) { min-height: 44px; }
html body .sheet .switch { height: 44px; }
html body .sheet .switch input { width: 100%; height: 44px; }
html body .sheet .switch span { inset-block: 6px; }
html body .sheet .pk-jump { display: flex; }

html body.onestep .step.cur .study-passage-report{margin-top:2px;margin-bottom:0}
html body.onestep .step.cur .explain .report{display:none}
html body .btn-primary,html body .am-bar .btn.primary,html body .disc-ok{background:var(--L-accent);color:#fff}
/* ---------- (3) home, daf library, footer ---------- */
:where(.gc-site) :is(h1,h2,h3,p,ul,ol,figure){margin:0;padding:0}
:where(.gc-site) :is(ul,ol){list-style:none}
:where(.gc-site) button{background:none;border:0;font:inherit;color:inherit;padding:0}
:where(.gc-site) img{display:block;max-width:100%}
:where(.gc-site) svg{width:1.25em;height:1.25em;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
:where(.gc-site) *{box-sizing:border-box}
.gc-site { color: var(--gc-ink); font-family: var(--gc-sans); font-size: 16px; line-height: 1.6; --pm-accent: var(--gc-teal); --pm-line: #cde5ea; --pm-card: white; }
.gc-site { background: white; min-height: 100vh; }
.gc-site [hidden] { display: none !important; }
.gc-site a { color: inherit; text-decoration: none; }
.gc-site button { cursor: pointer; }
.gc-site :focus-visible { outline: 2px solid var(--gc-teal); outline-offset: 3px; }
.gc-site h1, .gc-site h2 { font-weight: 800; letter-spacing: -.025em; line-height: 1.1; text-wrap: balance; }
.gc-site h1 { font-size: clamp(2.8rem, 7vw, 4.35rem); }
.gc-site h2 { font-size: clamp(2rem, 4.8vw, 3.25rem); }
.gc-site :is(h1, h2) > span { color: var(--gc-accent); }
.gc-site p { color: var(--gc-slate); }
.gc-site bdi[lang="he"], .gc-site [lang="arc"] { font-family: "Frank Ruhl Libre", "Times New Roman", serif; }
.gc-container { width: min(100% - 40px, 1232px); margin-inline: auto; }
.gc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; max-width: 100%; padding: 10px 14px; border: 1px solid transparent; border-radius: 9px; line-height: 1.2; font-size: 14px; font-weight: 800; transition: transform .2s ease, background-color .2s ease, border-color .2s ease; }
.gc-btn:hover { transform: translateY(-2px); }
.gc-site .gc-btn-primary { background: var(--gc-accent); color: white; }
.gc-site .gc-btn-primary:hover { background: var(--gc-accent-hover); }
.gc-site .gc-btn-outline { background: white; border-color: var(--gc-line); }
.gc-btn-outline:hover { border-color: #adccd5; background: #f9fcfd; }
.gc-btn-outline svg { color: var(--gc-teal); }
.gc-notice { background: var(--gc-tint); }
.gc-notice-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; min-height: 48px; font-size: 14px; }
.gc-notice-label, .gc-notice a { display: inline-flex; align-items: center; gap: 8px; }
.gc-notice-label { font-weight: 750; }
.gc-notice-label svg { color: var(--gc-teal); }
.gc-notice a { min-height: 44px; font-weight: 800; color: #116b7e; }
.gc-notice a:hover { text-decoration: underline; text-underline-offset: 4px; }
.gc-hero { display: grid; gap: 34px; padding-block: 29px 53px; }
.gc-hero-copy { min-width: 0; }
.gc-site .gc-eyebrow { display: flex; align-items: center; gap: 9px; min-height: 21px; color: #4b6272; font-size: 14px; font-weight: 800; letter-spacing: .105em; line-height: 1.45; }
.gc-eyebrow svg { flex: none; color: var(--gc-teal); }
.gc-hero h1 { margin: 9px 0 16px; font-size: clamp(3.18rem, 8vw, 5.15rem); letter-spacing: -.025em; }
.gc-hero h1 em { color: var(--gc-ink); font-style: normal; }
.gc-hero h1 em span { color: var(--gc-accent); }
.gc-hero-description { font-size: 16px; max-width: 35ch; }
.gc-hero-actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.gc-hero-actions .gc-btn { min-height: 52px; }
.gc-hero-primary > svg:last-child { display: none; }
.gc-hero-reassurance { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 14px; line-height: 1.5; }
.gc-hero-reassurance svg { color: #227e61; flex: none; }
.gc-continue { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; width: min(100%, 370px); margin-top: 16px; padding: 8px 12px; background: var(--gc-tint); border: 1px solid var(--gc-line); border-radius: 10px; }
.gc-continue span:not(.gc-continue-icon) { display: grid; }
.gc-continue small { font-size: 14px; color: var(--gc-slate); }
.gc-continue:hover { border-color: #a9c9d2; }
.gc-continue-icon, .gc-chip-icon { display: grid; place-items: center; width: 35px; height: 35px; flex: none; background: #e8f3f6; color: var(--gc-teal); border-radius: 8px; }
.gc-hero-visual { position: relative; align-self: center; isolation: isolate; min-width: 0; }
.gc-hero-visual::before { content: ""; position: absolute; z-index: -1; inset: -8px -6px 6px 7px; border-radius: 23px; transform: rotate(3deg); background: #e8f4f8; }
.gc-hero-image-wrap { overflow: hidden; border-radius: 18px; background: #d3c1ac; box-shadow: var(--gc-shadow); }
.gc-hero-image-wrap img { display: block; width: 100%; height: auto; object-fit: cover; aspect-ratio: 1.62; object-position: 56% 61%; }
.gc-hero-chip { position: absolute; bottom: -15px; left: 10px; display: flex; align-items: center; gap: 9px; background: white; border: 1px solid var(--gc-line); border-radius: 12px; padding: 7px 12px 7px 7px; box-shadow: 0 12px 30px rgb(22 42 68 / 12%); font-size: 14px; }
.gc-section { padding-block: 56px; }
.gc-study-modes { background: var(--gc-tint); scroll-margin-top: 64px; }
.gc-section-head { margin-bottom: 22px; }
.gc-section-head h2 { margin: 5px 0 9px; }
.gc-section-head > p { max-width: 37ch; }
.gc-mode-grid { display: grid; gap: 12px; }
.gc-mode-card { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 13px; min-width: 0; padding: 17px 15px; background: white; border: 1px solid var(--gc-line); border-radius: 13px; box-shadow: var(--gc-shadow); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.gc-mode-card:hover { transform: translateY(-3px); border-color: #b1ced8; }
.gc-mode-icon, .gc-library-icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: #e6f4f7; color: #13758b; flex: none; }
.gc-mode-ameilus .gc-mode-icon { background: #fbeaf1; color: #bd084f; }
.gc-mode-copy { display: grid; gap: 1px; min-width: 0; }
.gc-mode-role { color: var(--gc-teal); font-size: 14px; font-weight: 800; }
.gc-mode-ameilus .gc-mode-role { color: #a70e4d; }
.gc-mode-copy strong { font-size: 23px; line-height: 1.25; letter-spacing: -.025em; }
.gc-mode-detail { margin-top: 3px; font-size: 14px; color: var(--gc-slate); }
.gc-mode-arrow { align-self: center; color: var(--gc-teal); }
.gc-mode-compact .gc-mode-card { box-shadow: none; }
.gc-mode-compact .gc-mode-copy strong { font-size: 20px; }
.gc-library-panel { border: 1px solid var(--gc-line); border-radius: 19px; overflow: hidden; background: #f7fafc; display: grid; }
.gc-library-copy { padding: 24px 21px 27px; }
.gc-library-copy h2 { margin: 11px 0 9px; }
.gc-library-copy p { max-width: 36ch; }
.gc-library-photo { height: 205px; }
.gc-library-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 13px; margin-top: 15px; }
.gc-inline-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 800; font-size: 14px; text-align: left; }
.gc-site .gc-inline-link { color: #116b7e; }
.gc-inline-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.gc-footer { border-top: 1px solid var(--gc-line); background: #fbfdfe; padding-top: 22px; }
.gc-footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 11px 25px; }
.gc-footer-row p { font-size: 14px; }
.gc-footer-row nav { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 19px; }
.gc-footer-row nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; font-size: 14px; }
.gc-footer-row nav a:hover { color: var(--gc-teal); }
.gc-footer-bottom { border-top: 1px solid var(--gc-line); margin-top: 15px; padding-block: 13px; color: var(--gc-slate); font-size: 14px; }
.gc-search-field { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0 11px 0 14px; min-height: 53px; border: 1px solid #bdd0db; border-radius: 11px; background: white; }
.gc-search-field:focus-within { border-color: var(--gc-teal); box-shadow: 0 0 0 2px #e1f1f5; }
.gc-search-field > svg { color: var(--gc-teal); flex: none; }
.gc-search-field input { min-width: 0; width: 100%; min-height: 49px; color: var(--gc-ink); background: white; font-size: 16px; outline: 0 !important; border: 0; }
.gc-search-field input::-webkit-search-cancel-button { display: none; }
.gc-search-field button { display: grid; place-items: center; flex: none; min-width: 44px; min-height: 44px; }
.gc-search-caption { font-size: 14px; font-weight: 750; margin: 13px 1px 5px; }
.gc-picker-list { display: grid; gap: 5px; }
.gc-picker-list :is(button, a) { width: 100%; min-height: 47px; padding: 8px 11px; display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--gc-line); border-radius: 8px; color: var(--gc-ink); background: #fff; font-size: 15px; }
.gc-picker-list :is(svg) { color: var(--gc-teal); }
.gc-picker-list span { color: var(--gc-slate); }
.gc-picker-list :is(button, a):hover { background: var(--gc-tint); border-color: #9fc5d1; }
.gc-inner-page { min-height: 66vh; padding-bottom: 65px; }
.gc-library-title { display: grid; align-items: center; border-radius: 17px; overflow: hidden; border: 1px solid var(--gc-line); background: var(--gc-tint); }
.gc-library-title div { padding: 22px 17px; }
.gc-library-title h1 { margin: 7px 0; }
.gc-library-title img { width: 100%; height: 140px; object-fit: cover; object-position: 53% 38%; }
.gc-library-search { margin-top: 22px; max-width: 650px; }
.gc-library-search label { display: block; font-size: 17px; font-weight: 800; margin-bottom: 7px; }
.gc-library-results { max-width: 650px; margin-top: 11px; }
.gc-library-results .gc-btn { margin-top: 12px; }
.gc-orders { display: grid; gap: 14px; align-items: start; margin-top: 22px; }
.gc-order { border: 1px solid var(--gc-line); border-radius: 13px; overflow: clip; }
.gc-site .gc-order h2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--gc-tint); padding: 10px 13px; margin: 0; font-size: 20px; letter-spacing: -.025em; }
.gc-order h2 bdi { color: #427486; font-size: 19px; }
.gc-tractate + .gc-tractate { border-top: 1px solid var(--gc-line); }
.gc-tractate-toggle { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 9px; align-items: center; width: 100%; min-height: 53px; text-align: left; padding: 8px 12px; font-size: 15px; font-weight: 800; }
.gc-tractate-toggle:hover, .gc-tractate-toggle[aria-expanded="true"] { background: #f9fcfd; }
.gc-tractate-toggle > bdi { color: var(--gc-teal); font-size: 17px; font-weight: 600; }
.gc-tractate-count { font-size: 14px; color: var(--gc-slate); font-weight: 600; }
.gc-tractate-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.gc-tractate-picker { border-top: 1px solid var(--gc-line); padding: 10px 12px 14px; }
.gc-tractate-indexes { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 8px; }
.gc-amud-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(47px, 1fr)); gap: 5px; max-height: 290px; overflow: auto; padding: 3px; }
.gc-amud-chip { display: grid; place-items: center; min-height: 44px; border-radius: 8px; border: 1px solid var(--gc-line); font-weight: 700; font-size: 14px; }
.gc-amud-chip:hover { background: #eaf5f8; }
@media (min-width: 600px) {
  .gc-container { width: min(100% - 60px, 1232px); }
  .gc-mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gc-mode-compact.gc-mode-grid { grid-template-columns: 1fr; }
  .gc-mode-card { padding: 20px; }
  .gc-library-panel { grid-template-columns: 1.18fr 1fr; }
  .gc-library-photo { height: 100%; min-height: 215px; }
  .gc-library-copy { padding: 28px; }
  .gc-library-title { grid-template-columns: 1.5fr 1fr; }
  .gc-library-title div { padding: 30px 28px; }
  .gc-library-title img { height: 100%; min-height: 185px; }
  .gc-orders { display: block; column-count: 2; column-gap: 14px; }
  .gc-order { display: inline-block; width: 100%; break-inside: avoid; margin-bottom: 14px; }
}
@media (min-width: 850px) {
  .gc-notice-row { justify-content: flex-start; gap: 24px; }
  .gc-hero { grid-template-columns: 1.01fr 1fr; align-items: center; gap: clamp(25px, 5vw, 72px); padding-block: 68px 87px; }
  .gc-hero h1 { font-size: clamp(3.6rem, 5.15vw, 4.65rem); margin: 11px 0 20px; }
  .gc-hero-description { font-size: 18px; }
  .gc-hero-primary > svg:last-child { display: block; }
  .gc-hero-visual { margin-left: 9px; }
  .gc-hero-visual::before { inset: -15px -10px 8px 18px; border-radius: 29px; }
  .gc-hero-image-wrap { border-radius: 25px; }
  .gc-hero-image-wrap img { aspect-ratio: 1.29; }
  .gc-hero-chip { bottom: 15px; left: -22px; padding: 9px 14px 9px 9px; }
  .gc-section { padding-block: 77px; }
  .gc-section-head { display: grid; grid-template-columns: 1.2fr 1fr; align-items: end; gap: 25px; margin-bottom: 26px; }
  .gc-section-head > p { margin-bottom: 10px; justify-self: end; }
  .gc-mode-grid { gap: 17px; }
  .gc-mode-card { padding: 23px; align-items: center; }
  .gc-mode-copy strong { font-size: 26px; }
  .gc-mode-detail { font-size: 16px; }
  .gc-mode-icon { width: 48px; height: 48px; }
  .gc-mode-compact .gc-mode-detail { font-size: 14px; }
  .gc-library-copy { padding: 37px 42px; }
  .gc-footer { padding-top: 27px; }
  .gc-footer-row { align-items: center; }
  .gc-footer-row nav { gap: 24px; }
}
@media (max-width: 365px) {
  .gc-container { width: calc(100% - 32px); }
  .gc-btn { gap: 7px; padding-inline: 11px; }
  .gc-hero h1 { font-size: 3rem; }
  .gc-mode-card { gap: 10px; }
  .gc-tractate-toggle { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .gc-btn, .gc-mode-card { animation: none !important; transition: none; }
  .gc-btn:hover, .gc-mode-card:hover { transform: none; }
}
.gc-tractate { scroll-margin-top: 90px; }

/* ours, on their system: today's daf in the step colours, your saved learning, the colour key, the AI notice */
.gc-hero h1 br{display:none}
@media (min-width:600px){.gc-hero h1 br{display:inline}}
.gc-today{border:1px solid var(--gc-line);border-radius:19px;background:#fff;box-shadow:var(--gc-shadow);padding:22px 21px 24px;display:grid;gap:18px}
.gc-site .gc-today h2{font-size:clamp(1.6rem,3.4vw,2.2rem);margin:5px 0 6px}
.gc-today-meta{font-size:14px;font-weight:700;color:var(--gc-slate)}
.gc-today-meta{display:flex;align-items:baseline;gap:10px}
.gc-today-meta [lang="he"]{font:600 18px "Frank Ruhl Libre",serif;color:var(--gc-teal)}
.gc-today-topic{max-width:52ch;margin-top:8px}
.gc-today-go{margin-top:16px;display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center}
.gc-today-text{font:500 clamp(21px,2.3vw,26px)/1.75 "Frank Ruhl Libre","Times New Roman",serif;color:var(--gc-ink);text-align:justify;min-height:5em}
.gc-site .gc-today-text a{color:var(--c,var(--gc-ink))}
.gc-today-text a:hover{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:5px}
.gc-today-text .ow{font-weight:800;font-size:1.25em}
@media (min-width:850px){.gc-today{grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:44px;padding:34px 42px;align-items:center}}
.gc-section.gc-tight{padding-block:0 56px}
.gc-yours{display:grid;gap:12px}
@media (min-width:700px){.gc-yours{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}}
.gc-yours section{border:1px solid var(--gc-line);border-radius:13px;padding:14px 16px 8px;background:#fff}
.gc-site .gc-yours h2{font-size:18px;letter-spacing:-.02em;margin-bottom:4px}
.gc-yours a{display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:44px;border-top:1px solid var(--gc-line);font-size:15px;font-weight:700;color:var(--gc-link)}
.gc-yours a:first-of-type{border-top:0}
.gc-yours a [lang="he"]{font:500 17px "Frank Ruhl Libre",serif;color:var(--gc-slate)}
.gc-key{border:1px solid var(--gc-line);border-radius:13px;background:#fff;padding:0 16px}
.gc-key summary{min-height:52px;display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;font-weight:800;font-size:16px;list-style:none}
.gc-key summary::-webkit-details-marker{display:none}
.gc-key[open] summary svg{transform:rotate(180deg)}
.gc-key-grid{display:grid;gap:0 28px;padding-bottom:10px}
@media (min-width:700px){.gc-key-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:1050px){.gc-key-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
.gc-key-grid div{border-top:1px solid var(--gc-line);padding:10px 0}
.gc-key-grid b{display:flex;align-items:baseline;gap:8px;color:var(--c);font-size:15px}
.gc-key-grid b [lang="he"]{font:700 19px "Frank Ruhl Libre",serif}
.gc-site .gc-key-grid p{font-size:14px;line-height:1.45;margin-top:2px}
.gc-footer-note{font-size:14px;max-width:86ch;margin-top:12px}
.gc-site .gc-footer-note a{color:var(--gc-link);text-decoration:underline;text-underline-offset:3px}
.gc-tractate-picker>p{font-size:14px;font-weight:700}
.gc-pk{margin-top:10px}
.gc-pk h3{display:flex;justify-content:space-between;gap:10px;font-size:14px;font-weight:800;color:var(--gc-slate);margin-bottom:5px}
.gc-pk h3 [lang="he"]{font:600 16px "Frank Ruhl Libre",serif;color:var(--gc-teal)}
.gc-amud-chip.no{color:var(--gc-slate);border-style:dashed;font-weight:500}
.gc-site .gc-library-search label{color:var(--gc-ink)}
.gc-site .gc-library-title h1{font-size:clamp(2.4rem,5.5vw,3.6rem)}
.gc-inner-page{padding-top:22px}
.gc-mode-card{width:100%;text-align:left;cursor:pointer;font:inherit;color:inherit}
.gc-mode-card .gc-mode-icon svg{width:22px;height:22px}
.gc-btn{cursor:pointer;text-decoration:none}
.gc-site .gc-btn-primary svg{color:#fff}
.gc-library-photo img{width:100%;height:100%;object-fit:cover}
.gc-foot-brand{display:inline-flex;align-items:center;gap:8px;font-size:21px;font-weight:800;letter-spacing:-.03em;color:var(--gc-ink)}
.gc-foot-brand i{color:var(--gc-accent);font-style:normal}
.gc-tractate-toggle{cursor:pointer}
.gc-tractate-toggle svg{color:var(--gc-slate)}
.gc-amud-grid{max-height:none;overflow:visible}
.gc-amud-chip{color:var(--gc-ink);background:#fff}
.gc-continue svg:last-child{color:var(--gc-teal)}
.gc-continue strong{font-weight:800}
html body.onestep .step.cur .sbody>.stitle:not(.x):not(.y){padding:5px 14px 0;margin:0}
@media (min-width:760px){html body.onestep .step.cur .sbody>.stitle:not(.x):not(.y){padding:5px 22px 0}}
html body .step .pe,html body .step .pnote,html body .am-ph .he+div{font-family:var(--ui-font)}
html body .dafhead .refline{margin-top:12px}
html body .step .explain :is(p,dd,dt,li,summary){font-family:var(--ui-font)}
/* Downloads sheet (Nov 27 2026) */
.dl .dl-seder{display:flex;justify-content:space-between;align-items:baseline;margin:18px 0 2px;font:800 14px var(--ui-font);color:var(--L-muted)}
.dl .dl-seder .he{font:600 16px var(--he-ui)}
.dl .ofl-slot{margin:6px 0 0}
.dl .ofl-save{width:100%;justify-content:flex-start}
.gc-library-search #libDownloads{margin-top:6px;cursor:pointer}
.gc-library-search #libDownloads svg:first-child{color:var(--gc-teal)}
