:root {
  --green-900: #0D3B18;
  --green-800: #145A1E;
  --green-700: #1a6b2a;
  --green-600: #228B22;
  --green-50: #E8F5E9;
  --gold-600: #D4A017;
  --gold-500: #F5C518;
  --dark-900: #060e0a;
  --text: #1e293b;
  --muted: #64748b;
  --line: #dce8de;
  --surface: #ffffff;
  --sidebar-w: 280px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: #f7faf7;
}

a { color: var(--green-700); }
a:hover { color: var(--green-900); }

.docs-app-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  background: #eef5ef;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: ui-monospace, monospace;
  font-size: 14px;
  text-decoration: none;
  word-break: break-all;
}
.docs-app-link:hover {
  background: var(--green-50);
  border-color: var(--green-600);
}

.docs-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

.docs-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--dark-900);
  color: #eef8ef;
  padding: 24px 20px 32px;
  border-right: 1px solid rgba(165, 214, 167, 0.12);
}

.docs-sidebar__brand { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid rgba(165, 214, 167, 0.16); }
.docs-sidebar__brand-title { font-weight: 700; font-size: 15px; color: #fff; line-height: 1.2; }
.docs-sidebar__brand-sub { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-500); margin-top: 4px; }

.docs-nav__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(232, 245, 233, 0.5);
  margin: 0 0 10px;
}

.docs-nav ul { list-style: none; margin: 0 0 24px; padding: 0; }
.docs-nav a {
  display: block;
  padding: 7px 12px;
  border-radius: 8px;
  color: rgba(232, 245, 233, 0.82);
  text-decoration: none;
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
}
.docs-nav a:hover, .docs-nav a.is-active { background: rgba(34, 139, 34, 0.22); color: #fff; }

.docs-main { min-width: 0; }

.docs-header {
  background: linear-gradient(135deg, var(--green-900), var(--green-800));
  color: #fff;
  padding: 48px 48px 40px;
}

.docs-header__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.docs-header__eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin: 0;
}

.docs-btn-print {
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.docs-btn-print:hover { background: rgba(255,255,255,0.22); }

.docs-header h1 { margin: 0 0 12px; font-size: clamp(28px, 4vw, 40px); line-height: 1.15; }
.docs-header p { margin: 0; max-width: 640px; color: rgba(255, 255, 255, 0.82); font-size: 17px; }
.docs-header__meta { margin-top: 16px; font-size: 13px; color: rgba(255, 255, 255, 0.6); }

.docs-content { max-width: 820px; padding: 40px 48px 80px; }

.docs-section { margin-bottom: 56px; scroll-margin-top: 88px; }
.docs-section h2 {
  font-size: 26px;
  color: var(--green-900);
  margin: 0 0 8px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--gold-500);
  display: inline-block;
}
.docs-section h3 { font-size: 18px; color: var(--green-800); margin: 28px 0 10px; }

.docs-steps { counter-reset: step; list-style: none; padding: 0; margin: 20px 0; }
.docs-steps li {
  counter-increment: step;
  position: relative;
  padding: 16px 16px 16px 56px;
  margin-bottom: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.docs-steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px; top: 16px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--green-600);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
}

.docs-note {
  background: var(--green-50);
  border-left: 4px solid var(--green-600);
  padding: 14px 16px;
  border-radius: 0 10px 10px 0;
  margin: 16px 0;
  font-size: 15px;
}
.docs-callout {
  background: var(--green-50);
  border: 1px solid #b8ddb9;
  border-left: 4px solid var(--green-600);
  border-radius: 0 12px 12px 0;
  padding: 20px 22px;
  margin: 20px 0 28px;
}
.docs-section .docs-callout h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--green-900);
}
.docs-callout__lead {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
}
.docs-callout__list {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 8px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}
.docs-callout__list li::marker { color: var(--green-600); }
.docs-warn {
  background: #fef3c7;
  border-left: 4px solid var(--gold-600);
  padding: 14px 16px;
  border-radius: 0 10px 10px 0;
  margin: 16px 0;
}

.docs-field-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.docs-field-table th, .docs-field-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.docs-field-table th { background: #f0f7f1; color: var(--green-900); width: 28%; }
.docs-field-table tr:last-child th, .docs-field-table tr:last-child td { border-bottom: 0; }
.docs-field-table code { font-size: 12px; background: #eef5ef; padding: 1px 6px; border-radius: 4px; }

/* Collapsible screenshots */
.docs-shot {
  margin: 20px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(6, 14, 10, 0.05);
}
.docs-shot summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 14px;
  color: var(--green-800);
  list-style: none;
  user-select: none;
}
.docs-shot summary::-webkit-details-marker { display: none; }
.docs-shot summary::before {
  content: '▸ ';
  color: var(--gold-600);
}
.docs-shot[open] summary::before { content: '▾ '; }
.docs-shot summary:hover { background: #f7faf7; }
.docs-shot__body { padding: 0 16px 16px; }
.docs-shot__body img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.docs-shot__caption {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.docs-checklist { list-style: none; padding: 0; }
.docs-checklist li {
  padding: 10px 0 10px 32px;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.docs-checklist li::before {
  content: '☐';
  position: absolute;
  left: 0;
  color: var(--green-600);
  font-size: 18px;
}

.docs-faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 10px;
}
.docs-faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 16px;
  list-style: none;
}
.docs-faq summary::-webkit-details-marker { display: none; }
.docs-faq details[open] summary { border-bottom: 1px solid var(--line); color: var(--green-800); }
.docs-faq details p { margin: 0; padding: 14px 16px; font-size: 15px; color: var(--muted); }

.docs-footer {
  max-width: 820px;
  padding: 24px 48px 48px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.docs-back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--green-700);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(6, 14, 10, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 50;
}
.docs-back-top.is-visible { opacity: 1; pointer-events: auto; }

.docs-menu-toggle, .docs-overlay { display: none; }

/* ── Print / PDF ── */
@media print {
  @page {
    size: A4;
    margin: 18mm 16mm;
  }

  body { background: #fff; font-size: 11pt; color: #000; }

  .docs-menu-toggle, .docs-overlay, .docs-back-top, .docs-btn-print { display: none !important; }

  .docs-shell { display: block; }

  .docs-sidebar {
    position: static;
    height: auto;
    background: #fff;
    color: #000;
    border: none;
    padding: 0 0 16pt;
    page-break-after: always;
  }
  .docs-sidebar__brand { border-color: #ccc; }
  .docs-sidebar__brand-title { color: #000; }
  .docs-sidebar__brand-sub { color: #666; }
  .docs-nav a { color: #000; padding: 4pt 0; font-size: 10pt; }
  .docs-nav a.is-active { font-weight: 700; background: none; }

  .docs-header {
    background: none;
    color: #000;
    padding: 0 0 16pt;
    border-bottom: 2pt solid var(--green-800);
    page-break-after: avoid;
  }
  .docs-header__eyebrow { color: var(--green-800); }
  .docs-header p, .docs-header__meta { color: #444; }

  .docs-content, .docs-footer { max-width: none; padding: 0; }

  .docs-section { page-break-inside: avoid; margin-bottom: 20pt; }
  .docs-section h2 { color: #000; border-color: var(--gold-600); font-size: 16pt; }

  .docs-shot { break-inside: avoid; border: 1pt solid #ccc; box-shadow: none; }
  .docs-shot summary { display: none; }
  .docs-shot__body { display: block !important; padding: 8pt; }
  .docs-shot__body img { max-height: 220pt; object-fit: contain; object-position: top left; }

  .docs-app-link {
    background: none;
    border: none;
    padding: 0;
    color: #000;
    font-size: 10pt;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #666;
    word-break: break-all;
  }
  .docs-nav a::after, .docs-app-link::after { content: none; }

  .docs-note, .docs-warn, .docs-callout { break-inside: avoid; }
  .docs-field-table { font-size: 9pt; }
}

@media (max-width: 960px) {
  .docs-shell { grid-template-columns: 1fr; }
  .docs-menu-toggle {
    display: block;
    position: fixed;
    top: 12px; left: 12px;
    z-index: 60;
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    background: var(--green-800);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
  }
  .docs-sidebar {
    position: fixed;
    left: 0; top: 0;
    z-index: 58;
    width: min(var(--sidebar-w), 88vw);
    transform: translateX(-105%);
    transition: transform 0.25s ease;
  }
  .docs-sidebar.is-open { transform: translateX(0); }
  .docs-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 55; }
  .docs-overlay.is-open { display: block; }
  .docs-header, .docs-content, .docs-footer { padding-left: 24px; padding-right: 24px; }
}
