/* Ludin docs — shared stylesheet.
   Tokens match ludin.app home + /learn. Edit here, every docs page updates. */

:root {
  --bg: #0a0a12; --bg-soft: #12121f; --card: #16162a;
  --border: rgba(255,255,255,0.08); --text: #ececf5; --muted: #a2a2b8;
  --accent: #7c7cff; --accent-soft: #b9b9ff; --glow: rgba(124,124,255,0.55);
  --maxw: 680px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: radial-gradient(1200px 700px at 50% -10%, #1c1c33 0%, var(--bg) 55%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.7; -webkit-font-smoothing: antialiased; min-height: 100vh;
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50; background: rgba(10,10,18,0.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 860px; margin: 0 auto; padding: 12px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  color: var(--accent-soft); font-weight: 700; letter-spacing: 0.28em;
  text-transform: uppercase; font-size: 14px;
}
.nav-brand img { width: 26px; height: 26px; border-radius: 7px; }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.nav-links a:hover { color: var(--text); }
.nav-links a.here { color: var(--text); }
.nav-cta {
  padding: 8px 16px !important;
  background: linear-gradient(180deg, var(--accent) 0%, #6a6aef 100%);
  color: #fff !important; border-radius: 9px;
}
@media (max-width: 620px) { .nav-links a:not(.nav-cta) { display: none; } }

/* ---- Article scaffolding ---- */
.crumbs { font-size: 13px; color: #6d6d85; margin: 30px 0 0; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
article { padding-bottom: 20px; }
.kicker {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--accent-soft); font-weight: 650; margin: 26px 0 12px;
}
h1 {
  font-size: clamp(28px, 5.4vw, 38px); line-height: 1.18; font-weight: 700;
  letter-spacing: -0.02em; margin-bottom: 16px;
}
.intro { color: var(--muted); font-size: 16.5px; margin-bottom: 30px; }
article h2 {
  font-size: clamp(20px, 3.6vw, 25px); font-weight: 700;
  letter-spacing: -0.01em; margin: 42px 0 12px;
}
article h3 { font-size: 17px; font-weight: 650; margin: 26px 0 8px; }
article p { color: var(--muted); font-size: 16.5px; margin-bottom: 14px; }
article p strong, article li strong, article td strong { color: var(--text); font-weight: 600; }
article a { color: var(--accent-soft); }
article ul, article ol { margin: 0 0 14px 22px; color: var(--muted); font-size: 16.5px; }
article li { margin-bottom: 8px; }
.section-head {
  font-size: 13px !important; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--accent-soft); font-weight: 650; margin: 34px 0 14px !important;
}
.section-head:first-of-type { margin-top: 0 !important; }

/* ---- Path chip: "Sleep Tools -> Journal" ---- */
.path {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: rgba(124,124,255,0.1); border: 1px solid rgba(124,124,255,0.3);
  border-radius: 999px; padding: 6px 15px; margin-bottom: 24px;
  font-size: 13.5px; font-weight: 650; color: var(--accent-soft); letter-spacing: 0.03em;
}
.path .sep { color: #6d6d85; font-weight: 400; }

/* ---- Callout boxes ---- */
.note {
  background: var(--card); border: 1px solid rgba(124,124,255,0.3);
  border-left: 3px solid var(--accent); border-radius: 14px;
  padding: 16px 20px; margin: 22px 0; font-size: 16px; color: var(--muted);
}
.note strong { color: var(--accent-soft); }
.note p { margin: 0; font-size: 16px; }
.note p + p { margin-top: 10px; }

.warn {
  background: rgba(255,176,96,0.06); border: 1px solid rgba(255,176,96,0.3);
  border-left: 3px solid #ffb060; border-radius: 14px;
  padding: 16px 20px; margin: 22px 0; font-size: 16px; color: var(--muted);
}
.warn strong { color: #ffc98c; }
.warn p { margin: 0; font-size: 16px; }

.soon {
  background: rgba(255,255,255,0.03); border: 1px dashed rgba(124,124,255,0.35);
  border-radius: 14px; padding: 16px 20px; margin: 30px 0 10px;
  font-size: 15.5px; color: #8a8aa3;
}
.soon strong {
  display: inline-block; color: var(--accent-soft); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 4px;
}
.soon p { margin: 0; font-size: 15.5px; color: #8a8aa3; }

/* ---- Settings table ---- */
.settings { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 15.5px; }
.settings th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.13em;
  color: var(--accent-soft); font-weight: 650; padding: 0 12px 8px 0;
  border-bottom: 1px solid var(--border);
}
.settings td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--border); color: var(--muted); vertical-align: top; }
.settings td:first-child { color: var(--text); font-weight: 600; width: 38%; }
.settings td.def { color: var(--accent-soft); font-variant-numeric: tabular-nums; white-space: nowrap; width: 18%; }
@media (max-width: 560px) {
  .settings, .settings tbody, .settings tr, .settings td { display: block; width: 100% !important; }
  .settings thead { display: none; }
  .settings tr { border-bottom: 1px solid var(--border); padding: 12px 0; }
  .settings td { border: 0; padding: 2px 0; }
  .settings td.def::before { content: "Default: "; color: #6d6d85; }
}

/* ---- Screenshots ---- */
figure.shot { margin: 26px 0; text-align: center; }
figure.shot img {
  max-width: 260px; width: 100%; height: auto; display: block; margin: 0 auto;
  border: 1px solid var(--border); border-radius: 20px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.5);
}
figure.shot figcaption { font-size: 13.5px; color: #6d6d85; margin-top: 12px; }
figure.shot .ph { display: none; }
figure.shot.pending img { display: none; }
figure.shot.pending .ph {
  display: flex; align-items: center; justify-content: center; text-align: center;
  max-width: 260px; width: 100%; aspect-ratio: 9 / 19.5; margin: 0 auto;
  border: 1px dashed rgba(124,124,255,0.35); border-radius: 20px;
  color: #6d6d85; font-size: 13px; padding: 20px; line-height: 1.6;
}
figure.shot.wide img, figure.shot.wide .ph { max-width: 300px; }

/* ---- Step list ---- */
ol.steps { list-style: none; margin: 0 0 20px; counter-reset: step; }
ol.steps > li {
  position: relative; padding-left: 44px; margin-bottom: 20px;
  color: var(--muted); font-size: 16.5px;
}
ol.steps > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 1px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(124,124,255,0.12); border: 1px solid rgba(124,124,255,0.35);
  color: var(--accent-soft); font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
ol.steps > li strong { color: var(--text); }

/* ---- Cards / index ---- */
.card {
  display: block; background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px 22px; margin-bottom: 12px;
  text-decoration: none; transition: border-color 0.15s, transform 0.12s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card h2 { color: var(--text); font-size: 18px; font-weight: 700; margin: 0 0 6px !important; }
.card p { color: var(--muted); font-size: 15px; margin: 0; }

.related { margin: 44px 0 40px; }
.related h2 { font-size: 16px; margin-bottom: 12px; }
.related a {
  display: block; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px; margin-bottom: 8px;
  color: var(--text); text-decoration: none; font-size: 15px; font-weight: 600;
}
.related a:hover { border-color: var(--accent); }

/* ---- Prev / next ---- */
.pager { display: flex; gap: 10px; margin: 40px 0 0; flex-wrap: wrap; }
.pager a {
  flex: 1 1 200px; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px; text-decoration: none; color: var(--text);
}
.pager a:hover { border-color: var(--accent); }
.pager span { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.14em; color: #6d6d85; margin-bottom: 3px; }
.pager b { font-size: 15px; font-weight: 650; }

/* ---- FAQ / troubleshooting ---- */
.tsq { background: var(--card); border: 1px solid var(--border); border-radius: 13px; padding: 18px 20px; margin-bottom: 12px; }
.tsq h3 { font-size: 16.5px; font-weight: 650; margin: 0 0 8px; color: var(--text); }
.tsq p { font-size: 15.5px; margin: 0 0 10px; }
.tsq p:last-child { margin-bottom: 0; }
.tsq ul { font-size: 15.5px; margin-bottom: 0; }

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--border); text-align: center; color: #5a5a72;
  font-size: 12.5px; padding: 30px 0 56px; line-height: 1.7; margin-top: 50px;
}
footer .disc { max-width: 520px; margin: 0 auto 10px; }
footer a { color: var(--muted); text-decoration: none; }
