/* ai told me about the import font line */ 
@import url("https://fonts.googleapis.com/css?family=Raleway:400,400italic,700,800");

/*background setting*/ 
body {
  margin: 0;
  padding: 0;
  background-color: #313a3d; 
  background-size: auto, cover;
  background-attachment: fixed;
  
  font-family: "Raleway", "Helvetica", sans-serif;
  color: #6f7577; 
  font-size: 15pt;
  line-height: 1.75em;
  
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 40px;
  padding-bottom: 40px;
}

/* Main Container (Card Style)*/
.container {
  max-width: 960px;
  width: 90%; 
  background-color: rgba(252, 252, 252, 0.95);
  padding: 50px;
  border-radius: 8px; 
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

/*Headings & Typography*/
h1, h2, h3 {
  color: #61686b;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  text-align: center;
  margin-bottom: 0.5em;
}

h1 { font-size: 2.2em; }

.sub {
  text-align: center;
  font-size: 0.9em;
  color: #1b98c5;
  margin-bottom: 40px;
  border-bottom: 2px solid #dddddd;
  display: inline-block;
  padding-bottom: 20px;
  width: 100%;
}

/* Control Panel AI helped with the color choice */
.controls {
  background-color: #ffffff;
  border: 2px solid #efefef;
  border-radius: 10px;
  padding: 40px;
  margin-bottom: 40px;
}

.guide-intro {
  margin-bottom: 30px;
  text-align: left;
}
.guide-intro h3 {
  font-size: 1.5em;
  color: #61686b;
  margin-bottom: 10px;
  text-transform: none;
  text-align: left;
  letter-spacing: normal;
}
.guide-intro p {
  color: #888;
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.guide-step {
  display: flex;
  align-items: flex-start;
  margin-bottom: 30px;
}

.step-badge {
  background-color: #8cd1a8;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  margin-right: 20px;
  flex-shrink: 0;
  margin-top: 0px; 
  box-shadow: 0 4px 10px rgba(140, 209, 168, 0.4);
}

.step-content {
  flex-grow: 1;
}
.step-content label {
  display: block;
  font-weight: 700;
  font-size: 1.3rem;
  color: #61686b;
  margin-bottom: 10px;
}
.step-hint {
  font-size: 1.1rem;
  color: #3347c9;
  margin-top: 8px;
  margin-bottom: 0;
  font-style: italic;
}

select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  width: 100%;
  max-width: 400px;
  padding: 12px 15px;
  padding-right: 40px;
  
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #444;
  line-height: 1.3;

  background-color: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 16px;
  
  cursor: pointer;
  transition: all 0.2s ease;
}

select:hover {
  border-color: #8cd1a8;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

select:focus {
  outline: none;
  border-color: #8cd1a8;
  box-shadow: 0 0 0 3px rgba(140, 209, 168, 0.2);
}

.scenario-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.preset-btn {
  background: white;
  border: 2px solid #8cd1a8;
  color: #61686b;
  padding: 8px 16px;
  font-size: 0.85em;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  font-family: "Raleway", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s;
}
.preset-btn:hover {
  background: #8cd1a8;
  color: white;
}

.divider {
  border: 0;
  border-top: 1px solid #eee;
  margin: 30px 0;
}

.sliders-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px 50px;
  margin-bottom: 30px;
}
.slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 1.1em;
  font-weight: 700;
  margin-bottom: 5px;
  color: #61686b;
}
.val-display { 
  color: #8cd1a8;
  font-weight: 800;
} 
.slider-sub { 
  font-size: 0.75em; 
  color: #bbb; 
}

input[type="range"] {
  width: 100%;
  margin-top: 5px;
}

.actions-group {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
}

.primary-btn {
  background-color: #8cd1a8;
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 1em;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  text-transform: uppercase;
  font-family: "Raleway", sans-serif;
  transition: background 0.2s;
}
.primary-btn:hover { background-color: #9ed8b6; }

.secondary-btn {
  background-color: #f4f4f4;
  color: #666;
  border: 1px solid #ddd;
  padding: 12px 20px;
  font-size: 1em;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  text-transform: uppercase;
  font-family: "Raleway", sans-serif;
  transition: all 0.2s;
}
.secondary-btn:hover { background-color: #e2e6ea; }
.secondary-btn.active {
  background-color: #fff1f0;
  color: #d63031;
  border-color: #ffcccc;
}

/* Chart Area Visualization */
.chart-wrap {
  text-align: center;
  margin-bottom: 40px;
}
#chart-title {
  margin-bottom: 15px;
  font-size: 1.5em;
  color: #333;
  text-transform: none;
}
/* ai explain the each factor meaning to help me decide */
.band90 { fill: #fec44f; fill-opacity: 0.5; stroke: none; }
.band50 { fill: #fa9fb5; fill-opacity: 0.7; stroke: none; }
.median { fill: none; stroke: #88419d; stroke-width: 3px; }

.locked-layer { opacity: 0.5; pointer-events: none; }
.locked-band90 { fill: #d1d1d1; stroke: none; }
.locked-band50 { fill: #b0b0b0; stroke: none; }
.locked-median { fill: none; stroke: #666; stroke-width: 2px; stroke-dasharray: 6, 4; }

.legend { margin-top: 20px; font-size: 0.85em; }
.legend span { margin: 0 15px; position: relative; padding-left: 20px; color: #666; }

.legend .band90::before { content:""; background:#fec44f; width:12px; height:12px; position:absolute; left:0; top:3px; }
.legend .band50::before { content:""; background:#fa9fb5; width:12px; height:12px; position:absolute; left:0; top:3px; }
.legend .median::before { content:""; background:#88419d; width:12px; height:3px; position:absolute; left:0; top:8px; }

/* Axis styles */
.x-axis text,
.y-axis text {
  font-size: 15px;              
  font-family: "Raleway", sans-serif;
  fill: #777;                   
}

.x-axis path,
.x-axis line,
.y-axis path,
.y-axis line {
  stroke: #ccc;                
  stroke-width: 1.5px;          
}

.axis-label {
  fill: #666;
  font-size: 15px;
  font-family: "Raleway", sans-serif;
}

/* Methodology Section */
.methods {
  margin-top: 60px;
  font-size: 0.85em;
  color: #888;
  border-top: 1px solid #eee;
  padding-top: 20px;
  text-align: left;
}
.methods h2 {
  text-align: left;
  font-size: 1.2em;
  margin-bottom: 15px;
}
code {
  background: #f4f4f4;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  color: #555;
  border: 1px solid #eee;
}

/* Dynamic UI Elements */

.chart-subtitle {
  font-size: 0.9rem;       
  color: #4b4e4d;          
  margin-top: 8px;
  background-color: #f4f6f8; 
  padding: 6px 12px;
  border-radius: 6px;      
  display: inline-block;   
  border: 1px solid #e1e4e8;
  font-family: monospace;
}

.chart-subtitle strong {
  color: #333;             
  font-weight: 800;
}

.lock-hint {
  font-size: 1.1rem;
  color: #d40d52;
  font-style: italic;
  margin-right: 15px;      
  align-self: center;      
  display: flex;
  align-items: center;
  gap: 5px;
}

/* References Section Styles */

.ref-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left; 
}

.ref-list li {
  font-size: 0.9rem;
  color: #666;
  margin-top: 20px;
  margin-bottom: 15px;
  padding-left: 15px;
  border-left: 3px solid #e0e0e0;
  line-height: 1.5;
  transition: all 0.2s ease;
}

.ref-list li:hover {
  border-left-color: #8cd1a8;
  color: #333;
}

.ref-list strong {
  color: #333;
  font-weight: 700;
}

.ref-list em {
  font-style: italic;
  color: #555;
}

.ref-list a {
  color: #6ab086;
  text-decoration: none;
  margin-left: 5px;
  font-size: 0.85em;
}

.ref-list a:hover {
  text-decoration: underline;
}

/* Spacing Overrides */

.container .methods h2, 
.container #references h2 {
  margin-top: 0 !important;        
  margin-bottom: 25px !important;  
  padding-bottom: 15px !important; 
  border-bottom: 1px solid #eee; 
  text-transform: none !important; 
  letter-spacing: normal !important; 
}

.container .methods, 
.container #references {
  margin-top: 50px !important;     
  padding-top: 0 !important;    
}

.container .methods p, 
.container .ref-list {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Locked Scenario Legend Item */
.legend .locked-legend {
  margin-left: 25px;
  position: relative;
  padding-left: 20px;
  color: #888;
  font-style: italic;
}

.legend .locked-legend::before {
  content: "";
  background-color: #d1d1d1;
  width: 12px;
  height: 12px;
  position: absolute;
  left: 0;
  top: 3px;
  border: 1px dashed #999; 
}

.chart-caption {
  margin-top: 30px;
  padding: 20px;
  background-color: #f9f9f9;
  border-left: 4px solid #8cd1a8;
  border-radius: 6px;
  text-align: left;
  font-family: "Raleway", sans-serif;
}

.chart-caption h4 {
  margin: 0 0 10px 0;
  font-size: 1.3rem;
  color: #333;
  text-transform: none;
  letter-spacing: normal;
  display: flex;
  margin-left: -4px;
  align-items: center;
  gap: 8px;
}

.chart-caption h4 i {
  color: #8cd1a8;
}

.chart-caption p {
  margin: 0;
  font-size: 1.1rem;
  color: #666;
  line-height: 1.6;
}

.chart-caption strong {
  font-weight: 700;
}

.chart-caption em {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  color: #888;
  font-style: italic;
}
.slider-global-hint {
  margin: 0 0 15px 0;
  font-size: 1.1rem;
  color: #777;
  font-style: italic;
}
