/* Enact page: the drawn walk-through (js/enact-story.js). Loaded after
   content.css. Every class is prefixed en-. Without the script the four steps
   read as a plain list and the drawing stays hidden. */

.en-story {
  --en-acc: #5b50c8;
  --en-soft: #8e86e6;
  --en-line: #9c97b8;
  --en-warn: #c0731f;
  --en-win: #f7f4ec;
  display: grid;
  gap: 1.4rem;
}

html:not(.light) .en-story {
  --en-acc: #a79ef2;
  --en-soft: #8e86e6;
  --en-line: #5c577e;
  --en-warn: #e8a25a;
  --en-win: #111017;
}

.en-stage {
  display: none;
  border: 1px solid var(--hair);
  border-radius: 10px;
  padding: clamp(6px, 1.6vw, 16px);
  max-width: 980px;
}

.en-story.en-on .en-stage {
  display: block;
}

.en-stage svg {
  display: block;
  width: 100%;
  height: auto;
}

.en-f-a { fill: var(--en-acc); }
.en-f-s { fill: var(--en-soft); }
.en-f-w { fill: var(--en-warn); }
.en-f-win { fill: var(--en-win); }
.en-f-n { fill: none; }
.en-s-l { stroke: var(--en-line); }
.en-s-a { stroke: var(--en-acc); }
.en-s-w { stroke: var(--en-warn); }

.en-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  max-width: 980px;
}

.en-steps button {
  all: unset;
  box-sizing: border-box;
  display: grid;
  gap: 0.35rem;
  width: 100%;
  padding-top: 0.7rem;
  border-top: 2px solid var(--hair);
  color: var(--fg-dim);
  text-align: left;
}

.en-story.en-on .en-steps button {
  cursor: pointer;
}

.en-steps button[aria-pressed="true"] {
  border-top-color: var(--en-acc);
  color: var(--fg);
}

.en-steps button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.en-step-n {
  color: var(--accent-text);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums;
}

.en-step-t {
  font-weight: 500;
  font-size: 1.05rem;
}

.en-step-b {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--fg-dim);
}

@media (max-width: 720px) {
  .en-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
