/* ==========================================================================
   Platform JW — user manual
   Light reading experience (Soft White), as the brand guidelines recommend
   for long-form content. Overrides base.css tokens on <html class="theme-light">.
   ========================================================================== */

.theme-light {
  color-scheme: light;
  --bg: #F5F5F7;
  --bg-alt: #ECECEF;
  --surface: #FFFFFF;
  --surface-2: #EFEFF2;
  --ink: #0B0B0F;
  --ink-2: #3F3F46;
  --ink-3: #5F5F69;
  --line: rgba(11, 11, 15, 0.14);
  --line-soft: rgba(11, 11, 15, 0.08);
  --violet-ink: #5B38F0;
  --violet-soft: rgba(109, 74, 255, 0.1);
}
.theme-light .site-header { background: rgba(245, 245, 247, 0.85); }
.theme-light .site-header.is-scrolled { background: rgba(245, 245, 247, 0.94); }
.theme-light .mobile-menu { background: var(--bg); }

.manual {
  display: grid;
  gap: 48px;
  padding-top: calc(var(--header-h) + 48px);
  padding-bottom: 112px;
}
@media (min-width: 960px) {
  .manual { grid-template-columns: 260px minmax(0, 1fr); gap: 72px; }
}

/* Index */
.toc { font-size: 0.9375rem; }
@media (min-width: 960px) {
  .toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; padding-right: 8px; }
}
.toc label { display: block; font-weight: 600; margin-bottom: 8px; }
.toc input {
  width: 100%;
  font: inherit;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  margin-bottom: 22px;
}
.toc input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.toc > nav > ol > li { margin-bottom: 12px; }
.toc > nav > ol > li > a { font-weight: 600; color: var(--ink); }
.toc ol ol { margin-top: 6px; padding-left: 12px; border-left: 1px solid var(--line); }
.toc ol ol a { display: block; padding: 3px 0; color: var(--ink-3); }
.toc a:hover, .toc a.active { color: var(--violet-ink); }
@media (max-width: 959px) {
  .toc { border-bottom: 1px solid var(--line); padding-bottom: 20px; }
  .toc ol ol { display: none; }
}

/* Reading column */
.doc { max-width: 74ch; }
.doc > header { margin-bottom: 40px; }
.doc h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); font-weight: 800; letter-spacing: -0.045em; line-height: 1.04; margin-bottom: 20px; }
.doc > header p:not(.note) { font-size: 1.1875rem; color: var(--ink-2); }
.doc h2 {
  font-size: clamp(1.875rem, 3.4vw, 2.5rem);
  letter-spacing: -0.035em;
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--ink);
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.doc p.where { margin-top: 10px; font-size: 0.9375rem; color: var(--ink-3); }
.doc article { margin-top: 36px; scroll-margin-top: calc(var(--header-h) + 16px); }
.doc h3 { font-size: 1.3125rem; letter-spacing: -0.02em; margin-bottom: 10px; }
.doc p { margin-bottom: 14px; color: var(--ink-2); }
.doc ol, .doc ul { margin: 0 0 16px; padding-left: 1.4em; color: var(--ink-2); }
.doc ol { list-style: decimal; }
.doc ul { list-style: disc; }
.doc li { margin-bottom: 8px; padding-left: 4px; }
.doc li::marker { color: var(--violet-ink); font-weight: 600; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc a { color: var(--violet-ink); text-decoration: underline; text-underline-offset: 3px; }
.doc code { font-size: 0.9em; background: var(--surface-2); border-radius: 6px; padding: 1px 6px; }

.table-scroll { overflow-x: auto; margin-bottom: 20px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.doc th { color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--ink); }

.path { font-weight: 600; color: var(--ink); background: var(--violet-soft); border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
kbd { font: inherit; font-size: 0.875em; font-weight: 600; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; background: var(--surface); color: var(--ink); }

.note { background: var(--surface); border: 1px solid var(--line-soft); border-left: 3px solid var(--violet); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 14px 18px; font-size: 0.9375rem; margin-bottom: 18px; }
.note strong:first-child { display: block; margin-bottom: 2px; }

.hidden-by-search { display: none; }

@media print {
  .site-header, .toc, .site-footer { display: none; }
  .manual { display: block; padding: 0; }
  .doc { max-width: none; }
  .doc h2 { break-before: page; }
  .doc article { break-inside: avoid; }
}
