:root {
  --ink: #141414;
  --gray: #6E6A63;
  --line: #e4e1db;
  --paper: #F6F5F2;
  --card: #ffffff;
  --red: #D7301F;
  --green: #2f6b45;
  --soft: #f2f0eb;
  --sans: 'IBM Plex Sans Hebrew', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 300 15px/1.6 var(--sans); }
a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
h1 { font-weight: 500; font-size: 22px; margin: 0 0 6px; letter-spacing: -0.01em; }
h2 { font-weight: 500; font-size: 15px; margin: 0 0 12px; }
h3 { font-weight: 500; font-size: 13px; color: var(--gray); margin: 18px 0 6px; }
p { margin: 0 0 12px; }
strong { font-weight: 500; }
.mono { font-family: var(--mono); font-weight: 300; }
.muted { color: var(--gray); }
.small { font-size: 12.5px; }
.warn { color: var(--red); }
[hidden] { display: none !important; }

/* כותרת */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--card); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .mark { display: block; height: 38px; width: auto; }
.brand .name { font-size: 13px; color: var(--gray); }
.top nav { display: flex; align-items: center; gap: 18px; font-size: 13.5px; }
.top nav a { text-decoration: none; }
.top .who { color: var(--gray); }

main { max-width: 1080px; margin: 0 auto; padding: 28px 24px 80px; }
.crumbs { font-size: 12.5px; color: var(--gray); margin-bottom: 14px; display: flex; gap: 6px; }
.crumbs a { text-decoration: none; }
.flash { background: var(--soft); border-inline-start: 3px solid var(--ink); padding: 10px 14px; margin-bottom: 18px; font-size: 14px; }
.preview-bar { background: var(--ink); color: #fff; font-size: 13px; padding: 8px 14px; margin-bottom: 18px; }
.preview-bar a { color: #fff; }

.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.head-row h1, .head-row h2 { margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 20px 22px; margin-bottom: 18px; }
.narrow { max-width: 520px; }
section.narrow.card { margin-inline: auto; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cols > .card { margin-bottom: 0; }
.cols + .card, .cols + section, .cols + .cols { margin-top: 18px; }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } .cols > .card { margin-bottom: 0; } main { padding: 20px 16px 60px; } .top { padding: 12px 16px; } }
.empty { text-align: center; padding: 40px; }
.empty p { color: var(--gray); }

/* טפסים */
input, select, textarea, button { font: inherit; color: inherit; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 3px; padding: 8px 10px; font-weight: 300;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); }
input.short { max-width: 140px; } input.tiny { width: 60px !important; display: inline-block; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--gray); }
.stack label.opt { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
legend { font-size: 13px; color: var(--gray); margin-bottom: 6px; }
.inline, .inline-form { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.inline-form select { width: auto; }
button, .btn { display: inline-block; border: 1px solid var(--ink); background: #fff; border-radius: 3px; padding: 7px 16px; cursor: pointer; text-decoration: none; font-size: 14px; font-weight: 400; line-height: 1.4; }
button:hover, .btn:hover { background: var(--soft); }
button.primary, .btn.primary { background: var(--ink); color: #fff; }
button.primary:hover, .btn.primary:hover { background: #333; }
button.link { border: 0; background: none; padding: 0; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
button.danger { border-color: var(--red); color: var(--red); }
.stack > button { align-self: flex-start; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.legal { font-size: 13px; color: var(--gray); background: var(--soft); padding: 12px 14px; border-radius: 3px; }
details.sub { margin-top: 12px; }
details.sub > summary { cursor: pointer; font-size: 13px; color: var(--gray); }
details.sub > form, details.sub > p { margin-top: 10px; }
details.card > summary { cursor: pointer; font-size: 13.5px; }
details.card.danger > summary { color: var(--red); }
details.card > form { margin-top: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 10px; }

/* פס ההתקדמות */
.book-head { margin-bottom: 18px; }
.book-head .meta { color: var(--gray); font-size: 14px; }
.progress { display: grid; grid-template-columns: 5fr 4fr; gap: 28px; margin: 6px 0 22px; }
@media (max-width: 760px) { .progress { grid-template-columns: 1fr; gap: 12px; } }
.half-mark { font-family: 'IBM Plex Sans', var(--sans); font-weight: 300; font-size: 26px; line-height: 1; color: #67686B; text-align: start; margin-bottom: 4px; }
.half-label { font-size: 12px; color: var(--gray); margin-bottom: 8px; }
.progress ol { list-style: none; margin: 0; padding: 0; display: flex; }
.progress li { flex: 1; position: relative; padding-top: 16px; font-size: 12.5px; color: var(--gray); min-width: 0; }
.progress li::before { content: ''; position: absolute; top: 4px; inset-inline: 0; height: 1px; background: var(--line); }
.progress li .dot { position: absolute; top: 0; inset-inline-start: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--paper); border: 1px solid #bbb6ad; }
.progress li.done { color: var(--ink); }
.progress li.done::before { background: var(--ink); }
.progress li.done .dot { background: var(--ink); border-color: var(--ink); }
.progress li.active { color: var(--ink); font-weight: 500; }
.progress li.active .dot { border-color: var(--ink); border-width: 2px; }
.progress li.active.you .dot { border-color: var(--red); background: var(--red); }
.progress li .lbl { display: block; padding-inline-end: 6px; }
.progress li .own { display: block; font-size: 11px; color: var(--gray); font-weight: 300; }

/* השלב הנוכחי */
.step { border-color: var(--ink); padding: 26px 28px; }
.step h2 { font-size: 18px; margin-bottom: 8px; }
.step-n { font-size: 12px; color: var(--gray); margin-bottom: 4px; }
.step form.stack { max-width: 560px; }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.choice { display: flex !important; flex-direction: row !important; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 3px; padding: 10px 12px; cursor: pointer; color: var(--ink) !important; }
.choice:has(input:checked) { border-color: var(--ink); background: var(--soft); }
.choice span { display: flex; flex-direction: column; }
.choice small { color: var(--gray); font-size: 12.5px; }
.count-row { display: flex; gap: 18px; font-size: 14px; margin-bottom: 8px; flex-wrap: wrap; }
.meter { height: 3px; background: var(--line); margin-bottom: 16px; }
.meter span { display: block; height: 100%; background: var(--ink); transition: width .3s; }
.drop input[type=file] { margin-top: 4px; }

/* טבלאות */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: start; font-weight: 400; color: var(--gray); font-size: 12.5px; border-bottom: 1px solid var(--line); padding: 6px 8px; }
td { border-bottom: 1px solid var(--line); padding: 9px 8px; vertical-align: top; }
td.num, th.num { text-align: end; white-space: nowrap; }
table.books tbody tr { cursor: pointer; }
table.books tbody tr:hover { background: var(--soft); }
table.books a { text-decoration: none; }
table.files td { padding: 7px 6px; font-size: 13.5px; }
table.files .fname { word-break: break-word; }
table.stages td { padding: 5px 4px; border: 0; }
table.stages select { padding: 4px 6px; font-size: 13px; }
table.stages tr.done td:first-child { color: var(--gray); }
table.stages + button { margin-top: 10px; }
table.charges tfoot td { border: 0; padding-top: 10px; }
button.check { width: 24px; height: 24px; padding: 0; text-align: center; border-color: var(--line); }
button.check.on { border-color: var(--ink); }
table.users td { vertical-align: middle; }
table.users details.sub { margin: 0; }
table.users details[open] { position: relative; }
table.users details[open] form { position: absolute; inset-inline-end: 0; z-index: 2; background: #fff; border: 1px solid var(--ink); padding: 16px; width: 320px; }
.users + .card { margin-top: 24px; }
.pill { font-size: 12px; border-radius: 10px; padding: 1px 9px; border: 1px solid var(--line); white-space: nowrap; }
.pill.client { border-color: var(--red); color: var(--red); }
.kv { display: grid; grid-template-columns: 90px 1fr; gap: 10px 14px; margin: 0; font-size: 14px; }
.kv dt { color: var(--gray); font-size: 13px; }
.kv dd { margin: 0; }
.token { word-break: break-all; background: var(--soft); padding: 8px; margin: 6px 0; }

/* סטטיסטיקה */
.stats { display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid var(--line); background: var(--card); margin-bottom: 22px; }
.stats > div { padding: 14px 16px; border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; font-size: 12.5px; color: var(--gray); }
.stats > div:first-child { border-inline-start: 0; }
.stats .n { font-size: 20px; color: var(--ink); font-weight: 400; }
.stats .n.mono { font-size: 16px; padding-top: 4px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(3, 1fr); } .stats > div:nth-child(4) { border-inline-start: 0; } .stats > div:nth-child(n+4) { border-top: 1px solid var(--line); } }

/* רשימת ספרים ללקוח */
.booklist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.booklist .card { margin: 0; padding: 0; }
.booklist a { display: block; padding: 18px 20px; text-decoration: none; }
.booklist .t { font-size: 16px; font-weight: 500; }
.booklist .state { margin-top: 14px; font-size: 13.5px; color: var(--gray); }
.booklist .yours { border-color: var(--red); }
.booklist .yours .state { color: var(--red); }

/* יומן */
.note-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.note-form button { align-self: flex-start; }
.log { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.log li { padding: 9px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 110px 1fr; gap: 0 12px; }
.log time { color: var(--gray); font-size: 12px; font-family: var(--mono); grid-row: span 2; padding-top: 2px; }
.log .actor { font-size: 12px; color: var(--gray); }
.log .internal { background: var(--soft); }
.log .tag { font-size: 11px; color: var(--gray); grid-column: 2; }
.log .k-decision .txt, .log .k-rights .txt { font-weight: 400; }

/* לוח ההחלטות */
.table-bar { position: sticky; top: 0; z-index: 3; background: var(--paper); padding: 10px 0 6px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.filters { display: flex; gap: 16px; align-items: center; font-size: 13px; color: var(--gray); flex-wrap: wrap; }
.filters select { width: auto; padding: 3px 8px; }
.dtable { display: flex; flex-direction: column; gap: 10px; }
.drow { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 14px 18px; }
.drow.s-accept { border-inline-start: 3px solid var(--green); }
.drow.s-reject { border-inline-start: 3px solid #bbb6ad; }
.drow.s-other { border-inline-start: 3px solid var(--red); }
.drow .where { display: flex; gap: 12px; font-size: 12.5px; color: var(--gray); margin-bottom: 6px; }
.drow .cat { border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; }
.drow .ctx { font-size: 13.5px; color: var(--gray); margin-bottom: 8px; }
.drow .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .drow .pair { grid-template-columns: 1fr; gap: 6px; } }
.drow .pair label { font-size: 11.5px; color: var(--gray); display: block; }
.drow .pair .t { font-size: 17px; line-height: 1.7; font-weight: 400; white-space: pre-wrap; }
.drow mark { background: none; color: var(--red); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.drow .orig mark { color: var(--gray); text-decoration-style: dotted; }
.drow .dnote { font-size: 13px; color: var(--gray); margin-top: 8px; }
.decide { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.decide .state { font-size: 13px; color: var(--gray); margin-inline-end: auto; }
.decide button { padding: 4px 12px; font-size: 13px; }
.readonly .decide { display: none; }
.drow.s-accept .decide button[data-s=accept], .drow.s-reject .decide button[data-s=reject], .drow.s-other .decide button[data-s=other] { background: var(--ink); color: #fff; }
.other-box { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.other-box .answer { flex: 2 1 240px; font-size: 16px; }
.other-box .cnote { flex: 1 1 160px; }
.drow.saving { opacity: .55; }
.finish { margin-top: 20px; text-align: center; border-color: var(--ink); }

/* PDF של הטקסט */
.textpdf { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 10px 16px; margin-bottom: 18px; font-size: 14px; }

/* שלב ההגדרות */
.step:has(.settings) { padding: 26px 28px 30px; }
.set-grid { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 32px; align-items: start; margin-top: 8px; }
@media (max-width: 860px) { .set-grid { grid-template-columns: 1fr; } .set-preview { order: -1; } }
.set-controls { display: flex; flex-direction: column; gap: 18px; }
.set-controls fieldset { gap: 8px; }
.set-controls legend { font-weight: 500; color: var(--ink); font-size: 13.5px; }
.set-controls .unit { color: var(--gray); font-weight: 300; font-size: 11.5px; }
.params { display: flex; flex-direction: column; gap: 18px; }
.row-l { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--gray); }
.nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.nums.two { grid-template-columns: 1fr 1fr; }
.nums label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--gray); }
.nums input { font-family: var(--mono); text-align: center; padding: 6px 4px !important; }
.modes { gap: 6px !important; }
.modes .choice small { font-size: 12px; }
.faithful-note { font-size: 13.5px; background: var(--soft); padding: 12px 14px; border-radius: 3px; }
.set-preview { position: sticky; top: 16px; }
.spread { direction: ltr; display: flex; flex-direction: row; justify-content: center; margin: 0 auto 16px; transition: opacity .2s; }
.pg { direction: rtl; position: relative; background: #fff; box-shadow: 0 1px 3px rgba(20,20,20,.18), 0 6px 18px rgba(20,20,20,.06); overflow: hidden; color: var(--ink); }
.pg-r { border-left: 1px solid #ddd8cf; }
.pg .body { overflow: hidden; text-align: justify; text-align-last: right; hyphens: none; font-weight: 400; }
.pg .ch { display: flex; align-items: flex-end; padding-bottom: 0.5em; box-sizing: border-box; font-weight: 400; }
.pg .rh, .pg .pn { color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.est { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); margin: 0; transition: opacity .2s; }
.est > div { padding: 10px 12px; border-inline-start: 1px solid var(--line); }
.est > div:first-child { border-inline-start: 0; }
.est dt { font-size: 11.5px; color: var(--gray); }
.est dd { margin: 0; font-family: var(--mono); font-size: 17px; }
@media (max-width: 500px) { .est { grid-template-columns: 1fr 1fr; } .est > div:nth-child(3) { border-inline-start: 0; } .est > div:nth-child(n+3) { border-top: 1px solid var(--line); } }
.warns p { margin: 10px 0 0; font-size: 13px; color: var(--red); }
.preview-note { margin-top: 10px; }

/* מד ההתקדמות */
.meter-box { margin: 14px 0 12px; }
.gauge { position: relative; height: 10px; background: var(--soft); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.gauge .fill { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--ink); transition: width .6s ease; }
.gauge .pulse { position: absolute; inset-block: 0; background: linear-gradient(90deg, transparent, rgba(215,48,31,.55), transparent); background-size: 200% 100%; animation: sweep 2.4s linear infinite; }
html[dir=rtl] .gauge .pulse { animation-direction: reverse; }
@keyframes sweep { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.gauge .tick { position: absolute; inset-block: 0; width: 1px; background: rgba(255,255,255,.7); mix-blend-mode: difference; opacity: .35; }
.meter-row { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; margin-top: 8px; font-size: 14px; }
.meter-row .pct { font-size: 20px; }
.meter-row .pct.step { font-size: 18px; font-weight: 500; white-space: nowrap; }
.meter-row .pct.step small { font-size: 13px; font-weight: 300; color: var(--gray); }
.meter-row .when { font-size: 12.5px; margin-inline-start: auto; }
.meter-row .eta { flex-basis: 100%; font-size: 14px; font-weight: 500; }
.dotlive { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-inline-end: 7px; vertical-align: middle; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .gauge .pulse, .dotlive { animation: none; } }
.prog-edit { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0; font-size: 13px; color: var(--gray); }
.prog-edit input:not(.tiny) { flex: 1; min-width: 160px; }
/* ההתקדמות בתוך הסרגל העליון */
.progress li .seg { position: absolute; top: 3px; inset-inline-start: 0; inset-inline-end: 0; height: 3px; background: var(--line); overflow: hidden; border-radius: 2px; }
.progress li .segfill { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--ink); transition: width .6s ease; }
.progress li .segpulse { position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0%, rgba(215,48,31,.9) 50%, transparent 100%); background-size: 40% 100%; background-repeat: no-repeat; animation: segsweep 2.2s ease-in-out infinite; }
@keyframes segsweep { from { background-position: 140% 0; } to { background-position: -40% 0; } }
.progress li.active::before { display: none; }
.progress li.active .dot { z-index: 1; }
.meter-box { margin: 6px 0 12px; }
@media (prefers-reduced-motion: reduce) { .progress li .segpulse { animation: none; } }
.edit-details { margin: 0; position: relative; }
.backs { margin: -6px 0 18px; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.backs form { display: inline; }
.progress .lbl-form { display: block; margin: 0; }
.progress .lbl-link { all: unset; display: block; cursor: pointer; padding-inline-end: 6px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; font-size: 12.5px; }
.progress .lbl-link:hover { text-decoration-color: var(--red); color: var(--red); }
.spread-mode { display: flex; justify-content: center; gap: 6px; margin-bottom: 10px; }
.spread-mode button { font-size: 12px; padding: 3px 10px; border-color: var(--line); color: var(--gray); }
.spread-mode button.on { border-color: var(--ink); color: var(--ink); }
button.busy { opacity: .7; cursor: progress; }
button.busy::after { content: ''; display: inline-block; width: .8em; height: .8em; margin-inline-start: .5em; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; vertical-align: -0.1em; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.flash { font-size: 15px; font-weight: 400; animation: flashin .4s ease; }
.flash.ok { border-inline-start-color: var(--green); background: #eef4ef; }
.flash.ok::before { content: '✓  '; color: var(--green); }
@keyframes flashin { from { opacity: 0; transform: translateY(-4px); } }

/* שאלות ללקוח */
.questions { border: 2px solid #c8102e; }
.questions .q-flag { display: inline-block; background: #c8102e; color: #fff; font-size: .8rem; padding: .15rem .6rem; border-radius: 2px; margin-bottom: .4rem; }
.questions .q { display: grid; grid-template-columns: 1.6rem 1fr; gap: .3rem .5rem; align-items: start; }
.questions .q .qn { font-weight: 600; }
.questions .q textarea { grid-column: 2; }
.warn { background: #fff4e5; border-inline-start: 3px solid #c8102e; padding: .5rem .8rem; }
.qlist li { margin: .5rem 0; }
.qlist li.open { color: #000; }
.qlist li.done { color: #555; }
.qlist .ans { margin-top: .2rem; color: #1a6b2f; }
button.link { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }

.cover-set { margin-top: 1rem; }
.cover-set .choice { margin: .25rem 0; }

/* שמות השלבים בסרגל: קישורים לדף השלב */
.progress a.lbl-link { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; cursor: pointer; }
.progress a.lbl-link:hover { color: #c8102e; border-bottom-style: solid; }
.progress a.lbl-link.sel { color: #c8102e; border-bottom: 2px solid #c8102e; }
.stage-panel .sp-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.stage-panel .sp-head h2 { margin: 0; }
.stage-panel .sp-status { font-size: .85rem; padding: .1rem .5rem; border-radius: 2px; background: #eee; }
.stage-panel .sp-status.s-done { background: #e6f2e9; color: #1a6b2f; }
.stage-panel .sp-status.s-active { background: #fbe9ec; color: #c8102e; }
.stage-panel .sp-close { margin-inline-start: auto; font-size: .85rem; }
.group-h { font-size: 15px; font-weight: 500; margin: 28px 0 8px; }

/* נוכחות ומספר סידורי (30.10.2026) */
.online { display: inline-flex; align-items: center; gap: 6px; color: var(--green); white-space: nowrap; }
.online::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.serial { color: var(--gray); font-weight: 300; font-size: .7em; vertical-align: middle; }

/* פרטי הספר: כרטיס מלא ברוחב הדף במקום חלון צף (30.10.2026) */
.details-card > summary { cursor: pointer; list-style: none; display: flex; gap: 10px; align-items: baseline; }
.details-card > summary::-webkit-details-marker { display: none; }
.details-card > summary::before { content: '▸'; color: var(--gray); }
.details-card[open] > summary::before { content: '▾'; }
.details-card form { margin-top: 16px; }
.fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin-bottom: 16px; }
.fields-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--gray); }
@media (max-width: 700px) { .fields-grid { grid-template-columns: 1fr; } }

.rights-sec { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 6px; }
.rights-sec h3 { font-size: 15px; color: var(--ink); }

.data-hint { border-inline-start: 3px solid var(--green); }
.data-hint p { margin: 6px 0 0; }

/* שורת "עכשיו" (31.10.2026) */
:root { --mag: #EC008C; }
.nowbox { border-inline-start: 4px solid var(--line); padding: 10px 14px; background: var(--soft); border-radius: 2px; }
.nowbox.live { border-color: var(--mag); }
.nowbox.client { border-color: var(--ink); }
.nowline { font-size: 22px; line-height: 1.35; }
.nowline .lbl { font-weight: 300; color: var(--gray); }
.nowbox.live .nowline strong { color: var(--mag); font-weight: 500; }
.nowbox.waiting .nowline strong, .nowbox.paused .nowline strong { color: var(--gray); font-weight: 400; }
.nowbox .dotlive { background: var(--mag); width: 10px; height: 10px; }
.nowbox .meter-row { gap: 6px 16px; font-size: 13.5px; }
.nowbox .meter-row .eta { flex-basis: auto; font-weight: 500; }
.taskbar { height: 3px; background: var(--line); margin-top: 8px; }
.taskbar i { display: block; height: 100%; background: var(--mag); transition: width .6s; }

/* לוח ההחלטות: דפים, וצד בצד עם העמוד (2.11.2026) */
.vmode { margin-inline-start: auto; display: inline-flex; gap: 10px; }
.vmode button.on { color: var(--ink); font-weight: 600; text-decoration: none; }
.pager { display: flex; align-items: center; gap: 14px; margin: 0 0 12px; flex-wrap: wrap; }
.pager .pg-pos { font-size: 14px; }
.pager button { padding: 6px 12px; }
.drow.cur { outline: 2px solid var(--red); outline-offset: -1px; }
.dwrap.m-split { display: grid; grid-template-columns: minmax(380px, 44%) 1fr; gap: 20px; align-items: start; }
.dwrap:not(.m-split) .dview { display: none; }
.dview { position: sticky; top: 12px; background: #fff; border: 1px solid var(--line); border-radius: 4px; display: flex; flex-direction: column; height: calc(100vh - 40px); }
.dv-bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dv-bar select { max-width: 260px; }
.dv-canvas { position: relative; overflow: auto; flex: 1; direction: ltr; background: #f3f1ec; }
.dv-canvas canvas { display: block; margin: 0 auto; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.dv-hl { position: absolute; top: 0; left: 50%; transform: translateX(-50%); pointer-events: none; }
.dv-canvas canvas { margin: 8px auto; }
.dv-hl { top: 8px; }
.hlrow { position: absolute; background: rgba(214, 0, 120, .08); border-left: 4px solid #d60078; border-right: 4px solid #d60078; }
.hlbox { position: absolute; background: rgba(255, 221, 0, .55); mix-blend-mode: multiply; border-bottom: 3px solid #d60078; animation: hlblink .5s ease-in-out 4 alternate; }
@keyframes hlblink { to { background: rgba(255, 221, 0, .15); } }
body.split main { max-width: none; }
@media (max-width: 1000px) { .dwrap.m-split { grid-template-columns: 1fr; } .dview { position: static; height: 70vh; } }
.occ { margin: 10px 0 4px; padding: 8px 10px; background: #faf8f3; border-inline-start: 3px solid #d60078; }
.occ label { display: block; font-size: 13px; color: #777; margin-bottom: 6px; }
.occ-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; }
.occ-list button { padding: 2px 9px; border: 1px solid var(--line); background: #fff; border-radius: 3px; cursor: pointer; font: inherit; }
.occ-list button.on { background: #d60078; border-color: #d60078; color: #fff; }
.occ-list small { opacity: .7; }
.occ-sum { color: #777; font-size: 13px; margin-inline-start: 6px; }
.dwrap:not(.m-split) .occ { display: none; }

/* קבצים: יוצא ונכנס (13.11.2026) */
.fgroup { margin-top: 14px; }
.fgroup .fhead { display: flex; justify-content: space-between; align-items: baseline; font-weight: 500; font-size: 14px; padding-bottom: 6px; }
.fgroup .fcount { font-size: 12px; color: var(--gray); font-weight: 400; }
.fgroup h3 { margin-top: 10px; }
.fgroup.fout { border-top: 2px solid var(--ink); padding-top: 8px; }
.fgroup.fin { background: var(--soft); border-top: 1px solid var(--line); padding: 8px 12px 10px; }
.fgroup.fin .fhead { color: var(--gray); }
.fgroup.fin table.files td { color: var(--gray); }
.fgroup.fin table.files a { color: var(--ink); }

/* לוח ההחלטות: מסך מלא, זכוכית מגדלת, לפני ואחרי, "אחרי התיקון" (אור אלכסנדרוביץ׳, 16.11.2026) */
body.focus header.top, body.focus .crumbs, body.focus .head-row, body.focus .flash { display: none; }
body.focus main { padding: 6px 14px 20px; }
body.focus .table-bar { padding: 4px 0; margin-bottom: 8px; }
body.focus .dview { top: 6px; height: calc(100vh - 12px); }
body.focus .dwrap.m-split { gap: 14px; }
.dv-loupe { position: relative; flex: none; direction: ltr; background: #fff; border-top: 1px solid var(--line); padding: 8px; overflow: hidden; display: flex; justify-content: center; align-items: flex-start; }
.dv-loupe[hidden] { display: none; }
.dv-loupe canvas { display: block; }
.dv-lhl { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); pointer-events: none; }
.hlbox.still { animation: none; background: rgba(255, 221, 0, .4); }
.dv-ba { display: inline-flex; align-items: center; gap: 6px; padding-inline-start: 8px; border-inline-start: 1px solid var(--line); }
.dv-ba button.on { color: var(--ink); font-weight: 600; text-decoration: none; }
.dv-ba select { max-width: 170px; font-size: 12.5px; }
.dview:not(.after-mode) #dv-after { opacity: .55; }
.dview.after-mode { border-color: var(--ink); }
.drow .where .warn { color: var(--red); }
.drow .inner { background: #fde9e5; outline: 1px dashed var(--red); border-radius: 2px; }
.drow .after { margin-top: 10px; padding: 8px 12px 10px; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.drow .after label { font-size: 11.5px; color: var(--gray); display: block; }
.drow .after .after-st { color: var(--ink); }
.drow .after .t.book { font-family: 'Frank Ruhl Libre', 'FrankG', serif; font-size: 18px; line-height: 1.75; font-weight: 400; white-space: pre-wrap; }
.drow .after ins { text-decoration: none; background: rgba(255, 221, 0, .45); border-bottom: 2px solid var(--ink); }
.drow .after ins.del { background: none; color: var(--red); border: 0; }
.drow .after.same ins { background: none; }
.drow .after.same .t.book { color: var(--gray); }
.btn .need { display: inline-block; min-width: 18px; padding: 0 5px; margin-inline-start: 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 12px; line-height: 18px; text-align: center; }

/* מראי מקום (16.11.2026) */
table.refs { width: 100%; border-collapse: collapse; font-size: 14px; }
table.refs th { text-align: start; font-weight: 500; font-size: 12.5px; color: var(--gray); border-bottom: 1px solid var(--ink); padding: 6px 8px; }
table.refs td { border-bottom: 1px solid var(--line); padding: 6px 8px; vertical-align: top; }
table.refs td.n { font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.refs tr.s-broken td.st, table.refs tr.s-unmapped td.st { color: var(--red); }
table.refs tr.s-ok td.st { color: var(--green); }
.ref-filter { display: flex; gap: 14px; margin: 0 0 12px; font-size: 14px; }
.ref-filter a.on { font-weight: 600; text-decoration: none; }
.count-row .need-t { color: var(--red); }

/* 16.11b: צד בצד בלי גלילה (אור: "לשאוף לאפס גלילה"). התוכן מקבל את רוב המסך, והשוליים מצטמצמים */
@media (min-width: 1001px) {
  body.split main { padding-top: 10px; padding-bottom: 0; }
  body.split .crumbs { margin-bottom: 4px; }
  body.split .head-row { margin-bottom: 4px; }
  body.split .head-row h1 { font-size: 18px; }
  body.split .head-row .btn { padding: 3px 10px; font-size: 12.5px; }
  body.split .table-bar { position: static; display: flex; align-items: center; gap: 6px 18px; flex-wrap: wrap; padding: 4px 0; margin-bottom: 8px; }
  body.split .table-bar .count-row { margin: 0; font-size: 13px; gap: 12px; }
  body.split .table-bar .meter { margin: 0; width: 90px; }
  body.split .table-bar .filters { flex: 1; }
  body.split .dwrap.m-split { grid-template-columns: minmax(340px, 36%) 1fr; gap: 12px; height: var(--wrap-h, calc(100vh - 160px)); }
  body.split .dwrap.m-split .dside { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding-inline-end: 2px; }
  body.split .dwrap.m-split .dview { position: static; height: 100%; }
  body.split .pager { margin: 0 0 6px; gap: 8px; }
  body.split .pager button { padding: 2px 10px; font-size: 13px; }
  body.split .pager select { padding: 1px 6px; }
  body.split .dtable { gap: 6px; }
  body.split .drow { padding: 8px 12px; }
  body.split .drow .where { margin-bottom: 2px; font-size: 12px; }
  body.split .drow .ctx { font-size: 12.5px; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  body.split .drow .pair { gap: 10px; }
  body.split .drow .pair .t { font-size: 15.5px; line-height: 1.5; }
  body.split .drow .after { margin-top: 6px; padding: 4px 10px 6px; }
  body.split .drow .after .t.book { font-size: 16px; line-height: 1.55; }
  body.split .drow .dnote { margin-top: 4px; font-size: 12.5px; }
  body.split .drow .occ { margin: 6px 0 2px; padding: 4px 8px; }
  body.split .decide { margin-top: 6px; }
  body.split .decide button { padding: 2px 10px; }
  body.split .dv-bar { padding: 4px 8px; gap: 8px; }
  body.split .dv-bar #dv-msg:empty { display: none; }
  body.split .dv-canvas canvas { margin: 4px auto; }
  body.split .dv-hl { top: 4px; }
  body.focus .dwrap.m-split { gap: 10px; }
}

/* הדמיית העימוד ב"אחרי התיקון" (16.11c) */
.drow .after.pv { background: #fbfaf7; }
.drow .after.pv .t.book { margin: 2px auto 0; color: var(--ink); hyphens: none; }
.drow .after .pv-lines { font-size: 12px; color: var(--gray); margin-top: 4px; }
.drow .after .pv-lines.changed { color: var(--red); font-weight: 500; }

/* 17.11a: בדיקת קליטה בעימוד והיסטוריית ההחלטות */
.drow .where .verify { font-size: 12px; padding: 0 6px; border-radius: 9px; }
.drow .where .verify.ok { color: var(--green); background: #e8f3ec; }
.drow .where .verify.bad { color: #fff; background: var(--red); }
.drow .where .verify.wait { color: var(--gray); background: #efede8; }
.drow .hist { margin-top: 6px; font-size: 12.5px; }
.drow .hist summary { cursor: pointer; color: var(--gray); width: max-content; }
.drow .hist ol { margin: 4px 0 0; padding-inline-start: 18px; }
.drow .hist li { margin: 2px 0; color: var(--gray); }
.drow .hist li.now { color: var(--ink); }
.drow .hist li .restore { margin-inline-start: 6px; }

/* 17.11b: טקסט רץ */
.rtext { background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.rt-bar { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 6px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
.rt-body { max-width: 46em; margin: 0 auto; padding: 18px 28px 40px; font-family: 'Frank Ruhl Libre', serif; font-size: 18px; line-height: 1.75; }
.rt-p { position: relative; margin: 0 0 10px; }
.rt-p .rt-t { margin: 0; text-align: justify; text-indent: 1.4em; }
.rt-p .rt-pg { position: absolute; inset-inline-start: -64px; top: 4px; width: 56px; text-align: end; font-size: 11px; color: var(--gray); }
.rt-part { font-family: 'IBM Plex Sans Hebrew', sans-serif; font-size: 14px; font-weight: 500; margin: 26px 0 8px; color: var(--gray); }
.rt-p .rt-ed { position: absolute; inset-inline-end: -84px; top: 2px; opacity: 0; font-family: 'IBM Plex Sans Hebrew', sans-serif; }
.rt-p:hover .rt-ed, .rt-p .rt-ed:focus { opacity: 1; }
.rt-t .ch { cursor: pointer; border-radius: 2px; }
.rt-t .ch.s-open { background: #fff4d6; outline: 1px solid #f0d27a; }
.rt-t .ch del { color: var(--red); text-decoration-thickness: 1px; }
.rt-t .ch ins, .rt-man ins { text-decoration: none; }
.rt-t .ch.s-open ins { border-bottom: 2px solid var(--ink); margin-inline-start: 3px; }
.rt-t .ch.s-accept ins, .rt-t .ch.s-other ins { background: #e8f3ec; }
.rt-t .ch.s-reject { background: #f1efea; }
.rt-t ins.z { color: var(--red); }
.rt-man ins { background: #e8f3ec; }
.rt-man del { color: var(--red); }
.rt-pop { display: inline-block; position: absolute; z-index: 5; background: #fff; border: 1px solid var(--ink); border-radius: 4px; padding: 6px 8px; font-family: 'IBM Plex Sans Hebrew', sans-serif; font-size: 13px; line-height: 1.4; text-indent: 0; box-shadow: 0 2px 8px rgba(0,0,0,.15); max-width: 360px; }
.rt-pop .row { display: flex; gap: 6px; margin-top: 4px; align-items: center; }
.rt-pop button { padding: 2px 10px; }
.rt-pop input { flex: 1; min-width: 160px; }
.rt-edit textarea { width: 100%; font-size: 18px; line-height: 1.75; padding: 6px 8px; border: 1px solid var(--ink); border-radius: 4px; resize: vertical; }
.rt-edit .row { display: flex; gap: 10px; align-items: center; margin-top: 4px; font-family: 'IBM Plex Sans Hebrew', sans-serif; }
@media (max-width: 1000px) { .rt-p .rt-pg { position: static; display: block; text-align: start; } .rt-p .rt-ed { position: static; opacity: 1; } .rt-body { padding: 12px; } }
.rt-man del + ins, .rt-t .ch del + ins { margin-inline-start: 4px; }
.rt-t .ch .alt-n { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--red); margin-inline-end: 2px; }
.rt-pop .alt { margin: 6px 0; }
.rt-pop .alt b { font-weight: 500; }

/* 17.11d: הערות והעברה, בקשת עימוד, זכוכית מגדלת כבויה */
.drow .where .asg { font-size: 12px; color: var(--red); }
.drow .cmts { margin-top: 6px; padding: 4px 8px; border-inline-start: 2px solid var(--line); font-size: 13px; }
.drow .cmts .cm { margin: 2px 0; }
.drow .cm-box { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.drow .cm-box[hidden] { display: none; }
.drow .cm-box textarea { flex: 1 1 100%; font: inherit; padding: 4px 6px; }
.drow .decide .cm-open { margin-inline-start: auto; }
#dv-loupe-t.on { color: var(--ink); font-weight: 600; text-decoration: none; }
#relayout[disabled] { color: var(--green); text-decoration: none; cursor: default; }

/* 18.11 (אור): קפיצה לעמוד, חיפוש בעמודים, וביטול החלטה גלוי */
.dv-pg { display: inline-flex; align-items: center; gap: 4px; color: var(--gray); white-space: nowrap; }
.dv-bar .dv-pg input#dv-pgin { width: 3.4em; padding: 1px 4px; text-align: center; font-size: 13px; display: inline-block; }
.dv-bar .dv-find input#dv-q { width: 10em; padding: 2px 6px; font-size: 13px; display: inline-block; }
.dv-res { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; padding: 4px 10px; border-bottom: 1px solid var(--line); max-height: 3.6em; overflow-y: auto; }
.dv-res button[data-k] { padding: 1px 8px; border: 1px solid var(--line); background: #fff; border-radius: 3px; cursor: pointer; font: inherit; }
.dv-res button.on { background: #d60078; border-color: #d60078; color: #fff; }
.dv-res small { opacity: .7; }
.dv-res .occ-sum { margin-inline-start: 0; }
.dv-res .dv-res-x { margin-inline-start: auto; font-size: 16px; }
.decide .undo { padding: 4px 12px; font-size: 13px; }
.undo-toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 50; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 4px; font-size: 14px; display: flex; gap: 12px; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,.2); }
.undo-toast[hidden] { display: none; }
.undo-toast .link { color: #fff; text-decoration: underline; }

/* 18.11 (אור, TASK-116, 117): הסיבה לשינוי בראש השורה, ומזהה קבוע */
.drow .dnote.why { margin: 0 0 8px; padding: 5px 9px; background: #f6f4ef; border-inline-start: 3px solid var(--line); color: var(--ink); font-size: 13px; }
body.split .drow .dnote.why { margin: 0 0 5px; padding: 4px 8px; font-size: 12.5px; }
.drow .where .did { color: #aaa; font-size: 11.5px; user-select: all; }

/* 18.11 (TASK-118): עריכת נוסח אחר והערות */
.drow .state .st-note { color: var(--gray); font-size: 12.5px; }
.drow .state .o-edit, .cmts .cm-edit { margin-inline-start: 6px; }
.cmts .cm-ed { margin-top: 4px; display: flex; gap: 6px; align-items: flex-start; }
.cmts .cm-ed textarea { flex: 1; min-height: 3em; font-size: 13px; padding: 4px 6px; }

/* 19.11 (אור, TASK-119–121): הטקסט הרץ – השורה הפעילה, חיפוש, וסגנון הפסקה */
.rt-find input#rt-q { width: 12em; padding: 2px 6px; font-size: 13px; display: inline-block; }
.rtext .rt-active { outline: 2px solid #d60078; outline-offset: 2px; border-radius: 2px; }
.rtext .rt-p.rt-hit { background: #fffbe6; }
::highlight(rtq) { background: #ffe066; color: inherit; }
.rtext .rt-p.rt-quote .rt-t { margin-inline: 2.2em; font-size: .93em; }
.rtext .rt-p.rt-motto .rt-t { margin-inline-start: 40%; font-size: .93em; text-align: left; }
.after .t.as-quote:not([style]) { margin-inline: 2em; font-size: .94em; }
.after .t.as-motto:not([style]) { margin-inline-start: 35%; font-size: .94em; text-align: left; }
.after .after-sty { color: #d60078; margin: 2px 0 4px; }
.other-box .o-style { display: block; margin: 4px 0; }
.drow .state .st-style { color: #d60078; font-size: 12.5px; }
