/* TRI Momentum truism cards: one plain rule on one card, for the website.
   Every page in public/truisms/ loads this file and nothing else.

   Size. From 1024 px wide up, a card is the 1024 by 1024 square the owner drew, scaled to fit the page and never
   larger. Below that it keeps the same layout but its type stops shrinking at a size a phone can read (each size is
   clamp(smallest, share of the card's width, largest)), so a long card grows taller than a square rather than
   squeezing its words. The share is the 1024 px size divided by 1024, in cqw (1 cqw is 1% of the card's width).
   Under 560 px a stat card stacks its figure under its words.

   Colours. These are the owner's card colours, kept as drawn. They are not the app's tokens in app.css. */

/* Outfit ships with the app (public/fonts, SIL Open Font License), so no page asks another host for it.
   The same two files app.css names; the browser fetches the Latin Extended one only when a letter needs it. */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/outfit-latin-wght.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/outfit-latin-ext-wght.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --card: #0b23ef;
  --card-ink: #0a0a8c;
  --card-lime: #d5ff4f;
  --card-lavender: #cad0ff;
  --page: #f7f8fa;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { background: var(--page); }

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #fff;
  -webkit-font-smoothing: antialiased;
}

/* The frame is the size reference: cqw below means a share of its width, which is the card's width. */
.frame {
  container-type: inline-size;
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
}

.canvas {
  min-height: 100cqw;
  display: flex;
  flex-direction: column;
  background: var(--card);
  padding: clamp(20px, 5.27cqw, 54px) clamp(20px, 5.66cqw, 58px) clamp(20px, 4.98cqw, 51px);
}

/* Header */
.brand-row {
  display: flex;
  align-items: center;
  gap: clamp(5px, 0.78cqw, 8px);
  height: clamp(30px, 5.08cqw, 52px);
}
.badge {
  width: clamp(30px, 5.08cqw, 52px);
  aspect-ratio: 52 / 51;
  background: #fff;
  border-radius: clamp(7px, 1.17cqw, 12px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: clamp(15px, 2.54cqw, 26px);
  color: var(--card-ink);
  letter-spacing: -0.01em;
}
.brand-name {
  font-size: clamp(26px, 4.49cqw, 46px);
  font-weight: 700;
  margin-left: clamp(7px, 1.17cqw, 12px);
  letter-spacing: -0.011em;
  line-height: 1;
}
.tagline {
  font-size: clamp(16px, 2.73cqw, 28px);
  font-weight: 400;
  opacity: 0.95;
  letter-spacing: -0.007em;
  margin-top: clamp(10px, 1.76cqw, 18px);
  line-height: 1;
}

/* The truism */
.hero { margin-top: clamp(16px, 2.73cqw, 28px); }
.headline {
  font-size: clamp(30px, 6.64cqw, 68px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.0265em;
  margin-bottom: clamp(10px, 1.95cqw, 20px);
}
.subtext {
  font-size: clamp(16px, 2.54cqw, 26px);
  font-weight: 400;
  line-height: 1.42;
  opacity: 0.96;
}

/* The two stat cards sit at the foot. Any spare height goes above them. */
.diagram-wrap {
  margin-top: auto;
  padding-top: clamp(16px, 2.73cqw, 28px);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2.15cqw, 22px);
}
.pill-card {
  min-height: clamp(76px, 13.28cqw, 136px);
  border-radius: clamp(14px, 2.15cqw, 22px);
  padding: clamp(10px, 1.4cqw, 14px) clamp(16px, 3.71cqw, 38px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(10px, 2cqw, 20px);
  color: var(--card-ink);
}
.pill-lime { background: var(--card-lime); }
.pill-lavender { background: var(--card-lavender); }
.pill-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.pill-label {
  font-size: clamp(15px, 3.13cqw, 32px);
  font-weight: 800;
  letter-spacing: -0.0125em;
  text-transform: uppercase;
  line-height: 1.1;
}
.pill-detail {
  font-size: clamp(14px, 2.25cqw, 23px);
  font-weight: 600;
  letter-spacing: -0.009em;
  line-height: 1.2;
}
.pill-value {
  font-size: clamp(24px, 6.64cqw, 68px);
  font-weight: 800;
  letter-spacing: -0.022em;
  line-height: 1;
}

/* A narrow card stacks the figure under its words, and lets a long figure wrap. */
@container (max-width: 559px) {
  .pill-card {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
  }
  .pill-value {
    font-size: clamp(26px, 9cqw, 40px);
    overflow-wrap: anywhere;
  }
}

/* Three to five stat cards (some of the D01 and D02 cards, 18 Nov 2026): the same cards, a little smaller, so the card stays a square. */
.diagram-wrap.dense { gap: clamp(8px, 1.5cqw, 15px); }
.diagram-wrap.dense .pill-card { min-height: clamp(64px, 8.4cqw, 86px); }
.diagram-wrap.dense .pill-label { font-size: clamp(14px, 2.4cqw, 25px); }
.diagram-wrap.dense .pill-detail { font-size: clamp(14px, 1.9cqw, 19px); }
.diagram-wrap.dense .pill-value { font-size: clamp(22px, 4.4cqw, 45px); }
@container (max-width: 559px) {
  .diagram-wrap.dense .pill-value { font-size: clamp(22px, 7cqw, 32px); }
}
