/* ==========================================================================
   Advanced Life Coaching — Knowledge Base
   Visual language measured from docs.chatsyncs.com so the two read as peers:
     background   near-black          sidebar 304px, links 13.2px #9fa2a5
     body         DM Sans 16/400      headings Plus Jakarta Sans 600
     accent       #4a9af5             hairlines #26292c
   Everything below derives from those tokens — do not hand-pick new colours.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,700&family=Plus+Jakarta+Sans:wght@500;600;700&display=swap");

:root {
  color-scheme: dark;

  --bg:            #0b0d0f;
  --bg-raise:      #121417;
  --bg-card:       #14171a;
  --line:          #26292c;
  --line-soft:     #1c1f22;

  --text:          #f4f6f9;
  --text-head:     #dfe2e5;
  --text-muted:    #9fa2a5;
  --text-dim:      #717377;

  --accent:        #4a9af5;
  --accent-soft:   rgba(74, 154, 245, 0.12);
  --accent-line:   rgba(74, 154, 245, 0.35);

  --warn:          #e0b054;
  --warn-soft:     rgba(224, 176, 84, 0.10);
  --danger:        #f08c73;
  --danger-soft:   rgba(240, 140, 115, 0.10);

  --sidebar-w:     304px;
  --rail-w:        220px;
  --measure:       74ch;

  --sans:  "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --head:  "Plus Jakarta Sans", var(--sans);
  --mono:  ui-monospace, "Cascadia Mono", "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ── Shell ────────────────────────────────────────────────────────────── */

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

/* ── Sidebar ──────────────────────────────────────────────────────────── */

.sidebar {
  position: sticky; top: 0; align-self: start;
  height: 100vh; overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--bg);
  padding: 18px 0 32px;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 0 20px 18px; }
.brand img { width: 26px; height: 26px; object-fit: contain; border-radius: 6px; }
.brand-name { font-family: var(--head); font-weight: 600; font-size: 15px; color: var(--text); line-height: 1.2; }
.brand-sub { font-size: 11px; color: var(--text-dim); }

.search-wrap { padding: 0 16px 20px; }
.search {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 10px;
  background: var(--bg-raise); border: 1px solid var(--line);
  border-radius: 8px; color: var(--text-muted);
  font-family: var(--sans); font-size: 13px;
}
.search input {
  flex: 1; min-width: 0; background: none; border: 0; outline: none;
  color: var(--text); font-family: var(--sans); font-size: 13px;
}
.search input::placeholder { color: var(--text-dim); }
.search kbd {
  font-family: var(--sans); font-size: 10px; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px;
}

.nav-group { padding: 0 8px; margin-bottom: 2px; }
.nav-group > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 12px; border-radius: 7px;
  font-family: var(--sans); font-size: 11.5px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim);
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover { background: var(--bg-raise); color: var(--text-muted); }
.nav-group > summary .chev { font-style: normal; font-size: 15px; line-height: 1;
  transition: transform .15s ease; color: var(--text-dim); }
.nav-group[open] > summary { color: var(--text-muted); }
.nav-group[open] > summary .chev { transform: rotate(90deg); }
.nav-group > a { margin-left: 6px; }
/* One line per entry, always. If a label is ever long enough to wrap it gets
   truncated instead — a nav that reflows to three lines per item stops being
   scannable, which is the whole job of a nav. */
.nav-group a {
  display: block; padding: 5px 12px; border-radius: 7px;
  font-size: 13.2px; color: var(--text-muted); line-height: 1.5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-group a:hover { background: var(--bg-raise); color: var(--text); text-decoration: none; }
.nav-group a.active { background: var(--accent-soft); color: var(--accent); font-weight: 500; }

/* ── Main ─────────────────────────────────────────────────────────────── */

.main { display: grid; grid-template-columns: minmax(0, 1fr) var(--rail-w); gap: 40px; padding: 0 44px; }
@media (max-width: 1180px) { .main { grid-template-columns: minmax(0, 1fr); } .rail { display: none; } }

.topbar {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 22px;
  height: 56px; border-bottom: 1px solid var(--line);
  margin: 0 -44px 0; padding: 0 44px;
  position: sticky; top: 0; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px); z-index: 20;
}
.topbar a { font-size: 13.5px; color: var(--text-muted); padding: 4px 0; }
.topbar a.active { color: var(--text); font-weight: 500; box-shadow: inset 0 -2px 0 var(--accent); }

.article { padding: 34px 0 96px; min-width: 0; }
.eyebrow { font-size: 12.5px; font-weight: 600; color: var(--accent); margin: 0 0 10px; }

h1 { font-family: var(--head); font-size: 36px; font-weight: 600; line-height: 1.18;
     letter-spacing: -.015em; color: var(--text-head); margin: 0 0 14px; text-wrap: balance; }
h2 { font-family: var(--head); font-size: 22px; font-weight: 600; line-height: 1.3;
     color: var(--text-head); margin: 44px 0 12px; scroll-margin-top: 80px; }
h3 { font-family: var(--head); font-size: 16.5px; font-weight: 600; color: var(--text-head); margin: 28px 0 8px; }

p  { margin: 0 0 15px; max-width: var(--measure); color: #c9ccd1; }
.lead { font-size: 17px; color: var(--text-muted); max-width: var(--measure); margin-bottom: 26px; }
strong { color: var(--text); font-weight: 700; }

/* ── Numbered steps — their circled-number pattern ────────────────────── */

ol.steps { list-style: none; counter-reset: s; margin: 20px 0 26px; padding: 0; max-width: var(--measure); }
ol.steps li { counter-increment: s; position: relative; padding-left: 40px; margin-bottom: 16px; color: #c9ccd1; }
ol.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 1px;
  width: 25px; height: 25px; border-radius: 99px;
  background: var(--bg-raise); border: 1px solid var(--line);
  color: var(--text-muted); font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}

/* ── Glossary — "what each control does" ─────────────────────────────── */

ul.glossary { list-style: none; margin: 18px 0 26px; padding: 0; max-width: var(--measure); }
ul.glossary li { padding: 10px 0; border-bottom: 1px solid var(--line-soft); color: #c9ccd1; }
ul.glossary li:last-child { border-bottom: 0; }
ul.glossary b { color: var(--text); }

/* ── Callouts ─────────────────────────────────────────────────────────── */

.callout { border-radius: 10px; padding: 14px 16px; margin: 22px 0; max-width: var(--measure);
           border: 1px solid var(--line); background: var(--bg-raise); }
.callout p { margin: 0; color: #c9ccd1; }
.callout .label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .07em;
                  text-transform: uppercase; margin-bottom: 5px; }
.callout.note    { border-color: var(--accent-line); background: var(--accent-soft); }
.callout.note .label { color: var(--accent); }
.callout.caution { border-color: rgba(224,176,84,.4); background: var(--warn-soft); }
.callout.caution .label { color: var(--warn); }

/* ── Screenshots ──────────────────────────────────────────────────────── */

figure.shot { margin: 26px 0 30px; }
figure.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; }
figure.shot figcaption { margin-top: 9px; font-size: 13px; color: var(--text-dim); }

/* ── Screen figures ───────────────────────────────────────────────────────
   Drawn diagrams of a screen. Styled as a diagram on purpose — flat fills and
   grey placeholder bars instead of fake data — so nobody mistakes one for a
   photograph of their own account and wonders why the numbers differ. */

.fig { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg-card); }
.fig-chrome { display: flex; align-items: center; gap: 6px; padding: 8px 12px;
  background: var(--bg-raise); border-bottom: 1px solid var(--line); }
.fig-chrome i { width: 8px; height: 8px; border-radius: 99px; background: #3a3f45; }
.fig-url { margin-left: 8px; font-family: var(--mono); font-size: 11px; color: var(--text-dim); }

.fig-body { display: grid; grid-template-columns: 148px minmax(0, 1fr); min-height: 190px; }
@media (max-width: 620px) { .fig-body { grid-template-columns: minmax(0, 1fr); } .fig-menu { display: none; } }

.fig-menu { margin: 0; padding: 10px 8px; list-style: none; border-right: 1px solid var(--line);
  background: var(--bg); }
.fig-menu li { font-size: 11.5px; color: var(--text-dim); padding: 4px 8px; border-radius: 5px; line-height: 1.5; }
.fig-menu li.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.fig-menu.hl { outline: 3px solid #e5484d; outline-offset: -3px; border-radius: 0 0 0 10px; }

.fig-main { padding: 14px 16px; min-width: 0; }
.fig-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.fig-head b { font-family: var(--head); font-size: 15px; color: var(--text-head); }
.fig-actions { display: flex; gap: 6px; }
.fig-btn { font-size: 11px; padding: 4px 10px; border-radius: 6px; white-space: nowrap;
  background: var(--bg-raise); border: 1px solid var(--line); color: var(--text-muted); }
.fig-btn.hl { outline: 3px solid #e5484d; outline-offset: 3px; background: var(--accent); border-color: var(--accent); color: #fff; }

.fig-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 11px; }
.fig-tab { font-size: 10.5px; padding: 3px 9px; border-radius: 99px;
  border: 1px solid var(--line); color: var(--text-dim); white-space: nowrap; }
.fig-tab.on { background: var(--bg-raise); color: var(--text-muted); }
.fig-tab.hl { outline: 3px solid #e5484d; outline-offset: 3px; background: var(--accent); border-color: var(--accent); color: #fff; }

.fig-fields { display: grid; gap: 8px; max-width: 340px; }
.fig-field span { display: block; font-size: 10.5px; color: var(--text-dim); margin-bottom: 3px; }
.fig-field i { display: block; height: 22px; border-radius: 6px;
  background: var(--bg); border: 1px solid var(--line); }
.fig-field.hl i { outline: 3px solid #e5484d; outline-offset: 2px; border-color: var(--accent); }
.fig-field.hl span { color: var(--accent); font-weight: 600; }

.fig-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.fig-table th { text-align: left; padding: 6px 8px; color: var(--text-dim); font-weight: 600;
  border-bottom: 1px solid var(--line); white-space: nowrap; }
.fig-table td { padding: 7px 8px; border-bottom: 1px solid var(--line-soft); }
.fig-table .ph { display: block; height: 7px; border-radius: 99px; background: #2a2f35; }
.fig-table tr:nth-child(2n) .ph { opacity: .6; }
.fig-note { margin: 10px 0 0; font-size: 11.5px; color: var(--text-dim); }
.fig-tag { display: inline-block; margin-left: 6px; font-size: 10px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-dim); border: 1px solid var(--line);
  border-radius: 4px; padding: 1px 5px; vertical-align: 1px; }

/* Placeholder shown until the real capture is dropped in. Deliberately loud —
   an un-filled slot must never be mistaken for a finished page. */
.shot-missing {
  border: 1px dashed var(--line); border-radius: 10px; background: var(--bg-raise);
  padding: 26px; text-align: center;
}
.shot-missing .t { font-size: 13px; font-weight: 600; color: var(--warn); }
.shot-missing .r { font-family: var(--mono); font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.shot-missing .h { font-size: 12.5px; color: var(--text-muted); margin-top: 8px; }

/* ── Cards (home page) ────────────────────────────────────────────────── */

.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 26px 0 10px; }
.card { display: block; border: 1px solid var(--line); background: var(--bg-card);
        border-radius: 12px; padding: 18px; color: inherit; }
.card:hover { border-color: var(--accent-line); text-decoration: none; }
.card h3 { margin: 10px 0 6px; }
.card p { font-size: 13.5px; color: var(--text-muted); margin: 0; }
.card .ic { width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft);
            color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 15px; }

/* ── Right rail ───────────────────────────────────────────────────────── */

.rail { padding: 34px 0; position: sticky; top: 56px; align-self: start; height: max-content; }
.rail h5 { margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .07em;
           text-transform: uppercase; color: var(--text-dim); }
.rail a { display: block; font-size: 13px; color: var(--text-muted); padding: 4px 0; line-height: 1.45; }
.rail a:hover { color: var(--text); text-decoration: none; }

/* ── Feedback ─────────────────────────────────────────────────────────── */

.feedback { margin-top: 40px; padding: 13px 16px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--bg-raise); font-size: 13.5px;
  color: var(--text-muted); max-width: var(--measure); }
.feedback a { margin-left: 8px; font-weight: 600; }

/* ── Cross-links ──────────────────────────────────────────────────────── */

.app-link { display: inline-flex; align-items: center; gap: 6px; margin: -8px 0 22px;
  font-size: 13px; font-weight: 600; color: var(--accent);
  border: 1px solid var(--accent-line); background: var(--accent-soft);
  border-radius: 8px; padding: 7px 13px; }
.app-link:hover { text-decoration: none; border-color: var(--accent); }

.related { margin-top: 48px; max-width: var(--measure); }
.related h5 { margin: 0 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-dim); }
.rel-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.rel-grid a { display: block; border: 1px solid var(--line); background: var(--bg-card);
  border-radius: 10px; padding: 12px 14px; }
.rel-grid a:hover { border-color: var(--accent-line); text-decoration: none; }
.rel-grid span { display: block; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 4px; }
.rel-grid b { font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.4; }

/* ── Prev / next ──────────────────────────────────────────────────────── */

.pager { display: flex; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); max-width: var(--measure); }
.pager a { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--bg-card); }
.pager a:hover { border-color: var(--accent-line); text-decoration: none; }
.pager span { display: block; font-size: 11px; color: var(--text-dim); }
.pager b { font-size: 14px; color: var(--text); font-weight: 600; }

/* ── Mobile ───────────────────────────────────────────────────────────── */

.menu-btn { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 86vw; max-width: 320px; z-index: 60;
             transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0;
              color: var(--text); font-family: var(--sans); font-size: 14px; cursor: pointer; }
  .main { padding: 0 18px; }
  .topbar { margin: 0 -18px; padding: 0 18px; gap: 16px; }
  h1 { font-size: 28px; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 50; }
}

/* ── Search results ───────────────────────────────────────────────────── */

.results { position: absolute; z-index: 80; left: 16px; right: 16px; top: 74px;
           background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px;
           overflow: hidden; box-shadow: 0 18px 40px rgba(0,0,0,.5); }
.results a { display: block; padding: 9px 12px; font-size: 13px; color: var(--text); border-bottom: 1px solid var(--line-soft); }
.results a:last-child { border-bottom: 0; }
.results a:hover { background: var(--bg-raise); text-decoration: none; }
.results .s { display: block; font-size: 11.5px; color: var(--text-dim); }
.results .empty { padding: 12px; font-size: 13px; color: var(--text-dim); }
