/* EMS Fast Cash Manual — modern documentation chrome */
:root {
  --navy: #0b1f3a;
  --navy-mid: #123056;
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --teal-light: #14b8a6;
  --slate: #64748b;
  --slate-dark: #334155;
  --light: #f1f5f9;
  --white: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(11, 31, 58, 0.08);
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --sidebar-w: 280px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--slate-dark);
  background: var(--light);
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; height: auto; }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { color: var(--teal); text-decoration: underline; }

.manual-top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 31, 58, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: var(--white);
}
.manual-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
}
.manual-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--white);
  text-decoration: none;
}
.manual-brand:hover { color: var(--white); text-decoration: none; }
.manual-mark {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  display: grid; place-items: center;
  font-weight: 800; font-size: 0.8rem; color: #fff;
}
.manual-brand strong { display: block; font-size: 0.92rem; line-height: 1.2; }
.manual-brand span { display: block; font-size: 0.72rem; color: rgba(255,255,255,0.55); }
.manual-top-links {
  display: flex; flex-wrap: wrap; gap: 0.35rem 0.85rem; align-items: center;
}
.manual-top-links a {
  color: rgba(255,255,255,0.78);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}
.manual-top-links a:hover { color: var(--teal-light); }
.manual-top-links .sep { color: rgba(255,255,255,0.25); }

.manual-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 64px);
}

.manual-sidebar {
  position: sticky;
  top: 64px;
  align-self: start;
  height: calc(100vh - 64px);
  overflow-y: auto;
  background: var(--white);
  border-right: 1px solid var(--border);
  padding: 1rem 0.85rem 2rem;
}
.manual-sidebar h2 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate);
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.35rem;
}
.toc-section { margin-bottom: 0.85rem; }
.toc-section > button,
.toc-section > a.toc-heading {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: transparent;
  border: none;
  text-align: left;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}
.toc-section > button:hover,
.toc-section > a.toc-heading:hover {
  background: rgba(13,148,136,0.08);
  color: var(--teal-dark);
  text-decoration: none;
}
.toc-section ul {
  list-style: none;
  padding: 0.15rem 0 0.25rem 0.55rem;
  display: none;
}
.toc-section.open ul { display: block; }
.toc-section ul a {
  display: block;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--slate-dark);
  text-decoration: none;
  line-height: 1.35;
}
.toc-section ul a:hover,
.toc-section ul a.active {
  background: rgba(13,148,136,0.1);
  color: var(--teal-dark);
  text-decoration: none;
}
.toc-section .chev { color: var(--slate); font-size: 0.7rem; }

.manual-main {
  padding: 1.5rem 1.75rem 3rem;
  min-width: 0;
}
.manual-article {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.75rem 2.25rem;
}
.manual-crumb {
  font-size: 0.8rem;
  color: var(--slate);
  margin-bottom: 1rem;
}
.manual-crumb a { font-weight: 600; }
.manual-article h1 {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  color: var(--navy);
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}
.menu-path {
  display: inline-block;
  margin: 0.35rem 0 1.25rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(13,148,136,0.1);
  color: var(--teal-dark);
  font-size: 0.82rem;
  font-weight: 600;
}
.manual-body {
  color: var(--slate-dark);
  font-size: 0.98rem;
}
.manual-body p { margin: 0.75rem 0; }
.manual-body h2, .manual-body h3, .manual-body h4 {
  color: var(--navy);
  margin: 1.5rem 0 0.6rem;
  line-height: 1.3;
}
.manual-body h2 { font-size: 1.25rem; }
.manual-body h3 { font-size: 1.1rem; }
.manual-body ul, .manual-body ol {
  margin: 0.6rem 0 0.9rem 1.25rem;
}
.manual-body li { margin: 0.3rem 0; }
.manual-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
  font-size: 0.9rem;
}
.manual-body table td,
.manual-body table th {
  border: 1px solid var(--border);
  padding: 0.5rem 0.65rem;
  vertical-align: top;
}
.manual-body table th {
  background: var(--navy);
  color: #fff;
  text-align: left;
}
.manual-body table tr:nth-child(even) td { background: rgba(241,245,249,0.6); }
.manual-body img {
  display: block;
  margin: 0.85rem auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: #fff;
  max-width: min(100%, 720px);
}
.manual-body blockquote {
  margin: 1rem 0;
  padding: 0.25rem 0;
  border: none;
}
.screen-caption {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin: -0.35rem 0 1rem;
}
.manual-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.manual-footer-nav a {
  font-weight: 600;
  font-size: 0.9rem;
}
.manual-note {
  margin-top: 1.5rem;
  padding: 0.85rem 1rem;
  background: var(--light);
  border-left: 3px solid var(--teal);
  border-radius: 0 8px 8px 0;
  font-size: 0.85rem;
  color: var(--slate);
}

.toc-page .toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}
.toc-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.toc-card:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow);
}
.toc-card h3 {
  font-size: 0.95rem;
  color: var(--navy);
  margin-bottom: 0.55rem;
}
.toc-card ul { list-style: none; margin: 0; padding: 0; }
.toc-card li { margin: 0.25rem 0; }
.toc-card a { font-size: 0.86rem; font-weight: 500; }

.sidebar-toggle {
  display: none;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 960px) {
  .manual-layout { grid-template-columns: 1fr; }
  .manual-sidebar {
    position: fixed;
    left: 0; top: 58px; bottom: 0;
    width: min(86vw, 320px);
    z-index: 40;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow);
  }
  .manual-sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: inline-flex; }
  .manual-main { padding: 1rem 1rem 2.5rem; }
  .manual-article { padding: 1.25rem; }
}
