/* How-it-works page styles. Tokens come from styles.css; this file only
   lays out page-specific structure. */

.hiw-layout {
  padding-top: 110px;
  padding-bottom: 80px;
  max-width: 720px;
  margin: 0 auto;
}

.brand-link {
  color: inherit;
  text-decoration: none;
  letter-spacing: inherit;
}

.hiw-hero {
  margin-bottom: 36px;
}

.hiw-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 600;
  color: var(--text);
  margin: 10px 0 12px;
}

.hiw-subtitle {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 56ch;
}

.hiw-tldr {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 44px;
}

.hiw-card {
  padding: 18px;
}

.hiw-card-title {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dk);
  margin: 0 0 8px;
}

.hiw-card p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  margin: 0;
}

.hiw-section {
  margin-bottom: 40px;
}

.hiw-section > p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  margin: 12px 0 0;
}

.hiw-section code {
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 0.9em;
}

.hiw-pre {
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text);
  overflow-x: auto;
}

.hiw-diagram {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 20px auto 0;
}

.hiw-box {
  fill: var(--card);
  stroke: var(--border-strong);
  stroke-width: 1;
}

.hiw-label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  fill: var(--text);
}

.hiw-sublabel {
  font-family: var(--font-body);
  font-size: 11px;
  fill: var(--muted);
}

.hiw-line {
  stroke: var(--border-strong);
  stroke-width: 1.4;
  fill: none;
}

/* Gold is reserved exclusively for the SSE return path. */
.hiw-line-sse {
  stroke: var(--accent);
  stroke-width: 1.8;
}

.hiw-sse-label {
  fill: var(--accent-dk);
  font-weight: 600;
}

.hiw-arrowhead {
  fill: var(--muted);
}

.hiw-aside {
  border-left: 2px solid var(--accent);
  padding-left: 20px;
}

.hiw-aside-title {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text);
  margin: 0 0 8px;
}

.hiw-aside p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  margin: 0;
}

.hiw-cta {
  text-align: center;
  padding-top: 8px;
}

.hiw-cta .hero-action {
  display: inline-flex;
}

@media (max-width: 600px) {
  .hiw-layout {
    padding-left: 12px;
    padding-right: 12px;
    padding-top: 96px;
  }

  .hiw-tldr {
    grid-template-columns: 1fr;
  }

  .hiw-nav {
    display: none;
  }
}
