/* Study Workspace. Colors, type, space, radius and focus come from design/tokens.css (the build puts it inline before
   this file; a local run loads it through index.html). Nothing here sets a color value: the workspace's older names
   below are aliases of the tokens, kept so the panel files need no change. Controls shared with the rest of the site
   (.ows-select, .ows-more) are in design/components.css. */
:root {
  --bg: var(--paper); --panel: var(--sheet); --mute: var(--ink-2); --line: var(--rule);
  --same: var(--mark-same); --hit: var(--mark-hit); --verse: var(--mark-verse);
  --warn: var(--draft-ink); --warn-bg: var(--draft-bg); --warn-line: var(--draft-line);
  --diff: var(--mark-diff); --diff-line: var(--mark-diff-line);
  --serif: var(--ja-serif); --sans: var(--font-ui), var(--ja-sans);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: var(--fs-sm)/1.5 var(--sans); display: flex; flex-direction: column; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.top { display: flex; align-items: center; gap: var(--sp-2) var(--sp-3); padding: 6px var(--sp-3); border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.brand { white-space: nowrap; font: 700 var(--fs-base)/1.2 var(--display), var(--ja-sans); margin: 0; } .brand span { font-weight: 400; color: var(--mute); }
/* Buttons in the top bar are drawn --ctl high (36 on phones) and keep a --tap touch area through an invisible edge
   (.ows-hit in design/components.css; the same rule is repeated here for the bar's own classes). */
.icon { border: 1px solid var(--field-line); background: var(--panel); border-radius: var(--r-sm); min-width: var(--ctl); height: var(--ctl); padding: 0; font-size: var(--fs-md); line-height: 1; }
.icon, .seg button, .bigbtn { position: relative; }
.icon::after, .seg button::after, .bigbtn::after { content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, var(--tap)); height: max(100%, var(--tap)); transform: translate(-50%, -50%); }
.icon:hover { background: var(--accent-soft); }
#cmd { flex: 1 1 160px; min-width: 140px; }
.lay .ows-select { max-width: 13em; }
@media (max-width: 1439px) { #layLabel, #brandSub { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } }
#cmdBox { width: 100%; height: var(--tap); padding: 0 var(--sp-3); border: 1px solid var(--field-line); border-radius: var(--r-sm); background: var(--panel); font-size: var(--fs-base); }
.chap { display: flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 600; }
/* The language and text-size controls sit at the right end of the top bar, as on every page of the site (design/). */
.wsctl { margin-left: auto; display: flex; align-items: center; gap: var(--gap-ctl); }
.seg { display: inline-flex; border: 2px solid var(--ink); border-radius: var(--r-pill); overflow: hidden; background: var(--panel); }
.seg button { border: 0; background: transparent; min-height: calc(var(--ctl) - 4px); min-width: var(--tap); padding: 0 var(--ctl-pad); font-weight: 600; }
.seg button + button { border-left: 1px solid var(--ink); }
.seg button:hover { background: var(--bg); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--panel); }
.seg button:focus-visible { outline-offset: -3px; }
.lay { display: inline-flex; align-items: center; gap: var(--sp-2); font-weight: 600; }
/* The switch for the unverified alignment: a draft thing, so it wears the draft colors and says so in words. */
.flag { display: flex; align-items: center; gap: var(--sp-2); min-height: var(--tap); border: 2px dashed var(--warn-line); color: var(--warn); background: var(--warn-bg); border-radius: var(--r-sm); padding: 4px var(--sp-2); margin: 2px 0 6px; font-weight: 600; }
.flag input { width: 20px; height: 20px; flex: none; margin: 0; accent-color: var(--accent); }
.banner { background: var(--warn-bg); color: var(--warn); border-bottom: 2px dashed var(--warn-line); padding: 6px var(--sp-3); font-size: var(--fs-sm); font-weight: 600; }
.banner[hidden], .nrow[hidden] { display: none; }
/* One thin row under the banner: the Draft chip (when the banner is closed), the "This chapter" switch and its counts. */
.nrow { display: flex; align-items: center; gap: var(--sp-1) var(--sp-3); padding: 2px var(--sp-3); border-bottom: 1px solid var(--line); background: var(--panel); min-height: 32px; }
.nrow .legend { flex: 1 1 auto; min-width: 0; padding: 0; border: 0; background: none; }
.ltoggle { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 2px 4px; border-radius: var(--r-sm); font-weight: 700; color: var(--ink); }
.ltoggle::before { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s ease; }
.ltoggle[aria-expanded="true"]::before { transform: rotate(45deg); }
.ltoggle:hover { background: var(--accent-soft); }
.ltoggle[hidden] { display: none; }
.tnote { font-size: var(--fs-sm); color: var(--mute); margin: 0 0 var(--sp-2); }
.nchip { margin: 0 0 var(--sp-2); }
/* the button at the right end of a tile's tab strip: fill the screen with this tile, or show all tiles again */
.tmax { height: 100%; display: flex; align-items: center; }
.tmax[hidden] { display: none; }
.tmaxbtn { min-width: 36px; height: 100%; border: 0; background: transparent; color: var(--mute); font-size: var(--fs-md); padding: 0 var(--sp-2); }
.tmaxbtn:hover { background: var(--accent-soft); color: var(--ink); }
.tmaxbtn[aria-pressed="true"] { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .ltoggle::before { transition: none; } }
.status { min-height: 0; padding: 0 12px; font-size: var(--fs-sm); color: var(--mute); }
.status:not(:empty) { padding: 4px 12px; border-bottom: 1px solid var(--line); }
.body { flex: 1; display: flex; min-height: 0; }
/* The rail: where am I (book and chapter), what can I open (four named menus), how it is shown. One level of
   menus; the few tools most readers use are in the menu that starts open, the rest are one choice away. */
.rail { width: 264px; flex: none; overflow: auto; border-right: 1px solid var(--line); background: var(--panel); padding: var(--sp-2); }
.rail[hidden] { display: none; }
.rail h2 { font: 700 var(--fs-sm)/1.3 var(--sans); color: var(--ink); margin: var(--sp-4) var(--sp-2) var(--sp-1); }
.rail button.item, .rail a.item { display: flex; align-items: center; width: 100%; min-height: var(--tap); text-align: left; border: 0; background: transparent; padding: 4px var(--sp-3); border-radius: var(--r-sm); color: inherit; text-decoration: none; }
.rail button.item:hover, .rail button.item:focus-visible, .rail a.item:hover, .rail a.item:focus-visible { background: var(--accent-soft); }
.rail a.item:hover { text-decoration: underline; }
.rail button.item .isopen { margin-left: auto; padding-left: var(--sp-2); font-size: var(--fs-sm); color: var(--mute); white-space: nowrap; }
.brand a { color: inherit; text-decoration: none; }
.rail a.homebtn { gap: var(--sp-2); margin: 2px 0 6px; border: 2px solid var(--accent); color: var(--accent); border-radius: var(--r-pill); font-weight: 650; justify-content: center; }
.rail a.homebtn svg { flex: none; }
.rail .goto { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 5.5em); gap: var(--sp-2); padding: 0 var(--sp-1); }
.rail .goto label { display: grid; gap: 2px; font-size: var(--fs-sm); color: var(--mute); min-width: 0; }
.rail .ows-select { width: 100%; }
.rail .small { font-size: var(--fs-sm); color: var(--mute); padding: 2px var(--sp-3); margin: var(--sp-1) 0 0; }
.rail .lgroup { font: 600 var(--fs-sm)/1.3 var(--sans); color: var(--mute); padding: var(--sp-2) var(--sp-3) 2px; }
.rail .ows-more { border-top: 1px solid var(--line); }
.rail .ows-more.last { border-bottom: 1px solid var(--line); }
.rail .ows-more > .mbody { padding: 0 0 var(--sp-2); }
.dock { flex: 1; min-width: 0; position: relative; }
.pane { height: 100%; overflow: auto; padding: 10px 14px 40px; background: var(--panel); color: var(--ink); }
.pane > h2 { margin: 0 0 8px; font-size: var(--fs-sm); color: var(--mute); font-weight: 600; }
/* The head of a text tile: one version picker (a native select grouped by language) and the place. */
.phead { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin: 0 0 var(--sp-2); }
.phead h2 { margin: 0; font: 700 var(--fs-base)/1.3 var(--sans); color: var(--ink); }
.phead .ows-select { flex: 0 1 auto; min-width: 0; max-width: 100%; }
/* Options of one tile, behind one small menu: display switches and the link set. */
.popt { margin: 0 0 var(--sp-2); }
.phead .popt { margin: 0 0 0 auto; }
.phead .popt[open] { flex: 1 1 100%; margin: 0; }
@container (max-width: 560px) { .phead h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } }  /* the top bar already says the place */
.popt > summary { display: inline-flex; padding: 0 var(--sp-2); color: var(--mute); }
.popt > .mbody { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); padding: var(--sp-2) 0 var(--sp-1); }
.popt .setpick { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); }
.popt .small { flex: 1 1 100%; margin: 0; font-size: var(--fs-sm); color: var(--mute); }
.vs { padding: 3px 6px; border-radius: 5px; margin: 0; cursor: pointer; }
.vs.cur { background: var(--verse); }
.vn { font: 600 var(--fs-sm) var(--sans); color: var(--accent); margin-right: 6px; vertical-align: super; }
.t-ja { font-family: var(--serif); font-size: 17px; line-height: 2.1; }
.t-en { font-family: var(--body); font-size: 16px; line-height: 1.7; }
.t-gr { font-family: var(--greek); font-size: 18px; line-height: 1.8; }
rt { font-size: 9px; color: var(--mute); }
/* A link's review state is in its underline: dotted = machine draft, dashed = queued for a hand check,
   solid green = a named person checked it, double = the reviewer was unsure. */
.jl { border-bottom: 2px dotted var(--warn-line); cursor: pointer; }
.jl.st-q, .j.st-q { border-bottom: 2px dashed var(--warn); }
.jl.st-ok, .j.st-ok { border-bottom: 2px solid var(--ok); }
.jl.st-un, .j.st-un { border-bottom: 3px double var(--warn); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; padding: 4px 12px; font-size: var(--fs-sm); color: var(--mute); border-bottom: 1px solid var(--line); background: var(--panel); }
.legend[hidden] { display: none; }  /* hidden on an Old Testament chapter and with the flag off */
.legend .jl { cursor: default; color: var(--ink); }
.legend b { color: var(--ink); }
.gw { cursor: pointer; border-radius: 3px; }
.ns, .vl, .vp { font: var(--fs-sm) var(--sans); color: var(--mute); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; white-space: nowrap; }
.vp { border-style: dashed; }
.chips.books button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.chips.books b { font-variant-numeric: tabular-nums; }
.gw:hover, .jl:hover { background: var(--accent-soft); }
.same { background: var(--same); } .hit { background: var(--hit) !important; }
.il { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 4px 6px 10px; border-radius: 5px; }
.il.cur { background: var(--verse); }
.il .vn { align-self: flex-start; margin-top: 6px; }
.iw { display: flex; flex-direction: column; border: 0; background: transparent; text-align: left; padding: 2px 3px; border-radius: 4px; }
.iw:hover { background: var(--accent-soft); }
.iw .s { font: 18px var(--greek); }
.iw .g { font-size: var(--fs-sm); }
.iw .m { font: var(--fs-sm) var(--mono); color: var(--mute); }
.iw .j { font: var(--fs-sm) var(--serif); color: var(--warn); align-self: flex-start; }
.iw .j.un { font: var(--fs-sm) var(--sans); color: var(--mute); border: 1px dashed var(--line); border-radius: 3px; padding: 0 3px; }
.ws .here { margin-top: 6px; } .ws .here .state { font-size: var(--fs-sm); color: var(--mute); }
/* Parallel: a grid of versions while the tile is wide enough, one version under another when it is not */
.pane { container-type: inline-size; }
.parbar { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-bottom: 8px; }
.parbar .chips button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.parbar .ows-more { flex: 1 1 100%; }
.parbar .ows-more > .mbody { display: grid; gap: var(--sp-1); padding: var(--sp-1) 0 var(--sp-2); }
.parbar .pgroup { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.parbar .pgroup > b { font-size: var(--fs-sm); color: var(--mute); min-width: 5em; }
.parbar .small, .pardiff { font-size: var(--fs-sm); color: var(--mute); }
.par { display: grid; gap: 0 16px; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
.par > div { padding: 4px 6px; border-bottom: 1px solid var(--line); }
.par .hd { font: 600 var(--fs-sm) var(--sans); color: var(--mute); position: sticky; top: -10px; background: var(--panel); z-index: 1; }
.par .cur { background: var(--verse); }
.par .tl { display: none; font: 600 var(--fs-sm) var(--sans); color: var(--mute); border: 1px solid var(--line); border-radius: 3px; padding: 0 4px; margin-right: 6px; vertical-align: middle; }
mark.df { background: var(--diff); color: inherit; border-radius: 2px; box-shadow: 0 1px 0 var(--diff-line); }
@container (max-width: 560px) {
  .par { display: block; }
  .par .hd { display: none; }
  .par .tl { display: inline-block; }
  .par > div { border-bottom: 0; padding: 2px 6px; }
  .par > div[data-verse]:not(.first) .vn { display: none; }
  .par > div.first { border-top: 1px solid var(--line); margin-top: 4px; }
}
.pane.ws > h2 { font: 30px var(--greek); margin: 0; color: var(--ink); }
.ws .meta { color: var(--mute); margin: 2px 0 10px; }
.ws section { border-top: 1px solid var(--line); padding: 8px 0; }
.ws h3 { margin: 0 0 6px; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .06em; color: var(--mute); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chips button, .chip { border: 1px solid var(--field-line); background: transparent; border-radius: var(--r-pill); padding: 3px 12px; font-size: var(--fs-sm); }
.chips button[aria-pressed="true"]::before { content: "\2713\00a0"; }
@media (pointer: coarse) { .chips button { min-height: var(--tap); } }
.chips button:hover { background: var(--accent-soft); }
.draft { background: var(--warn-bg); border: 1px dashed var(--warn-line); border-radius: 6px; padding: 8px; }
.draft .tag { font-weight: 700; color: var(--warn); }
.rend { display: grid; grid-template-columns: minmax(6em, auto) 3em 1fr; gap: 2px 8px; align-items: center; margin-top: 6px; }
.rend .ja { font: 15px var(--serif); } .rend .n { text-align: right; font-variant-numeric: tabular-nums; }
.rend .bar { height: 8px; background: var(--warn-line); border-radius: 4px; min-width: 2px; }
.notes textarea { width: 100%; min-height: 220px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); padding: 8px; }
.btn { border: 1px solid var(--field-line); background: var(--panel); border-radius: var(--r-pill); min-height: 36px; padding: 4px 14px; color: inherit; text-decoration: none; display: inline-flex; align-items: center; cursor: pointer; font-weight: 600; }
.btn:hover { background: var(--accent-soft); }
.btn[aria-pressed="true"] { background: var(--ink); color: var(--panel); border-color: var(--ink); }
@media (pointer: coarse) { .btn { min-height: var(--tap); } }
table.src { border-collapse: collapse; width: 100%; font-size: var(--fs-sm); }
table.src th, table.src td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
table.src tr.unv td { background: var(--warn-bg); }
a { color: var(--accent); }
:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: 1px; }
.tab { display: flex; align-items: center; gap: 6px; height: 100%; padding: 0 var(--sp-3); white-space: nowrap; font-weight: 600; }
/* The tiles (dockview) wear the site's paper, sheet, ink and rules in both themes; the tab in front has an accent bar. */
.dockview-theme-light, .dockview-theme-dark {
  --dv-group-view-background-color: var(--sheet); --dv-tabs-and-actions-container-background-color: var(--paper);
  --dv-activegroup-visiblepanel-tab-background-color: var(--sheet); --dv-activegroup-hiddenpanel-tab-background-color: var(--paper);
  --dv-inactivegroup-visiblepanel-tab-background-color: var(--sheet); --dv-inactivegroup-hiddenpanel-tab-background-color: var(--paper);
  --dv-activegroup-visiblepanel-tab-color: var(--ink); --dv-activegroup-hiddenpanel-tab-color: var(--ink-2);
  --dv-inactivegroup-visiblepanel-tab-color: var(--ink); --dv-inactivegroup-hiddenpanel-tab-color: var(--ink-2);
  --dv-separator-border: var(--rule); --dv-tab-divider-color: var(--rule); --dv-paneview-header-border-color: var(--rule);
  --dv-paneview-active-outline-color: var(--focus); --dv-drag-over-background-color: var(--accent-soft); --dv-drag-over-border-color: var(--accent);
  --dv-icon-hover-background-color: var(--accent-soft); --dv-active-sash-color: var(--accent);
  --dv-tabs-and-actions-container-height: var(--tap); --dv-tabs-and-actions-container-font-size: var(--fs-sm);
}
.dv-tab.dv-active-tab .tab { box-shadow: inset 0 -3px 0 var(--accent); }
/* Tab strips scroll sideways by touch, wheel or keyboard (dockview's native scrollbars option); the scrollbar itself is
   hidden and a fade at an edge (.more-l, .more-r, set by app.js) shows that more tabs are there. The count button at
   the right end (dockview's overflow list) still lists the tabs that are out of view. The chapter's counts row uses
   the same cue on a phone. A mask only reads opacity, so the colour in the gradients is any opaque token. */
.dv-tabs-container { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.dv-tabs-container::-webkit-scrollbar { display: none; }
.dv-tabs-container.more-r, .legend.more-r { -webkit-mask-image: linear-gradient(to right, var(--ink) calc(100% - 32px), transparent); mask-image: linear-gradient(to right, var(--ink) calc(100% - 32px), transparent); }
.dv-tabs-container.more-l, .legend.more-l { -webkit-mask-image: linear-gradient(to left, var(--ink) calc(100% - 32px), transparent); mask-image: linear-gradient(to left, var(--ink) calc(100% - 32px), transparent); }
.dv-tabs-container.more-l.more-r, .legend.more-l.more-r { -webkit-mask-image: linear-gradient(to right, transparent, var(--ink) 32px, var(--ink) calc(100% - 32px), transparent); mask-image: linear-gradient(to right, transparent, var(--ink) 32px, var(--ink) calc(100% - 32px), transparent); }
.tabx { padding: 2px 6px; border-radius: 4px; color: var(--mute); cursor: pointer; font-size: var(--fs-base); }
/* On a touch screen the tab strip is one touch target high and the x of a tab is a full-height target. (The theme
   above names the same height, but dockview's own theme rule comes later at the same weight, hence the longer name.) */
@media (pointer: coarse) {
  .dv-shell.dockview-theme-light, .dv-shell.dockview-theme-dark { --dv-tabs-and-actions-container-height: var(--tap); }
  .tab { padding: 0 0 0 var(--sp-2); gap: 0; }
  .tabx { align-self: stretch; display: inline-flex; align-items: center; justify-content: center; min-width: 36px; padding: 0; border-radius: 0; }
}
.tabx:hover { background: var(--accent-soft); color: var(--ink); }
/* Phone: the tabs of a tile share its strip, each at least 6.5em and never wider than its own title, and a long title
   ends in an ellipsis, so a first-time visitor sees that a second tab is there and what it is (Japanese larger text at
   375 hid the second tab behind the fade). More tabs than fit still scroll and show the count button. */
@media (max-width: 600px) {
  .dv-tabs-container .dv-tab { flex: 1 1 0; min-width: 6.5em; max-width: max-content; }
  .tab { min-width: 0; }
  .tab > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}
/* Phone: the rail is a drawer over the workspace, the top bar is two rows:
   menu, layout, language and text size; then the chapter arrows and the search box. */
@media (max-width: 900px) {
  /* two flex rows; the zero-height ::after is the line break between them (half a gap on each side of it) */
  .top { flex-wrap: wrap; align-items: center; gap: calc(var(--gap-ctl) / 2) var(--gap-ctl); padding: var(--gap-ctl) 8px; }
  .top::after { content: ""; order: 3; flex: 0 0 100%; height: 0; }
  .brand { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #railToggle { order: 0; flex: none; }
  .lay { order: 1; flex: 1 1 0; min-width: 0; }
  .lay .ows-select { max-width: 100%; width: 100%; min-width: 0; }
  .wsctl { order: 2; flex: none; margin-left: 0; }
  .seg button { white-space: nowrap; }
  .chap { order: 4; flex: none; gap: var(--gap-ctl); }
  .chap .icon { font-size: var(--fs-lg); }
  .chap #chLabel { overflow: hidden; text-overflow: ellipsis; max-width: 34vw; font-size: var(--fs-sm); }
  #cmd { order: 5; flex: 1 1 0; min-width: 0; }
  #cmdBox { padding: 0 var(--sp-2); }
  .top .bigbtn .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .body { position: relative; }
  .rail { position: absolute; z-index: 20; top: 0; bottom: 0; left: 0; width: min(300px, 88vw); box-shadow: 4px 0 18px var(--ows-shadow); }
  /* the bottom padding keeps the last line of a tile clear of the floating Feedback button */
  .pane { padding: 6px 8px 72px; }
  .par { gap: 0 8px; }
  .banner { padding: 4px 8px; line-height: 1.45; }
  /* the chapter's review counts: one line that scrolls sideways, not two */
  .legend { flex-wrap: nowrap; white-space: nowrap; overflow-x: auto; gap: 4px 10px; }
  .nrow { padding: 0 8px; gap: var(--sp-2); }
  .legend > * { flex: none; }
  /* the head of a text tile: the version picker and the tile's options on one line */
  .phead { flex-wrap: nowrap; gap: var(--gap-ctl); margin: 0 0 var(--sp-1); }
  .phead .ows-select { flex: 1 1 auto; min-width: 0; }
  .phead .popt { flex: none; }
  .phead .popt[open] { flex: none; }
  .phead .popt[open] > .mbody { position: absolute; left: 8px; right: 8px; z-index: 5; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
    padding: var(--sp-2); box-shadow: 0 6px 18px var(--ows-shadow); }
  .phead { position: relative; }
  .popt > summary { padding: 0 var(--sp-2); }
}
/* A very narrow phone: the layout picker gets a row of its own rather than a clipped name. */
@media (max-width: 359px) {
  .lay { order: 6; flex: 1 1 100%; }
  .wsctl { margin-left: auto; }
}
/* Word Study: the rings (one a translation) and the ledger of every occurrence */
.ws .small { font-size: var(--fs-sm); color: var(--mute); margin: 0 0 6px; }
svg.rings { display: block; width: 100%; max-width: 400px; height: auto; margin: 6px auto; }
.slice { cursor: pointer; transition: opacity .15s ease; }
.slice.draftring { stroke-dasharray: 2 2; }
.dim .slice { opacity: .2; } .dim .slice.on { opacity: 1; }
.slice:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ringname { font: 600 11px ui-monospace, Menlo, monospace; fill: var(--ink); paint-order: stroke; stroke: var(--panel); stroke-width: 3.5px; stroke-linejoin: round; }
.center-gk { font: 700 22px var(--greek); fill: var(--ink); } .center-n { font: 12px var(--sans); fill: var(--mute); }
/* Word Study: the English diagram and the Japanese diagram, side by side when the tile is wide, stacked when narrow */
.ringpair { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; margin-top: 8px; }
.ringcol { flex: 1 1 250px; min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
.ringcol.draft, .ringcol.off { background: var(--warn-bg); border: 1px dashed var(--warn-line); }
.ringcol h4 { margin: 0 0 2px; font-size: 14px; color: var(--ink); }
.ringcol .tag { font-weight: 700; color: var(--warn); font-size: 12px; }
.ringcol.off .small { color: var(--warn); }
.ringcol.off .btn { min-height: 44px; }
.wlg { display: grid; gap: 2px; margin: 6px 0; }
.lgrow { display: grid; grid-template-columns: 14px 1fr auto; gap: 8px; align-items: center; text-align: left; border: 0; background: transparent; padding: 3px 4px; border-radius: 5px; font-size: 13px; }
button.lgrow:hover, .lgrow.on { background: var(--accent-soft); }
.lgrow .sw { width: 12px; height: 12px; border-radius: 3px; }
.lgrow .num { font: 11px ui-monospace, Menlo, monospace; color: var(--mute); }
.lgrow .t-ja { font-size: 15px; line-height: 1.4; }
.occwrap { overflow-x: auto; }
table.occ { border-collapse: collapse; width: 100%; font-size: var(--fs-sm); }
table.occ th { text-align: left; font: 600 var(--fs-sm) var(--sans); color: var(--mute); padding: 3px 8px 3px 0; position: sticky; top: 0; }
table.occ td { border-top: 1px solid var(--line); padding: 4px 8px 4px 0; vertical-align: top; }
table.occ td.t-ja { font-size: 14px; line-height: 1.5; }
table.occ small { display: block; font: var(--fs-sm) var(--mono); color: var(--mute); }
table.occ .na { color: var(--mute); font-size: var(--fs-sm); }
table.occ tr.here td { background: var(--verse); }
.reflink { border: 0; background: transparent; color: var(--accent); padding: 0; text-align: left; white-space: nowrap; text-decoration: underline; }
.hl { background: color-mix(in srgb, var(--hl) 28%, transparent); border-radius: 3px; padding: 0 2px; }
@media (prefers-reduced-motion: reduce) { .slice { transition: none; } }
/* Lexicon and commentary */
.srcline { font-size: var(--fs-sm); color: var(--mute); border-top: 1px solid var(--line); padding-top: 6px; margin-top: 12px; }
.pane.lexi > h2 { color: var(--ink); } .lexi .lemma { font: 26px var(--greek); } .lexi .meta { font-weight: 400; color: var(--mute); }
.lexi .small, .comm .small { font-size: var(--fs-sm); color: var(--mute); margin: 4px 0 8px; }
.lx { font: 15px/1.6 var(--body); }
.lx [lang="grc"] { font-family: var(--greek); font-size: 1.08em; } .lx [lang="he"] { font-size: 1.1em; }
.lx-sense { margin: 4px 0 4px 14px; } .lx > .lx-sense { margin-left: 0; }
.lx-n { font: 600 var(--fs-sm) var(--sans); color: var(--accent); }
.lx-etym { color: var(--mute); } .lx-re { margin-top: 6px; }
.lx-ref { border: 0; background: transparent; color: var(--accent); padding: 0; font: inherit; text-decoration: underline; text-decoration-style: dotted; }
.lx hr.lx-more { border: 0; border-top: 1px dashed var(--line); margin: 10px 0; }
.comm .chips { margin-bottom: 2px; } .comm .chips button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.cm { padding: 4px 8px; border-radius: 5px; cursor: pointer; }
.cm.cur { background: var(--verse); }
.cm h3 { font: 600 var(--fs-sm) var(--sans); color: var(--accent); margin: 4px 0 2px; }
.cm p, .cintro p { font: 15px/1.6 var(--body); margin: 0 0 8px; }
.cintro { margin: 4px 0 8px; } .cintro summary { font-size: var(--fs-sm); color: var(--mute); cursor: pointer; }
mark.enhit { background: var(--hit); color: inherit; border-radius: 3px; }

/* Larger text: the same switch as the other site pages (class owsbig, key ows-text). The dock keeps its
   own geometry, so what grows is what is inside each pane, the top bar and the rail, not the page as a whole. */
.bigbtn .glyph { font-weight: 700; }
.bigbtn[aria-pressed="true"] .glyph::after { content: "\2212"; margin-left: 2px; }
.bigbtn[aria-pressed="false"] .glyph::after { content: "+"; margin-left: 2px; }
.bigbtn { display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--ink); background: var(--panel); border-radius: var(--r-pill); min-height: var(--ctl); min-width: var(--tap); justify-content: center; padding: 0 var(--ctl-pad); white-space: nowrap; font-weight: 600; }
.bigbtn:hover { background: var(--bg); }
.bigbtn[aria-pressed="true"] { background: var(--ink); color: var(--panel); border-color: var(--ink); }
html.owsbig { --mute: var(--ink); }
html.owsbig .pane > *, html.owsbig .rail > *, html.owsbig .banner, html.owsbig .nrow, html.owsbig .status { zoom: 1.25; }
html.owsbig .pane :is(p, li, dd) { line-height: 1.8; }
html.owsbig .rail { width: 320px; }
html.owsbig .dv-tab .tab { font-size: 15px; }
@media (min-width: 901px) { html.owsbig .top > * { zoom: 1.25; } }

/* Furigana can be turned off (rail, Display): the reading goes, the text stays where it is. */
html.noruby rt { display: none; }
html.noruby .t-ja { line-height: 1.9; }
.rail button.item[data-ruby] { border: 1px solid var(--field-line); }
.rail button.item[data-ruby][aria-pressed="true"]::before { content: "\2713\00a0"; }
/* Text search */
.srch form { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.srch input[type="search"] { flex: 1 1 160px; min-width: 0; min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); }
.srch select, .srch form button { min-height: 36px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); padding: 0 8px; }
.srch form button { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.srch .count { color: var(--mute); font-size: var(--fs-sm); margin: 0 0 6px; }
.srch ol { list-style: none; margin: 0; padding: 0; }
.srch li { border-top: 1px solid var(--line); }
.srch .sres { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 7px 4px; }
.srch .sres:hover, .srch .sres:focus-visible { background: var(--accent-soft); }
.srch .sres .ref { display: block; font: 600 var(--fs-sm) var(--sans); color: var(--accent); }
.srch .sres mark { background: var(--hit); color: inherit; border-radius: 2px; }

/* Guided study */
.guide h3 { font-size: 16px; margin: 10px 0 4px; }
.guide .gdraft { background: var(--draft-bg); color: var(--draft-ink); border: 1px dashed var(--draft-line); border-radius: var(--r-sm); padding: 6px 8px; font-size: var(--fs-sm); }
.guide .gsteps { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 6px 0; }
.guide .gsteps button { min-width: 36px; min-height: 36px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--bg); cursor: pointer; }
.guide .gsteps button[aria-current="true"] { border-color: var(--accent); border-width: 2px; font-weight: 700; }
.guide .gsteps button.gdone { background: var(--accent-soft); }
.guide .gact { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.guide textarea { width: 100%; min-height: 90px; box-sizing: border-box; font: inherit; }
.guide .grow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* Verse notes and highlights (colours chosen to keep text readable in both themes) */
.hl-y { background: var(--hl-yellow) !important; } .hl-g { background: var(--hl-green) !important; }
.hl-b { background: var(--hl-blue) !important; } .hl-p { background: var(--hl-pink) !important; }
.hl-o { background: var(--hl-orange) !important; }
.notes textarea { width: 100%; min-height: 80px; box-sizing: border-box; font: inherit; }
.notes .vcol { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; align-items: center; }
.notes .sw { min-width: 36px; min-height: 36px; border: 1px solid var(--line); border-radius: var(--r-pill); cursor: pointer; background: var(--bg); }
.notes .sw[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 1px; }
.notes .vlist { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 4px; }
.notes .vlist button { width: 100%; text-align: left; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 8px; background: var(--bg); cursor: pointer; }
.notes .grow { display: flex; flex-wrap: wrap; gap: 6px; }
.vn .nmark { margin-left: 2px; font-size: .8em; color: var(--accent); }

/* Word menu card */
.wmenu { position: fixed; z-index: 60; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: 0 6px 24px var(--ows-shadow); padding: 10px 12px; font-size: 14px; box-sizing: border-box; }
.wmenu .wm-h { display: flex; align-items: baseline; gap: 8px; }
.wmenu .wm-h b { font-size: 20px; }
.wmenu .wm-x { margin-left: auto; min-width: 36px; min-height: 36px; border: 1px solid var(--line); border-radius: var(--r-pill); background: transparent; cursor: pointer; }
.wmenu dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; margin: 6px 0; }
.wmenu dt { color: var(--mute); } .wmenu dd { margin: 0; }
.wmenu .wm-a { display: flex; flex-wrap: wrap; gap: 6px; }

/* Word by word table */
.wtab .wtab-scroll { overflow-x: auto; margin-top: 6px; }
.wtab table { border-collapse: collapse; width: 100%; font-size: 14px; }
.wtab th, .wtab td { border-bottom: 1px solid var(--line); padding: 4px 6px; text-align: left; vertical-align: top; }
.wtab th { font-size: var(--fs-sm); color: var(--mute); position: sticky; top: 0; background: var(--panel); }
.wtab tbody tr { cursor: pointer; } .wtab tbody tr:hover, .wtab tbody tr.same { background: var(--accent-soft); }
.wtab td[lang="grc"] { font-size: 16px; white-space: nowrap; }

/* Cross references */
.xr .xlist { padding-left: 1.4em; display: grid; gap: 8px; }
.xr .xlist p { margin: 2px 0 4px; font-size: 14px; }

/* Greek search */
.gsr .gform { display: grid; gap: 6px; max-width: 520px; }
.gsr .gform label { display: grid; gap: 2px; font-size: var(--fs-sm); color: var(--mute); }
.gsr .gform input, .gsr .gform select { font: inherit; color: var(--ink); padding: 4px 6px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); }
.gsr .gform input { font-size: 16px; }
.gsr ol { padding-left: 1.4em; }

/* Word use */
.use h3 { font-size: 14px; margin: 10px 0 4px; }
.use .ulist { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.use .ulist button { width: 100%; text-align: left; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 4px 8px; background: var(--bg); cursor: pointer; }

/* Sentence parts under Greek words */
.iw .pt { display: block; font-size: var(--fs-sm); font-weight: 600; border-radius: 4px; padding: 0 4px; margin-top: 2px; width: fit-content; }
.pt-s { background: var(--hl-blue); } .pt-o { background: var(--hl-pink); } .pt-io { background: var(--hl-orange); }
.pt-p { background: var(--hl-green); } .pt-v { background: var(--hl-yellow); }

/* word details (hover) */
.hv .hv-w { font-size: 1.5em; margin-bottom: .3em; }
.hv dl { display: grid; grid-template-columns: max-content 1fr; gap: .25em .8em; margin: 0 0 .6em; }
.hv dt { color: var(--mute); }
.hv dd { margin: 0; min-width: 0; }
.hv .hv-lx { font-size: .92em; line-height: 1.5; }

/* link set letter in a tab: a small button that moves the panel to the next set */
/* A tile in link set A (every tile, at first) shows no letter; the letter appears once a tile follows B or C. */
.tabset[data-set="A"] { display: none; }
.tabset { font-size: .78em; font-weight: 600; min-width: 1.5em; text-align: center; padding: 0 .35em; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; color: var(--mute); }
.tabset:hover { color: var(--accent); border-color: var(--accent); }
.tabset::after { content: attr(data-set); }
.pane[data-set="B"] { box-shadow: inset 3px 0 0 var(--accent); }
.pane[data-set="C"] { box-shadow: inset 3px 0 0 var(--ok); }
/* guided study: study picker, teacher tools, editor, hand-in view */
.guide .gpick { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 4px 0 6px; }
.guide .gpick select { max-width: 100%; font: inherit; }
.guide .gteach { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 6px; }
.guide .gteach summary { cursor: pointer; font-size: var(--fs-sm); }
.guide .glink { min-height: 60px; font: var(--fs-sm) var(--mono); }
.guide .gfield { display: block; font-size: var(--fs-sm); margin: 6px 0; }
.guide .gfield input, .guide .gfield select { display: block; width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; padding: 4px 6px; }
.guide .gfield textarea { min-height: 54px; }
.guide .gstep { border: 1px solid var(--line); border-radius: var(--r-sm); margin: 8px 0; padding: 6px 10px; }
.guide .gstep legend { font-size: var(--fs-sm); font-weight: 700; }
.guide .ghand h4 { margin: 10px 0 2px; font-size: 15px; }
.guide .gans { white-space: normal; border-left: 3px solid var(--accent); padding-left: 8px; margin: 4px 0; }

/* structure (clause outline) */
.st .st-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 10px; }
.st .st-lines { list-style: none; margin: 0; padding: 0; }
.st .st-lines li { display: flex; align-items: baseline; gap: 6px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.st .st-lines li.cur { background: var(--accent-soft); }
.st .st-v { flex: 0 0 2.2em; font-size: .8em; color: var(--mute); background: none; border: 0; padding: 0; text-align: right; cursor: pointer; }
.st .st-mv { flex: 0 0 auto; display: inline-flex; gap: 2px; }
.st .st-mv button { font-size: .8em; min-width: 1.6em; padding: 0 .2em; border: 1px solid var(--line); border-radius: 4px; background: none; color: var(--mute); cursor: pointer; }
.st .st-t { flex: 1 1 auto; min-width: 0; font-size: 1.12em; line-height: 1.7; }
.st .st-t .gw { font: inherit; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; }
.st .st-t .gw:hover, .st .st-t .gw:focus-visible { color: var(--accent); text-decoration: underline; }
.st .st-k { display: inline-block; font-size: .68em; margin-right: .5em; padding: 0 .4em; border-radius: 4px; border: 1px solid var(--line); color: var(--mute); vertical-align: middle; }
.st .st-adv { border-color: var(--accent); color: var(--accent); }
.st .st-mod { border-color: var(--ok); color: var(--ok); }
/* grammar terms */
.gram h3 { font-size: 15px; margin: 12px 0 4px; }
.gram dl { margin: 0; }
.gram .gterm { padding: 6px 0; border-bottom: 1px solid var(--line); }
.gram dd { margin: 2px 0 0; }
.gram .gex { border: 1px solid var(--line); background: var(--bg); border-radius: var(--r-sm); padding: 1px 6px; margin: 2px 2px 0 0; cursor: pointer; font: inherit; }
.gram .gex:hover { background: var(--accent-soft); }
.gram .gdraft { background: var(--draft-bg); color: var(--draft-ink); border: 1px dashed var(--draft-line); border-radius: var(--r-sm); padding: 6px 8px; font-size: var(--fs-sm); }
.gram [lang="grc"] { font-family: var(--greek); font-size: 1.08em; }
/* reading plan (shares the guide's picker, teacher tools and field styles) */
.rplan .gpick { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 4px 0 6px; }
.rplan .gpick select { max-width: 100%; font: inherit; }
.rplan .gteach { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 6px; }
.rplan .gteach summary { cursor: pointer; font-size: var(--fs-sm); }
.rplan .glink { width: 100%; min-height: 60px; font: var(--fs-sm) var(--mono); }
.rplan .grow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rplan .gfield { display: block; font-size: var(--fs-sm); margin: 6px 0; }
.rplan .gfield input, .rplan .gfield textarea { display: block; width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; padding: 4px 6px; }
.rplan progress { width: 100%; }
.rplan .rlist { padding-left: 1.6em; }
.rplan .rlist li { margin: 3px 0; }
.rplan .rlist li.rdone .rgo { color: var(--mute); text-decoration: line-through; }
.rplan .rgo { border: 0; background: transparent; color: var(--accent); cursor: pointer; font: inherit; padding: 2px 4px; }
/* reading aid and the three word-study mistakes */
.ws .wsay { margin: 2px 0 4px; }
.ws .wfall { border: 1px solid var(--line); border-left: 4px solid var(--draft-line); border-radius: var(--r-sm); padding: 4px 10px; margin: 10px 0; font-size: var(--fs-sm); }
.ws .wfall h3 { font-size: 14px; margin: 4px 0; }
.ws .wfall ul { margin: 0 0 4px; padding-left: 1.2em; }
.wmenu [lang="grc"] { font-family: var(--greek); }

/* Hebrew interlinear (right to left) */
.hb .hb-v { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid var(--line); }
.hb .hb-v .vn { flex: 0 0 auto; }
.hb .hb-ws { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; }
.hb .hw { display: inline-flex; flex-direction: column; align-items: center; text-align: center; max-width: 9em; }
.hb .hw .h { font: 1.55em/1.5 var(--hebrew); }
.hb .hw .x { font-size: .78em; color: var(--mute); font-style: italic; }
.hb .hw .g { font-size: .82em; }
.hb .hw .m { font-size: .7em; color: var(--mute); }

.hb .hw { background: none; border: 0; padding: 2px 3px; border-radius: var(--r-sm); color: inherit; font: inherit; cursor: pointer; }
.hb .hw:hover, .hb .hw:focus-visible { background: var(--accent-soft); }
.hb .hw.same { background: var(--accent-soft); outline: 1px solid var(--accent); }
/* Hebrew Word Study */
.hwd .hwd-h b { font: 2em/1.4 var(--hebrew); }
.hwd .hwd-bars { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 3px; }
.hwd .hwd-bars li { display: grid; grid-template-columns: 7em 1fr 3em; align-items: center; gap: 6px; font-size: .9em; }
.hwd .hwd-bars .bar { height: .7em; background: var(--accent); border-radius: 3px; }
.hwd .hwd-bars .c { text-align: right; color: var(--mute); }
.hwd .hwd-lx { font-size: .92em; line-height: 1.6; }
.hwd .hwd-occ { display: flex; flex-wrap: wrap; gap: 4px; }
.hwd .hwd-occ button { font-size: .82em; border: 1px solid var(--line); border-radius: 4px; background: none; color: inherit; padding: 1px 6px; cursor: pointer; }

/* Hebrew search */
.hsr form { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-end; }
.hsr form label { display: grid; gap: 4px; flex: 1 1 16em; min-width: 0; }
.hsr .hsr-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 4px; }
.hsr .hsr-list button { width: 100%; text-align: left; background: none; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 4px 8px; color: inherit; cursor: pointer; }
.hsr .hsr-list b { font: 1.3em var(--hebrew); }

/* katakana reading under each Greek word (Japanese screens) */
.iw .k { display: block; font-size: var(--fs-sm); color: var(--accent); line-height: 1.3; }
.iw .k [lang="en"] { color: var(--mute); }
.kn-note { margin-top: 0; }
.kn-note p { margin: 4px 0 0; }
.kn-note:not([open]) > p { display: none; }  /* closed: no box at all (Chrome keeps one for closed details content) */

/* verse card: one verse piece by piece for a learner (vcard.js) */
.vc .vc-cols, .vc .vc-rows > li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--sp-3); }
.vc .vc-cols { margin: var(--sp-4) 0 0; font-weight: 650; }
.vc .vc-rows { list-style: none; margin: var(--sp-1) 0 0; padding: 0; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--sheet); }
.vc .vc-rows > li { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--rule); align-items: start; }
.vc .vc-rows > li:last-child { border-bottom: 0; }
.vc .vc-j, .vc .vc-m { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; }
.vc .vc-ja { font-size: var(--fs-lg); line-height: 1.4; overflow-wrap: anywhere; }
.vc .vc-yomi { font-family: var(--sans); font-size: var(--fs-sm); color: var(--ink-2); overflow-wrap: anywhere; }
.vc .vc-en { font-size: var(--fs-base); }
.vc .vc-os { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.vc button.vc-o { font: inherit; cursor: pointer; max-width: 100%; }
.vc button.vc-o:hover { border-color: var(--accent); }
.vc .vc-words { list-style: none; padding: 0; display: grid; gap: var(--sp-2); }
.vc .vc-words .vc-w { font: 600 var(--fs-lg) var(--serif); margin-right: var(--sp-2); }
.vc .vc-list { display: flex; flex-wrap: wrap; gap: var(--gap-ctl); }
