/* ── How It Works page ── */


/* ── Section wrapper ── */
.hiw-section {
  padding: 6rem 2rem;
  background: var(--white);
}

.hiw-section-dark {
  background: var(--black);
}

/* Center-constrained content */
.hiw-inner {
  max-width: 860px;
  margin: 0 auto;
}

/* ── Section headings ── */
.hiw-section .section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray-500);
  display: block;
  margin-bottom: 0.75rem;
}

.hiw-section-dark .section-label {
  color: rgba(255,255,255,0.3);
}

.hiw-section h2 {
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  color: var(--black);
  margin-bottom: 1.25rem;
  line-height: 1.15;
}

.hiw-section-dark h2 {
  color: var(--white);
}

.hiw-intro {
  font-size: 1.05rem;
  color: var(--gray-700);
  max-width: 680px;
  margin-bottom: 3.5rem;
  line-height: 1.75;
}

.hiw-section-dark .hiw-intro {
  color: rgba(255,255,255,0.55);
}

/* ── Mermaid diagram ── */
.mermaid-wrap {
  padding: 1rem 0;
}

.mermaid-wrap .mermaid {
  display: flex;
  justify-content: center;
}

/* ── Two-col layout ── */
.hiw-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

/* ── Subheadings ── */
.hiw-subhead {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--black);
  margin-bottom: 1rem;
}

.hiw-section-dark .hiw-subhead {
  color: var(--white);
}

/* ── Topic list ── */
.topic-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.topic-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

.topic-badge {
  background: var(--accent);
  color: var(--white);
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.topic-desc {
  color: var(--gray-500);
  font-family: var(--font-body);
  font-size: 0.88rem;
}

.topic-row code {
  color: var(--black);
  font-family: var(--font-mono);
}

.hiw-section-dark .topic-desc { color: rgba(255,255,255,0.45); }
.hiw-section-dark .topic-row code { color: rgba(255,255,255,0.8); }

/* ── Action list ── */
.action-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.action-list li {
  font-size: 0.92rem;
  color: var(--gray-700);
  padding: 0.5rem 0.75rem;
  border-left: 2px solid var(--gray-100);
  line-height: 1.4;
}

.hiw-section-dark .action-list li {
  color: rgba(255,255,255,0.55);
  border-left-color: rgba(255,255,255,0.1);
}

.action-list li code {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.9em;
}

.hiw-section-dark .action-list li code {
  color: rgba(255,255,255,0.85);
}

/* ── Code block ── */
.code-block {
  border-radius: 8px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  border: 1px solid rgba(255,255,255,0.1);
}

.code-block-bar {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.4);
  padding: 0.5rem 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.code-block pre {
  margin: 0;
  padding: 1.25rem 1.5rem;
  background: rgba(255,255,255,0.03);
  overflow-x: auto;
  line-height: 1.65;
}

.code-block code {
  color: rgba(255,255,255,0.85);
}

/* ── Link button ── */
.btn-hiw-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 0.15rem;
  transition: color 0.15s, border-color 0.15s;
}
.btn-hiw-link:hover { color: var(--white); border-bottom-color: var(--white); }

/* ── Hardware grid ── */
.hardware-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.hw-card {
  border: 1px solid var(--gray-100);
  border-radius: 8px;
  padding: 1.75rem;
  background: var(--off-white);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hw-card-icon {
  font-size: 1.5rem;
  color: var(--accent);
}

.hw-card h3 {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--black);
}

.hw-card p {
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.55;
}

.hw-card strong { color: var(--black); }

/* ── DOF callout ── */
.hw-dof-callout {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 2.5rem 3rem;
  border-radius: 10px;
  background: var(--black);
  color: var(--white);
}

.hw-dof-number {
  font-family: var(--font-mono);
  font-size: 5.5rem;
  line-height: 1;
  color: var(--white);
  flex-shrink: 0;
}

.hw-dof-callout strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
  color: var(--white);
}

.hw-dof-callout p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
}

/* ── AI model cards ── */
.hiw-two-col .ai-model-card {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 1.75rem;
  background: rgba(255,255,255,0.03);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ai-model-icon {
  font-size: 1.4rem;
  color: var(--accent);
}

.ai-model-card h3 {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--white);
}

.ai-model-card p {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
}

/* ── Inline code ── */
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--accent);
}

.hiw-section-dark code {
  color: rgba(255,255,255,0.8);
}
