/* ==========================================================================
   pages.css — what only some documents need.
   ========================================================================== */

/* ---- figures ----------------------------------------------------------- */
.fig-svg {
  width: 100%; height: auto; display: block;
  background: var(--plate); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 0.4rem;
}
figure .fig-svg + figcaption { margin-top: 0.8rem; }

/* ---- tick lists -------------------------------------------------------- */
.ticks { list-style: none; margin: 0.9rem 0 0; padding: 0; display: grid; gap: 0.7rem; }
.ticks li { position: relative; padding-left: 1.3rem; font-size: var(--step--1); color: var(--ink-2); }
.ticks li::before {
  content: ''; position: absolute; left: 0; top: 0.52em;
  width: 0.55rem; height: 1px; background: var(--accent-mark);
}

/* ---- a formula, set apart ---------------------------------------------- */
.formula {
  font-family: var(--mono); font-size: var(--step-1); color: var(--ink);
  background: var(--ground-2); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 0.9rem 1.1rem; margin: 1.2rem 0; overflow-x: auto;
}
.formula sup, .formula sub { font-size: 0.72em; }

/* ---- the audit tables -------------------------------------------------- */
table.audit td:first-child, table.audit th:first-child { white-space: nowrap; font-family: var(--mono); }
table.audit .pass { color: var(--verdigris); }
table.audit .ctrl { color: var(--garnet); }
table.audit .got { font-family: var(--mono); color: var(--ink-3); font-size: 0.94em; }
table td .prov { margin: 0; }

/* Swatches on /bench#palette. */
.swatch { display: inline-block; width: 2.6rem; height: 1.05rem; border: 1px solid var(--rule-2); border-radius: 2px; vertical-align: -0.2em; }

/* ---- the re-run panel -------------------------------------------------- */
.rerun-controls { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: end; }
.rerun-controls label { display: flex; flex-direction: column; gap: 0.28rem; font-size: var(--step--1); color: var(--ink-3); }
.rerun-controls select, .rerun-controls input {
  font-family: var(--mono); font-size: var(--step--1); padding: 0.42rem 0.55rem;
  background: var(--plate-2); color: var(--ink); border: 1px solid var(--rule-2); border-radius: var(--radius);
  min-width: 11rem;
}
.rerun-log {
  font-family: var(--mono); font-size: 0.78rem; color: var(--ink-3);
  background: var(--ground-2); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 0.7rem 0.85rem; margin-top: 1rem; max-height: 11rem; overflow-y: auto; white-space: pre-wrap;
}
.rerun-out { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; margin-top: 1rem; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); }
.rerun-out > div { background: var(--plate); padding: 0.7rem 0.85rem; }
.rerun-out dt { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--faint); margin: 0 0 0.2rem; }
.rerun-out dd { margin: 0; font-family: var(--mono); font-size: var(--step-0); color: var(--ink); }
.rerun-out dd .delta { font-size: 0.72em; color: var(--ink-3); display: block; margin-top: 0.15rem; }
.rerun-bar {
  height: 3px; background: var(--ground-2); border-radius: 2px; overflow: hidden;
  margin-top: 0.9rem; opacity: 0; transition: opacity 0.25s;
}
/* Visible only while something is being read. Left at 100% it is a solid
   accent rule sitting above the result, which reads as a divider somebody
   meant to put there. */
.rerun-bar[data-running='true'] { opacity: 1; }
.rerun-bar > i { display: block; height: 100%; width: 0; background: var(--accent-mark); transition: width 0.2s; }

/* ---- the og card and the X header --------------------------------------
   One document, two crops. The header keeps its bottom-left quarter empty
   because X puts the profile picture there, and keeps everything inside a
   centre band because X crops harder on a phone. */
body[data-page='og'] { background: var(--ground); }
body[data-page='og'] .bar, body[data-page='og'] .foot, body[data-page='og'] .skip { display: none; }
.og-card { position: relative; width: 1200px; height: 630px; overflow: hidden; background: var(--deep); }
.og-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.og-body {
  position: absolute; inset: 0; padding: 72px 80px; display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(100deg, var(--ground) 0%, color-mix(in oklab, var(--ground) 92%, transparent) 44%, transparent 78%),
              linear-gradient(to top, var(--ground) 4%, transparent 46%);
}
.og-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.og-brand svg { display: block; }
.og-brand span {
  font-family: var(--display); font-weight: 600; font-size: 24px;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink);
}
.og-body h1 { font-size: 78px; line-height: 0.98; letter-spacing: -0.035em; }
.og-line { font-size: 25px; color: var(--ink-2); margin: 26px 0 0; max-width: 34ch; line-height: 1.35; }
.og-proof {
  font-family: var(--mono); font-size: 16px; color: var(--faint); margin: 18px 0 0;
  letter-spacing: 0.01em; max-width: 62ch;
}

/* The 1500x500 X header. Content is pulled to the vertical centre and kept
   above the avatar overlay; the right-hand half is the lattice. */
body[data-social='header'] .og-card { width: 1500px; height: 500px; }
body[data-social='header'] .og-body {
  padding: 0 96px 84px; justify-content: center;
  /* Holds the ground flat under the text and then falls away quickly. The
     first version eased across the whole width, which left the middle third
     a muddy wash that belonged to neither the type nor the lattice. */
  background: linear-gradient(100deg,
      var(--ground) 0%, var(--ground) 40%,
      color-mix(in oklab, var(--ground) 72%, transparent) 55%,
      transparent 70%),
    linear-gradient(to top, var(--ground) 0%, transparent 26%);
}
/* ONE ELEMENT. X already prints the account name, the handle and the bio
   directly beneath this image, so a headline and a tagline on top of a
   wordmark is the same information three times in one glance. The banner is
   the mark, the name, and the field it is named after — nothing else. The
   link card keeps the full composition, because that one has to stand alone
   in a timeline with no account attached to it. */
body[data-social='header'] .og-brand { margin-bottom: 0; gap: 26px; }
body[data-social='header'] .og-brand svg { width: 72px; height: 72px; }
/* The swept side is a 22% ink wash, which reads as a staircase at favicon
   size and as a flat grey wedge at seventy-two pixels. Lighter here so the
   wall itself is the figure. */
body[data-social='header'] .og-brand svg path[fill-opacity] { fill-opacity: 0.1; }
body[data-social='header'] .og-brand span { font-size: 54px; letter-spacing: 0.22em; }
body[data-social='header'] .og-body h1,
body[data-social='header'] .og-line,
body[data-social='header'] .og-proof { display: none; }

/* ---- the app's network picker and its acknowledgement ------------------ */
.app-chain { display: inline-flex; align-items: center; gap: 0.5rem; font-size: var(--step--1); color: var(--ink-3); }
.app-chain select {
  font-family: var(--mono); font-size: var(--step--1); padding: 0.42rem 0.55rem;
  background: var(--plate-2); color: var(--ink); border: 1px solid var(--rule-2); border-radius: var(--radius);
}
.app-ack { display: flex; gap: 0.6rem; align-items: flex-start; margin: 1rem 0 0.2rem; font-size: var(--step--1); color: var(--ink-2); }
.app-ack input { margin-top: 0.28em; flex: none; width: 1rem; height: 1rem; accent-color: var(--accent-mark); }
