/* Status Codes Reference */
.sc-page, .sc-detail { max-width: 960px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

/* Hero */
.sc-hero { text-align: center; margin-bottom: 3rem; }
.sc-hero h1 { font-size: 2rem; margin-bottom: 0.75rem; color: var(--text); }
.sc-hero p { color: var(--muted); font-size: 1.1rem; max-width: 640px; margin: 0 auto; line-height: 1.6; }

/* Badge */
.sc-badge { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; border-radius: 6px; font-size: 0.75rem; padding: 0.2em 0.6em; font-family: monospace; }
.sc-badge--lg { font-size: 2rem; padding: 0.15em 0.5em; min-width: 4rem; }
.sc-badge--info    { background: rgba(99,179,237,0.15); color: #63b3ed; }
.sc-badge--success { background: rgba(72,187,120,0.15); color: #48bb78; }
.sc-badge--redirect{ background: rgba(237,185,83,0.15); color: #edb953; }
.sc-badge--client  { background: rgba(245,101,101,0.15); color: #f56565; }
.sc-badge--server  { background: rgba(213,63,140,0.15); color: #d53f8c; }

/* Section */
.sc-section { margin-bottom: 2.5rem; }
.sc-section__title { display: flex; align-items: center; gap: 0.75rem; font-size: 1.35rem; margin-bottom: 1rem; color: var(--text); }

/* Grid */
.sc-grid { display: flex; flex-direction: column; gap: 0.5rem; }

/* Card */
.sc-card { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--border, rgba(255,255,255,0.06)); border-radius: 10px; text-decoration: none; transition: border-color 0.2s, background 0.2s; }
.sc-card:hover { border-color: var(--accent); background: rgba(255,255,255,0.03); }
.sc-card__code { font-size: 1.5rem; font-weight: 800; font-family: monospace; min-width: 3rem; }
.sc-card--info .sc-card__code    { color: #63b3ed; }
.sc-card--success .sc-card__code { color: #48bb78; }
.sc-card--redirect .sc-card__code{ color: #edb953; }
.sc-card--client .sc-card__code  { color: #f56565; }
.sc-card--server .sc-card__code  { color: #d53f8c; }
.sc-card__name { font-weight: 600; color: var(--text); margin-bottom: 0.25rem; }
.sc-card__summary { font-size: 0.9rem; color: var(--muted); line-height: 1.5; }

/* CTA */
.sc-cta, .sc-detail__cta { text-align: center; padding: 2rem; background: var(--surface); border-radius: 12px; margin: 2rem 0; }
.sc-cta p, .sc-detail__cta p { color: var(--muted); margin-bottom: 0.75rem; }
.sc-cta a, .sc-detail__cta a { color: var(--accent); font-weight: 600; text-decoration: none; font-size: 1.1rem; }
.sc-cta a:hover, .sc-detail__cta a:hover { text-decoration: underline; }

/* Detail page */
.sc-detail__back { display: inline-block; color: var(--muted); text-decoration: none; margin-bottom: 1.5rem; font-size: 0.9rem; }
.sc-detail__back:hover { color: var(--accent); }
.sc-detail__header { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1rem; }
.sc-detail__category { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.25rem; }
.sc-detail__title { font-size: 1.75rem; color: var(--text); margin: 0; }
.sc-detail__summary { color: var(--muted); font-size: 1.1rem; line-height: 1.6; margin-bottom: 2rem; }

.sc-detail__section { margin-bottom: 2rem; }
.sc-detail__section h2 { font-size: 1.2rem; color: var(--text); margin-bottom: 0.75rem; }
.sc-detail__content { color: var(--text); line-height: 1.7; }
.sc-detail__content p { margin-bottom: 0.75rem; }
.sc-detail__content code { background: rgba(255,255,255,0.06); padding: 0.15em 0.4em; border-radius: 4px; font-size: 0.9em; }
.sc-detail__content ul { padding-left: 1.5rem; margin-bottom: 0.75rem; }
.sc-detail__content li { margin-bottom: 0.35rem; color: var(--text); line-height: 1.5; }

/* Related */
.sc-detail__related { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.75rem; }
.sc-related-card { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.9rem 1rem; background: var(--surface); border: 1px solid var(--border, rgba(255,255,255,0.06)); border-radius: 8px; text-decoration: none; transition: border-color 0.2s; }
.sc-related-card:hover { border-color: var(--accent); }
.sc-related-card__code { font-weight: 800; font-family: monospace; color: var(--accent); font-size: 1.1rem; min-width: 2.5rem; }
.sc-related-card__name { font-weight: 600; color: var(--text); font-size: 0.9rem; margin-bottom: 0.2rem; }
.sc-related-card__desc { font-size: 0.8rem; color: var(--muted); line-height: 1.4; }

/* Mobile */
@media (max-width: 600px) {
  .sc-hero h1 { font-size: 1.5rem; }
  .sc-detail__header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .sc-detail__title { font-size: 1.3rem; }
  .sc-badge--lg { font-size: 1.5rem; }
  .sc-detail__related { grid-template-columns: 1fr; }
}

/* ── Focus-visible (accessibility) ── */
:focus-visible {
  outline: 2px solid var(--accent, #59a8ff);
  outline-offset: 2px;
  border-radius: 4px;
}
