/* The post's figures in knowledge.js: when each subject's prompt is first right, and every prompt by subject.
   The controls use figures.css */
.arrive { position: relative; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }

/* one question per subject: label, strip, current guess */
.arrive { --label: 230px; --guess: 128px; }
.post-body .arrive-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 0 0 12px;
  font: 400 12.5px/1.4 var(--sans); color: var(--ink-soft); }
.arrive-key .ramp { display: inline-block; width: 64px; height: 8px; margin: 0 6px; border-radius: 2px; vertical-align: middle;
  background: linear-gradient(to right, #1a222c, #176e94, #46d1fc); }
.arrive-key .dot { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border: 1.5px solid var(--surface);
  border-radius: 50%; background: #d27a3a; box-shadow: 0 0 0 1px #d27a3a; vertical-align: -1px; }
.post-body .arrive-rows { margin: 0; padding: 0; list-style: none; }
.post-body .arrive-rows li,
.arrive-axis { display: grid; grid-template-columns: var(--label) minmax(0, 1fr) var(--guess); align-items: center;
  gap: 4px 12px; margin: 0; padding: 4px 6px; border-radius: 8px; }
.post-body .arrive-rows li { transition: background 0.3s; }
.post-body .arrive-rows li.flash { animation: arrive-flash 1s ease-out; }
@keyframes arrive-flash { from { background: rgba(70, 209, 252, 0.18); } }
.post-body .arrive-label { margin: 0; font: 400 13px/1.3 var(--sans); color: var(--muted); }
.arrive-label b { font-weight: 600; color: var(--ink); }
.arrive-label mark { padding: 0 2px; border-radius: 3px; background: rgba(70, 209, 252, 0.16); color: var(--ink); }
.arrive-subject { display: block; margin-bottom: 2px; font: 700 13px/1.3 var(--sans); letter-spacing: 0.05em;
  text-transform: uppercase; color: #fff; }
.arrive-never { display: block; font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); }
.arrive-kind { font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); }
.arrive-track { position: relative; height: 16px; touch-action: pan-y; }
.arrive-bar,
.arrive-cover { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.arrive-bar { left: 0; right: 0; }
.arrive-cover { right: 0; background: var(--bg); border-left: 2px solid var(--ink-soft); border-radius: 0 3px 3px 0; }
.arrive-dot { position: absolute; top: 50%; z-index: 1; width: 10px; height: 10px; margin: -5px 0 0 -5px; border: 1.5px solid var(--surface);
  border-radius: 50%; background: #d27a3a; opacity: 0; transform: scale(0.4); transition: opacity 0.2s, transform 0.2s; cursor: default; }
.arrive-dot::before { content: ""; position: absolute; inset: -8px; }            /* a bigger target for the pointer */
.arrive-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.arrive-tip { position: absolute; bottom: calc(100% + 8px); left: 50%; z-index: 2; width: max-content; max-width: 210px;
  padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--ink);
  font: 600 12.5px/1.3 var(--mono); text-align: left; transform: translateX(-50%); opacity: 0; pointer-events: none;
  transition: opacity 0.12s; }
.arrive-tip small { display: block; margin-top: 2px; font: 400 11.5px/1.35 var(--sans); color: var(--ink-soft); }
.arrive-dot:hover .arrive-tip, .arrive-dot:focus .arrive-tip, .arrive-dot.lit .arrive-tip,
.subjects-dot:hover .arrive-tip, .subjects-dot:focus .arrive-tip, .subjects-dot.lit .arrive-tip { opacity: 1; }
.arrive-dot.closed .arrive-tip, .subjects-dot.closed .arrive-tip { opacity: 0; }       /* tapped again: closed */
.tip-below .arrive-tip { bottom: auto; top: calc(100% + 8px); }                        /* near the top of the screen: open downwards */
.edge-right .arrive-tip { left: auto; right: -8px; transform: none; }                  /* keeps the tip inside the figure */
.arrive-rows li.reached .arrive-dot { opacity: 1; transform: none; }
/* a dot lights up with a ring when it's pointed at, focused or tapped, so a tap on a phone is seen */
.arrive-dot, .subjects-dot { -webkit-tap-highlight-color: rgba(210, 122, 58, 0.45); }
.arrive-dot:hover, .arrive-dot:focus, .arrive-dot.lit,
.subjects-dot:hover, .subjects-dot:focus, .subjects-dot.lit { z-index: 3; box-shadow: 0 0 0 4px rgba(210, 122, 58, 0.4); outline: none; }
.arrive-rows li.reached .arrive-dot:hover, .arrive-rows li.reached .arrive-dot:focus, .arrive-rows li.reached .arrive-dot.lit,
.subjects-dot:hover, .subjects-dot:focus, .subjects-dot.lit { transform: scale(1.35); }
.post-body .arrive-guess { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin: 0; min-width: 0; }
.arrive-word { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 13.5px/1.3 var(--mono); color: var(--muted); }
.arrive-word { color: #f0907e; }
.arrive-rows li.right .arrive-word { color: var(--accent); }
.arrive-chance { flex: none; font: 400 11px/1.3 var(--mono); color: var(--muted); }
.arrive-axis { padding-top: 0; padding-bottom: 0; }
.arrive-axis span { position: relative; grid-column: 2; height: 18px; font: 400 11px/1 var(--mono); color: var(--muted); }
.arrive-axis i { position: absolute; top: 4px; font-style: normal; transform: translateX(-50%); white-space: nowrap; }
.arrive-axis i.end { transform: translateX(-100%); }
.post-body .arrive-axis-label { margin: 2px 6px 0 0; text-align: right; font: 400 11px/1.3 var(--sans); color: var(--muted); }

/* version 18 on: on a wide screen, two columns of questions (the first half of the order on the left), each row with
   its label above its strip and guess, and an axis under each column */
@media (min-width: 761px) {
  .arrive.two { --guess: 116px; }
  .arrive.two .arrive-cols { display: grid; grid-template-columns: 1fr 1fr; align-items: start; column-gap: 20px; }
  .post-body .arrive.two .arrive-rows li,
  .arrive.two .arrive-axis > div { grid-template-columns: minmax(0, 1fr) var(--guess); padding: 4px; }
  .post-body .arrive.two .arrive-label { grid-column: 1 / -1; font-size: 12.5px; }
  .arrive.two .arrive-axis { grid-template-columns: 1fr 1fr; column-gap: 20px; padding: 0; }
  .arrive.two .arrive-axis > div { display: grid; gap: 4px 12px; padding-top: 0; padding-bottom: 0; }
  .arrive.two .arrive-axis span { grid-column: 1; }
  .arrive.two .arrive-word { font-size: 13px; }
}
@media (max-width: 760px) {
  .arrive.two .arrive-axis > div + div { display: none; }
  .arrive.two .arrive-axis > div { display: contents; }
}

@media (max-width: 560px) {
  .arrive { padding: 12px; }
  .arrive { --guess: 112px; }
  .post-body .arrive-rows li { grid-template-columns: minmax(0, 1fr) var(--guess); padding: 5px 4px; }
  .post-body .arrive-label { grid-column: 1 / -1; }
  .arrive-axis { grid-template-columns: minmax(0, 1fr) var(--guess); padding: 0 4px; }
  .arrive-axis span { grid-column: 1; }
}
/* on a phone, rows a little closer together */
@media (max-width: 560px) {
  .post-body .arrive .arrive-rows li { padding: 3.5px 3px; }
  .arrive .arrive-subject { font-size: 12.5px; margin-bottom: 1px; }
  .post-body .arrive .arrive-label { font-size: 12.5px; line-height: 1.28; }
  .arrive .arrive-track { height: 13px; }
  .arrive .arrive-word { font-size: 13px; }
}
/* every prompt of one subject, picked in tabs (knowledge.js's .subjects) */
.subjects { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.subjects-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.subjects-tabs button { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent;
  color: var(--ink-soft); font: 500 12.5px/1.2 var(--sans); cursor: pointer; }
.subjects-tabs button:hover { border-color: var(--accent); color: var(--accent); }
.subjects-tabs button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--bg); }
.subjects-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.post-body .subjects-head { margin: 0 0 8px; }
.post-body .subjects-panel ol { margin: 0; padding: 0; list-style: none; }
.post-body .subjects-panel li,
.subjects-axis { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 2px 14px; align-items: center; margin: 0; padding: 3px 0; }
.post-body .subjects-panel li p { margin: 0; font: 400 13px/1.3 var(--sans); color: var(--ink-soft); }
.subjects-panel li b { color: var(--ink); }
.subjects-strip { position: relative; height: 10px; border-radius: 3px; touch-action: pan-y; }
.subjects-marker { position: absolute; top: -6px; bottom: -6px; z-index: 2; width: 3px; margin-left: -1.5px; border-radius: 2px; background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22); pointer-events: none; }
.subjects-strip.pointed, .arrive-track.pointed { outline: 1px solid rgba(255, 255, 255, 0.3); outline-offset: 3px; border-radius: 3px; }
.subjects-dot { position: absolute; top: 50%; z-index: 1; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border: 1.5px solid var(--surface);
  border-radius: 50%; background: #d27a3a; cursor: default; transition: transform 0.15s, box-shadow 0.15s; }
.subjects-dot::before { content: ""; position: absolute; inset: -9px; }              /* a bigger target for a finger */
.subjects-all { margin: 8px 0 4px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent;
  color: var(--accent); font: 500 12.5px/1.2 var(--sans); cursor: pointer; }
.subjects-all:hover { border-color: var(--accent); }
.subjects-all:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.subjects-axis { padding: 0; }
.subjects-axis span { position: relative; grid-column: 2; height: 18px; font: 400 11px/1 var(--mono); color: var(--muted); }
.subjects-axis i { position: absolute; top: 4px; font-style: normal; transform: translateX(-50%); white-space: nowrap; }
.subjects-axis i.end { transform: translateX(-100%); }
.post-body .subjects-axis-label { margin: 2px 0 0; text-align: right; font: 400 11px/1.3 var(--sans); color: var(--muted); }
@media (max-width: 560px) {
  .subjects { padding: 12px; }
  .post-body .subjects-panel li, .subjects-axis { grid-template-columns: 1fr; gap: 3px; padding: 4px 0; }
  .subjects-axis span { grid-column: 1; }
}

/* the tabs figure's key, tokens read and step readout */
.post-body .subjects-key { margin-bottom: 12px; }
.subjects-swatch { display: inline-block; width: 18px; height: 8px; margin-right: 6px; border-radius: 2px; background: var(--accent); vertical-align: middle; }
.subjects-tokens span { color: var(--ink-soft); }
.subjects { position: relative; }
.post-body .subjects-readout { position: absolute; z-index: 3; margin: 0; padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--bg); color: var(--ink); font: 400 12px/1.4 var(--mono); white-space: nowrap; transform: translate(-50%, -100%);
  pointer-events: none; }
.post-body .subjects-readout.below { transform: translate(-50%, 0); }
.subjects-readout .end-right { color: var(--accent); }
.subjects-readout .end-wrong { color: #f0907e; }

@media (prefers-reduced-motion: reduce) {
  .post-body .arrive-rows li, .arrive-dot { transition: none; }
}
.arrive-dot.closed, .subjects-dot.closed { box-shadow: none; }                          /* tapped again: the ring goes with the tip */
.subjects { scroll-margin-top: 84px; }                                   /* clear of the site's header when scrolled to */

/* the lamp chart with three zones under it */
.lamp { position: relative; margin: 0 0 24px; }
.lamp-svg { display: block; width: 100%; height: auto; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-sizing: border-box; }
.post-body .lamp-title { margin: 0 0 8px; font: 600 14px/1.35 var(--sans); color: var(--ink); }
.lamp-grid { stroke: var(--line); stroke-width: 1; }
.lamp-tick { font: 400 11.5px var(--sans); fill: var(--muted); }
.lamp-band { fill: rgba(70, 209, 252, 0.08); }
.lamp-band-label { font: 700 14px var(--sans); fill: #b4ecff; }
.lamp-band-pill { fill: rgba(70, 209, 252, 0.16); stroke: rgba(70, 209, 252, 0.6); stroke-width: 1.2; }
.lamp-line { fill: none; stroke: #4da6d9; stroke-width: 2.2; }
.lamp-seg, .lamp-seg-label { pointer-events: none; }                 /* the invisible zone above them takes the pointer */
.lamp-seg { opacity: 0.28; }
.lamp-seg-label { font: 600 11.5px var(--sans); fill: var(--ink-soft); }
.lamp-zone { opacity: 0; cursor: default; transition: opacity 0.12s; touch-action: manipulation; }
.lamp-zone.on, .lamp-zone:hover { opacity: 0.16; }
.lamp-dot { stroke: var(--surface); stroke-width: 2; }
.lamp .lamp-tip { position: absolute; z-index: 3; width: max-content; max-width: 260px; margin: 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--ink); font: 400 12.5px/1.45 var(--sans); transform: translateX(-50%); pointer-events: none; }
.lamp .lamp-tip b { font-weight: 700; }
.lamp figcaption { margin-top: 8px; }
.lamp-edge { stroke: rgba(255, 255, 255, 0.28); stroke-width: 1; stroke-dasharray: 3 3; }
.lamp-tick-edge { fill: var(--ink); font-weight: 600; }
@media (max-width: 560px) {                                                    /* the chart scales down on a phone, so its text is bigger to stay readable */
  .lamp-band-label { font-size: 21px; }
  .lamp-tick, .lamp-seg-label { font-size: 15.5px; }
}
.lamp-band-label, .lamp-band-pill { pointer-events: none; }
