/* ============================================================
   PDMS deep dive page. Reuses tokens and components from
   styles.css and investors.css. Only page-specific pieces here.
   ============================================================ */

.pdms-hero {
  padding: 150px 0 80px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 20% 0%, rgba(var(--violet-rgb), 0.10), transparent 55%);
}
.pdms-hero h1 { max-width: 900px; margin-bottom: 22px; }
.pdms-hero .positioning { font-size: 19px; color: var(--muted); max-width: 660px; }
.back-link {
  display: flex; width: fit-content; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--muted); text-decoration: none;
  margin-bottom: 28px; transition: color 0.2s;
}
.back-link:hover { color: var(--cyan); }

/* ---------- Step flow ----------
   Built in HTML rather than SVG so it reflows on a phone instead of
   scaling down into illegibility. The connector line is drawn with a
   pseudo element so it never breaks across a wrap. */
.phase { margin-top: 56px; }
.phase-head {
  display: flex; align-items: baseline; gap: 14px;
  padding-bottom: 14px; margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.phase-num {
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--cyan); font-weight: 700;
}
.phase-head h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.phase-head .when { margin-left: auto; font-size: 13px; color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 18px; }
.step-card {
  position: relative;
  border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 20px 20px;
  background: rgba(var(--fill-rgb), 0.02);
}
.step-card .n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  font-size: 12px; font-weight: 800; color: var(--on-accent);
  background: linear-gradient(135deg, var(--violet), var(--accent-deep));
  margin-bottom: 14px;
}
.step-card h4 { font-size: 15px; margin-bottom: 8px; letter-spacing: -0.01em; }
.step-card p { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.step-card .risk {
  display: block; margin-top: 12px; padding-top: 11px;
  border-top: 1px dashed rgba(var(--warn-rgb), 0.3);
  font-size: 12.5px; color: var(--warn); line-height: 1.5;
}

/* ---------- Diagrams ---------- */
.figure {
  margin: 46px 0 0; border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); overflow: hidden;
}
.figure svg { display: block; width: 100%; height: auto; }
.figure figcaption {
  padding: 16px 22px; font-size: 13.5px; line-height: 1.6;
  color: var(--muted); border-top: 1px solid var(--line);
}
.figure figcaption strong { color: var(--text); font-weight: 600; }

/* ---------- Cost tables ---------- */
.cost-table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin-top: 26px; }
.cost-table thead th {
  text-align: left; padding: 12px 16px;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cyan); font-weight: 700; border-bottom: 1px solid var(--line);
}
.cost-table tbody th {
  text-align: left; padding: 15px 16px; font-weight: 600; color: var(--text);
  vertical-align: top; border-bottom: 1px solid var(--line); width: 34%;
}
.cost-table tbody td {
  padding: 15px 16px; color: var(--muted); vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.cost-table .price { color: var(--cost); font-weight: 700; white-space: nowrap; }
/* Non-cost figures in a cost-table layout stay violet: they are data, not our argument. */
.cost-table .count { color: var(--uv); font-weight: 700; white-space: nowrap; }
.cost-table tbody tr:hover { background: rgba(var(--fill-rgb), 0.02); }
/* Two states only. "listed" means the figure was verified against a real
   current listing. "estimate" means no published price exists, which for
   capital equipment in this class is the normal case, not a research gap. */
.tag-v, .tag-e {
  display: inline-block; font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 2px; margin-left: 9px;
  vertical-align: 1px; white-space: nowrap;
}
.tag-v { color: var(--cyan); border: 1px solid rgba(var(--cyan-rgb), 0.45); background: rgba(var(--cyan-rgb), 0.07); }
.tag-e { color: var(--muted); border: 1px solid var(--line); background: var(--surface); }

.cost-note {
  margin-top: 18px; font-size: 12.5px; line-height: 1.65; color: var(--muted);
  border-left: 2px solid var(--line); padding-left: 16px;
}

/* ---------- Failure list ---------- */
.fail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 42px; }
.fail {
  border: 1px solid var(--line); border-radius: 14px; padding: 26px 24px;
  background: rgba(var(--fill-rgb), 0.02);
}
.fail h4 { font-size: 16px; margin-bottom: 9px; color: var(--uv); }
.fail p { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ---------- Video links ---------- */
.vids { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.vid {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: 14px; padding: 24px 22px;
  background: rgba(var(--fill-rgb), 0.02); transition: border-color 0.25s, transform 0.25s;
}
.vid:hover { border-color: var(--violet); transform: translateY(-3px); }
.vid .play {
  width: 38px; height: 38px; border-radius: 50%; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  color: var(--on-accent); font-size: 13px;
}
.vid h4 { font-size: 15px; margin-bottom: 6px; }
.vid span { font-size: 12.5px; color: var(--muted); }

@media (max-width: 860px) {
  .fail-grid, .vids { grid-template-columns: 1fr; }
  .phase-head { flex-wrap: wrap; }
  .phase-head .when { margin-left: 0; width: 100%; }
}
@media (max-width: 640px) {
  .cost-table thead { display: none; }
  .cost-table, .cost-table tbody, .cost-table tr, .cost-table th, .cost-table td { display: block; width: 100%; }
  .cost-table tr { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; padding: 4px; }
  .cost-table tbody th { border-bottom: 1px solid var(--line); width: auto; }
  .cost-table tbody td { border-bottom: none; padding: 10px 16px; }
  .cost-table tbody td::before {
    content: attr(data-label); display: block; color: var(--cyan);
    font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
    margin-bottom: 3px; font-weight: 700;
  }
}

/* Links inside captions, notes, and step copy inherit the site link style
   rather than falling back to browser blue. */
.figure figcaption a, .cost-note a, .step-card a, .fail p a {
  color: var(--uv); text-decoration: underline;
  text-underline-offset: 3px; text-decoration-color: rgba(var(--uv-rgb), 0.5);
  transition: color 0.2s, text-decoration-color 0.2s;
}
.figure figcaption a:hover, .cost-note a:hover, .step-card a:hover, .fail p a:hover {
  color: var(--cyan); text-decoration-color: var(--cyan);
}
