/* ===== HOW IT WORKS — four frames and the panel that opens under one
   (index.html #how, js/how.js). Colours from css/styles.css, so both
   themes work. The text sizes are the standard ones (.t-title, .t-body,
   .t-small, .t-label in css/styles.css).

   Layout: the frames and the panels are all items of one grid. On wide
   screens the frames sit in a row and the open panel below all of them;
   on narrow ones the frames stack and the open panel sits right under the
   frame that opened it (its "order" is set by js/how.js). ===== */

.how-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .how-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .how-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } }

.how-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  text-align: left; cursor: pointer; font: inherit; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px 18px 16px; box-shadow: 0 10px 24px -18px var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.how-card:hover { border-color: var(--muted); transform: translateY(-2px); }
.how-card:focus-visible { outline: 2px solid var(--confirmed); outline-offset: 2px; }
.how-card[aria-expanded="true"] { border-color: var(--confirmed); box-shadow: 0 0 0 1px var(--confirmed), 0 14px 30px -18px var(--shadow); }
.how-card svg { width: 30px; height: 30px; margin-bottom: 6px; fill: none; stroke: var(--confirmed); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.how-card .t-small { flex: 1; }
.how-more { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--confirmed); }
.how-card[aria-expanded="true"] .how-more span { display: inline-block; transform: rotate(180deg); }

/* The panels. Without the script (no .how-ready) every panel shows. */
.how-panel {
  grid-column: 1 / -1; order: 99;
  background: var(--card); border: 1px solid var(--confirmed); border-radius: 16px;
  padding: 22px 22px 20px;
}
.how-ready .how-panel { display: none; }
.how-ready .how-panel.is-open { display: block; animation: howIn 0.25s ease; }
@keyframes howIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* 1: the seats */
.how-seats { display: flex; gap: 8px; margin-bottom: 14px; }
.how-seat, .how-dot {
  display: inline-grid; place-items: center; border-radius: 8px;
  border: 1.5px solid var(--line); color: var(--muted);
  font: 600 12px 'IBM Plex Mono', ui-monospace, monospace;
}
.how-seat { width: 40px; height: 40px; }
.how-dot { width: 14px; height: 14px; border-radius: 4px; margin-right: 8px; vertical-align: -2px; }
.how-seat.is-paid, .how-dot.is-paid { background: var(--seat-confirmed); border-color: transparent; color: var(--seat-confirmed-ink); }
.how-seat.is-want, .how-dot.is-want { background: var(--seat-interested); border-color: transparent; color: var(--seat-interested-ink); }
.how-seat.is-held, .how-dot.is-held {
  border-color: var(--seat-interested); color: var(--ink);
  background: repeating-linear-gradient(135deg, var(--seat-interested) 0 4px, transparent 4px 8px);
}
.how-legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
@media (min-width: 640px) { .how-legend { grid-template-columns: repeat(2, auto); justify-content: start; column-gap: 28px; } }

/* 2: the price slider and its bars */
.how-calc { border-radius: 12px; padding: 16px; background: var(--bg); }
.how-range { width: 100%; max-width: 420px; accent-color: var(--confirmed); }
.how-bars { display: flex; align-items: flex-end; gap: 8px; height: 110px; margin-top: 14px; max-width: 420px; }
.how-bar {
  flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px;
  font: 500 11px 'IBM Plex Mono', ui-monospace, monospace; color: var(--muted); height: 100%;
}
.how-bar i { display: block; width: 100%; border-radius: 6px 6px 2px 2px; background: var(--line); transition: background 0.2s ease, height 0.2s ease; }
.how-bar.is-on i { background: var(--confirmed); }
.how-bar.is-on { color: var(--ink); font-weight: 600; }

/* 3: the steps, as a line of numbered points */
.how-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: how; }
@media (min-width: 768px) { .how-steps { grid-template-columns: repeat(4, 1fr); } }
.how-steps li { counter-increment: how; display: grid; gap: 4px; padding-top: 34px; position: relative; }
.how-steps li::before {
  content: counter(how); position: absolute; top: 0; left: 0;
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--confirmed); color: var(--confirmed-ink); font: 600 13px Sora, Inter, sans-serif;
}
@media (min-width: 768px) {
  .how-steps li:not(:last-child)::after {
    content: ""; position: absolute; top: 13px; left: 34px; right: -6px; height: 2px; background: var(--line);
  }
}

/* 4: the list */
.how-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

@media (prefers-reduced-motion: reduce) {
  .how-card, .how-bar i { transition: none; }
  .how-card:hover { transform: none; }
  .how-ready .how-panel.is-open { animation: none; }
}
