/* ==========================================================================
   SupDucks Player Guide — play.supducks.com/playerguide/

   The guide's own look (cream cards with black outlines on the dusk purple
   of the arcade's dark section, Sigmar for headings) on top of arcade.css,
   which supplies the header, footer, buttons and page head. Everything here
   is scoped to .guide: arcade.css already means something by .games, .btn
   and bare lists, and its reset strips list markers the steps need back.
   ========================================================================== */

.guide {
  --guide-card: #fff8e8;
  --guide-ink: #1b1530;
  --guide-soft: #5d5378;
  --guide-band: #2f2357;
  --guide-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.55;
}

.guide .eyebrow { margin-bottom: 0.5rem; color: var(--sup-toxic); }

/* the page head */
.guide__head { max-width: 880px; margin: 0 auto 2rem; }
.guide__head .step__title { margin-bottom: 1.25rem; }
.guide__head .page__lede--light { margin: 0 0 1.25rem; max-width: 60ch; font-size: clamp(1.05rem, 0.9rem + 0.6vw, 1.25rem); }
.guide__links { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 1.25rem; }
.guide .btn--volt { --btn-bg: var(--sup-toxic); }

.guide__toc { display: flex; flex-wrap: wrap; gap: 8px; }
.guide__toc a {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 13px;
  text-decoration: none;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--guide-band);
  border: 2px solid #4a3b80;
  color: var(--sup-paper);
}

/* the section cards */
.guide__body { max-width: 880px; margin: 0 auto; display: grid; gap: 28px; }
.guide .card {
  background: var(--guide-card);
  color: var(--guide-ink);
  border: 3px solid var(--sup-ink);
  border-radius: 22px;
  box-shadow: 0 7px 0 var(--sup-ink);
  padding: clamp(20px, 3.4vw, 34px);
  display: grid;
  gap: 14px;
  min-width: 0;
  /* (a contents link lands clear of the header: arcade.css's scroll-padding-top) */
}
.guide .card > * { min-width: 0; }
.guide h2 { font-size: clamp(25px, 4vw, 34px); line-height: 1.1; margin: 0; color: var(--guide-ink); text-wrap: balance; }
.guide h3 { font-size: 19px; margin: 6px 0 0; color: var(--guide-ink); }
.guide .card p { margin: 0; max-width: 66ch; }
.guide .soft { color: var(--guide-soft); }
.guide b, .guide strong { font-weight: 800; }
.guide .ui {
  font-family: var(--font-display);
  font-size: 0.86em;
  letter-spacing: 0.01em;
  background: var(--sup-yellow);
  border: 2px solid var(--sup-ink);
  border-radius: 8px;
  padding: 0 7px;
  white-space: nowrap;
}
.guide code { font-family: var(--guide-mono); font-size: 0.82em; background: #efe5cc; border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }

.guide .card ol, .guide .card ul { padding-left: 1.4em; display: grid; gap: 7px; }
.guide .card ol { list-style: decimal; }
.guide .card ul { list-style: disc; }
.guide .card ol li::marker { font-family: var(--font-display); color: var(--guide-soft); }
.guide .card ul.notes { list-style: none; padding: 0; }
.guide .notes li { padding-left: 20px; position: relative; }
.guide .notes li::before {
  content: "";
  position: absolute; left: 0; top: 0.55em;
  width: 10px; height: 10px;
  background: var(--sup-toxic);
  border: 2px solid var(--sup-ink);
  transform: rotate(45deg);
}
.guide .key { background: var(--sup-yellow); border: 3px solid var(--sup-ink); border-radius: 16px; padding: 16px 18px; font-weight: 700; }

/* tables */
.guide .scroll { overflow-x: auto; border: 2px solid var(--sup-ink); border-radius: 14px; background: #fffdf6; }
.guide table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.guide th, .guide td { text-align: left; padding: 10px 14px; vertical-align: top; border-bottom: 1.5px solid #e6dcc2; }
.guide th { font-family: var(--font-display); font-weight: 400; font-size: 14px; background: #f3e9cd; }
.guide tr:last-child td { border-bottom: 0; }
.guide td:first-child { font-weight: 700; }
.guide .t-wide { min-width: 600px; }

/* the diagram */
.guide figure { margin: 0; }
.guide figure svg { display: block; width: 100%; height: auto; }
.guide figcaption { font-size: 14px; color: var(--guide-soft); margin-top: 8px; }

.guide__note { max-width: 880px; margin: 2rem auto 0; font-size: 14px; color: #b9addb; text-align: center; }

/* The chart comes drawn twice (playerguide/index.html): wide, and tall for
   a phone held upright, where the wide one's labels shrink to about 5px. */
.guide .flow--tall { display: none; max-width: 420px; margin-inline: auto; }

/* ---- phones, upright -----------------------------------------------------
   Room is the thing: the page and card gutters come in, the chart swaps to
   its tall drawing, and each table row stacks into a block of its own --
   heading, then each value under its column's name (data-label) -- instead
   of a 600px table scrolling sideways inside a 285px card. */
@media (max-width: 600px) {
  .guide .shell { width: min(100% - 1.5rem, var(--shell)); }
  .guide { font-size: 16px; }
  .guide .card { padding: 20px 16px; border-radius: 18px; gap: 12px; }
  .guide__body { gap: 20px; }
  .guide__links .btn { flex: 1 1 100%; text-align: center; }
  .guide__toc { gap: 6px; }
  .guide__toc a { font-size: 12px; padding: 4px 10px; }

  .guide .flow--wide { display: none; }
  .guide .flow--tall { display: block; }

  .guide .scroll { overflow: visible; background: transparent; border: 0; border-radius: 0; }
  .guide table, .guide .t-wide { min-width: 0; font-size: 15px; }
  .guide table, .guide tbody, .guide tr, .guide td { display: block; }
  /* the headings move into each cell's label; kept for screen readers */
  .guide thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
  .guide tr {
    background: #fffdf6;
    border: 2px solid var(--sup-ink);
    border-radius: 14px;
    padding: 10px 14px 12px;
  }
  .guide tr + tr { margin-top: 10px; }
  .guide td { padding: 6px 0 0; border: 0; }
  /* a row's first cell is its name: a heading, not a labelled value */
  .guide td:first-child { padding-top: 0; font-size: 16px; }
  .guide td:not(:first-child)::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 0.02em;
    color: var(--guide-soft);
  }
  .guide .ui { white-space: normal; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
}

@media (prefers-reduced-motion: no-preference) {
  .guide__toc a { transition: transform 0.12s ease; }
  .guide__toc a:hover { transform: translateY(-2px); }
}
