:root{
  --bg: #F8FAFC;
  --text: #0F172A;
  --muted: #475569;
  --line: #E2E8F0;
  --card: #FFFFFF;

  --brand: #0F766E;
  --brand-weak: rgba(15,118,110,0.10);

  --warn: #F59E0B;
}

*{ box-sizing: border-box; }

body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Inter, Roboto, Arial, sans-serif;
  line-height: 1.6;
}

a{ color: var(--brand); text-decoration: none; }
a:hover{ text-decoration: underline; }

.container{
  max-width: 980px;
  padding: 0 18px;
  margin: 0 auto;
}

/* ===== NAV (MVP tweak: bigger + add Home link support) ===== */
.top{
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(248,250,252,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.top__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 0; 
}

.top__title{
  font-weight: 700;
  letter-spacing: 0.2px;
  font-size: 20px;
}

.top__nav a{
  margin-left: 18px;
  color: var(--muted);
  font-size: 17px;    
  font-weight: 500;    
}
.top__nav a:hover{ color: var(--text); }

/* ===== SECTIONS ===== */
.section{
  padding: 54px 0;
}

/* Hero section — fills most of the viewport */
.section--hero{
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  padding-bottom: 60px;
  position: relative;
  background:
    radial-gradient(ellipse 70% 50% at 20% 80%, rgba(15,118,110,0.06) 0%, transparent 100%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(59,130,246,0.05) 0%, transparent 100%),
    var(--bg);
  overflow: hidden;
}

/* Subtle decorative grid pattern */
.section--hero::before{
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.35;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 70%);
}

.hero-content{
  position: relative;
  z-index: 1;
}

.hero-badge{
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--brand);
  background: var(--brand-weak);
  border: 1px solid rgba(15,118,110,0.2);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.hero-accent{
  background: linear-gradient(135deg, var(--brand), #3B82F6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc{
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
  max-width: 640px;
}

.section--tint{
  background: linear-gradient(0deg, var(--brand-weak), var(--brand-weak));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

h1{
  font-size: 48px;
  margin: 0 0 10px 0;
  letter-spacing: -0.8px;
  line-height: 1.15;
}

h2{
  font-size: 36px;
  margin: 0 0 16px 0;
  letter-spacing: -0.4px;
}

h3{
  font-size: 18px;
  margin: 0 0 10px 0;
}

.lead{
  margin-top: 20px;
  margin-bottom: 14px;
}

.section p{
  max-width: 100%;
}

.muted{ color: var(--muted); }

.callout{
  display:inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 17px;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* KPI cards */
.kpi{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.kpi__card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 20px;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-top: 3px solid var(--line);
}
.kpi__card:hover{
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.kpi__card--problem{ border-top-color: #EF4444; }
.kpi__card--approach{ border-top-color: var(--brand); }
.kpi__card--outcome{ border-top-color: #3B82F6; }

.kpi__icon{
  font-size: 22px;
  margin-bottom: 10px;
}
.kpi__label{
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.kpi__value{
  font-weight: 700;
  font-size: 15px;
  line-height: 1.5;
}

/* Scroll hint */
.scroll-hint{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 56px;
  opacity: 0.5;
}
.scroll-hint__text{
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}
.scroll-hint__arrow{
  font-size: 18px;
  color: var(--muted);
  animation: bounce 2s ease infinite;
}
@keyframes bounce{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(6px); }
}

/* 3-column blocks */
.grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}

/* Section header with number badge */
.section-header{
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 4px;
}

.section-header h2{
  margin: 0;
}

.section-num{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}

/* Analysis stacked layout */
.analysis-stack{
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 8px;
  margin-bottom: 12px;
}

.analysis-item{
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.analysis-item:last-child{
  border-bottom: none;
}

.analysis-item__label{
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--brand);
  margin: 0 0 6px 0;
}

.analysis-item p,
.analysis-item ul{
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.analysis-item ul{
  padding-left: 20px;
}

.analysis-item li{
  margin-bottom: 4px;
}

/* Findings card */
.analysis-findings{
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 8px;
}

.analysis-findings h3{
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--brand);
  margin: 0 0 12px 0;
}

.analysis-findings ul{
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.6;
}

.analysis-findings li{
  margin-bottom: 10px;
}

.analysis-findings li:last-child{
  margin-bottom: 0;
}

/* ===== ML task list ===== */
.ml-tasks{
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

.ml-task{
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 10px 0;
}

.ml-task__num{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

.ml-task__title{
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 4px 0;
}

.ml-task p{
  margin: 0;
  font-size: 14.5px;
}

/* ===== ML text blocks ===== */
.ml-text-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 14px 0 22px;
}

.ml-text-card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  border-left: 3px solid var(--brand);
}

.ml-text-card h4{
  margin: 0 0 10px 0;
  font-weight: 800;
}

.ml-list{
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.ml-list li{
  margin-bottom: 6px;
  line-height: 1.55;
}

.ml-task-placeholder{
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
}

.ml-finding{
  margin-top: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  border-left: 4px solid #3B82F6;
}

.ml-finding h3{
  margin: 0 0 10px 0;
  font-size: 17px;
}

/*  Machine Learning Results */
.ml-results{
  margin-top: 24px;
}

.ml-grid{
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.ml-figure{
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.ml-figure img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.ml-figure__title{
  margin: 0 0 12px 0;
  font-size: 18px;
}

.ml-figure figcaption{
  margin-top: 10px;
  font-size: 13px;
}

.ml-legend{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 13.5px;
  line-height: 1.45;
}

.legend-item{
  display: flex;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.legend-item:last-child{
  border-bottom: none;
}

.legend-title{
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.2px;
}

.dot{
  width: 16px;
  height: 16px;
  border-radius: 999px;
  margin-top: 2px;
  flex: 0 0 auto;
  border: 1px solid rgba(0,0,0,0.15);
}

.dot-red{ background: #DC2626; }
.dot-orange{ background: #F97316; }
.dot-yellow{ background: #FBBF24; }
.dot-green{ background: #16A34A; }
.dot-gray{ background: #9CA3AF; }


/* Viz placeholder — break out of container */
.viz{
  margin-top: 18px;
  margin-left: calc(-1 * (min(1280px, 100vw - 36px) - 980px) / 2);
  margin-right: calc(-1 * (min(1280px, 100vw - 36px) - 980px) / 2);
  max-width: min(1280px, 100vw - 36px);
  width: calc(100% + (min(1280px, 100vw - 36px) - 980px));
}

.viz__placeholder{
  background: #fff;
  border: 2px dashed #CBD5E1;
  border-radius: 16px;
  min-height: 480px;
  padding: 48px 24px;
  text-align:center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* helper blocks */
.hint{
  margin-top: 14px;
  padding: 14px 16px;
  border-left: 4px solid var(--brand);
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.note{
  margin-top: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  display:flex;
  gap: 12px;
  align-items:flex-start;
}
.note__tag{
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  background: rgba(245,158,11,0.18);
  border: 1px solid rgba(245,158,11,0.40);
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

code{
  background: rgba(15,118,110,0.10);
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 0.95em;
}

.links{
  padding-left: 18px;
}

.footer{
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* Cluster lookup form */
.cluster-lookup{
  margin: 24px 0;
}

.cluster-lookup__controls{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.form-group{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label{
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text);
}

.form-select{
  padding: 14px 16px;
  font-size: 16px;
  font-family: inherit;
  font-weight: 500;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%230F766E' d='M7 10L2 5h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 42px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.form-select:hover:not(:disabled){
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.12);
  transform: translateY(-1px);
}

.form-select:focus{
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.15), 0 4px 12px rgba(15, 118, 110, 0.08);
}

.form-select:disabled{
  opacity: 0.5;
  cursor: not-allowed;
  background-color: var(--bg);
}

.cluster-result{
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 24px 26px;
  border-left: 5px solid var(--brand);
  animation: fadeIn 0.4s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

@keyframes fadeIn{
  from{ opacity: 0; transform: translateY(-12px); }
  to{ opacity: 1; transform: translateY(0); }
}

.cluster-result__header{
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--line);
}

.cluster-result__dot{
  width: 24px;
  height: 24px;
  border-radius: 999px;
  flex: 0 0 auto;
  border: 2px solid rgba(0,0,0,0.15);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cluster-result__title{
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.cluster-section{
  margin-bottom: 18px;
}

.cluster-section:last-child{
  margin-bottom: 0;
}

.cluster-section__title{
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--brand);
  margin: 0 0 10px 0;
}

.cluster-section__list{
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.7;
}

.cluster-section__list li{
  margin-bottom: 8px;
  font-size: 15px;
}

.cluster-section__list li:last-child{
  margin-bottom: 0;
}

.cluster-section__list strong{
  color: var(--text);
  font-weight: 700;
}

/* Risk result card */
.risk-result{
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 24px 26px;
  margin-bottom: 20px;
  animation: fadeIn 0.4s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border-left: 5px solid #F59E0B;
}

.risk-result__header{
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--line);
}

.risk-result__title{
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
}

.risk-metrics{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.risk-metric{
  background: var(--bg);
  border-radius: 12px;
  padding: 18px 20px;
  border: 2px solid var(--line);
  transition: all 0.2s ease;
}

.risk-metric:hover{
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.risk-metric__label{
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-bottom: 10px;
}

.risk-metric__value{
  font-size: 36px;
  font-weight: 900;
  color: var(--brand);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.risk-metric__badge{
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 700;
}

.risk-badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
  transition: all 0.2s ease;
}

.risk-badge:hover{
  transform: scale(1.05);
}

.risk-badge--high{
  background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
  color: #991B1B;
  border: 2px solid #EF4444;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.risk-badge--normal{
  background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
  color: #065F46;
  border: 2px solid #10B981;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

@media (max-width: 860px){
  .kpi{ grid-template-columns: 1fr; }
  .grid{ grid-template-columns: 1fr; }
  .ml-grid{ grid-template-columns: 1fr; }
  .ml-text-grid{ grid-template-columns: 1fr; }
  .cluster-lookup__controls{ grid-template-columns: 1fr; }
  .risk-metrics{ grid-template-columns: 1fr; }
  h1{ font-size: 36px; }
  .section--hero{ min-height: auto; padding-top: 100px; padding-bottom: 80px; }
}

