/*
 * powerdata portal mock. Volume dial: V3 (product UI, sits with the website), dark world only.
 * Every colour and family below comes from company-documents/brand/tokens.css.
 * One declared exception: --third-snowflake, Snowflake's own blue, used only on
 * Snowflake's part of the delivery diagram (third-party mark, not a house colour).
 */
:root {
  --font-monument: 'Anton', 'Arial Narrow', sans-serif;
  --font-work: 'Archivo', 'Helvetica Neue', sans-serif;
  --font-instrument: 'IBM Plex Mono', 'SF Mono', Menlo, monospace;

  --paper: #EBE7DB;
  --card: #F4F1E7;
  --rule: #C9C2AE;
  --panel: #DBD4C1;
  --ink-2: #474440;
  --ink: #141312;

  --dark: #06090B;
  --dark-2: #0B1417;
  --rule-dark: #243336;
  --ondark-2: #B9C4C6;
  --ondark: #F5F7F7;

  --accent-instrument: #39DFD7;
  --accent-display: #28A59F;
  --accent-paper: #186E6A;

  --third-snowflake: #29B5E8;

  /* Page roles. The portal lives entirely in the dark world (decided 2 October 2026:
   * no bone ground). Each role points at a token above; nothing new is introduced. */
  --bg: var(--dark);
  --surface: var(--dark-2);
  --surface-2: var(--rule-dark);
  --line: var(--rule-dark);
  --text: var(--ondark);
  --text-2: var(--ondark-2);
  --accent-ui: var(--accent-instrument);   /* links, small readings, live dots */
  --accent-mark: var(--accent-display);    /* chart marks and display-scale accents */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-work);
  font-size: 16px;
  line-height: 1.5;
}
a { color: var(--accent-ui); text-underline-offset: 3px; }
a:hover { color: var(--text); }
::selection { background: var(--accent-display); color: var(--bg); }
h1, h2, h3, p { margin: 0; text-wrap: pretty; }
code, pre { font-family: var(--font-instrument); }

/* Instrument type */
.mono { font-family: var(--font-instrument); }
.eyebrow {
  font-family: var(--font-instrument);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
}
.monument {
  font-family: var(--font-monument);
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 0.95;
}

/* Top bar: the one dark band */
.top {
  background: var(--dark);
  color: var(--ondark);
  border-bottom: 1px solid var(--rule-dark);
}
.top-in {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.wordmark {
  font-family: var(--font-work);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--ondark);
  text-decoration: none;
}
.wordmark span { color: var(--accent-display); }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  color: var(--ondark-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 19px 12px 17px;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ondark); }
.nav a[aria-current="page"] { color: var(--ondark); border-bottom-color: var(--accent-instrument); }
.tenant {
  font-family: var(--font-instrument);
  font-size: 11.5px;
  color: var(--ondark-2);
  text-align: right;
  line-height: 1.35;
}
.tenant b { color: var(--ondark); font-weight: 500; display: block; letter-spacing: 0.04em; }

/* Page */
.page { max-width: 1280px; margin: 0 auto; padding: 48px 32px 72px; }
.head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: end;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}
.head h1 { font-size: clamp(44px, 6vw, 76px); margin-top: 10px; }
.lead { font-size: 17px; color: var(--text-2); max-width: 56ch; }

.section { margin-top: 56px; }
.section:first-of-type { margin-top: 0; }
.section-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.section-h h2 { font-size: 22px; font-weight: 700; }

/* Honesty chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-instrument);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 2px;
  white-space: nowrap;
  line-height: 1.3;
}
.chip-live { border: 1px solid var(--text-2); color: var(--text); background: transparent; }
.chip-live::before { content: ""; width: 7px; height: 7px; background: var(--accent-ui); }
.chip-illus { border: 1px dashed var(--text-2); color: var(--text-2); }
.top .chip-live { background: transparent; border-color: var(--rule-dark); color: var(--ondark); }
.top .chip-live::before { background: var(--accent-instrument); }

/* Cards */
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.card-live { border: 1.5px solid var(--line); border-top: 2px solid var(--accent-mark); box-shadow: 4px 4px 0 rgba(57, 223, 215, 0.10); }
.card-illus { border: 1px dashed var(--text-2); background: transparent; }
.card h3 { font-size: 19px; font-weight: 700; line-height: 1.25; }
.card .what { font-size: 15px; color: var(--text-2); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-foot a { font-weight: 600; font-size: 14px; }

/* Definition rows */
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; font-size: 14px; }
.facts dt { font-family: var(--font-instrument); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); padding-top: 2px; }
.facts dd { margin: 0; }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: left;
  font-family: var(--font-instrument);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--text-2);
}
.tbl td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl td.num, .tbl th.num { text-align: right; font-family: var(--font-instrument); font-variant-numeric: tabular-nums; }
.tbl code { font-size: 13px; }
.tbl-wrap { overflow-x: auto; }

/* Panels */
.panel { background: var(--surface-2); padding: 22px; }
.box { border: 1px solid var(--line); background: var(--surface); padding: 22px; }
.note {
  font-family: var(--font-instrument);
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.55;
}
.banner-illus {
  border: 1px dashed var(--text-2);
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 28px;
}

/* Code block with copy */
.code {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ondark);
  padding: 18px 20px;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
  margin: 0;
}
.code .k { color: var(--accent-instrument); }
.copy {
  position: absolute;
  top: 10px;
  right: 10px;
  font-family: var(--font-instrument);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--dark-2);
  color: var(--ondark);
  border: 1px solid var(--rule-dark);
  border-radius: 2px;
  padding: 5px 9px;
  cursor: pointer;
}
.copy:hover { border-color: var(--accent-instrument); }

/* Buttons and inputs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  background: var(--text);
  color: var(--bg);
  border: 1.5px solid var(--text);
  border-radius: 0;
  font-family: var(--font-work);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 3px 3px 0 rgba(57, 223, 215, 0.25);
}
.btn:hover { background: var(--accent-ui); border-color: var(--accent-ui); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--text); box-shadow: none; }
.btn-ghost:hover { background: var(--surface); color: var(--text); border-color: var(--accent-ui); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: var(--font-instrument); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); }
.input {
  min-height: 46px;
  border: 1.5px solid var(--text);
  border-radius: 0;
  background: var(--surface);
  padding: 0 14px;
  font-family: var(--font-work);
  font-size: 16px;
  color: var(--text);
}
.input:focus, .btn:focus-visible, a:focus-visible, .copy:focus-visible { outline: 2px solid var(--accent-ui); outline-offset: 2px; }

/* Charts */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid-l { stroke: var(--line); stroke-width: 1; }
.chart .axis-l { stroke: var(--text); stroke-width: 1; }
.chart text { font-family: var(--font-instrument); font-size: 11px; fill: var(--text-2); }
.chart .series { fill: none; stroke: var(--accent-mark); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .bar { fill: var(--accent-mark); }
.chart .bar:hover { fill: var(--accent-ui); }
.chart .mark-l { stroke: var(--text); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .xhair { stroke: var(--text); stroke-width: 1; }
.chart .dot { fill: var(--accent-ui); stroke: var(--surface); stroke-width: 2; }
.chart-wrap { position: relative; }
.tip {
  position: absolute;
  pointer-events: none;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ondark);
  font-family: var(--font-instrument);
  font-size: 12px;
  line-height: 1.45;
  padding: 7px 10px;
  border-radius: 2px;
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 12px));
  display: none;
  z-index: 2;
}
.tip b { color: var(--accent-instrument); font-weight: 500; }

/* Footer */
.foot { border-top: 1px solid var(--line); }
.foot-in {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 32px 32px;
  display: flex;
  justify-content: space-between;
  gap: 16px 32px;
  flex-wrap: wrap;
  font-family: var(--font-instrument);
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 1.6;
}
.foot-in strong { color: var(--text); font-weight: 500; }
.page { border-top: 1px solid var(--line); }

/* Visually hidden */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 960px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: minmax(0, 1fr); }
  .head { grid-template-columns: minmax(0, 1fr); align-items: start; }
}
@media (max-width: 680px) {
  .top-in { padding: 0 16px; gap: 12px; flex-wrap: wrap; min-height: 0; padding-top: 12px; }
  .wordmark { font-size: 16px; }
  .tenant { margin-left: auto; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .nav a { padding: 12px 10px 10px; }
  .page { padding: 32px 16px 56px; }
  .foot-in { padding: 20px 16px 28px; }
  .g2, .g4 { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .facts dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .copy, .nav a { transition: background-color 120ms, color 120ms, border-color 120ms; }
}

/* ---------------------------------------------------------------
 * Instrument Room: the dark band (top bar plus page hero), motion.
 * Motion only reveals structure or signals liveness, and every
 * animation sits behind prefers-reduced-motion: no-preference.
 * --------------------------------------------------------------- */
.band { background: var(--dark); color: var(--ondark); position: relative; overflow: hidden; }
.band .top { border-bottom-color: var(--rule-dark); }
.hero { max-width: 1280px; margin: 0 auto; padding: 56px 32px 40px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: end; position: relative; z-index: 1; }
.hero .eyebrow { color: var(--accent-instrument); }
.hero h1 { font-size: clamp(56px, 9vw, 128px); color: var(--ondark); margin-top: 12px; }
.hero .lead { color: var(--ondark-2); }
.hero .legend { color: var(--ondark-2); }
.hero .chip-illus { border-color: var(--ondark-2); color: var(--ondark-2); }
.hero .chip-live { background: transparent; color: var(--ondark); border-color: var(--ondark-2); }
.hero .chip-live::before { background: var(--accent-instrument); }
.band-grid { position: absolute; inset: 0; pointer-events: none; opacity: 0.35;
  background-image: linear-gradient(var(--rule-dark) 1px, transparent 1px), linear-gradient(90deg, var(--rule-dark) 1px, transparent 1px);
  background-size: 64px 64px; background-position: -1px -1px; }
.band-trace { position: absolute; left: 0; right: 0; bottom: 0; height: 96px; width: 100%; pointer-events: none; }
/* The trace has its own lane under the hero text; nothing is set on top of it. */
.band.has-trace .hero { padding-bottom: 136px; }
.band.has-strip .band-trace { bottom: 47px; }
.band-trace .tr-line { fill: none; stroke: var(--accent-display); stroke-width: 1.5; opacity: 0.85; }
.band-trace .tr-fill { fill: var(--accent-display); opacity: 0.1; }

/* Load bar: one charge sweep under the top bar on every page load */
.loadbar { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--accent-instrument); transform-origin: left; transform: scaleX(0); opacity: 0; }

/* Readings strip: real values, each with its date */
.strip { position: relative; z-index: 1; border-top: 1px solid var(--rule-dark); overflow: hidden; }
.strip-track { display: flex; width: max-content; }
.strip-set { display: flex; }
.reading { display: flex; gap: 10px; align-items: baseline; padding: 12px 28px; border-right: 1px solid var(--rule-dark); white-space: nowrap; font-family: var(--font-instrument); font-size: 12px; color: var(--ondark-2); }
.reading b { font-family: var(--font-monument); font-weight: 400; font-size: 22px; color: var(--ondark); letter-spacing: 0.02em; }
.reading .u { color: var(--accent-instrument); }

/* Live dot pulse */
.chip-live { position: relative; }

/* Chart surfaces */
.chart .area { fill: var(--accent-mark); opacity: 0.12; }
.chart .peak { fill: var(--text); }
.chart .peak-t { fill: var(--text); font-weight: 500; }

@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); align-items: start; }
}
@media (max-width: 680px) {
  .hero { padding: 36px 16px 28px; }
  .reading { padding: 10px 18px; }
  .reading b { font-size: 18px; }
}

@media (prefers-reduced-motion: no-preference) {
  .loadbar { animation: pd-load 1.4s cubic-bezier(0.65, 0, 0.35, 1) 0.1s both; }
  @keyframes pd-load { 0% { transform: scaleX(0); opacity: 1; } 70% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }

  .rv { animation: pd-rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--d, 0) * 90ms + 150ms); }
  @keyframes pd-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  .mask { overflow: hidden; display: block; }
  .mask > span { display: block; animation: pd-up 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--d, 0) * 90ms + 100ms); }
  @keyframes pd-up { from { transform: translateY(105%); } to { transform: none; } }

  .strip-track { animation: pd-marquee 60s linear infinite; }
  .strip:hover .strip-track { animation-play-state: paused; }
  @keyframes pd-marquee { to { transform: translateX(-50%); } }

  .chip-live::after { content: ""; position: absolute; left: 7px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; background: var(--accent-ui); animation: pd-ping 2.4s cubic-bezier(0, 0, 0.2, 1) infinite; }
  .hero .chip-live::after, .top .chip-live::after { background: var(--accent-instrument); }
  @keyframes pd-ping { 0% { transform: scale(1); opacity: 0.6; } 70%, 100% { transform: scale(2.6); opacity: 0; } }

  .band-trace .tr-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: pd-draw 2.6s cubic-bezier(0.65, 0, 0.35, 1) 0.2s forwards; }
  .band-trace .tr-fill { transform: translateY(100%); transform-box: fill-box; animation: pd-charge 2.2s cubic-bezier(0.45, 0, 0.2, 1) 1.4s forwards; }
  @keyframes pd-draw { to { stroke-dashoffset: 0; } }
  @keyframes pd-charge { to { transform: none; } }

  .chart.drawn .series { stroke-dasharray: 1; stroke-dashoffset: 1; animation: pd-draw 1.8s cubic-bezier(0.65, 0, 0.35, 1) forwards; }
  .chart.drawn .area { transform: translateY(100%); transform-box: fill-box; animation: pd-charge 1.6s cubic-bezier(0.45, 0, 0.2, 1) 0.9s forwards; }
  .chart.drawn .bar { transform: scaleY(0); transform-box: fill-box; transform-origin: 50% 100%; animation: pd-grow 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; animation-delay: calc(var(--i, 0) * 22ms); }
  @keyframes pd-grow { to { transform: none; } }
  .chart.drawn .mark-l, .chart.drawn .mark-t { opacity: 0; animation: pd-fade 0.5s ease-out 0.9s forwards; }
  @keyframes pd-fade { to { opacity: 1; } }
  .chart.drawn .peak, .chart.drawn .peak-t { opacity: 0; animation: pd-fade 0.5s ease-out 1.8s forwards; }
}

/* The pulse that runs along a band trace */
.pulse { position: absolute; left: 0; top: 0; width: 0; height: 0; opacity: 0; pointer-events: none; z-index: 1; }
.pulse i { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; background: var(--accent-instrument); box-shadow: 0 0 0 4px rgba(57, 223, 215, 0.18); }
.pulse span { position: absolute; left: 14px; top: -26px; font-family: var(--font-instrument); font-size: 11.5px; color: var(--accent-instrument); white-space: pre; letter-spacing: 0.02em; }
.pulse.flip span { left: auto; right: 14px; }
.hero h1.long { font-size: clamp(44px, 6.4vw, 96px); }
.pulse.quiet span { display: none; }
