:root {
  --burnt-ember: #c4631a;
  --bright-rust: #e87b2f;
  --deep-char: #1a1209;
  --parchment: #f0d9b5;
  --steel-mist: #8a9ba8;
  --dark-umber: #2b1d11;
  --warm-gray: #5c5048;
  --amber-glow: #f5a623;
  --panel-black: rgba(26, 18, 9, 0.78);
}

/* Design typography anchors: "IBM Plex Mono" (Google Fonts terminal voice). Space Grotesk: "ambient signal — riron.net" in `#5c5048`. This panel serves as visual breathing room. "Space Grotesk" (Google Fonts chrome voice). */

@property --angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  background:
    radial-gradient(circle at 8% 12%, rgba(245, 166, 35, 0.16) 0 2.5%, transparent 6%),
    radial-gradient(circle at 76% 22%, rgba(196, 99, 26, 0.17) 0 3%, transparent 8%),
    radial-gradient(circle at 47% 86%, rgba(232, 123, 47, 0.12) 0 2%, transparent 7%),
    linear-gradient(135deg, #1a1209 0%, #120b05 52%, #2b1d11 100%);
  color: var(--steel-mist);
  font-family: 'Space Grotesk', sans-serif;
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: 16vh 24vh 18vh 20vh 22vh;
  gap: 3px;
  width: 100vw;
  height: 100vh;
  padding: 3px;
  isolation: isolate;
  position: relative;
}

.dashboard::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  mix-blend-mode: screen;
  background:
    radial-gradient(circle at 15% 25%, #f5a623 0%, transparent 3%),
    radial-gradient(circle at 72% 18%, #c4631a 0%, transparent 5%),
    radial-gradient(circle at 45% 67%, #f5a623 0%, transparent 2%),
    radial-gradient(circle at 88% 42%, #e87b2f 0%, transparent 4%),
    radial-gradient(circle at 30% 80%, #c4631a 0%, transparent 6%),
    radial-gradient(circle at 60% 35%, #f5a623 0%, transparent 1.5%);
  background-size: 190% 190%;
  animation: bokeh-drift 31s ease-in-out infinite;
}

.panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  border: 2px solid transparent;
  border-radius: 2px;
  background: var(--panel-black);
  background-clip: padding-box;
  box-shadow: inset 0 0 1px #c4631a, 0 0 24px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  transition: filter 300ms ease, opacity 300ms ease, box-shadow 300ms ease;
}

.panel::before {
  content: '';
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: inherit;
  background: conic-gradient(from var(--angle), rgba(196, 99, 26, 0.95), transparent 28%, rgba(232, 123, 47, 0.9) 58%, transparent 76%, rgba(245, 166, 35, 0.65));
  animation: border-spin var(--spin, 8s) linear infinite;
  animation-delay: var(--delay, 0s);
  opacity: 0.64;
  transition: opacity 240ms ease, filter 240ms ease;
}

.panel::after {
  content: '';
  position: absolute;
  inset: 8px;
  pointer-events: none;
  opacity: 0.38;
  background:
    linear-gradient(#c4631a, #c4631a) left top / 34% 1px no-repeat,
    linear-gradient(#c4631a, #c4631a) right bottom / 46% 1px no-repeat,
    linear-gradient(#c4631a, #c4631a) left bottom / 1px 38% no-repeat,
    linear-gradient(#c4631a, #c4631a) right top / 1px 28% no-repeat;
}

@keyframes border-spin {
  to { --angle: 360deg; }
}

@keyframes bokeh-drift {
  0%, 100% { background-position: 0% 0%; }
  47% { background-position: 100% 72%; }
  71% { background-position: 24% 100%; }
}

.panel-label,
.edge-note,
.terminal-topline,
.bokeh-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #5c5048;
}

.panel-a {
  grid-column: 1 / 8;
  grid-row: 1 / 3;
  --spin: 8s;
  --delay: -1s;
  margin-right: -12px;
  overflow: visible;
  z-index: 3;
  padding: clamp(1.2rem, 3vw, 2.4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.panel-a .panel-label {
  position: absolute;
  top: 13px;
  left: 18px;
}

.proposition-container {
  position: relative;
  height: min(24vw, 230px);
  width: 105%;
}

.proposition {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(2.5rem, 5.7vw, 5rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.04;
  text-transform: uppercase;
  color: #e87b2f;
  opacity: 0;
  transform: translateX(-10px) skewX(-1deg);
  transition: opacity 600ms ease, transform 600ms ease;
  text-shadow: 0 0 18px rgba(232, 123, 47, 0.16);
}

.proposition.active {
  opacity: 1;
  transform: translateX(0) skewX(-1deg);
}

.edge-note {
  position: absolute;
  right: 20px;
  bottom: 14px;
  color: rgba(92, 80, 72, 0.9);
}

.panel-b {
  grid-column: 8 / 13;
  grid-row: 1 / 2;
  --spin: 6s;
  --delay: -3s;
  display: flex;
  align-items: center;
  padding: 0 0.6rem;
}

.ticker-track {
  width: 100%;
  overflow: hidden;
  transform: translateY(2px);
}

.ticker-text {
  display: inline-block;
  white-space: nowrap;
  padding-left: 115%;
  font-family: 'Courier Prime', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #8a9ba8;
  animation: ticker-scroll 120s linear infinite;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

.panel-c {
  grid-column: 8 / 13;
  grid-row: 2 / 4;
  --spin: 12s;
  --delay: -6s;
  border-radius: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 0 0 1.05rem;
  background:
    radial-gradient(circle at 15% 25%, #f5a623 0%, transparent 3%),
    radial-gradient(circle at 72% 18%, #c4631a 0%, transparent 5%),
    radial-gradient(circle at 45% 67%, #f5a623 0%, transparent 2%),
    radial-gradient(circle at 88% 42%, #e87b2f 0%, transparent 4%),
    radial-gradient(circle at 30% 80%, #c4631a 0%, transparent 6%),
    radial-gradient(circle at 60% 35%, #f5a623 0%, transparent 1.5%),
    #1a1209;
  background-size: 220% 220%;
  animation: bokeh-drift 15s ease-in-out infinite, bokeh-second 23s ease-in-out infinite reverse;
}

.bokeh-noise {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(240, 217, 181, 0.025) 0 1px, transparent 1px 4px);
  opacity: 0.5;
}

.bokeh-label {
  position: relative;
  z-index: 1;
  font-size: 0.6rem;
}

@keyframes bokeh-second {
  0%, 100% { filter: blur(0) brightness(0.9); }
  50% { filter: blur(4px) brightness(1.18); }
}

.panel-d {
  grid-column: 1 / 5;
  grid-row: 3 / 5;
  --spin: 10s;
  --delay: -4s;
  overflow: visible;
  padding: 1.15rem;
  z-index: 2;
}

.index-cards {
  position: relative;
  width: 100%;
  height: 100%;
  margin-top: 1.1rem;
}

.index-card {
  position: absolute;
  width: min(82%, 280px);
  min-height: 132px;
  padding: 1rem 1.05rem 1.05rem;
  border: 2px solid transparent;
  border-radius: 2px;
  background: #f0d9b5;
  color: #2b1d11;
  font-family: 'Caveat', cursive;
  font-size: 1.1rem;
  line-height: 1.5;
  font-weight: 400;
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3);
  transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1), z-index 1ms linear;
}

.index-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: inherit;
  background: conic-gradient(from var(--angle), #c4631a, transparent 30%, #e87b2f 60%, transparent);
  animation: border-spin 8s linear infinite;
  opacity: 0;
  transition: opacity 300ms ease;
}

.index-card h2 {
  font-size: 1.23rem;
  line-height: 1.05;
  font-weight: 700;
  margin-bottom: 0.36rem;
}

.index-card p {
  font-size: 1.03rem;
}

.card-1 { left: -2px; top: 8px; transform: rotate(-1deg); }
.card-2 { left: 18%; top: 56px; transform: rotate(1.6deg); z-index: 2; }
.card-3 { left: 6%; top: 132px; transform: rotate(-0.7deg); z-index: 3; }
.card-4 { left: 26%; top: 192px; transform: rotate(1.9deg); z-index: 4; }

.index-card:hover,
.index-card.focus-card {
  z-index: 8;
}

.card-1:hover,
.card-1.focus-card { transform: translateY(-4px) rotate(-1deg); }
.card-2:hover,
.card-2.focus-card { transform: translateY(-4px) rotate(1.6deg); }
.card-3:hover,
.card-3.focus-card { transform: translateY(-4px) rotate(-0.7deg); }
.card-4:hover,
.card-4.focus-card { transform: translateY(-4px) rotate(1.9deg); }

.index-card:hover::before,
.index-card.focus-card::before {
  opacity: 1;
}

.panel-e {
  grid-column: 5 / 13;
  grid-row: 4 / 6;
  --spin: 6s;
  --delay: -2s;
  padding: 1.1rem 1.25rem;
  background: rgba(26, 18, 9, 0.95);
  font-family: 'IBM Plex Mono', monospace;
  color: #c4631a;
}

.terminal-topline {
  margin-bottom: 0.75rem;
  font-size: 0.65rem;
}

.terminal-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.26rem;
  min-height: calc(100% - 1.5rem);
  overflow: hidden;
}

.log-line {
  display: flex;
  gap: 0.75rem;
  min-height: 1.36rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.7;
  font-weight: 300;
  opacity: 1;
  transition: opacity 400ms ease, transform 400ms ease;
}

.log-line.fading {
  opacity: 0;
  transform: translateY(-6px);
}

.log-timestamp {
  flex: 0 0 auto;
  color: #5c5048;
  font-weight: 500;
}

.log-message {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  color: #c4631a;
}

.log-message.typing {
  animation: type-reveal var(--typing-duration, 2200ms) steps(var(--steps, 42), end) both;
}

@keyframes type-reveal {
  from { width: 0; }
  to { width: 100%; }
}

.dashboard.panel-focus .panel:not(.is-focused) {
  opacity: 0.72;
  filter: saturate(0.72) brightness(0.76);
}

.panel.is-focused {
  box-shadow: inset 0 0 4px #c4631a, 0 0 24px rgba(232, 123, 47, 0.14);
}

.panel.is-focused::before {
  opacity: 1;
  filter: brightness(1.55);
  animation-duration: 2s;
}

.dashboard.panel-focus .panel:not(.is-focused)::before {
  opacity: 0.3;
}

@media (max-width: 768px) {
  html,
  body {
    overflow: auto;
  }

  .dashboard {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    min-height: 100vh;
  }

  .panel {
    width: 100%;
    overflow: hidden;
  }

  .panel-a {
    min-height: 48vh;
    margin-right: 0;
  }

  .proposition-container {
    width: 100%;
    height: 260px;
  }

  .proposition {
    font-size: clamp(1.55rem, 10vw, 2.5rem);
  }

  .panel-b {
    min-height: 74px;
  }

  .ticker-text {
    white-space: normal;
    animation-duration: 120s;
    padding-left: 30%;
    line-height: 1.5;
  }

  .panel-c {
    min-height: 80px;
    padding-bottom: 0.8rem;
  }

  .panel-d {
    min-height: auto;
    overflow: hidden;
  }

  .index-cards {
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
  }

  .index-card,
  .card-1,
  .card-2,
  .card-3,
  .card-4 {
    position: relative;
    inset: auto;
    width: 100%;
    transform: none;
  }

  .card-1:hover,
  .card-2:hover,
  .card-3:hover,
  .card-4:hover,
  .card-1.focus-card,
  .card-2.focus-card,
  .card-3.focus-card,
  .card-4.focus-card {
    transform: translateY(-4px);
  }

  .panel-e {
    min-height: 340px;
    max-height: 40vh;
    overflow-y: auto;
  }

  .log-line {
    white-space: normal;
  }

  .log-message {
    white-space: normal;
  }
}
