/* ============================================================
   Forgedown — mockups: the raw-vs-rendered panel + screenshots
   Everything in here re-pins DARK values: the app UI shown inside a
   frame must stay dark even when the site is in light mode.
   ============================================================ */

.md-compare {
  --m-bg: #101218;
  --m-line: rgba(255, 255, 255, .08);
  --m-text: #EDF1F7;
  --m-muted: #A9AFBB;
  --m-faint: #7E8694;
  --m-dim: #565D69;

  max-width: 960px;
  margin: var(--s-8) auto 0;
  border-radius: var(--r-card);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--m-bg);
  box-shadow: var(--shadow-2);
}

.md-compare__bar {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 12px 18px;
  border-bottom: 1px solid var(--m-line);
  background: rgba(255, 255, 255, .03);
}
.md-compare__dot {
  width: 11px;
  height: 11px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .16);
}
.md-compare__file {
  margin-left: var(--s-3);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--m-faint);
}

.md-compare__panes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  position: relative;
}

/* the ember seam: raw source forging into rendered output */
.md-compare__seam {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, #FF9E48 30%, #FF5E2C 70%, transparent);
  box-shadow: 0 0 14px rgba(255, 138, 61, .55);
  z-index: 1;
}

.md-compare__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  margin-bottom: var(--s-3);
}

.md-raw {
  padding: 26px 28px;
  background: rgba(0, 0, 0, .3);
}
.md-raw .md-compare__label { color: var(--m-dim); }
.md-raw__code {
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--m-faint);
  margin: 0;
  overflow-x: auto;
  white-space: pre;
}
.md-raw__code b { color: var(--m-muted); font-weight: 400; }

.md-rendered { padding: 26px 30px; background: var(--m-bg); color: var(--m-text); }
.md-rendered .md-compare__label { color: #FF8A3D; }
.md-rendered__h { font-size: 21px; font-weight: 700; letter-spacing: -.02em; margin-bottom: var(--s-3); }

.md-table {
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--r-chip);
  overflow: hidden;
  font-size: 13px;
  margin-bottom: var(--s-3);
}
.md-table__row {
  display: grid;
  grid-template-columns: 1fr 1fr .6fr;
  padding: 7px 12px;
  gap: var(--s-2);
  font-variant-numeric: tabular-nums;
}
.md-table__row--head { background: rgba(255, 255, 255, .06); font-weight: 600; }
.md-table__row + .md-table__row { border-top: 1px solid rgba(255, 255, 255, .07); }
.md-table__delta { color: #FF8A3D; }

.md-tasks { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; margin-bottom: var(--s-3); }
.md-task { display: flex; align-items: center; gap: 9px; }
.md-task__box {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, .3);
  flex-shrink: 0;
}
.md-task__box--done {
  background: #FF8A3D;
  border-color: #FF8A3D;
  display: grid;
  place-items: center;
  color: #1A0E06;
  font-size: 11px;
  font-weight: 700;
}

.md-img {
  height: 64px;
  border-radius: var(--r-chip);
  margin-bottom: var(--s-3);
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .05) 6px, rgba(255, 255, 255, .02) 6px, rgba(255, 255, 255, .02) 12px);
  border: 1px dashed rgba(255, 255, 255, .18);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--m-faint);
}

.md-code {
  border-radius: var(--r-chip);
  background: rgba(0, 0, 0, .4);
  border: 1px solid var(--m-line);
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--m-text);
  margin: 0;
  overflow-x: auto;
}
.md-code .k { color: #C58BFF; }
.md-code .kw { color: #FF9E48; }
.md-code .t { color: #7AC8FF; }

@media (max-width: 700px) {
  .md-compare__seam { display: none; }
  .md-raw, .md-rendered { padding: 20px; }
}

/* --- Screenshots -------------------------------------------------- */

/* Mac captures already carry their own window chrome and backdrop —
   present them flat, no frame of ours. */
.shot {
  border-radius: var(--r-btn);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  background: #101218;
}
.showcase__media .shot { border: 1px solid var(--border); }

/* iPad and iPhone captures are bare, so they get a frame. */
.device { background: #101218; border: 1px solid var(--panel-2); box-shadow: var(--shadow-2); }
.device img { display: block; width: 100%; }
.device--pad { border-radius: 18px; padding: 10px; }
.device--pad img { border-radius: 10px; }
.device--phone { border-radius: 22px; padding: 8px; }
.device--phone img { border-radius: 16px; }

.device-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: var(--s-5);
  margin-top: var(--s-7);
  flex-wrap: wrap;
}
.device-col { display: flex; flex-direction: column; }
.device-col--mac { width: min(640px, 92vw); }
.device-col--pad { width: min(260px, 44vw); }
.device-col--phone { width: min(150px, 30vw); }

.device-col__caption {
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  margin-top: var(--s-3);
  text-wrap: balance;
}

@media (max-width: 700px) {
  .device-row { gap: var(--s-4); }
  .device-col--pad { width: min(220px, 46vw); }
  .device-col--phone { width: min(130px, 30vw); }
}
