/* Readme-style doc layout */
main.hiw-main {
  padding: 40px 10vw 80px;
  gap: 0;
}

.hiw-doc {
  color: var(--text);
}

.hiw-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.hiw-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 8px;
  text-decoration: underline;
  text-decoration-color: #43b49d;
  text-underline-offset: 6px;
  text-decoration-thickness: 3px;
}

.hiw-header p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.hiw-doc h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 32px 0 16px;
  padding-bottom: 4px;
}

.hiw-doc h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 24px 0 12px;
}

.hiw-steps {
  margin: 0 0 24px;
  padding-left: 24px;
  color: var(--muted);
  line-height: 1.8;
}

/* Code tabs */
.code-tabs {
  display: flex;
  gap: 4px;
  margin: 20px 0 12px;
}

.code-tab {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.code-tab:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
}

.code-tab.active {
  background: rgba(67, 180, 157, 0.08);
  border-color: rgba(67, 180, 157, 0.3);
  color: var(--text);
}

/* Code steps */
.code-step {
  margin-bottom: 24px;
}

.code-step h3 {
  font-size: 0.95rem;
  font-weight: 500;
  margin: 20px 0 10px;
}

/* Code blocks */
.code-block {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.code-block.hidden {
  display: none;
}

.code-block pre {
  padding: 16px 20px;
  overflow-x: auto;
  font-family: "JetBrains Mono", "SF Mono", Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}

.code-block .copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.code-block .copy-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.code-block code .kw { color: #c678dd; }
.code-block code .str { color: #98c379; }
.code-block code .num { color: #d19a66; }
.code-block code .cmt { color: #5c6370; font-style: italic; }

.hiw-body {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 8px;
}

.hiw-why-list {
  margin: 0 0 8px;
  padding-left: 24px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.8;
}

.hiw-why-list li {
  margin-bottom: 4px;
}

.hiw-why-list strong {
  color: var(--text);
}

/* Features list */
.hiw-features {
  margin: 0 0 32px;
  padding-left: 24px;
  color: var(--muted);
  line-height: 1.8;
}

.hiw-features li {
  margin-bottom: 6px;
}

.hiw-features strong {
  color: var(--text);
}

/* Footer links */
.hiw-hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0 24px;
}

.hiw-cta {
  color: var(--muted);
  font-size: 0.9rem;
}

.hiw-cta a {
  color: #43b49d;
  text-decoration: none;
}

.hiw-cta a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .hiw-main {
    padding: 24px 6vw 60px;
  }
}
