  :root {
    /* Default (GCT) brand colors; overridden per active company below. */
    --blue: #2a4499;
    --blue-dark: #001871;
    --blue-dark-rgb: 0, 24, 113;
    --accent: #b08d4f;
    --ink: #1b2436;
    --muted: #5b6472;
    --line: #d8dce4;
    --sidebar-bg: #f4f6fa;
    --page-bg: #e7eaf0;
  }
  [data-active-company="glt"] {
    --blue: #00a9ce;
    --blue-dark: #007193;
    --blue-dark-rgb: 0, 113, 147;
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    background: var(--page-bg);
    color: var(--ink);
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    line-height: 1.55;
    font-size: 16px;
  }
  a:focus-visible, summary:focus-visible, button:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
    border-radius: 4px;
  }

  .layout {
    max-width: 78rem;
    margin: 0 auto 1.5rem;
    display: grid;
    grid-template-columns: 17rem 1fr;
    align-items: start;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 10px 28px rgba(0,0,0,.06);
  }

  .company-switch {
    max-width: 78rem;
    margin: 1.5rem auto 0;
    display: flex;
    gap: .6rem;
    padding: 0 0;
  }
  .company-tab {
    flex: 1 1 0;
    cursor: pointer;
    border: 1px solid var(--line);
    border-bottom: none;
    background: #fff;
    color: var(--muted);
    font-weight: 700;
    font-size: .85rem;
    padding: .9rem 1rem;
    border-radius: 10px 10px 0 0;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  }
  .company-tab:hover { color: var(--blue-dark); }
  .company-tab.active {
    background: linear-gradient(100deg, var(--blue-dark) 0%, var(--blue) 130%);
    color: #fff;
    border-color: var(--blue-dark);
  }
  [data-active-company="gct"] [data-company="glt"] { display: none !important; }
  [data-active-company="glt"] [data-company="gct"] { display: none !important; }
  @media (max-width: 900px) {
    .company-switch { margin-top: 1rem; }
    .company-tab { font-size: .78rem; padding: .75rem .6rem; }
  }
  @media print { .company-switch { display: none; } }

  nav.toc {
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: auto;
    padding: 1.75rem 1rem 3rem 1.3rem;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--line);
    font-size: .9rem;
  }
  details.toc-section {
    margin: 0 0 .4rem;
  }
  details.toc-section + details.toc-section {
    margin-top: .9rem;
    padding-top: .9rem;
    border-top: 1px solid var(--line);
  }
  details.toc-section summary.toc-title {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: .55rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(100deg, var(--blue-dark) 0%, var(--blue) 130%);
    text-transform: uppercase;
    letter-spacing: .03em;
    font-size: .74rem;
    margin: 0 0 .55rem;
    padding: .6rem .7rem;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(var(--blue-dark-rgb),.18);
    transition: filter .12s ease;
  }
  details.toc-section summary.toc-title:hover { filter: brightness(1.08); }
  details.toc-section summary.toc-title::-webkit-details-marker { display: none; }
  .toc-icon { flex: 0 0 auto; display: flex; }
  .toc-icon svg { width: 15px; height: 15px; display: block; }
  .toc-label { flex: 1 1 auto; }
  .toc-chevron {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .18s ease;
  }
  .toc-chevron svg { width: 12px; height: 12px; }
  details.toc-section:not([open]) .toc-chevron { transform: rotate(-90deg); }
  ol.toc-list { list-style: none; margin: 0 0 .2rem; padding: 0; }
  ol.toc-list li { margin: 0; }
  ol.toc-list li a {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    padding: .42rem .5rem;
    margin: 1px 0;
    border-radius: 7px;
    color: var(--muted);
    text-decoration: none;
    line-height: 1.35;
    transition: background-color .15s ease, color .15s ease;
  }
  ol.toc-list li.depth-1 a { padding-left: 1.55rem; font-size: .84rem; }
  ol.toc-list li.depth-1 a .toc-num {
    width: 6px; height: 6px; min-width: 6px; border-radius: 50%;
    background: var(--blue); color: transparent; font-size: 0;
    margin-top: .55rem;
  }
  ol.toc-list li a:hover { background: #e3eaf6; color: var(--blue-dark); }
  ol.toc-list li a.active { background: #dfe8f7; color: var(--blue-dark); font-weight: 700; }
  .toc-num {
    flex: 0 0 auto;
    min-width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-dark);
    background: #dfe6f4;
    border-radius: 50%;
    font-weight: 700;
    font-size: .72rem;
    margin-top: .05rem;
  }
  ol.toc-list li a:hover .toc-num { background: var(--blue); color: #fff; }

  main { min-width: 0; }
  .sheet {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 3.2rem 4rem;
  }
  .banner {
    width: 100%;
    display: block;
    margin: 0 0 2rem;
  }
  section.part { padding-top: 0; }
  section.part + section.part { margin-top: 3.5rem; }

  h1.part-title {
    display: none; /* the real letterhead banner already carries the title */
  }
  h2 {
    color: var(--ink);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 1.05rem;
    letter-spacing: .02em;
    margin: 2.2rem 0 .8rem;
    scroll-margin-top: 1rem;
    padding-left: .75rem;
    border-left: 4px solid var(--blue);
  }
  h2 + p, h2 + ul { margin-top: 0; }
  p {
    margin: 0 0 .85rem;
    color: var(--ink);
  }
  ul { margin: 0 0 .95rem; padding-left: 1.3rem; }
  li { margin-bottom: .3rem; }
  strong { font-weight: 700; }
  a { color: var(--blue); }
  table {
    border-collapse: collapse;
    width: 100%;
    margin: .75rem 0 1.4rem;
    font-size: .92rem;
  }
  table th, table td {
    border: 1px solid #b6bcc7;
    padding: .45rem .55rem;
    text-align: left;
    vertical-align: top;
  }
  table th { background: var(--sidebar-bg); color: var(--blue-dark); }
  hr { border: none; border-top: 1px solid var(--line); margin: 1.5rem 0; }
  blockquote {
    margin: 1.5rem 0;
    padding: .9rem 1.2rem;
    border-left: 4px solid var(--accent);
    background: #faf7f1;
  }
  blockquote p:last-child { margin-bottom: 0; }

  footer.page {
    max-width: 880px;
    margin: 2rem auto 0;
    padding: 1.2rem 3.2rem 2.5rem;
    color: var(--muted);
    font-size: .78rem;
    border-top: 1px solid var(--line);
  }

  details.toc-toggle { display: none; }

  @media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }
    nav.toc { display: none; }
    details.toc-toggle {
      display: block;
      background: var(--sidebar-bg);
      border-bottom: 1px solid var(--line);
    }
    details.toc-toggle summary {
      cursor: pointer;
      padding: .9rem 1.1rem;
      font-weight: 700;
      color: var(--blue-dark);
      font-size: .88rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      list-style: none;
      transition: background-color .15s ease;
    }
    details.toc-toggle summary::-webkit-details-marker { display: none; }
    details.toc-toggle summary:hover { background: #eef1f7; }
    details.toc-toggle summary::after {
      content: "";
      width: 9px; height: 9px;
      border-right: 2px solid var(--blue-dark);
      border-bottom: 2px solid var(--blue-dark);
      transform: rotate(45deg);
      transition: transform .18s ease;
      flex: 0 0 auto;
    }
    details.toc-toggle[open] summary::after { transform: rotate(-135deg); }
    nav.toc-inner { padding: 0 1.1rem 1.3rem; }
    .sheet { padding: 0 1.1rem 3rem; }
    footer.page { padding: 1rem 1.1rem 2rem; }
  }

  @media print {
    body { background: #fff; }
    nav.toc, details.toc-toggle, .back-to-top { display: none; }
    .layout { grid-template-columns: 1fr; }
  }

  .back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--blue-dark);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0,0,0,.25);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease, background-color .15s ease;
    z-index: 40;
  }
  .back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .back-to-top:hover { background: var(--blue); }
  .back-to-top svg { width: 18px; height: 18px; }

  .reading-progress {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 4px;
    z-index: 60;
    background: rgba(0,0,0,.06);
  }
  .reading-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--blue-dark), var(--blue));
  }
  @media print { .reading-progress { display: none; } }

  .toc-search { padding: 0 0 .8rem; }
  .toc-search input {
    width: 100%;
    padding: .55rem .7rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: .82rem;
    font-family: inherit;
    color: var(--ink);
  }
