/* Character pages: /example/ (the worked example) and /characters/<route>/ (docs/tickets/showcase-pages-2026-11-15.md).
   The ex-* rules started as the worked example's own; the four pages share this template. The art and card rules are in
   character-cards.css. Tokens only; the one fixed colour is the Companion's own background (#120c1a, as pages.css .phone)
   behind its screenshots. Small mono labels use --ink-3, which meets 4.5:1 on every background here since the token fix
   of 2026-11-15 (docs/tickets/showcase-pages-2026-11-15.md). */

.ex-hero { max-width:1080px;margin:0 auto;padding:56px 22px 28px; }
.ex-h1 { font-family:var(--display);font-weight:500;font-size:clamp(2.2rem,5vw,3.4rem);line-height:1.05;letter-spacing:-0.015em;margin:14px 0 18px;max-width:22ch; }
.ex-lede { max-width:64ch;font-size:1.125rem;line-height:1.65;color:var(--ink-2);margin:0 0 18px; }
.ex-badge { margin:4px 0 24px; }
/* Six facts per page: two rows of three, or one row of six from 960 px; never a row of four with two left over. */
.ex-facts { list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
@media (min-width:560px) { .ex-facts { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (min-width:960px) { .ex-facts { grid-template-columns:repeat(6,minmax(0,1fr)); } }
.ex-facts li { border:1px solid var(--line);border-radius:var(--r-md);background:var(--card);padding:12px 14px; }
.ex-facts .k { display:block;font-family:var(--mono);font-size:0.6875rem;letter-spacing:0.08em;text-transform:uppercase;color:var(--ink-3);margin-bottom:4px; }
.ex-facts .v { font-family:var(--display);font-weight:600;font-size:1.25rem; }

.ex-section { max-width:1080px;margin:0 auto;padding:44px 22px; }
.ex-band { background:var(--card);border-top:1px solid var(--line);border-bottom:1px solid var(--line); }
.ex-h2 { font-family:var(--display);font-weight:500;font-size:clamp(1.7rem,3.2vw,2.3rem);letter-spacing:-0.01em;margin:8px 0 14px; }
.ex-h3 { font-family:var(--display);font-weight:500;font-size:1.5rem;letter-spacing:-0.01em;margin:30px 0 12px; }
.ex-p { max-width:68ch;font-size:1rem;line-height:1.65;color:var(--ink-2);margin:0 0 14px; }
.ex-p a, .ex-small a, .ex-list a { color:var(--accent-ink);text-underline-offset:3px; }
.ex-small { font-size:0.875rem;line-height:1.6;color:var(--ink-3);max-width:70ch; }

.ex-quote { margin:8px 0 12px;padding:20px 22px;border-left:4px solid var(--accent);background:var(--paper);border-radius:0 var(--r-md) var(--r-md) 0;font-family:var(--display);font-style:italic;font-size:1.3125rem;line-height:1.5;max-width:62ch; }

.ex-files { display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:20px;margin-top:22px; }
.ex-file { margin:0;border:1px solid var(--line);border-radius:var(--r-lg);background:var(--card);padding:16px;display:flex;flex-direction:column;min-width:0; }
.ex-file img { display:block;width:100%;height:auto;max-height:420px;object-fit:contain;background:#fff;border:1px solid var(--line);border-radius:var(--r-md); }
.ex-file img[src*="companion-phone"] { background:#120c1a; }
.ex-file h3 { font-family:var(--sans);font-weight:600;font-size:1.0625rem;margin:14px 0 4px; }
.ex-price { font-weight:600;font-size:0.875rem;color:var(--accent-ink);margin:0 0 8px; }
.ex-file p.desc { font-size:0.9375rem;line-height:1.55;color:var(--ink-2);margin:0 0 14px;flex:1; }
.ex-actions { display:flex;gap:10px;flex-wrap:wrap; }
.ex-btn { text-decoration:none;font-weight:600;font-size:0.875rem;color:var(--ink);background:var(--card);border:1px solid var(--line-strong);padding:10px 16px;border-radius:var(--pill);min-height:44px;display:inline-flex;align-items:center; }
.ex-btn.is-accent { color:var(--accent-fg);background:var(--accent);border-color:var(--accent); }

.ex-choices { list-style:none;margin:18px 0 0;padding:0;display:grid;gap:10px; }
.ex-choices li { display:grid;grid-template-columns:minmax(160px,220px) minmax(0,1fr);gap:4px 18px;border:1px solid var(--line);border-radius:var(--r-md);background:var(--card);padding:12px 16px; }
.choice-label { font-family:var(--mono);font-size:0.75rem;letter-spacing:0.04em;color:var(--ink-3);grid-row:span 2;padding-top:2px; }
.choice-value { font-weight:600;color:var(--ink); }
.choice-reason { font-size:0.875rem;line-height:1.5;color:var(--ink-2); }

.ex-try { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,420px);gap:36px;align-items:start; }
.device-frame { width:100%;max-width:400px;margin:0 auto;background:var(--ink);border-radius:34px;padding:12px;box-shadow:var(--shadow-lg); }
.device-screen { position:relative;border-radius:24px;overflow:hidden;background:#120c1a;border:1px solid rgba(0,0,0,.2); }
.device-screen iframe { position:relative;width:100%;height:720px;border:0;display:block; }
/* Until the framed Companion paints (it is lazy), its own phone screenshot fills the screen, so the frame never shows
   as an empty block; the Companion's opaque page covers it once it loads. Decorative: the iframe carries the title. */
.device-poster { position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:top;display:block; }
.ex-list { margin:0 0 16px;padding-left:1.25rem;max-width:66ch; }
.ex-list li { font-size:1rem;line-height:1.6;color:var(--ink-2);margin-bottom:10px; }
.ex-list strong { color:var(--ink); }

.ex-math { width:100%;max-width:900px;border-collapse:collapse;margin:18px 0 10px;font-size:0.9375rem; }
.ex-math th,.ex-math td { text-align:left;vertical-align:top;padding:11px 12px;border-bottom:1px solid var(--line); }
.ex-math th { font-family:var(--mono);font-size:0.6875rem;letter-spacing:0.08em;text-transform:uppercase;color:var(--ink-3);font-weight:500; }
.ex-math td:first-child { font-weight:600;color:var(--ink);white-space:nowrap; }
.ex-math td:nth-child(2) { font-family:var(--mono);color:var(--accent-ink);white-space:nowrap; }
.ex-math td:last-child { color:var(--ink-2);line-height:1.55; }
.ex-math + .ex-actions { margin-top:18px; }
.ex-note { border:1px dashed var(--line-strong);border-radius:var(--r-md);background:var(--sink);padding:14px 16px;max-width:72ch;font-size:0.9375rem;line-height:1.6;color:var(--ink-2); }
.ex-note strong { color:var(--ink); }

.ex-cta { background:var(--card);border-top:1px solid var(--line); }
.ex-cta-inner { max-width:680px;margin:0 auto;padding:60px 22px;text-align:center;display:flex;flex-direction:column;gap:14px;align-items:center; }
.ex-cta-title { font-family:var(--display);font-weight:500;font-size:clamp(1.8rem,3.4vw,2.4rem);margin:0 0 6px; }
.ex-cta .ex-quote { text-align:left;font-size:1.125rem; }

/* Cards sit on --card in a plain section and on --paper inside a band, so they always read as cards. */
.ex-band .ex-file, .ex-band .ex-choices li, .ex-band .ex-feats li { background:var(--paper); }

/* Second routes are quiet links, not second buttons (pages.css, "Ease", Nick 2026-11-08); the same rule, for pages
   that do not load pages.css. */
.quiet-link { display:inline-flex;align-items:center;min-height:44px;padding:0 4px;font-weight:600;color:var(--accent-ink);text-decoration:none;text-underline-offset:3px; }
.quiet-link:hover { text-decoration:underline; }

/* Long lists only the curious need (the disclosed choices) open on request; the heading and intro stay visible. */
.ex-more { margin-top:18px; }
.ex-more > summary { list-style:none;display:inline-flex;align-items:center;gap:10px;min-height:44px;padding:10px 18px;border:1px solid var(--line-strong);border-radius:var(--pill);background:var(--card);font-weight:600;font-size:0.875rem;color:var(--ink);cursor:pointer; }
.ex-band .ex-more > summary { background:var(--paper); }
.ex-more > summary::-webkit-details-marker { display:none; }
.ex-more > summary::after { content:"+";font-family:var(--mono);font-size:1rem;line-height:1;color:var(--accent-ink); }
.ex-more[open] > summary::after { content:"\2212"; }
.ex-more > summary:focus-visible { outline:2px solid var(--accent);outline-offset:3px; }
/* The label follows the state without script: "Show all N choices" closed, "Hide the N choices" open. */
.ex-more[open] > summary .when-closed, .ex-more:not([open]) > summary .when-open { display:none; }

/* What the character does at the table: one row per feature, the same card rhythm as .ex-choices. */
.ex-feats { list-style:none;margin:18px 0 0;padding:0;display:grid;gap:10px; }
.ex-feats li { display:grid;grid-template-columns:minmax(150px,210px) minmax(0,1fr);gap:4px 18px;border:1px solid var(--line);border-radius:var(--r-md);background:var(--card);padding:12px 16px; }
.feat-name { font-weight:600;color:var(--ink); }
.feat-use { display:block;font-family:var(--mono);font-size:0.6875rem;letter-spacing:0.04em;color:var(--ink-3);margin-top:3px;font-weight:400; }
.feat-text { font-size:0.9375rem;line-height:1.55;color:var(--ink-2); }

/* Hero with the portrait. From 720 px: text on the left, the portrait on the right (280 px, 360 px from 860 px), the
   facts below both. Under 720 px the portrait comes straight after the heading, so a phone shows the character on its
   first screen; the lede, actions and badge follow, then the facts. Visual order only: the DOM keeps the text first. */
.ex-hero-grid { display:grid;grid-template-columns:minmax(0,1fr);gap:0; }
.ex-hero-text { display:contents; }
.ex-hero-text > :not(.eyebrow):not(.ex-h1) { order:2; }
.ex-hero-grid > .art { order:1;margin:4px 0 24px; }
.ex-hero-grid > .ex-facts { order:3; }
.ex-hero-actions { display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin:0 0 18px; }
@media (min-width:720px) {
  .ex-hero-grid { grid-template-columns:minmax(0,1fr) minmax(0,280px);grid-template-areas:"text art" "facts facts";column-gap:32px; }
  .ex-hero-text { display:block;grid-area:text;min-width:0; }
  .ex-hero-grid > .art { grid-area:art;margin:8px 0 28px; }
  .ex-hero-grid > .ex-facts { grid-area:facts; }
}
@media (min-width:860px) {
  .ex-hero-grid { grid-template-columns:minmax(0,1fr) minmax(0,360px);column-gap:40px; }
}

@media (max-width:820px) {
  .ex-try { grid-template-columns:1fr; }
}
@media (max-width:640px) {
  .ex-hero { padding:40px 16px 20px; }
  .ex-section { padding:36px 16px; }
  .ex-choices li, .ex-feats li { grid-template-columns:1fr; }
  .choice-label { grid-row:auto; }
  /* Numbers tables stack on a phone: the name and value on one line, how it is worked out under them. */
  .ex-math thead { position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap; }
  .ex-math, .ex-math tbody { display:block; }
  .ex-math tr { display:grid;grid-template-columns:auto minmax(0,1fr);gap:2px 12px;align-items:baseline;padding:12px 0;border-bottom:1px solid var(--line); }
  .ex-math td { padding:0;border:0; }
  .ex-math td:first-child { white-space:normal; }
  .ex-math td:nth-child(2) { white-space:normal;text-align:right; }
  .ex-math td:last-child { grid-column:1 / -1; }
  .device-screen iframe { height:640px; }
  .ex-cta-inner { padding:44px 16px; }
}
