/* EatDrinkPlay Documentation Stylesheet */
:root {
  --primary: #ed1552;
  --primary-dark: #96281b;
  --primary-light: #e74c3c;
  --secondary: #000;
  --secondary-light: #34495e;
  --accent: #1b1c4c;
  --accent-light: #f1c40f;
  --success: #06b496;
  --warning: #e67e22;
  --danger: #e74c3c;
  --info: #2980b9;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --border: #e1e4e8;
  --text: #2c3e50;
  --text-muted: #6c757d;
  --text-light: #adb5bd;
  --sidebar-width: 280px;
  --header-height: 64px;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --transition: 0.2s ease;
  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
a:hover {
  text-decoration: none !important;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
}
img {
  max-width: 100%;
}
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* =========================================================
   TOP HEADER
   ========================================================= */
.doc-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--secondary);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  z-index: 100;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo {
  width: 45px;
  height: 45px;
  background: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 14px;
  letter-spacing: -0.5px;
  padding: 5px;
}

.brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  display: block;
}

.topbar-search {
  flex: 1;
  max-width: 480px;
  margin: 0 1rem;
  position: relative;
}

.topbar-search input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.875rem;
  outline: none;
  transition: var(--transition);
}

.topbar-search input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.topbar-search input:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.topbar-search .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.875rem;
}

#search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: 200;
}

#search-results.active {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.search-result-item:last-child {
  border-bottom: none;
}
.search-result-item:hover {
  background: var(--bg);
}

.search-result-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.search-result-icon.admin {
  background: #fdeaea;
  color: var(--primary);
}
.search-result-icon.reader {
  background: #e8f5e9;
  color: var(--success);
}
.search-result-icon.lister {
  background: #fff3e0;
  color: var(--accent);
}
.search-result-icon.general {
  background: #e3f2fd;
  color: var(--info);
}

.search-result-title {
  font-size: 0.875rem;
  font-weight: 600;
}
.search-result-section {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.search-no-results {
  padding: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.topbar-nav {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
}

.topbar-nav a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.8rem;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: var(--transition);
  white-space: nowrap;
}

.topbar-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.topbar-nav a.active {
  color: #fff;
  background: var(--primary);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
  margin-left: auto;
}

/* =========================================================
   LAYOUT
   ========================================================= */
.doc-layout {
  display: flex;
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* =========================================================
   SIDEBAR
   ========================================================= */
.doc-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  overflow-y: auto;
  padding: 1.5rem 0;
  z-index: 50;
  transition: transform var(--transition);
}

.doc-sidebar::-webkit-scrollbar {
  width: 4px;
}
.doc-sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.doc-sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.sidebar-section {
  margin-bottom: 1.5rem;
}

.sidebar-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0 1.25rem 0.5rem;
}

.sidebar-nav {
  list-style: none;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1.25rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: var(--transition);
  border-left: 3px solid transparent;
  line-height: 1.4;
}

.sidebar-nav a:hover {
  color: var(--text);
  background: var(--bg);
}

.sidebar-nav a.active {
  color: var(--primary);
  background: #fdeaea;
  border-left-color: var(--primary);
  font-weight: 600;
}

.sidebar-nav a .nav-icon {
  width: 20px;
  text-align: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.sidebar-nav .sub-nav {
  list-style: none;
  padding-left: 2.75rem;
}

.sidebar-nav .sub-nav a {
  font-size: 0.8rem;
  padding: 0.3rem 1.25rem 0.3rem 0;
  border-left: none;
}

.sidebar-nav .sub-nav a:hover {
  background: none;
  color: var(--primary);
}
.sidebar-nav .sub-nav a.active {
  background: none;
  color: var(--primary);
  font-weight: 600;
}

.sidebar-role-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.badge-admin {
  background: #fdeaea;
  color: var(--primary);
}
.badge-reader {
  background: #e8f5e9;
  color: var(--success);
}
.badge-lister {
  background: #fff3e0;
  color: var(--accent);
}

/* =========================================================
   MAIN CONTENT
   ========================================================= */
.doc-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-width: 0;
}

.doc-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--secondary);
  margin: 2.5rem 0 1rem;
  padding-top: 1rem;
  line-height: 1.3;
}
h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--secondary);
  margin: 2rem 0 0.75rem;
}
h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--secondary);
  margin: 1.5rem 0 0.5rem;
}
h5 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 1.25rem 0 0.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text);
}
p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

ul,
ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
li {
  margin-bottom: 0.35rem;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: #f0f0f0;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--primary-dark);
}

pre {
  background: #1e2a3a;
  color: #e2e8f0;
  padding: 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  line-height: 1.7;
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

strong {
  font-weight: 600;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* =========================================================
   PAGE HEADER
   ========================================================= */
.page-hero {
  background: linear-gradient(
    135deg,
    var(--secondary) 0%,
    var(--secondary-light) 100%
  );
  padding: 2.5rem 2rem;
  margin: -2.5rem -2rem 2.5rem;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 50%;
}

.page-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.page-hero h1 {
  color: #fff;
  margin-bottom: 0.5rem;
}

.page-hero .lead {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.05rem;
  max-width: 600px;
  margin-bottom: 0;
}

.page-hero.admin {
  background: linear-gradient(135deg, #ed1552 0%, #ed1552 100%);
}
.page-hero.reader {
  background: linear-gradient(135deg, #06b496 0%, #1e8449 100%);
}
.page-hero.lister {
  background: linear-gradient(135deg, #1b1c4c 0%, #000 100%);
}
.page-hero.faq {
  background: linear-gradient(135deg, #2980b9 0%, #1a5276 100%);
}
.page-hero.support {
  background: linear-gradient(135deg, #8e44ad 0%, #6c3483 100%);
}
.page-hero.release {
  background: linear-gradient(135deg, #16a085 0%, #0e6655 100%);
}

/* =========================================================
   COMPONENTS
   ========================================================= */

/* Role Cards (Home) */
.role-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.role-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.role-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.role-card.admin::before {
  background: var(--primary);
}
.role-card.reader::before {
  background: var(--success);
}
.role-card.lister::before {
  background: var(--accent);
}

.role-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}

.role-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 1rem;
}

.role-card.admin .role-card-icon {
  background: #fdeaea;
}
.role-card.reader .role-card-icon {
  background: #e8f5e9;
}
.role-card.lister .role-card-icon {
  background: #fff3e0;
}

.role-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.role-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

/* Info Boxes */
.info-box,
.warning-box,
.success-box,
.danger-box,
.assumption-box {
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.9rem;
}

.info-box {
  background: #e3f2fd;
  border-left: 4px solid var(--info);
}
.warning-box {
  background: #fff3e0;
  border-left: 4px solid var(--warning);
}
.success-box {
  background: #e8f5e9;
  border-left: 4px solid var(--success);
}
.danger-box {
  background: #fdeaea;
  border-left: 4px solid var(--danger);
}
.assumption-box {
  background: #f3e5f5;
  border-left: 4px solid #9c27b0;
}

.info-box .box-icon {
  color: var(--info);
  flex-shrink: 0;
  margin-top: 2px;
}
.warning-box .box-icon {
  color: var(--warning);
  flex-shrink: 0;
  margin-top: 2px;
}
.success-box .box-icon {
  color: var(--success);
  flex-shrink: 0;
  margin-top: 2px;
}
.danger-box .box-icon {
  color: var(--danger);
  flex-shrink: 0;
  margin-top: 2px;
}
.assumption-box .box-icon {
  color: #9c27b0;
  flex-shrink: 0;
  margin-top: 2px;
}

.box-content {
  flex: 1;
}
.box-content strong {
  display: block;
  margin-bottom: 0.25rem;
}

/* Steps */
.steps {
  counter-reset: step;
  margin: 1.5rem 0;
  list-style: none;
  padding: 0;
}

.step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  position: relative;
}

.step::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 38px;
  bottom: -1.25rem;
  width: 2px;
  background: var(--border);
}

.step:last-child::before {
  display: none;
}

.step-number {
  counter-increment: step;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.step-number::before {
  content: counter(step);
}

.step-content {
  flex: 1;
  padding-top: 0.35rem;
  padding-bottom: 1rem;
}
.step-content h4 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
}
.step-content p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* Screenshot Placeholder */
.screenshot {
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 0;
  text-align: center;
  margin: 1.25rem 0;
  position: relative;
  overflow: hidden;
}

.screenshot .screenshot-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}

.screenshot-icon {
  font-size: 2rem;
  opacity: 0.4;
}

.screenshot-label {
  font-size: 0.875rem;
  font-weight: 600;
}

.screenshot-desc {
  font-size: 0.75rem;
}

/* Feature Table */
.feature-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 1rem 0 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--border);
}

.feature-table th {
  background: var(--secondary);
  color: #fff;
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.feature-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.feature-table tr:last-child td {
  border-bottom: none;
}
.feature-table tr:nth-child(even) td {
  background: var(--bg);
}

/* Checklist */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.35rem 0;
  font-size: 0.9rem;
}

.checklist li::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.checklist.restricted li::before {
  content: "✗";
  color: var(--danger);
}

/* Tags / Badges */
.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
}

.tag-admin {
  background: #fdeaea;
  color: var(--primary);
}
.tag-reader {
  background: #e8f5e9;
  color: var(--success);
}
.tag-lister {
  background: #fff3e0;
  color: var(--accent);
}
.tag-new {
  background: #e3f2fd;
  color: var(--info);
}
.tag-updated {
  background: #e8f5e9;
  color: var(--success);
}
.tag-deprecated {
  background: #fafafa;
  color: var(--text-muted);
}
.tag-assumption {
  background: #f3e5f5;
  color: #9c27b0;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1rem 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.card h3 {
  margin-top: 0;
}

/* Status Badges */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.status-active {
  background: #e8f5e9;
  color: var(--success);
}
.status-active::before {
  background: var(--success);
}
.status-pending {
  background: #fff3e0;
  color: var(--accent);
}
.status-pending::before {
  background: var(--accent);
}
.status-rejected {
  background: #fdeaea;
  color: var(--danger);
}
.status-rejected::before {
  background: var(--danger);
}
.status-expired {
  background: #f0f0f0;
  color: var(--text-muted);
}
.status-expired::before {
  background: var(--text-muted);
}

/* Workflow diagram */
.workflow {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.workflow-step {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  min-width: 100px;
}

.workflow-step strong {
  display: block;
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
  color: var(--secondary);
}
.workflow-step span {
  color: var(--text-muted);
  font-size: 0.7rem;
}
.workflow-arrow {
  color: var(--text-muted);
  padding: 0 0.5rem;
  font-size: 1.2rem;
}

/* FAQ */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.faq-question {
  padding: 1rem 1.25rem;
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 0.9rem;
  user-select: none;
  gap: 0.75rem;
}

.faq-question:hover {
  background: var(--bg);
}

.faq-toggle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
  transition: transform var(--transition);
  color: var(--primary);
}

.faq-item.open .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  display: none;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
  background: var(--surface);
}

.faq-item.open .faq-answer {
  display: block;
}

/* Troubleshooting */
.trouble-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
}

.trouble-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: #fafafa;
  border-bottom: 1px solid var(--border);
}

.trouble-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #fdeaea;
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.trouble-title {
  font-weight: 600;
  font-size: 0.9rem;
}
.trouble-body {
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
}
.trouble-body h5 {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0;
}

/* Release Notes */
.release-version {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.version-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--secondary);
}

.version-date {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.release-change {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.release-change:last-child {
  border-bottom: none;
}

.change-type {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}
.breadcrumb .sep {
  color: var(--border);
}

/* On This Page */
.on-this-page {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  font-size: 0.8rem;
  margin-bottom: 2rem;
}

.on-this-page h5 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.on-this-page ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.on-this-page li {
  margin: 0;
}
.on-this-page a {
  color: var(--text-muted);
  text-decoration: none;
  display: block;
  padding: 0.25rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.75rem;
  margin-left: -0.75rem;
  line-height: 1.4;
  transition: var(--transition);
}

.on-this-page a:hover {
  color: var(--text);
  border-left-color: var(--border);
}
.on-this-page a.active {
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

/* Two-column layout for content + TOC */
.content-with-toc {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 2rem;
  align-items: start;
}

/* Footer */
.doc-footer {
  margin-left: var(--sidebar-width);
  background: var(--secondary);
  color: rgba(255, 255, 255, 0.6);
  padding: 1.5rem 2rem;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.doc-footer a {
  color: rgba(255, 255, 255, 0.8);
}
.doc-footer a:hover {
  color: #fff;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .content-with-toc {
    grid-template-columns: 1fr;
  }
  .on-this-page {
    position: static;
    margin-bottom: 1rem;
  }
}

@media (max-width: 768px) {
  :root {
    --sidebar-width: 0px;
  }

  .doc-sidebar {
    transform: translateX(-280px);
    width: 280px;
  }

  .doc-sidebar.open {
    transform: translateX(0);
  }

  .mobile-menu-btn {
    display: flex;
  }

  .doc-main {
    margin-left: 0;
  }

  .doc-content {
    padding: 1.5rem 1rem;
  }

  .page-hero {
    padding: 1.75rem 1rem;
    margin: -1.5rem -1rem 1.5rem;
  }

  h1 {
    font-size: 1.6rem;
  }
  h2 {
    font-size: 1.25rem;
  }

  .topbar-nav {
    display: none;
  }

  .topbar-search {
    max-width: 220px;
  }

  .role-cards {
    grid-template-columns: 1fr;
  }

  .workflow {
    flex-direction: column;
  }
  .workflow-arrow {
    transform: rotate(90deg);
  }

  .doc-footer {
    margin-left: 0;
    flex-direction: column;
    text-align: center;
  }
}

/* =========================================================
   PRINT
   ========================================================= */
@media print {
  .doc-topbar,
  .doc-sidebar,
  .on-this-page {
    display: none;
  }
  .doc-main {
    margin-left: 0;
  }
  .doc-content {
    max-width: 100%;
    padding: 0;
  }
  .page-hero {
    margin: 0 0 1.5rem;
  }
}

/* =========================================================
   UTILITIES
   ========================================================= */
.text-muted {
  color: var(--text-muted);
}
.text-sm {
  font-size: 0.875rem;
}
.text-xs {
  font-size: 0.75rem;
}
.font-mono {
  font-family: var(--font-mono);
}
.mt-0 {
  margin-top: 0;
}
.mb-0 {
  margin-bottom: 0;
}
.mb-1 {
  margin-bottom: 0.5rem;
}
.mb-2 {
  margin-bottom: 1rem;
}
.mb-3 {
  margin-bottom: 1.5rem;
}
.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.gap-1 {
  gap: 0.5rem;
}
.gap-2 {
  gap: 1rem;
}
.items-center {
  align-items: center;
}
.flex-wrap {
  flex-wrap: wrap;
}
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 40;
  display: none;
}
.overlay.show {
  display: block;
}
