/* ──────────────────────────────────────────────────────────────────────────────
   TumbleTracker user manual — stylesheet for manual/admin/ and manual/staff/.

   The first three blocks (Reset & Base, Layout, Nav, Buttons, Footer) are copied
   VERBATIM from landing/index.html's inline <style> (lines 17-105 and 269-288,
   dedented) so the manual's header, footer, type and colours are the same as the
   marketing site. Change them there first, then re-copy — never diverge.
   Everything below "Manual layout" belongs to the manual only.
   ────────────────────────────────────────────────────────────────────────────── */

/* ── Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --navy: #1b3a5c;
  --navy-dark: #142d48;
  --navy-light: #e8eef4;
  --teal: #2e6da4;
  --teal-dark: #245a8a;
  --teal-light: #eaf2fa;
  --green: #059669;
  --green-light: #dcfce7;
  --text: #1f2937;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --surface: #f7f6f2;
  --white: #ffffff;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.07);
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Satoshi", system-ui, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
h4 {
  font-family: "Satoshi", system-ui, sans-serif;
  line-height: 1.2;
}
a {
  color: var(--teal);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
/* A link inside running text must not rely on colour alone (WCAG 1.4.1; axe link-in-text-block):
   the manual's body links and the footer's credit link are underlined. */
.chapter p a,
.chapter li a,
.chapter .tip a,
.chapter .warn a,
.footer-desc a {
  text-decoration: underline;
}

/* ── Layout ── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding: 96px 0;
}
.section-sm {
  padding: 64px 0;
}

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
/* The logo is a picture (manual/brand/, copies of the master set in brand/); its name is in the artwork. */
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.nav-logo:hover {
  text-decoration: none;
}
.nav-logo img {
  height: 32px;
  width: auto;
  display: block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}
.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}
.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none !important;
  border: none;
  font-family: "Satoshi", system-ui, sans-serif;
}
.btn-primary {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 2px 8px rgba(27, 58, 92, 0.3);
}
.btn-primary:hover {
  background: var(--navy-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27, 58, 92, 0.4);
}
.btn-secondary {
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--surface);
  transform: translateY(-1px);
}
.btn-teal {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 2px 8px rgba(46, 109, 164, 0.3);
}
.btn-teal:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46, 109, 164, 0.4);
}
.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
  border-radius: 10px;
}
.btn-xl {
  padding: 16px 32px;
  font-size: 1.05rem;
  border-radius: 10px;
}
.btn-white {
  background: #fff;
  color: var(--navy);
}
.btn-white:hover {
  background: var(--navy-light);
}
.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
}
.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ── Footer ── */
footer {
  background: var(--navy);
  color: #9ca3af;
  padding: 64px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand {
  margin-bottom: 16px;
}
.footer-brand img {
  height: 30px;
  width: auto;
  display: block;
}
.footer-desc {
  font-size: 0.875rem;
  line-height: 1.7;
  max-width: 320px;
}
.footer-col h4 {
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col ul a {
  font-size: 0.875rem;
  color: #9ca3af;
}
.footer-col ul a:hover {
  color: #fff;
  text-decoration: none;
}
.footer-bottom {
  border-top: 1px solid #2a4f73;
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom-text {
  font-size: 0.8rem;
}

/* ── Manual layout ── */
body {
  background: var(--white);
}
.manual {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 24px 96px;
}
.manual-menu {
  position: sticky;
  top: 88px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.manual-menu h2 {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.manual-menu ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.manual-menu a {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
}
.manual-menu a:hover {
  background: var(--surface);
  text-decoration: none;
}
.manual-menu a.current {
  background: var(--teal-light);
  color: var(--navy);
  font-weight: 600;
}
.manual-menu select {
  display: none;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}
.manual-head {
  margin-bottom: 40px;
}
.manual-head h1 {
  font-size: 2.25rem;
  color: var(--navy);
  margin-bottom: 8px;
}
.manual-head p {
  color: var(--text-muted);
  margin-bottom: 20px;
}
.manual-head .actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.chapter {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 80px;
}
.chapter h2 {
  font-size: 1.75rem;
  color: var(--navy);
  margin-bottom: 8px;
}
.chapter h2 .num {
  color: var(--teal);
  margin-right: 10px;
}
.chapter h3 {
  font-size: 1.15rem;
  color: var(--navy);
  margin: 32px 0 12px;
  scroll-margin-top: 80px;
}
.chapter p,
.chapter li {
  font-size: 1rem;
}
.chapter p {
  margin-bottom: 14px;
}
.task {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  margin: 16px 0 28px;
}
.task ol {
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.task ol li::marker {
  color: var(--teal);
  font-weight: 700;
}
.shot {
  margin: 0;
}
.shot img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  background: var(--white);
}
.shot figcaption {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}
/* A tall portrait shot (e.g. the sidebar) towers over its step list in the half-width
   .task column. Cap it to roughly the height of the steps beside it; width/height stay
   auto so the image never distorts, just shrinks and centres. */
.shot--tall img {
  width: auto;
  height: auto;
  max-height: 420px;
  max-width: 100%;
  margin: 0 auto;
}
.tip,
.warn {
  padding: 14px 18px;
  border-radius: 8px;
  margin: 16px 0;
  font-size: 0.95rem;
  border-left: 4px solid;
}
.tip {
  background: var(--teal-light);
  border-color: var(--navy);
}
.warn {
  background: #fef3c7;
  border-color: #b45309;
}
.where {
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.where b {
  color: var(--text);
}
kbd,
.ui {
  font-weight: 600;
  color: var(--navy);
}
.roles {
  display: inline-flex;
  gap: 6px;
  margin-left: 8px;
  vertical-align: middle;
}
.roles span {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--navy-light);
  color: var(--navy);
  font-weight: 600;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  background: #fff;
  padding: 8px 12px;
  z-index: 200;
}
.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 12px 0 24px;
}
.ref-table th,
.ref-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.ref-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
@media (max-width: 900px) {
  .manual {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 16px 64px;
  }
  .manual-menu {
    position: static;
    max-height: none;
  }
  .manual-menu ol {
    display: none;
  }
  .manual-menu select {
    display: block;
  }
  .task {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
  /* same as the landing site's responsive footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  /* same as the landing site's responsive footer */
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
/* ── Print (the PDF is this page printed) ── */
@media print {
  /* A page number, bottom centre, on every printed page (spec §3; final review 2026-09-23). */
  @page {
    size: A4;
    margin: 18mm 16mm;
    @bottom-center {
      content: counter(page);
      font:
        9pt Satoshi,
        sans-serif;
      color: #6b7280;
    }
  }
  /* The on-screen page heading repeats the title page word for word; printing it made page 2
     a heading and nothing else (Task 7 re-open, 2026-09-22). */
  nav,
  footer,
  .manual-menu,
  .manual-head,
  .skip {
    display: none !important;
  }
  body {
    background: #fff;
  }
  .manual {
    display: block;
    padding: 0;
    max-width: none;
  }
  .title-page {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    min-height: 240mm;
    page-break-after: always;
  }
  .chapter {
    page-break-before: always;
    border-top: 0;
    padding: 0 0 24px;
  }
  .chapter:first-of-type {
    page-break-before: auto;
  }
  /* Chrome cannot fragment a grid across a page break, so a two-column task moved whole to the
     next page and left the previous one half blank. In print a task is block flow: the steps, then
     the picture under them at reduced width (Task 7 re-open, 2026-09-22). */
  .task {
    display: block;
  }
  .task ol {
    display: block;
    margin-bottom: 10px;
  }
  .task ol li {
    margin-bottom: 6px;
  }
  .task .shot {
    max-width: 78%;
    margin: 0 auto 8px;
  }
  .task .shot img {
    max-height: 150mm;
    width: auto;
    max-width: 100%;
    display: block;
    margin: 0 auto;
  }
  .shot img {
    box-shadow: none;
  }
  h2,
  h3 {
    page-break-after: avoid;
  }
  figure,
  .tip,
  .warn,
  tr {
    page-break-inside: avoid;
  }
  /* Orphan pages (final review 2026-09-23): an unbreakable callout or figure pushed to the next
     page used to leave the one-line "Where to find it" (or the callout itself) alone on a
     near-blank page. Keep a callout or the closing line with what comes before it, and a figure
     with what follows. */
  .where,
  .tip,
  .warn {
    break-before: avoid;
  }
  figure {
    break-after: avoid;
  }
  a {
    color: var(--text);
    text-decoration: none;
  }
}
.title-page {
  display: none;
}

/* Were inline style="" attributes in src/shell.html (item 38, 2026-10-01: the landing linter allows none). */
.title-logo img {
  height: 52px;
  width: auto;
  display: block;
}
.title-page h1.title-name {
  font-size: 2.5rem;
  color: var(--navy);
  margin: 24px 0 8px;
}
.title-sub {
  color: var(--text-muted);
}
.footer-link {
  color: #7eb8e0;
}
