/* The how-it-works page, on /assets/fellwin.css: long-form reading for non-technical readers. */

.how { max-width: 1060px; }

.hero { padding: 24px 0 8px; max-width: 46rem; }

.cascade {
  display: block;
  width: 30px;
  height: 14px;
  margin-bottom: 14px;
  background: var(--accent);
  -webkit-mask: url("/assets/icons/cascade.svg") left center / contain no-repeat;
  mask: url("/assets/icons/cascade.svg") left center / contain no-repeat;
}

.hero h1 { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.25rem); line-height: 1.05; }
.lead { margin: 16px 0 0; font-size: 1.15rem; line-height: 1.6; max-width: 60ch; }

.block { padding-top: 48px; margin-top: 48px; border-top: 1px solid var(--border); }
.block h2 { margin-bottom: 12px; }
.prose { max-width: 62ch; line-height: 1.7; margin: 0 0 16px; }

/* Awa's story: a sequence, so it is numbered. */
.steps { list-style: none; counter-reset: step; margin: 24px 0 0; padding: 0; display: grid; gap: 28px; }

.step {
  counter-increment: step;
  display: grid;
  gap: 16px;
  padding-left: 52px;
  position: relative;
}

.step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font: 500 1.1rem/1 var(--font-display);
  color: var(--ink);
}

.step h3, .attack h3 { margin: 4px 0 6px; }
.step p, .attack p { margin: 0 0 10px; max-width: 60ch; line-height: 1.7; }

.shots { display: grid; gap: 16px; }
.shot { margin: 0; }

.shot img {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.flow { margin: 24px 0 0; }
.flow img { display: block; width: 100%; max-width: 440px; height: auto; }
.flow figcaption { margin-top: 12px; max-width: 60ch; font-size: 0.9375rem; }

/* The diagram is drawn for a light ground; on the dark theme its tones are turned over. */
:root[data-theme="dark"] .flow img { filter: invert(0.9) hue-rotate(180deg); }

.attack { display: grid; gap: 16px; margin-top: 32px; }

.table-wrap { overflow-x: auto; }
.links { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.links th, .links td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.links thead th { font-size: 0.8125rem; font-weight: 600; color: var(--ink-faint); }
.links tbody th { font-weight: 400; white-space: nowrap; }
.links code { color: var(--ink); font-size: 0.875rem; }
.links td:nth-child(2) { color: var(--ink); font-weight: 500; }

/* On a phone the table reads as one card per address. */
@media (max-width: 699px) {
  .links thead { display: none; }
  .links tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .links th, .links td { display: block; padding: 2px 0; border: 0; }
  .links tbody th { white-space: normal; overflow-wrap: anywhere; }
}

.limits { max-width: 62ch; margin: 0; padding-left: 20px; line-height: 1.7; }
.limits li + li { margin-top: 10px; }

.wide .shots { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

@media (min-width: 760px) {
  .step, .attack { grid-template-columns: minmax(0, 1fr) minmax(0, 360px); align-items: start; column-gap: 40px; }
  .shots { grid-column: 2; grid-row: 1 / span 2; }
  .step-text, .attack-text { grid-column: 1; }
  .attack.wide { grid-template-columns: minmax(0, 1fr); }
  .wide .shots { grid-column: 1; grid-row: auto; }
  .flow { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 40px; align-items: end; }
}
