/*
 * Nat1 original work.
 * Copyright (c) 2026 Md Hafijur Rahman. All rights reserved.
 * Signature: NAT1-MHR-KIRENTSUKENZENRIFAT-2026-6E617431
 *
 * nat1-manual.css — the user manual (partials/manual-content.php), on the
 * public manual.php page and in Settings → User Manual. Built on the app's
 * own tokens from nat1-ui.css, so it reads as part of Nat1 in both places.
 */

.nm {
  display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: var(--n-s8);
  align-items: start; color: var(--n-text); text-align: left;
}
@media (max-width: 900px) { .nm { grid-template-columns: minmax(0, 1fr); gap: var(--n-s5); } }

/* ── Contents + search ── */
.nm-toc { position: sticky; top: var(--n-s4); max-height: calc(100vh - 32px); overflow: auto; }
@media (max-width: 900px) { .nm-toc { position: static; max-height: none; } }
.nm-search-label { display: block; font-size: var(--n-fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--n-muted); margin-bottom: var(--n-s2); }
.nm-search { width: 100%; }
.nm-search-note { min-height: 1.3em; margin: var(--n-s2) 2px var(--n-s3); font-size: var(--n-fs-xs); color: var(--n-muted); }
.nm-toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.nm-toc li[hidden] { display: none; }
.nm-toc a {
  display: flex; align-items: baseline; gap: var(--n-s2); padding: 6px var(--n-s2); border-radius: var(--n-r-sm);
  color: var(--n-text); text-decoration: none; font-size: var(--n-fs-md); font-weight: 500;
}
.nm-toc a:hover, .nm-toc a:focus-visible { background: var(--n-surface-3); color: var(--n-accent-hi); outline: none; }
.nm-num { min-width: 18px; font-size: var(--n-fs-xs); color: var(--n-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .nm-toc ol { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }

/* ── Sections ── */
.nm-body { min-width: 0; font-size: var(--n-fs-base); line-height: 1.7; }
.nm-body section { padding: var(--n-s5) 0 var(--n-s2); border-bottom: 1px solid var(--n-line); scroll-margin-top: var(--n-s4); }
.nm-body section:first-child { padding-top: 0; }
.nm-body section[hidden] { display: none; }
.nm-body h2 {
  display: flex; align-items: baseline; gap: var(--n-s3); flex-wrap: wrap; margin: 0 0 var(--n-s2);
  font-family: var(--n-font-display); font-size: var(--n-fs-xl); font-weight: 700; color: var(--n-text); text-wrap: balance;
}
.nm-n { font-family: var(--n-font-ui); font-size: var(--n-fs-md); font-weight: 700; color: var(--n-accent); font-variant-numeric: tabular-nums; }
.nm-body h3 { margin: var(--n-s5) 0 var(--n-s1); font-size: var(--n-fs-lg); font-weight: 700; color: var(--n-accent-hi); }
.nm-body p, .nm-body li { max-width: 70ch; }
.nm-body p { margin: 0 0 var(--n-s3); }
.nm-body ul, .nm-body ol { margin: 0 0 var(--n-s4); padding-left: 22px; }
.nm-body li { margin-bottom: 6px; }
.nm-body li::marker { color: var(--n-accent); }
.nm-body strong { font-weight: 700; }
.nm-body a { color: var(--n-accent-hi); }
.nm-ui { font-size: .9em; font-weight: 700; white-space: nowrap; padding: 1px 7px; border-radius: 5px; background: var(--n-surface-3); color: var(--n-accent-hi); }
.nm-path { font-weight: 700; }

.nm-roles { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 var(--n-s3); }
.nm-role { font-size: var(--n-fs-2xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 2px 9px; border-radius: var(--n-r-full); border: 1px solid currentColor; }
.nm-role.player { color: var(--n-info); }
.nm-role.dm { color: var(--n-arcane); }
.nm-role.admin { color: var(--n-red); }

.nm-note { display: grid; grid-template-columns: auto 1fr; gap: var(--n-s3); align-items: start; max-width: 70ch; padding: var(--n-s3) var(--n-s4); border-radius: var(--n-r); margin: 0 0 var(--n-s4); border: 1px solid transparent; }
.nm-note p { margin: 0; }
.nm-note b { font-size: var(--n-fs-2xs); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding-top: 4px; }
.nm-note.tip { background: var(--n-green-dim); border-color: rgba(92,196,124,.3); }
.nm-note.tip b { color: var(--n-green); }
.nm-note.warn { background: var(--n-amber-dim); border-color: rgba(251,191,36,.3); }
.nm-note.warn b { color: var(--n-amber); }

.nm-table { overflow-x: auto; margin: 0 0 var(--n-s4); }
.nm-table table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: var(--n-fs-md); line-height: 1.5; background: var(--n-surface-2); border: 1px solid var(--n-line); border-radius: var(--n-r); overflow: hidden; }
.nm-table th, .nm-table td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--n-line-soft); }
.nm-table th { font-size: var(--n-fs-2xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--n-muted); background: var(--n-surface-3); }
.nm-table tr:last-child td { border-bottom: 0; }
.nm-table td:first-child { font-weight: 700; white-space: nowrap; }

.nm-faq dt { margin-top: var(--n-s4); font-weight: 700; max-width: 70ch; }
.nm-faq dd { margin: 4px 0 0; max-width: 70ch; }
.nm-foot { padding-top: var(--n-s4); font-size: var(--n-fs-sm); color: var(--n-muted); }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
