/* ─────────────────────────────────────────────────────────────────
   /showcase — four candidate treatments for "The example".

   These are experiments, not shipped pages. They share one stylesheet
   because the point is to compare them, and a difference in padding
   between two of them would read as a difference in the idea.

   Everything here uses the base.css tokens. Teal is 2.91:1 on the page
   ground, so it appears as a mark or a fill and never as readable text;
   --teal-deep carries anything that has to be read.
   ───────────────────────────────────────────────────────────────── */

.sc-hero { padding: 54px 0 26px; }
.sc-eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--teal-deep); margin: 0 0 14px;
}
.sc-hero h1 { margin: 0 0 14px; max-width: 18ch; }
.sc-lede { color: var(--body); max-width: 62ch; margin: 0; }

.sc-meta {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12.5px; color: var(--muted);
  margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px 18px;
}

/* ── experiment index ──────────────────────────────────────────── */
.sc-index { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 72px; }
@media (max-width: 800px) { .sc-index { grid-template-columns: 1fr; } }
.sc-card {
  display: block; padding: 26px; border: 1px solid var(--rule); border-radius: 12px;
  background: var(--surface); text-decoration: none; color: inherit;
}
.sc-card:hover { border-color: var(--ink); }
.sc-card h2 { margin: 0 0 10px; font-size: 21px; }
.sc-card p { margin: 0; color: var(--body); font-size: 15px; }
.sc-card-n {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px; color: var(--teal-deep); display: block; margin-bottom: 10px;
}

/* ── chart frame ───────────────────────────────────────────────── */
.sc-stage { padding: 0 0 72px; }
.sc-frame {
  border: 1px solid var(--rule); border-radius: 12px; background: var(--surface);
  overflow: hidden;
}
.sc-frame-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px;
  padding: 14px 18px; border-bottom: 1px solid var(--rule); background: var(--surface-2);
}
.sc-frame-head h2 { margin: 0; font-size: 16px; }
.sc-count {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px; color: var(--muted); margin-left: auto;
}
.sc-count b { color: var(--ink); font-weight: 600; }
.sc-canvas-wrap { position: relative; height: 520px; }
@media (max-width: 700px) { .sc-canvas-wrap { height: 380px; } }
.sc-canvas-wrap canvas { width: 100%; height: 100%; display: block; }

.sc-tip {
  position: absolute; pointer-events: none; z-index: 4;
  background: var(--ink); color: #fff; border-radius: 7px;
  padding: 7px 10px; font-size: 12.5px; line-height: 1.45;
  transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap;
  opacity: 0; transition: opacity .1s;
}
.sc-tip.on { opacity: 1; }
.sc-tip b { display: block; font-size: 13px; margin-bottom: 2px; }
.sc-tip span { color: var(--dark-body); font-family: "IBM Plex Mono", ui-monospace, monospace; }

/* ── controls ──────────────────────────────────────────────────── */
.sc-controls { display: grid; gap: 20px; grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .sc-controls { grid-template-columns: 1fr; } }

.sc-rail { border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); overflow: hidden; }
.sc-rail-head { padding: 13px 16px; border-bottom: 1px solid var(--rule); background: var(--surface-2); }
.sc-rail-head h2 { margin: 0; font-size: 14px; }
.sc-rail-head p { margin: 5px 0 0; font-size: 12.5px; color: var(--muted); }
.sc-rail ul { list-style: none; margin: 0; padding: 6px; }
.sc-rail li + li { margin-top: 2px; }

.sc-toggle {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: 0; border-radius: 8px; background: transparent;
  text-align: left; cursor: pointer; font: inherit; font-size: 13.5px; color: var(--body);
}
.sc-toggle:hover { background: var(--tint); }
.sc-toggle .box {
  flex: 0 0 auto; width: 15px; height: 15px; border: 1.5px solid var(--rule);
  border-radius: 4px; background: var(--surface); position: relative;
}
.sc-toggle[aria-pressed="true"] { color: var(--ink); }
.sc-toggle[aria-pressed="true"] .box { border-color: var(--teal-deep); background: var(--teal-deep); }
.sc-toggle[aria-pressed="true"] .box::after {
  content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(42deg);
}
.sc-toggle .pct {
  margin-left: auto; font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px; color: var(--muted);
}
.sc-toggle.is-gate { opacity: 0.55; cursor: default; }

/* ── segmented control ─────────────────────────────────────────── */
.sc-seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 3px; background: var(--surface); gap: 3px; }
.sc-seg button {
  border: 0; background: transparent; border-radius: 999px; padding: 7px 15px;
  font: inherit; font-size: 13.5px; color: var(--body); cursor: pointer; white-space: nowrap;
}
.sc-seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ── legend and group bars ─────────────────────────────────────── */
.sc-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-size: 13px; color: var(--body); }
.sc-legend span { display: inline-flex; align-items: center; gap: 7px; }
.sc-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.sc-bars { margin-top: 20px; }
.sc-bar-row { display: grid; grid-template-columns: 200px minmax(0, 1fr) 76px; gap: 12px; align-items: center; padding: 7px 0; }
@media (max-width: 700px) { .sc-bar-row { grid-template-columns: 130px minmax(0,1fr) 62px; } }
.sc-bar-row .lbl { font-size: 13.5px; color: var(--body); }
.sc-bar-track { height: 9px; background: var(--track); border-radius: 999px; overflow: hidden; }
.sc-bar-fill { height: 100%; border-radius: 999px; background: var(--teal); }
.sc-bar-row .val { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px; color: var(--ink); text-align: right; }

.sc-verdict {
  margin-top: 18px; padding: 16px 18px; border-radius: 10px;
  border: 1px solid var(--rule); background: var(--tint); font-size: 14.5px; color: var(--body);
}
.sc-verdict b { color: var(--ink); }

/* ── slide-over panel ──────────────────────────────────────────── */
.sc-panel {
  /* 80% of the viewport, so a company's record reads as a page rather
     than a sidebar; full width below 700px where 80% is too narrow. */
  position: fixed; top: 0; right: 0; bottom: 0; width: 80vw;
  background: var(--surface); border-left: 1px solid var(--rule);
  transform: translateX(100%);
  /* Hidden while closed, after the slide finishes, so it is out of the tab
     order. No shadow: the scrim and the hairline separate it (DESIGN.md has
     no shadows), and a shadow on the closed panel bled a grey band down the
     right edge of every showcase page. */
  visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s;
  z-index: 60; display: flex; flex-direction: column;
}
.sc-panel.on { transform: translateX(0); visibility: visible; transition: transform .22s ease, visibility 0s; }
.sc-scrim {
  position: fixed; inset: 0; background: rgba(17, 22, 27, 0.32);
  opacity: 0; pointer-events: none; transition: opacity .22s; z-index: 55;
}
.sc-scrim.on { opacity: 1; pointer-events: auto; }
.sc-panel-head { padding: 20px 22px 16px; border-bottom: 1px solid var(--rule); }
.sc-panel-head h2 { margin: 0 0 4px; font-size: 20px; }
.sc-panel-head .dom {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12.5px; color: var(--muted);
}
.sc-panel-close {
  position: absolute; top: 15px; right: 16px; width: 32px; height: 32px;
  border: 1px solid var(--rule); border-radius: 8px; background: var(--surface);
  cursor: pointer; font-size: 17px; line-height: 1; color: var(--muted);
}
.sc-panel-close:hover { color: var(--ink); border-color: var(--ink); }
.sc-scores { display: flex; gap: 26px; margin-top: 14px; }
.sc-score .k { font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.sc-score .v { font-size: 27px; font-weight: 600; color: var(--ink); line-height: 1.1; }
.sc-panel-body { overflow-y: auto; padding: 8px 22px 28px; }

.sc-finding { padding: 15px 0; border-bottom: 1px solid var(--rule); }
.sc-finding:last-child { border-bottom: 0; }
.sc-finding-top { display: flex; align-items: baseline; gap: 10px; }
.sc-finding-top h3 { margin: 0; font-size: 14.5px; flex: 1 1 auto; }
.sc-pill {
  font-size: 11px; padding: 2px 9px; border-radius: 999px;
  background: var(--tint); color: var(--teal-deep); border: 1px solid var(--rule); white-space: nowrap;
}
.sc-finding blockquote {
  margin: 9px 0 0; padding-left: 12px; border-left: 2px solid var(--rule);
  font-size: 13.5px; color: var(--body); line-height: 1.55;
}
.sc-finding .src {
  margin-top: 8px; font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11.5px; color: var(--muted);
}
.sc-finding .src a { color: var(--teal-deep); }
.sc-empty { padding: 28px 0; color: var(--muted); font-size: 14px; }

/* ── before / after diff ───────────────────────────────────────── */
.sc-diff { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 800px) { .sc-diff { grid-template-columns: 1fr; } }
.sc-diff-col { border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); overflow: hidden; }
.sc-diff-col.is-then { opacity: 1; }
.sc-diff-head { padding: 13px 17px; border-bottom: 1px solid var(--rule); background: var(--surface-2); }
.sc-diff-head .when {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; color: var(--teal-deep);
}
.sc-diff-head h3 { margin: 3px 0 0; font-size: 15px; }
.sc-diff-body { padding: 17px; font-size: 14px; color: var(--body); line-height: 1.6; }
.sc-diff-body .gone { text-decoration: line-through; color: var(--muted); }
.sc-diff-body .kept { color: var(--ink); }
.sc-elapsed {
  text-align: center; padding: 22px 0 6px;
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px; color: var(--muted);
}
.sc-elapsed b { color: var(--ink); font-size: 15px; }

/* ── cuts: the argument, stated above the chart ────────────────────
   The two cards ARE the toggle. The point used to sit in a small box
   under the bars, where a reader met it last; it now leads, in full
   sentences, with the one number that matters set large enough to be
   read from across a room. */
.sc-compare { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 800px) { .sc-compare { grid-template-columns: 1fr; } }

.sc-compare-card {
  display: flex; flex-direction: column; align-items: flex-start; text-align: left;
  padding: 24px 26px 26px; border: 1.5px solid var(--rule); border-radius: 14px;
  background: var(--surface); cursor: pointer; font: inherit; color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.sc-compare-card:hover { border-color: var(--muted); }
.sc-compare-card[aria-pressed="true"] {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}
.sc-compare-card:focus-visible { outline: 2px solid var(--teal-deep); outline-offset: 3px; }

.sc-compare-tag {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--rule);
}
.sc-compare-tag.is-kept { color: var(--teal-deep); border-color: var(--teal-deep); }
.sc-compare-tag.is-rejected { color: var(--muted); }

.sc-compare-name { margin-top: 14px; font-size: 15px; font-weight: 600; color: var(--ink); }
.sc-compare-big {
  margin-top: 6px; font-family: Outfit, system-ui, sans-serif;
  font-size: clamp(44px, 6vw, 64px); font-weight: 600; line-height: 1; color: var(--ink);
  letter-spacing: -0.02em;
}
.sc-compare-sub { margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.sc-compare-body { margin-top: 16px; font-size: 17px; line-height: 1.55; color: var(--body); }

.sc-compare-ratio { margin: 18px 0 22px; font-size: 17px; color: var(--body); }
.sc-compare-ratio b { color: var(--ink); }


/* ── wide slide-in body ────────────────────────────────────────────
   At 80vw the record has room for two columns of findings. The page
   behind it stops scrolling while it is open, so a wheel over the
   panel scrolls the record and not the chart underneath. */
@media (max-width: 700px) { .sc-panel { width: 100vw; } }
html.sc-panel-open, html.sc-panel-open body { overflow: hidden; }
.sc-panel-head { padding: 26px 34px 20px; }
.sc-panel-head h2 { font-size: 26px; }
.sc-panel-body { padding: 10px 34px 40px; }
.sc-panel-why {
  margin: 18px 0 8px; font-size: 16.5px; line-height: 1.6; color: var(--ink); max-width: 80ch;
}
.sc-findings-grid {
  display: grid; gap: 0 36px; grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 1100px) { .sc-findings-grid { grid-template-columns: 1fr; } }
.sc-findings-grid .sc-finding { border-bottom: 1px solid var(--rule); }
.sc-finding-meaning { margin: 7px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.sc-finding blockquote.is-caveat { border-left-color: var(--teal); }

/* ── ER2 mode ──────────────────────────────────────────────────────
   When a company has an ER2 export, the panel body hosts ER2's own
   Analysis tab (in a shadow root, see showcase-panel.js). ER2 draws its
   own header bar with the tab, theme toggle and close, so this site's
   header steps aside and the body gives the report the whole panel. */
.sc-panel.is-er2 .sc-panel-head { display: none; }
.sc-panel.is-er2 .sc-panel-body { padding: 0; flex: 1 1 auto; min-height: 0; }
.sc-er2-host { display: block; min-height: 100%; }
.sc-er2-loading {
  margin: 0; padding: 48px 34px; color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px;
}

/* ── second group on the hub: the /what-we-build candidates ─────── */
.sc-group { padding-bottom: 72px; border-top: 1px solid var(--rule); padding-top: 54px; }
.sc-group-title { margin: 0 0 12px; }
.sc-group .sc-lede { margin-bottom: 28px; }
