/* Methodology page — extends the dark/light theme tokens from styles.css */

.method-main { max-width: 880px; padding-top: 24px; padding-bottom: 80px; }

.big-h { font-size: 24px; margin: 36px 0 18px; text-align: center; letter-spacing: -0.01em; }

.tldr-card {
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-top: 12px;
}
.tldr-card h2 { margin: 0 0 8px; color: var(--accent); font-size: 16px; letter-spacing: -0.01em; }
.tldr-card p { margin: 0; font-size: 16px; line-height: 1.65; color: var(--text); }

.pipeline {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin: 16px 0 44px;
  flex-wrap: wrap;
  justify-content: center;
}
.step {
  flex: 1 1 160px;
  min-width: 160px;
  max-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
}
.step .num {
  display: inline-block;
  width: 28px; height: 28px; line-height: 28px;
  border-radius: 50%;
  background: var(--accent); color: white;
  font-weight: 700; margin-bottom: 8px;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
}
.step h4 { margin: 0 0 4px; font-size: 13px; color: var(--text); font-weight: 600; }
.step p  { margin: 0; font-size: 11px; color: var(--text-2); line-height: 1.45; }
.arrow { align-self: center; color: var(--text-3); font-size: 18px; }
@media (max-width: 780px) {
  .arrow { display: none; }
  .step { flex: 1 1 45%; max-width: none; }
}

.explain {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 20px;
  margin: 32px 0;
  padding: 24px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.explain.warn {
  border-color: color-mix(in srgb, var(--danger) 30%, var(--border));
  background: color-mix(in srgb, var(--danger) 5%, var(--surface));
}
.explain-icon { color: var(--accent); padding-top: 2px; }
.explain.warn .explain-icon { color: var(--danger); }
.explain h2 { margin: 0 0 12px; font-size: 20px; letter-spacing: -0.01em; }
.explain p, .explain li { color: var(--text); font-size: 14px; }
.explain ul, .explain ol { padding-left: 20px; }
.explain li { margin: 6px 0; }

/* P1-A: prevent right-edge clipping on mobile. The default grid layout
   `48px 1fr` keeps a fixed icon column; the 1fr cell needs `min-width: 0`
   so its long children (formulas, code, tables) can shrink/scroll instead
   of overflowing the viewport. */
.explain > *:not(.explain-icon) { min-width: 0; }
.explain pre, .explain code, .explain table { max-width: 100%; }
.explain pre { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.explain table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 600px) {
  .explain {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }
  .explain-icon { display: none; }
  .explain h2 { font-size: 17px; }
  .explain pre { font-size: 11px; padding: 10px; }
}

.example-box {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 14px 0;
}
.example-title {
  text-transform: uppercase;
  color: var(--accent);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}
@media (max-width: 700px) { .features-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .features-grid { grid-template-columns: 1fr; } }
.feature-chip {
  background: var(--surface-elev);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-2);
}
.feature-chip strong { color: var(--text); display: block; margin-bottom: 4px; font-weight: 600; }

.data-sources li { margin: 8px 0; }
.data-sources code {
  background: var(--surface-elev);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: var(--font-mono);
}

.walkthrough { counter-reset: step; padding-left: 0; list-style: none; }
.walkthrough li {
  padding-left: 40px;
  margin: 12px 0;
  position: relative;
  min-height: 28px;
}
.walkthrough li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 28px; height: 28px;
  line-height: 28px;
  border-radius: 50%;
  background: var(--accent); color: white;
  font-weight: 700; text-align: center;
  font-family: var(--font-mono);
}
.small-walk li { font-size: 13px; padding-left: 32px; margin: 6px 0; min-height: 22px; }
.small-walk li::before { width: 22px; height: 22px; line-height: 22px; font-size: 11px; }

.cta {
  text-align: center;
  margin: 56px 0 16px;
  padding: 36px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 6%, var(--surface)), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.cta h2 { margin: 0 0 18px; }
.cta-button {
  display: inline-block;
  background: var(--accent); color: white;
  font-weight: 600;
  text-decoration: none;
  padding: 12px 26px;
  border-radius: var(--radius);
  transition: transform .15s, box-shadow .15s;
}
.cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent);
}
