/* ======================================================================
   PAGE SHELL
   Editorial header, toolbar, footer, and responsive page behavior.
   ====================================================================== */
main {
  width: min(var(--page-max), 100vw);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(20px, 2.55vw, 42px);
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: var(--header-gap);
  margin-bottom: 12px;
}

h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(30px, 3.55vw, 60px);
  line-height: .97;
  letter-spacing: -.056em;
  font-weight: 700;
}

.intro {
  max-width: 505px;
  margin: 0 0 3px;
  color: var(--muted);
  font-size: clamp(12px, .95vw, 15px);
  line-height: 1.5;
  text-align: right;
}

.toolbar {
  min-height: 31px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  color: rgba(232, 237, 247, .39);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 11px currentColor;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 12px;
  color: rgba(232,237,247,.34);
  font-size: 9px;
  letter-spacing: .10em;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  header {
    align-items: flex-start;
    flex-direction: column;
  }

  .intro { text-align: left; }

  footer {
    flex-direction: column;
    gap: 7px;
  }

  .canvas {
    flex: 0 0 auto;
    min-height: 0;
    aspect-ratio: 1000 / 1520;
  }

  .canvas svg { min-height: 0; }
}
