:root {
  --bg:#f3f5f4; --card:#ffffff; --ink:#1b2629; --muted:#5f6f73; --line:#dde3e1; --soft:#eef2f0;
  --accent:#0d6b62; --accent-ink:#ffffff; --accent-soft:#e2f1ee;
  --ok:#2f8f5b; --warn:#c7801a; --bad:#bf4330; --work:#2f6fb5; --none:#aab4b3;
  --ins:#dff3e4; --ins-ink:#17693c; --del:#fbe3df; --del-ink:#a2331f; --paper:#ffffff;
}
@media (prefers-color-scheme: dark) { :root {
  --bg:#12181a; --card:#1b2325; --ink:#e7eeec; --muted:#9db0b0; --line:#2f3d3d; --soft:#222d2e;
  --accent:#4dbfb1; --accent-ink:#08201d; --accent-soft:#1d3835;
  --ok:#62c48d; --warn:#e5ae55; --bad:#ec7b68; --work:#74aeea; --none:#5d6a6a;
  --ins:#1d3a29; --ins-ink:#8fe0ae; --del:#40211d; --del-ink:#f3a497; --paper:#1f282a; } }
* { box-sizing:border-box; }
html { font-size:15px; }
body { margin:0; background:var(--bg); color:var(--ink); font-family:"Segoe UI", Tahoma, "Noto Sans Arabic", system-ui, sans-serif; line-height:1.6; }
button, input, select, textarea { font:inherit; color:inherit; }
a { color:var(--accent); }
h1 { font-size:1.45rem; margin:0; line-height:1.35; } h2 { font-size:1.1rem; margin:0 0 .6rem; } h3 { font-size:.95rem; margin:0 0 .4rem; }
.muted { color:var(--muted); } .small { font-size:.85rem; } .ltr { direction:ltr; unicode-bidi:isolate; }
.code { font-family:Consolas, "Courier New", monospace; font-size:.82rem; color:var(--muted); direction:ltr; unicode-bidi:isolate; white-space:nowrap; }

button { cursor:pointer; border:1px solid var(--line); background:var(--card); border-radius:8px; padding:.4rem .85rem; }
button:hover { border-color:var(--accent); } button:disabled { opacity:.5; cursor:default; }
button.primary { background:var(--accent); border-color:var(--accent); color:var(--accent-ink); font-weight:600; }
button.danger { color:var(--bad); } button.ghost { border-color:transparent; background:none; padding:.25rem .5rem; }
button.link { border:0; background:none; padding:0; color:var(--accent); text-decoration:underline; }
input, select, textarea { border:1px solid var(--line); background:var(--card); border-radius:8px; padding:.4rem .6rem; max-width:100%; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }

.shell { display:grid; grid-template-columns:220px 1fr; min-height:100vh; }
#side { background:var(--card); border-inline-end:1px solid var(--line); padding:14px 10px; position:sticky; top:0; height:100vh; overflow:auto; display:flex; flex-direction:column; gap:2px; }
#side .brand { font-weight:700; padding:4px 10px 12px; }
#side a { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:.5rem .7rem; border-radius:8px; color:var(--ink); text-decoration:none; }
#side a:hover { background:var(--soft); } #side a.on { background:var(--accent-soft); color:var(--accent); font-weight:600; }
#side .badge { background:var(--bad); color:#fff; border-radius:10px; padding:0 .45rem; font-size:.75rem; font-weight:600; }
#side .spacer { flex:1; } #side .who { border-top:1px solid var(--line); padding:10px 10px 0; }
.content { min-width:0; }
#top { display:flex; gap:10px; align-items:center; padding:10px 22px; border-bottom:1px solid var(--line); background:var(--card); position:sticky; top:0; z-index:5; }
#top input[type=search] { flex:1; max-width:460px; }
#main { padding:20px 22px 60px; max-width:1180px; }
@media (max-width: 820px) {
  .shell { grid-template-columns:1fr; }
  #side { position:static; height:auto; flex-direction:row; flex-wrap:wrap; border-inline-end:0; border-bottom:1px solid var(--line); padding:8px; }
  #side .brand, #side .spacer { display:none; } #side .who { border:0; padding:0; margin-inline-start:auto; }
  #main { padding:14px 16px 50px; } #top { padding:8px 16px; }
}

.card { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:16px; }
.stack > * + * { margin-top:14px; }
.crumbs { font-size:.85rem; color:var(--muted); margin-bottom:4px; }
.head { display:flex; gap:12px; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; }
.head .acts { display:flex; gap:8px; flex-wrap:wrap; }
details.menu { position:relative; } details.menu summary { list-style:none; cursor:pointer; border:1px solid var(--line); background:var(--card); border-radius:8px; padding:.4rem .85rem; }
details.menu summary::-webkit-details-marker { display:none; } details.menu summary:hover { border-color:var(--accent); }
.menubox { position:absolute; inset-inline-end:0; top:calc(100% + 4px); z-index:6; background:var(--card); border:1px solid var(--line); border-radius:10px; padding:6px; min-width:190px; display:flex; flex-direction:column; gap:2px; box-shadow:0 6px 18px rgba(0,0,0,.12); }
.menubox button { border:0; text-align:start; background:none; } .menubox button:hover { background:var(--soft); }
.todos { display:flex; flex-direction:column; } a.todo { display:flex; gap:10px; align-items:center; padding:.5rem .4rem; border-bottom:1px solid var(--line); color:var(--ink); text-decoration:none; border-radius:6px; }
a.todo:last-child { border-bottom:0; } a.todo:hover { background:var(--soft); } a.todo .chip { min-width:2.6rem; text-align:center; font-weight:700; } a.todo span:nth-child(2) { flex:1; }
.structure table.gaps th:nth-child(1) { width:12%; } .structure table.gaps th:nth-child(3) { width:14%; } .structure table.gaps td { white-space:normal !important; }
.figs { display:flex; gap:22px; flex-wrap:wrap; margin-top:10px; }
.fig b { display:block; font-size:1.5rem; font-variant-numeric:tabular-nums; line-height:1.2; } .fig span { font-size:.8rem; color:var(--muted); }
.fig.bad b { color:var(--bad); } .fig.warn b { color:var(--warn); } .fig.ok b { color:var(--ok); }
.grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr)); gap:10px; }
.tile { display:block; text-align:start; width:100%; border:1px solid var(--line); border-radius:10px; padding:11px 12px; background:var(--card); }
.tile:hover { border-color:var(--accent); } .tile .nm { font-weight:600; } .tile.empty { border-style:dashed; background:none; }
.bar { display:flex; height:6px; border-radius:3px; overflow:hidden; background:var(--soft); margin:8px 0 4px; } .bar i { display:block; height:100%; }
.b-ok { background:var(--ok); } .b-warn { background:var(--warn); } .b-bad { background:var(--bad); } .b-work { background:var(--work); } .b-none { background:var(--none); }
.chip { display:inline-block; border-radius:10px; padding:0 .55rem; font-size:.78rem; background:var(--soft); white-space:nowrap; margin-inline-end:4px; }
.chip.ok { color:var(--ok); } .chip.warn { color:var(--warn); } .chip.bad { color:var(--bad); } .chip.work { color:var(--work); } .chip.none { color:var(--muted); border:1px dashed var(--line); background:none; }
.dot { display:inline-block; width:9px; height:9px; border-radius:50%; margin-inline-end:6px; }
.tablewrap { overflow-x:auto; }
table.list { border-collapse:collapse; width:100%; } table.list th, table.list td { text-align:start; padding:.5rem .6rem; border-bottom:1px solid var(--line); vertical-align:top; }
table.list th { font-size:.78rem; color:var(--muted); font-weight:600; } table.list tr.click { cursor:pointer; } table.list tr.click:hover td { background:var(--soft); }
.tabs { display:flex; gap:4px; border-bottom:1px solid var(--line); margin-bottom:14px; flex-wrap:wrap; }
.tabs button { border:0; border-bottom:2px solid transparent; border-radius:0; background:none; padding:.5rem .8rem; color:var(--muted); }
.tabs button.on { color:var(--accent); border-bottom-color:var(--accent); font-weight:600; }
.filters { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-bottom:10px; }
.banner { border-radius:10px; padding:10px 14px; background:var(--soft); border:1px solid var(--line); display:flex; gap:10px; align-items:center; justify-content:space-between; flex-wrap:wrap; }
.banner.warn { border-color:var(--warn); } .banner.work { border-color:var(--work); } .banner.bad { border-color:var(--bad); }
.empty { text-align:center; color:var(--muted); padding:26px 10px; }

.steps { display:grid; grid-template-columns:repeat(4, 1fr); gap:8px; }
.step { border:1px solid var(--line); border-radius:10px; padding:9px 11px; background:var(--card); }
.step .n { font-size:.75rem; color:var(--muted); } .step .t { font-weight:600; } .step .w { font-size:.8rem; color:var(--muted); overflow-wrap:anywhere; }
.step.done { border-color:var(--ok); } .step.done .t::after { content:" ✓"; color:var(--ok); } .step.now { border-color:var(--work); box-shadow:inset 0 0 0 1px var(--work); }
@media (max-width: 640px) { .steps { grid-template-columns:1fr 1fr; } }

.paper { background:var(--paper); border:1px solid var(--line); border-radius:6px; padding:28px 34px; max-width:860px; }
@media (max-width: 640px) { .paper { padding:16px; } }
.paper .hd { display:grid; grid-template-columns:1fr auto; border:1px solid var(--line); margin-bottom:18px; } .paper .hd > div { padding:6px 10px; border-bottom:1px solid var(--line); }
.paper .hd > div:nth-child(odd) { border-inline-end:1px solid var(--line); } .paper .hd .ti { font-weight:700; font-size:1.05rem; }
.paper h4 { font-size:1rem; margin:18px 0 6px; padding-bottom:3px; border-bottom:1px solid var(--line); }
.paper p { margin:6px 0; overflow-wrap:anywhere; } .paper .li { display:flex; gap:8px; margin:5px 0; } .paper .li .num { color:var(--muted); min-width:2.2em; font-variant-numeric:tabular-nums; }
.paper .sub { font-weight:600; margin-top:10px; }
.tw { overflow-x:auto; margin:8px 0; } .paper table { border-collapse:collapse; width:100%; } .paper td { border:1px solid var(--line); padding:4px 7px; vertical-align:top; font-size:.9rem; overflow-wrap:break-word; height:1.9em; }
.paper img, .pic img { max-width:100%; height:auto; vertical-align:middle; } .paper td img { max-height:160px; } .pic { text-align:center; margin:8px 0; }
.paper p.bold { font-weight:700; } .paper p.centre { text-align:center; } .paper p.shape { color:var(--muted); font-size:.85rem; border:1px dashed var(--line); border-radius:6px; padding:6px 10px; }
iframe.orig { width:100%; height:calc(100vh - 150px); min-height:520px; border:1px solid var(--line); border-radius:8px; background:var(--card); }
.blk .tbl.paper { padding:8px; max-width:none; } .blk .tbl.paper td { padding:1px; }
ins { background:var(--ins); color:var(--ins-ink); text-decoration:none; border-radius:3px; padding:0 1px; }
del { background:var(--del); color:var(--del-ink); border-radius:3px; padding:0 1px; }
.blk-ins { background:var(--ins); border-inline-start:3px solid var(--ok); padding-inline-start:8px; border-radius:3px; }
.blk-del { background:var(--del); border-inline-start:3px solid var(--bad); padding-inline-start:8px; border-radius:3px; text-decoration:line-through; }
.blk-chg { border-inline-start:3px solid var(--warn); padding-inline-start:8px; }

.editbar { position:sticky; top:53px; z-index:4; background:var(--card); border:1px solid var(--line); border-radius:10px; padding:10px 12px; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.editbar .grow { flex:1; min-width:180px; }
.sec { border:1px solid var(--line); border-radius:10px; background:var(--card); padding:12px; }
.sec .st { display:flex; gap:8px; align-items:center; margin-bottom:8px; } .sec .st input { font-weight:700; flex:1; }
.blk { display:flex; gap:6px; align-items:flex-start; padding:2px 0; } .blk .gut { display:flex; gap:2px; opacity:.25; } .blk:hover .gut, .blk:focus-within .gut { opacity:1; }
.blk .gut button { padding:0 .35rem; border-color:transparent; background:none; font-size:.85rem; }
.blk select { padding:.15rem .3rem; font-size:.78rem; border-color:transparent; background:var(--soft); }
.blk textarea { flex:1; resize:none; overflow:hidden; min-height:2.1rem; border-color:transparent; background:var(--soft); line-height:1.6; }
.blk textarea:focus { background:var(--card); border-color:var(--accent); outline:none; }
.blk.h textarea { font-weight:700; } .blk .tbl { flex:1; overflow-x:auto; } .blk .tbl table { border-collapse:collapse; } .blk .tbl td { padding:1px; } .blk .tbl textarea { min-width:110px; width:100%; }
.hint { font-size:.82rem; color:var(--muted); }

.treebox { overflow:auto; border:1px solid var(--line); border-radius:12px; background:var(--card); height:calc(100vh - 230px); min-height:420px; }
.treebox svg { display:block; } .treebox .lk { fill:none; stroke:var(--line); stroke-width:1.5; }
.treebox .nd rect.bx { fill:var(--card); stroke:var(--line); rx:8; } .treebox .nd:hover rect.bx { stroke:var(--accent); } .treebox .nd { cursor:pointer; }
.treebox .nd.empty rect.bx { stroke-dasharray:4 3; fill:none; } .treebox .nd text { fill:var(--ink); font-size:13px; } .treebox .nd text.c { fill:var(--muted); font-size:11px; }
.treebox .nd.root rect.bx { fill:var(--accent); stroke:var(--accent); } .treebox .nd.root text { fill:var(--accent-ink); font-weight:700; }
.treebox .tg { fill:var(--soft); stroke:var(--line); } .treebox .tgx { fill:var(--muted); font-size:13px; text-anchor:middle; pointer-events:none; }
.legend { display:flex; gap:14px; flex-wrap:wrap; font-size:.82rem; color:var(--muted); }

dialog { border:1px solid var(--line); border-radius:14px; background:var(--card); color:var(--ink); width:min(600px, calc(100vw - 32px)); padding:20px; }
dialog::backdrop { background:rgba(0,0,0,.45); } dialog h2 { margin-bottom:12px; }
.row { display:flex; gap:10px; align-items:center; margin:8px 0; flex-wrap:wrap; } .row > label { min-width:130px; color:var(--muted); font-size:.9rem; } .row > input, .row > select, .row > textarea { flex:1; min-width:160px; }
.dlgacts { display:flex; gap:8px; justify-content:flex-end; margin-top:16px; }
.pick { max-height:280px; overflow:auto; border:1px solid var(--line); border-radius:8px; margin-top:8px; } .pick > * { display:block; width:100%; text-align:start; padding:7px 10px; border:0; border-bottom:1px solid var(--line); border-radius:0; background:none; }
.pick > *:hover { background:var(--accent-soft); }
#toast { position:fixed; bottom:18px; inset-inline-start:18px; background:var(--ink); color:var(--bg); padding:9px 16px; border-radius:8px; display:none; z-index:30; }

body.login { display:grid; place-items:center; min-height:100vh; }
body.login form { width:min(350px, calc(100vw - 32px)); } body.login h1 { font-size:1.2rem; } body.login label { display:block; font-size:.85rem; color:var(--muted); margin:10px 0 4px; }
body.login input { width:100%; } body.login button { width:100%; margin-top:16px; padding:.6rem; } #err { color:var(--bad); font-size:.85rem; min-height:1.3rem; margin-top:10px; }
.structurepaper { max-width:none; } .cover { text-align:center; padding:28px 0 22px; border-bottom:2px solid var(--accent); margin-bottom:10px; } .cover h1 { font-size:1.7rem; margin:6px 0; } .cover .sub { font-weight:600; margin-bottom:6px; }
.structure h2 { font-size:1.2rem; margin:26px 0 6px; padding:6px 10px; background:var(--accent-soft); border-inline-start:4px solid var(--accent); break-after:avoid; }
.structure h3 { font-size:1.02rem; margin:16px 0 4px; border-bottom:1px solid var(--line); padding-bottom:2px; break-after:avoid; } .structure h4 { font-size:.92rem; margin:10px 0 2px; border:0; padding:0; break-after:avoid; }
.structure .lv3, .structure .lv4, .structure .lv5 { margin-inline-start:14px; } .structure .num { color:var(--muted); font-variant-numeric:tabular-nums; } .structure .cnt { color:var(--muted); font-weight:400; font-size:.82rem; }
.structure table.st { table-layout:fixed; } .structure table.st th:nth-child(1) { width:15%; } .structure table.st th:nth-child(3) { width:11%; } .structure table.st th:nth-child(4) { width:6%; }
.structure table.st th:nth-child(5), .structure table.st th:nth-child(6) { width:12%; } .structure table.st th:nth-child(7) { width:14%; } .structure table.st td:nth-child(-n+2) { overflow-wrap:anywhere; }
.structure table.st th, .structure table.st td:nth-child(n+4) { white-space:nowrap; } .structure table.st .code { white-space:normal; }
.structure table.st { font-size:.8rem; margin:2px 0 6px; } .structure table.st th, .structure table.st td { padding:.2rem .4rem; } .structure table.st tr { break-inside:avoid; } .structure table.st thead { display:table-header-group; }
.structure .fulltext { margin:10px 0 16px; break-before:page; } .structure .fulltext .paper { border:0; padding:0; max-width:none; }
@page { size:A4; margin:14mm 12mm; }
@media print { .noprint { display:none !important; } .structurepaper { border:0 !important; padding:0 !important; } .structure h2 { break-before:page; -webkit-print-color-adjust:exact; print-color-adjust:exact; } .cover + .structure h2:first-child { break-before:auto; }
  #side, #top, .tabs, .steps, .banner, .head .acts, .crumbs { display:none !important; } .shell { display:block; } #main { padding:0; max-width:none; } .paper { border:0; max-width:none; padding:0; } body { background:#fff; } }

/* ---- a document on the society's template (tpl.js) ---- */
:root { --sug:#eaf2fb; --sug-line:#2f6fb5; --ask:#fdf3dc; --ask-line:#c7801a; }
@media (prefers-color-scheme: dark) { :root { --sug:#1c2a3a; --sug-line:#74aeea; --ask:#3a2f17; --ask-line:#e5ae55; } }
.tplpage { max-width:1180px; }
.how .legend .sw { display:inline-block; width:12px; height:12px; border-radius:3px; margin-inline-end:6px; vertical-align:-1px; border:1px solid var(--line); }
.sw.ours { background:var(--paper); } .sw.sug { background:var(--sug); border-color:var(--sug-line) !important; } .sw.ask { background:var(--ask); border-color:var(--ask-line) !important; }
ul.notes { margin:8px 0 0; padding-inline-start:20px; } ul.notes li { margin:4px 0; }
.tnav { position:sticky; top:53px; z-index:4; display:flex; gap:4px; flex-wrap:wrap; background:var(--bg); padding:6px 0; }
.tnav a { font-size:.82rem; padding:.2rem .6rem; border:1px solid var(--line); border-radius:14px; background:var(--card); color:var(--ink); text-decoration:none; white-space:nowrap; }
.tnav a.done, .tnav a.na { color:var(--ok); border-color:var(--ok); } .tnav a b { background:var(--work); color:#fff; border-radius:9px; padding:0 .4rem; margin-inline-start:5px; font-size:.72rem; }
.tsec { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:14px 16px; scroll-margin-top:100px; }
.tsec.done, .tsec.na { border-color:var(--ok); } .tsec.gen { background:none; border-style:dashed; }
.tsh { display:flex; gap:10px; align-items:center; flex-wrap:wrap; } .tsh h2 { margin:0; font-size:1.1rem; } .tsh .chips { margin-inline-start:auto; }
.tsh .no { width:1.7rem; height:1.7rem; border-radius:50%; background:var(--accent-soft); color:var(--accent); display:grid; place-items:center; font-weight:700; font-size:.85rem; }
.tsec.done .tsh .no, .tsec.na .tsh .no { background:var(--ok); color:#fff; }
.tsec > .hint { margin:2px 0 10px; }
.cols { display:grid; grid-template-columns:minmax(0, 5fr) minmax(0, 7fr); gap:14px; } @media (max-width: 900px) { .cols { grid-template-columns:1fr; } }
.col { min-width:0; } .colh { font-size:.78rem; font-weight:600; color:var(--muted); margin-bottom:5px; }
.col .none { border:1px dashed var(--line); border-radius:8px; padding:12px; color:var(--muted); font-size:.9rem; }
.paper.tp { padding:10px 12px; max-width:none; font-size:.92rem; background:var(--soft); border-color:transparent; } .paper.tp table { background:var(--paper); }
details.other { margin-top:8px; font-size:.9rem; } details.other summary { cursor:pointer; color:var(--accent); }
.tb { border-radius:8px; padding:5px 9px; margin:4px 0; border:1px solid transparent; }
.tb.ours:hover, .tb.took:hover { background:var(--soft); }
.tb.sug { background:var(--sug); border-color:var(--sug-line); border-inline-start-width:4px; }
.tb.sug.del .tx { text-decoration:line-through; color:var(--del-ink); }
.tb.ask { background:var(--ask); border-color:var(--ask-line); border-inline-start-width:4px; }
.tb .tag { font-size:.75rem; color:var(--muted); margin-bottom:2px; } .tb.sug .tag strong { color:var(--sug-line); } .tb.ask .tag strong { color:var(--ask-line); }
.tl { display:flex; gap:8px; align-items:flex-start; } .tl .num { color:var(--muted); min-width:1.8em; font-variant-numeric:tabular-nums; } .tl .tx, .tb > .tx { flex:1; overflow-wrap:anywhere; white-space:pre-wrap; }
.tl .tx.sub { font-weight:700; } .tl .paper.tp { flex:1; min-width:0; background:none; padding:0; }
.tl .gut { display:flex; opacity:.2; } .tb:hover .gut { opacity:1; }
.tb .why { font-size:.84rem; margin-top:4px; } .tb .mark { font-size:.72rem; color:var(--muted); }
.basis { font-size:.8rem; color:var(--muted); margin-top:3px; } .basis summary { cursor:pointer; } .basis .q { margin:3px 0 0; padding:4px 8px; border-inline-start:2px solid var(--line); font-style:italic; }
.basis .bk { display:inline-block; border-radius:8px; padding:0 .45rem; background:var(--card); border:1px solid var(--line); font-size:.72rem; }
.basis.k-national .bk, .basis.k-who .bk { color:var(--ok); border-color:var(--ok); } .basis.k-practice .bk { color:var(--warn); border-color:var(--warn); }
.tb .dec { display:flex; gap:6px; margin-top:6px; } button.small { padding:.2rem .6rem; font-size:.84rem; }
.tb .ans { background:var(--card); border-radius:6px; padding:6px 9px; margin-top:6px; } .tb .qa { margin-top:6px; display:flex; flex-direction:column; gap:6px; } .tb .qa textarea, .tb .qa input { width:100%; }
.tedit { flex:1; } .tedit textarea { width:100%; resize:vertical; } table.tedit { border-collapse:collapse; } table.tedit td { padding:1px; } table.tedit textarea { min-width:120px; resize:none; }
dialog.wide { width:min(980px, calc(100vw - 32px)); }
.secfoot { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:12px; padding-top:10px; border-top:1px solid var(--line); }
.sheet .sq { break-inside:avoid; margin-top:14px; } .sheet .wl { border-bottom:1px solid var(--line); height:1.9em; } .sheet .fill { display:inline-block; min-width:260px; border-bottom:1px solid var(--line); }
@media print { .tnav, .secfoot, .tb .dec, .tb .qa, .tl .gut { display:none !important; } .tsec { break-inside:avoid-page; border-color:#999; } }
.tb .was { font-size:.84rem; margin-top:4px; color:var(--muted); } .tb .was del { text-decoration:line-through; }
.tb .dec { flex-wrap:wrap; align-items:flex-start; } details.qa { flex:1 1 100%; order:5; } details.qa summary { cursor:pointer; color:var(--accent); font-size:.88rem; display:inline-block; } details.qa[open] summary { margin-bottom:6px; }
details.qa textarea, details.qa input { width:100%; margin-bottom:6px; display:block; }
details.fold summary { cursor:pointer; color:var(--accent); font-size:.88rem; margin-bottom:8px; }
.tl .gut { opacity:.55; } .tl .gut button { font-size:1rem; } .tb.newline { background:var(--soft); } .tb.newline textarea { width:100%; }

a.doclink { text-decoration:none; border-bottom:1px dotted var(--accent); } a.doclink.code { color:var(--accent); }
.tb.autoref { background:var(--accent-soft); border-color:var(--ok); border-inline-start-width:4px; } .tb.autoref.wait { background:none; border-style:dashed; opacity:.75; } .tb.autoref .tag strong { color:var(--ok); }
label.cellq { display:flex; gap:8px; align-items:center; margin-bottom:6px; } label.cellq span { min-width:110px; font-size:.88rem; } label.cellq input { flex:1; width:auto !important; margin:0 !important; }
table.plan td { vertical-align:top; } table.plan tr.done td { opacity:.6; } table.plan td:nth-child(2) { width:30%; } table.plan td:nth-child(3) { width:26%; }

.paper.tp .li span, .paper .li span { overflow-wrap:anywhere; min-width:0; }

.structure table.st td:nth-child(7) { white-space:normal; }
.booklet h2.bkc { font-size:1.15rem; margin:18px 0 6px; } .booklet table.bk { table-layout:auto; font-size:.84rem; } .booklet table.bk th:first-child { width:2.5em; } .booklet table.bk td { white-space:normal; }
.bdoc { margin-top:26px; padding-top:14px; border-top:2px solid var(--line); break-before:page; } .bdoc .paper { border:0; padding:0; max-width:none; }
.bhead { display:flex; justify-content:space-between; gap:12px; font-size:.75rem; color:var(--muted); margin-bottom:6px; }
.bpage { break-after:page; } .bpage img { width:100%; height:auto; display:block; border:1px solid var(--line); min-height:200px; background:var(--soft); }
@media print { .bdoc { border-top:0; margin-top:0; padding-top:0; } .bpage img { border:0; } .bdoc.orig { break-before:auto; } .bdoc.orig .bpage:first-child { break-before:page; } }
