/* OPTEMA AI custom brand system */
:root {
  --optema-ink: #14213d;
  --optema-muted: #627084;
  --optema-primary: #0f8b8d;
  --optema-primary-dark: #0b6768;
  --optema-secondary: #f6ae2d;
  --optema-accent: #f26419;
  --optema-mint: #dff8f5;
  --optema-sand: #fff6e4;
  --optema-cloud: #f7fafc;
  --optema-white: #ffffff;
  --optema-line: #dce8ee;
  --optema-shadow: 0 24px 70px rgba(20, 33, 61, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--optema-ink);
  background:
    radial-gradient(circle at 8% 4%, rgba(15, 139, 141, 0.14), transparent 28rem),
    radial-gradient(circle at 95% 8%, rgba(246, 174, 45, 0.16), transparent 24rem),
    var(--optema-cloud);
}

h1, h2, h3, .navbar-brand {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  letter-spacing: -0.04em;
}

a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(246, 174, 45, 0.65) !important;
  outline-offset: 3px;
}

.optema-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 250, 252, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(220, 232, 238, 0.82);
}
.brand-mark { font-weight: 800; color: var(--optema-ink); }
.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 2.15rem; height: 2.15rem;
  margin-right: .45rem;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--optema-primary), var(--optema-accent));
  box-shadow: 0 12px 24px rgba(15, 139, 141, 0.24);
}
.nav-link { font-weight: 700; color: var(--optema-muted); }
.nav-link:hover, .nav-link:focus { color: var(--optema-primary); }
.admin-link {
  border: 1px solid var(--optema-line);
  border-radius: 999px;
  padding-inline: 1rem !important;
  background: rgba(255,255,255,.7);
}

.hero-section {
  min-height: 78vh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(145deg, rgba(223,248,245,.88), rgba(255,246,228,.72) 55%, rgba(255,255,255,.9)),
    var(--optema-cloud);
}
.shape {
  position: absolute; border-radius: 999px; filter: blur(.2px); opacity: .82;
}
.shape-one {
  width: 15rem; height: 15rem; right: 6%; top: 12%;
  background: linear-gradient(135deg, rgba(15,139,141,.2), rgba(246,174,45,.38));
}
.shape-two {
  width: 9rem; height: 9rem; left: 4%; bottom: 8%;
  background: linear-gradient(135deg, rgba(242,100,25,.22), rgba(15,139,141,.2));
}
.eyebrow, .section-kicker {
  color: var(--optema-primary-dark);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 800;
}
.display-heading {
  font-size: clamp(2.7rem, 6vw, 5.9rem);
  line-height: .95;
  font-weight: 800;
}
.hero-copy, .section-copy {
  color: var(--optema-muted);
  font-size: clamp(1rem, 1vw + .76rem, 1.2rem);
  line-height: 1.75;
}
.btn-optema {
  border: 0;
  color: #fff;
  font-weight: 800;
  border-radius: 999px;
  padding: .9rem 1.35rem;
  background: linear-gradient(135deg, var(--optema-primary), var(--optema-primary-dark));
  box-shadow: 0 14px 35px rgba(15, 139, 141, .26);
}
.btn-optema:hover, .btn-optema:focus { color:#fff; transform: translateY(-1px); box-shadow: 0 18px 44px rgba(15,139,141,.32); }
.btn-outline-optema {
  border: 1px solid rgba(15,139,141,.3);
  color: var(--optema-primary-dark);
  background: rgba(255,255,255,.68);
  font-weight: 800;
  border-radius: 999px;
  padding: .9rem 1.35rem;
}
.btn-outline-optema:hover, .btn-outline-optema:focus { background: var(--optema-mint); color: var(--optema-primary-dark); }
.trust-strip { display: flex; flex-wrap: wrap; gap: .65rem; }
.trust-strip span, .score-pill, .status-dot {
  display: inline-flex; align-items: center; gap: .45rem;
  border: 1px solid rgba(15,139,141,.16);
  background: rgba(255,255,255,.72);
  border-radius: 999px;
  padding: .55rem .8rem;
  color: var(--optema-muted);
  font-weight: 800;
  font-size: .86rem;
}
.status-dot i { width: .55rem; height: .55rem; border-radius: 999px; background: #23c483; box-shadow: 0 0 0 6px rgba(35,196,131,.15); }
.glass-card, .form-shell, .analysis-card, .empty-state, .case-card, .metric-card {
  border: 1px solid rgba(220, 232, 238, .9);
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(20px);
  box-shadow: var(--optema-shadow);
  border-radius: 32px;
}
.decision-panel { padding: clamp(1.35rem, 3vw, 2rem); }
.mini-chart { display: grid; gap: 1rem; }
.mini-chart div {
  --bar: 70%;
  position: relative; overflow: hidden;
  display: flex; justify-content: space-between;
  padding: .9rem 1rem;
  border-radius: 18px;
  background: #eef6f7;
  font-weight: 800;
}
.mini-chart div::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: var(--bar);
  background: linear-gradient(90deg, rgba(15,139,141,.24), rgba(246,174,45,.28));
}
.mini-chart span, .mini-chart b { position: relative; z-index: 1; }
.bar-95 { --bar: 95% !important; } .bar-88 { --bar: 88% !important; } .bar-82 { --bar: 82% !important; }
.solution-preview {
  padding: 1.2rem; border-radius: 24px;
  background: linear-gradient(135deg, var(--optema-ink), #183b56); color: white;
}
.solution-preview h2 { font-size: 1.35rem; }
.solution-preview p { color: rgba(255,255,255,.74); margin-bottom: 0; }
.small-label { color: var(--optema-secondary) !important; text-transform: uppercase; font-weight: 800; letter-spacing: .12em; font-size: .75rem; }

.section-pad { padding: clamp(4rem, 8vw, 7rem) 0; }
.section-title, .page-title { font-size: clamp(2rem, 3.5vw, 3.6rem); font-weight: 800; line-height: 1.02; }
.form-shell { padding: clamp(1.25rem, 3vw, 2rem); }
.form-control, .form-select { border: 1px solid var(--optema-line); border-radius: 18px; padding: .9rem 1rem; }
.form-control:focus, .form-select:focus { border-color: var(--optema-primary); box-shadow: 0 0 0 .22rem rgba(15,139,141,.13); }
.form-label { font-weight: 800; color: var(--optema-ink); }
.form-text { color: var(--optema-muted); }
.feature-list { display: grid; gap: .85rem; margin-top: 1.5rem; }
.feature-list div { display: flex; gap: .8rem; align-items: center; color: var(--optema-muted); }
.feature-list strong {
  display:grid; place-items:center; width:2rem; height:2rem; border-radius:12px;
  background: var(--optema-sand); color: var(--optema-accent);
}
.case-card {
  display: flex; flex-direction: column; gap: .9rem;
  padding: 1.35rem; text-decoration: none; transition: .2s ease;
}
.case-card:hover, .case-card:focus { transform: translateY(-4px); border-color: rgba(15,139,141,.35); color: var(--optema-ink); }
.case-card h2, .case-card h3 { font-size: 1.15rem; font-weight: 800; margin: 0; }
.case-card p { color: var(--optema-muted); margin: 0; line-height: 1.65; }
.case-area { color: var(--optema-primary-dark); font-size: .78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; }
.case-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .7rem; color: var(--optema-muted); font-weight: 800; font-size: .86rem; margin-top: auto; }
.empty-state { padding: 2rem; text-align: center; }
.empty-state p { color: var(--optema-muted); }
.link-optema { color: var(--optema-primary-dark); font-weight: 900; text-decoration: none; }
.link-optema:hover { color: var(--optema-accent); }
.site-footer {
  padding: 1.5rem 0; color: var(--optema-muted);
  border-top: 1px solid var(--optema-line); background: rgba(255,255,255,.68);
}
.page-shell { min-height: 100vh; background: linear-gradient(180deg, rgba(223,248,245,.55), transparent 24rem); }
.detail-hero { padding: clamp(3rem, 6vw, 5rem) 0; background: linear-gradient(135deg, rgba(223,248,245,.9), rgba(255,246,228,.85)); }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.metric-card { padding: 1.25rem; }
.metric-card span { color: var(--optema-muted); font-weight: 800; display:block; }
.metric-card strong { font-family:'Plus Jakarta Sans'; font-size: 1.75rem; }
.analysis-card { padding: clamp(1.2rem, 2.6vw, 2rem); }
.analysis-card h2 { font-weight: 800; margin-bottom: 1.2rem; }
.cause-list { display: grid; gap: 1.2rem; }
.cause-list article p { color: var(--optema-muted); margin: .6rem 0 0; line-height: 1.6; }
.progress { height: .65rem; background: #e6f2f3; border-radius: 999px; margin-top: .55rem; }
.progress-bar { background: linear-gradient(90deg, var(--optema-primary), var(--optema-secondary)); }
.solution-table { --bs-table-bg: transparent; }
.solution-table th { color: var(--optema-muted); text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }
.solution-table td { padding: 1rem .75rem; }
.solution-table p { color: var(--optema-muted); margin: .25rem 0; }
.solution-table small { color: var(--optema-primary-dark); font-weight: 800; }
.rank-badge { display: inline-flex; border-radius: 999px; background: var(--optema-sand); color: var(--optema-accent); padding: .35rem .6rem; font-weight: 900; }
.action-card { background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(223,248,245,.76)); }
.timeline { display: grid; gap: 1rem; }
.timeline article { display: grid; grid-template-columns: 5rem 1fr; gap: 1rem; align-items: start; }
.timeline article > span {
  display: inline-flex; justify-content:center; padding: .45rem .65rem; border-radius: 999px;
  background: var(--optema-ink); color: white; font-weight: 900; font-size: .82rem;
}
.timeline h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: .2rem; }
.timeline p { color: var(--optema-muted); margin: 0; line-height: 1.6; }

.score-width-0 { width: 0%; }
.score-width-1 { width: 1%; }
.score-width-2 { width: 2%; }
.score-width-3 { width: 3%; }
.score-width-4 { width: 4%; }
.score-width-5 { width: 5%; }
.score-width-6 { width: 6%; }
.score-width-7 { width: 7%; }
.score-width-8 { width: 8%; }
.score-width-9 { width: 9%; }
.score-width-10 { width: 10%; }
.score-width-11 { width: 11%; }
.score-width-12 { width: 12%; }
.score-width-13 { width: 13%; }
.score-width-14 { width: 14%; }
.score-width-15 { width: 15%; }
.score-width-16 { width: 16%; }
.score-width-17 { width: 17%; }
.score-width-18 { width: 18%; }
.score-width-19 { width: 19%; }
.score-width-20 { width: 20%; }
.score-width-21 { width: 21%; }
.score-width-22 { width: 22%; }
.score-width-23 { width: 23%; }
.score-width-24 { width: 24%; }
.score-width-25 { width: 25%; }
.score-width-26 { width: 26%; }
.score-width-27 { width: 27%; }
.score-width-28 { width: 28%; }
.score-width-29 { width: 29%; }
.score-width-30 { width: 30%; }
.score-width-31 { width: 31%; }
.score-width-32 { width: 32%; }
.score-width-33 { width: 33%; }
.score-width-34 { width: 34%; }
.score-width-35 { width: 35%; }
.score-width-36 { width: 36%; }
.score-width-37 { width: 37%; }
.score-width-38 { width: 38%; }
.score-width-39 { width: 39%; }
.score-width-40 { width: 40%; }
.score-width-41 { width: 41%; }
.score-width-42 { width: 42%; }
.score-width-43 { width: 43%; }
.score-width-44 { width: 44%; }
.score-width-45 { width: 45%; }
.score-width-46 { width: 46%; }
.score-width-47 { width: 47%; }
.score-width-48 { width: 48%; }
.score-width-49 { width: 49%; }
.score-width-50 { width: 50%; }
.score-width-51 { width: 51%; }
.score-width-52 { width: 52%; }
.score-width-53 { width: 53%; }
.score-width-54 { width: 54%; }
.score-width-55 { width: 55%; }
.score-width-56 { width: 56%; }
.score-width-57 { width: 57%; }
.score-width-58 { width: 58%; }
.score-width-59 { width: 59%; }
.score-width-60 { width: 60%; }
.score-width-61 { width: 61%; }
.score-width-62 { width: 62%; }
.score-width-63 { width: 63%; }
.score-width-64 { width: 64%; }
.score-width-65 { width: 65%; }
.score-width-66 { width: 66%; }
.score-width-67 { width: 67%; }
.score-width-68 { width: 68%; }
.score-width-69 { width: 69%; }
.score-width-70 { width: 70%; }
.score-width-71 { width: 71%; }
.score-width-72 { width: 72%; }
.score-width-73 { width: 73%; }
.score-width-74 { width: 74%; }
.score-width-75 { width: 75%; }
.score-width-76 { width: 76%; }
.score-width-77 { width: 77%; }
.score-width-78 { width: 78%; }
.score-width-79 { width: 79%; }
.score-width-80 { width: 80%; }
.score-width-81 { width: 81%; }
.score-width-82 { width: 82%; }
.score-width-83 { width: 83%; }
.score-width-84 { width: 84%; }
.score-width-85 { width: 85%; }
.score-width-86 { width: 86%; }
.score-width-87 { width: 87%; }
.score-width-88 { width: 88%; }
.score-width-89 { width: 89%; }
.score-width-90 { width: 90%; }
.score-width-91 { width: 91%; }
.score-width-92 { width: 92%; }
.score-width-93 { width: 93%; }
.score-width-94 { width: 94%; }
.score-width-95 { width: 95%; }
.score-width-96 { width: 96%; }
.score-width-97 { width: 97%; }
.score-width-98 { width: 98%; }
.score-width-99 { width: 99%; }
.score-width-100 { width: 100%; }

@media (max-width: 767px) {
  .metric-grid { grid-template-columns: 1fr; }
  .timeline article { grid-template-columns: 1fr; }
  .hero-section { min-height: auto; }
}


/* Streamlit-inspired MVP workspace */
.hero-subtitle {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: clamp(1.25rem, 1.2vw + 1rem, 2rem);
  font-weight: 800;
  color: var(--optema-primary-dark);
  letter-spacing: -0.03em;
}
.mvp-hero .display-heading { letter-spacing: -0.07em; }
.mvp-workspace .sticky-lg-top { top: 6rem; }
.panel-heading {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.4rem;
}
.panel-heading h2 {
  font-size: 1.45rem;
  margin: 0 0 .25rem;
  font-weight: 900;
}
.panel-heading p,
.form-note,
.formula-note,
.detail-status-card p {
  color: var(--optema-muted);
  line-height: 1.65;
}
.panel-icon {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--optema-mint), var(--optema-sand));
  box-shadow: 0 16px 28px rgba(15, 139, 141, .12);
  font-size: 1.35rem;
}
.problem-textarea {
  min-height: 15rem;
  resize: vertical;
  border-radius: 22px;
  border-color: rgba(15,139,141,.18);
  background: rgba(255,255,255,.82);
}
.problem-textarea:focus {
  border-color: var(--optema-primary);
  box-shadow: 0 0 0 .25rem rgba(15,139,141,.12);
}
.urgency-slider { accent-color: var(--optema-primary); }
.urgency-value {
  min-width: 2.4rem;
  text-align: center;
  padding: .35rem .7rem;
  border-radius: 999px;
  color: #fff;
  background: var(--optema-ink);
  font-weight: 900;
}
.range-labels {
  display: flex;
  justify-content: space-between;
  color: var(--optema-muted);
  font-size: .82rem;
  font-weight: 800;
  margin-top: -.3rem;
}
.output-panel { overflow: hidden; }
.output-success {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: #087447;
  background: rgba(35, 196, 131, .12);
  border: 1px solid rgba(35, 196, 131, .22);
  border-radius: 999px;
  padding: .7rem 1rem;
  font-weight: 900;
}
.output-section {
  padding: 1.25rem 0;
  border-top: 1px solid var(--optema-line);
}
.output-section:first-of-type { border-top: 0; padding-top: 0; }
.output-section h2 { font-size: clamp(1.25rem, 1vw + 1rem, 1.8rem); }
.compact-cause-list { gap: .85rem; }
.compact-cause-list article p { display: none; }
.preview-table th,
.preview-table td { white-space: nowrap; }
.detail-status-card { padding: 1.35rem; }
.bar-85 { --bar: 85% !important; }
.bar-70 { --bar: 70% !important; }

@media (max-width: 991px) {
  .mvp-workspace .sticky-lg-top { position: static; }
}
