:root {
  --ink: #0e2233; --cyan: #19c3d9; --amber: #ffb000; --blue: #2b62b8;
  --text: var(--ink); --muted: #4a5a67; --panel: rgba(240, 243, 245, 0.8); --edge: rgba(14, 34, 51, 0.12); --paper: #f6f8f9;
  --sans: "Archivo", system-ui, sans-serif; --ar: "Alexandria", "Archivo", sans-serif;
}
* { box-sizing: border-box; }
/* no side scroll bar: the rail at the top shows where you are, and you can drag it */
html { background: #e9eef2; overflow-x: clip; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
body { margin: 0; font-family: var(--sans); font-size: 18px; line-height: 1.55; color: var(--text); background: transparent; font-variation-settings: "wdth" 100; }
[dir="rtl"] body { font-family: var(--ar); line-height: 1.75; }
.skip { position: fixed; inset-inline-start: 12px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 8px 12px; }
.skip:focus { top: 12px; }
a { color: inherit; }

#world { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
#labels { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }

.top { position: fixed; top: 0; inset-inline: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 40px clamp(16px, 4vw, 48px) 0; pointer-events: none; }
.top > * { pointer-events: auto; }
.name { font-weight: 800; font-size: 20px; letter-spacing: -.01em; color: var(--text); text-decoration: none; font-variation-settings: "wdth" 120; }
[dir="rtl"] .name { font-family: var(--ar); font-variation-settings: normal; }
.controls { display: flex; gap: 8px; }
.ctl { font: 500 14px/1 var(--sans); color: var(--text); background: var(--panel); backdrop-filter: blur(10px); border: 1px solid var(--edge); border-radius: 999px; padding: 10px 16px; cursor: pointer; }
.ctl[lang="ar"] { font-family: var(--ar); }
.ctl[aria-pressed="true"] { border-color: var(--cyan); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* the rail: a crane girder across the top, the trolley shows where you are; drag it, or pick a chapter mark */
.rail { position: fixed; top: 0; inset-inline: 0; height: 16px; z-index: 30; cursor: grab; touch-action: none; }
.rail.drag { cursor: grabbing; }
.rail-track { position: absolute; top: 0; inset-inline: 0; height: 5px; background: color-mix(in srgb, var(--text) 12%, transparent); transition: height .15s ease; }
.rail:hover .rail-track, .rail.drag .rail-track { height: 7px; }
.rail-ticks { position: absolute; inset: 0; }
.tick { position: absolute; top: 0; width: 14px; height: 14px; margin-inline-start: -7px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.tick::before { content: ""; position: absolute; top: 0; inset-inline-start: 6px; width: 2px; height: 9px; background: color-mix(in srgb, var(--text) 35%, transparent); }
.tick span { position: absolute; top: 14px; inset-inline-start: 50%; transform: translateX(-50%); white-space: nowrap; font: 600 11.5px/1 var(--sans); color: var(--ink); background: rgba(250, 251, 252, .95); padding: 4px 7px; border-radius: 3px; opacity: 0; pointer-events: none; transition: opacity .15s ease; box-shadow: 0 6px 18px rgba(14, 34, 51, .15); }
[dir="rtl"] .tick span { transform: translateX(50%); font-family: var(--ar); }
.rail:hover .tick span, .tick:focus-visible span { opacity: 1; }

.loader { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: #e9eef2; color: var(--ink); transition: opacity .8s ease; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* the loader: the terminal drawn in plan, then brought to life (see the script after it in index.html). Every moving part is a small layer
   animated only by transform and opacity, so it plays on the compositor, smooth even while the page is busy building the 3D terminal. */
.lt { position: relative; width: min(720px, 88vw); aspect-ratio: 600 / 360; }
.lt .ld-stage { position: absolute; left: 0; top: 0; width: 600px; height: 360px; transform-origin: 0 0; }
.lt .ld-stage div { position: absolute; }
.lt svg { display: block; overflow: visible; }
.lt .ll { will-change: transform, opacity; backface-visibility: hidden; }
.lt .ld-sea { background: #d5e5ed; }
.lt .wv { overflow: hidden; }
.lt .wave { animation: ldwv 3.2s linear infinite; } .lt .wave path { fill: none; stroke: #b4d0dd; stroke-width: 1.2; stroke-dasharray: 7 9; }
@keyframes ldwv { to { transform: translateX(-30px); } }
.lt .ln { transform-origin: 0 50%; animation: ldx .8s cubic-bezier(.3, .7, .2, 1) both; animation-delay: var(--d, 0s); }
.lt .ln.v { transform-origin: 50% 0; animation-name: ldy; } .lt .ln.r { transform-origin: 100% 50%; }
@keyframes ldx { from { transform: scaleX(0); } to { transform: none; } }
@keyframes ldy { from { transform: scaleY(0); } to { transform: none; } }
.lt .qy { background: var(--ink); } .lt .lane { background: #b6c2cb; } .lt .road { background: #c0cad1; } .lt .fence { background: #8f9da8; }
.lt .blk { box-sizing: border-box; border: 1px solid #a6b4be; border-radius: 1px; animation: ldbox .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d); }
@keyframes ldbox { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.lt .hull { fill: #22374a; } .lt .bridge { fill: #f4f6f8; }
.lt .ship { animation: 1.1s cubic-bezier(.2, .8, .2, 1) both; } .lt .sa { animation-name: ldshipl; animation-delay: .45s; } .lt .sb { animation-name: ldshipr; animation-delay: .6s; }
@keyframes ldshipl { from { transform: translateX(-380px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ldshipr { from { transform: translateX(380px); opacity: 0; } to { transform: none; opacity: 1; } }
.lt .qc { transform-origin: 50% 97%; animation: ldrise .55s cubic-bezier(.2, .9, .3, 1.2) both; }
.lt .qc path { fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linecap: round; }
@keyframes ldrise { from { transform: scaleY(0); } to { transform: none; } }
.lt .tr { background: var(--ink); border-radius: 1px; animation: ldfade .3s ease var(--d) both, ldtrol 2.4s ease-in-out var(--t) infinite alternate both; }
@keyframes ldtrol { to { transform: translateY(50px); } }
.lt .yw rect { fill: #fafcfd; stroke: rgba(14, 34, 51, .12); stroke-width: .5; } .lt .yc rect { stroke: rgba(14, 34, 51, .1); stroke-width: .5; }
.lt .yw { animation: lddrop .35s cubic-bezier(.2, .9, .3, 1.2) var(--d) both; }
@keyframes lddrop { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: none; } }
.lt .yc { animation: ldfade .7s ease var(--d) both; }
@keyframes ldfade { from { opacity: 0; } to { opacity: 1; } }
.lt .rtg { box-sizing: border-box; border: 2.2px solid #e2622a; border-radius: 1px; }
.lt .gate { background: #2aa6a0; border-radius: 2px; animation: ldpop .35s cubic-bezier(.2, .9, .3, 1.3) var(--d) both; }
@keyframes ldpop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
.lt .sweep { background: #19c3d9; border-radius: 2px; opacity: 0; animation: ldsweep 1s ease-in-out 1.9s both; }
@keyframes ldsweep { 0% { transform: translateY(96px); opacity: 0; } 15%, 80% { opacity: .6; } 100% { transform: translateY(318px); opacity: 0; } }
.lt .tk { left: -4.5px; top: -2.2px; width: 9px; height: 4.4px; border-radius: 1px; background: #1f9a52; }
.lt .tk.rd { left: -5px; top: -2.4px; width: 10px; height: 4.8px; background: #a3243b; }
@media (prefers-reduced-motion: reduce) { .lt, .lt * { animation: none !important; } .lt .tk.rd { opacity: 0; } }
.loader.gone { opacity: 0; pointer-events: none; }

main { position: relative; z-index: 2; }
.chapter { position: relative; padding: 0 clamp(16px, 5vw, 72px); }
#arrival { height: 160vh; } #before { height: 220vh; } #reveal { height: 1050vh; } #model { height: 170vh; }
.panel { position: sticky; top: 20vh; max-width: 34rem; padding: 28px 30px; background: var(--panel); backdrop-filter: blur(14px); border: 1px solid var(--edge); border-radius: 4px; }
.panel.hero { background: transparent; backdrop-filter: none; border: 0; padding: 0; top: 24vh; max-width: 44rem; }
.panel.wide { max-width: 64rem; }
h1, h2 { font-weight: 800; line-height: .95; letter-spacing: -.025em; margin: 0 0 18px; font-variation-settings: "wdth" 125; }
h1 { font-size: clamp(42px, 5vw, 84px); max-width: 11ch; }
h2 { font-size: clamp(36px, 4vw, 60px); }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { font-family: var(--ar); font-variation-settings: normal; letter-spacing: 0; line-height: 1.25; font-weight: 700; }
p { margin: 0 0 14px; max-width: 38rem; }
.lede { font-size: clamp(18px, 1.45vw, 22px); color: var(--muted); max-width: 36rem; }
.small { font-size: 16px; color: var(--muted); }
.hint { margin-top: 30px; font-size: 15px; color: var(--muted); }
.panel.intro { top: 16vh; }

/* the before chapter: the things a terminal used to learn its own state from, as objects with their own look */
.fragments { --p: min(calc(5vw + 37rem), 62vw); position: sticky; top: 0; height: 100vh; margin-top: -100vh; pointer-events: none; overflow: hidden; }
.card { position: absolute; opacity: 0; visibility: hidden; font-size: 15px; line-height: 1.4; color: #1d2b36; will-change: transform, opacity; }
.card p { margin: 0; max-width: none; }
.c-radio { width: 300px; background: #1b252d; color: #e6edf1; border-radius: 14px; padding: 14px 16px 16px; box-shadow: 0 22px 50px rgba(8, 18, 28, .38); }
.c-radio header { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: #93a8b7; }
.c-radio .led { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 8px #3ddc84; }
.c-radio .wave { display: flex; gap: 3px; align-items: center; height: 26px; margin: 10px 0 8px; }
.c-radio .wave i { flex: 1; height: 100%; background: #3ddc84; opacity: .7; border-radius: 2px; animation: wave 1.1s ease-in-out infinite; }
@keyframes wave { 0%, 100% { transform: scaleY(.22); } 50% { transform: scaleY(1); } }
.c-radio p { margin-top: 6px; font-size: 14.5px; }
.c-radio p b { color: #3ddc84; font-weight: 600; margin-inline-end: 8px; }
/* an email as it looks in a mail client: window, toolbar, sender, subject, body, attachment */
.c-mail { width: 360px; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 22px 50px rgba(14, 34, 51, .22); font-size: 14px; }
.c-mail .win { display: flex; align-items: center; gap: 6px; background: #e8edf1; padding: 7px 10px; font-size: 12px; color: #5b6b78; }
.c-mail .win i { width: 9px; height: 9px; border-radius: 50%; background: #c9d2d9; }
.c-mail .win i:nth-child(1) { background: #f26b5b; } .c-mail .win i:nth-child(2) { background: #f5bf4f; } .c-mail .win i:nth-child(3) { background: #5fc454; }
.c-mail .win span { margin-inline-start: 8px; }
.c-mail .tools { display: flex; gap: 14px; padding: 7px 14px; border-bottom: 1px solid #edf0f3; font-size: 12.5px; color: #2b62b8; }
.c-mail .head { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 14px 4px; }
.c-mail .head b { display: block; font-size: 14px; } .c-mail .head span { display: block; font-size: 12px; color: #6a7a86; }
.c-mail .head time { font-size: 12px; color: #6a7a86; align-self: start; }
.av { width: 34px; height: 34px; border-radius: 50%; background: #2b62b8; color: #fff; display: grid; place-items: center; font: 700 13px var(--sans); }
.av.sm { width: 26px; height: 26px; font-size: 11px; background: #6b4fa3; }
[dir="rtl"] .av { font-family: var(--ar); }
.c-mail .subj { padding: 6px 14px 2px; font-weight: 650; font-size: 14.5px; }
.c-mail .body { padding: 4px 14px 10px; color: #3a4a56; }
.c-mail .att { display: flex; align-items: center; gap: 9px; margin: 0 14px 14px; padding: 7px 10px; border: 1px solid #d5dde3; border-radius: 5px; width: fit-content; }
.c-mail .att .xl { width: 22px; height: 26px; background: #1f7a4d; color: #fff; font: 700 12px/26px var(--sans); text-align: center; border-radius: 2px; font-style: normal; }
.c-mail .att span { font-size: 12.5px; } .c-mail .att small { display: block; color: #7a8995; font-size: 11px; }
.c-sheet { width: 340px; background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 20px 46px rgba(14, 34, 51, .2); }
.c-sheet .bar { background: #1f7a4d; color: #fff; font-size: 12.5px; padding: 7px 12px; }
.c-sheet table { border-collapse: collapse; width: 100%; font-size: 13px; }
.c-sheet th, .c-sheet td { border: 1px solid #e1e6ea; padding: 5px 8px; text-align: start; height: 26px; }
.c-sheet th { background: #f3f6f8; font-weight: 600; color: #51616d; }
.c-sheet .err { color: #c62828; font-weight: 700; }
.c-sheet .meta { font-size: 12px; color: #6f7f8b; padding: 7px 12px; }
.c-note { width: 210px; min-height: 160px; background: #ffe47a; padding: 26px 18px 18px; font: 600 27px/1.12 "Caveat", cursive; color: #3a3220; box-shadow: 0 18px 30px rgba(60, 50, 10, .24); }
.c-note::before { content: ""; position: absolute; top: -10px; left: 50%; width: 74px; height: 22px; background: rgba(255, 255, 255, .6); transform: translateX(-50%) rotate(-3deg); }
.c-call { width: 270px; display: flex; gap: 12px; align-items: center; background: rgba(27, 37, 45, .94); color: #fff; border-radius: 20px; padding: 12px 16px; box-shadow: 0 18px 40px rgba(8, 18, 28, .3); }
.c-call .ic { flex: none; width: 38px; height: 38px; border-radius: 50%; background: #e5484d; display: grid; place-items: center; }
.c-call b { display: block; font-size: 15px; }
.c-call span { font-size: 13px; color: #b6c4ce; }
/* a text message from the shipping line's agent */
.c-sms { width: 300px; background: #f4f5f7; border-radius: 16px; padding: 12px 14px; box-shadow: 0 18px 40px rgba(14, 34, 51, .18); }
.c-sms .who { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 8px; }
.c-sms .bub { background: #e4e6ea; border-radius: 16px 16px 16px 5px; padding: 9px 12px; font-size: 14.5px; }
[dir="rtl"] .c-sms .bub { border-radius: 16px 16px 5px 16px; }
.c-sms .meta { font-size: 11.5px; color: #7a8590; margin-top: 5px; }
.c-report { width: 280px; background: #fbfaf5; padding: 16px 18px 18px; box-shadow: 0 18px 36px rgba(40, 36, 20, .18); font-size: 14px; overflow: hidden; }
.c-report h4 { margin: 0 0 10px; font-size: 15px; font-weight: 700; }
.c-report .row { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid #e4e1d5; padding: 7px 0; }
.c-report s { color: #7b796f; }
.c-report .fix { font: 700 26px/1 "Caveat", cursive; color: #c0392b; display: inline-block; transform: rotate(-6deg); margin-inline-start: 10px; font-style: normal; }
.c-report .ring { position: absolute; width: 92px; height: 92px; border-radius: 50%; border: 7px solid rgba(140, 95, 50, .16); inset-inline-end: -26px; bottom: -30px; }
[dir="rtl"] .c-note, [dir="rtl"] .c-report .fix { font-family: "Aref Ruqaa", serif; font-size: 23px; line-height: 1.5; }

/* captions beside the part being connected: a short line, a live panel in the platform's own terms, the features behind it */
.caps { position: fixed; inset-inline-start: clamp(16px, 5vw, 72px); top: 15vh; z-index: 3; pointer-events: none; }
.caps .cap { position: absolute; top: 0; inset-inline-start: 0; }
.cap { width: 410px; padding: 18px 20px; background: rgba(252, 253, 253, .96); color: var(--ink); border-radius: 4px; border-inline-start: 3px solid var(--cyan); box-shadow: 0 18px 50px rgba(14, 34, 51, .18); opacity: 0; visibility: hidden; transform: translateY(8px); }
.cap-qc { border-color: #3f7fe0; } .cap-vessel { border-color: #e09a00; } .cap-truck { border-color: #16a34a; } .cap-rtg { border-color: #ec6a2c; } .cap-slot { border-color: #8b5cf6; } .cap-gate { border-color: #12aec2; } .cap-final { border-color: var(--amber); }
.cap h3 { margin: 0 0 6px; font-size: 22px; line-height: 1.1; font-weight: 800; letter-spacing: -.01em; font-variation-settings: "wdth" 118; }
.cap .lead { margin: 0 0 10px; font-size: 14.5px; line-height: 1.45; color: #3c4c59; }
.cap .feats { margin: 10px 0 0; padding: 0; list-style: none; font-size: 13.5px; line-height: 1.4; color: #2f3f4b; }
.cap .feats li { position: relative; padding: 6px 0 6px 16px; border-top: 1px solid var(--edge); }
[dir="rtl"] .cap .feats li { padding: 6px 16px 6px 0; }
.cap .feats li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 13px; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .35; }
.cap .kpi { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--ink); background: rgba(25, 195, 217, .14); padding: 4px 8px; border-radius: 2px; }

.cap-final h3 { font-size: 26px; }
/* the live panel: a small piece of the platform's own screen */
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
.chip { font: 600 11.5px/1.2 var(--sans); color: var(--ink); background: rgba(255, 255, 255, .92); border-inline-start: 3px solid var(--cyan); padding: 4px 7px; border-radius: 2px; white-space: nowrap; opacity: 0; font-variation-settings: "wdth" 90; }
.chip em { font-style: normal; font-weight: 500; color: #4a5a67; margin-inline-start: 6px; }
.chip.qc { border-color: #3f7fe0; } .chip.rtg { border-color: #ec6a2c; } .chip.ship { border-color: var(--amber); } .chip.block { border-color: #8b5cf6; } .chip.gate { border-color: #12aec2; }

/* the model: a twin, a simulation, an optimisation */
.panel.model { top: 14vh; }
.layers { list-style: none; padding: 0; margin: 20px 0 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.layers li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; background: rgba(255, 255, 255, .7); border: 1px solid var(--edge); border-radius: 4px; padding: 14px 14px 12px; }
.layers li:nth-child(1) { border-top: 3px solid var(--cyan); } .layers li:nth-child(2) { border-top: 3px solid var(--blue); } .layers li:nth-child(3) { border-top: 3px solid var(--amber); }
.layers .ln { font: 800 26px/1 var(--sans); color: color-mix(in srgb, var(--ink) 30%, transparent); font-variation-settings: "wdth" 120; }
.layers h3 { margin: 0 0 6px; font-size: 17px; line-height: 1.2; }
.layers p { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--muted); }

/* sheets: the solid pages after the scene (the scene stops drawing behind them) */
.sheet { position: relative; background: var(--paper); padding: clamp(56px, 8vw, 110px) clamp(16px, 5vw, 72px); border-top: 1px solid var(--edge); }
.sheet-in { max-width: 72rem; margin: 0 auto; }
.btn { display: inline-flex; align-items: center; gap: 8px; font: 600 15px/1 var(--sans); color: var(--ink); background: #fff; border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); border-radius: 999px; padding: 12px 18px; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.ghost { background: transparent; }
.btn.small { padding: 8px 14px; font-size: 13.5px; }
.btn:disabled { opacity: .5; cursor: progress; }
[dir="rtl"] .btn { font-family: var(--ar); }
.end { background: var(--ink); color: #eef3f6; }
.end .lede { color: #b8c7d2; }

/* the contact block at the foot of the page: what to say and the direct lines on one side, a short note on the other */
.end .contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.ct-lines { margin: 34px 0 0; padding: 0; max-width: 34rem; }
.ct-line { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); align-items: center; gap: 6px 16px; padding: 15px 0; border-top: 1px solid rgba(238, 243, 246, .14); }
.ct-line:last-child { border-bottom: 1px solid rgba(238, 243, 246, .14); }
.ct-line dt { font: 500 14px/1.3 var(--sans); color: #93a7b6; }
.ct-line dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.ct-addr, .ct-link { font: 500 18px/1.3 var(--sans); color: #eef3f6; overflow-wrap: anywhere; }
.ct-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: underline; text-decoration-color: rgba(238, 243, 246, .35); text-underline-offset: 4px; }
.ct-link:hover { text-decoration-color: var(--cyan); }
.ct-link .ext { width: 12px; height: 12px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; opacity: .7; }
[dir="rtl"] .ct-link .ext { transform: scaleX(-1); }
.ct-acts { display: flex; gap: 8px; }
.end .btn.ct-btn { background: transparent; color: #eef3f6; border-color: rgba(238, 243, 246, .3); min-width: 4.6em; justify-content: center; }
.end .btn.ct-btn:hover { border-color: rgba(238, 243, 246, .65); }
.ct-form { background: rgba(255, 255, 255, .035); border: 1px solid rgba(238, 243, 246, .12); border-radius: 6px; padding: clamp(22px, 2.4vw, 32px); }
.ct-form h3 { font: 700 21px/1.2 var(--sans); font-variation-settings: "wdth" 112; margin: 0 0 18px; }
.ct-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.ct-f { display: block; margin: 0 0 14px; }
.ct-f > span { display: block; font: 500 14px/1.3 var(--sans); color: #b8c7d2; margin: 0 0 7px; }
.ct-f input, .ct-f textarea { display: block; width: 100%; box-sizing: border-box; margin: 0; font: 400 16px/1.45 var(--sans); color: #eef3f6; background: rgba(255, 255, 255, .06); border: 1px solid rgba(238, 243, 246, .22); border-radius: 4px; padding: 11px 13px; }
.ct-f textarea { resize: vertical; min-height: 7.6em; }
.ct-f input::placeholder, .ct-f textarea::placeholder { color: #8195a4; }
.ct-f input:focus-visible, .ct-f textarea:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; border-color: transparent; }
.ct-f.bad input, .ct-f.bad textarea { border-color: #ff8f80; }
.ct-err { display: block; font: normal 500 13.5px/1.3 var(--sans); color: #ffb3a7; margin: 6px 0 0; }
.ct-err[hidden] { display: none; }
.ct-hp { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.ct-send { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 4px; }
.end .btn.ct-go { background: #eef3f6; color: var(--ink); border-color: #eef3f6; padding: 13px 22px; }
.end .btn.ct-go:hover { background: #fff; }
.ct-note { margin: 0; font-size: 13.5px; line-height: 1.4; color: #93a7b6; }
.ct-status { margin: 14px 0 0; font-size: 15px; line-height: 1.45; color: #b8c7d2; }
.ct-status:empty { display: none; }
.ct-status.ok { color: #8fe0c4; } .ct-status.bad { color: #ffb3a7; }
.end .btn:focus-visible, .ct-link:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
[dir="rtl"] .ct-line dt, [dir="rtl"] .ct-f > span, [dir="rtl"] .ct-form h3, [dir="rtl"] .ct-note, [dir="rtl"] .ct-status, [dir="rtl"] .ct-err,
[dir="rtl"] .ct-f textarea, [dir="rtl"] .ct-f input[name="name"] { font-family: var(--ar); font-variation-settings: normal; }
@media (max-width: 900px) { .end .contact { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .ct-row { grid-template-columns: minmax(0, 1fr); } .ct-line { grid-template-columns: minmax(0, 1fr); } }

/* the planning demo */
.demo { max-width: 78rem; margin: 0 auto; }
.demo-head .eyebrow { font-size: 15px; font-weight: 600; color: var(--blue); margin-bottom: 8px; }
.demo-head .lead { font-size: clamp(17px, 1.35vw, 20px); color: var(--muted); max-width: 46rem; }
.demo-grid { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 24px; margin-top: 26px; align-items: start; }
.demo-plan, .demo-res { background: #fff; border: 1px solid var(--edge); border-radius: 6px; padding: 20px; }
.demo-plan { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto; scrollbar-width: thin; }
.demo h3 { margin: 0 0 14px; font-size: 19px; font-variation-settings: "wdth" 115; }
.ctl-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; padding: 12px 0; border-top: 1px solid var(--edge); }
.ctl-row.col { grid-template-columns: 1fr; }
.ctl-row .lbl span { font-weight: 600; font-size: 15px; } .ctl-row .lbl small { display: block; color: var(--muted); font-size: 13px; }
.ctl-row input[type=range] { grid-column: 1 / -1; width: 100%; accent-color: var(--ink); }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--edge); background: #f3f6f8; font-size: 17px; cursor: pointer; }
.stepper output { min-width: 26px; text-align: center; font: 800 20px var(--sans); font-variation-settings: "wdth" 110; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; background: #f0f3f5; border-radius: 8px; padding: 4px; }
.seg button { flex: 1 1 auto; border: 0; background: transparent; border-radius: 6px; padding: 8px 10px; font: 500 13.5px var(--sans); cursor: pointer; color: var(--ink); }
.seg button[aria-checked="true"] { background: #fff; font-weight: 700; box-shadow: 0 1px 4px rgba(14, 34, 51, .14); }
[dir="rtl"] .seg button, [dir="rtl"] .demo input, [dir="rtl"] .demo select { font-family: var(--ar); }
.shint { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.used { font-size: 14px; color: var(--muted); margin: 10px 0; }
.used.over { color: #b42318; font-weight: 600; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.adv-toggle { border: 0; background: none; padding: 6px 0; font: 600 14px var(--sans); color: var(--blue); cursor: pointer; }
[dir="rtl"] .adv-toggle { font-family: var(--ar); }
.adv fieldset { border: 0; border-top: 1px solid var(--edge); margin: 0; padding: 12px 0; }
.adv legend { font-weight: 700; font-size: 14px; padding: 0 0 6px; }
.adv .opt { display: grid; grid-template-columns: auto 1fr; gap: 8px; padding: 5px 0; font-size: 13.5px; cursor: pointer; }
.adv .opt small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.adv .num { display: grid; grid-template-columns: 1fr 92px; gap: 8px; align-items: center; padding: 4px 0; font-size: 13.5px; }
.adv .num input, .adv .num select { width: 100%; padding: 5px 6px; border: 1px solid var(--edge); border-radius: 4px; font: 500 13.5px var(--sans); }
.adv .chk { display: flex; gap: 8px; font-size: 13.5px; padding: 4px 0; }
.adv .crn { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
.demo-res .empty { color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.kpi { background: #f6f8fa; border-radius: 5px; padding: 10px 12px; border-inline-start: 3px solid #cfd8de; }
.kpi span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.kpi b { display: block; font: 800 22px/1.2 var(--sans); margin-top: 4px; font-variation-settings: "wdth" 110; }
.kpi b small { font-size: 12px; font-weight: 600; color: var(--muted); }
.kpi > small { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.kpi.big { grid-column: span 2; border-color: var(--ink); } .kpi.big b { font-size: 28px; }
.kpi.ok { border-color: #16a34a; } .kpi.bad { border-color: #dc2626; } .kpi.warn { border-color: #f59e0b; }
.ci, .demo-note { font-size: 13px; color: var(--muted); margin-top: 12px; }
.demo-note { max-width: 60rem; margin-top: 18px; }
.infeasible { color: #b42318; font-weight: 600; }
.prog .pbar { height: 6px; background: #eef2f5; border-radius: 3px; overflow: hidden; }
.prog .pbar b { display: block; height: 100%; background: var(--blue); transition: width .2s ease; }
.prog p { font-size: 14px; color: var(--muted); margin: 8px 0 12px; }
.best { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: center; background: #f1f6fd; border: 1px solid #cfe0f7; border-radius: 6px; padding: 12px 14px; margin-bottom: 12px; }
.best-h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.best h4 { margin: 0; font-size: 16px; } .best small { color: var(--muted); font-size: 12.5px; }
.best .planline { grid-column: 1; margin: 0; font-size: 14.5px; }
.best .btn { grid-column: 2; grid-row: 1 / span 2; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.chart { margin: 0; background: #f8fafb; border-radius: 5px; padding: 10px; }
.chart figcaption { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.chart svg { width: 100%; height: auto; display: block; direction: ltr; }
.chart .ax { stroke: #c3ccd3; stroke-width: 1; } .chart .ln { fill: none; stroke: var(--blue); stroke-width: 2.2; }
.chart .tx { font: 500 11px var(--sans); fill: #5b6b78; }
.chart .pt { fill: rgba(43, 98, 184, .45); } .chart .no { fill: none; stroke: rgba(180, 35, 24, .5); } .chart .bst { fill: #ffb000; stroke: #0e2233; stroke-width: 1.5; } .chart .mine { fill: #0e2233; }
.doe, .rs { margin-top: 16px; }
.doe h4, .rs h4 { margin: 0 0 6px; font-size: 16px; }
.doe p, .rs p { font-size: 13.5px; color: var(--muted); max-width: none; }
.doe table, .rs table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.doe th, .rs th { text-align: start; color: var(--muted); font-weight: 600; padding: 5px 6px; border-bottom: 1px solid var(--edge); }
.doe td, .rs td { padding: 6px; border-bottom: 1px solid #eef1f3; }
.doe .bar { display: inline-block; vertical-align: middle; width: 80px; height: 6px; background: #eef2f5; border-radius: 3px; margin-inline-end: 6px; overflow: hidden; }
.doe .bar b { display: block; height: 100%; background: var(--amber); }
.rs tr.win td { font-weight: 700; background: #fff8e6; }

@media (max-width: 1100px) {
  .layers { grid-template-columns: 1fr; }
  .demo-grid { grid-template-columns: 1fr; }
  .demo-plan { position: static; max-height: none; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .panel { top: 12vh; padding: 20px; }
  .panel.hero { top: 16vh; background: var(--panel); backdrop-filter: blur(8px); border: 1px solid var(--edge); padding: 18px 18px 6px; border-radius: 4px; }
  .fragments { --p: 4vw; }
  .card { transform-origin: top left; zoom: .72; top: auto !important; bottom: 6vh; }
  .card:nth-child(n+5) { display: none; }
  .ctl { padding: 9px 12px; font-size: 13px; }
  .caps { top: 11vh; inset-inline-end: 16px; }
  .cap { width: auto; max-width: 92vw; padding: 14px; }
  .cap .feats { display: none; }
  .kpi.big { grid-column: span 1; }
}
@media (max-width: 480px) {
  .top { padding-top: 34px; }
  .name { font-size: 16px; }
  .controls { gap: 5px; }
  .ctl { padding: 8px 9px; font-size: 12px; }
  h1 { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.cap .kpi[hidden] { display: none; }

/* ---- revision 4: captions say what each screen changes; richer live panels styled on the platform's own screens ---- */
.cap { width: 440px; }
.cap .adds { margin: 11px 0 0; font-size: 13.8px; line-height: 1.52; color: #2a3a46; }
@keyframes blink { 50% { opacity: .25; } }
@media (max-width: 760px) { .cap { width: auto; } .cap .adds { font-size: 13px; } }

/* ---- revision 5: header controls (flag dropdown, sound icon) and the hoist on the rail ---- */
svg.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.ctl { display: inline-flex; align-items: center; gap: 8px; height: 38px; transition: border-color .15s ease, background-color .15s ease; }
.ctl:hover { border-color: color-mix(in srgb, var(--ink) 30%, transparent); }
.ctl:focus-visible, .lang-menu:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.langsel { position: relative; }
.lang-btn { padding: 0 12px 0 10px; }
.flag { width: 21px; height: 14px; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(14, 34, 51, .14); overflow: hidden; }
.lang-btn #lang-cur { font-family: var(--sans); letter-spacing: .04em; }
.chev { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.lang-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.lang-menu { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; min-width: 100%; margin: 0; padding: 5px; list-style: none; background: rgba(250, 251, 252, .97); backdrop-filter: blur(10px); border: 1px solid var(--edge); border-radius: 10px; box-shadow: 0 16px 40px rgba(14, 34, 51, .18); }
.lang-menu[hidden] { display: none; }
.lang-menu li { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 9px; border-radius: 6px; font: 500 14px/1.2 var(--sans); color: var(--ink); cursor: pointer; white-space: nowrap; }
.lang-menu li span { font-family: var(--sans); letter-spacing: .04em; }
.lang-menu li:hover, .lang-menu li.active { background: color-mix(in srgb, var(--blue) 10%, transparent); }
.lang-menu li[aria-selected="true"]::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); margin-inline-start: auto; }
.ctl.ic { width: 38px; padding: 0; justify-content: center; }
.ctl.ic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ctl.ic .spk { fill: currentColor; stroke: none; }
.ctl.ic[aria-pressed="false"] .waves, .ctl.ic[aria-pressed="true"] .mute { display: none; }
.ctl.ic[aria-pressed="false"] { color: color-mix(in srgb, var(--ink) 70%, transparent); }
.ctl.ic[aria-pressed="true"] .waves path { animation: wv 1.8s ease-in-out infinite; }
.ctl.ic[aria-pressed="true"] .waves path + path { animation-delay: .25s; }
@keyframes wv { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.rail-trolley { position: absolute; top: 0; left: 0; width: 48px; height: 48px; pointer-events: none; will-change: transform; }
.rail-trolley svg { display: block; overflow: visible; }
.rail-trolley svg * { pointer-events: visiblePainted; cursor: grab; }   /* the hoist itself, box included, can be grabbed and dragged */
.rail.drag .rail-trolley svg * { cursor: grabbing; }
.rail-trolley svg rect.hit { fill: transparent; pointer-events: all; }   /* the whole hoist can be grabbed, gaps between the trolley and the box included */
html.dragging, html.dragging * { user-select: none !important; -webkit-user-select: none !important; cursor: grabbing !important; }
.rail-trolley .body { fill: var(--amber); }
.rail-trolley .cab { fill: #0e2233; opacity: .78; }
.rail-trolley .wh { fill: #0e2233; }
.rail-trolley .sp { stroke: #f4c24d; stroke-width: .8; }
.rail-trolley .rope { stroke: #3b4b57; stroke-width: .9; }
.rail-trolley .spr { fill: #d18f00; }
.rail-trolley .box { fill: #2f5d8a; transition: fill .25s ease; }
.rail-trolley .ribs { stroke: rgba(0, 0, 0, .2); stroke-width: .7; }
.rail-trolley .ends { stroke: rgba(255, 255, 255, .35); stroke-width: .8; }
.rail-trolley .beacon { fill: #ff8a00; opacity: .35; }
.rail-trolley.moving .beacon { animation: beacon .55s steps(2, jump-none) infinite; filter: drop-shadow(0 0 2px #ff8a00); }
@keyframes beacon { 0% { opacity: 1; } 100% { opacity: .25; } }
/* chips sit on a wrapper the 3D renderer places; when they crowd, a chip is lifted onto a thin leader line */
.chip-at { pointer-events: none; }
.chip { position: relative; transition: transform .25s ease; }
.chip.lifted::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: var(--lift, 0); background: color-mix(in srgb, var(--ink) 45%, transparent); }

/* ---- revision 5: live panels in the platform's own light style, numbers in a monospace face ---- */
.panel-live { margin-top: 2px; background: #f3f6f9; border: 1px solid #e1e7ed; border-radius: 6px; padding: 9px; color: #1e293b; font-size: 12px; line-height: 1.35; font-variation-settings: "wdth" 92; }
.panel-live:empty { display: none; }
.panel-live .m { font-family: "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.panel-live .mut { color: #64748b; }
.panel-live .sp { flex: 1; }
.panel-live h5 { margin: 0 0 4px; font-size: 10.5px; font-weight: 700; color: #64748b; }
.panel-live small { font-size: inherit; }
.panel-live .ic { width: 11px; height: 11px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.panel-live .line { display: inline-block; font: 700 9.5px/1 "JetBrains Mono", monospace; color: #fff; background: #0e2233; padding: 3px 5px; border-radius: 3px; }
.panel-live .pbar { display: inline-block; vertical-align: middle; width: 52px; height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; flex: none; }
.panel-live .pbar b { display: block; height: 100%; border-radius: 3px; background: #3b82f6; }
.panel-live .pbar.blue b { background: #2563eb; } .panel-live .pbar.r b { background: #e5484d; } .panel-live .pbar.a b { background: #f0a020; } .panel-live .pbar.g b { background: #2fae66; } .panel-live .pbar.b b { background: #3b82f6; }
.panel-live .mph.g { color: #15803d; } .panel-live .mph.b { color: #1d4ed8; } .panel-live .mph.a { color: #b45309; } .panel-live .mph.z { color: #94a3b8; }
.panel-live .st { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-inline-end: 6px; flex: none; }
.panel-live .st.ok { background: #22c55e; } .panel-live .st.wait { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .22); }
.panel-live .bk { font-size: 10px; font-weight: 700; background: #ede9fe; color: #6d28d9; padding: 1px 5px; border-radius: 3px; white-space: nowrap; }
.panel-live .jb { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 3px; background: #e2e8f0; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.panel-live .jb.uq { background: #dbeafe; color: #1d4ed8; } .panel-live .jb.ty { background: #ccfbf1; color: #0f766e; } .panel-live .jb.ar { background: #ffedd5; color: #c2410c; }
.panel-live .jb.tq { background: #f1f5f9; color: #475569; } .panel-live .jb.hk { background: #f3e8ff; color: #7e22ce; }
.panel-live .jb.jst { background: #ffedd5; color: #c2410c; } .panel-live .jb.jld { background: #dbeafe; color: #1d4ed8; } .panel-live .jb.jfr { background: #f1f5f9; color: #64748b; }
.panel-live .tm { font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 3px; background: #f1f5f9; color: #334155; }
.panel-live .tm.a { background: #fef3c7; color: #92400e; } .panel-live .tm.o { background: #ffedd5; color: #c2410c; } .panel-live .tm.r { background: #fee2e2; color: #b91c1c; }
/* quay cranes: the vessel screen's crane table, one group per ship */
.panel-live .pgrp + .pgrp { margin-top: 9px; }
.panel-live .pgh { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; white-space: nowrap; }
.panel-live .pgh b { font-size: 13px; }
.panel-live .kv { display: inline-flex; align-items: baseline; gap: 5px; background: #fff; border: 1px solid #e1e7ed; border-radius: 4px; padding: 2px 7px; }
.panel-live .kv small { color: #1d4ed8; font-size: 9.5px; font-weight: 700; } .panel-live .kv b { font-size: 13px; color: #1d4ed8; }
.panel-live .qct { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; background: #fff; border: 1px solid #e1e7ed; border-radius: 4px; overflow: hidden; }
.panel-live .qct th { text-align: start; font-size: 10px; font-weight: 700; color: #64748b; padding: 5px 7px; background: #f8fafc; }
.panel-live .qct th:nth-child(1) { width: 22%; } .panel-live .qct th:nth-child(2) { width: 27%; } .panel-live .qct th:nth-child(3) { width: 13%; } .panel-live .qct th:nth-child(4) { width: 11%; } .panel-live .qct th:nth-child(5) { width: 14%; } .panel-live .qct th:nth-child(6) { width: 13%; }
.panel-live .qct th { white-space: nowrap; }
.panel-live .qct td { padding: 5px 7px; border-top: 1px solid #eef2f6; white-space: nowrap; overflow: hidden; }
.panel-live .qct .qn { display: flex; align-items: center; }
.panel-live .qct .mph { font-weight: 700; }
.panel-live .prog { display: flex; align-items: center; gap: 6px; }
.panel-live .prog .pbar { width: 46px; }
.panel-live .tag { font-size: 9.5px; font-weight: 600; color: #92400e; background: #fef3c7; padding: 1px 5px; border-radius: 3px; margin-inline-start: 6px; }
/* vessels: one card per call */
.panel-live .vgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.panel-live .vc { background: #fff; border: 1px solid #e1e7ed; border-radius: 5px; padding: 8px 9px 7px; min-width: 0; }
.panel-live .vh { display: flex; align-items: center; gap: 6px; white-space: nowrap; } .panel-live .vh b { font-size: 13px; } .panel-live .vh .mut { margin-inline-start: auto; font-size: 10.5px; }
.panel-live .vt { display: flex; flex-direction: column; gap: 4px; margin: 7px 0 7px; font-size: 11px; }
.panel-live .vt b { color: #0f172a; margin-inline-start: 4px; }
.panel-live .etc { display: flex; align-items: center; gap: 0; flex-wrap: wrap; row-gap: 3px; }
.panel-live .etc b { font-size: 14px; margin-inline-end: 7px; }
.panel-live .conf { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; padding: 2px 7px 2px 6px; border-radius: 10px; white-space: nowrap; }
.panel-live .conf i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.panel-live .conf.high { background: #dcfce7; color: #15803d; } .panel-live .conf.medium { background: #fef3c7; color: #b45309; } .panel-live .conf.low { background: #fee2e2; color: #b91c1c; }
.panel-live .vm { display: grid; grid-template-columns: 72px 1fr; gap: 8px; align-items: center; }
.panel-live .gm { background: #eff6ff; border: 1px solid #dbeafe; border-radius: 4px; padding: 4px 4px 5px; text-align: center; }
.panel-live .gm small { display: block; font-size: 9.5px; font-weight: 700; color: #1d4ed8; } .panel-live .gm b { display: block; font-size: 23px; line-height: 1.1; color: #1d4ed8; } .panel-live .gm span { font-size: 9px; color: #64748b; }
.panel-live .ld { display: grid; gap: 3px; }
.panel-live .ld > div { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-size: 10.5px; color: #64748b; }
.panel-live .ld b { font-size: 12px; color: #0f172a; } .panel-live .ld b small { color: #94a3b8; font-size: 10px; font-weight: 500; }
.panel-live .vp { display: flex; align-items: center; gap: 6px; margin: 7px 0 2px; } .panel-live .vp .pbar { flex: 1; width: auto; } .panel-live .vp span { font-size: 10.5px; color: #475569; }
.panel-live .gch { width: 100%; height: auto; display: block; direction: ltr; margin-top: 2px; }
.panel-live .gch .ln { fill: none; stroke: #2563eb; stroke-width: 1.8; } .panel-live .gch .gl { stroke: #eef2f6; }
.panel-live .gch text { font: 8.5px "JetBrains Mono", monospace; fill: #94a3b8; } .panel-live .gch text.nv { fill: #1d4ed8; font-weight: 700; font-size: 9.5px; }
.panel-live .gch .now { fill: #2563eb; stroke: #fff; stroke-width: 1.5; }
.panel-live .vf { display: flex; gap: 12px; font-size: 10.5px; color: #64748b; margin-top: 3px; } .panel-live .vf b { color: #0f172a; font-size: 12px; }
/* yard trucks: the equipment screen's crane stripes with their pools */
.panel-live .qs { margin-top: 5px; }
.panel-live .qsh { display: flex; align-items: center; gap: 8px; padding: 3px 8px; background: #0e2233; color: #e2e8f0; border-radius: 4px 4px 0 0; font-size: 10.5px; white-space: nowrap; }
.panel-live .qsh b { color: #fff; } .panel-live .qsh .mut { color: #94a3b8; } .panel-live .qsh .m { color: #86efac; } .panel-live .qsh .st { margin-inline-end: 0; }
.panel-live .qs.hk .qsh { background: #5b21b6; }
.panel-live .yts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 4px; background: #e6ebf0; border-radius: 0 0 4px 4px; }
.panel-live .yts.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.panel-live .yt, .panel-live .rc { background: #fff; border: 1px solid #e1e7ed; border-radius: 4px; padding: 4px 6px 5px; min-width: 0; }
.panel-live .yth { display: flex; align-items: center; justify-content: space-between; gap: 4px; } .panel-live .yth b { font-size: 11px; }
.panel-live .drv { display: flex; justify-content: space-between; gap: 4px; font-size: 10px; color: #64748b; white-space: nowrap; margin-top: 1px; }
.panel-live .drv > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.panel-live .drv .mph { font-weight: 700; font-size: 10.5px; } .panel-live .drv .mph small { font-weight: 500; color: #94a3b8; font-size: 9px; }
.panel-live .ytb { display: flex; gap: 3px; margin-top: 3px; align-items: center; min-width: 0; }
/* RTGs */
.panel-live .rtgs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.panel-live .rc { border-top: 3px solid #ea580c; }
.panel-live .rc.idle { border-top-color: #cbd5e1; }
.panel-live .rc .ytb { justify-content: space-between; }
.panel-live .rq { margin-top: 3px; font-size: 10px; color: #94a3b8; } .panel-live .rq.on { color: #c2410c; font-weight: 600; }
/* the yard screen */
.panel-live .yard { display: grid; grid-template-columns: minmax(0, 1fr) 196px; gap: 10px; }
.panel-live .zone + .zone { margin-top: 7px; }
.panel-live .bcs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.panel-live .bc { background: #fff; border: 1px solid #e1e7ed; border-radius: 4px; overflow: hidden; min-width: 0; }
.panel-live .bch { display: flex; align-items: center; gap: 4px; padding: 3px 6px; font-size: 10px; white-space: nowrap; }
/* block headers by what the block holds: dangerous goods, reefers, empties, inspection, import and export */
.panel-live .bc.t-dg .bch { background: #fde2e0; color: #a3271b; } .panel-live .bc.t-reefer .bch { background: #dcecfd; color: #1d5fa8; } .panel-live .bc.t-empty .bch { background: #eceff3; color: #475569; }
.panel-live .bc.t-insp .bch { background: #fbf0d9; color: #8a5a06; } .panel-live .bc.t-ie .bch { background: #e2f3e7; color: #1f6f43; }
.panel-live .bc .bch .bt { color: inherit; opacity: .85; }
.panel-live .bch b { font-size: 11.5px; } .panel-live .bt { color: #475569; overflow: hidden; text-overflow: ellipsis; }
.panel-live .al { display: inline-flex; align-items: center; gap: 2px; font-size: 9.5px; font-weight: 700; padding: 0 4px 0 3px; border-radius: 3px; color: #fff; line-height: 15px; }
.panel-live .al.crit { background: #dc2626; } .panel-live .al.high { background: #ea580c; } .panel-live .al.med { background: #ca8a04; }
.panel-live .ng { display: inline-flex; align-items: center; gap: 2px; font-size: 9.5px; font-weight: 600; color: #475569; }
.panel-live .bcb { padding: 4px 6px 3px; white-space: nowrap; } .panel-live .bcb b { font-size: 15px; } .panel-live .bcb small { color: #94a3b8; font-size: 9.5px; margin-inline-start: 3px; }
.panel-live .bc .pbar { display: block; width: auto; height: 4px; margin: 0 6px; }
.panel-live .bcf { display: flex; justify-content: space-between; padding: 2px 6px 4px; font-size: 9.5px; color: #64748b; }
.panel-live .ys { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.panel-live .ys h5 { margin: 2px 0 0; }
.panel-live .yu { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #e1e7ed; border-radius: 4px; padding: 6px; }
.panel-live .ring { width: 56px; height: 56px; flex: none; } .panel-live .ring .trk { fill: none; stroke: #e2e8f0; stroke-width: 7; } .panel-live .ring .val { fill: none; stroke-width: 7; stroke-linecap: round; }
.panel-live .ring text { font: 700 13px "JetBrains Mono", monospace; fill: #0f172a; }
.panel-live .yu small { display: block; font-size: 10px; color: #64748b; } .panel-live .yu b { font-size: 15px; }
.panel-live .yk { display: grid; gap: 3px; font-size: 10.5px; background: #fff; border: 1px solid #e1e7ed; border-radius: 4px; padding: 5px 7px; }
.panel-live .yk span { display: flex; align-items: center; gap: 5px; color: #475569; } .panel-live .yk b { margin-inline-start: auto; color: #0f172a; }
.panel-live .ysev { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.panel-live .ysev div { border-radius: 4px; padding: 4px 6px; font-size: 9.5px; font-weight: 700; } .panel-live .ysev b { display: block; font-size: 16px; line-height: 1.1; }
.panel-live .ysev .crit { background: #fee2e2; color: #b91c1c; } .panel-live .ysev .high { background: #ffedd5; color: #c2410c; } .panel-live .ysev .med { background: #fef3c7; color: #a16207; }
.panel-live .alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.panel-live .alerts li { background: #fff; border: 1px solid #e1e7ed; border-inline-start: 3px solid #ca8a04; border-radius: 3px; padding: 4px 6px; }
.panel-live .alerts li.crit { border-inline-start-color: #dc2626; } .panel-live .alerts li.high { border-inline-start-color: #ea580c; }
.panel-live .alerts li div { display: flex; justify-content: space-between; align-items: center; gap: 4px; } .panel-live .cn { font-size: 10px; font-weight: 700; white-space: nowrap; }
.panel-live .alerts p { margin: 2px 0 0; font-size: 10.5px; line-height: 1.3; color: #334155; max-width: none; }
/* the gate screen */
.panel-live .gst { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.panel-live .gst div { background: #fff; border: 1px solid #e1e7ed; border-radius: 4px; padding: 5px 7px; } .panel-live .gst small { display: block; font-size: 9.5px; color: #64748b; white-space: nowrap; }
.panel-live .gst b { font-size: 18px; } .panel-live .gst .o b { color: #c2410c; }
.panel-live .gtr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 6px; }
.panel-live .gt { background: #fff; border: 1px solid #e1e7ed; border-radius: 4px; padding: 6px 7px; min-width: 0; }
.panel-live .gtm b { font-size: 20px; } .panel-live .gtm small { color: #64748b; font-size: 10px; margin-inline-start: 4px; }
.panel-live .histo { width: 100%; height: 30px; display: block; direction: ltr; margin: 3px 0; }
.panel-live .histo rect { fill: #93c5fd; } .panel-live .histo rect.over { fill: #fdba74; } .panel-live .histo .tgt { stroke: #dc2626; stroke-width: 1.2; stroke-dasharray: 3 2; } .panel-live .histo .med { stroke: #0f172a; stroke-width: 1.2; }
.panel-live .gtf { display: flex; justify-content: space-between; gap: 4px; font-size: 10px; color: #64748b; white-space: nowrap; } .panel-live .gtf .o { color: #c2410c; font-weight: 700; }
.panel-live .cams { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.panel-live .cam { background: #0b1520; border-radius: 4px; overflow: hidden; color: #cbd5e1; min-width: 0; }
.panel-live .cam-h { display: flex; align-items: center; gap: 6px; padding: 4px 7px; font-size: 10px; background: rgba(255, 255, 255, .06); } .panel-live .cam-h b { color: #fff; font-weight: 600; } .panel-live .cam-h time { margin-inline-start: auto; }
.panel-live .rec { width: 7px; height: 7px; border-radius: 50%; background: #ef4444; animation: blink 1.2s infinite; flex: none; }
.panel-live .cam-b { padding: 7px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; background: linear-gradient(180deg, #1b2733, #0d151d); font-size: 10.5px; }
.panel-live .plate { font-weight: 700; font-size: 12.5px; background: #f8fafc; color: #0e2233; padding: 1px 6px; border-radius: 2px; letter-spacing: .02em; }
[dir="rtl"] .panel-live .plate { font-family: var(--ar); }
.panel-live .cam .cn { color: #fde68a; } .panel-live .cam .mut { color: #94a3b8; }
.panel-live .cam-f { display: flex; align-items: center; gap: 6px; padding: 4px 7px 5px; font-size: 10px; } .panel-live .cam-f b { color: #fff; }
.panel-live .tb { width: 64px; height: 16px; margin-inline-start: auto; } .panel-live .tb rect { fill: #38bdf8; opacity: .8; }
/* the final view: the wall */
.panel-live .wall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.panel-live .tile { background: #fff; border: 1px solid #e1e7ed; border-radius: 4px; padding: 7px 8px; }
.panel-live .tile .th { display: flex; align-items: center; gap: 5px; color: #64748b; font-size: 10px; }
.panel-live .tile .live-dot { width: 6px; height: 6px; flex: none; }
.panel-live .tile b { display: block; font-size: 18px; line-height: 1.15; margin-top: 4px; color: #0f172a; font-weight: 700; }
.panel-live .tile small { color: #64748b; font-size: 10px; line-height: 1.3; display: block; margin-top: 2px; }

/* revision 6: an operator icon beside every name, the gate's TTT heading, the mail card's avatar */
.panel-live .drv > span:first-child, .panel-live .qsh .op { display: inline-flex; align-items: center; gap: 3px; min-width: 0; }
.panel-live .drv .ic, .panel-live .qsh .op .ic { width: 10px; height: 10px; flex: none; opacity: .75; }
.panel-live h5.ttt { margin: 7px 0 4px; }
.c-mail .head .av { display: grid; place-items: center; color: #fff; font: 700 13px/1 var(--sans); }

.panel-live .teu { margin: -2px 0 0; font-size: 10px; line-height: 1.35; color: #64748b; max-width: none; }

/* ---- the planner: the twin keeps the window; everything of the planner lives in one sidebar that slides in once the page holds still ---- */
#demo.planner { position: relative; height: 200vh; }
#demo-root { height: 100%; }
.pl-stage { --side: clamp(16px, 1.6vw, 28px); --sw: clamp(380px, 23vw, 440px); --aw: 360px; --used: calc(var(--side) + var(--sw)); --surface: #fbfcfd;
  position: sticky; top: 0; height: 100vh; min-height: 640px; font-size: 14px; color: var(--ink); pointer-events: none; }
.pl-stage > * { pointer-events: auto; }

/* the sidebar: below the header row (the name, the language and sound buttons), docked at the start of the line: left in English, right in Arabic */
.pl-side { position: absolute; z-index: 2; top: 92px; bottom: 16px; inset-inline-start: var(--side); display: flex; overflow: hidden;
  background: var(--surface); border: 1px solid var(--edge); border-radius: 14px; box-shadow: 0 1px 2px rgba(14, 34, 51, .06), 0 14px 36px rgba(14, 34, 51, .12);
  transform: translateX(calc(-100% - var(--side) - 12px)); visibility: hidden;
  transition: transform .45s cubic-bezier(.3, .7, .2, 1), visibility 0s linear .45s; }
[dir="rtl"] .pl-side { transform: translateX(calc(100% + var(--side) + 12px)); }
.ps-main { width: var(--sw); flex: none; display: flex; flex-direction: column; min-height: 0; }
/* the advanced options open as a second column out of the sidebar, towards the twin */
.ps-adv { width: var(--aw); flex: none; overflow: auto; overscroll-behavior: contain; scrollbar-width: none; padding: 14px 18px 12px; border-inline-start: 1px solid var(--edge); background: #f4f7f9; }
.ps-adv::-webkit-scrollbar { display: none; }
.ps-adv.tight { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent); }
.ps-adv[hidden] { display: none; }
.ps-adv > h3 { font-size: 15px; margin: 0 0 9px; }
.ps-adv fieldset { border: 0; padding: 0; margin: 0 0 8px; }
.ps-adv legend { font-weight: 700; font-size: 12.5px; margin-bottom: 6px; padding: 0; }
.ps-adv .two { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 10px; align-items: end; }
/* a figure that varies: its name and distribution on one line, its parameters under it */
.ps-adv .dist { margin: 0 0 4px; }
.ps-adv .dh { display: flex; align-items: center; justify-content: flex-start; gap: 8px; font-size: 12px; line-height: 16px; font-weight: 600; margin: 0 0 3px; }
.ps-adv .dt { font: 600 10.5px/15px var(--sans); font-style: normal; color: #1f6b60; background: #e3f0ed; padding: 0 7px; border-radius: 999px; white-space: nowrap; }
.ps-adv .three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 8px; align-items: end; }
.ps-adv .three .num span { font-size: 10.5px; }
.ps-adv .num { display: flex; flex-direction: column; gap: 3px; padding: 0; font-size: 11.5px; line-height: 1.25; color: var(--muted); }
.ps-adv .num input, .ps-adv .num select { font: 12.5px "JetBrains Mono", monospace; padding: 4px 8px; border: 1px solid var(--edge); border-radius: 6px; background: #fff; color: var(--ink); width: 100%; }
.ps-adv .chk { display: flex; gap: 8px; align-items: center; font-size: 12.5px; margin-top: 8px; }
.ps-adv .chk.first { margin: 0 0 10px; align-items: flex-start; line-height: 1.35; } .ps-adv .chk.first input { margin-top: 2px; }
/* the optimisation written as a model: decision variables, constraints, objective */
.pl-form h4 { font-size: 13px; margin: 0 0 6px; } .pl-form h4 + * { margin-bottom: 14px; }
.pl-form dl { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; margin-top: 0; font-size: 12.5px; line-height: 1.4; }
.pl-form dt { font: 600 13px/1.4 "JetBrains Mono", monospace; white-space: nowrap; } .pl-form dd { margin: 0; color: var(--muted); }
.pl-form ul { list-style: none; padding: 0; margin-top: 0; display: grid; gap: 4px; font: 12.5px/1.45 "JetBrains Mono", monospace; }
.pl-form ul li { padding: 5px 9px; background: #fff; border: 1px solid var(--edge); border-radius: 6px; }
.pl-form .fo { margin: 0 0 8px; padding: 8px 10px; background: #fff; border: 1px solid var(--edge); border-radius: 6px; font: 12.5px/1.5 "JetBrains Mono", monospace; max-width: none; }
.pl-form sub { font-size: 0.72em; }
.ps-adv .pl-note { font-size: 11.5px; line-height: 1.4; margin-top: 6px; }
/* the model's caveat closes every Advanced tab, at the foot of the column */
@media (min-width: 901px) { .ps-adv:not([hidden]) { display: flex; flex-direction: column; } .ps-adv > * { flex: none; } }
.ps-adv .pl-note.foot { margin-top: auto; padding-top: 6px; font-size: 10.5px; line-height: 1.35; color: #7a8792; }
.pl-stage.on .pl-side { transform: none; visibility: visible; transition: transform .55s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
@media (prefers-reduced-motion: reduce) { .pl-side, .pl-stage.on .pl-side { transition: none; } }

.ps-head { padding: 16px 20px 12px; border-bottom: 1px solid var(--edge); }
.ps-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ps-title h2 { margin: 0; font-size: 21px; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; font-variation-settings: "wdth" 112; }
.pl-advbtn { display: inline-flex; align-items: center; gap: 6px; flex: none; font: 600 12.5px/1 var(--sans); color: var(--ink); background: #fff; border: 1px solid var(--edge); border-radius: 999px; padding: 7px 12px 7px 9px; cursor: pointer; }
.pl-advbtn svg { width: 17px; height: 17px; fill: #fff; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.pl-advbtn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); } .pl-advbtn[aria-pressed="true"] svg { fill: var(--ink); }
.pl-modes { display: grid; grid-template-columns: 1fr 1fr; background: #e9eef2; border-radius: 10px; padding: 3px; margin-top: 12px; }
.pl-modes button { font: 650 14px/1 var(--sans); color: var(--muted); background: transparent; border: 0; border-radius: 8px; padding: 10px 12px; cursor: pointer; }
.pl-modes button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(14, 34, 51, .14); }
/* the three steps of the mode, on one line */
.pl-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.pl-steps button { display: flex; align-items: center; gap: 7px; width: 100%; font: 600 12px/1.2 var(--sans); color: var(--muted); background: none; border: 0; padding: 2px 0; cursor: pointer; text-align: start; }
.pl-steps button:disabled { cursor: default; }
.pl-steps li:not(.done):not(.now) button { opacity: .6; }
.pl-steps i { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 2px solid #c9d3db; font: 700 11.5px/1 "JetBrains Mono", monospace; font-style: normal; }
.pl-steps li.now button { color: var(--ink); } .pl-steps li.now i { background: var(--ink); border-color: var(--ink); color: #fff; }
.pl-steps li.done button { color: #1f7a6d; } .pl-steps li.done i { background: #dff2ee; border-color: #1f7a6d; }
.pl-steps button:not(:disabled):hover span { text-decoration: underline; text-underline-offset: 2px; }

.ps-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: none; padding: 16px 20px 18px; }
.ps-body::-webkit-scrollbar { display: none; }
.ps-body.more { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent); }
.ps-body[data-fit="1"] [data-drop="1"], .ps-body[data-fit="2"] :is([data-drop="1"], [data-drop="2"]), .ps-body[data-fit="3"] [data-drop] { display: none !important; }
.ps-acts { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px 14px; border-top: 1px solid var(--edge); background: #fff; }
.ps-acts:empty { display: none; }
.ps-acts .btn { flex: 1 1 auto; justify-content: center; padding: 12px 14px; font-size: 14px; }
.ps-acts .btn.primary { flex-grow: 2; }
.ps-acts .btn.icon { flex: none; width: 44px; padding: 0; display: grid; place-items: center; }
.ps-acts .btn.icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ps-sec + .ps-sec, .pl-plan + .ps-sec, .pl-note + .ps-sec, .infeasible + .ps-sec { margin-top: 18px; }
.pl-stage h3 small { display: block; margin-top: 3px; font-size: 12px; font-weight: 500; color: var(--muted); font-variation-settings: normal; }
/* the results come in two tabs, so each fits the sidebar */
.pl-stage .ps-tabs { margin: 0 0 14px; flex-wrap: nowrap; }
.ps-adv .ps-tabs { background: #e1e7ec; }   /* the Advanced tab bar sits a shade darker on the column's grey */
.pl-stage .ps-tabs button[aria-selected="true"] { background: #fff; font-weight: 700; box-shadow: 0 1px 4px rgba(14, 34, 51, .14); }
.ps-sec.charts { display: grid; gap: 16px; }
.pl-stage h3 { margin: 0 0 10px; font-size: 14.5px; font-weight: 750; font-variation-settings: "wdth" 110; }
.pl-note { font-size: 12.5px; line-height: 1.45; color: var(--muted); margin: 10px 0 0; max-width: none; }
.pl-stage .ctl-row { padding: 8px 0; gap: 4px 10px; }
.pl-stage .ctl-row:first-child { border-top: 0; padding-top: 0; }
.pl-stage .ctl-row .lbl span { font-size: 13.5px; } .pl-stage .ctl-row .lbl small { font-size: 12px; }
.pl-stage .seg button { padding: 7px 8px; font-size: 12.5px; } .pl-stage .shint { font-size: 12px; line-height: 1.4; }
.pl-stage .opts { display: grid; gap: 6px; }
.pl-stage .opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 11px; border: 1px solid var(--edge); border-radius: 8px; background: #fff; cursor: pointer; font-size: 13px; }
.pl-stage .opt input { margin-top: 2px; accent-color: var(--ink); }
.pl-stage .opt b { display: block; font-weight: 650; } .pl-stage .opt small { display: none; color: var(--muted); font-size: 12px; line-height: 1.4; margin-top: 2px; }
.pl-stage .opt:has(input:checked) small { display: block; }   /* only the chosen method says what it does */
.pl-stage .opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pl-plan { background: #fff; border: 1px solid var(--edge); border-radius: 10px; padding: 11px 13px; }
.pl-plan h3 { margin: 0 0 4px; font-size: 12.5px; color: var(--muted); font-weight: 650; }
.pl-plan p { margin: 0; font-size: 13.5px; line-height: 1.45; max-width: none; }
.pl-plan.won { border-color: #1f7a6d; box-shadow: inset 0 0 0 1px #1f7a6d; }
.pl-stage .infeasible { color: #b42318; font-size: 13px; margin: 10px 0 0; }
.pl-tip { margin: 0 0 6px; font-size: 12.5px; line-height: 1.4; padding: 7px 10px; background: #fff; border: 1px solid var(--edge); border-inline-start: 3px solid #e9a23b; border-radius: 6px; max-width: none; }
.pl-tip:last-child { margin-bottom: 0; }
.pl-stage .m, .pl-stage .kpi b, .pl-cmp td { font-family: "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.pl-stage .kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pl-stage .kpi.big { grid-column: auto; }
.pl-stage .kpi { background: #fff; border: 1px solid var(--edge); border-radius: 8px; padding: 7px 10px; }
.pl-stage .kpi span { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.pl-stage .kpi b { display: block; font-size: 15px; margin-top: 3px; font-weight: 700; } .pl-stage .kpi.big b { font-size: 18px; }
.pl-stage .kpi b small { font-size: 11px; color: var(--muted); font-weight: 500; }
.pl-stage .kpi > small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.pl-stage .kpi.bad { border-color: #f1b8b2; } .pl-stage .kpi.bad small { color: #b42318; } .pl-stage .kpi.warn { border-color: #f3d9a4; }

/* the plan, ship by ship: a small picture of its cranes (each with its trucks) and two count sliders */
.pl-ship { padding: 8px 0 6px; border-top: 1px solid var(--edge); }
.pl-ship:first-child { border-top: 0; padding-top: 0; }
.pl-ship-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; margin-bottom: 2px; }
.pl-ship-h > span:first-child { font-size: 13.5px; font-weight: 700; border-inline-start: 3px solid #e09a00; padding-inline-start: 7px; line-height: 1.2; }
.pl-ship.b .pl-ship-h > span:first-child { border-color: #2d6f73; }
.mini { display: flex; gap: 5px; align-items: flex-start; height: 40px; }
.ps-body[data-fit="3"] .pl-ship-h { min-height: 0; margin-bottom: 0; }
.mq { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mq svg { width: 14px; height: 15px; fill: none; stroke: #2b62b8; stroke-width: 1.8; stroke-linejoin: round; }
.mt { display: grid; grid-template-columns: repeat(2, 4px); gap: 2px; }
.mt i { width: 4px; height: 4px; border-radius: 1px; background: #1f9a52; }
.sl { display: grid; grid-template-columns: 116px minmax(0, 1fr) 24px; align-items: center; gap: 12px; padding: 4px 0; }
.sl-l { font-size: 13px; line-height: 1.25; }
.sl output { font: 700 16px/1 "JetBrains Mono", monospace; text-align: end; font-variant-numeric: tabular-nums; }
.sl-r { position: relative; display: block; height: 26px; }
.rng { --tone: var(--ink); --fr: 0; --cp: 1; --flo: 0px; --fill: calc(9px + (100% - 18px) * var(--fr)); --cap: calc(9px + (100% - 18px) * var(--cp));
  position: relative; z-index: 1; display: block; width: 100%; height: 26px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; touch-action: none; }
.sl.a .rng { --tone: #e09a00; } .sl.b .rng { --tone: #2d6f73; }
.rng::-webkit-slider-runnable-track { height: 6px; border-radius: 3px;
  background: linear-gradient(to right, transparent 0 var(--flo), var(--tone) 0 var(--fill), #dfe5ea 0 var(--cap), transparent 0), repeating-linear-gradient(-45deg, #cfd7de 0 2px, #f1f4f6 2px 5px); }
.rng::-moz-range-track { height: 6px; border-radius: 3px;
  background: linear-gradient(to right, transparent 0 var(--flo), var(--tone) 0 var(--fill), #dfe5ea 0 var(--cap), transparent 0), repeating-linear-gradient(-45deg, #cfd7de 0 2px, #f1f4f6 2px 5px); }
[dir="rtl"] .rng::-webkit-slider-runnable-track { background: linear-gradient(to left, transparent 0 var(--flo), var(--tone) 0 var(--fill), #dfe5ea 0 var(--cap), transparent 0), repeating-linear-gradient(45deg, #cfd7de 0 2px, #f1f4f6 2px 5px); }
[dir="rtl"] .rng::-moz-range-track { background: linear-gradient(to left, transparent 0 var(--flo), var(--tone) 0 var(--fill), #dfe5ea 0 var(--cap), transparent 0), repeating-linear-gradient(45deg, #cfd7de 0 2px, #f1f4f6 2px 5px); }
.rng::-webkit-slider-thumb { -webkit-appearance: none; box-sizing: border-box; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: #fff; border: 2px solid var(--tone); box-shadow: 0 1px 3px rgba(14, 34, 51, .28); transition: transform .12s ease; }
.rng::-moz-range-thumb { box-sizing: border-box; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--tone); box-shadow: 0 1px 3px rgba(14, 34, 51, .28); transition: transform .12s ease; }
.rng:active::-webkit-slider-thumb { transform: scale(1.15); } .rng:active::-moz-range-thumb { transform: scale(1.15); }
.rng:focus { outline: none; }
.rng:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone) 30%, transparent); }
.rng:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone) 30%, transparent); }
.sl-ticks { position: absolute; inset-inline: 0; top: 19px; display: flex; justify-content: space-between; padding: 0 8px; pointer-events: none; }
.sl-ticks i { width: 2px; height: 3px; border-radius: 1px; background: #bcc6ce; }
.pl-sum { margin: 8px 0 2px; }
.pl-cranes { display: flex; gap: 8px; align-items: flex-start; min-height: 2.8em; margin: 0 0 6px; font-size: 12.5px; line-height: 1.4; color: var(--muted); } .pl-cranes.warn { color: #9a5b00; }
.pl-cranes .mini { height: auto; flex: none; margin-top: 1px; } .pl-cranes .mq svg { stroke: #b0bac2; }
.pic-bar { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.pic-bar i { height: 6px; background: #e2e8ee; border-radius: 3px; overflow: hidden; } .pic-bar i b { display: block; height: 100%; background: #1f9a52; transition: width .2s ease; }
.pic-bar.over i b { background: #d1495b; } .pic-bar.over span { color: #b42318; font-weight: 600; }
.pl-stage .pl-strat { margin-top: 10px; padding-top: 12px; }
.ps-sec.planner > .sl { padding: 0; }

/* the search, while it runs */
.pl-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pl-cand, .pl-best { background: #fff; border: 1px solid var(--edge); border-radius: 10px; padding: 8px 11px; min-height: 108px; }
.pl-best { border-color: #1f7a6d; }
.pl-cand h3, .pl-best h3 { margin: 0 0 4px; font-size: 12px; color: var(--muted); }
.pl-cand p, .pl-best p { margin: 0 0 6px; font-size: 12px; line-height: 1.4; max-width: none; }
.pl-cand .cl span, .pl-best .cl span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* always three lines, never wrapping */
.pl-cand b, .pl-best b { font-size: 16px; }
.pl-prog { margin: 12px 0 0; } .pl-prog p { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
.pl-prog .pbar { height: 6px; background: #e2e8ee; border-radius: 3px; overflow: hidden; } .pl-prog .pbar b { display: block; height: 100%; background: var(--ink); border-radius: 3px; transition: width .15s linear; }
.pl-prog + .ps-sec { margin-top: 18px; }
.pl-live { display: grid; gap: 12px; margin-top: 12px; }
.pl-live:first-child { margin-top: 0; }

/* charts, sized for the sidebar */
.pl-chart { margin: 0; min-width: 0; }
.pl-chart figcaption { font-size: 12.5px; font-weight: 650; color: var(--ink); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.pl-chart figcaption .k { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-inline-start: 8px; }
.pl-chart .k.qc { background: #3f7fe0; } .pl-chart .k.rtg { background: #ec6a2c; } .pl-chart .k.k-yours { background: #9aa5ae; height: 2px; } .pl-chart .k.k-best { background: #1f4e8c; } .pl-chart .k.win { background: #b42318; width: 2px; height: 12px; }
.pl-chart svg { width: 100%; height: auto; display: block; direction: ltr; overflow: visible; }
.pl-chart .gl { stroke: #e6ebef; } .pl-chart .tx, .pl-chart .ty { font: 9.5px "JetBrains Mono", monospace; fill: #7d8a95; }
.pl-chart .ln { fill: none; stroke: #1f4e8c; stroke-width: 2; } .pl-chart .band { fill: rgba(31, 78, 140, .12); stroke: none; }
.pl-chart .pt { fill: #1f4e8c; } .pl-chart .ghost { fill: none; stroke: #9aa5ae; stroke-width: 1.6; stroke-dasharray: 4 3; }
.pl-chart .ln.qc { stroke: #3f7fe0; } .pl-chart .ln.rtg { stroke: #ec6a2c; } .pl-chart .ln.gate { stroke: #7b5fc4; stroke-dasharray: 4 3; } .pl-chart .k.gate { background: #7b5fc4; }
.pl-chart .head { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; }
.pl-chart .trk { fill: #eef2f5; } .pl-chart .bar { fill: #1f7a6d; } .pl-chart .bar.late { fill: #d1495b; } .pl-chart .win { stroke: #b42318; stroke-width: 2; }
.pl-chart .ci { stroke: var(--ink); stroke-width: 1.5; } .pl-chart .gtick { stroke: #9aa5ae; stroke-width: 2; stroke-dasharray: 3 2; }
.pl-chart .nm { font: 600 11px var(--sans); fill: var(--ink); } .pl-chart .val { font: 600 10px "JetBrains Mono", monospace; fill: var(--ink); }
.pl-chart .dot { fill: #b8c4ce; }
[dir="rtl"] .pl-chart .nm { font-family: var(--ar); }
.pl-empty { display: grid; place-items: center; min-height: 84px; font-size: 12.5px; color: var(--muted); border: 1px dashed color-mix(in srgb, var(--ink) 16%, transparent); border-radius: 8px; }
.pl-doe { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.pl-chart .doe-sub { margin: 10px 0 0; font-size: 12px; font-weight: 600; } .pl-doe.inter i b { background: #7b5fc4; }
.pl-doe li { display: grid; grid-template-columns: minmax(0, 1.5fr) 1fr 38px; align-items: center; gap: 8px; font-size: 12px; }
.pl-doe i { height: 8px; background: #eef2f5; border-radius: 4px; overflow: hidden; } .pl-doe i b { display: block; height: 100%; background: #1f4e8c; } .pl-doe em { font: 600 11px "JetBrains Mono", monospace; font-style: normal; text-align: end; }

/* the map of every plan */
.land { margin: 0; }
.ps-body.fill { display: flex; flex-direction: column; }
.ps-body.fill > * { flex: none; }
.ps-body.fill > .landsec { flex: 1 1 0; min-height: auto; display: flex; flex-direction: column; }
.ps-body.fill .land { flex: 1 1 0; min-height: auto; display: flex; flex-direction: column; }
.ps-body.fill .land svg.pc { flex: 1 1 0; min-height: min(185px, 20vh); } .ps-body.fill .land svg.cv { flex: none; }
.land .lh { display: block; margin-bottom: 6px; } .land .lh b { display: block; font-size: 14.5px; font-weight: 750; font-variation-settings: "wdth" 110; }
.land .lh span { display: block; font-size: 12.5px; line-height: 1.45; color: var(--muted); margin-top: 3px; }
.land svg { width: 100%; height: auto; display: block; direction: ltr; }
.land .cells rect { fill: #e6eaee; transition: fill .3s ease; } .land .cells rect.no { fill: #bfc7cd; opacity: .6; }
.land text { font: 8.5px var(--sans); fill: #6b7883; } .land .lt text { font: 600 8.5px "JetBrains Mono", monospace; fill: var(--ink); }
.land .marks .yours { fill: #fff; stroke: var(--ink); stroke-width: 1.2; } .land .marks .best { fill: none; stroke: var(--ink); stroke-width: 2; }
.land .marks .cur { fill: none; stroke: var(--ink); stroke-width: 1.6; animation: curpulse .6s ease-out; }
@keyframes curpulse { from { stroke-width: 4; opacity: .4; } to { stroke-width: 1.6; opacity: 1; } }
.land .lx { display: flex; justify-content: space-between; gap: 10px; font-size: 10.5px; color: var(--muted); margin-top: 4px; line-height: 1.3; }
.pl-legend { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11.5px; color: var(--muted); }
.pl-legend li { display: inline-flex; align-items: center; gap: 6px; }
.pl-legend .ramp { width: 46px; height: 8px; border-radius: 2px; background: linear-gradient(90deg, rgb(31, 122, 109), rgb(233, 196, 106), rgb(209, 73, 91)); }
[dir="rtl"] .pl-legend .ramp { background: linear-gradient(270deg, rgb(31, 122, 109), rgb(233, 196, 106), rgb(209, 73, 91)); }
.pl-legend .sw { width: 9px; height: 9px; border-radius: 2px; } .pl-legend .untried { background: #e6eaee; } .pl-legend .no { background: #bfc7cd; } .pl-legend .bestm { border: 2px solid var(--ink); border-radius: 50%; } .pl-legend .yoursm { background: #fff; border: 1.2px solid var(--ink); border-radius: 50%; }

/* your plan against the best */
.pl-cmp { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pl-cmp th, .pl-cmp td { padding: 7px 5px; border-top: 1px solid var(--edge); text-align: end; white-space: nowrap; } .pl-cmp th:first-child { text-align: start; font-weight: 500; color: var(--muted); white-space: normal; padding-inline-start: 0; }
.pl-cmp tr:first-child th { border-top: 0; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.pl-cmp td.up { color: #1f7a6d; font-weight: 700; } .pl-cmp td.down { color: #b42318; font-weight: 700; }

[dir="rtl"] .pl-stage button, [dir="rtl"] .pl-stage .ps-title h2 { font-family: var(--ar); }

/* while the shift plays: a surface over the twin for the free camera, a playback bar along its foot, and a hint at its head */
.pl-free { position: absolute; inset: 0; z-index: 0; cursor: grab; touch-action: none; }
.pl-free:active { cursor: grabbing; }
.pl-free[hidden], .pl-player[hidden], .pl-hint[hidden] { display: none; }
.pl-player, .pl-hint { position: absolute; z-index: 3; left: calc(var(--used) + (100% - var(--used)) / 2); transform: translateX(-50%); background: var(--surface); border: 1px solid var(--edge); box-shadow: 0 8px 24px rgba(14, 34, 51, .16); }
[dir="rtl"] .pl-player, [dir="rtl"] .pl-hint { left: auto; right: calc(var(--used) + (100% - var(--used)) / 2); transform: translateX(50%); }
.pl-stage:has(.pl-side.adv) { --used: calc(var(--side) + var(--sw) + var(--aw)); }
.pl-player { bottom: 22px; display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 8px; border-radius: 999px; white-space: nowrap; direction: ltr; }   /* a timeline reads left to right in both languages */
.pp-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.pp-btn svg { width: 18px; height: 18px; fill: currentColor; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pp-clock { font: 700 19px/1 "JetBrains Mono", monospace; min-width: 58px; }
.pp-seek { width: clamp(140px, 16vw, 280px); accent-color: var(--ink); }
.pp-end { font: 11px "JetBrains Mono", monospace; color: var(--muted); }
.pl-player .seg { padding: 3px; gap: 2px; flex-wrap: nowrap; } .pl-player .seg button { flex: none; padding: 6px 9px; font: 600 12px/1 "JetBrains Mono", monospace; }
.pp-reset { font: 600 12.5px/1 var(--sans); color: var(--ink); background: #fff; border: 1px solid var(--edge); border-radius: 999px; padding: 9px 12px; cursor: pointer; }
.pp-reset[hidden] { display: none; }
.pl-hint { top: 96px; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 12px; font-size: 13px; max-width: min(560px, calc(100% - var(--used) - 48px)); }
.pl-hint svg { width: 20px; height: 20px; flex: none; fill: none; stroke: #1f7a6d; stroke-width: 1.6; }
.pl-hint button { flex: none; font: 600 12.5px/1 var(--sans); color: #fff; background: var(--ink); border: 0; border-radius: 8px; padding: 8px 11px; cursor: pointer; }
[dir="rtl"] .pl-hint { padding: 8px 14px 8px 8px; }
.pl-hint.tip { padding: 8px 14px; pointer-events: none; }
/* the view buttons: at the far edge of the twin, opposite the sidebar; they appear with the planner */
.pl-view { position: absolute; z-index: 3; inset-inline-end: var(--side); bottom: 22px; display: flex; flex-direction: column; padding: 4px; gap: 2px;
  background: var(--surface); border: 1px solid var(--edge); border-radius: 12px; box-shadow: 0 8px 24px rgba(14, 34, 51, .16);
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.pl-stage.on .pl-view { opacity: 1; visibility: visible; transition: opacity .3s .25s, visibility 0s; }
.pl-view button { width: 38px; height: 38px; border: 0; border-radius: 8px; background: none; color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.pl-view button:hover { background: #e9eef2; }
.pl-view button:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.pl-view svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pl-view i { display: block; height: 1px; margin: 3px 6px; background: var(--edge); }
/* the shift so far, in the sidebar */
.pl-wait { margin: 18px 0 0; font-size: 13.5px; color: var(--muted); }
.lv-ship { display: grid; grid-template-columns: 104px 1fr; gap: 3px 10px; align-items: center; margin-bottom: 10px; }
.lv-ship span { font-size: 12.5px; font-weight: 650; border-inline-start: 3px solid #e09a00; padding-inline-start: 6px; } .lv-ship.b span { border-color: #2d6f73; }
.lv-ship i { height: 8px; background: #e2e8ee; border-radius: 4px; overflow: hidden; } .lv-ship i b { display: block; height: 100%; background: #e09a00; } .lv-ship.b i b { background: #2d6f73; }
.lv-ship em { grid-column: 2; font: 500 11.5px "JetBrains Mono", monospace; font-style: normal; color: var(--muted); }
.lv-wait { display: grid; grid-template-columns: auto 1fr auto 1fr auto 1fr; align-items: baseline; gap: 4px 8px; margin-top: 4px; padding: 9px 11px; background: #fff; border: 1px solid var(--edge); border-radius: 8px; font-size: 12.5px; }
.lv-wait span { color: var(--muted); grid-column: 1 / -1; } .lv-wait b { font: 700 17px/1 "JetBrains Mono", monospace; } .lv-wait small { color: var(--muted); font-size: 12px; }

/* labels on the twin */
.dlabel { position: relative; font: 600 11.5px/1.2 var(--sans); color: var(--ink); background: rgba(255, 255, 255, .95); border-inline-start: 3px solid #94a3b8; padding: 4px 7px; border-radius: 3px; white-space: nowrap; box-shadow: 0 4px 12px rgba(14, 34, 51, .12); transition: transform .25s ease, opacity .2s ease; }
.dlabel em { font-style: normal; font-weight: 500; color: #4a5a67; margin-inline-start: 6px; }
.dlabel.block { font-size: 11px; padding: 3px 6px; } .dlabel.block em { margin: 0; }
.dlabel[data-tone="a"] { border-color: #e09a00; } .dlabel[data-tone="b"] { border-color: #2d6f73; }
.dlabel[data-tone="ok"] { border-color: #1f7a6d; } .dlabel[data-tone="warn"] { border-color: #e9a23b; } .dlabel[data-tone="bad"] { border-color: #d1495b; } .dlabel[data-tone="bad"] em { color: #b42318; }
.dlabel.lifted::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: var(--lift, 0); background: color-mix(in srgb, var(--ink) 45%, transparent); }

/* short windows (a laptop at 125%): the sidebar tightens so each step still fits without scrolling */
@media (min-width: 901px) and (max-height: 820px) {
  .ps-head { padding: 12px 18px 10px; }
  .ps-title h2 { font-size: 19px; }
  .pl-advbtn { padding: 6px 11px 6px 8px; }
  .pl-modes { margin-top: 10px; } .pl-modes button { padding: 8px 12px; }
  .pl-steps { margin-top: 9px; }
  .ps-body { padding: 12px 18px 12px; }
  .ps-acts { padding: 10px 18px 12px; } .ps-acts .btn { padding: 10px 14px; }
  .ps-sec + .ps-sec, .pl-plan + .ps-sec, .pl-note + .ps-sec, .infeasible + .ps-sec { margin-top: 14px; }
  .pl-stage h3 { margin-bottom: 8px; }
  .pl-stage .opts { gap: 5px; } .pl-stage .opt { padding: 6px 10px; }
  .pl-ship { padding: 6px 0 4px; } .sl { padding: 2px 0; }
  .pl-stage .pl-strat { margin-top: 6px; padding-top: 8px; }
  .pl-stage .ps-tabs { margin-bottom: 10px; }
  .pl-stage .ps-sec.charts { gap: 10px; }
  .pl-stage .kpis { gap: 5px; } .pl-stage .kpi { padding: 5px 9px; } .pl-stage .kpi b { font-size: 14px; margin-top: 1px; } .pl-stage .kpi.big b { font-size: 16px; }
  .pl-stage .kpi span, .pl-stage .kpi > small { font-size: 11px; }
  .pl-cmp th, .pl-cmp td { padding: 5px 4px; } .pl-cmp { font-size: 12px; }
  .pl-tip { padding: 6px 9px; font-size: 12px; } .pl-plan { padding: 8px 11px; } .pl-plan p { font-size: 12.5px; }
  .pl-cand, .pl-best { min-height: 80px; padding: 7px 10px; } .ps-body.fill .land svg { min-height: 24vh; } .pl-prog { margin-top: 8px; } .pl-prog + .ps-sec { margin-top: 10px; }
  .ps-acts .btn { padding: 10px 11px; font-size: 13px; }
  .pl-stage .pl-note { font-size: 12px; margin-top: 8px; }
}

/* narrow screens: the sidebar becomes a sheet along the bottom */
@media (max-width: 900px) {
  .pl-stage { --sw: calc(100vw - 20px); --used: 0px; }
  .pl-side { top: auto; height: 58vh; inset-inline: 10px; bottom: 10px; transform: translateY(calc(100% + 20px)); }
  [dir="rtl"] .pl-side { transform: translateY(calc(100% + 20px)); }
  .ps-adv { display: none; }
  .pl-player { bottom: auto; top: 84px; } .pp-seek, .pp-end { display: none; } .pl-hint { display: none; }
  .pl-view { bottom: auto; top: 140px; inset-inline-end: 10px; } .pl-view button { width: 34px; height: 34px; }
}
[dir="rtl"] .pl-form li, [dir="rtl"] .pl-form dt { unicode-bidi: plaintext; text-align: right; }   /* formulas read left to right inside Arabic lines */

/* the view hint: in the middle of the twin, a little larger: a title, three gestures with a picture each, and the button */
.pl-hint { top: 50%; transform: translate(-50%, -50%); flex-direction: column; gap: 14px; padding: 18px 24px 16px; border-radius: 16px; font-size: 14px; max-width: min(640px, calc(100% - var(--used) - 48px)); }
[dir="rtl"] .pl-hint { transform: translate(50%, -50%); padding: 18px 24px 16px; }
.pl-hint h4 { margin: 0; font-size: 16px; font-weight: 700; }
.pl-hint ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; }
.pl-hint li { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 132px; text-align: center; font-size: 13.5px; line-height: 1.3; }
.pl-hint svg { width: 64px; height: 52px; flex: none; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pl-hint svg .on { fill: #1f7a6d; stroke: none; }
.pl-hint svg text { fill: var(--ink); stroke: none; font: 700 7.5px var(--sans); }
.pl-hint button { padding: 9px 18px; font-size: 13.5px; }
.pl-hint.tip { flex-direction: row; gap: 14px; padding: 14px 22px; font-size: 15px; font-weight: 600; }
.pl-hint.tip svg { width: 56px; height: 46px; }

/* the view hint fades in and out */
.pl-hint { opacity: 0; transition: opacity .5s ease; } .pl-hint.show { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .pl-hint { transition: none; } }

/* the search picture: each plan's result in the order tried (with the best so far), and parallel coordinates, one line per plan */
.land .cv { margin: 2px 0 8px; }
.land .cv .base { stroke: #d3dbe1; } .land .cv .cvd circle { fill: #a9b4bc; } .land .cv .cvd circle.no { fill: #cdd4da; }
.land .cv .cvb { fill: none; stroke: #1f6b60; stroke-width: 1.8; } .land .cv text { font: 600 8px "JetBrains Mono", monospace; fill: #6b7883; }
.land .pc .ax line { stroke: #c9d2d9; } .land .pc text { font: 7.5px var(--sans); fill: #6b7883; } .land .pc text.h { font: 700 8.5px var(--sans); fill: var(--ink); } .land .pc text.h2 { font: 600 8px var(--sans); fill: #4a5a67; }
.land .pc .lines polyline { fill: none; stroke: #a9b4bc; stroke-width: .9; opacity: .42; } .land .pc .lines polyline.no { stroke: #c3cbd1; stroke-dasharray: 2 2; opacity: .35; }
.land .pc .ov polyline { fill: none; } .land .pc .ov .yours { stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 4 3; opacity: .8; }
.land .pc .ov .cur { stroke: var(--ink); stroke-width: 1.8; opacity: .85; } .land .pc .ov .pbest { stroke: #1f6b60; stroke-width: 3; }
.pl-legend .ln { width: 18px; height: 0; border-top: 2px solid #a9b4bc; } .pl-legend .ln.no { border-top: 2px dashed #c3cbd1; } .pl-legend .ln.lbest { border-top: 3px solid #1f6b60; }
.pl-legend .ln.cur { border-top: 2px solid var(--ink); } .pl-legend .ln.yours { border-top: 2px dashed var(--ink); }

/* the solution space in 3D: a box turned by dragging, the plans as dots, a fitted surface, the search's path to the best */
.sp3 { margin: 0; display: flex; flex-direction: column; }
.sp3 .lh { display: block; margin-bottom: 4px; } .sp3 .lh b { display: block; font-size: 14.5px; font-weight: 750; font-variation-settings: "wdth" 110; }
.sp3 .lh span { display: block; font-size: 12.5px; line-height: 1.45; color: var(--muted); margin-top: 3px; }
.sp3 svg.s3 { width: 100%; height: auto; display: block; direction: ltr; cursor: grab; touch-action: none; user-select: none; }
.sp3 svg.s3:active { cursor: grabbing; }
.ps-body.fill .sp3 { flex: 1 1 0; min-height: auto; } .ps-body.fill .sp3 svg.s3 { flex: 1 1 0; min-height: min(200px, 22vh); }
.sp3 .s3h { margin: 2px 0 0; font-size: 11px; color: var(--muted); text-align: center; }
.s3 .g { stroke: #dde3e8; stroke-width: .7; } .s3 .ax { stroke: #b9c3ca; stroke-width: .9; }
.s3 .q { stroke: rgba(255, 255, 255, .55); stroke-width: .5; opacity: .5; }
.s3 .d { stroke: rgba(14, 34, 51, .35); stroke-width: .4; }
.s3 .path { fill: none; stroke: #c8102e; stroke-width: 1.8; stroke-linejoin: round; }
.s3 .bst { fill: none; stroke: #c8102e; stroke-width: 2; }
.s3 text { font: 8px var(--sans); fill: #6b7883; } .s3 .tk { font: 600 7.5px "JetBrains Mono", monospace; } .s3 .al { font: 700 8.5px var(--sans); fill: #4a5a67; }
.s3 .empty { font-size: 11px; }
.land .cv .cvbest { fill: none; stroke: #1f6b60; stroke-width: 1.8; }
[dir="rtl"] .sp3 .s3 text { font-family: var(--ar); } [dir="rtl"] .sp3 .s3 .tk { font-family: "JetBrains Mono", monospace; }
