:root {
  color-scheme: light dark;
  /* One neutral hue, four lightness steps */
  --floor: #ecebe7;
  --wall-top: #fbfaf8;
  --wall-left: #dedcd6;
  --wall-right: #d0cec7;
  --ink: #3b3a36;
  --panel: rgb(251 250 248 / 0.72);
  --panel-border: rgb(255 255 255 / 0.8);
  --panel-shadow: rgb(59 58 54 / 0.25);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Dark: follows the system unless the toggle forces light; or forced dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --floor: #1b1a18;
    --wall-top: #3a3935;
    --wall-left: #2b2a27;
    --wall-right: #232220;
    --ink: #ecebe7;
    --panel: rgb(27 26 24 / 0.72);
    --panel-border: rgb(255 255 255 / 0.08);
    --panel-shadow: rgb(0 0 0 / 0.6);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --floor: #1b1a18;
  --wall-top: #3a3935;
  --wall-left: #2b2a27;
  --wall-right: #232220;
  --ink: #ecebe7;
  --panel: rgb(27 26 24 / 0.72);
  --panel-border: rgb(255 255 255 / 0.08);
  --panel-shadow: rgb(0 0 0 / 0.6);
}

:root[data-theme="light"] {
  color-scheme: light;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--floor);
  color: var(--ink);
  overflow: hidden;
}

.maze {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.maze path {
  /* Same-colour stroke hides hairline seams between adjacent blocks */
  stroke-width: 0.6;
  stroke-linejoin: round;
}
.maze .top {
  fill: var(--wall-top);
  stroke: var(--wall-top);
}
.maze .left {
  fill: var(--wall-left);
  stroke: var(--wall-left);
}
.maze .right {
  fill: var(--wall-right);
  stroke: var(--wall-right);
}

.notice {
  position: relative;
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 0 16px;
  box-sizing: border-box;
}

.quote {
  max-width: 34rem;
  margin: 0;
  padding: 1.6em 2em;
  background: var(--panel);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  box-shadow: 0 10px 40px -12px var(--panel-shadow);
  text-align: center;
}

.quote blockquote {
  margin: 0;
}

.quote p {
  margin: 0;
  font-size: clamp(1.35rem, 3.4vw, 2.25rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.quote figcaption {
  margin-top: 0.9em;
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  opacity: 0.7;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1;
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: var(--panel);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 24px -10px var(--panel-shadow);
}

/* The toggle needs JS to do anything */
:root:not(.js) .theme-toggle {
  display: none;
}

.theme-toggle legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.theme-toggle label {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: var(--ink);
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 0.15s, background-color 0.15s;
}

.theme-toggle label:hover {
  opacity: 0.85;
}

.theme-toggle label:has(input:checked) {
  opacity: 1;
  background: var(--wall-top);
  box-shadow: 0 1px 3px var(--panel-shadow);
}

.theme-toggle label:has(input:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

.theme-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

