﻿/* Docs layout — extends main.css */
.docs-layout {
  display: flex;
  max-width: 100rem;
  margin-inline: auto;
  position: relative;
}

.docs-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
}
.docs-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
}
.docs-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.docs-search-wrap {
  position: relative;
  flex: 1;
  max-width: 28rem;
  display: none;
}
@media (min-width: 48rem) {
  .docs-search-wrap { display: block; }
}
.docs-search-wrap svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--slate-500);
  pointer-events: none;
}
.docs-search {
  width: 100%;
  padding: 0.625rem 1rem 0.625rem 2.5rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  background: var(--slate-50);
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}
.docs-search:focus {
  outline: none;
  border-color: var(--brand-500);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(61, 106, 158, 0.15);
}

.docs-sidebar-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.docs-sidebar-label {
  display: inline-flex;
  padding: 0.5rem;
  border-radius: var(--radius-lg);
  color: var(--slate-600);
}
.docs-sidebar-label:hover { background: var(--slate-100); }
.docs-sidebar-label svg { width: 1.5rem; height: 1.5rem; }

.docs-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 18rem;
  height: 100vh;
  padding: 5rem 1rem 2rem;
  overflow-y: auto;
  border-right: 1px solid var(--slate-200);
  background: #fff;
  transform: translateX(-100%);
  transition: transform 0.3s var(--ease);
}
#sidebar-toggle:checked ~ .docs-sidebar {
  transform: translateX(0);
}
.docs-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(15, 23, 42, 0.4);
  cursor: pointer;
}
#sidebar-toggle:checked ~ .docs-sidebar-overlay {
  display: block;
}

@media (min-width: 64rem) {
  .docs-sidebar-label { display: none; }
  .docs-sidebar-overlay { display: none !important; }
  .docs-sidebar {
    position: sticky;
    top: 3.5rem;
    z-index: 30;
    height: calc(100vh - 3.5rem);
    transform: none;
    flex-shrink: 0;
  }
}

.docs-nav-group {
  margin-bottom: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-500);
  padding: 0 0.5rem;
}
.docs-nav-group + .docs-nav-group { margin-top: 1.5rem; }
.docs-nav a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.125rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-700);
  transition: background 0.2s, color 0.2s;
}
.docs-nav a svg { width: 1rem; height: 1rem; color: var(--brand-600); flex-shrink: 0; }
.docs-nav a:hover {
  background: var(--brand-50);
  color: var(--brand-900);
}
.docs-nav a.is-active {
  background: var(--brand-50);
  color: var(--brand-800);
  font-weight: 600;
}

.docs-main {
  flex: 1;
  min-width: 0;
  padding: 2rem clamp(1rem, 4vw, 2.5rem) 3rem;
}
.docs-inner {
  display: flex;
  gap: 2.5rem;
  max-width: 72rem;
  margin-inline: auto;
}
.docs-article { flex: 1; min-width: 0; max-width: 48rem; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--slate-500);
}
.breadcrumb a:hover { color: var(--brand-700); }
.breadcrumb strong { color: var(--slate-800); font-weight: 500; }

.doc-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--slate-200);
}
.doc-tag {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--brand-100);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-800);
}
.doc-header h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--slate-900);
}
.doc-header .lead {
  margin: 1rem 0 0;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--slate-600);
}
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.doc-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  background: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--slate-600);
  box-shadow: var(--shadow-soft);
}
.doc-meta svg { width: 0.875rem; height: 0.875rem; }

.doc-content {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--slate-700);
}
.doc-content h2 {
  margin: 2.5rem 0 1rem;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--slate-900);
  scroll-margin-top: 6rem;
}
.doc-content h2:first-child { margin-top: 0; }
.doc-content h3 {
  margin: 2rem 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--slate-800);
}
.doc-figure {
  margin: 1.5rem 0;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--slate-50);
}
.doc-figure--hero {
  margin-top: 0;
  margin-bottom: 2rem;
  border: none;
  background: transparent;
}
.doc-figure--hero img {
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
}
.doc-figure img {
  display: block;
  width: 100%;
  height: auto;
}
.doc-figure figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--slate-600);
  border-top: 1px solid var(--slate-200);
}

.doc-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}
.doc-gallery figure {
  margin: 0;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--slate-50);
}
.doc-gallery img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}
.doc-gallery figcaption {
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--slate-600);
  border-top: 1px solid var(--slate-200);
  text-align: center;
}

.doc-gallery--webdesign {
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.doc-gallery--webdesign .doc-gallery__featured {
  grid-column: 1 / -1;
}
.doc-gallery--webdesign figure {
  border: none;
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.doc-gallery--webdesign figure:hover {
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  transform: translateY(-2px);
}
.doc-gallery--webdesign a {
  display: block;
  overflow: hidden;
  background: var(--slate-100);
}
.doc-gallery--webdesign img {
  transition: transform 0.35s var(--ease);
}
.doc-gallery--webdesign figure:hover img {
  transform: scale(1.02);
}
.doc-gallery--webdesign .doc-gallery__featured a {
  max-height: 28rem;
}
.doc-gallery--webdesign .doc-gallery__featured img {
  width: 100%;
  max-height: 28rem;
  object-fit: cover;
  object-position: top center;
}
.doc-gallery--webdesign figcaption {
  padding: 0.625rem 1rem;
  font-weight: 500;
  background: #fff;
}
@media (min-width: 48rem) {
  .doc-gallery--webdesign {
    grid-template-columns: repeat(3, 1fr);
  }
}

.credential-box {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
}
.credential-box--web {
  border-color: rgba(220, 38, 38, 0.25);
  background: rgba(254, 242, 242, 0.5);
}
.credential-box__title {
  margin: 0 0 0.75rem;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--slate-900);
}
.credential-box__note {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--slate-600);
}
.credential-map .mono {
  font-weight: 600;
  color: var(--brand-700);
}
.doc-content p { margin: 1rem 0; }
.doc-content ul,
.doc-content ol { margin: 1rem 0; padding-left: 1.5rem; }
.doc-content ul { list-style: disc; }
.doc-content ol { list-style: decimal; }
.doc-content li { margin-top: 0.5rem; }
.doc-content strong { font-weight: 600; color: var(--slate-800); }
.doc-content a { color: var(--brand-700); text-decoration: underline; text-underline-offset: 2px; }
.doc-content a:hover { color: var(--brand-900); }
.doc-content pre {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: var(--radius-xl);
  background: var(--slate-900);
  color: #e2e8f0;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.6;
}
.doc-content code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--slate-100);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  color: var(--slate-800);
}
.doc-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.alert {
  display: flex;
  gap: 0.75rem;
  margin: 1.5rem 0;
  padding: 1rem;
  border: 1px solid #fcd34d;
  border-radius: var(--radius-xl);
  background: rgba(254, 243, 199, 0.6);
  font-size: 0.875rem;
  color: #92400e;
}
.alert svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; color: #d97706; margin-top: 0.125rem; }
.alert strong { display: block; font-weight: 600; }

.doc-toc {
  display: none;
  width: 14rem;
  flex-shrink: 0;
}
@media (min-width: 80rem) {
  .doc-toc { display: block; }
}
.doc-toc-inner {
  position: sticky;
  top: 6rem;
  padding: 1rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  box-shadow: var(--shadow-soft);
}
.doc-toc-inner > p {
  margin: 0 0 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-500);
}
.doc-toc ul { list-style: none; padding: 0; margin: 0; }
.doc-toc li { margin-bottom: 0.5rem; }
.doc-toc a { color: var(--slate-600); text-decoration: none; }
.doc-toc a:hover { color: var(--brand-700); }

.doc-footer-cta {
  margin-top: 3.5rem;
  padding: 1.5rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-2xl);
  background: linear-gradient(135deg, #fff, var(--brand-50));
  box-shadow: var(--shadow-soft);
}
.doc-footer-cta .split-sm {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}
.doc-footer-cta strong { font-size: 0.875rem; color: var(--slate-900); }
.doc-footer-cta p { margin: 0.25rem 0 0; font-size: 0.875rem; color: var(--slate-600); }

@media (max-width: 63.99rem) {
  .docs-sidebar-label { display: inline-flex; }
}

/* Option Tier — tier card layout */
.tier-intro { margin-top: 0.5rem; }

.tier-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 1.25rem 0 2rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #fff, var(--slate-50));
}
.tier-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--slate-700);
}
.tier-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 999px;
  flex-shrink: 0;
}
.tier-dot--1 { background: #059669; box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2); }
.tier-dot--2 { background: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2); }
.tier-dot--3 { background: #7c3aed; box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2); }

.tier-equip {
  margin: 2.5rem 0;
  padding: 1.25rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-2xl);
  background: #fff;
  box-shadow: var(--shadow-soft);
  scroll-margin-top: 6rem;
}
.tier-equip__head {
  margin-bottom: 1.25rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--slate-200);
}
.tier-equip__head h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--slate-900);
}

.tier-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 40rem) {
  .tier-grid { grid-template-columns: repeat(3, 1fr); align-items: start; }
}

.tier-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--slate-50);
  transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.tier-card:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}
.tier-card--1 { border-top: 3px solid #059669; }
.tier-card--2 { border-top: 3px solid #2563eb; }
.tier-card--3 { border-top: 3px solid #7c3aed; }

.tier-card__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: #fff;
  border-bottom: 1px solid var(--slate-200);
}
.tier-card__head h4 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--slate-900);
}
.tier-card__slot {
  margin: 0.125rem 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--slate-500);
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-lg);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  flex-shrink: 0;
}
.tier-badge--1 { background: linear-gradient(135deg, #059669, #10b981); }
.tier-badge--2 { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.tier-badge--3 { background: linear-gradient(135deg, #7c3aed, #8b5cf6); }

.tier-opt-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  flex: 1;
}
.tier-opt {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.625rem;
  margin-bottom: 0.25rem;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid transparent;
  font-size: 0.8125rem;
  line-height: 1.45;
}
.tier-opt:last-child { margin-bottom: 0; }
.tier-opt:hover {
  border-color: var(--slate-200);
  background: var(--brand-50);
}
.tier-opt__name {
  flex: 1;
  min-width: 0;
  color: var(--slate-700);
}
.tier-opt__val {
  flex-shrink: 0;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: var(--slate-100);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-800);
  white-space: nowrap;
}
.tier-card--1 .tier-opt__val { background: rgba(5, 150, 105, 0.12); color: #047857; }
.tier-card--2 .tier-opt__val { background: rgba(37, 99, 235, 0.12); color: #1d4ed8; }
.tier-card--3 .tier-opt__val { background: rgba(124, 58, 237, 0.12); color: #6d28d9; }

/* Roll mode config cards */
.config-panel {
  margin: 1.5rem 0;
  padding: 1.25rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-2xl);
  background: linear-gradient(160deg, #fff 0%, var(--brand-50) 100%);
}
.config-panel h3 {
  margin-top: 0 !important;
}
.config-tier-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, 1fr);
  margin: 1rem 0;
}
@media (max-width: 39.99rem) {
  .config-tier-grid { grid-template-columns: 1fr; }
}
.config-tier-chip {
  padding: 0.75rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--slate-200);
  background: #fff;
  text-align: center;
  font-size: 0.8125rem;
  border-top-width: 3px;
}
.config-tier-chip strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  color: var(--slate-900);
}
.config-tier-chip code {
  font-size: 0.75rem;
}
.config-tier-chip.tier-card--1 { border-top-color: #059669; }
.config-tier-chip.tier-card--2 { border-top-color: #2563eb; }
.config-tier-chip.tier-card--3 { border-top-color: #7c3aed; }

