:root{--bg:#f4f6f8;--card:#fff;--ink:#15181c;--muted:#68727d;--line:#e4e8ec;--red:#e51d2a;--green:#18864b;--green2:#0f6c3b;--dark:#111416;--amber:#a56800;--shadow:0 12px 38px rgba(16,24,32,.07)}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,ui-sans-serif,Segoe UI,Arial,sans-serif;-webkit-font-smoothing:antialiased}a{text-decoration:none;color:inherit}.topbar{height:72px;padding:0 28px;background:rgba(255,255,255,.94);backdrop-filter:blur(14px);border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;z-index:50}.brand{display:flex;align-items:center;gap:13px}.brand img{width:132px;height:48px;object-fit:contain}.brand div{display:flex;flex-direction:column;border-left:1px solid var(--line);padding-left:13px}.brand strong{letter-spacing:.08em;font-size:12px}.brand small{font-weight:700;color:var(--muted);font-size:12px}.top-actions{display:flex;align-items:center;gap:10px}.user-pill{font-size:12px;color:var(--muted)}.wrap{max-width:1420px;margin:0 auto;padding:28px}.hero,.module-hero{border-radius:26px;background:linear-gradient(120deg,#101315 0%,#1a2022 60%,#143e29 100%);color:white;box-shadow:0 20px 50px rgba(0,0,0,.14);padding:34px 38px;display:flex;align-items:center;justify-content:space-between;gap:24px;overflow:hidden;position:relative}.hero:after,.module-hero:after{content:"";position:absolute;width:240px;height:240px;border-radius:50%;background:rgba(229,29,42,.18);right:-90px;top:-110px}.hero h1,.module-hero h1{font-size:clamp(30px,4vw,48px);line-height:1.05;margin:8px 0 12px;max-width:850px}.hero p,.module-hero p{max-width:850px;color:#d9dee1;font-size:16px;line-height:1.65;margin:0}.hero-chip{position:relative;z-index:2;max-width:280px;background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.15);padding:10px 14px;border-radius:999px;font-size:12px}.eyebrow{font-size:11px;font-weight:900;letter-spacing:.16em;color:var(--green2)}.eyebrow.light{color:#9bd5b5}.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:18px 0}.kpi{background:white;border:1px solid var(--line);border-radius:18px;padding:18px;box-shadow:var(--shadow);position:relative}.kpi:before{content:"";position:absolute;left:0;top:18px;bottom:18px;width:3px;background:var(--green);border-radius:4px}.kpi.quality:before{background:var(--red)}.kpi span{display:block;color:var(--muted);font-size:12px;margin-bottom:7px}.kpi b{font-size:28px}.kpi b.small{font-size:15px}.kpi em{display:block;color:var(--green);font-style:normal;font-size:11px;margin-top:5px}.panel{background:var(--card);border:1px solid var(--line);border-radius:22px;padding:22px;box-shadow:var(--shadow);margin-top:18px}.upload-panel{display:flex;align-items:center;justify-content:space-between;gap:24px}.upload-panel h2,.section-head h2,.panel h2{margin:5px 0 4px}.muted{color:var(--muted);line-height:1.55}.micro{font-size:12px;color:var(--muted);line-height:1.5}.upload-form{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}input[type=file],input[type=email],input[type=password]{background:#fff;border:1px solid #d9dee3;border-radius:12px;padding:11px 12px;outline:none}input[type=email],input[type=password]{width:100%;margin:6px 0 13px}input:focus{border-color:var(--green);box-shadow:0 0 0 3px rgba(24,134,75,.10)}.btn{border:0;border-radius:11px;background:var(--green);color:white;padding:11px 16px;font-weight:800;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:.18s transform,.18s box-shadow}.btn:hover{transform:translateY(-1px);box-shadow:0 8px 20px rgba(24,134,75,.18)}.btn.ghost{background:#edf1f3;color:#1c2429}.btn.white{background:white;color:#15181c;position:relative;z-index:3}.btn.sm{padding:9px 13px;font-size:12px}.btn.wide{width:100%}.btn.disabled{opacity:.45;cursor:not-allowed}.text-link{font-size:12px;font-weight:800;color:var(--green2)}.layout-two{display:grid;grid-template-columns:1.45fr 1fr;gap:18px}.chart{display:block;width:100%;border-radius:15px;margin-top:8px}.warning-list{display:grid;gap:8px;margin:12px 0}.warning-list div{background:#fff7e8;color:#7d5000;border:1px solid #f1dbad;padding:10px;border-radius:11px;font-size:13px}.success-box{background:#eef9f2;border:1px solid #cce9d6;color:#186238;padding:12px;border-radius:12px;font-size:13px}.module-head{margin-top:30px}.module-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.module-card{background:white;border:1px solid var(--line);border-radius:20px;padding:20px;box-shadow:var(--shadow);transition:.2s transform,.2s box-shadow}.module-card:hover{transform:translateY(-3px);box-shadow:0 18px 44px rgba(16,24,32,.10)}.module-card h3{font-size:18px;margin:14px 0 8px}.module-card p{font-size:13px;color:var(--muted);min-height:40px;line-height:1.5}.module-top{display:flex;justify-content:space-between}.arrow{color:var(--muted)}.availability-note{font-size:12px;line-height:1.5;border-top:1px solid var(--line);padding:12px 0;color:#4a555f;min-height:62px}.status{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:10px;font-weight:900;letter-spacing:.06em;background:#e8eef2;color:#46515a}.status.ready{background:#e6f6ec;color:#116338}.status.limited{background:#fff1cf;color:#7d5200}.status.unavailable,.status.high{background:#fde8e9;color:#a91e27}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:14px}.table-wrap.compact{max-height:420px}table{border-collapse:collapse;width:100%;font-size:12px;background:white}th{position:sticky;top:0;background:#f6f8f9;color:#4e5963;text-align:left;font-size:10px;letter-spacing:.04em;text-transform:uppercase}th,td{padding:10px 11px;border-bottom:1px solid #edf0f2;white-space:nowrap}tr:hover td{background:#fbfcfc}code{font-size:11px;color:var(--green2)}.tag-cloud{display:flex;gap:7px;flex-wrap:wrap}.tag-cloud span{background:#f0f3f5;border:1px solid var(--line);padding:6px 8px;border-radius:8px;font-size:11px}.tabs{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:15px}.tabs a{background:white;border:1px solid var(--line);border-radius:999px;padding:9px 12px;font-size:12px;font-weight:800;color:#5b6570}.tabs a.active{background:#14251b;color:white;border-color:#14251b}.module-hero{padding:30px 34px}.module-hero h1{font-size:38px}.metric-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}.metric-row div{background:#f5f7f8;border-radius:12px;padding:10px 12px;min-width:90px}.metric-row span{display:block;font-size:9px;color:var(--muted)}.metric-row b{font-size:18px}.toast-wrap{position:fixed;right:20px;top:85px;z-index:80;display:grid;gap:8px}.toast{max-width:430px;padding:12px 14px;background:#222;color:white;border-radius:12px;box-shadow:0 12px 30px rgba(0,0,0,.18);font-size:13px}.toast.success{background:#176a3d}.toast.error{background:#aa222b}.login-shell{min-height:calc(100vh - 72px);display:grid;grid-template-columns:minmax(360px,520px) minmax(420px,1fr);gap:70px;align-items:center;max-width:1200px;margin:auto;padding:55px 30px}.login-card{background:white;border:1px solid var(--line);border-radius:26px;padding:34px;box-shadow:var(--shadow)}.login-logo{width:210px;height:82px;object-fit:contain;object-position:left center}.login-card h1{font-size:35px;margin:12px 0 8px}.login-card>p{color:var(--muted);line-height:1.6}.login-card label{font-size:11px;font-weight:800}.demo-note{margin-top:14px;font-size:11px;color:var(--muted);text-align:center}.login-side h2{font-size:40px;line-height:1.06;margin:16px 0}.login-side>p{color:var(--muted);font-size:16px;line-height:1.7}.signal{display:block;width:38px;height:5px;border-radius:8px;background:linear-gradient(90deg,var(--red) 50%,var(--green) 50%)}.mini-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:25px}.mini-grid div{background:white;border:1px solid var(--line);border-radius:16px;padding:15px}.mini-grid b,.mini-grid span{display:block}.mini-grid span{font-size:11px;color:var(--muted);margin-top:4px}footer{text-align:center;color:#85909a;font-size:11px;padding:35px 20px}@media(max-width:1000px){.kpis,.module-grid{grid-template-columns:repeat(2,1fr)}.layout-two{grid-template-columns:1fr}.upload-panel{display:block}.upload-form{justify-content:flex-start;margin-top:16px}.login-shell{grid-template-columns:1fr;gap:25px}.login-side{display:none}}@media(max-width:650px){.wrap{padding:16px}.topbar{padding:0 14px}.brand img{width:94px}.brand div{display:none}.hero,.module-hero{padding:25px}.kpis,.module-grid{grid-template-columns:1fr}.user-pill{display:none}.hero-chip{display:none}}

.optimizer-page .panel{padding:26px}.optimizer-page h2{text-transform:uppercase;letter-spacing:.02em}.optimizer-calculated{margin:24px 0 0;font-size:15px}.optimizer-chart{padding:28px 32px}.comparison-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.comparison-grid article{border:1px solid var(--line);border-radius:16px;padding:14px;background:#fbfcfd}.comparison-grid article h3{margin:2px 0}.comparison-grid article .chart{margin-top:0}@media(max-width:900px){.comparison-grid{grid-template-columns:1fr}}.category-insight{margin:24px 0 34px}.category-insight h3{font-size:16px}.category-insight h3 span{font-weight:500}.category-insight>p{font-size:14px}.recommendation-list{margin:34px 0}.recommendation-list li{margin:10px 0;line-height:1.5}.comparison-stack{display:grid;gap:28px}.comparison-stack article{border:0;border-top:1px solid var(--line);padding-top:20px}.comparison-stack article .chart{max-height:none}.lift-exact-page form{display:grid;gap:12px}.lift-exact-page input[type=file],.lift-exact-page input[type=text]{width:100%}.feature-label{font-size:11px;font-weight:800;color:var(--muted)}.visualize-form{margin:20px 0}.lift-kpis{display:grid;grid-template-columns:repeat(5,minmax(140px,1fr));gap:12px}.lift-kpis>div{border:1px solid var(--line);border-radius:15px;padding:16px;background:#f8fafb}.lift-kpis span{display:block;font-size:11px;color:var(--muted);min-height:30px}.lift-kpis b{font-size:23px}.lift-chart-block{border-top:1px solid var(--line);padding-top:18px;margin-top:22px}@media(max-width:1000px){.lift-kpis{grid-template-columns:repeat(2,1fr)}}.four-modules{grid-template-columns:repeat(2,minmax(0,1fr));max-width:1100px;margin:20px auto}.module-home{padding:8px 0 30px}.compact-module-upload{display:flex;justify-content:flex-end;padding:12px 16px}.compact-module-upload .upload-form{margin:0}.workflow-guide{margin-bottom:35px}@media(max-width:800px){.four-modules{grid-template-columns:1fr}}.brand-only-hero{min-height:150px;justify-content:center;text-align:center}.brand-only-hero h1{margin:0;max-width:none;font-size:clamp(28px,4vw,48px);letter-spacing:.04em}.engineering-kpis{display:grid;grid-template-columns:repeat(5,minmax(140px,1fr));gap:12px;margin-top:16px}.engineering-kpis>div{background:#f6f8f9;border:1px solid var(--line);border-radius:15px;padding:16px}.engineering-kpis span{display:block;color:var(--muted);font-size:11px;min-height:28px}.engineering-kpis b{display:block;font-size:22px;margin-top:5px}.engineering-page .chart{max-height:620px;object-fit:contain}@media(max-width:1000px){.engineering-kpis{grid-template-columns:repeat(2,1fr)}}
/* Global light/dark appearance and interactive result charts */
.theme-toggle{border:1px solid var(--line);background:var(--card);color:var(--ink);border-radius:999px;padding:9px 14px;font-weight:800;cursor:pointer;box-shadow:var(--shadow)}
.interactive-chart{width:100%;min-height:400px;margin-top:8px;border-radius:15px;overflow:hidden}.interactive-chart .plotly-graph-div{width:100%!important}
.btn.processing{opacity:.78;cursor:wait}.btn.processing:before{content:"";width:13px;height:13px;margin-right:8px;border:2px solid rgba(255,255,255,.45);border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
html[data-theme="dark"]{--bg:#0d1114;--card:#171d21;--ink:#edf2f5;--muted:#aab5bd;--line:#303941;--dark:#080b0d;--shadow:0 12px 38px rgba(0,0,0,.28);color-scheme:dark}
html[data-theme="dark"] .topbar{background:rgba(16,21,24,.94)}html[data-theme="dark"] .panel,html[data-theme="dark"] .kpi,html[data-theme="dark"] .module-card,html[data-theme="dark"] .tabs a,html[data-theme="dark"] .mini-grid div,html[data-theme="dark"] .login-card{background:var(--card)}
html[data-theme="dark"] input[type=file],html[data-theme="dark"] input[type=email],html[data-theme="dark"] input[type=password],html[data-theme="dark"] table{background:#11171a;color:var(--ink)}html[data-theme="dark"] th{background:#20282d;color:#d3dce2}html[data-theme="dark"] td{border-color:#2a3339}html[data-theme="dark"] tr:hover td{background:#20282d}
html[data-theme="dark"] .engineering-kpis>div,html[data-theme="dark"] .lift-kpis>div,html[data-theme="dark"] .metric-row div,html[data-theme="dark"] .comparison-grid article{background:#20272c}html[data-theme="dark"] .availability-note{color:#c2cbd1}html[data-theme="dark"] .btn.ghost{background:#303a40;color:#fff}html[data-theme="dark"] .btn.white{background:#edf2f5;color:#15181c}

.logo-dark{display:none}
html[data-theme="dark"] .logo-light{display:none}
html[data-theme="dark"] .logo-dark{display:block;filter:none;opacity:1}
.dca-status-grid{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:12px;margin:18px 0}.dca-result-card{border:1px solid var(--line);border-top:4px solid #68727d;border-radius:15px;padding:16px;background:var(--card)}.dca-result-card span,.dca-forecast-grid span,.dca-total span{display:block;color:var(--muted);font-size:11px;font-weight:800}.dca-result-card b{display:block;font-size:28px;margin:7px 0}.dca-result-card small{color:var(--muted);line-height:1.35}.dca-result-card.ready{border-top-color:#18864b}.dca-result-card.historical{border-top-color:#5b6cff}.dca-result-card.stable{border-top-color:#00a887}.dca-result-card.warning{border-top-color:#e49a20}.dca-forecast-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:12px}.dca-forecast-grid>div{border:1px solid var(--line);border-radius:12px;padding:13px}.dca-forecast-grid b{display:block;font-size:15px;margin-top:6px}.dca-total{display:flex;justify-content:space-between;align-items:center;gap:16px;background:#eaf7ef;border:1px solid #bfe3cd;border-radius:14px;padding:15px;margin-top:12px;color:#125b34}.dca-total b{font-size:20px}.dca-table-status{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:10px;font-weight:900;background:#edf1f3;color:#46515a}.dca-table-status.fitted-active{background:#e5f6ec;color:#116338}.dca-table-status.fitted-historical{background:#e9edff;color:#3449b8}.dca-table-status.no-material-decline{background:#e4f7f3;color:#08705e}.dca-table-status.unreliable-fit{background:#fff1cf;color:#7d5200}html[data-theme="dark"] .dca-total{background:#173326;border-color:#28533b;color:#bce8cb}@media(max-width:1000px){.dca-status-grid{grid-template-columns:repeat(2,1fr)}.dca-forecast-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:600px){.dca-status-grid,.dca-forecast-grid{grid-template-columns:1fr}.dca-total{align-items:flex-start;flex-direction:column}}

html.session-resetting body{visibility:hidden}

/* Production Intelligence header, styled to match the supplied reference. */
.topbar,html[data-theme="dark"] .topbar{height:92px;gap:24px;padding:0 42px;background:var(--card);border-bottom:1px solid var(--line);color:var(--ink)}
.topbar .brand{flex-shrink:0}.topbar .brand img{width:150px;height:80px}.topbar .brand .logo-light{display:block}.topbar .brand .logo-dark{display:none}
html[data-theme="dark"] .topbar .brand .logo-light{display:none}html[data-theme="dark"] .topbar .brand .logo-dark{display:block}
.header-nav{display:flex;align-items:center;justify-content:center;flex:1;min-width:0}
.production-heading{display:inline-flex;align-items:center;justify-content:center;min-height:62px;padding:12px 18px;border:1px solid transparent;border-radius:11px;background:transparent;color:inherit;font-size:30px;font-weight:700;line-height:1.25;text-align:center}
.production-heading:hover{background:transparent}
.topbar .theme-toggle{flex-shrink:0;min-height:50px;border:1px solid var(--line);border-radius:11px;background:var(--bg);color:var(--ink);box-shadow:none}
.topbar a:focus-visible,.topbar button:focus-visible{outline:2px solid var(--ink);outline-offset:4px}
@media(max-width:650px){.topbar,html[data-theme="dark"] .topbar{height:80px;padding:0 12px;gap:10px}.topbar .brand img{width:90px;height:62px}.production-heading{font-size:20px;min-height:48px;padding:8px 10px}.topbar .theme-toggle{padding:8px;font-size:11px;min-height:44px}}
@media(max-width:380px){.topbar,html[data-theme="dark"] .topbar{gap:7px;padding:0 8px}.topbar .brand img{width:72px}.production-heading{font-size:17px;padding:8px}.topbar .theme-toggle{max-width:55px}}

/* Icon-only theme control; its accessible label is maintained by app.js. */
.topbar #theme-toggle{display:inline-flex;align-items:center;justify-content:center;width:50px;height:50px;padding:0;font-size:0}
.topbar #theme-toggle::before{content:"";width:22px;height:22px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.9 13A9 9 0 0 1 11 3.1 9 9 0 1 0 20.9 13Z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat}
html[data-theme="dark"] .topbar #theme-toggle::before{mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2m0 16v2M2 12h2m16 0h2M4.93 4.93l1.42 1.42m11.3 11.3 1.42 1.42M4.93 19.07l1.42-1.42m11.3-11.3 1.42-1.42'/%3E%3C/g%3E%3C/svg%3E")}
@media(max-width:650px){.topbar #theme-toggle{width:44px;height:44px}}

/* Keep light surfaces and banner text consistent with the selected theme. */
html[data-theme="light"]{color-scheme:light}
html[data-theme="dark"] .topbar{background:#0b1119}
html[data-theme="light"] .hero,html[data-theme="light"] .module-hero{background:linear-gradient(120deg,#fff 0%,#f4f8f6 60%,#e4f2e9 100%);color:var(--ink);box-shadow:var(--shadow)}
html[data-theme="light"] .hero p,html[data-theme="light"] .module-hero p{color:#4a5963}
html[data-theme="light"] .hero:after,html[data-theme="light"] .module-hero:after{background:rgba(24,134,75,.07)}
html[data-theme="light"] .eyebrow.light{color:var(--green2)}
html[data-theme="light"] .hero-chip{background:rgba(24,134,75,.07);border-color:#cce3d4;color:var(--green2)}
html[data-theme="light"] .hero .btn.white,html[data-theme="light"] .module-hero .btn.white{background:var(--green);color:#fff}
html[data-theme="dark"] .tabs a{color:var(--ink)}
html[data-theme="dark"] .tabs a.active{background:#204a34;border-color:#39845a;color:#fff}
