/* LAT Lab 6: Paper and ink. One scale for type, space, radius and colour. */
@font-face { font-family: Outfit; font-weight: 100 900; font-display: swap; src: url(../fonts/outfit.woff) format('woff'); }

:root {
    --paper: #FBFBFD; --card: #FFFFFF; --tint: #F4F7FC; --soft: #E9F0FA; --hair: #DDE3EA; --hair-strong: #B9C6D6;
    --ink: #0B1217; --body: #3D4852; --sub: #586470;
    --blue: #007EF8; --blue-ink: #0062C4; --mint: #00D9C0; --teal: #00BFA9; --teal-ink: #00756A; --red: #E53935; --red-ink: #C02A27;
    --brand: linear-gradient(135deg, #0070FF, #00F0C0);
    --t-xs: 13px; --t-sm: 14px; --t-md: 15px; --t-lg: 17px; --t-xl: 21px; --t-2xl: 29px;
    --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px;
    --r-control: 8px; --r-card: 12px; --r-full: 999px;
    --ring: 0 0 0 3px #B5D8FD;
    --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body { font-family: Outfit, -apple-system, "Segoe UI", sans-serif; font-size: var(--t-md); line-height: 1.45; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; }
button, input, select { font: inherit; color: inherit; }
svg text { font-family: Outfit, -apple-system, "Segoe UI", sans-serif; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-control); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s-5); height: 56px; padding: 0 var(--s-5); background: var(--card); border-bottom: 1px solid var(--hair); }
.brand { display: flex; align-items: center; gap: var(--s-2); background: none; border: 0; padding: var(--s-1) var(--s-2); cursor: pointer; font-size: var(--t-xl); font-weight: 700; letter-spacing: -.01em; }
.tabs { display: flex; gap: var(--s-1); height: 100%; }
.tabs button { position: relative; display: flex; align-items: center; gap: var(--s-2); height: 100%; padding: 0 var(--s-4); background: none; border: 0; cursor: pointer; font-size: var(--t-lg); font-weight: 600; color: var(--sub); }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected=true] { color: var(--ink); }
.tabs button::after { content: ""; position: absolute; left: var(--s-4); right: var(--s-4); bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand); transform: scaleX(0); transition: transform .25s var(--ease); }
.tabs button[aria-selected=true]::after { transform: scaleX(1); }
.powered { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); padding: 5px var(--s-3); border: 1px solid var(--hair); border-radius: var(--r-full); font-size: var(--t-xs); color: var(--sub); }
.powered svg { height: 20px; width: auto; }
.sweep { position: fixed; top: 56px; left: 0; right: 0; height: 3px; z-index: 30; overflow: hidden; opacity: 0; transition: opacity .2s; }
.sweep::before { content: ""; position: absolute; inset: 0; width: 40%; background: var(--brand); border-radius: 3px; animation: sweep 1.15s var(--ease) infinite; }
body.busy .sweep { opacity: 1; }

/* ---------- icons: bold line over a wash ---------- */
.ic { position: relative; display: inline-grid; place-items: center; width: 24px; height: 24px; flex: none; }
.ic svg { position: relative; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ic .dot, svg .dot { fill: currentColor; stroke: none; }
.ic.wash::before { content: ""; position: absolute; width: 17px; height: 15px; left: 6px; top: 7px; border-radius: 46% 54% 60% 40% / 55% 45% 55% 45%; background: #9CCBFC; opacity: .8; filter: blur(.8px); }
.ic.wash.mint::before { background: #8FE3D6; }
.ic.lg { width: 36px; height: 36px; } .ic.lg svg { width: 28px; height: 28px; } .ic.lg.wash::before { width: 26px; height: 22px; left: 9px; top: 11px; filter: blur(1.4px); }

/* ---------- layout ---------- */
main { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; padding: var(--s-5); }
.view { animation: rise .35s var(--ease) backwards; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.grid { display: grid; gap: var(--s-4); }
.g-2 { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.g-side { grid-template-columns: 372px minmax(0, 1fr); align-items: start; }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mt { margin-top: var(--s-4); }
.card { background: var(--card); border: 1px solid var(--hair); border-radius: var(--r-card); padding: var(--s-4); min-width: 0; }
.card > h2, .card > .head h2 { font-size: var(--t-lg); font-weight: 700; letter-spacing: -.005em; }
.card .head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-bottom: var(--s-3); }
.card .head .spacer { flex: 1; }
.eyebrow { font-size: var(--t-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sub); }
.hint { font-size: var(--t-sm); color: var(--sub); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); padding: var(--s-3) var(--s-4); margin-bottom: var(--s-4); background: var(--card); border: 1px solid var(--hair); border-radius: var(--r-card); }
.field { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); font-size: var(--t-sm); font-weight: 600; color: var(--body); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); height: 36px; padding: 0 var(--s-4); border-radius: var(--r-control); border: 1px solid var(--hair-strong); background: var(--card); font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { background: var(--tint); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--blue-ink); border-color: var(--blue-ink); color: #fff; }
.btn.primary:hover { background: #00529F; }
.btn.danger { border-color: var(--red-ink); color: var(--red-ink); }
.btn.sm { height: 30px; padding: 0 var(--s-3); font-size: var(--t-sm); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.seg { display: inline-flex; padding: 3px; background: var(--tint); border: 1px solid var(--hair); border-radius: var(--r-control); }
.seg button { height: 28px; padding: 0 var(--s-3); border: 0; border-radius: 6px; background: none; font-size: var(--t-sm); font-weight: 600; color: var(--sub); cursor: pointer; transition: background .15s, color .15s; }
.seg button[aria-pressed=true] { background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--hair-strong); }
input[type=number], select { height: 32px; padding: 0 var(--s-2); border: 1px solid var(--hair-strong); border-radius: var(--r-control); background: var(--card); font-size: var(--t-md); font-variant-numeric: tabular-nums; }
input[type=number] { width: 84px; }
input[type=number].wide { width: 120px; }
input[type=number]:disabled { background: var(--tint); color: var(--sub); }
input[type=range] { -webkit-appearance: none; appearance: none; flex: 1; min-width: 80px; height: 4px; border-radius: 4px; background: linear-gradient(var(--blue), var(--blue)) 0 / var(--fill, 50%) 100% no-repeat, var(--hair); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--card); border: 2.5px solid var(--blue); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 2.5px solid var(--blue); cursor: pointer; }
input[type=checkbox] { -webkit-appearance: none; appearance: none; display: inline-grid; place-content: center; flex: none; width: 18px; height: 18px; margin: 0; border: 1.8px solid var(--hair-strong); border-radius: 6px; background: #fff; cursor: pointer; vertical-align: middle; transition: background .15s, border-color .15s, box-shadow .15s; }
input[type=checkbox]::after { content: ""; width: 9px; height: 5px; margin-top: -2px; border-left: 2.4px solid #fff; border-bottom: 2.4px solid #fff; border-radius: 1px; transform: rotate(-45deg) scale(0); transition: transform .18s var(--ease); }
input[type=checkbox]:hover { border-color: var(--ink); } input[type=checkbox]:checked { border-color: var(--ink); background: var(--ink); } input[type=checkbox]:checked::after { transform: rotate(-45deg) scale(1); }
input[type=checkbox]:focus-visible { outline: none; box-shadow: var(--ring); } input[type=checkbox]:disabled { opacity: .5; cursor: default; }
.prow { display: grid; grid-template-columns: 132px minmax(0, 1fr) 84px; align-items: center; gap: var(--s-3); padding: 6px 0; }
.prow label { font-size: var(--t-sm); color: var(--body); }
.prow label b { display: inline-block; min-width: 46px; font-weight: 700; color: var(--ink); }
.prow select { grid-column: 2 / 4; width: 100%; }
.msg { margin-top: var(--s-2); font-size: var(--t-sm); color: var(--red-ink); min-height: 18px; }

/* ---------- numbers ---------- */
.stat { padding: var(--s-3) var(--s-4); background: var(--tint); border-radius: var(--r-control); min-width: 0; }
.stat .k { font-size: var(--t-xs); font-weight: 600; color: var(--sub); }
.stat .v { font-size: var(--t-xl); font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat .n { font-size: var(--t-xs); color: var(--sub); }
.big { font-size: 44px; font-weight: 700; letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px var(--s-2); border-radius: var(--r-full); font-size: var(--t-xs); font-weight: 700; border: 1px solid; white-space: nowrap; }
.tag.ok { color: var(--teal-ink); border-color: #8FD9CF; background: #EAFAF7; }
.tag.no { color: var(--red-ink); border-color: #F2B3B1; background: #FDF0EF; }
.tag.back { color: var(--blue-ink); border-color: #A9D2FD; background: #EEF6FF; }
.tag.plain { color: var(--sub); border-color: var(--hair-strong); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
th { text-align: left; font-size: var(--t-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sub); padding: var(--s-2); border-bottom: 1px solid var(--hair-strong); position: sticky; top: 0; background: var(--card); }
td { padding: 7px var(--s-2); border-bottom: 1px solid var(--hair); }
td.num, th.num { text-align: right; }
tr.back td { background: #F3F9FF; }
.scroll { max-height: 420px; overflow: auto; }
.chart { width: 100%; }
.chart svg { display: block; width: 100%; height: auto; }
.legend { display: flex; flex-wrap: wrap; gap: var(--s-4); font-size: var(--t-xs); color: var(--body); }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

/* ---------- calibration: status and stages ---------- */
.banner { display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-card); border: 1px solid var(--hair); background: var(--card); }
.banner.ok { border-color: #8FD9CF; background: #F2FBF9; }
.banner.no { border-color: #F2B3B1; background: #FEF6F5; }
.banner h2 { font-size: var(--t-xl); font-weight: 700; letter-spacing: -.01em; }
.banner ul { margin: var(--s-1) 0 0; padding-left: 18px; color: var(--body); font-size: var(--t-sm); }
.stages { display: flex; align-items: flex-start; margin: var(--s-4) 0 var(--s-2); }
.stage { position: relative; flex: 1; text-align: center; font-size: var(--t-xs); font-weight: 600; color: var(--sub); }
.stage::before { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: var(--hair); }
.stage::after { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.stage:first-child::before, .stage:first-child::after { display: none; }
.stage .node { position: relative; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; margin: 0 auto var(--s-1); border-radius: 50%; background: var(--card); border: 2px solid var(--hair-strong); transition: border-color .3s, background .3s; }
.stage .node svg { width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.stage.done::after, .stage.active::after { transform: scaleX(1); }
.stage.done .node { background: var(--blue-ink); border-color: var(--blue-ink); }
.stage.done .node svg { opacity: 1; }
.stage.done, .stage.active { color: var(--ink); }
.stage.active .node { border-color: var(--blue); animation: pulse 1.3s ease-out infinite; }
.stage.active .node::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); animation: breathe 1.3s ease-in-out infinite; }
.spark { width: 18px; height: 18px; }
.running .spark { animation: twinkle 1.6s ease-in-out infinite; }
.skeleton { position: relative; overflow: hidden; color: transparent !important; background: var(--soft); border-radius: 6px; }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.75) 50%, transparent 80%); animation: shimmer 1.2s linear infinite; }
.progress { height: 6px; border-radius: 6px; background: var(--soft); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--brand); transition: width .2s linear; }

/* ---------- home ---------- */
.hero { text-align: center; padding: var(--s-6) 0 var(--s-5); }
.hero h1 { font-size: 44px; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; }
.hero p { margin: var(--s-2) auto 0; max-width: 60ch; font-size: var(--t-lg); color: var(--body); }
.mod { display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden; cursor: pointer; transition: border-color .2s, transform .2s var(--ease); }
.mod:hover { border-color: var(--hair-strong); transform: translateY(-2px); }
.mod .pic { display: grid; place-items: center; height: 168px; background: var(--tint); border-bottom: 1px solid var(--hair); }
.mod .pic svg { height: 136px; width: auto; }
.mod .txt { padding: var(--s-4); }
.mod h2 { font-size: var(--t-xl); font-weight: 700; }
.mod p { margin-top: var(--s-1); color: var(--body); }

/* ---------- footer, toast ---------- */
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-5); padding: var(--s-4) var(--s-5); border-top: 1px solid var(--hair); background: var(--card); font-size: var(--t-sm); color: var(--sub); }
.foot svg { height: 22px; width: auto; }
.foot .fund { color: var(--body); font-weight: 600; }
.foot .ver { margin-left: auto; }
#toast { position: fixed; left: 50%; bottom: 76px; transform: translate(-50%, 12px); padding: var(--s-2) var(--s-4); border-radius: var(--r-full); background: var(--ink); color: #fff; font-size: var(--t-sm); font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease); z-index: 40; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- motion ---------- */
.anim .grow { transform-box: fill-box; transform-origin: bottom; animation: grow .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 18ms); }
.anim .growx { transform-box: fill-box; transform-origin: left; animation: growx .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
.anim .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .9s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 60ms); }
.anim .pop { transform-box: fill-box; transform-origin: center; animation: pop .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
.anim .fade { animation: fade .6s ease both; animation-delay: calc(var(--i, 0) * 12ms); }
/* 'backwards' so the entrance does not keep hold of transform, which would block hover effects */
.rise { animation: rise .4s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes sweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes growx { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(0, 126, 248, .45); } 100% { box-shadow: 0 0 0 10px rgba(0, 126, 248, 0); } }
@keyframes breathe { 0%, 100% { transform: scale(.7); } 50% { transform: scale(1.1); } }
@keyframes twinkle { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(90deg) scale(1.25); } }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---------- hover, press and focus: small, quick, the same everywhere ---------- */
.btn { position: relative; overflow: hidden; transition: background .16s, border-color .16s, box-shadow .2s var(--ease), transform .16s var(--ease); }
.btn:hover:not([disabled]) { border-color: var(--sub); box-shadow: 0 4px 12px rgba(11, 18, 23, .09); }
.btn:active:not([disabled]) { transform: translateY(0) scale(.98); box-shadow: none; }
.btn svg { transition: transform .2s var(--ease); }
.btn:hover:not([disabled]) svg { transform: translateX(2px); }
.btn.primary { background: linear-gradient(180deg, #0B6FD6, var(--blue-ink)); }
.btn.primary:hover:not([disabled]) { background: linear-gradient(180deg, #0B6FD6, #00529F); border-color: #00529F; box-shadow: 0 6px 18px rgba(0, 98, 196, .32); }
.btn.primary::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .32), transparent); transform: skewX(-18deg); }
.btn.primary:hover:not([disabled])::after { animation: sheen .7s var(--ease); }
.btn.danger:hover:not([disabled]) { background: #FEF6F5; border-color: var(--red-ink); box-shadow: 0 4px 12px rgba(192, 42, 39, .16); }
.btn.working { color: transparent !important; pointer-events: none; opacity: 1; }
.btn.working svg { visibility: hidden; }
.btn.working::before { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }
.brand svg circle { transition: transform .3s var(--ease); transform-box: fill-box; transform-origin: center; }
.brand:hover svg circle { transform: scale(1.25); }
.brand:hover svg circle:nth-of-type(2) { transition-delay: .05s; } .brand:hover svg circle:nth-of-type(3) { transition-delay: .1s; } .brand:hover svg circle:nth-of-type(4) { transition-delay: .15s; }
.tabs button { transition: color .16s; }
.tabs button:hover:not([aria-selected=true])::after { transform: scaleX(.35); opacity: .45; }
.ic.wash::before { transition: transform .35s var(--ease), opacity .25s; }
.tabs button:hover .ic.wash::before, .card .head:hover .ic.wash::before { transform: scale(1.35) rotate(12deg); opacity: 1; }
.tabs button:hover .ic svg { transform: translateY(-1px); } .ic svg { transition: transform .2s var(--ease); }
.seg button:hover:not([aria-pressed=true]) { background: rgba(255, 255, 255, .7); color: var(--ink); }
.seg button:active { transform: scale(.97); } .seg button { transition: background .16s, color .16s, box-shadow .16s, transform .1s; }
.card { transition: border-color .2s, box-shadow .25s var(--ease); }
.card:hover { border-color: var(--hair-strong); box-shadow: 0 6px 22px rgba(11, 18, 23, .05); }
.mod:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(11, 18, 23, .09); }
.mod .pic svg { transition: transform .45s var(--ease); } .mod:hover .pic svg { transform: scale(1.06) rotate(-1.5deg); }
.mod h2 { transition: color .2s; } .mod:hover h2 { color: var(--blue-ink); }
.mod:active { transform: translateY(-1px) scale(.995); }
.stat { transition: background .2s; } .stat:hover { background: var(--soft); }
tbody tr { transition: background .12s; } tbody tr:hover td { background: var(--tint); } tbody tr.back:hover td { background: #E6F2FF; }
input[type=number], select { transition: border-color .16s, box-shadow .2s; }
input[type=number]:hover:not(:disabled), select:hover { border-color: var(--sub); }
input[type=number]:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: var(--ring); }
input[type=range]::-webkit-slider-thumb { transition: transform .15s var(--ease), box-shadow .15s; }
input[type=range]:hover::-webkit-slider-thumb { transform: scale(1.2); box-shadow: 0 0 0 5px rgba(0, 126, 248, .14); }
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.3); box-shadow: 0 0 0 7px rgba(0, 126, 248, .2); }
.powered { transition: border-color .2s, box-shadow .2s; } .powered:hover { border-color: var(--hair-strong); box-shadow: 0 3px 10px rgba(11, 18, 23, .06); }
.powered svg { transition: transform .4s var(--ease); } .powered:hover svg { transform: scale(1.06); }
.tag { transition: transform .15s var(--ease); } tr:hover .tag { transform: scale(1.05); }
.foot svg { transition: transform .3s var(--ease); } .foot svg:hover { transform: scale(1.04); }

/* ---------- while something is running ---------- */
.bob { animation: bob 1.6s ease-in-out infinite; }
.stage.active::after { background: linear-gradient(90deg, #0070FF, #00F0C0, #0070FF); background-size: 200% 100%; animation: flow 1.1s linear infinite; }
.ping { transform-box: fill-box; transform-origin: center; animation: ping 1.1s ease-out infinite; }
.loading .card { position: relative; overflow: hidden; }
.loading .card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(233, 240, 250, .85) 50%, transparent 70%); animation: shimmer 1s linear infinite; pointer-events: none; }
.skeleton { display: inline-block; }
@keyframes sheen { from { left: -60%; } to { left: 130%; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(6deg); } }
@keyframes flow { from { background-position: 200% 0; } to { background-position: 0 0; } }
@keyframes ping { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(3.2); opacity: 0; } }

/* ---------- one screen, no page scroll (desktop) ---------- */
.top { height: 52px; }
.sweep { top: 52px; }
main { display: flex; flex-direction: column; min-height: 0; padding: var(--s-3) var(--s-4); }
.push { flex: 1; }
.actions { display: flex; align-items: center; gap: var(--s-2); }
.col { display: flex; flex-direction: column; gap: var(--s-3); min-height: 0; min-width: 0; }
.toolbar { margin-bottom: 0; padding: var(--s-2) var(--s-3); gap: var(--s-3) var(--s-4); }
.toolbar .msg { margin: 0; min-height: 0; }
.card { padding: var(--s-3); }
.card .head { margin-bottom: var(--s-2); min-height: 26px; }
.card > h2, .card .head h2 { font-size: 15px; }
.card.fill { display: flex; flex-direction: column; min-height: 0; }
.col > .card.fill { flex: 1; }
.g-side.stretch { align-items: stretch; }
.col > .card:not(.fill) { flex: none; }
.fillh { position: relative; flex: 1; min-height: 0; }
.chart.fillh > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scroll { max-height: none; overflow: auto; }
.prow { padding: 3px 0; grid-template-columns: 124px minmax(0, 1fr) 76px; }
input[type=number], select { height: 30px; } input[type=number] { width: 76px; }
.btn { height: 34px; }
.stat { padding: var(--s-2) var(--s-3); } .stat .v { font-size: 17px; } .stat .v small { font-size: var(--t-xs); font-weight: 500; color: var(--sub); }
.tiles2 { grid-template-columns: 1fr 1fr; gap: var(--s-2); } .tiles3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); }
.big { font-size: 32px; } .mid { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
td { padding: 5px var(--s-2); } th { padding: 6px var(--s-2); }
.g-side { grid-template-columns: 384px minmax(0, 1fr); }
.status { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-4); align-items: center; }
.status .banner, .status .banner.ok, .status .banner.no { border: 0; background: none; padding: 0; }
.status:has(.banner.ok) { border-color: #8FD9CF; background: #F2FBF9; } .status:has(.banner.no) { border-color: #F2B3B1; background: #FEF6F5; }
.status .banner h2 { font-size: 18px; } .stages { margin: var(--s-2) 0 var(--s-1); } #calCount { text-align: center; }
.result { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s-4); }
.sim-charts { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
.sim-charts .tall { grid-row: 1 / 3; }
.barwrap { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 4px; }
.foot { padding: var(--s-2) var(--s-4); } .foot svg { height: 18px; }
.empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--sub); font-size: var(--t-sm); padding: var(--s-4); }
.trow { grid-template-columns: minmax(0, 1fr) auto; } .trow label { display: flex; align-items: center; gap: var(--s-2); color: var(--ink); }
@media (min-width: 1101px) and (max-height: 800px) { .status .banner p, #calCount { display: none; } .stages { margin: 2px 0 0; } .card { padding: var(--s-2) var(--s-3); } td { padding: 3px var(--s-2); } .stat { padding: 4px 10px; } .stat .n { display: none; } .big { font-size: 26px; } .prow { padding: 1px 0; } }
@media (min-width: 1101px) and (min-height: 620px) {
    html, body { height: 100vh; overflow: hidden; }
    main { flex: 1; }
    .view { flex: 1; min-height: 0; }
    .view.fit:not([hidden]) { display: flex; flex-direction: column; gap: var(--s-3); }
    .stretch { flex: 1; min-height: 0; }
    .g-2.stretch, .g-side.stretch { grid-template-rows: minmax(0, 1fr); }
    .hero { padding: var(--s-5) 0 var(--s-4); }
}
@media (max-width: 1100px), (max-height: 619px) {
    .view.fit:not([hidden]) { display: flex; flex-direction: column; gap: var(--s-3); }
    .chart.fillh { min-height: 300px; } .scroll.fillh { max-height: 360px; }
    .status, .result, .sim-charts { grid-template-columns: minmax(0, 1fr); } .sim-charts { grid-template-rows: none; } .sim-charts .tall { grid-row: auto; }
}

/* ---------- landing page: fills the screen; cards animate inside, never move ---------- */
@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.home:not([hidden]) { position: relative; isolation: isolate; display: flex; flex-direction: column; gap: var(--s-4); }
.home .hero { padding: var(--s-4) 0 0; } .home .hero h1 { font-size: 40px; } .home .hero p { font-size: 15px; }
.waves { position: absolute; left: 50%; bottom: -16px; width: 100vw; height: 48%; transform: translateX(-50%); z-index: -1; pointer-events: none; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 55%); mask-image: linear-gradient(to bottom, transparent, #000 55%); }
.waves path { vector-effect: non-scaling-stroke; }
.waves .drift { animation: drift 46s linear infinite; }
.mods { flex: 1; min-height: 0; max-height: 440px; }
.mod, .mod:hover, .mod:active { transform: none; }
.mod { position: relative; }
.mod::before { content: ""; position: absolute; inset: -1.5px; border-radius: inherit; padding: 2px; background: conic-gradient(from var(--ang), rgba(0,112,255,0) 0deg, #0070FF 80deg, #00F0C0 150deg, rgba(0,240,192,0) 230deg, rgba(0,112,255,0) 360deg); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .35s; pointer-events: none; z-index: 2; }
.mod:hover::before, .mod:focus-visible::before { opacity: 1; animation: ang 2.6s linear infinite; }
.mod:hover { box-shadow: 0 10px 34px rgba(0, 98, 196, .12); }
.mod .pic { position: relative; flex: 1; min-height: 110px; height: auto; overflow: hidden; }
.mod .pic svg { height: min(150px, 82%); transition: none; } .mod:hover .pic svg { transform: none; }
.mod .pic::after { content: ""; position: absolute; inset: 0; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(0, 126, 248, .16), transparent 62%); opacity: 0; transition: opacity .35s; pointer-events: none; }
.mod:hover .pic::after { opacity: 1; }
.mod .txt { position: relative; }
.mod h2 { position: relative; display: inline-block; }
.mod h2::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; border-radius: 3px; background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.mod:hover h2::after { transform: scaleX(1); }
.mod .go { position: absolute; right: var(--s-4); top: var(--s-4); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--blue-ink); opacity: 0; transform: translateX(-8px) scale(.8); transition: opacity .3s, transform .4s var(--ease); }
.mod .go svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.mod:hover .go { opacity: 1; transform: none; }
.a-star, .a-pop, .a-hit, .a-ripple, .a-ring, .a-wash, .a-bar { transform-box: fill-box; transform-origin: center; }
.a-bar { transform-origin: bottom; } .a-ripple { opacity: 0; }
/* on hover the picture comes alive (chosen 2026-11-23) */
.fx-alive:hover .a-draw { stroke-dasharray: 1; animation: a-draw 1.1s var(--ease) both; }
.fx-alive:hover .a-pop { animation: a-pop .5s var(--ease) both; animation-delay: calc(.2s + var(--d) * .3s); }
.fx-alive:hover .a-star { animation: a-twinkle 1.5s ease-in-out infinite; } .fx-alive:hover .a-star.s2 { animation-delay: .4s; }
.fx-alive:hover .a-wash { animation: a-wash 2.2s ease-in-out infinite alternate; }
.fx-alive:hover .a-arrow { animation: a-fly .55s cubic-bezier(.5, 0, .9, .4) both; }
.fx-alive:hover .a-hit { animation: a-hit .5s var(--ease) .5s both; }
.fx-alive:hover .a-ripple { animation: a-ripple 1.3s ease-out .5s infinite; }
.fx-alive:hover .a-ring { animation: a-ring .6s var(--ease) .5s both; } .fx-alive:hover .a-ring.r2 { animation-delay: .56s; }
.fx-alive:hover .a-bar { animation: a-bar .7s var(--ease) both; animation-delay: calc(var(--d) * .11s); }
@keyframes ang { to { --ang: 360deg; } }
@keyframes drift { to { transform: translateX(-800px); } }
@keyframes a-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes a-pop { 0% { transform: scale(0); } 70% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes a-twinkle { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(90deg) scale(1.45); } }
@keyframes a-wash { from { transform: scale(1); } to { transform: scale(1.2) translate(3px, -2px); } }
@keyframes a-fly { from { transform: translate(34px, -34px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes a-hit { 0% { transform: scale(1); } 45% { transform: scale(1.7); } 100% { transform: scale(1); } }
@keyframes a-ripple { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(5); opacity: 0; } }
@keyframes a-ring { 0% { transform: scale(1); } 45% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes a-bar { 0% { transform: scaleY(.12); } 70% { transform: scaleY(1.06); } 100% { transform: scaleY(1); } }
@media (max-width: 1100px), (max-height: 619px) { .mods { max-height: none; } .mod .pic { min-height: 150px; } .waves { height: 300px; } }

/* ---------- settings icons, people box, progress, partner logo ---------- */
.lbl, .field label { display: inline-flex; align-items: center; gap: 6px; }
.ic.sm { width: 20px; height: 20px; } .ic.sm svg { width: 16px; height: 16px; stroke-width: 2.3; } .ic.sm.wash::before { width: 14px; height: 12px; left: 5px; top: 6px; }
.field:hover .ic.wash::before { transform: scale(1.35) rotate(12deg); opacity: 1; }
.gl { width: 20px; height: 12px; margin-right: 6px; vertical-align: -1px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; opacity: .75; }
.seg button { display: inline-flex; align-items: center; } .seg button[aria-pressed=true] .gl { stroke: var(--blue-ink); opacity: 1; }
input[type=text].wide { width: 120px; height: 30px; padding: 0 var(--s-2); border: 1px solid var(--hair-strong); border-radius: var(--r-control); background: var(--card); font-size: var(--t-md); font-variant-numeric: tabular-nums; transition: border-color .16s, box-shadow .2s; }
input[type=text].wide:hover { border-color: var(--sub); } input[type=text].wide:focus { outline: none; border-color: var(--blue); box-shadow: var(--ring); }
.progress > i { background: linear-gradient(90deg, var(--blue) 0%, var(--ink) 85%); }
.foot .sep { width: 1px; height: 18px; background: var(--hair-strong); } .foot img.partner { height: 16px; width: auto; display: block; }
/* ---------- landing page tuning ---------- */
.home:not([hidden]) { justify-content: flex-start; gap: var(--s-5); }
.home .hero { padding-top: var(--s-5); }
.mods { max-height: min(72vh, 760px); }
.mod .pic { border-radius: var(--r-control); border-bottom: 0; } .mod .pic svg { height: min(230px, 72%); }
.waves { height: 62%; }
/* ---------- chart tooltips ---------- */
#tip { position: fixed; left: 0; top: 0; z-index: 50; width: 276px; padding: 12px 12px 12px; background: rgba(255, 255, 255, .97); border: 1px solid var(--hair-strong); border-radius: 12px; box-shadow: 0 16px 40px rgba(11, 18, 23, .16); pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .16s, visibility .16s; overflow: hidden; }
#tip::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--brand); }
#tip.show { opacity: 1; visibility: visible; }
.tip-t { font-size: 14px; font-weight: 700; letter-spacing: -.005em; } .tip-s { font-size: var(--t-xs); color: var(--sub); }
.tip-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); margin-top: var(--s-2); padding-top: var(--s-2); border-top: 1px solid var(--hair); }
.tip-m { text-align: center; } .tip-m svg { display: block; width: 46px; height: 46px; margin: 0 auto 2px; }
.tip-m b { display: block; font-size: 13px; font-variant-numeric: tabular-nums; } .tip-m span { display: block; font-size: 11px; line-height: 1.25; color: var(--sub); }
#tip.show .arc { animation: arc .6s var(--ease) both; } #tip.show .tbar { transform-box: fill-box; transform-origin: bottom; animation: grow .45s var(--ease) both; } #tip.show .tline { stroke-dasharray: 1; animation: draw .6s var(--ease) both; }
@keyframes arc { from { stroke-dasharray: 0 100; } }
.chart [data-tip] { cursor: crosshair; transition: opacity .15s; }
svg.dim:has([data-tip]:hover) [data-tip]:not(:hover) { opacity: .4; }
.col-hit { fill: transparent; } .col-hit:hover { fill: rgba(0, 126, 248, .08); }

/* ---------- text one step larger everywhere; wider canvas on large screens ---------- */
main { max-width: 1760px; }
.card > h2, .card .head h2 { font-size: 16.5px; }
.stat .v { font-size: 18.5px; } .big { font-size: 34px; } .mid { font-size: 20.5px; }
.home .hero p { font-size: 16.5px; } .home .hero h1 { font-size: 42px; }
.tip-t { font-size: 15px; } .tip-m b { font-size: 14px; } .tip-m span { font-size: 12px; } #tip { width: 292px; }
input[type=number], select, input[type=text].wide { height: 32px; font-size: var(--t-md); } .btn { height: 36px; } .seg button { height: 30px; }
.g-side { grid-template-columns: 404px minmax(0, 1fr); }
.prow { grid-template-columns: 136px minmax(0, 1fr) 78px; }
.toolbar { gap: var(--s-2) var(--s-3); } .field { gap: 6px; }
.eyebrow { font-size: 12.5px; } .tag { font-size: 12.5px; } th { font-size: 12px; }
.legend { font-size: var(--t-xs); gap: var(--s-3); }

.seg button { padding: 0 10px; } .toolbar input[type=number] { width: 64px; }

/* ---------- the OptX logo, the same one everywhere ---------- */
.logo-optx { height: 38px; width: auto; flex: none; margin-right: var(--s-2); }
.powered.in-card { display: inline-flex; margin: var(--s-3) 0 0; background: var(--card); }
.mod .txt { min-height: 178px; }
.spark { width: 24px; height: 26px; } .running .spark { animation: bob 1.4s ease-in-out infinite; }

/* ---------- result table visuals ---------- */
.mname { display: inline-flex; align-items: center; gap: 6px; }
.trk { display: block; width: 120px; height: 18px; } .rng { display: block; width: 100%; height: 10px; margin: 3px 0 1px; }
.heat { display: inline-block; min-width: 66px; padding: 1px 8px; border-radius: 6px; font-weight: 700; text-align: right; }
.heat.h1 { background: #BFEFE6; color: #00594F; } .heat.h2 { background: #E3F7F3; color: var(--teal-ink); } .heat.h3 { background: #FDECEB; color: var(--red-ink); } .heat.h4 { background: #F8C9C6; color: #8E1B19; }
td small { display: block; font-size: 12px; color: var(--sub); } tr.quiet td { color: var(--sub); }
#calChartCard .head .seg { margin-left: var(--s-2); }

/* ---------- layout fixes after the larger text ---------- */
.prow.trow { grid-template-columns: minmax(0, 1fr) auto; } .trow label { white-space: nowrap; }
.result { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); } .mname, #calTable .hint { white-space: nowrap; } .trk { width: 104px; }
#calChartCard .head { flex-wrap: nowrap; } #calConvNote { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#calParamOut .stat .n { font-size: 12px; }
td small.inl { display: inline; margin-right: var(--s-2); white-space: nowrap; } .trk { width: 92px; } #calParamOut .stat { padding: 6px 10px; }
/* ---------- the arrow beside Growth and Decay opens the explanation card ---------- */
.lbl.more { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px; margin: -3px -6px; border: 0; border-radius: 6px; background: none; cursor: pointer; font: inherit; font-size: var(--t-sm); font-weight: 600; color: var(--body); transition: background .15s, color .15s; }
.lbl.more u { text-decoration: underline dotted var(--hair-strong); text-underline-offset: 4px; transition: text-decoration-color .15s; }
.lbl.more .ar { width: 14px; height: 14px; margin-left: -2px; fill: none; stroke: var(--blue-ink); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--ease); }
.lbl.more:hover { background: var(--tint); color: var(--ink); } .lbl.more:hover u { text-decoration-color: var(--blue); } .lbl.more:hover .ar { transform: translate(2px, -2px); }
/* ---------- calibrated parameter tiles: icon on the front, a comment on the back ---------- */
#calParamOut { perspective: 900px; } #calParamOut .stat { min-height: 96px; }
.flip { position: relative; height: 96px; padding: 0; border: 0; border-radius: var(--r-control); background: none; cursor: pointer; text-align: left; font: inherit; color: inherit; transform-style: preserve-3d; transition: transform .55s var(--ease); }
.flip.flipped { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 7px 10px; border-radius: var(--r-control); overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.face.front { background: var(--tint); transition: background .2s; } .flip:hover .face.front { background: var(--soft); }
.face.back { transform: rotateY(180deg); justify-content: flex-start; gap: 2px; padding: 7px 8px; background: var(--ink); color: #fff; font-size: 11.5px; line-height: 1.25; } .face.back b { font-weight: 700; } .face.back span { color: #C9D6E4; }
.flip .k { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: var(--t-xs); font-weight: 600; color: var(--sub); white-space: nowrap; } .flip .kn { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.flip .v { font-size: 18.5px; font-weight: 700; font-variant-numeric: tabular-nums; } .flip .n { font-size: 12px; color: var(--sub); } .flip .n.edge { color: var(--red-ink); font-weight: 600; }
.flip .turn { position: absolute; right: 7px; bottom: 7px; width: 13px; height: 13px; fill: none; stroke: var(--sub); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: .5; transition: transform .35s var(--ease), opacity .2s; }
.flip:hover .turn { opacity: 1; transform: rotate(60deg); }
/* ---------- a faint drawing of the curve behind the Model boxes ---------- */
.deco-card { position: relative; overflow: hidden; } .deco-card > :not(.deco) { position: relative; z-index: 1; }
.deco { position: absolute; right: 0; bottom: 0; width: 64%; height: 82%; z-index: 0; pointer-events: none; -webkit-mask-image: linear-gradient(100deg, transparent 4%, #000 62%); mask-image: linear-gradient(100deg, transparent 4%, #000 62%); }
.deco path { transition: d .25s var(--ease); }
.deco-card .stat { background: rgba(244, 247, 252, .82); } .deco-card input[type=number] { background: rgba(255, 255, 255, .92); }

/* ---------- targets in order of importance ---------- */
.prow.trow { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: var(--s-2); }
.rank { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rank.sm { width: 17px; height: 17px; font-size: 11px; margin-left: 4px; vertical-align: 1px; }
/* the grip: drag a target to change the order */
.grip { display: grid; place-items: center; width: 26px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: none; color: #9AA6B4; cursor: grab; touch-action: none; transition: background .15s, color .15s; }
.grip svg { width: 18px; height: 18px; fill: currentColor; } .grip:hover, .grip:focus-visible { background: var(--tint); color: var(--ink); }
.trow { border-radius: 8px; } .trow.dragging { position: relative; z-index: 2; background: #fff; box-shadow: 0 8px 22px rgba(11, 18, 23, .14), 0 0 0 1px var(--hair-strong); } .trow.dragging .grip { color: var(--blue); cursor: grabbing; }
body.grabbing, body.grabbing * { cursor: grabbing !important; user-select: none; }
/* the first-visit tip beside the list */
.has-tip { position: relative; }
.coach { position: absolute; left: calc(100% + 14px); top: 46px; z-index: 40; width: 268px; padding: 14px 16px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: 0 14px 36px rgba(11, 18, 23, .28); font-size: var(--t-sm); line-height: 1.4; animation: coachIn .35s var(--ease) both; }
.coach[hidden] { display: none; } .coach::before { content: ''; position: absolute; left: -6px; top: 22px; width: 12px; height: 12px; background: var(--ink); transform: rotate(45deg); border-radius: 2px; }
.coach strong { display: block; font-size: var(--t-md); font-weight: 700; } .coach p { margin: 4px 0 12px; color: #C9D6E4; } .coach .btn { float: right; }
@keyframes coachIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@media (max-width: 1100px) { .coach { left: 12px; right: 12px; top: calc(100% + 10px); width: auto; } .coach::before { left: 28px; top: -6px; } }
@media (prefers-reduced-motion: reduce) { .coach { animation: none; } }
/* ---------- Model toolbar back on one row ---------- */
.seg button { padding: 0 8px; } .gl { width: 18px; margin-right: 4px; } .toolbar input[type=number] { width: 58px; } .lbl.more { gap: 4px; } .toolbar { gap: var(--s-2) 10px; }

/* ---------- a result whose inputs have changed since it was run ---------- */
#calResult.stale table tbody, #calResult.stale #calParamOut { opacity: .45; transition: opacity .2s; } #calResult.stale #calVerified { display: none; } #calStale { white-space: nowrap; }

/* ---------- result table and tiles side by side without touching ---------- */
.result { grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); } #calTable .trk { width: 84px; } .flip .rng { flex: none; } #calResult .head { flex-wrap: nowrap; } #calResult .head h2 { white-space: nowrap; }

/* ---------- a gentle note (not an error) ---------- */
.soft { display: flex; align-items: flex-start; gap: 8px; margin: var(--s-2) 0 0; padding: 8px 10px; border-radius: var(--r-control); background: #EEF6FF; color: var(--blue-ink); font-size: var(--t-xs); line-height: 1.35; }
.soft[hidden] { display: none; } .soft svg { flex: none; width: 16px; height: 16px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.soft.fade { animation: softIn .45s var(--ease) both; } @keyframes softIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- the card behind "Powered by OptX" ---------- */
button.powered { background: var(--card); cursor: pointer; font: inherit; font-size: var(--t-xs); color: var(--sub); } button.powered[aria-expanded=true] { border-color: var(--blue); box-shadow: var(--ring); }
.about { position: fixed; z-index: 60; width: 312px; max-width: calc(100vw - 16px); padding: 18px 18px 14px; border: 1px solid var(--hair); border-radius: var(--r-card); background: var(--card); box-shadow: 0 18px 44px rgba(11, 18, 23, .16); animation: aboutIn .22s var(--ease) both; }
.about[hidden] { display: none; } .about .logo { height: 34px; width: auto; display: block; }
.about .lead { margin: 12px 0 6px; font-size: var(--t-lg); font-weight: 700; color: var(--ink); line-height: 1.3; } .about p { margin: 0; font-size: var(--t-sm); color: var(--body); line-height: 1.45; }
.about .by { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hair); font-size: var(--t-xs); color: var(--sub); } .about .by svg { height: 18px; width: auto; } .about .by a { margin-left: auto; color: var(--blue-ink); font-weight: 600; text-decoration: none; } .about .by a:hover { text-decoration: underline; }
@keyframes aboutIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- who is signed in, and sign out ---------- */
.acct { display: flex; align-items: center; gap: 4px; margin-left: var(--s-2); padding: 3px 3px 3px 12px; border: 1px solid var(--hair); border-radius: var(--r-full); font-size: var(--t-xs); color: var(--body); } .acct[hidden] { display: none; }
.acct .who { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.acct .out { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--sub); cursor: pointer; transition: background .15s, color .15s; } .acct .out:hover { background: var(--tint); color: var(--ink); }
.acct .out svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- the short card behind a setting's name ---------- */
.about.info { width: 320px; padding: 14px 16px; } .about.info .ihead { display: flex; align-items: center; gap: 8px; font-size: var(--t-lg); color: var(--ink); }
.about.info p { margin: 8px 0 0; } .about.info .now { padding: 8px 10px; border-radius: var(--r-control); background: var(--tint); color: var(--ink); }
.about.info .now b { display: inline-block; margin-right: 8px; padding: 0 7px; border-radius: var(--r-full); background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; vertical-align: 1px; }
.lbl.more[aria-expanded=true] { background: var(--tint); color: var(--ink); } .lbl.more[aria-expanded=true] u { text-decoration-color: var(--blue); }
/* ---------- a faint drawing behind the Simulation summary cards ---------- */
.deco.fit { width: 58%; height: 86%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%); mask-image: linear-gradient(90deg, transparent, #000 45%); }
.deco.full { left: var(--s-3); right: var(--s-3); bottom: 0; width: auto; height: 64%; -webkit-mask-image: none; mask-image: none; }
.corner-wash { background: radial-gradient(280px 150px at 100% 100%, rgba(0, 126, 248, .07), transparent 72%), radial-gradient(200px 120px at 0 0, rgba(0, 217, 192, .06), transparent 70%), var(--card); }

/* ---------- Export menu ---------- */
.menu-wrap { position: relative; display: inline-flex; }
.btn.icon { gap: 6px; padding: 0 12px; } .btn.icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn.icon[aria-expanded=true] { border-color: var(--blue); box-shadow: var(--ring); }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 45; min-width: 268px; padding: 6px; border: 1px solid var(--hair); border-radius: var(--r-card); background: var(--card); box-shadow: 0 16px 40px rgba(11, 18, 23, .16); animation: aboutIn .18s var(--ease) both; }
.menu[hidden] { display: none; }
.menu button { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: inherit; font-size: var(--t-sm); text-align: left; cursor: pointer; white-space: nowrap; }
.menu button:hover, .menu button:focus-visible { background: var(--tint); outline: none; }
.menu small { padding: 1px 7px; border-radius: var(--r-full); background: var(--soft); color: var(--blue-ink); font-size: 11px; font-weight: 700; letter-spacing: .03em; }
@media (max-width: 1500px) { .btn.icon .lab { display: none; } .btn.icon { padding: 0 10px; } }
/* ---------- Help ---------- */
.helpbtn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 9px; border: 1px solid var(--hair); border-radius: var(--r-full); background: var(--card); color: var(--body); font: inherit; font-size: var(--t-xs); font-weight: 600; cursor: pointer; transition: border-color .2s, background .15s; }
.helpbtn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; } .helpbtn:hover { background: var(--tint); border-color: var(--hair-strong); } .helpbtn[aria-expanded=true] { border-color: var(--blue); box-shadow: var(--ring); }
.helpbtn + .powered { margin-left: var(--s-2); }
.help { position: fixed; top: 0; right: 0; bottom: 0; z-index: 70; display: flex; flex-direction: column; width: 440px; max-width: 100vw; border-left: 1px solid var(--hair); background: var(--card); box-shadow: -18px 0 48px rgba(11, 18, 23, .14); animation: helpIn .26s var(--ease) both; }
.help[hidden] { display: none; } @keyframes helpIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.hhead { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 10px; font-size: var(--t-xl); }
.hx { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; cursor: pointer; } .hx:hover { background: var(--tint); } .hx svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
#helpNav { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 12px; border-bottom: 1px solid var(--hair); }
#helpNav button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px 0 8px; border: 1px solid var(--hair); border-radius: var(--r-full); background: var(--card); color: var(--body); font: inherit; font-size: var(--t-xs); font-weight: 600; cursor: pointer; transition: background .15s; }
#helpNav button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; } #helpNav button:hover { background: var(--tint); } #helpNav button[aria-pressed=true] { border-color: var(--ink); background: var(--ink); color: #fff; }
.hbody { flex: 1; overflow-y: auto; padding: 16px 18px 28px; } .hbody h3 { margin: 0; font-size: 24px; letter-spacing: -.01em; } .hbody .lead { margin: 4px 0 6px; font-size: var(--t-lg); color: var(--body); }
.hbody h4 { margin: 18px 0 4px; font-size: var(--t-md); } .hbody p { margin: 0; font-size: var(--t-md); line-height: 1.5; color: var(--body); }
@media (prefers-reduced-motion: reduce) { .help, .menu { animation: none; } }
/* ---------- the printed report (Export, Print or save as PDF) ---------- */
#printReport { display: none; }
@media print {
    @page { size: A4; margin: 14mm; }
    html, body { height: auto !important; min-height: 0 !important; overflow: visible !important; background: #fff !important; display: block !important; }
    body > *:not(#printReport):not(svg) { display: none !important; }      /* the sprite stays: the logo in the report is drawn from it */
    #printReport { display: block; color: #0B1217; font-size: 10.5pt; line-height: 1.4; }
    #printReport .marks { display: flex; align-items: center; gap: 9pt; margin-bottom: 6pt; } #printReport .marks svg { height: 15pt; width: auto; } #printReport .marks i { width: .6pt; height: 15pt; background: #B9C6D6; } #printReport .marks b { font-size: 9.5pt; font-weight: 600; } #printReport .marks span { margin-left: auto; font-size: 9pt; color: #586470; }
    #printReport header { display: flex; justify-content: space-between; align-items: flex-end; gap: 12pt; padding-bottom: 6pt; margin-bottom: 4pt; border-bottom: 1.5pt solid #0B1217; }
    #printReport h1 { margin: 0; font-size: 19pt; letter-spacing: -.01em; } #printReport header p { margin: 2pt 0 0; } #printReport .stamp { font-size: 9pt; color: #586470; white-space: nowrap; }
    #printReport h2 { margin: 9pt 0 3pt; font-size: 12.5pt; } #printReport section { break-inside: avoid; }
    #printReport table { display: table; border-collapse: collapse; } #printReport thead { display: table-header-group; position: static; } #printReport tbody { display: table-row-group; } #printReport tr { display: table-row; }
    #printReport th, #printReport td { display: table-cell; position: static; text-transform: none; letter-spacing: 0; color: inherit; font-size: inherit; background: none; white-space: normal; }
    #printReport table.grid { width: 100%; font-size: 9.5pt; }
    #printReport table.kv th { padding: 1pt 14pt 1pt 0; text-align: left; font-weight: 600; vertical-align: top; } #printReport table.kv td { padding: 1pt 0; }
    #printReport table.grid th, #printReport table.grid td { padding: 2.5pt 6pt; border-bottom: .5pt solid #B9C6D6; text-align: left; } #printReport table.grid th { border-bottom: 1pt solid #0B1217; }
    #printReport .note { margin: 5pt 0 0; font-size: 9.5pt; color: #3D4852; } #printReport .figs { display: flex; gap: 10pt; } #printReport .figs svg { flex: 1; min-width: 0; height: auto; max-height: 92mm; }
    #printReport footer { margin-top: 8pt; padding-top: 4pt; border-top: .5pt solid #B9C6D6; font-size: 9pt; color: #586470; }
}

/* ---------- sign in, and the files that need an account ---------- */
a.signin { margin-left: var(--s-2); text-decoration: none; padding: 0 14px; } a.signin[hidden] { display: none; }
.menu button .lock { display: none; width: 13px; height: 13px; margin-left: -8px; fill: none; stroke: var(--sub); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
body.anon .menu button.gated .lock { display: block; } .menu button.gated small { margin-left: auto; }
.about.need { width: 384px; padding: 16px; } .about.need .btn { white-space: nowrap; padding: 0 14px; } .about.need .ihead { display: flex; align-items: center; gap: 8px; font-size: var(--t-lg); color: var(--ink); } .about.need p { margin: 8px 0 0; }
.about.need .fine { font-size: var(--t-xs); color: var(--sub); } .about.need .row { margin-top: 14px; gap: 8px; flex-wrap: nowrap; } .about.need .btn { height: 38px; }

/* ---------- the link to the API pages, beside the three tabs ---------- */
.toplink { display: flex; align-items: center; gap: var(--s-2); height: 100%; padding: 0 var(--s-4); text-decoration: none; font-size: var(--t-lg); font-weight: 600; color: var(--sub); transition: color .16s; } .toplink[hidden] { display: none; }
.toplink:hover { color: var(--ink); } .toplink:hover .ic.wash::before { transform: scale(1.35) rotate(12deg); opacity: 1; } .toplink:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

/* ---------- function cards ---------- */
.fncard { position: fixed; z-index: 45; width: 452px; max-width: calc(100vw - 16px); overflow: auto; padding: 14px 16px 14px; background: #fff; border: 1px solid var(--hair-strong); border-radius: 14px; box-shadow: 0 24px 64px rgba(11, 18, 23, .22); }
.fncard::before { content: ""; position: sticky; display: block; top: -14px; height: 3px; margin: -14px -16px 11px; background: var(--brand); }
.fncard.in { animation: cardin .28s var(--ease) both; }
.fn-top { display: flex; align-items: center; gap: var(--s-3); } .fn-dots { display: flex; gap: 5px; margin-left: auto; }
.fn-dot { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 0; background: var(--hair-strong); cursor: pointer; transition: transform .15s, background .15s; } .fn-dot.d { border-radius: 2px; }
.fn-dot.on { background: var(--blue-ink); transform: scale(1.25); } .fn-dot:hover { background: var(--blue); }
.fn-x { width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--tint); font-size: 18px; line-height: 1; cursor: pointer; transition: background .15s; } .fn-x:hover { background: var(--soft); }
.fn-nav { display: flex; align-items: center; gap: var(--s-2); margin: var(--s-2) 0 2px; } .fn-nav h3 { font-size: 21px; letter-spacing: -.01em; }
.fn-arrow { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--hair-strong); background: #fff; cursor: pointer; transition: background .15s, border-color .15s; }
.fn-arrow:hover { background: var(--tint); border-color: var(--sub); } .fn-arrow svg { width: 16px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.fn-what { color: var(--body); margin-bottom: var(--s-2); }
.eq { margin: var(--s-2) 0 2px; padding: var(--s-2) var(--s-3); background: var(--tint); border-radius: var(--r-control); font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 15.5px; line-height: 1.7; overflow-x: auto; white-space: nowrap; }
.eq sub, .eq sup { font-size: .72em; } .fn-note { margin-bottom: var(--s-2); }
.fn-h { margin-top: var(--s-3); padding-top: var(--s-2); border-top: 1px solid var(--hair); font-weight: 700; } .fn-h .hint { display: block; font-weight: 400; }
.fn-row { display: grid; grid-template-columns: minmax(0, 1fr) 168px; gap: var(--s-3); align-items: center; padding: 7px 0; border-bottom: 1px solid var(--hair); }
.fn-row p { font-size: var(--t-sm); color: var(--body); } .fn-imp { text-align: right; } .fn-imp b { display: block; font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
.imp { display: block; width: 160px; height: 18px; margin-left: auto; }
.fn-foot { display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-3); }
@keyframes cardin { from { opacity: 0; transform: translateY(-8px) scale(.98); } }

/* ---------- landing page: smaller boxes, larger text (MD, 2026-11-23) ---------- */
.home:not([hidden]) { justify-content: center; gap: var(--s-6); }
.home .hero { padding-top: 0; } .home .hero h1 { font-size: 48px; }
.home .hero p { font-size: 20px; line-height: 1.5; max-width: 64ch; color: var(--body); }
.mods { width: 100%; max-width: 1160px; margin: 0 auto; flex: 0 1 auto; max-height: none; gap: var(--s-5); }
.mod .pic { flex: none; height: clamp(150px, 22vh, 200px); min-height: 0; } .mod .pic svg { height: 78%; }
.mod .txt { min-height: 196px; padding: var(--s-4); }
.mod h2 { font-size: 25px; } .mod p { font-size: 17.5px; line-height: 1.45; margin-top: var(--s-2); color: var(--body); }
.powered.in-card { font-size: 14px; } .powered.in-card svg { height: 22px; }
.mod .go { top: var(--s-4); }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) { .g-2, .g-side { grid-template-columns: minmax(0, 1fr); } .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
    main { padding: var(--s-4); } .top { gap: var(--s-2); padding: 0 var(--s-3); height: auto; flex-wrap: wrap; } .tabs { order: 3; width: 100%; height: 44px; }
    .tabs button { flex: 1; justify-content: center; padding: 0 var(--s-2); font-size: var(--t-md); } .sweep { top: 0; }
    .g-3, .g-4 { grid-template-columns: minmax(0, 1fr); } .hero h1 { font-size: 30px; } #logTable th:nth-child(5), #logTable td:nth-child(5) { display: none; } .toolbar { gap: var(--s-3); } .prow { grid-template-columns: 104px minmax(0, 1fr) 76px; } .foot .ver { margin-left: 0; }
}

/* ---------- pictures: the cards behind the arrows, and the Help panel ---------- */
svg.fig { display: block; width: 100%; height: auto; }
.about.info .ifig { margin: 10px 0 2px; border-radius: 10px; background: var(--tint); overflow: hidden; }
.tlab { display: flex; align-items: center; gap: var(--s-2); min-width: 0; white-space: nowrap; } .tlab .lbl.more { margin: 0 -4px; color: var(--ink); font-weight: 500; }
#calParams .lbl.more { margin: -3px -6px; font-weight: 500; white-space: nowrap; } #calParams .lbl.more b { min-width: 34px; color: var(--ink); font-weight: 700; text-align: left; }
.menu { min-width: 304px; } .menu button { justify-content: flex-start; gap: 10px; } .menu button .ic { flex: none; } .menu button small { margin-left: auto; } .menu button .lock { margin-left: -4px; }
/* The Help panel is compact: small type, parts that open one at a time, small pictures. */
.help { width: 400px; } .hhead { padding: 10px 16px 8px; font-size: var(--t-lg); }
#helpNav { gap: 5px; padding: 0 16px 10px; } #helpNav button { height: 27px; padding: 0 9px 0 7px; font-size: 12.5px; } #helpNav button svg { width: 14px; height: 14px; }
.hbody { padding: 12px 16px 20px; } .hbody h3 { font-size: 18px; }
.hhero { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; } .hhero .ic.lg { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--tint); } .hhero .ic.lg svg { width: 24px; height: 24px; } .hhero .ic.lg.wash::before { left: 8px; top: 11px; width: 20px; height: 17px; }
.hbody .hhero .lead { margin: 1px 0 0; font-size: 13px; line-height: 1.35; }
.hpart { margin-top: 6px; border: 1px solid var(--hair); border-radius: 10px; background: var(--card); overflow: hidden; transition: border-color .15s; } .hpart[open] { border-color: var(--hair-strong); }
.hpart > summary { display: flex; align-items: center; gap: 8px; padding: 8px 10px; color: var(--ink); font-size: 13.5px; font-weight: 700; cursor: pointer; list-style: none; transition: background .15s; } .hpart > summary::-webkit-details-marker { display: none; }
.hpart > summary:hover, .hpart[open] > summary { background: var(--tint); } .hpart > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.hpart > summary i { display: grid; place-items: center; flex: none; width: 19px; height: 19px; border-radius: 50%; background: var(--ink); color: #fff; font-style: normal; font-size: 11px; font-weight: 700; }
.hpart > summary::after { content: ""; width: 7px; height: 7px; margin: -3px 4px 0 auto; border-right: 2px solid var(--sub); border-bottom: 2px solid var(--sub); transform: rotate(45deg); transition: transform .2s var(--ease); } .hpart[open] > summary::after { margin-top: 4px; transform: rotate(225deg); }
.hin { padding: 10px; }
.hlist { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; color: var(--body); font-size: 13px; line-height: 1.45; } .hlist li { position: relative; padding-left: 13px; } .hlist li::before { content: ""; position: absolute; left: 1px; top: .6em; width: 5px; height: 5px; border-radius: 50%; background: var(--blue); } .hlist b { color: var(--ink); font-weight: 600; }
.hfig { margin: 0 0 8px; padding: 8px; border-radius: 8px; background: var(--tint); } .hfig svg.fig { max-width: 272px; margin: 0 auto; }
.hkey { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px 12px; margin-top: 5px; font-size: 12px; font-weight: 600; color: var(--body); }
.hkey i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; vertical-align: -1px; } .hkey i.t { background: var(--teal); } .hkey i.r { background: #fff; box-shadow: inset 0 0 0 2.5px var(--red); } .hkey i.d { width: 18px; height: 0; border-radius: 0; border-top: 3px dotted var(--blue); vertical-align: 3px; }
.hchips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; } .hchips + .hchips, .hchips + .hsame { margin-top: 8px; }
.hchip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px 0 6px; border: 1px solid var(--hair-strong); border-radius: 8px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 600; white-space: nowrap; }
.hchip svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; } .hchip .ar { width: 13px; height: 13px; margin-left: -2px; stroke: var(--blue-ink); stroke-width: 2.8; } .hchip.dark { border-color: var(--ink); background: var(--ink); color: #fff; }
.hthen { position: relative; flex: none; width: 18px; height: 2px; margin: 0 3px; border-radius: 2px; background: var(--ink); } .hthen::after { content: ""; position: absolute; right: -1px; top: -3.5px; width: 7px; height: 7px; border-top: 2px solid var(--ink); border-right: 2px solid var(--ink); transform: rotate(45deg); }
.hrows { display: grid; gap: 6px; } .hrow { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 9px; border: 1px solid var(--hair); border-radius: 8px; background: #fff; color: var(--ink); font-size: 12.5px; }
.hrow .rk { display: grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; } .hrow b { margin-left: auto; font-variant-numeric: tabular-nums; }
.hrow .grip { flex: none; width: 12px; height: 18px; background: radial-gradient(circle, #9AA6B4 1.6px, transparent 2px) 0 0 / 6px 6px; cursor: default; }
.hrow em { padding: 1px 8px; border-radius: var(--r-full); font-style: normal; font-size: 11px; font-weight: 700; white-space: nowrap; } .hrow em.ok { background: #D9F8F3; color: var(--teal-ink); } .hrow em.no { background: #FDE7E6; color: var(--red-ink); }
.hslide { display: grid; grid-template-columns: 38px 50px minmax(0, 1fr) 46px; align-items: center; gap: 8px; color: var(--body); font-size: 12.5px; } .hslide + .hslide { margin-top: 10px; } .hslide b { color: var(--ink); }
.hslide .trk { display: block; width: auto; height: 6px; border-radius: 6px; background: #C9D6E4; } .hslide .trk i { position: relative; display: block; height: 100%; border-radius: 6px; background: var(--blue); } .hslide .trk i::after { content: ""; position: absolute; right: -8px; top: -5px; box-sizing: border-box; width: 16px; height: 16px; border: 2.5px solid var(--blue); border-radius: 50%; background: #fff; }
.hslide em { padding: 3px 0; border: 1px solid var(--hair-strong); border-radius: 6px; background: #fff; color: var(--ink); font-style: normal; font-variant-numeric: tabular-nums; text-align: center; }
.hsame { display: flex; align-items: center; gap: 8px; color: var(--body); font-size: 12.5px; } .hsame b { padding: 3px 10px; border: 1px solid var(--hair-strong); border-radius: 8px; background: #fff; color: var(--ink); font-variant-numeric: tabular-nums; } .hsame i { color: var(--ink); font-style: normal; font-weight: 700; } .hsame span { margin-left: 4px; }
.htiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .htiles > div { display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; gap: 4px 6px; min-height: 52px; padding: 6px 8px; border: 1px solid var(--hair); border-radius: 8px; background: #fff; }
.htiles span { flex: 0 0 100%; color: var(--sub); font-size: 11px; font-weight: 600; } .htiles b { color: var(--ink); font-size: 16px; } .htiles u { padding: 1px 7px; border-radius: var(--r-full); background: var(--soft); color: var(--ink); font-size: 11px; font-weight: 600; text-decoration: none; }
.htiles .ci { flex: 1; height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--soft) 22%, var(--blue) 22% 78%, var(--soft) 78%); } .htiles .sp { flex: 1; height: 16px; border-radius: 5px; background: linear-gradient(90deg, #E9F0FA, #9CCBFC 50%, #E9F0FA); }
.htiles .bands { display: flex; flex: 0 0 100%; height: 12px; border-radius: 6px; overflow: hidden; } .htiles .bands i:nth-child(1) { flex: 3; background: #9CCBFC; } .htiles .bands i:nth-child(2) { flex: 5; background: var(--blue); } .htiles .bands i:nth-child(3) { flex: 2; background: var(--teal); }
.hbody .hcap { margin: 5px 0 0; color: var(--sub); font-size: 11px; }
.hfiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .hfiles > div > span { color: var(--sub); font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; } .hbody .hfiles p { display: flex; gap: 8px; margin: 9px 0 2px; }
.hfile { position: relative; display: grid; place-items: end center; box-sizing: border-box; width: 40px; height: 48px; padding-bottom: 5px; border: 2px solid var(--ink); border-radius: 6px 13px 6px 6px; background: #fff; color: var(--ink); font-size: 10.5px; font-weight: 700; }
.hfile::before { content: ""; position: absolute; left: 7px; right: 7px; top: 9px; height: 7px; border-top: 2px solid #C9D6E4; border-bottom: 2px solid #C9D6E4; }
.hfile .lk { position: absolute; right: -8px; top: -8px; box-sizing: border-box; width: 19px; height: 19px; padding: 3.5px; border-radius: 50%; background: var(--ink); fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.hbook { display: flex; align-items: center; gap: 8px; font-size: 11.5px; } .hbook + .hbook { margin-top: 6px; } .hbook > span { flex: none; width: 64px; color: var(--ink); font-weight: 700; }
.hbook > div { display: flex; flex: 1; min-width: 0; border: 1px solid var(--hair-strong); border-radius: 8px; background: #fff; overflow: hidden; } .hbook b { flex: 1 1 auto; padding: 5px 5px; border-left: 1px solid var(--hair); color: var(--body); font-weight: 600; text-align: center; white-space: nowrap; } .hbook b:first-child { border-left: 0; } .hbook b.on { background: var(--ink); color: #fff; }
.hcode { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--ink); color: #E6EEF6; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 10.5px; line-height: 1.6; white-space: pre; overflow-x: auto; } .hcode i { color: #8FA3B8; font-style: normal; }

/* ---------- names that open a card: Simulation summaries, Model statistics and sliders ---------- */
.eyebrow.lbl.more { display: flex; width: max-content; max-width: 100%; margin: 0 -6px; padding-top: 0; padding-bottom: 0; line-height: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sub); } .ebrow { display: flex; align-items: center; gap: 10px; }
.stat .k.lbl.more { display: flex; width: max-content; max-width: 100%; margin: 0 -6px; padding-top: 0; padding-bottom: 0; font-size: var(--t-xs); font-weight: 600; line-height: inherit; color: var(--sub); }
.prow .plab { justify-self: start; margin: 0 0 0 -6px; padding-top: 0; padding-bottom: 0; white-space: nowrap; font-weight: 500; line-height: inherit; } .prow .plab b { min-width: 36px; color: var(--ink); font-weight: 700; text-align: left; }
.prow:not(.trow) { grid-template-columns: 154px minmax(0, 1fr) 78px; }
@media (max-width: 700px) { .prow:not(.trow) { grid-template-columns: 138px minmax(0, 1fr) 72px; } }
/* ---------- the start box of the Calibration tab ---------- */
.status { position: relative; overflow: hidden; } .status .banner > :not(.idle-art) { position: relative; z-index: 1; } .banner.idle { grid-column: 1 / -1; align-items: center; }
.idle-art { position: absolute; right: 0; top: 0; width: 60%; height: 100%; pointer-events: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 36%); mask-image: linear-gradient(90deg, transparent, #000 36%); }
.facts { display: grid; gap: 5px; margin: 8px 0 0; padding: 0; list-style: none; color: var(--body); font-size: var(--t-sm); } .facts li { display: flex; align-items: center; gap: 8px; }
@media (min-width: 1101px) and (max-height: 800px) { .facts { gap: 2px; margin-top: 4px; font-size: var(--t-xs); } }

/* The full name of the model, marked like with a highlighter; its initials spell LAT. */
.lat-name { padding: 0 3px; border-radius: 4px; background: linear-gradient(transparent 56%, rgba(0, 217, 192, .30) 56%); color: var(--ink); font-weight: 700; white-space: nowrap; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.lat-name b { color: var(--blue); font-weight: 700; } .lat-name i { color: var(--blue-ink); font-style: normal; font-weight: 700; }
@media (max-width: 640px) { .lat-name { white-space: normal; } }

/* the signed-in name is a link to the account page */
a.who { color: inherit; text-decoration: none; border-radius: 6px; } a.who:hover { text-decoration: underline; } a.who:focus-visible { outline: none; box-shadow: var(--ring); }

.hcredit { display: flex; align-items: center; gap: 12px; padding: 6px 4px; } .hcredit svg { height: 26px; width: auto; } .hcredit span { color: var(--body); font-size: 13px; font-weight: 600; }

/* the note shown when an overall target above 80% is set back to 80% */
.capnote { display: flex; align-items: center; gap: 10px; margin: var(--s-2) 0 0; padding: 8px 12px 8px 8px; border: 1px solid #B5D8FD; border-radius: 12px; background: linear-gradient(100deg, #EEF6FF, #F6FBFF 70%); animation: softIn .45s var(--ease) both; }
.capnote[hidden] { display: none; } .capnote .ic { flex: none; width: 30px; height: 30px; border-radius: 9px; background: #fff; } .capnote .ic svg { width: 19px; height: 19px; }
.capnote div { display: flex; flex-direction: column; line-height: 1.3; } .capnote strong { color: var(--blue-ink); font-size: 13.5px; } .capnote span:not(.ic) { color: var(--body); font-size: 12.5px; }
@media (prefers-reduced-motion: reduce) { .capnote { animation: none; } }

/* the model being calibrated, chosen on the Calibration tab too (one choice, shared with the Model tab) */
.modelpick { display: grid; gap: 4px; margin: 0 0 6px; padding: 5px 8px; border: 1px solid var(--hair); border-radius: 10px; background: var(--tint); }
.modelpick .mrow { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 8px; } .modelpick .lbl.more { margin: 0 0 0 -6px; justify-self: start; }
.modelpick .seg { background: #fff; } .modelpick .seg { padding: 2px; } .modelpick .seg button { height: 24px; padding: 0 8px; font-size: 13px; } .modelpick .gl { width: 16px; margin-right: 4px; }
.modelpick .hint { margin: 2px 0 0; font-size: 12px; }

/* the three people of the Model chart: an icon each; the chosen one takes the colour it has on the chart */
.pi { flex: none; width: 15px; height: 15px; margin-right: 6px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
[data-seg=patient] button[aria-pressed=true] .pi { opacity: 1; } [data-seg=patient] [data-v=random][aria-pressed=true] .pi { stroke: var(--blue-ink); }
[data-seg=patient] [data-v=always][aria-pressed=true] .pi { stroke: var(--teal-ink); } [data-seg=patient] [data-v=never][aria-pressed=true] .pi { stroke: var(--red-ink); }
