/* Baseer Simulation Lab. Arabic first (right to left); logical properties make English work from the same rules. */
:root { --teal: #0B3C47; --teal2: #0F5C6E; --amber: #F2A93B; --red: #FF9C8F; --green: #8FD9A8; --soft: #9FC3CB; --va: #2e7d32; --bva: #f9a825; --nva: #c62828;
  --ink: #16282d; --muted: #4d6268; --line: #d5dfe2; --bg: #f4f7f8; --card: #fff; --focus: #B26A00; }
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; font-family: "Tajawal", "Tahoma", "Segoe UI", "Noto Sans Arabic", "DejaVu Sans", sans-serif; color: var(--ink); background: var(--bg); line-height: 1.6; }
h1 { font-size: 1.7rem; margin: 0 0 .3rem; line-height: 1.35; } h2 { font-size: 1.2rem; margin: 0 0 .4rem; } h3 { font-size: 1.15rem; margin: 0 0 .4rem; } h4 { font-size: 1.05rem; margin: 1.4rem 0 .3rem; color: var(--teal); }
a { color: var(--teal2); } p { margin: .3rem 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
button, select, input, textarea { font: inherit; color: inherit; }
button, a.btn { background: #fff; border: 1.5px solid var(--teal2); color: var(--teal); border-radius: .5rem; padding: .35rem .9rem; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block; }
button:hover:not(:disabled), a.btn:hover { background: #e3eff2; } button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--teal2); color: #fff; } button.primary:hover:not(:disabled) { background: var(--teal); }
button.link { border: 0; background: none; padding: .2rem .3rem; text-decoration: underline; color: var(--teal2); }
button.danger { border-color: var(--nva); color: var(--nva); }
input[type=text], input[type=number], input[type=time], select, textarea { border: 1.5px solid #9fb3b9; border-radius: .4rem; padding: .3rem .5rem; background: #fff; max-width: 100%; }
input.n, input.n10 { width: 5.2rem; } input.wide, textarea.wide { width: 100%; max-width: 34rem; }
.hint { color: var(--muted); font-size: .92rem; } .warn { color: #8a1c1c; font-weight: 700; } .warn.inline { background: #fff3cd; color: #5c4300; border-radius: .4rem; padding: .15rem .6rem; display: inline-block; }
.ok { color: #1b5e20; font-weight: 700; } .private { color: #1b5e20; font-weight: 700; }
.fld { display: flex; flex-direction: column; gap: .15rem; margin: .5rem 0; font-weight: 700; } .fld > span { font-size: .92rem; } .fld-t { font-weight: 800; margin-top: .8rem; }
.fld2, .fld3 { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: flex-end; } .fld3 .fld-t { flex-basis: 100%; margin: .4rem 0 0; } .fld3 input, .fld2 input { width: 7rem; }
.chk { display: flex; gap: .5rem; align-items: center; margin: .5rem 0; font-weight: 700; } .chk input, .switch input { width: 1.15rem; height: 1.15rem; accent-color: var(--teal2); } .chk.big { font-size: 1.1rem; }
.scroll-x { overflow-x: auto; }
.skip { position: absolute; inset-inline-start: -999rem; } .skip:focus { inset-inline-start: .5rem; top: .5rem; background: #fff; padding: .4rem .8rem; z-index: 50; }
.noscript { padding: 2rem; text-align: center; }

/* frame */
header.top { background: var(--teal); color: #fff; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; align-items: center; padding: .5rem 1rem; }
.brand { color: #fff; text-decoration: none; display: flex; flex-direction: column; line-height: 1.25; } .brand-ar { font-weight: 800; font-size: 1.25rem; } .brand small { color: var(--soft); font-size: .78rem; }
header nav { display: flex; flex-wrap: wrap; gap: .2rem; flex: 1; } header nav a { color: #fff; text-decoration: none; padding: .3rem .7rem; border-radius: .4rem; font-weight: 700; }
header nav a:hover { background: var(--teal2); } header nav a.on { background: var(--amber); color: var(--teal); }
.top-tools { display: flex; gap: .8rem; align-items: center; } .switch { display: flex; gap: .4rem; align-items: center; font-weight: 700; font-size: .92rem; cursor: pointer; }
.lang { background: none; color: #fff; border-color: var(--soft); padding: .2rem .7rem; } .lang:hover { background: var(--teal2) !important; }
main { max-width: 78rem; margin: 0 auto; padding: 1rem; min-height: 60vh; outline: none; } main:focus-visible { outline: none; }
footer.foot { background: var(--teal); color: #dbe9ec; display: flex; flex-wrap: wrap; gap: .3rem 1.5rem; justify-content: center; padding: .8rem 1rem; font-size: .9rem; margin-top: 2rem; } footer.foot a { color: #fff; }
dialog.dlg { border: 0; border-radius: .8rem; padding: 1rem 1.2rem; width: min(40rem, 94vw); max-height: 92vh; box-shadow: 0 10px 40px rgba(0,0,0,.35); color: var(--ink); }
dialog.dlg::backdrop { background: rgba(11,60,71,.55); } .dlg-title { margin: 0 0 .5rem; color: var(--teal); } .dlg-btns { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; margin-top: 1rem; } .dlg-btns .danger { margin-inline-end: auto; }
.toast { position: fixed; bottom: 1.2rem; inset-inline-start: 50%; transform: translateX(-50%); background: var(--teal); color: #fff; padding: .5rem 1.2rem; border-radius: 2rem; font-weight: 700; z-index: 3000; box-shadow: 0 4px 16px rgba(0,0,0,.3); }
[dir=rtl] .toast { transform: translateX(50%); }
.badge { display: inline-block; border-radius: 1rem; padding: 0 .6rem; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.ev-estimate { background: #e6eaec; color: #37474f; } .ev-rasd { background: #d3eef3; color: #0b4a58; } .ev-file { background: #d7efd9; color: #1b5e20; }
.problems { background: #fdecea; border: 1.5px solid var(--nva); border-radius: .5rem; padding: .5rem .9rem; color: #7a1414; margin-bottom: .8rem; } .problems ul { margin: .2rem 0; padding-inline-start: 1.2rem; }

/* home */
.hero { background: var(--teal); color: #fff; border-radius: .9rem; padding: 1.6rem 1.4rem; margin-bottom: 1.2rem; } .hero.small { padding: 1rem 1.4rem; } .hero .lead { font-size: 1.08rem; color: #e4f0f2; max-width: 52rem; }
.hero .private { color: var(--green); } .hero button { margin-top: .6rem; }
h2.sec { margin: 1.4rem 0 .6rem; color: var(--teal); }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; }
.g-card { background: var(--card); border: 1.5px solid var(--line); border-radius: .8rem; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .4rem; border-top: .45rem solid var(--teal2); }
.g-card.er { border-top-color: var(--nva); } .g-card.counter { border-top-color: var(--amber); } .g-card.build { border-top-color: var(--va); } .g-card p { flex: 1; color: var(--muted); } .g-card button, .g-card a.btn { align-self: flex-start; }
.g-tag { align-self: flex-start; background: #fff3cd; color: #5c4300; border-radius: 1rem; padding: 0 .7rem; font-size: .8rem; font-weight: 800; }
.recent { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; } .recent li { display: flex; gap: .4rem; align-items: center; } .recent li > button:last-child { padding: 0 .5rem; }
.soon { color: var(--muted); } .prose { background: #fff; border-radius: .8rem; padding: 1rem 1.3rem; border: 1.5px solid var(--line); } .prose li { margin: .35rem 0; }

/* lab */
.lab-head { display: flex; flex-wrap: wrap; gap: .5rem 1rem; justify-content: space-between; align-items: flex-start; margin-bottom: .6rem; } .lab-tools { display: flex; flex-wrap: wrap; gap: .4rem; }
.ev { font-size: .95rem; } .tabs { display: flex; gap: .3rem; border-bottom: 2px solid var(--teal2); margin-bottom: .8rem; }
.tabs button { border-radius: .5rem .5rem 0 0; border-bottom: 0; } .tabs button.on { background: var(--teal2); color: #fff; }
.what { background: #fff; border: 1.5px solid var(--line); border-radius: .7rem; padding: .6rem .9rem; margin-bottom: .7rem; } .what h2 { margin: 0; color: var(--teal); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; } .chip { display: flex; flex-wrap: wrap; gap: .1rem .5rem; align-items: center; border: 1.5px solid var(--teal2); border-radius: .6rem; padding: .3rem .8rem; font-weight: 700; cursor: pointer; background: #f2f8f9; max-width: 34rem; }
.chip input { width: 1.15rem; height: 1.15rem; accent-color: var(--teal2); } .chip small { flex-basis: 100%; color: var(--muted); font-weight: 400; }

/* the dark stage (the look of the workshop slides) */
.ps-wrap { background: var(--teal); color: #fff; border-radius: .7rem; padding: .7em .8em; font-size: 15px; outline: none; position: relative; }
.ps-wrap:focus-visible { box-shadow: 0 0 0 3px var(--amber); }
.ps-wrap.ps-present { position: fixed; inset: 0; z-index: 2000; overflow: auto; border-radius: 0; font-size: clamp(15px, 1.3vw, 30px); padding: 1em 1.4em; }
.ps-wrap button { background: var(--teal2); color: #fff; border: .08em solid var(--soft); border-radius: .4em; padding: .2em .7em; font-weight: 700; font-size: .85em; }
.ps-wrap button:hover:not(:disabled), .ps-wrap button.on { background: var(--amber); color: var(--teal); border-color: var(--amber); }
.ps-wrap button.big { font-size: 1.05em; background: var(--amber); color: var(--teal); border-color: var(--amber); padding: .3em 1em; }
.ps-wrap :focus-visible { outline-color: #fff; }
.ps-hud { display: flex; flex-wrap: wrap; gap: .5em 1em; align-items: center; justify-content: space-between; }
.ps-clock { font-weight: 800; font-size: 1.3em; display: flex; gap: .6em; align-items: baseline; } .ps-clock bdi { color: var(--amber); } .ps-clock small { font-size: .6em; color: var(--soft); font-weight: 700; }
.ps-demand { flex: 1 1 14em; min-width: 10em; max-width: 30em; } .ps-strip { display: flex; align-items: flex-end; gap: 2px; height: 2em; direction: ltr; } .ps-strip i { flex: 1; background: var(--soft); border-radius: 1px 1px 0 0; } .ps-strip i.now { background: var(--amber); }
.ps-stripnote { font-size: .66em; color: var(--soft); }
.ps-pill { background: var(--amber); color: var(--teal); border-radius: .4em; padding: .12em .7em; font-weight: 800; }
.ps-capl { min-height: 2.5em; margin-top: .5em; background: var(--amber); color: var(--teal); border-radius: .45em; padding: .35em .9em; font-weight: 800; line-height: 1.5; visibility: hidden; }
.ps-capl.show { visibility: visible; } .ps-capl.end { background: #fff; } .ps-capl.bad { background: var(--red); } .ps-capl.good { background: var(--green); }
.ps-ctl { display: flex; flex-wrap: wrap; gap: .4em; align-items: center; margin-top: .5em; } .ps-ctl label { font-size: .8em; color: var(--soft); display: flex; align-items: center; gap: .4em; } .ps-ctl input[type=range] { width: 8em; direction: ltr; accent-color: var(--amber); }
.ps-leg { font-size: .72em; color: var(--soft); display: flex; flex-wrap: wrap; gap: .15em 1.1em; margin-top: .5em; align-items: center; }
.ps-leg i { display: inline-block; width: .8em; height: .8em; vertical-align: -.08em; margin-inline-end: .3em; } .ps-leg i.dot { border-radius: 50%; background: #fff; } .ps-leg i.dot.hollow { background: none; border: 2px solid #fff; } .ps-leg i.dot.grey { background: #7c8f94; }
.ps-leg i.sq { border-radius: 2px; } .ps-leg i.busy { background: var(--green); } .ps-leg i.free { background: rgba(255,255,255,.35); } .ps-leg i.va { background: #2E7D4F; } .ps-leg i.bva { background: #E9B949; } .ps-leg i.nva { background: #B23A3A; } .ps-leg i.blk { background: var(--amber); }
.ps-fol { margin-top: .5em; background: var(--teal2); border-radius: .45em; padding: .4em .8em; font-size: .82em; line-height: 1.6; } .ps-fol h6 { color: var(--amber); font-size: 1em; font-weight: 800; margin: 0 0 .2em; display: flex; justify-content: space-between; }
.ps-fol ol { margin: 0; padding-inline-start: 1.3em; columns: 2 18em; } .ps-fol h6 button { background: none; border: 0; color: var(--soft); font-size: 1.2em; padding: 0 .3em; }
.ps-sum { margin-top: .7em; } .ps-sum:empty { display: none; } .ps-sum h5 { font-weight: 800; font-size: 1.25em; margin: 0 0 .3em; color: #fff; }
.ps-srow { display: flex; gap: .5em; align-items: stretch; margin-top: .3em; } .ps-srow > div { border-radius: .45em; padding: .25em .5em; font-weight: 800; }
.ps-srow .l { flex: 0 0 38%; font-size: .85em; display: flex; align-items: center; padding-inline-start: 0; } .ps-srow .a, .ps-srow .b { flex: 1; text-align: center; font-size: 1.15em; display: flex; flex-direction: column; justify-content: center; }
.ps-srow .a { background: #B23A3A; } .ps-srow .b { background: #2E7D4F; } .ps-srow .b.single { background: var(--teal2); } .ps-srow small { font-size: .62em; font-weight: 700; opacity: .95; } .ps-srow small.rng { font-weight: 400; min-height: 1.2em; }
.ps-srow.h > div { background: none; font-size: .8em; padding-bottom: 0; } .ps-srow.h .a { color: var(--red); } .ps-srow.h .b { color: var(--green); }
.ps-bars { margin-top: .6em; display: grid; grid-template-columns: auto 1fr; gap: .25em .6em; align-items: center; font-size: .8em; font-weight: 700; } .ps-barline { display: flex; align-items: center; gap: .4em; margin: .1em 0; } .ps-bars .bar { height: 1.1em; border-radius: .3em; min-width: .3em; } .bar.a { background: #B23A3A; } .bar.b { background: #2E7D4F; }
.ps-verdict { margin-top: .6em; background: var(--amber); color: var(--teal); border-radius: .45em; padding: .45em 1em; font-weight: 800; font-size: 1.15em; line-height: 1.5; } .ps-verdict.flat { background: #fff; }
.ps-note { margin-top: .4em; font-size: .8em; color: var(--soft); line-height: 1.5; } .ps-note .warn { color: var(--amber); }
.ps-cls { margin-top: .6em; font-size: .8em; border-collapse: collapse; } .ps-cls caption { text-align: start; font-weight: 800; padding-bottom: .2em; } .ps-cls th, .ps-cls td { padding: .1em .8em; text-align: start; border-bottom: 1px solid rgba(255,255,255,.2); }
.ps-sumbtns { display: flex; flex-wrap: wrap; gap: .5em; margin-top: .7em; } .ps-sumbtns a.btn { background: var(--teal2); color: #fff; border: .08em solid var(--soft); border-radius: .4em; padding: .2em .7em; font-size: .85em; }
.copybox { width: 100%; height: 9em; margin-top: .5em; }
.st { margin-top: .6em; } .st-head { display: flex; flex-wrap: wrap; gap: .4em; align-items: center; } .st-tag { font-weight: 800; border-radius: .4em; padding: .12em .7em; color: #fff; }
.st-cnt { background: var(--teal2); border-radius: .4em; padding: .12em .6em; font-size: .82em; font-weight: 700; white-space: nowrap; } .st-cnt b { color: var(--amber); font-size: 1.3em; margin-inline-start: .35em; }
.st-pools { display: flex; flex-wrap: wrap; gap: .3em .9em; margin-top: .45em; font-size: .78em; } .st-pool { display: flex; gap: .4em; align-items: center; background: var(--teal2); border-radius: .4em; padding: .1em .5em; } .st-pool b { color: var(--amber); }
.st-units { display: flex; flex-wrap: wrap; gap: .12em; direction: ltr; max-width: 16em; } .st-units i { width: .62em; height: .62em; border-radius: .12em; background: rgba(255,255,255,.3); } .st-units.beds i { width: 1.05em; height: .68em; }
.st-units i.on { background: var(--green); } .st-units i.blk { background: var(--amber); } .st-units i.off { background: none; outline: 1px dashed rgba(255,255,255,.25); outline-offset: -1px; }
.st-flow { position: relative; margin-top: .2em; } .st-row { display: flex; align-items: flex-start; justify-content: flex-start; } .st-row.st-wrap { flex-wrap: wrap; row-gap: .5em; } .st-row + .st-row { margin-top: .5em; }
.st-cell { padding: 0 .5em; text-align: center; display: flex; flex-direction: column; flex: 0 0 auto; }
.st-dept { font-size: .68em; font-weight: 700; height: 1.6em; line-height: 1.4em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: .22em solid transparent; margin: 0 -.74em .1em; }
.st-q { height: 2em; position: relative; flex: 0 0 auto; } .st-q.st-q-big { height: 3em; } .st-qn { position: absolute; bottom: .1em; inset-inline-end: 0; font-size: .72em; font-weight: 800; color: var(--red); }
.st-box { position: relative; border-radius: .45em; padding: .25em .2em; min-height: 4.3em; background: var(--teal2); border: .14em solid var(--amber); color: #fff; display: flex; flex-direction: column; justify-content: center; flex: 0 0 auto; }
.st-box.c-VA { background: #2E7D4F; border-color: #2E7D4F; } .st-box.c-BVA { background: #E9B949; border-color: #E9B949; color: #1C2541; } .st-box.c-NVA { background: #B23A3A; border-color: #B23A3A; }
.st-box.st-over { outline: .16em dashed var(--red); outline-offset: .12em; } .st-box.st-glow { box-shadow: 0 0 0 .32em var(--amber); }
.st-nm { font-weight: 800; font-size: .76em; line-height: 1.25; overflow-wrap: break-word; }
.st-slots { direction: ltr; margin-top: .25em; line-height: 0; } .st-slots i { display: inline-block; width: .85em; height: .85em; margin: .08em; border-radius: .2em; background: rgba(255,255,255,.35); border: .06em solid rgba(0,0,0,.25); } .st-slots i.on { background: var(--green); }
.st-slots.st-free i { background: none; border: .06em dashed rgba(255,255,255,.6); border-radius: 50%; } .st-slots.st-free i.on { background: rgba(255,255,255,.25); } .st-more { font-size: .6em; line-height: 1.4; }
.st-chg { font-size: .62em; font-weight: 800; background: rgba(255,255,255,.88); color: var(--teal); border-radius: .3em; margin: .2em .1em 0; padding: 0 .2em; } .st-chg.plain { background: none; color: inherit; }
.st-meta { flex: 0 0 auto; font-size: .66em; color: var(--soft); min-height: 2.8em; overflow: hidden; white-space: nowrap; line-height: 1.3; margin-top: .2em; } .st-meta b { color: #fff; }
.st-delays .st-wt { height: 3.4em; }
.st-wt { height: .5em; line-height: 1.5; flex: 0 0 auto; font-size: .68em; font-weight: 800; color: var(--amber); white-space: nowrap; }
.st-box.st-ghost { border: .1em dashed var(--soft); background: transparent; color: var(--soft); opacity: .85; } .st-ghost .st-nm { text-decoration: line-through; }
.st-tile { flex: 0 0 auto; border-radius: .45em; padding: .3em .2em; min-height: 4.3em; font-weight: 800; font-size: .8em; display: flex; flex-direction: column; justify-content: center; }
.st-tile.st-in { background: var(--amber); color: var(--teal); } .st-tile.st-out { background: var(--teal2); color: #fff; } .st-tile.st-leftout { background: #5b3030; color: var(--red); }
.st-exits { gap: .3em; } .st-exits .st-tile { min-height: 2.6em; } .st-big { font-size: 1.5em; line-height: 1.1; } .st-out .st-big { color: var(--amber); } .st-leftout .st-big { color: var(--red); } .st-sub { font-weight: 600; font-size: .85em; }
.st-cv { position: absolute; left: 0; top: 0; cursor: pointer; }

/* edit the model: cards */
.ed-switch { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .4rem; } .ed-switch button.on { background: var(--teal2); color: #fff; }
.cards { display: flex; flex-wrap: wrap; gap: .7rem; align-items: stretch; }
.card { background: #fff; border: 1.5px solid var(--line); border-top: .4rem solid var(--teal2); border-radius: .6rem; padding: .4rem .6rem .5rem; width: 12.5rem; display: flex; flex-direction: column; gap: .15rem; cursor: pointer; position: relative; text-align: start; font-weight: 400; color: var(--ink); }
.card:hover { box-shadow: 0 2px 10px rgba(11,60,71,.18); } .card.c-VA { border-top-color: var(--va); } .card.c-BVA { border-top-color: var(--bva); } .card.c-NVA { border-top-color: var(--nva); }
.card.par { margin-inline-start: -.5rem; border-inline-start: .3rem double var(--teal2); } .card.dragging { opacity: .5; }
.card.drop-a::before, .card.drop-b::after { content: ""; position: absolute; top: -.2rem; bottom: -.2rem; width: .3rem; background: var(--amber); border-radius: .2rem; } .card.drop-a::before { inset-inline-start: -.5rem; } .card.drop-b::after { inset-inline-end: -.5rem; }
.card-top { display: flex; align-items: center; gap: .4rem; } .grip { cursor: grab; touch-action: none; font-size: 1.25rem; color: var(--muted); padding: 0 .2rem; user-select: none; } .card .no { font-weight: 800; color: var(--teal2); flex: 1; }
.mv { display: flex; gap: .15rem; direction: ltr; } [dir=rtl] .mv { flex-direction: row-reverse; } .mv button { padding: 0 .45rem; line-height: 1.3; border-width: 1px; }
.card-nm { font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; } .card-who, .card-time, .card-wait, .card-par { font-size: .88rem; color: var(--muted); } .card-wait { color: #8a5a00; font-weight: 700; }
.forks { display: flex; flex-direction: column; gap: .15rem; margin-top: .2rem; border-top: 1px dashed var(--line); padding-top: .2rem; } .fork { font-size: .82rem; font-weight: 700; color: #6a3d00; } .fork.all { color: var(--muted); }
.card.add { border: 2px dashed var(--teal2); border-top-width: 2px; align-items: center; justify-content: center; color: var(--teal2); font-weight: 800; min-height: 7rem; background: #f2f8f9; } .card.add b { font-size: 2rem; line-height: 1; }
.ed-forks { display: flex; flex-direction: column; gap: .35rem; margin: .3rem 0; } .ed-fork { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; } .ed-fork button { padding: 0 .55rem; }
.expert-box { border: 1.5px dashed var(--teal2); border-radius: .5rem; padding: .4rem .8rem; margin-top: .8rem; background: #f2f8f9; }
.ed-people { display: flex; flex-direction: column; gap: .35rem; align-items: flex-start; } .ed-person { display: flex; flex-wrap: wrap; gap: .4rem; align-items: flex-end; } .ed-person .nm { width: 15rem; } .ed-person > button { padding: 0 .55rem; }
.ed-person .shifts { color: var(--muted); align-self: center; } label.shift { display: flex; flex-direction: column; font-size: .78rem; color: var(--muted); }
.clock { display: flex; flex-wrap: wrap; gap: .25rem; direction: ltr; } .hr { display: flex; flex-direction: column; align-items: center; width: 3.6rem; padding: .15rem 0; border-width: 1.5px; line-height: 1.25; } .hr span { font-size: .72rem; font-weight: 700; } .hr small { font-size: .68rem; font-weight: 400; direction: ltr; }
.hr.lv0 { background: #eef3f4; color: #4d6268; border-color: #b9c8cc; } .hr.lv1 { background: #cfe6ea; color: #0b3c47; } .hr.lv2 { background: #f6d58c; color: #4a3200; border-color: #b98300; } .hr.lv3 { background: #e9967f; color: #4a0e00; border-color: #a1321a; }
.ed-cls { border-collapse: collapse; } .ed-cls th, .ed-cls td { padding: .2rem .5rem; text-align: start; font-size: .92rem; } .ed-cls td:first-child { display: flex; gap: .4rem; align-items: center; } .ed-cls input[type=text] { width: 11rem; } .ed-cls input.n { width: 4.6rem; } .ed-cls .dot { width: .9rem; height: .9rem; border-radius: 50%; border: 1px solid #55696f; flex: 0 0 auto; } .ed-cls button { padding: 0 .55rem; }
.ed-run .fld input, .ed-demand .fld input { width: 8rem; }

/* the guided builder */
.builder { background: #fff; border: 1.5px solid var(--line); border-radius: .8rem; padding: 1rem 1.3rem; max-width: 60rem; }
.b-prog { display: flex; gap: .35rem; margin-bottom: .8rem; } .b-prog i { flex: 1; height: .45rem; border-radius: .3rem; background: #d5dfe2; } .b-prog i.done { background: var(--teal2); } .b-prog i.on { background: var(--amber); }
.b-page h3 { color: var(--teal); margin-top: .8rem; } .b-nav { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.2rem; }
.b-people, .b-person { display: flex; gap: .4rem; } .b-people { flex-direction: column; } .b-person input[type=text] { width: 17rem; } .b-person button { padding: 0 .55rem; } .b-head { display: flex; gap: .4rem; font-size: .9rem; font-weight: 700; } .b-head span:first-child { width: 17rem; }
.b-steps { border-collapse: collapse; } .b-steps th, .b-steps td { padding: .2rem .35rem; text-align: start; font-size: .9rem; } .b-steps tr > th:first-child { min-width: 9rem; } .b-steps input.n { width: 4.6rem; }

/* your real numbers */
.dw { background: #fff; border: 1.5px solid var(--line); border-radius: .8rem; padding: .9rem 1.2rem; } .dw-pick { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin: .6rem 0; }
.filebtn { background: var(--teal2); color: #fff; border-radius: .5rem; padding: .4rem 1rem; font-weight: 700; cursor: pointer; display: inline-flex; gap: .6rem; align-items: center; } .filebtn { flex-wrap: wrap; max-width: 100%; } .filebtn input { max-width: 100%; min-width: 0; width: 15rem; font-size: .85rem; } .dw select { max-width: 100%; } .dw-match select { max-width: 14rem; } .filebtn:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.dw-prev, .dw-match { border-collapse: collapse; font-size: .88rem; } .dw-prev th, .dw-prev td, .dw-match th, .dw-match td { border: 1px solid var(--line); padding: .15rem .5rem; text-align: start; white-space: nowrap; } .dw-prev th, .dw-match th { background: #e3eff2; }
.dw-map { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0 1rem; }
.dw-fit { border: 1.5px solid var(--line); border-inline-start: .4rem solid var(--teal2); border-radius: .5rem; padding: .5rem .8rem; margin: .6rem 0; } .dw-fit.rule-keep { border-inline-start-color: #90a4ae; } .dw-fit.rule-blend { border-inline-start-color: #0b7285; } .dw-fit.rule-fit { border-inline-start-color: var(--va); }
.dw-fit-h { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; } .three { display: flex; flex-wrap: wrap; gap: .2rem 1.5rem; } .three .new { font-weight: 800; color: #1b5e20; }
.dw-hist { width: 100%; max-width: 26rem; height: 9.5rem; display: block; margin-top: .4rem; background: #f4f7f8; border-radius: .4rem; }
.dw-apply { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-top: 1rem; }

/* analyse and suggest */
.analysis { background: #fff; border: 1.5px solid var(--line); border-radius: .8rem; padding: .8rem 1.1rem; }
.an-sec { margin-top: 1.1rem; } .an-sec h3 { color: var(--teal); border-bottom: 2px solid var(--line); padding-bottom: .15rem; }
.an-say { margin: .3rem 0; padding-inline-start: 1.2rem; } .an-say li { margin: .3rem 0; font-size: 1.05rem; } .an-say li.bad { color: #8a1c1c; font-weight: 700; } .an-say li.good { color: #1b5e20; font-weight: 700; }
.an-split { display: flex; align-items: center; gap: .6rem; margin: .35rem 0; } .an-lab { flex: 0 0 9rem; font-weight: 700; font-size: .9rem; }
.an-bar { flex: 1; display: flex; height: 1.9rem; border-radius: .4rem; overflow: hidden; background: #e6eaec; } .an-bar.thin { height: 1rem; flex: 0 0 40%; }
.seg { display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: .85rem; white-space: nowrap; overflow: hidden; }
.seg.work, .an-leg i.work { background: #2E7D4F; } .seg.queue, .an-leg i.queue { background: #B23A3A; } .seg.delay, .an-leg i.delay { background: #B26A00; }
.seg.hot { background: #B23A3A; } .seg.warm { background: #B26A00; } .seg.cool { background: #0F5C6E; }
.an-leg { display: flex; flex-wrap: wrap; gap: .2rem 1.2rem; font-size: .88rem; color: var(--muted); margin-top: .3rem; } .an-leg i { display: inline-block; width: .9rem; height: .9rem; border-radius: .2rem; vertical-align: -.1rem; margin-inline-end: .35rem; }
.an-leg i.line1 { background: #B23A3A; height: .25rem; vertical-align: .2rem; } .an-leg i.line2 { background: #2E7D4F; height: .25rem; vertical-align: .2rem; } .an-leg i.bars { background: #c9dde2; }
.an-rows { display: flex; flex-direction: column; gap: .4rem; } .an-row { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; } .an-nm { flex: 0 0 15rem; font-weight: 700; } .an-txt { flex: 1 1 14rem; font-size: .9rem; color: var(--muted); }
.an-chart { width: 100%; height: 13.5rem; display: block; background: #f4f7f8; border-radius: .4rem; }
.an-recs { display: flex; flex-direction: column; gap: .6rem; }
.rec { border: 1.5px solid var(--line); border-inline-start: .45rem solid var(--teal2); border-radius: .6rem; padding: .5rem .8rem; display: flex; flex-direction: column; gap: .3rem; align-items: flex-start; } .rec.first { border-inline-start-color: var(--amber); background: #fffaf0; }
.rec-h { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: 1.05rem; } .rec-no { background: var(--teal2); color: #fff; border-radius: 50%; width: 1.6rem; height: 1.6rem; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: 0 0 auto; }
.rec-nums { display: flex; flex-wrap: wrap; gap: .2rem 1.6rem; } .kv b.new { color: #1b5e20; }

/* the optional AI helper */
.ai-box { background: #f6f3ff; border: 1.5px solid #b9a8e8; border-radius: .7rem; padding: .6rem .9rem; margin-bottom: 1rem; } .ai-box h3 { color: #4a3594; border: 0; }
.ai-row { display: flex; flex-wrap: wrap; gap: .5rem .8rem; align-items: center; margin-top: .4rem; } .ai-row input.wide { flex: 1 1 16rem; max-width: none; }
.ai-note { background: #f6f3ff; border-inline-start: .4rem solid #7a62c9; border-radius: .5rem; padding: .4rem .8rem; margin-bottom: .8rem; } .ai-note ul { margin: .2rem 0; padding-inline-start: 1.2rem; }
.ai-out { margin-top: .6rem; } .ai-answer { background: #fff; border: 1.5px solid #d9d0f3; border-radius: .6rem; padding: .4rem .9rem; margin-top: .5rem; line-height: 1.8; } .ai-q { font-weight: 800; color: #4a3594; }
.ai-preview { background: #f4f7f8; border: 1px solid var(--line); border-radius: .4rem; padding: .5rem .7rem; max-height: 14rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: .88rem; margin: .3rem 0; }

@media (max-width: 640px) {
  main { padding: .6rem; } h1 { font-size: 1.35rem; } header.top { padding: .4rem .6rem; } header nav a { padding: .2rem .45rem; font-size: .92rem; }
  .ps-wrap { font-size: 13px; padding: .5em; } .ps-srow .l { flex-basis: 44%; } .card { width: calc(50% - .35rem); } .ed-person .nm, .b-person input[type=text], .b-head span:first-child { width: 11rem; } .hr { width: 2.9rem; } .ed-cls input[type=text] { width: 7rem; } .ed-cls input.n { width: 3.6rem; } .ed-cls th, .ed-cls td { padding: .2rem .2rem; font-size: .82rem; } .fld3 input, .fld2 input { width: 5.5rem; } .an-nm { flex-basis: 100%; } .an-bar.thin { flex-basis: 100%; } .an-lab { flex-basis: 5rem; } .analysis { padding: .6rem .7rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media print { header.top, footer.foot, .ps-ctl, .tabs, .lab-tools { display: none; } }

/* ---- the drawing («المخطط»): editor and run ---- */
.g-card.draw { border-top-color: var(--teal2); } .g-card.road { border-top-color: #3FB950; } .g-card.permit { border-top-color: #C4A7E7; }
.fe { margin-top: .4em; }
.fe-steps { list-style: none; display: flex; flex-wrap: wrap; gap: .4em; padding: 0; margin: .2em 0 1em; counter-reset: none; }
.fe-st { flex: 1 1 12em; } .fe-st button { width: 100%; display: flex; gap: .55em; align-items: center; text-align: start; padding: .55em .8em; border-radius: .6em; border: 2px solid var(--line); background: var(--card); }
.fe-st small { margin-inline-start: auto; color: var(--muted); font-weight: 400; } .fe-st.done button { border-color: #9fd3b0; } .fe-st.todo button { border-color: var(--amber); background: #fff8eb; } .fe-st.wait button { opacity: .65; }
.fe-n { display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--teal2); color: #fff; font-weight: 800; font-size: .9em; flex: 0 0 auto; }
.fe-st.done .fe-n { background: var(--va); } .fe-st.todo .fe-n { background: var(--amber); color: var(--ink); }
.fe-sec { border-top: 1px solid var(--line); padding-top: .6em; margin-top: .8em; } .fe-sec > h3 { display: flex; gap: .5em; align-items: center; margin: 0 0 .2em; font-size: 1.1em; } .fe-sec > .hint { margin: 0 0 .5em; }
.fe-grpw { display: flex; flex-direction: column; gap: .2em; padding: .3em .5em; border: 1px dashed var(--line); border-radius: .6em; } .fe-grpl { color: var(--muted); font-weight: 700; } .fe-grp { display: flex; flex-wrap: wrap; gap: .35em; }
.fe-bar { gap: .5em; align-items: stretch; } .fe-run { font-size: 1.1em; padding: .6em 1.4em; } .fe-run:disabled { opacity: .5; }
.fe-set { display: flex; flex-wrap: wrap; gap: .6em 1.2em; align-items: end; margin: .4em 0 .6em; }
.fe-set .fld.inl { margin: 0; } .fe-set input.n4 { width: 5em; } .fe-set select { min-width: 7em; }
.fe-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5em; align-items: center; margin-bottom: .5em; }
.fe-bar, .fe-tools { display: flex; flex-wrap: wrap; gap: .4em; }
.fe-kind { display: inline-flex; align-items: center; gap: .45em; cursor: grab; touch-action: none; user-select: none; }
.fe-kind:disabled { cursor: default; }
.fe-kind i, .fe-k i, .fe-ghost i { display: inline-block; width: 1.25em; height: 1em; flex: 0 0 auto; }
.k-start i { background: var(--teal2); border-radius: 1em; } .k-end i { background: #25343a; border-radius: 1em; }
.k-step i { background: #fff; border: 2px solid var(--teal2); border-radius: 3px; }
.k-decision i { background: var(--amber); width: .95em; height: .95em; transform: rotate(45deg); margin: 0 .15em; }
.k-light i { width: .7em; height: 1.2em; border-radius: 4px; background: linear-gradient(#E5534B 0 45%, #25343a 45% 55%, #3FB950 55% 100%); border: 2px solid #25343a; }
.k-stop i { background: #dcebf7; border: 2px solid #4a7fb0; border-radius: 3px; background-image: radial-gradient(#4a7fb0 30%, transparent 32%); background-size: .45em .45em; }
.k-roundabout i { width: 1.1em; height: 1.1em; border-radius: 50%; background: radial-gradient(circle, #7fb08f 0 30%, #cfe6d8 32% 100%); border: 1px solid #7fb08f; }
.fe-ghost { position: fixed; z-index: 50; pointer-events: none; transform: translate(-50%, -50%); background: #fff; border: 2px dashed var(--teal2); border-radius: .5em; padding: .3em .7em; display: flex; gap: .4em; align-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.fe-main { display: grid; grid-template-columns: minmax(0, 1fr) 20em; gap: .8em; align-items: start; }
.fe-area { position: relative; height: clamp(360px, 62vh, 720px); border: 1px solid var(--line); border-radius: .6em; overflow: hidden; background: #eef3f4; background-image: radial-gradient(#d3dfe2 1px, transparent 1px); background-size: 22px 22px; }
.fe-side { background: var(--card); border: 1px solid var(--line); border-radius: .6em; padding: .8em; max-height: clamp(360px, 62vh, 720px); overflow: auto; }
.fe-side h4 { margin: 0 0 .5em; display: flex; gap: .45em; align-items: center; } .fe-side .danger { margin-top: .8em; }
.fe-side .fld { display: block; margin: .45em 0; } .fe-side .fld > span { display: block; font-size: .9em; color: var(--muted); } .fe-side input[type=text], .fe-side select { width: 100%; }
.fe-side .fld3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4em; } .fe-side .fld2 { display: grid; grid-template-columns: 1fr 1fr; gap: .4em; }
.fe-side .fld3 input, .fe-side .fld2 input { width: 100%; }
.fe-time { border-top: 1px solid var(--line); margin-top: .5em; padding-top: .4em; }
.fe-join { display: flex; gap: .4em; align-items: end; border-top: 1px solid var(--line); margin-top: .6em; padding-top: .4em; } .fe-join .fld { flex: 1; }
.fe-type { border: 1px solid var(--line); border-radius: .5em; padding: .5em .7em; margin: .5em 0; display: grid; grid-template-columns: auto minmax(9em, 1.6fr) minmax(8em, 1fr); gap: .3em .8em; align-items: end; }
.fe-type .fe-dot { width: 1.1em; height: 1.1em; border-radius: 50%; align-self: center; } .fe-type .fld { margin: 0; } .fe-type input[type=text] { width: 100%; }
.fe-sw { display: flex; gap: .25em; flex-wrap: wrap; } .fe-sw button { width: 1.5em; height: 1.5em; min-width: 0; padding: 0; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); } .fe-sw button.on { box-shadow: 0 0 0 3px var(--ink); }
@media (max-width: 700px) { .fe-type { grid-template-columns: 1fr; } }
.fe-days { display: flex; flex-wrap: wrap; gap: .2em .9em; margin: .3em 0 .6em; } .fe-sched .fe-srow { border-top: 1px solid var(--line); padding-top: .4em; margin-top: .4em; } .fe-wd { display: flex; flex-wrap: wrap; gap: .1em .5em; font-size: .85em; } .fe-wd label { display: inline-flex; gap: .15em; align-items: center; }
.ps-date { margin-inline-start: .6em; opacity: .85; font-size: .8em; }
.fe-prob { margin-top: .6em; } .fe-prob .ok { color: var(--va); font-weight: 700; }
.fl-svg { display: block; width: 100%; height: 100%; touch-action: none; user-select: none; font-family: inherit; }
.fl-road { stroke-width: 15; stroke-linecap: round; fill: none; opacity: .9; }
.fl-line { stroke-width: 2; fill: none; } .fl-line.travel { stroke-dasharray: 7 5; }
.fl-hit { stroke: transparent; stroke-width: 22; fill: none; cursor: pointer; }
.fl-tag { fill: #fff; stroke: #9FC3CB; } .fl-tagt { font-size: 12px; fill: var(--ink); font-weight: 700; }
.fl-node { cursor: pointer; } .fl-node:focus, .fl-link:focus { outline: none; } .fl-node:focus .fl-shape, .fl-node.on .fl-shape { stroke: #1565c0; stroke-width: 4; stroke-dasharray: 7 4; }
.fl-link:focus .fl-road, .fl-link.on .fl-road { stroke: #90b8e8; }
.fl-shape { stroke-width: 2; } .k-decision .fl-shape, .k-roundabout .fl-shape { stroke: rgba(0,0,0,.18); }
.fl-name.big { font-size: 30px; font-weight: 800; }
.k-split i, .k-join i { background: #4a7fb0; width: .95em; height: .95em; transform: rotate(45deg); margin: 0 .15em; } .k-batch i { background: #efe7f8; border: 2px solid #7a5aa6; border-radius: 3px; background-image: repeating-linear-gradient(#7a5aa6 0 2px, transparent 2px 5px); }
.k-unbatch i { background: #e8f3ea; border: 2px solid #2E7D4F; clip-path: polygon(0 0, 100% 20%, 100% 80%, 0 100%); } .k-match i { background: #2E7D4F; width: .95em; height: .95em; transform: rotate(45deg); margin: 0 .15em; } .k-transport i { background: #fff4e0; border: 2px solid #B26A00; border-radius: 3px; }
.fl-name { font-size: 14px; font-weight: 700; fill: var(--ink); } .fl-name.light { fill: #fff; } .fl-sub { font-size: 12px; fill: var(--muted); } .fl-sub.light { fill: #cfe3e8; }
.fl-slot { fill: #e3ecee; stroke: #9FC3CB; } .fl-slot.on { fill: #2E7D4F; stroke: #2E7D4F; } .fl-slot.stuck { fill: #E5534B; stroke: #E5534B; } .fst-kv.bad b { color: #FF9C8F; }
.ps-leg i.dot.stuck { background: #0B3C47; border: 2px solid #E5534B; }
.fl-lamp { transition: opacity .25s; } .fl-lamp.dim { opacity: .18; }
.fl-node.broken .fl-shape { stroke: #E5534B; stroke-width: 4; stroke-dasharray: 4 3; }
.fl-badge rect { fill: var(--teal2); } .fl-badge text { fill: #fff; font-size: 12px; font-weight: 800; } .fl-badge.hot rect { fill: #B23A3A; }
.fe-handle { fill: var(--amber); stroke: #fff; stroke-width: 3; cursor: crosshair; }
.fe-tmp { stroke: var(--amber); stroke-width: 3; stroke-dasharray: 6 4; }
.fst-head { display: flex; flex-wrap: wrap; gap: .4em 1.4em; margin: .2em 0 .5em; color: #cfe3e8; } .fst-kv b { color: #fff; font-size: 1.15em; margin-inline-start: .35em; }
.fst-area { position: relative; height: clamp(340px, 60vh, 760px); border-radius: .6em; overflow: hidden; background: #eef3f4; }
.fst-area .fl-node { cursor: default; } .fst-cv { position: absolute; inset: 0; }
.ps-present .fst-area { height: calc(100vh - 16em); }
.ps-leg i.dot.solid { background: #0B3C47; border: 2px solid #fff; } .ps-leg i.dot.move { background: #1f6f80; border: 2px solid var(--soft); }
@media (max-width: 700px) {
  .fe-main { grid-template-columns: 1fr; } .fe-side { max-height: none; } .fe-area { height: 56vh; } .fst-area { height: 52vh; }
}
