/*
  Die Website erwartet die vom Projekt verwendete Recursive Casual Mono unter:
  assets/fonts/Recursive_Monospace_Casual-Medium.ttf
*/
@font-face {
  font-family: "Recursive Casual Local";
  src: url("assets/fonts/CutiveMono-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;

  --ink: #0000ff;
  --paper: #fafafa;
  --panel: #ffffff;
  --signal: #ff1616;
  --black: #000000;
  --white: #ffffff;

  --soft-blue: rgba(0, 0, 255, 0.07);
  --faint-blue: rgba(0, 0, 255, 0.2);

  --hairline: 1px solid var(--ink);

  --casual:
    "Recursive Casual Local",
    "SFMono-Regular",
    "Cascadia Code",
    "Roboto Mono",
    Consolas,
    monospace;

  --topbar-h: 64px;

  --grain-noise: url("assets/grain-noise.svg");
}


/* ================================================================
   RESET
   ================================================================ */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;

  color: var(--ink);
  background: var(--paper);

  font-family: var(--casual);
  font-size: 15px;
  line-height: 1.35;

  overflow-x: hidden;
}

button,
input,
a {
  font: inherit;
}

button,
a {
  color: inherit;
}

a {
  text-underline-offset: 4px;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

#storyStageStatus {
  display: none;
}

.viz-code {
  display: none;
}

.eyebrow {
  display: none;
}


/* ================================================================
   TOPBAR
   ================================================================ */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;

  z-index: 40;

  height: var(--topbar-h);

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;

  gap: 20px;
  padding: 0 20px;

  border: var(--hairline);

  background: rgba(250, 250, 250, 0.95);
  backdrop-filter: blur(8px);

  letter-spacing: -0.035em;
}

p {
   letter-spacing: -0.035em !important;
   line-height: 1.6rem!important;
}

.brand,
.powered-by,
.topbar-status {
  display: flex;
  align-items: center;

  min-width: 0;

  text-decoration: none;
}

.brand {
  gap: 11px;
  font-weight: 500;
}

.powered-by {
  justify-self: end;

  gap: 10px;

  font-size: 16px;
  line-height: 1.15;
}

.header-icon {
  width: 42px;
  height: 42px;

  flex: 0 0 42px;

  object-fit: contain;
}

.topbar-status {
  gap: 8px;

  font-size: 16px;
  white-space: nowrap;
}

.status-dot {
  width: 9px;
  height: 9px;

  border: 1px solid currentColor;
  border-radius: 50%;

  background: transparent;
}

.topbar-status.is-ready {
  color: var(--signal);
}

.topbar-status.is-ready .status-dot {
  background: var(--signal);
  border-color: var(--signal);
}


/* ================================================================
   HERO
   ================================================================ */

.hero {
  position: relative;

  width: 100%;

  height: 100vh;
  height: 100svh;

  min-height: 620px;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;

  border: var(--hairline);

  background: var(--paper);

  overflow: hidden;
}

.hero-inner {
  padding:
    calc(var(--topbar-h) + clamp(40px, 6vw, 92px))
    clamp(22px, 5vw, 72px)
    clamp(96px, 13vh, 1050px);
}

.eyebrow,
.meta-label {
  margin: 0 0 18px;

  font-size: 16px;
  font-weight: 500;

  letter-spacing: 0.055em;
}

.hero h1,
.story-step h2,
.catalogue-intro h2,
.method-section h2 {
  margin: 0;

  font-family: var(--casual);
  font-weight: 500;

  letter-spacing: -0.055em;
  line-height: 0.91;
}

.hero h1 {
  max-width: 11ch;

  font-size: clamp(68px, 9vw, 172px);
}

.hero-lead {
  max-width: 45rem;

  margin: 30px 0 0;

  font-size: clamp(18px, 1.5vw, 25px);
  line-height: 1.42;
}

.scroll-indicator {
  position: absolute;

  left: 0;
  right: 0;
  bottom: 0;

  min-height: 62px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 24px;

  padding: 0 clamp(22px, 5vw, 72px);

  border-top: var(--hairline);

  text-decoration: none;

  font-size: 12px;
}

.scroll-indicator:hover {
  color: var(--white);
  background: var(--ink);
}

.scroll-arrow {
  font-size: 26px;
  line-height: 1;
}


/* ================================================================
   STORY
   ================================================================ */

.story-shell {
  min-height: 100vh;

  display: grid;

  grid-template-columns:
    minmax(330px, 1fr)
    minmax(520px, 1.7fr);

  border-left: var(--hairline);
  border-right: var(--hairline);
}

.story-copy {
  position: relative;

  border-right: var(--hairline);

  overflow: hidden;
}

.story-step {
  min-height: calc(90vh - var(--topbar-h));

  display: flex;
  flex-direction: column;
  justify-content: center;

  padding:
    clamp(42px, 6vw, 96px)
    clamp(22px, 4vw, 64px);

  border-bottom: var(--hairline);

  opacity: 0.38;

  transition:
    opacity 180ms ease,
    background 180ms ease;
}

.story-step.is-active {
  opacity: 1;
  background: var(--panel);
}

.story-step:last-child {
  min-height: 94vh;
}

.story-step h2,
.catalogue-intro h2,
.method-section h2 {
  font-size: clamp(38px, 4.8vw, 74px);
}

.story-step > p:not(.eyebrow) {
  max-width: 34rem;

  margin: 28px 0 0;

  font-size: clamp(17px, 1.5vw, 24px);
  line-height: 1.4;
}


/* ================================================================
   GENERIC BUTTONS
   ================================================================ */

.action {
  min-height: 48px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 10px;

  width: fit-content;

  padding: 0 18px;

  border: var(--hairline);
  border-radius: 0;

  background: transparent;

  text-decoration: none;

  font-size: 16px;
  font-weight: 500;

  letter-spacing: -0.035em;
}

.action-primary {
  margin-top: 32px;

  color: var(--white);
  background: var(--ink);
}

.action-primary:hover:not(:disabled) {
  background: var(--signal);
  border-color: var(--signal);
}

.action-outline:hover:not(:disabled),
.action-reveal:hover:not(:disabled) {
  color: var(--white);
  background: var(--ink);
}

.action-reveal {
  color: var(--signal);
  border-color: var(--signal);
}

.text-action {
  width: fit-content;

  margin-top: 20px;
  padding: 0;

  border: 0;
  border-bottom: 1px solid currentColor;

  background: transparent;

  font-size: 16px;

  letter-spacing: 0.035em;
}

.text-action:hover {
  color: var(--signal);
}


/* ================================================================
   MINI FLOW
   ================================================================ */

.mini-flow {
  margin-top: 36px;

  display: flex;
  flex-wrap: wrap;
  align-items: center;

  gap: 10px;

  font-size: 16px;

  letter-spacing: 0.04em;
}

.mini-flow span {
  padding: 8px 10px;

  border: var(--hairline);
}

.mini-flow b {
  color: var(--signal);
}


/* ================================================================
   STORY STAGE
   ================================================================ */

.story-stage {
  position: sticky;

  top: var(--topbar-h);

  height: calc(100vh - var(--topbar-h));

  display: grid;

  grid-template-rows:
    44px
    minmax(0, 1fr)
    38px;

  align-self: start;

  color: var(--black);
  background: var(--white);

  overflow: hidden;
}

.stage-topline,
.stage-footer,
.viz-statusline,
.viz-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 14px;

  padding: 0 14px;

  font-size: 16px;

  letter-spacing: 0.04em;
}

 #storyBlankPanel p {
  line-height: 2.9rem !important;
}

p.dataset-note {
    line-height: 1.1rem !important;
}

.stage-footer{

}

.stage-topline {
  color: var(--ink);

  border-bottom: var(--hairline);
}

.stage-footer {
  color: var(--ink);

  border-top: var(--hairline);
}

.stage-viz {
  position: relative;

  min-height: 0;

  background: var(--white);

  isolation: isolate;

  backface-visibility: hidden;
}

.stage-viz .sonic-chart {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;
}

.stage-big-label {
  position: absolute;

  left: 4%;
  top: 5%;

  z-index: 2;

  color: var(--black);

  font-family: var(--casual);

  font-size: clamp(28px, 4vw, 64px);
  line-height: 0.92;

  letter-spacing: -0.05em;

  pointer-events: none;
}

.stage-big-label span {
  color: var(--signal);
}


/* ================================================================
   CALIBRATION
   ================================================================ */

.calibration-box {
  margin-top: 34px;

  border: var(--hairline);

  background: var(--paper);
}

.calibration-readout {
  min-height: 52px;

  display: grid;

  grid-template-columns:
    minmax(120px, 0.9fr)
    minmax(0, 1.4fr);

  align-items: baseline;

  gap: 14px;

  padding: 12px 14px;

  border-bottom: var(--hairline);
}

.calibration-readout .meta-label {
  margin: 0;
}

.calibration-readout strong {
  text-align: right;

  font-size: 16px;
  font-weight: 500;

  overflow-wrap: anywhere;
}

.calibration-progress {
  height: 10px;

  border-bottom: var(--hairline);

  background: transparent;
}

.calibration-progress span {
  display: block;

  width: 0;
  height: 100%;

  background: var(--signal);

  transition: width 100ms linear;
}

.calibration-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: 18px;

  padding: 14px;
}

.calibration-actions .action,
.calibration-actions .text-action {
  margin-top: 0;
}


/* ================================================================
   CATALOGUE / METHOD
   ================================================================ */

.catalogue-intro,
.method-section {
  display: grid;

  grid-template-columns:
    minmax(0, 2fr)
    minmax(280px, 1fr);

  gap: 0;

  border: var(--hairline);
  border-top: 0;
}

.catalogue-intro > div,
.method-section > div:first-child {
  padding:
    clamp(42px, 6vw, 86px)
    clamp(22px, 4vw, 56px);

  border-right: var(--hairline);
}

.catalogue-intro > p,
.method-copy {
  margin: 0;

  padding:
    clamp(42px, 5vw, 72px)
    24px;

  align-self: stretch;

  display: flex;
  flex-direction: column;
  justify-content: center;

  font-size: clamp(16px, 1.4vw, 21px);
  line-height: 1.45;
}

.red-text {
  color: var(--signal);
}


/* ================================================================
   DATASET GRID
   ================================================================ */

.dataset-grid {
  position: relative;

  border-left: var(--hairline);
  border-right: var(--hairline);
}

.loading-row {
  padding: 80px 24px;

  border-bottom: var(--hairline);

  letter-spacing: 0.03em;
}

.dataset-module {
  min-height: 600px;

  display: grid;

  grid-template-columns:
    minmax(0, 2fr)
    minmax(300px, 1fr);

  border-bottom: var(--hairline);

  background: var(--paper);
}


/* ================================================================
   DATASET GRAPH SIDE
   ================================================================ */

.dataset-visual {
  min-width: 0;

  display: grid;

  grid-template-rows:
    42px
    minmax(420px, 1fr)
    38px;

  color: var(--black);
  background: var(--white);

  border-right: var(--hairline);
}

.viz-statusline {
  color: var(--white);
  background: var(--ink);

  border-bottom: 1px solid var(--ink);
}

.viz-footer {
  color: var(--ink);

  border-top: var(--hairline);
}

.viz-frame {
  position: relative;

  min-height: 420px;

  overflow: hidden;

  background: var(--white);
}

.dataset-chart {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  display: block;
}

.dataset-icon-badge {
  position: absolute;

  z-index: 3;

  left: 18px;
  top: 18px;

  width: 68px;
  height: 68px;

  display: block;

  object-fit: contain;

  pointer-events: none;
}

.viz-overlay-message {
  position: absolute;

  inset: 0;

  z-index: 4;

  display: grid;
  place-content: center;

  padding: 24px;

  text-align: center;

  color: var(--ink);

  font-family: var(--casual);

  font-size: clamp(22px, 3vw, 44px);

  letter-spacing: -0.03em;

  pointer-events: none;
}

.viz-legend {
  display: inline-flex;
  align-items: center;

  gap: 6px;
}

.viz-legend i,
.viz-legend b {
  width: 14px;
  height: 2px;

  display: inline-block;
}

.viz-legend i {
  background: var(--signal);
}

.viz-legend b {
  background: var(--black);
}


/* ================================================================
   DATASET INFO SIDE
   ================================================================ */

.dataset-info {
  min-width: 0;

  display: flex;
  flex-direction: column;

  color: var(--ink);
  background: var(--paper);
}


/* ================================================================
   DATASET BLUE HEADLINE
   ================================================================ */

.dataset-summary-box {
  padding: 22px 18px 20px;

  color: var(--white);
  background: var(--ink);

  border-bottom: var(--hairline);
}

.dataset-heading {
  padding: 0;
}

.dataset-period {
  margin: 0 0 8px;

  color: var(--white);

  font-size: 16px;

  letter-spacing: 0.045em;
}

.dataset-title {
  margin: 0;

  color: var(--white);

  font-family: var(--casual);

  font-size: clamp(28px, 3vw, 46px);
  font-weight: 500;
  line-height: 0.95;

  letter-spacing: -0.045em;
}


/* ================================================================
   DATASET BUTTON BAR
   ================================================================ */

.dataset-actions {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  background: var(--paper);

  border-bottom: var(--hairline);
}

.dataset-actions .action {
  position: relative;

  z-index: 2;

  width: 100%;

  min-height: 70px;

  margin: 0;
  padding: 0 8px;

  border-width: 0 1px 0 0;

  font-size: 16px;
}

.dataset-actions .action:last-child {
  border-right: 0;
}


/* ================================================================
   DATASET WHITE DETAIL BOX
   ================================================================ */

.dataset-detail-box {
    position: relative;
    flex: 1 1 auto;
    padding: 60px 30px 20px;
    color: var(--black);
    background: var(--white);
    overflow: hidden;
    isolation: isolate;
}

.dataset-detail-box > * {
  position: relative;

  z-index: 2;
}

.dataset-question {
  margin: 0;

  color: var(--black);

  font-size: 20px;
  line-height: 1.45;
}

.dataset-meta {
  margin: 22px 0 0;

  display: grid;

  gap: 11px;
}

.dataset-meta > div {
  display: grid;

  grid-template-columns:
    88px
    minmax(0, 1fr);

  gap: 12px;

  padding: 0;
}

.dataset-meta dt {
  margin: 0;

  color: var(--signal);

  font-size: 16px;

  letter-spacing: 0.04em;
}

.dataset-meta dd {
  margin: 0;

  color: var(--black);

  font-size: 16px;
  line-height: 1.4;
}

.dataset-source {
  display: flex;
  flex-direction: column;
  align-items: flex-start;

  gap: 5px;
}

.dataset-source a {
  color: var(--black);

  text-decoration-color: rgba(0, 0, 0, 0.55);
}

.dataset-source a:hover {
  text-decoration-thickness: 2px;
}

.dataset-source-secondary {
  font-size: 16px;

  opacity: 0.76;
}

.dataset-note {
  margin: 20px 0 0;

  color: var(--signal);

  font-size: 16px;
  line-height: 1.45;
}


/* ================================================================
   CHART VISUAL SYSTEM
   ================================================================ */

.chart-grid {
  display: none;
}

.chart-axis text {
  fill: var(--black);

  font-family: var(--casual);

  font-size: 20px;
}

.chart-axis line {
  stroke: var(--black);
  stroke-width: 1;

  vector-effect: non-scaling-stroke;
}

.chart-actual,
.chart-user {
  fill: none;

  vector-effect: non-scaling-stroke;

  stroke-linecap: square;
  stroke-linejoin: round;
}

.chart-actual {
  stroke: var(--black);
  stroke-width: 4;
}

.chart-user {
  stroke: var(--signal);
  stroke-width: 5;
}

.chart-cursor {
  stroke: var(--ink);
  stroke-width: 2;

  stroke-dasharray: 7 8;

  vector-effect: non-scaling-stroke;
}

.chart-buffer rect.buffer-fill {
  fill: rgba(0, 0, 255, 0.055);
}

.chart-buffer .buffer-diagonal {
  display: none;
}

.chart-buffer .buffer-boundary {
  stroke: rgba(0, 0, 255, 0.32);
  stroke-width: 1;

  stroke-dasharray: none;
}

.chart-buffer text {
  fill: var(--signal);

  font-family: var(--casual);

  font-size: 20px;

  letter-spacing: 0.02em;
}

.is-hidden {
  display: none !important;
}


/* ================================================================
   METHOD
   ================================================================ */

.method-section {
  border-top: 0;
}

.method-copy {
  gap: 20px;

  font-size: 16px;
}

.method-copy p {
  margin: 0;
}

.method-copy code {
  color: var(--signal);
}

.method-copy .action {
  margin-top: 8px;
}


/* ================================================================
   FOOTER
   ================================================================ */

.site-footer {
  min-height: 94px;

  display: grid;

  grid-template-columns:
    1fr
    1fr
    1fr;

  align-items: center;

  gap: 20px;

  padding: 18px 20px;

  border: var(--hairline);
  border-top: 0;

  font-size: 16px;

  letter-spacing: -0.035em;
}

.site-footer div:nth-child(2) {
  color: var(--signal);

  text-align: center;
}

.site-footer a {
  justify-self: end;

  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}


/* ================================================================
   STORY MODES
   ================================================================ */

.story-data-chart,
.calibration-chart,
.story-blank-panel,
.stage-big-label {
  opacity: 0;
  visibility: hidden;

  pointer-events: none;
}

.calibration-chart,
.story-blank-panel {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;
}

.story-blank-panel {
  display: grid;
  place-content: center;

  padding: clamp(24px, 5vw, 72px);

  color: var(--ink);
  background: var(--white);

  font-size: clamp(28px, 4vw, 62px);
  line-height: 0.96;

  letter-spacing: -0.045em;
}

.story-blank-panel p {
  margin: 0;
}

.calibration-chart {
  display: block;

  background: var(--white);
}

.calibration-baseline {
  stroke: var(--black);
  stroke-width: 1;

  vector-effect: non-scaling-stroke;
}

.calibration-label {
  fill: var(--black);

  font-family: var(--casual);

  font-size: 20px;
}

.calibration-trace {
  fill: none;

  stroke: var(--signal);
  stroke-width: 5;

  stroke-linecap: round;
  stroke-linejoin: round;

  vector-effect: non-scaling-stroke;
}

.calibration-dot {
  fill: var(--signal);
}

.story-stage.mode-example .story-data-chart,
.story-stage.mode-example .stage-big-label,
.story-stage.mode-guess .story-blank-panel,
.story-stage.mode-calibrate .calibration-chart {
  opacity: 1;
  visibility: visible;
}

.chart-actual.is-revealing {
  stroke-width: 4.5;
}


/* ================================================================
   ================================================================
   ILLUSTRATED GRAIN SYSTEM
   ================================================================
   ================================================================ */


/*
  IMPORTANT:

  Grain is only applied to layout surfaces.

  No grain is applied to:
  - dataset charts
  - chart frames
  - story stage
  - calibration chart
*/

.dataset-visual,
.viz-frame,
.dataset-chart,
.story-stage,
.stage-viz,
.story-data-chart,
.calibration-chart,
.story-blank-panel {
  isolation: isolate;
}


/* ================================================================
   SHARED GRAIN LAYER
   ================================================================ */

.hero,
.story-copy,
.catalogue-intro,
.method-section,
.site-footer,
.dataset-detail-box {
  position: relative;

  isolation: isolate;
}

.hero::before,
.hero::after,
.story-copy::before,
.story-copy::after,
.catalogue-intro::before,
.catalogue-intro::after,
.method-section::before,
.method-section::after,
.site-footer::before,
.dataset-detail-box::before,
.dataset-detail-box::after {
  content: "";

  position: absolute;

  pointer-events: none;

  z-index: 1;

  /*
    First layer gives the blue density.
    Second layer supplies the random feTurbulence grain.
  */
  background-image:
    linear-gradient(
      90deg,
      rgba(0, 0, 255, 0.19),
      rgba(0, 0, 255, 0.14) 34%,
      rgba(0, 0, 255, 0.07) 70%,
      rgba(0, 0, 255, 0) 100%
    ),
    var(--grain-noise);

  background-repeat:
    no-repeat,
    repeat;

  background-size:
    100% 100%,
    185px 142px;

  background-blend-mode: multiply;

  mix-blend-mode: multiply;

  filter:
    contrast(138%)
    saturate(122%);

  opacity: 0;
}


/*
  Make sure text always sits above the grain.
*/

.hero > *,
.story-copy > *,
.catalogue-intro > *,
.method-section > *,
.site-footer > *,
.dataset-detail-box > * {
  position: relative;

  z-index: 2;
}


/* ================================================================
   HERO GRAIN
   ================================================================ */

.hero::before {
  left: 0;
  top: 0;
  width: min(610px, 64vw);
  height: 486px;
  opacity: 0.82;
  background-position:
    0 0,
    13px 7px;
  -webkit-mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      #000 18%,
      rgba(0, 0, 0, 0.96) 34%,
      rgba(0, 0, 0, 0.72) 58%,
      rgba(0, 0, 0, 0.25) 82%,
      transparent 98%
    ),
    linear-gradient(
      168deg,
      #000 0%,
      #000 22%,
      rgba(0, 0, 0, 0.92) 34%,
      rgba(0, 0, 0, 0.46) 48%,
      rgba(0, 0, 0, 0.10) 61%,
      transparent 76%
    );
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      #000 18%,
      rgba(0, 0, 0, 0.96) 34%,
      rgba(0, 0, 0, 0.72) 58%,
      rgba(0, 0, 0, 0.25) 82%,
      transparent 98%
    ),
    linear-gradient(
      168deg,
      #000 0%,
      #000 22%,
      rgba(0, 0, 0, 0.92) 34%,
      rgba(0, 0, 0, 0.46) 48%,
      rgba(0, 0, 0, 0.10) 61%,
      transparent 76%
    );
  mask-composite: intersect;


  -webkit-mask-composite: source-in;

  mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      #000 18%,
      rgba(0, 0, 0, 0.96) 34%,
      rgba(0, 0, 0, 0.72) 58%,
      rgba(0, 0, 0, 0.25) 82%,
      transparent 98%
    ),
    linear-gradient(
      168deg,
      #000 0%,
      #000 22%,
      rgba(0, 0, 0, 0.92) 34%,
      rgba(0, 0, 0, 0.46) 48%,
      rgba(0, 0, 0, 0.10) 61%,
      transparent 76%
    );

  mask-composite: intersect;
}

.hero::after {
  right: 0;
  bottom: 0;

  width: min(255px, 24vw);
  height: 58px;

  opacity: 0.42;

  transform:
    scaleX(-1)
    scaleY(-1);

  background-size:
    100% 100%,
    157px 119px;

  background-position:
    0 0,
    -31px 19px;

  -webkit-mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      #000 24%,
      rgba(0, 0, 0, 0.78) 56%,
      rgba(0, 0, 0, 0.22) 82%,
      transparent 98%
    ),
    linear-gradient(
      170deg,
      #000 0%,
      #000 24%,
      rgba(0, 0, 0, 0.74) 40%,
      rgba(0, 0, 0, 0.18) 59%,
      transparent 76%
    );

  -webkit-mask-composite: source-in;

  mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      #000 24%,
      rgba(0, 0, 0, 0.78) 56%,
      rgba(0, 0, 0, 0.22) 82%,
      transparent 98%
    ),
    linear-gradient(
      170deg,
      #000 0%,
      #000 24%,
      rgba(0, 0, 0, 0.74) 40%,
      rgba(0, 0, 0, 0.18) 59%,
      transparent 76%
    );

  mask-composite: intersect;
}


/* ================================================================
   STORY GRAIN
   ================================================================ */

.story-copy::before {
  left: 0;
  top: 0;

  width: min(520px, 94%);
  height: 76px;

  opacity: 0.73;

  background-size:
    100% 100%,
    171px 131px;

  background-position:
    0 0,
    37px -18px;

  -webkit-mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      #000 14%,
      rgba(0, 0, 0, 0.94) 35%,
      rgba(0, 0, 0, 0.61) 66%,
      rgba(0, 0, 0, 0.14) 89%,
      transparent 98%
    ),
    linear-gradient(
      167deg,
      #000 0%,
      #000 20%,
      rgba(0, 0, 0, 0.92) 33%,
      rgba(0, 0, 0, 0.41) 49%,
      rgba(0, 0, 0, 0.08) 62%,
      transparent 75%
    );

  -webkit-mask-composite: source-in;

  mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      #000 14%,
      rgba(0, 0, 0, 0.94) 35%,
      rgba(0, 0, 0, 0.61) 66%,
      rgba(0, 0, 0, 0.14) 89%,
      transparent 98%
    ),
    linear-gradient(
      167deg,
      #000 0%,
      #000 20%,
      rgba(0, 0, 0, 0.92) 33%,
      rgba(0, 0, 0, 0.41) 49%,
      rgba(0, 0, 0, 0.08) 62%,
      transparent 75%
    );

  mask-composite: intersect;
}

.story-copy::after {
  right: 0;
  bottom: 0;

  width: min(305px, 64%);
  height: 92px;

  opacity: 0.50;

  transform:
    scaleX(-1)
    scaleY(-1);

  background-size:
    100% 100%,
    207px 159px;

  background-position:
    0 0,
    -54px 28px;

  -webkit-mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      #000 22%,
      rgba(0, 0, 0, 0.84) 45%,
      rgba(0, 0, 0, 0.28) 74%,
      transparent 98%
    ),
    linear-gradient(
      165deg,
      #000 0%,
      #000 18%,
      rgba(0, 0, 0, 0.82) 34%,
      rgba(0, 0, 0, 0.31) 52%,
      transparent 74%
    );

  -webkit-mask-composite: source-in;

  mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      #000 22%,
      rgba(0, 0, 0, 0.84) 45%,
      rgba(0, 0, 0, 0.28) 74%,
      transparent 98%
    ),
    linear-gradient(
      165deg,
      #000 0%,
      #000 18%,
      rgba(0, 0, 0, 0.82) 34%,
      rgba(0, 0, 0, 0.31) 52%,
      transparent 74%
    );

  mask-composite: intersect;
}


/* ================================================================
   CATALOGUE INTRO GRAIN
   ================================================================ */

.catalogue-intro {
  overflow: hidden;
}

.catalogue-intro::before {
  left: 0;
  top: 0;
  width: min(145px, 59vw);
  height: 464px;
  opacity: 0.58;
  background-size:
    100% 100%,
    183px 138px;
  background-position:
    0 0,
    71px 11px;
  -webkit-mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      #000 17%,
      rgba(0, 0, 0, 0.88) 42%,
      rgba(0, 0, 0, 0.35) 75%,
      transparent 98%
    ),
    linear-gradient(
      169deg,
      #000 0%,
      #000 21%,
      rgba(0, 0, 0, 0.82) 36%,
      rgba(0, 0, 0, 0.22) 54%,
      transparent 74%
    );
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      #000 17%,
      rgba(0, 0, 0, 0.88) 42%,
      rgba(0, 0, 0, 0.35) 75%,
      transparent 98%
    ),
    linear-gradient(
      169deg,
      #000 0%,
      #000 21%,
      rgba(0, 0, 0, 0.82) 36%,
      rgba(0, 0, 0, 0.22) 54%,
      transparent 74%
    );
  mask-composite: intersect;
}

.catalogue-intro::after {
  right: 0;
  bottom: 0;

  width: min(205px, 20vw);
  height: 48px;

  opacity: 0.31;

  transform:
    scaleX(-1)
    scaleY(-1);

  background-size:
    100% 100%,
    149px 121px;

  background-position:
    0 0,
    -22px -39px;

  -webkit-mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      #000 25%,
      rgba(0, 0, 0, 0.66) 55%,
      rgba(0, 0, 0, 0.16) 82%,
      transparent 98%
    ),
    linear-gradient(
      170deg,
      #000 0%,
      #000 26%,
      rgba(0, 0, 0, 0.64) 43%,
      rgba(0, 0, 0, 0.13) 59%,
      transparent 75%
    );

  -webkit-mask-composite: source-in;

  mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      #000 25%,
      rgba(0, 0, 0, 0.66) 55%,
      rgba(0, 0, 0, 0.16) 82%,
      transparent 98%
    ),
    linear-gradient(
      170deg,
      #000 0%,
      #000 26%,
      rgba(0, 0, 0, 0.64) 43%,
      rgba(0, 0, 0, 0.13) 59%,
      transparent 75%
    );

  mask-composite: intersect;
}


/* ================================================================
   STORY STEP GRAIN
   Grain direkt in einzelnen Articles der story-shell
   ================================================================ */

.story-step {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.story-step > * {
  position: relative;
  z-index: 2;
}

/* gemeinsame Basis */
.story-step::before,
.story-step::after {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;

  background-image:
    linear-gradient(
      90deg,
      rgba(0, 0, 255, 0.20),
      rgba(0, 0, 255, 0.14) 38%,
      rgba(0, 0, 255, 0.06) 72%,
      transparent 100%
    ),
    var(--grain-noise);

  background-repeat:
    no-repeat,
    repeat;

  background-size:
    100% 100%,
    180px 140px;

  background-blend-mode: multiply;
  mix-blend-mode: multiply;

  filter:
    contrast(145%)
    saturate(125%);

  display: none;
}


/* ================================================================
   STORY STEP 1
   sehr langer, flacher Grain oben links
   ================================================================ */

.story-step:nth-child(1)::before {
  display: block;

  left: 0;
  top: 0;

  width: min(34px, 84%);
  height: 602px;

  opacity: 0.72;

  background-position:
    0 0,
    24px -31px;

  -webkit-mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      #000 10%,
      rgba(0,0,0,.94) 27%,
      rgba(0,0,0,.68) 53%,
      rgba(0,0,0,.31) 73%,
      rgba(0,0,0,.08) 88%,
      transparent 98%
    ),
    linear-gradient(
      169deg,
      #000 0%,
      rgba(0,0,0,.92) 25%,
      rgba(0,0,0,.48) 42%,
      rgba(0,0,0,.14) 57%,
      transparent 73%
    );

  -webkit-mask-composite: source-in;

  mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      #000 10%,
      rgba(0,0,0,.94) 27%,
      rgba(0,0,0,.68) 53%,
      rgba(0,0,0,.31) 73%,
      rgba(0,0,0,.08) 88%,
      transparent 98%
    ),
    linear-gradient(
      169deg,
      #000 0%,
      rgba(0,0,0,.92) 25%,
      rgba(0,0,0,.48) 42%,
      rgba(0,0,0,.14) 57%,
      transparent 73%
    );

  mask-composite: intersect;
}


/* ================================================================
   STORY STEP 2
   kleinere Ecke unten rechts
   ================================================================ */

.story-step:nth-child(2)::after {
  display: block;

  right: 0;
  bottom: 0;

  width: min(250px, 57%);
  height: 302px;

  opacity: 0.53;

  transform:
    scaleX(-1)
    scaleY(-1);

  background-size:
    100% 100%,
    205px 155px;

  background-position:
    0 0,
    -47px 22px;

  -webkit-mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      rgba(0,0,0,.88) 27%,
      rgba(0,0,0,.52) 54%,
      rgba(0,0,0,.18) 77%,
      transparent 97%
    ),
    linear-gradient(
      164deg,
      #000 0%,
      rgba(0,0,0,.86) 27%,
      rgba(0,0,0,.39) 48%,
      rgba(0,0,0,.10) 64%,
      transparent 80%
    );

  -webkit-mask-composite: source-in;

  mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      rgba(0,0,0,.88) 27%,
      rgba(0,0,0,.52) 54%,
      rgba(0,0,0,.18) 77%,
      transparent 97%
    ),
    linear-gradient(
      164deg,
      #000 0%,
      rgba(0,0,0,.86) 27%,
      rgba(0,0,0,.39) 48%,
      rgba(0,0,0,.10) 64%,
      transparent 80%
    );

  mask-composite: intersect;
}


/* ================================================================
   STORY STEP 3
   mittellang oben rechts
   bewusster anderer Charakter
   ================================================================ */

.story-step:nth-child(3)::before {
  display: block;

  right: 0;
  top: 0;

  width: min(350px, 72%);
  height: 48px;

  opacity: 0.46;

  transform: scaleX(-1);

  background-size:
    100% 100%,
    153px 121px;

  background-position:
    0 0,
    -36px 18px;

  -webkit-mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      rgba(0,0,0,.82) 24%,
      rgba(0,0,0,.53) 52%,
      rgba(0,0,0,.22) 75%,
      rgba(0,0,0,.06) 89%,
      transparent 98%
    ),
    linear-gradient(
      172deg,
      #000 0%,
      rgba(0,0,0,.75) 24%,
      rgba(0,0,0,.30) 41%,
      rgba(0,0,0,.07) 55%,
      transparent 70%
    );

  -webkit-mask-composite: source-in;

  mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      rgba(0,0,0,.82) 24%,
      rgba(0,0,0,.53) 52%,
      rgba(0,0,0,.22) 75%,
      rgba(0,0,0,.06) 89%,
      transparent 98%
    ),
    linear-gradient(
      172deg,
      #000 0%,
      rgba(0,0,0,.75) 24%,
      rgba(0,0,0,.30) 41%,
      rgba(0,0,0,.07) 55%,
      transparent 70%
    );

  mask-composite: intersect;
}


/* ================================================================
   MOBILE
   Grain etwas kleiner / ruhiger
   ================================================================ */

@media (max-width: 720px) {


  .viz-statusline{
   background-color:white;
  }

  .viz-current {display: none}

  .story-step:nth-child(1)::before {
    width: min(300px, 84%);
    height: 48px;
    opacity: 0.58;
  }

  .story-step:nth-child(2)::after {
    width: min(170px, 48%);
    height: 64px;
    opacity: 0.42;
  }

  .story-step:nth-child(3)::before {
    width: min(230px, 63%);
    height: 40px;
    opacity: 0.38;
  }

}



/* ================================================================
   METHOD GRAIN
   ================================================================ */

.method-section {
  overflow: hidden;
}

.method-section::before {
  left: 0;
  top: 0;

    width: min(1200px, 100vw);
    height: 554px;

  opacity: 0.44;

  background-size:
    100% 100%,
    214px 152px;

  background-position:
    0 0,
    29px 47px;

  -webkit-mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      #000 20%,
      rgba(0, 0, 0, 0.74) 49%,
      rgba(0, 0, 0, 0.21) 79%,
      transparent 98%
    ),
    linear-gradient(
      168deg,
      #000 0%,
      #000 23%,
      rgba(0, 0, 0, 0.71) 39%,
      rgba(0, 0, 0, 0.17) 58%,
      transparent 76%
    );

  -webkit-mask-composite: source-in;

  mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      #000 20%,
      rgba(0, 0, 0, 0.74) 49%,
      rgba(0, 0, 0, 0.21) 79%,
      transparent 98%
    ),
    linear-gradient(
      168deg,
      #000 0%,
      #000 23%,
      rgba(0, 0, 0, 0.71) 39%,
      rgba(0, 0, 0, 0.17) 58%,
      transparent 76%
    );

  mask-composite: intersect;
}

.method-section::after {
  display: none;
}


/* ================================================================
   FOOTER GRAIN
   ================================================================ */

.site-footer {
  overflow: hidden;
}

.site-footer::before {
  right: 0;
  top: 0;

  width: 270px;
  height: 44px;

  opacity: 0.37;

  transform: scaleX(-1);

  background-size:
    100% 100%,
    163px 126px;

  background-position:
    0 0,
    -43px 8px;

  -webkit-mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      #000 20%,
      rgba(0, 0, 0, 0.70) 50%,
      rgba(0, 0, 0, 0.18) 80%,
      transparent 98%
    ),
    linear-gradient(
      170deg,
      #000 0%,
      #000 25%,
      rgba(0, 0, 0, 0.66) 41%,
      rgba(0, 0, 0, 0.14) 59%,
      transparent 75%
    );

  -webkit-mask-composite: source-in;

  mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      #000 20%,
      rgba(0, 0, 0, 0.70) 50%,
      rgba(0, 0, 0, 0.18) 80%,
      transparent 98%
    ),
    linear-gradient(
      170deg,
      #000 0%,
      #000 25%,
      rgba(0, 0, 0, 0.66) 41%,
      rgba(0, 0, 0, 0.14) 59%,
      transparent 75%
    );

  mask-composite: intersect;
}


/* ================================================================
   DATASET GRAIN
   ================================================================ */

/*
  Reset all dataset grain first.

  Individual cards below selectively enable ::before / ::after.
*/

.dataset-detail-box::before,
.dataset-detail-box::after {
  display: none;
}


/* ================================================================
   DATASET 1
   LONG / SHALLOW
   ================================================================ */

.dataset-module:nth-child(1) .dataset-detail-box::before {
  
  
      display: block;
    left: 0;
    top: 0;
    width: min(20px, 100%);
    height: 364px;
    opacity: 0.86;
    


  background-position:
    0 0,
    19px -27px;

  -webkit-mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      #000 12%,
      rgba(0, 0, 0, 0.94) 30%,
      rgba(0, 0, 0, 0.70) 52%,
      rgba(0, 0, 0, 0.38) 70%,
      rgba(0, 0, 0, 0.12) 84%,
      transparent 97%
    ),
    linear-gradient(
      168deg,
      #000 0%,
      rgba(0, 0, 0, 0.94) 25%,
      rgba(0, 0, 0, 0.58) 42%,
      rgba(0, 0, 0, 0.20) 58%,
      transparent 76%
    );

  -webkit-mask-composite: source-in;

  mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      #000 12%,
      rgba(0, 0, 0, 0.94) 30%,
      rgba(0, 0, 0, 0.70) 52%,
      rgba(0, 0, 0, 0.38) 70%,
      rgba(0, 0, 0, 0.12) 84%,
      transparent 97%
    ),
    linear-gradient(
      168deg,
      #000 0%,
      rgba(0, 0, 0, 0.94) 25%,
      rgba(0, 0, 0, 0.58) 42%,
      rgba(0, 0, 0, 0.20) 58%,
      transparent 76%
    );

  mask-composite: intersect;
}


/* ================================================================
   DATASET 2
   SHORTER / DEEPER / RIGHT
   ================================================================ */

.dataset-module:nth-child(2) .dataset-detail-box::after {
  display: block;

  right: 0;
  top: 0;

  width: min(105px, 55%);
  height: 388px;

  opacity: 0.56;

  transform: scaleX(-1);

  background-size:
    100% 100%,
    204px 149px;

  background-position:
    0 0,
    -62px 21px;

  -webkit-mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      rgba(0, 0, 0, 0.90) 28%,
      rgba(0, 0, 0, 0.60) 52%,
      rgba(0, 0, 0, 0.24) 74%,
      transparent 96%
    ),
    linear-gradient(
      164deg,
      #000 0%,
      rgba(0, 0, 0, 0.87) 27%,
      rgba(0, 0, 0, 0.43) 49%,
      rgba(0, 0, 0, 0.12) 66%,
      transparent 82%
    );

  -webkit-mask-composite: source-in;

  mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      rgba(0, 0, 0, 0.90) 28%,
      rgba(0, 0, 0, 0.60) 52%,
      rgba(0, 0, 0, 0.24) 74%,
      transparent 96%
    ),
    linear-gradient(
      164deg,
      #000 0%,
      rgba(0, 0, 0, 0.87) 27%,
      rgba(0, 0, 0, 0.43) 49%,
      rgba(0, 0, 0, 0.12) 66%,
      transparent 82%
    );

  mask-composite: intersect;
}


/* ================================================================
   DATASET 3
   INTENTIONALLY CLEAN
   ================================================================ */


/* ================================================================
   DATASET 4
   VERY LONG / ALMOST LINE-LIKE
   ================================================================ */

.dataset-module:nth-child(4) .dataset-detail-box::before {
  display: block;

  left: 0;
  top: 0;

    width: 7%;
    height: 405px;

  opacity: 0.47;

  background-size:
    100% 100%,
    160px 127px;

  background-position:
    0 0,
    42px 18px;

  -webkit-mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      rgba(0, 0, 0, 0.86) 24%,
      rgba(0, 0, 0, 0.55) 51%,
      rgba(0, 0, 0, 0.27) 72%,
      rgba(0, 0, 0, 0.08) 87%,
      transparent 98%
    ),
    linear-gradient(
      172deg,
      #000 0%,
      rgba(0, 0, 0, 0.80) 25%,
      rgba(0, 0, 0, 0.34) 43%,
      rgba(0, 0, 0, 0.08) 57%,
      transparent 72%
    );

  -webkit-mask-composite: source-in;

  mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      rgba(0, 0, 0, 0.86) 24%,
      rgba(0, 0, 0, 0.55) 51%,
      rgba(0, 0, 0, 0.27) 72%,
      rgba(0, 0, 0, 0.08) 87%,
      transparent 98%
    ),
    linear-gradient(
      172deg,
      #000 0%,
      rgba(0, 0, 0, 0.80) 25%,
      rgba(0, 0, 0, 0.34) 43%,
      rgba(0, 0, 0, 0.08) 57%,
      transparent 72%
    );

  mask-composite: intersect;
}


/* ================================================================
   DATASET 5
   STRONGER / DEEPER
   ================================================================ */

.dataset-module:nth-child(5) .dataset-detail-box::before {
  display: block;

  left: 0;
  top: 0;

  width: min(24px, 46%);
  height: 650px;

  opacity: 0.82;

  background-size:
    100% 100%,
    188px 139px;

  background-position:
    0 0,
    -14px 31px;

  -webkit-mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      #000 14%,
      rgba(0, 0, 0, 0.91) 31%,
      rgba(0, 0, 0, 0.58) 55%,
      rgba(0, 0, 0, 0.24) 75%,
      rgba(0, 0, 0, 0.06) 89%,
      transparent 98%
    ),
    linear-gradient(
      163deg,
      #000 0%,
      rgba(0, 0, 0, 0.92) 25%,
      rgba(0, 0, 0, 0.54) 46%,
      rgba(0, 0, 0, 0.19) 63%,
      transparent 82%
    );

  -webkit-mask-composite: source-in;

  mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      #000 14%,
      rgba(0, 0, 0, 0.91) 31%,
      rgba(0, 0, 0, 0.58) 55%,
      rgba(0, 0, 0, 0.24) 75%,
      rgba(0, 0, 0, 0.06) 89%,
      transparent 98%
    ),
    linear-gradient(
      163deg,
      #000 0%,
      rgba(0, 0, 0, 0.92) 25%,
      rgba(0, 0, 0, 0.54) 46%,
      rgba(0, 0, 0, 0.19) 63%,
      transparent 82%
    );

  mask-composite: intersect;
}


/* ================================================================
   DATASET 6
   LONG / FROM RIGHT
   ================================================================ */

.dataset-module:nth-child(6) .dataset-detail-box::after {
  display: block;

  right: 0;
  top: 0;

width: min(130px, 94%);
    height: 555px;

  opacity: 0.7;

  transform: scaleX(-1);

  background-size:
    100% 100%,
    222px 163px;

  background-position:
    0 0,
    -73px -22px;

  -webkit-mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      rgba(0, 0, 0, 0.88) 25%,
      rgba(0, 0, 0, 0.57) 53%,
      rgba(0, 0, 0, 0.25) 73%,
      rgba(0, 0, 0, 0.07) 88%,
      transparent 98%
    ),
    linear-gradient(
      170deg,
      #000 0%,
      rgba(0, 0, 0, 0.82) 25%,
      rgba(0, 0, 0, 0.36) 43%,
      rgba(0, 0, 0, 0.09) 58%,
      transparent 73%
    );

  -webkit-mask-composite: source-in;

  mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      rgba(0, 0, 0, 0.88) 25%,
      rgba(0, 0, 0, 0.57) 53%,
      rgba(0, 0, 0, 0.25) 73%,
      rgba(0, 0, 0, 0.07) 88%,
      transparent 98%
    ),
    linear-gradient(
      170deg,
      #000 0%,
      rgba(0, 0, 0, 0.82) 25%,
      rgba(0, 0, 0, 0.36) 43%,
      rgba(0, 0, 0, 0.09) 58%,
      transparent 73%
    );

  mask-composite: intersect;
}


/* ================================================================
   DATASET 7
   INTENTIONALLY CLEAN
   ================================================================ */


/* ================================================================
   DATASET 8
   SMALL ACCENT
   ================================================================ */

.dataset-module:nth-child(8) .dataset-detail-box::before {
  display: block;

  left: 0;
  top: 0;

  width: min(160px, 44%);
  height: 66px;

  opacity: 0.40;

  background-size:
    100% 100%,
    172px 131px;

  background-position:
    0 0,
    57px -36px;

  -webkit-mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      rgba(0, 0, 0, 0.74) 36%,
      rgba(0, 0, 0, 0.31) 66%,
      rgba(0, 0, 0, 0.08) 84%,
      transparent 97%
    ),
    linear-gradient(
      165deg,
      #000 0%,
      rgba(0, 0, 0, 0.73) 29%,
      rgba(0, 0, 0, 0.28) 50%,
      rgba(0, 0, 0, 0.06) 65%,
      transparent 79%
    );

  -webkit-mask-composite: source-in;

  mask-image:
    linear-gradient(
      90deg,
      #000 0%,
      rgba(0, 0, 0, 0.74) 36%,
      rgba(0, 0, 0, 0.31) 66%,
      rgba(0, 0, 0, 0.08) 84%,
      transparent 97%
    ),
    linear-gradient(
      165deg,
      #000 0%,
      rgba(0, 0, 0, 0.73) 29%,
      rgba(0, 0, 0, 0.28) 50%,
      rgba(0, 0, 0, 0.06) 65%,
      transparent 79%
    );

  mask-composite: intersect;
}


/* ================================================================
   STICKY DATASET STACK
   ================================================================ */

@media (min-width: 981px) {
  .dataset-module {
    position: sticky;

    top: var(--topbar-h);

    z-index: var(--stack-index, 1);

    min-height: calc(100vh - var(--topbar-h));
    min-height: calc(100svh - var(--topbar-h));

    background: var(--paper);

    box-shadow:
      0 -16px 28px rgba(0, 0, 255, 0.035);
  }
}


/* ================================================================
   TABLET
   ================================================================ */

@media (max-width: 980px) {
  :root {
    --topbar-h: 58px;
  }

  .topbar {
    grid-template-columns: 1fr auto;

    padding: 0 12px;
  }

  .topbar-status {
    display: none;
  }

  .header-icon {
    width: 36px;
    height: 36px;

    flex-basis: 36px;
  }

  .hero {
    min-height: 560px;
  }

  .story-shell {
    grid-template-columns: 1fr;
  }

  .story-copy {
    border-right: 0;
  }

  .story-stage {
    position: relative;

    top: 0;

    height: min(72vh, 720px);

    border-top: var(--hairline);
  }

  .story-step {
    min-height: auto;

    padding-block: 70px;

    opacity: 1;
  }

  .story-step:last-child {
    min-height: auto;
  }

  .catalogue-intro,
  .method-section {
    grid-template-columns: 1fr;
  }

  .catalogue-intro > div,
  .method-section > div:first-child {
    border-right: 0;
    border-bottom: var(--hairline);
  }

  .dataset-module {
    position: relative;

    top: auto;

    grid-template-columns: 1fr;
  }

  .dataset-visual {
    min-height: 520px;

    border-right: 0;
    border-bottom: var(--hairline);
  }

  .dataset-info {
    min-height: 0;
  }

  .dataset-detail-box {
    padding: 18px 16px 20px;
  }

  .dataset-actions .action {
    min-height: 66px;
  }


  /* GRAIN */

  .hero::before {
    width: 360px;
    height: 72px;
  }

  .hero::after {
    width: 170px;
    height: 50px;
  }

  .story-copy::before {
    width: min(390px, 86%);
    height: 68px;
  }

  .story-copy::after {
    width: min(230px, 55%);
    height: 78px;
  }

  .catalogue-intro::before {
    width: 335px;
    height: 56px;
  }

  .catalogue-intro::after {
    width: 160px;
    height: 44px;
  }

  .method-section::before {
    width: 260px;
    height: 48px;
  }

  .site-footer::before {
    width: 220px;
    height: 42px;
  }

  .dataset-module:nth-child(1) .dataset-detail-box::before {
    width: min(390px, 90%);
    height: 58px;
  }

  .dataset-module:nth-child(2) .dataset-detail-box::after {
    width: min(170px, 48%);
    height: 78px;
  }

  .dataset-module:nth-child(4) .dataset-detail-box::before {
    width: 95%;
    height: 40px;
  }

  .dataset-module:nth-child(5) .dataset-detail-box::before {
    width: min(320px, 80%);
    height: 90px;
  }

  .dataset-module:nth-child(6) .dataset-detail-box::after {
    width: min(370px, 90%);
    height: 50px;
  }

  .dataset-module:nth-child(8) .dataset-detail-box::before {
    width: min(135px, 38%);
    height: 56px;
  }
}


/* ================================================================
   MOBILE DATASET ORDER
   ================================================================ */

@media (max-width: 720px) {
  .dataset-module {
    display: grid;

    grid-template-columns: 1fr;

    grid-template-areas:
      "summary"
      "actions"
      "details"
      "visual";

    min-height: 0;
  }

  .dataset-info {
    display: contents;
  }

  .dataset-summary-box {
    grid-area: summary;

    border-bottom: var(--hairline);
  }

  .dataset-actions {
    grid-area: actions;

    margin-top: 0;
  }

  .dataset-detail-box {
    grid-area: details;
  }

  .dataset-visual {
    grid-area: visual;

    border-right: 0;
    border-bottom: var(--hairline);
  }

  .dataset-actions .action {
    min-height: 64px;

    padding-inline: 5px;

    border-right: var(--hairline);

    font-size: 16px;
  }

  .dataset-actions .action:last-child {
    border-right: 0;
  }


  /* GRAIN */

  .hero::before {
    width: 245px;
    height: 62px;

    opacity: 0.66;
  }

  .hero::after {
    display: none;
  }

  .story-copy::before {
    width: min(285px, 78%);
    height: 60px;

    opacity: 0.58;
  }

  .story-copy::after {
    width: min(180px, 48%);
    height: 68px;

    opacity: 0.38;
  }

  .catalogue-intro::before {
    width: 235px;
    height: 50px;

    opacity: 0.48;
  }

  .catalogue-intro::after {
    display: none;
  }

  .method-section::before {
    width: 190px;
    height: 44px;

    opacity: 0.40;
  }

  .site-footer::before {
    width: 160px;
    height: 38px;

    opacity: 0.34;
  }

  .dataset-module:nth-child(1) .dataset-detail-box::before {
    width: min(280px, 80%);
    height: 50px;

    opacity: 0.62;
  }

  .dataset-module:nth-child(2) .dataset-detail-box::after {
    width: min(135px, 40%);
    height: 66px;

    opacity: 0.44;
  }

  .dataset-module:nth-child(4) .dataset-detail-box::before {
    width: 88%;
    height: 34px;

    opacity: 0.36;
  }

  .dataset-module:nth-child(5) .dataset-detail-box::before {
    width: min(235px, 67%);
    height: 76px;

    opacity: 0.64;
  }

  .dataset-module:nth-child(6) .dataset-detail-box::after {
    width: min(270px, 77%);
    height: 44px;

    opacity: 0.42;
  }

  .dataset-module:nth-child(8) .dataset-detail-box::before {
    width: min(115px, 34%);
    height: 50px;

    opacity: 0.32;
  }
}


/* ================================================================
   SMALL MOBILE
   ================================================================ */

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .powered-by span {
    display: none;
  }

  .brand span {
    font-size: 16px;
  }

  .hero-inner {
    padding-inline: 18px;
    padding-bottom: 92px;
  }

  .hero h1 {
    font-size: clamp(58px, 19vw, 72px);
  }

  .hero-lead {
    font-size: 20px;
  }

  .scroll-indicator {
    padding-inline: 18px;
  }

  .story-step {
    padding: 54px 18px;
  }

  .story-step h2,
  .catalogue-intro h2,
  .method-section h2 {
    font-size: clamp(34px, 11vw, 52px);
  }

  .story-stage {
    height: 62vh;

    min-height: 430px;
  }

  .stage-big-label {
    font-size: 34px;
  }

  .catalogue-intro > div,
  .catalogue-intro > p,
  .method-section > div:first-child,
  .method-copy {
    padding: 36px 18px;
  }

  .dataset-visual {
    min-height: 460px;

    grid-template-rows:
      42px
      minmax(350px, 1fr)
      38px;
  }

  .viz-frame {
    min-height: 350px;
  }

  .dataset-icon-badge {
    left: 14px;
    top: 14px;

    width: 52px;
    height: 52px;
  }

  .calibration-readout {
    grid-template-columns: 1fr;
  }

  .calibration-readout strong {
    text-align: left;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer div:nth-child(2) {
    text-align: left;
  }

  .site-footer a {
    justify-self: start;
  }
}


/* ================================================================
   REDUCED MOTION
   ================================================================ */

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .dataset-module {
    position: relative;

    top: auto;
  }
}