/* =================================================================
   Prose content styles for docs/policy pages.
   Only handles semantic HTML elements inside .prose that Tailwind
   preflight strips. Layout uses Tailwind utility classes directly.
   Colors match dashboard tailwind.config exactly.
   ================================================================= */

/* ----- Anchor scroll offset ----- */
html {
  scroll-padding-top: 5rem;
}

/* ----- Headings ----- */
.prose h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #171717;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #E5E5E5;
}

.prose h2:first-child { margin-top: 0; }

.prose h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #262626;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

html.dark .prose h2 {
  color: #FFFFFF;
  border-bottom-color: #525252;
}

html.dark .prose h3 {
  color: #FAFAFA;
}

/* ----- Body text ----- */
.prose p {
  margin-bottom: 1rem;
}

.prose ol,
.prose ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.prose ul { list-style-type: disc; }
.prose ol { list-style-type: decimal; }

.prose li {
  margin-bottom: 0.5rem;
}

.prose strong {
  color: #171717;
}

html.dark .prose strong {
  color: #FAFAFA;
}

/* ----- Links inside prose ----- */
.prose a {
  color: #A8703F;
  text-decoration: none;
}

.prose a:hover {
  text-decoration: underline;
}

html.dark .prose a {
  color: #D4A574;
}

/* ----- Inline code ----- */
.prose code {
  background: #F5F5F5;
  color: #8D5D32;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
}

html.dark .prose code {
  background: #404040;
  color: #D4A574;
}

/* ----- Tables ----- */
.prose table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #E5E5E5;
  border-radius: 0.5rem;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.prose table thead { background: #FAFAFA; }

.prose table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #404040;
  border-bottom: 1px solid #E5E5E5;
}

.prose table td {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid #E5E5E5;
}

.prose table tr:last-child td { border-bottom: none; }

html.dark .prose table {
  border-color: #525252;
}

html.dark .prose table thead {
  background: #262626;
}

html.dark .prose table th {
  color: #F5F5F5;
  border-bottom-color: #525252;
}

html.dark .prose table td {
  border-bottom-color: #525252;
}

/* ----- Callout ----- */
.callout {
  background: #FDF6F0;
  border-left: 4px solid #A8703F;
  padding: 1rem 1.25rem;
  border-radius: 0 0.5rem 0.5rem 0;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

.callout-warn {
  background: #fefce8;
  border-left-color: #ca8a04;
}

html.dark .callout {
  background: #3d2a1a;
  border-left-color: #D4A574;
}

html.dark .callout-warn {
  background: #422006;
  border-left-color: #f59e0b;
  color: #fef3c7;
}

/* ----- Warning box ----- */
.warning-box {
  background: #fefce8;
  border: 2px solid #f59e0b;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  font-size: 1rem;
}

.warning-box p { margin-bottom: 0.75rem; }
.warning-box p:last-child { margin-bottom: 0; }

html.dark .warning-box {
  background: #422006;
  border-color: #f59e0b;
  color: #fef3c7;
}

/* ----- SMS examples ----- */
.sms-example {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.sms-example code {
  padding: 0.375rem 0.75rem;
  white-space: nowrap;
}

/* ----- Step list ----- */
.step-list {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

.step-list li {
  counter-increment: step;
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 1.25rem;
}

.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.75rem;
  height: 1.75rem;
  background: #A8703F;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
}

html.dark .step-list li::before {
  background: #C08552;
}

/* ----- Inline brand name (matches dashboard BrandName component) ----- */
.mt-brand {
  font-weight: 700;
  color: #171717;
}

.mt-brand > span {
  color: #A8703F;
}

html.dark .mt-brand {
  color: #F5F5F5;
}

html.dark .mt-brand > span {
  color: #C08552;
}

/* ----- Sidebar nav ----- */
.sidebar-nav a {
  display: block;
  padding: 0.375rem 0;
  color: #737373;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.sidebar-nav a:hover {
  color: #A8703F;
  text-decoration: none;
}

html.dark .sidebar-nav a { color: #D4D4D4; }
html.dark .sidebar-nav a:hover { color: #D4A574; }

.nav-group { margin-bottom: 1.25rem; }

.nav-group-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #A3A3A3;
  margin-bottom: 0.375rem;
}

html.dark .nav-group-title { color: #737373; }

/* ----- Logged-in sidebar layout offset ----- */
@media (min-width: 768px) {
  body.has-sidebar > div,
  body.has-sidebar > main,
  body.has-sidebar > footer {
    margin-left: 3.5rem;
  }
}

body.has-sidebar {
  padding-bottom: 4rem;
}

@media (min-width: 768px) {
  body.has-sidebar {
    padding-bottom: 0;
  }
}
