/* Home principles: Sovereignty, Scale, Intelligence.
   One instrument stage driven by js/home-pillars.js: dark as painted, and a
   raised paper plate in the light theme (the script swaps its canvas palette
   to match). Sits inside .home-intro-flow, after the hero. */
.pillars { overflow: visible; background: transparent; }
.pillars-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: end; gap: 24px 56px; padding-bottom: 28px; margin-bottom: 24px; border-bottom: 1px solid var(--line-2); }
.pillars .section-heading { margin-bottom: 0; }
.pillars .section-heading h2 { font-size: clamp(32px, 3.4vw, 48px); letter-spacing: -.035em; line-height: 1.02; }
.pillars-head__lede { max-width: 44ch; font-size: 16px; line-height: 1.55; color: var(--text); }
.pillars-head__lede span { color: var(--muted); }

.pillars-stage {
  --bg: #08080a; --text: #f0ede5; --muted: #a3a097; --faint: #8a877f;
  --line: rgb(240 237 229 / .08); --line-2: rgb(240 237 229 / .16);
  --btn-bg: #f0ede5; --btn-text: #0c0b0a; --accent: #22d3b7;
  --hue: 34 211 183;
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto;
  height: clamp(640px, 54vw, 700px);
  border: 1px solid rgb(240 237 229 / .12); border-radius: 18px;
  background: var(--bg); color: var(--text); color-scheme: dark;
  box-shadow: 0 40px 90px -50px rgb(0 0 0 / .8), inset 0 1px 0 rgb(240 237 229 / .07);
}
.pillars-stage[data-act='1'] { --hue: 123 194 243; }
.pillars-stage[data-act='2'] { --hue: 189 172 243; }
[data-theme='light'] .pillars-stage {
  --bg: #fbfaf7; --text: #0c0b09; --muted: #55534d; --faint: #67645e;
  --line: rgb(12 11 9 / .08); --line-2: rgb(12 11 9 / .15);
  --btn-bg: #0c0b09; --btn-text: #f5f3ee; --accent: #046d5f;
  --hue: 10 122 107;
  border-color: rgb(12 11 9 / .1); color-scheme: only light;
  box-shadow: 0 40px 80px -46px rgb(40 30 10 / .34), 0 0 0 1px rgb(12 11 9 / .04), inset 0 1px 0 rgb(255 255 255 / .9);
}
[data-theme='light'] .pillars-stage[data-act='1'] { --hue: 36 104 163; }
[data-theme='light'] .pillars-stage[data-act='2'] { --hue: 108 84 170; }
[data-theme='light'] .pillars-stage ::selection { color: #fbfaf7; }
.pillars-stage ::selection { background: rgb(var(--hue)); color: #08080a; }
.pillars-stage :focus-visible { outline-color: rgb(var(--hue)); }

.pillars-glow { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.pillars-glow i { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s var(--ease); }
.pillars-glow i:nth-child(1) { background: radial-gradient(40% 56% at 67% 46%, rgb(34 211 183 / .11), transparent 72%); }
.pillars-glow i:nth-child(2) { background: radial-gradient(56% 44% at 72% 48%, rgb(123 194 243 / .1), transparent 72%); }
.pillars-glow i:nth-child(3) { background: radial-gradient(40% 56% at 67% 48%, rgb(189 172 243 / .12), transparent 72%); }
.pillars-stage[data-act='0'] .pillars-glow i:nth-child(1),
.pillars-stage[data-act='1'] .pillars-glow i:nth-child(2),
.pillars-stage[data-act='2'] .pillars-glow i:nth-child(3) { opacity: 1; }
[data-theme='light'] .pillars-glow i:nth-child(1) { background: radial-gradient(40% 56% at 67% 46%, rgb(10 122 107 / .08), transparent 72%); }
[data-theme='light'] .pillars-glow i:nth-child(2) { background: radial-gradient(56% 44% at 72% 48%, rgb(36 104 163 / .07), transparent 72%); }
[data-theme='light'] .pillars-glow i:nth-child(3) { background: radial-gradient(40% 56% at 67% 48%, rgb(108 84 170 / .08), transparent 72%); }

.pillars-viz { position: relative; z-index: 1; grid-area: 1 / 1 / 2 / 3; min-height: 0; touch-action: pan-y;
  background-image: linear-gradient(90deg, rgb(240 237 229 / .028) 1px, transparent 1px), linear-gradient(180deg, transparent calc(50% - .5px), rgb(240 237 229 / .04) calc(50% - .5px), rgb(240 237 229 / .04) calc(50% + .5px), transparent calc(50% + .5px));
  background-size: calc(100% / 12) 100%, 100% 100%; }
[data-theme='light'] .pillars-viz {
  background-image: linear-gradient(90deg, rgb(12 11 9 / .035) 1px, transparent 1px), linear-gradient(180deg, transparent calc(50% - .5px), rgb(12 11 9 / .05) calc(50% - .5px), rgb(12 11 9 / .05) calc(50% + .5px), transparent calc(50% + .5px)); }
.pillars-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.pillars-meta { position: absolute; top: 18px; right: 20px; z-index: 2; display: flex; align-items: center; gap: 8px; margin: 0; font: 400 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); pointer-events: none; }
.pillars-meta i { width: 6px; height: 6px; background: rgb(var(--hue)); box-shadow: 0 0 0 3px rgb(var(--hue) / .18); animation: pillars-blink 2.4s ease-in-out infinite; }
.pillars-meta span { display: none; }
.pillars-stage[data-act='0'] .pillars-meta span:nth-of-type(1),
.pillars-stage[data-act='1'] .pillars-meta span:nth-of-type(2),
.pillars-stage[data-act='2'] .pillars-meta span:nth-of-type(3) { display: inline; }
@keyframes pillars-blink { 50% { opacity: .35; } }

.pillars-copy { position: relative; z-index: 2; grid-area: 1 / 1 / 2 / 2; display: grid; min-height: 0; padding: 34px 30px 28px 34px; background: linear-gradient(90deg, var(--bg) 0, var(--bg) 70%, rgb(9 8 7 / 0)); }
.pillars-panel { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 18px; min-height: 0; visibility: hidden; transition: visibility 0s .5s; }
.pillars-panel[data-active='true'] { visibility: visible; transition: none; }
.pillars-panel > * { opacity: 0; transform: translateY(10px); transition: opacity .3s var(--ease), transform .45s var(--ease); }
.pillars-panel[data-active='true'] > * { opacity: 1; transform: none; transition: opacity .6s var(--ease) .15s, transform .8s var(--ease) .15s; }
.pillars-panel[data-active='true'] > :nth-child(2) { transition-delay: .21s; }
.pillars-panel[data-active='true'] > :nth-child(3) { transition-delay: .27s; }
.pillars-panel[data-active='true'] > :nth-child(4) { transition-delay: .33s; }
.pillars-panel[data-active='true'] > :nth-child(5) { transition-delay: .39s; }
.pillars-panel:nth-child(1), .pillars-tab:nth-child(1) { --hue: 34 211 183; }
.pillars-panel:nth-child(2), .pillars-tab:nth-child(2) { --hue: 123 194 243; }
.pillars-panel:nth-child(3), .pillars-tab:nth-child(3) { --hue: 189 172 243; }
[data-theme='light'] .pillars-panel:nth-child(1), [data-theme='light'] .pillars-tab:nth-child(1) { --hue: 10 122 107; }
[data-theme='light'] .pillars-panel:nth-child(2), [data-theme='light'] .pillars-tab:nth-child(2) { --hue: 36 104 163; }
[data-theme='light'] .pillars-panel:nth-child(3), [data-theme='light'] .pillars-tab:nth-child(3) { --hue: 108 84 170; }

.pillars-kicker { display: flex; align-items: center; gap: 10px; margin: 0; font: 400 11px/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pillars-kicker b { font-weight: 400; color: rgb(var(--hue)); }
.pillars-kicker::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgb(var(--hue) / .55), var(--line) 45%, transparent); }
.pillars-panel h3 { font-size: clamp(30px, 2.9vw, 38px); font-weight: 500; letter-spacing: -.04em; line-height: 1.02; text-wrap: balance; }
.pillars-body { max-width: 36ch; font-size: 15px; line-height: 1.6; color: var(--muted); }
.pillars-motto { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: 12px; font-weight: 500; letter-spacing: -.005em; }
.pillars-motto li { display: inline-flex; align-items: center; gap: 8px; }
.pillars-motto li::before { content: ''; width: 5px; height: 5px; background: rgb(var(--hue)); }
.pillars-foot { display: flex; flex-direction: column; gap: 16px; margin-top: auto; }
.pillars-readout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-block: 1px solid var(--line); }
.pillars-readout > div { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-width: 0; padding: 12px 10px 12px 0; }
.pillars-readout > div + div { padding-left: 12px; border-left: 1px solid var(--line); }
.pillars-readout dt { font: 400 11px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.pillars-readout dd { display: flex; align-items: baseline; gap: 4px; margin: 0; font-size: 21px; font-weight: 500; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pillars-readout dd small { font: 400 11px/1 var(--mono); letter-spacing: 0; color: var(--muted); }
.pillars-readout .is-hue { color: rgb(var(--hue)); }
.pillars-readout .is-risk { color: #eda86e; transition: color .4s; }
.pillars-readout .is-risk.is-clear { color: var(--text); }
[data-theme='light'] .pillars-readout .is-risk:not(.is-clear) { color: #b0601c; }
.pillars-readout dd.is-spark { align-items: center; }
.pillars-spark { width: 60px; height: 20px; overflow: visible; }
.pillars-spark polyline { fill: none; stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.pillars-spark [data-spark='load'] { stroke: rgb(var(--hue) / .6); stroke-dasharray: 2 2; }
.pillars-spark [data-spark='time'] { stroke: var(--text); }

.pillars-try { display: grid; gap: 10px; }
.pillars-try__label { display: flex; align-items: center; gap: 8px; margin: 0; font: 400 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.pillars-try__label i { width: 6px; height: 6px; border-radius: 50%; background: rgb(var(--hue)); box-shadow: 0 0 0 4px rgb(var(--hue) / .18); }
.pillars-segment { display: inline-flex; justify-self: start; gap: 2px; padding: 4px; border-radius: 999px; background: rgb(240 237 229 / .04); box-shadow: inset 0 0 0 1px var(--line-2); }
.pillars-segment button { min-height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 400 11px/1 var(--mono); letter-spacing: .02em; white-space: nowrap; transition: color .2s, background .25s, box-shadow .25s; }
.pillars-segment button:hover { color: var(--text); }
.pillars-segment button[aria-pressed='true'] { background: var(--btn-bg); color: var(--btn-text); box-shadow: 0 4px 14px rgb(0 0 0 / .35); }
[data-theme='light'] .pillars-segment { background: rgb(12 11 9 / .03); }
[data-theme='light'] .pillars-segment button[aria-pressed='true'] { box-shadow: 0 4px 14px rgb(40 30 10 / .18); }
.pillars-action { justify-self: start; display: inline-flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--btn-bg); color: var(--btn-text); font-size: 13px; font-weight: 500; transition: opacity .2s, background .3s, color .3s, box-shadow .3s; }
.pillars-action:hover { opacity: .88; color: var(--btn-text); }
.pillars-action b { font-weight: 400; }
.pillars-action:disabled { opacity: 1; cursor: default; background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.pillars-action:disabled b { display: none; }
.pillars-status { min-height: 1.5em; margin: 0; font: 400 13px/1.5 var(--sans); color: var(--muted); }

.pillars-tabs { position: relative; z-index: 3; grid-area: 2 / 1 / 3 / 3; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-2); background: rgb(12 12 14 / .92); }
[data-theme='light'] .pillars-tabs { background: rgb(245 243 238 / .94); }
.pillars-tab { position: relative; display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 12px; min-height: 66px; padding: 12px 20px; border: 0; background: transparent; color: var(--muted); text-align: left; transition: color .3s, background .4s; }
.pillars-tab + .pillars-tab { border-left: 1px solid var(--line); }
.pillars-tab:hover { color: var(--text); }
.pillars-tab[aria-selected='true'] { color: var(--text); background: linear-gradient(180deg, rgb(var(--hue) / .1), transparent 85%); }
.pillars-tab__bar { position: absolute; top: -1px; left: 0; right: 0; height: 2px; overflow: hidden; }
.pillars-tab__bar b { display: block; height: 100%; background: rgb(var(--hue)); transform: scaleX(0); transform-origin: left; }
.pillars-tab__icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.4; --signal: rgb(var(--hue)); }
.pillars-tab__index { font: 400 11px/1 var(--mono); color: rgb(var(--hue)); }
.pillars-tab__label { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 14px; font-weight: 500; letter-spacing: -.01em; }
.pillars-tab__label small { overflow: hidden; font: 400 11px/1.3 var(--mono); letter-spacing: .01em; color: var(--faint); white-space: nowrap; text-overflow: ellipsis; }
.pillars-tab:focus-visible { outline: 2px solid rgb(var(--hue)); outline-offset: -4px; }

/* On a desktop stage tall enough (about 1260px wide and up) the motto reads as a short list, filling
   part of the room the pinned foot leaves above it (23 November 2026: a 117px hole sat between the
   motto and the readout). Shorter stages keep it on one row, which their copy needs. The panel is a
   size container only here, where the stage has a fixed height. */
@media (min-width: 961px) {
  .pillars-panel { container: pillarspanel / size; }
  @container pillarspanel (min-height: 540px) {
    .pillars-motto { flex-direction: column; gap: 10px; font-size: 13px; }
  }
}
@media (max-width: 960px) {
  .pillars-head { grid-template-columns: 1fr; align-items: start; }
  .pillars-stage { display: flex; flex-direction: column; height: auto; }
  .pillars-tabs { order: -1; border-top: 0; border-bottom: 1px solid var(--line-2); }
  .pillars-tab__bar { top: auto; bottom: -1px; }
  .pillars-copy { padding: 26px 22px 24px; background: transparent; }
  .pillars-viz { height: clamp(360px, 72vw, 480px); flex: none; border-top: 1px solid var(--line); }
  /* Landscape phones and tablets: the tabs are a third of the screen, so the line under each
     name wraps instead of ending in an ellipsis. */
  .pillars-tab__label small { white-space: normal; }
}
@media (max-width: 700px) {
  .pillars-tab { grid-template-columns: auto minmax(0, 1fr); gap: 8px; min-height: 58px; padding: 10px 12px; }
  .pillars-tab__index { display: none; }
  .pillars-tab__label { font-size: 13px; }
  .pillars-tab__label small { display: none; }
  /* Below every section h2 on a phone (27px and up): at 30px it outranked them. */
  .pillars-panel h3 { font-size: 24px; letter-spacing: -.03em; line-height: 1.08; }
  .pillars-readout dd { font-size: 18px; }
  .pillars-segment button { padding: 0 11px; }
}
@media (max-width: 420px) {
  .pillars-tab { grid-template-columns: 1fr; justify-items: start; }
  .pillars-tab__icon { width: 20px; height: 20px; }
}
