/* ---------------------------------------------------------------------------
 * docs.css -- the manual. Built on site.css's tokens; nothing here is needed
 * by the front page, and nothing on the front page needs this.
 *
 * The shape: a column of links that stays put, and one column of reading. Every
 * screen in the app appears here as a picture first and a paragraph second,
 * because somebody looking for a screen recognises it before they read it.
 * ------------------------------------------------------------------------- */

.docs-shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px) 120px;
}

/* ---- the column of links --------------------------------------------- */
.docnav {
  position: sticky;
  top: 104px;
  align-self: start;
  max-height: calc(100vh - 128px);
  overflow-y: auto;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.docnav::-webkit-scrollbar { width: 6px; }
.docnav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.16); border-radius: 99px; }

.docnav h4 {
  font-family: var(--display);
  font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--faint); margin: 26px 0 8px; font-weight: 700;
}
.docnav h4:first-child { margin-top: 0; }
.docnav a {
  display: block; padding: 7px 12px; border-radius: 9px;
  color: var(--muted); text-decoration: none; font-size: 14.5px; line-height: 1.35;
  border-left: 2px solid transparent;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.docnav a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.docnav a.here {
  color: var(--text); border-left-color: var(--blue-lift);
  background: linear-gradient(90deg, rgba(44,107,255,0.16), transparent);
}

/* ---- the reading column ----------------------------------------------- */
.docbody { min-width: 0; max-width: 940px; }
.docbody > section { scroll-margin-top: 110px; padding-top: 18px; }
.docbody > section + section { margin-top: clamp(56px, 7vw, 96px); }

.docbody h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -0.03em;
  margin: 0 0 14px; line-height: 1.08;
}
.docbody h3 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(19px, 2.2vw, 24px); letter-spacing: -0.02em;
  margin: clamp(34px, 4vw, 52px) 0 10px;
}
.docbody p { margin: 0 0 14px; max-width: 74ch; color: var(--muted); font-size: 16.5px; line-height: 1.68; }
.docbody p.big { color: var(--text); font-size: 18px; }
.docbody strong, .docbody b { color: var(--text); font-weight: 600; }

.docbody ul { margin: 0 0 16px; padding-left: 0; list-style: none; max-width: 74ch; }
.docbody ul li {
  position: relative; padding-left: 22px; margin-bottom: 9px;
  color: var(--muted); font-size: 16px; line-height: 1.62;
}
.docbody ul li::before {
  content: ""; position: absolute; left: 3px; top: 10px;
  width: 6px; height: 6px; border-radius: 2px; background: var(--blue-lift);
}

/* the remote keys, written the way the screen writes them */
kbd {
  font-family: var(--display); font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.04em; color: var(--text);
  background: rgba(255,255,255,0.07); border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 6px; padding: 2px 7px;
  white-space: nowrap;
}

/* ---- pictures ---------------------------------------------------------- */
.docshot { margin: 22px 0 26px; }
.docshot img {
  width: 100%; border-radius: 14px; border: 1px solid var(--line);
  background: #000; box-shadow: 0 30px 70px -44px rgba(0,0,0,0.95);
  cursor: zoom-in;
}
.docshot figcaption {
  margin-top: 10px; font-size: 14px; color: var(--faint); line-height: 1.55; max-width: 74ch;
}
.docshot figcaption b { color: var(--muted); font-weight: 600; }

/* two or three side by side, for a set that is one idea */
.docgrid { display: grid; gap: 16px; margin: 22px 0 26px; }
.docgrid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.docgrid.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.docgrid .docshot { margin: 0; }
.docgrid figcaption { font-size: 13px; }
/* the October phone captures are 540 x 1042: shown whole, not cut to the older 9:20 frame */
.phones .shot img[height="1042"] { aspect-ratio: 540 / 1042; }

/* ---- a note the reader should not skip --------------------------------- */
.note-card {
  border: 1px solid var(--line); border-left: 2px solid var(--green);
  border-radius: 12px; padding: 16px 20px; margin: 20px 0 24px;
  background: rgba(13,229,147,0.05); max-width: 74ch;
}
.note-card p:last-child { margin-bottom: 0; }
.note-card .lbl {
  display: block; font-family: var(--display); font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--green); margin-bottom: 6px;
}
.note-card.warn { border-left-color: #FFC978; background: rgba(255,201,120,0.05); }
.note-card.warn .lbl { color: #FFC978; }

/* ---- a small table for a reference list -------------------------------- */
/* the table is the one thing allowed to be wider than the column, and only
   inside its own scroller -- the page itself never scrolls sideways. */
.tablewrap { overflow-x: auto; max-width: 100%; margin: 18px 0 24px; -webkit-overflow-scrolling: touch; }
table.ref { width: 100%; border-collapse: collapse; font-size: 15.5px; max-width: 74ch; min-width: 420px; }
table.ref th, table.ref td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.ref th { font-family: var(--display); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
table.ref td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
table.ref td { color: var(--muted); }
table.ref tbody tr:last-child td { border-bottom: 0; }

/* ---- the head of the page ---------------------------------------------- */
.dochead { padding: clamp(40px, 6vw, 84px) clamp(16px, 4vw, 48px) clamp(24px, 3vw, 40px); max-width: 1400px; margin: 0 auto; }
.dochead h1 { font-family: var(--display); font-weight: 700; font-size: clamp(36px, 6vw, 68px); letter-spacing: -0.04em; margin: 14px 0 16px; line-height: 1.02; }
.dochead p { color: var(--muted); font-size: clamp(16px, 1.9vw, 19px); max-width: 62ch; line-height: 1.6; margin: 0; }

/* the strip of jump links above the fold, for a phone where the sidebar hides */
.docjump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.docjump a {
  font-size: 14px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); text-decoration: none;
  background: rgba(255,255,255,0.025);
}
.docjump a:hover { color: var(--text); border-color: rgba(255,255,255,0.22); }

@media (max-width: 960px) {
  /* minmax(0, ...) and not 1fr: a grid track sized 1fr takes its min-content
     width from its widest child, so one wide table pushed the whole page
     sideways at phone width. */
  .docs-shell { grid-template-columns: minmax(0, 1fr); }
  .docnav { display: none; }
}
/* Search keeps results local; no help queries leave this page. */
.manual-results{padding:16px 22px;background:var(--panel);border:1px solid var(--line);border-radius:16px;list-style:none}
.manual-results li{margin:10px 0}.manual-results a{color:var(--text)}
.table-scroll{overflow-x:auto}.table-scroll table{width:100%;border-collapse:collapse}.table-scroll th,.table-scroll td{padding:12px;text-align:left;border-bottom:1px solid var(--line)}
@media(max-width:620px){html{scroll-padding-top:96px}}

/* ---- Get TiviDeck: the two editions side by side ------------------------ */
.docgrid.editions { align-items: stretch; }
.edition {
  border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px 8px;
  background: var(--panel, rgba(255,255,255,0.03)); min-width: 0;
}
.docbody .edition h3 { margin-top: 0; }
.docbody .edition p.edition-where {
  margin: -6px 0 12px; font-family: var(--display); font-size: 12px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--green);
}
.docbody .edition p.edition-note { font-size: 14px; color: var(--faint); }
.docbody .edition ul li { overflow-wrap: break-word; }
