/* ─────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: #fff;
  color: #333;
  font-size: 13px;
  /* sticky footer: body fills the viewport, the page wrapper grows inside it */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Wraps header + content + footer on every page (the <form> on the model
   pages). Its main content grows, so the footer sits at the bottom of the
   viewport on short pages and below everything on long ones — no overlap. */
.page-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page-wrapper > .page-body,
.page-wrapper > .page-main {
  flex: 1;
}

/* ─────────────────────────────────────────
   HEADER
───────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 2px solid #4cb6b6;
  background: #fff;
}

.site-logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: #4cb6b6;
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 14px 0;
  white-space: nowrap;
  margin-right: 32px;
}

.tab-nav {
  display: flex;
  align-items: stretch;
}

.tab-nav a {
  display: flex;
  align-items: center;
  padding: 14px 28px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4cb6b6;
  text-decoration: none;
  border: 2px solid #4cb6b6;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  margin-right: 4px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.tab-nav a:hover,
.tab-nav a.active {
  background: #4cb6b6;
  color: #fff;
}

/* ─────────────────────────────────────────
   PAGE BODY
───────────────────────────────────────── */
.page-body {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 20px 24px 0;
}

/* ─────────────────────────────────────────
   LEFT PANEL
───────────────────────────────────────── */
.left-panel {
  width: 190px;
  flex-shrink: 0;
  align-self: flex-start;
}

.stock-input-block {
  margin-bottom: 20px;
}

.panel-label {
  font-size: 11px;
  font-weight: 700;
  color: #006666;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d1d1d1;
  border-radius: 6px;
  padding: 7px 10px;
  background: #fff;
}

.search-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.5;
}

.search-box input {
  border: none;
  outline: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #333;
  width: 100%;
  background: transparent;
}

/* Features card */
.features-card {
  border: 1px solid #dcdfe3;
  border-radius: 8px;
  padding: 14px 16px;
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  color: #333;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.group-label {
  font-size: 11px;
  font-weight: 700;
  color: #555;
  margin: 14px 0 8px;
}

.check-list {
  list-style: none;
}

.check-list li {
  margin-bottom: 9px;      /* a little breathing room between features */
}

.cb-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: #444;
  user-select: none;
}

/* Hide native checkbox */
.cb-label input[type="checkbox"] {
  display: none;
}

/* Custom checkbox box */
.cb-box {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: #dcdfe3;
  flex-shrink: 0;
  position: relative;
  transition: background 0.15s;
}

/* Checked state */
.cb-label input[type="checkbox"]:checked + .cb-box {
  background: #4cb6b6;
}

/* Checkmark tick */
.cb-label input[type="checkbox"]:checked + .cb-box::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0px;
  width: 4px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Disabled + checked — layer_1 is always on. (Scoped to :checked so a
   locked, unchecked layer_3 doesn't also render as ticked.) */
.cb-label input[type="checkbox"]:disabled:checked + .cb-box {
  background: #4cb6b6;
  opacity: 0.65;
  cursor: not-allowed;
}

.cb-label input[type="checkbox"]:disabled:checked + .cb-box::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0px;
  width: 4px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Disabled layer row — dims the whole row */
.layer-row.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ─────────────────────────────────────────
   RIGHT CONTENT
───────────────────────────────────────── */
.right-content {
  flex: 1;
  min-width: 0;
}

/* ─────────────────────────────────────────
   CONTROLS ROW
───────────────────────────────────────── */
.controls-row {
  display: flex;
  align-items: stretch;
  gap: 16px;
  margin-bottom: 16px;
}

.ctrl-card {
  flex: 1;
  border: 1px solid #dcdfe3;
  border-radius: 8px;
  padding: 16px 18px;
  background: #fff;
  min-width: 0;
}

.ctrl-card .card-title {
  border-bottom: 1px solid #eee;
  margin-bottom: 14px;
}

/* ── Radio list ── */
.radio-list {
  list-style: none;
  margin-bottom: 18px;
}

.radio-list li {
  margin-bottom: 10px;
}

.rb-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: #444;
  user-select: none;
}

.rb-label input[type="radio"] {
  display: none;
}

.rb-circle {
  width: 13px;
  height: 13px;
  border: 2px solid #4cb6b6;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}

.rb-label input[type="radio"]:checked + .rb-circle::after {
  content: "";
  width: 7px;
  height: 7px;
  background: #4cb6b6;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* ── Slider row (Generalize / Memorize) ── */
.slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.slider-label {
  font-size: 11px;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
}

/* ── Field rows (dates, interval, learning rate) ── */
.field-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
  width: 68px;
}

.ctrl-card input[type="date"],
.ctrl-card select {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  border: 1px solid #dcdfe3;
  border-radius: 4px;
  padding: 5px 8px;
  color: #333;
  background: #fff;
  flex: 1;
  min-width: 0;
}

/* ── Slider block ── */
.slider-block {
  margin-top: 14px;
}

.slider-block-label {
  font-size: 12px;
  font-weight: 700;
  color: #333;
  margin-bottom: 6px;
}

.slider-block-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.slider-value {
  font-size: 12px;
  font-weight: 700;
  color: #4cb6b6;
  min-width: 30px;
  text-align: right;
}

.full-slider {
  width: 100% !important;
}

/* ── Named sliders (Trading Controls) ── */
.named-slider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.named-slider-label {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  width: 100px;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────
   SHARED SLIDER STYLES
───────────────────────────────────────── */
.sq-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  flex: 1;
  background: linear-gradient(to right, #4cb6b6 50%, #dcdfe3 50%);
}

.sq-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: #4cb6b6;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #4cb6b6;
  cursor: pointer;
}

.sq-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: #4cb6b6;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #4cb6b6;
  cursor: pointer;
}

/* ─────────────────────────────────────────
   ACTION BAR: next-interval call + Run button
───────────────────────────────────────── */
.action-bar {
  display: flex;
  align-items: stretch;
  gap: 16px;
  margin-bottom: 16px;
}

.forecast {
  --accent: #4cb6b6;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 20px;
  border: 1px solid #dcdfe3;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 14px 22px;
  background: #fff;
}

.forecast-buy  { --accent: #2a9d78; }
.forecast-sell { --accent: #d64545; }

.forecast-badge {
  flex-shrink: 0;
  min-width: 92px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #fff;
  background: var(--accent);
  border-radius: 8px;
  padding: 10px 16px;
}

.forecast-body {
  flex: 1;
  min-width: 0;
}

.forecast-title {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  margin-bottom: 8px;
}

.forecast-meter {
  height: 8px;
  border-radius: 4px;
  background: #eef0f2;
  overflow: hidden;
}

.forecast-meter-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
}

.forecast-conf {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #888;
}

.forecast-conf span {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* before the first run */
.forecast-empty {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  border-left-color: #dcdfe3;
}

.forecast-empty .forecast-title {
  margin-bottom: 0;
}

.forecast-hint {
  font-size: 12px;
  color: #888;
}

.run-btn {
  flex-shrink: 0;
  min-width: 210px;
  background: #4cb6b6;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0 36px;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(76, 182, 182, 0.35);
  transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
}

.run-btn:hover {
  background: #3aa5a5;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(76, 182, 182, 0.45);
}

.run-btn:disabled {
  background: #a9d8d8;
  box-shadow: none;
  transform: none;
  cursor: progress;
}

/* ─────────────────────────────────────────
   CHART OUTPUT
───────────────────────────────────────── */
.output {
  width: 100%;
}

/* ─────────────────────────────────────────
   DEEP LEARNING — LAYER BUILDER
───────────────────────────────────────── */
.layer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 0.5px solid #eee;
}

.layer-row:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.layer-label {
  min-width: 66px;
  flex-shrink: 0;
}

.neuron-select {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  border: 1px solid #dcdfe3;
  border-radius: 4px;
  padding: 4px 6px;
  color: #333;
  background: #fff;
  width: 62px;
  flex-shrink: 0;
}

.neuron-label {
  font-size: 11px;
  font-weight: 500;
  color: #888;
  white-space: nowrap;
}

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
.site-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px;
  border-top: 1px solid #eee;
  margin-top: 8px;
  gap: 40px;
}

.footer-left h4 {
  font-size: 14px;
  font-weight: 600;
  color: #555;
  margin-bottom: 10px;
}

.footer-left p {
  font-size: 11px;
  font-weight: 500;
  color: #777;
  max-width: 360px;
  line-height: 1.6;
}

.footer-badges {
  list-style: none;
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.footer-badges li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #555;
  font-weight: 600;
}

.footer-badges li img {
  width: 18px;
}

.footer-center ul {
  list-style: none;
  display: flex;
}

.footer-center ul li {
  position: relative;
  padding: 0 12px;
}

.footer-center ul li + li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  height: 14px;
  border-left: 1px solid #aaa;
}

.footer-center ul li a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: #555;
}

.footer-center ul li a:hover {
  color: #4cb6b6;
}

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 1100px) {
  .controls-row {
    flex-wrap: wrap;
  }
  .ctrl-card {
    min-width: 200px;
  }
}

@media (max-width: 768px) {
  .page-body {
    flex-direction: column;
  }
  .left-panel {
    width: 100%;
  }
  .features-card {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
  }
  .features-card .card-title {
    width: 100%;
  }
  .tab-nav a {
    padding: 10px 14px;
    font-size: 0.75rem;
  }
  .site-footer {
    flex-direction: column;
    gap: 20px;
  }
  .action-bar {
    flex-direction: column;
  }
  .forecast {
    flex-wrap: wrap;
    gap: 12px 16px;
  }
  .run-btn {
    padding: 15px 24px;
  }
}

@media (max-width: 480px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px 0;
  }
  .site-logo {
    margin-bottom: 8px;
  }
  .tab-nav {
    flex-wrap: wrap;
  }
}




/* ─────────────────────────────────────────
   PROGRESS BAR (LSTM / RL training)
───────────────────────────────────────── */
.progress-wrap {
  max-width: 640px;
  margin: 40px auto;
  padding: 0 16px;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #444;
}

#progress_pct {
  font-weight: 700;
  color: #2f6fed;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  height: 12px;
  border-radius: 6px;
  background: #dcdfe3;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 6px;
  background: #2f6fed;
  transition: width 0.5s linear;   /* slides between updates */
}

/* ─────────────────────────────────────────
   ABOUT PAGE
───────────────────────────────────────── */
.about-page {
  padding: 20px 24px;
}

.about-card {
  max-width: 720px;
  border: 1px solid #dcdfe3;
  border-radius: 8px;
  padding: 16px 18px;
  background: #fff;
}

.about-card p {
  font-size: 13px;
  line-height: 1.7;
  color: #555;
  margin-bottom: 20px;
}

.about-card p:last-child {
  margin-bottom: 0;
}

.about-card .disclaimer {
  font-size: 12px;
  color: #777;
}

/* Financial disclaimer in the footer, under "About StocksQuantified.com" */
.footer-disclaimer {
  margin-top: 10px;
  font-size: 10.5px !important;
  font-style: italic;
  color: #999 !important;
}

/* ─────────────────────────────────────────
   GUIDE PAGE
───────────────────────────────────────── */
.guide-page {
  display: flex;
  align-items: flex-start;
  gap: 36px;
  padding: 28px 32px 56px;
}

/* Contents list: sticky, highlights the section being read */
.guide-toc {
  position: sticky;
  top: 20px;
  flex: 0 0 230px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid #dcdfe3;
  border-radius: 10px;
  padding: 16px 12px 18px;
  background: #fff;
}

.guide-toc-title {
  font-size: 12px;
  font-weight: 700;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0 8px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid #eee;
}

.guide-toc-group {
  font-size: 11px;
  font-weight: 700;
  color: #1f7a7a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 14px 8px 4px;
}

.guide-toc a {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  color: #555;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 6px;
  border-left: 3px solid transparent;
}

.guide-toc a:hover {
  background: #f2f8f8;
  color: #1f7a7a;
}

.guide-toc a.active {
  background: #e6f4f4;
  color: #1f7a7a;
  font-weight: 600;
  border-left-color: #4cb6b6;
}

/* Main column */
.guide-content {
  flex: 1;
  min-width: 0;
  max-width: 1000px;
  counter-reset: guide-part;
}

.guide-content [id] {
  scroll-margin-top: 20px;
}

/* Intro */
.guide-intro h1 {
  font-size: 2.1rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 10px;
}

.guide-intro > p {
  font-size: 15px;
  line-height: 1.75;
  color: #555;
  max-width: 760px;
}

.guide-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.guide-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.55;
  color: #444;
  background: #fff;
  border: 1px solid #dcdfe3;
  border-radius: 10px;
  padding: 14px 16px;
}

.guide-steps li span {
  flex: 0 0 26px;
  height: 26px;
  border-radius: 50%;
  background: #4cb6b6;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-steps li p {
  margin: 0;
}

/* Each main section sits on its own tinted, numbered panel */
.guide-section {
  margin-top: 40px;
  padding: 28px 30px 32px;
  background: #f6f8f9;
  border: 1px solid #e6e9ec;
  border-radius: 14px;
}

.guide-section h2 {
  counter-increment: guide-part;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.6rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 8px;
}

.guide-section h2::before {
  content: counter(guide-part, decimal-leading-zero);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  background: #4cb6b6;
  border-radius: 8px;
  padding: 6px 9px;
}

.guide-lead {
  font-size: 14.5px;
  line-height: 1.75;
  color: #555;
  max-width: 780px;
}

/* Model cards: colored top edge per family, +/- markers */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.guide-card {
  --family: #4cb6b6;                 /* Machine Learning */
  background: #fff;
  border: 1px solid #dcdfe3;
  border-top: 4px solid var(--family);
  border-radius: 10px;
  padding: 18px 20px 20px;
}

.guide-card-deep { --family: #6a7cff; }   /* Deep Learning */
.guide-card-rl   { --family: #e0a53f; }   /* Reinforcement Learning */

.guide-card-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 12px;
}

.guide-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: #222;
}

.guide-tag {
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  color: #1f7a7a;
  background: #e6f4f4;
  border-radius: 10px;
  padding: 3px 10px;
}

.guide-tag-deep {
  color: #4a55c4;
  background: #eceefc;
}

.guide-tag-rl {
  color: #a05f12;
  background: #fbf1e3;
}

.guide-card > p {
  font-size: 14px;
  line-height: 1.7;
  color: #444;
  padding-bottom: 14px;
  border-bottom: 1px solid #eee;
}

.guide-card dt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #333;
  margin-top: 14px;
}

.guide-card dt::before {
  flex: 0 0 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.guide-card dt:first-of-type::before { content: "+"; background: #2a9d78; }
.guide-card dt:last-of-type::before  { content: "\2212"; background: #d64545; }

.guide-card dd {
  font-size: 13.5px;
  line-height: 1.65;
  color: #555;
  margin: 5px 0 0 26px;
}

/* Input groups: each a white card with its own header */
.guide-block {
  margin-top: 22px;
  background: #fff;
  border: 1px solid #dcdfe3;
  border-radius: 10px;
  overflow: hidden;
}

.guide-block h3 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: #222;
  padding: 16px 22px;
  background: #fbfcfc;
  border-bottom: 1px solid #e6e9ec;
}

.guide-block h3::before {
  content: "";
  width: 4px;
  height: 20px;
  border-radius: 2px;
  background: #4cb6b6;
}

.guide-block > p {
  font-size: 14px;
  line-height: 1.7;
  color: #555;
  padding: 14px 22px 0;
}

.guide-block h4 {
  font-size: 12px;
  font-weight: 700;
  color: #1f7a7a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 18px 22px 6px;
}

.guide-scope {
  font-size: 10.5px;
  font-weight: 600;
  color: #777;
  background: #eef0f2;
  border-radius: 10px;
  padding: 3px 10px;
}

.guide-inputs {
  display: grid;
  grid-template-columns: minmax(170px, 240px) 1fr;
}

.guide-inputs dt,
.guide-inputs dd {
  padding: 14px 22px;
  border-top: 1px solid #f0f1f3;
  line-height: 1.65;
}

.guide-inputs dt:first-of-type,
.guide-inputs dt:first-of-type + dd {
  border-top: none;
}

.guide-inputs dt {
  font-size: 14px;
  font-weight: 600;
  color: #1f7a7a;
}

.guide-inputs dd {
  font-size: 14px;
  color: #555;
}

.guide-inputs a {
  color: #1f7a7a;
}

.guide-alt {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: #999;
  margin-top: 2px;
}

.guide-note {
  font-size: 13px;
  line-height: 1.6;
  color: #777;
  padding: 12px 22px 16px;
  border-top: 1px solid #f0f1f3;
}

/* Limitations */
.guide-limits {
  list-style: none;
  margin-top: 18px;
  background: #fff;
  border: 1px solid #dcdfe3;
  border-radius: 10px;
  overflow: hidden;
}

.guide-limits li {
  position: relative;
  padding: 15px 22px 15px 52px;
  font-size: 14px;
  line-height: 1.7;
  color: #555;
  border-top: 1px solid #f0f1f3;
}

.guide-limits li:first-child {
  border-top: none;
}

.guide-limits li::before {
  content: "!";
  position: absolute;
  left: 20px;
  top: 17px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e0a53f;            /* amber: a caution, not an error */
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-limits strong {
  color: #222;
  font-weight: 700;
}

@media (max-width: 900px) {
  .guide-page {
    flex-direction: column;
    gap: 20px;
  }
  .guide-toc {
    position: static;
    flex: none;
    width: 100%;
    max-height: none;
  }
  .guide-section {
    padding: 22px 18px 24px;
  }
}

@media (max-width: 600px) {
  .guide-page {
    padding: 18px 16px 36px;
  }
  .guide-inputs {
    grid-template-columns: 1fr;
  }
  .guide-inputs dt {
    padding-bottom: 2px;
  }
  .guide-inputs dd {
    border-top: none;
    padding-top: 2px;
  }
  .guide-block h3,
  .guide-block > p,
  .guide-block h4,
  .guide-inputs dt,
  .guide-inputs dd,
  .guide-note {
    padding-left: 16px;
    padding-right: 16px;
  }
}

.forecast-conf span small {
  font-size: 13px;
  font-weight: 600;
  color: #999;
  margin-left: 1px;
}

/* Result charts: side by side when there's room, stacked when there isn't,
   so the x-axis labels never get squeezed. A grid (not flex) so each chart's
   column already has its final width when Plotly first draws it. */
.chart-row {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 16px;
}

@media (max-width: 1150px) {
  .chart-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Phones: badge + strength on the first row, date and meter full width below */
@media (max-width: 600px) {
  .forecast {
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 14px 16px;
  }
  .forecast-body {
    order: 3;
    flex-basis: 100%;
  }
}
