:root {
  --color-navy: #17365d;
  --color-blue: #2f75b5;
  --color-teal: #1f8a70;
  --color-orange: #e08a1e;
  --color-red: #c94b4b;
  --color-ink: #233142;
  --color-muted: #5b6573;
  --color-line: #d9e2ec;
  --color-background: #f4f7fb;
  --color-surface: #ffffff;
  --color-soft-blue: #eaf2fa;
  --color-soft-teal: #e9f5f1;
  --color-soft-orange: #fff4e5;
  --color-soft-red: #fcecec;
  --canvas: var(--color-background);
  --paper: var(--color-surface);
  --ink: var(--color-ink);
  --muted: var(--color-muted);
  --line: var(--color-line);
  --line-strong: #b8c9d9;
  --sidebar: var(--color-navy);
  --sidebar-muted: #c5d6e6;
  --accent: var(--color-blue);
  --accent-soft: var(--color-soft-blue);
  --teal: var(--color-teal);
  --teal-soft: var(--color-soft-teal);
  --amber-soft: var(--color-soft-orange);
  --code-bg: #eef4fa;
  --shadow: 0 16px 44px rgba(23, 54, 93, 0.13);
  --shadow-card: 0 6px 18px rgba(23, 54, 93, 0.05);
  --shadow-elevated: 0 12px 32px rgba(23, 54, 93, 0.10);
  --shadow-chat: 0 18px 48px rgba(23, 54, 93, 0.18);
  --sidebar-width: 19rem;
  --radius-small: 12px;
  --radius-card: 18px;
  --radius-chat: 20px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--canvas);
  background-image:
    linear-gradient(rgba(23, 54, 93, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 54, 93, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--color-teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--color-orange);
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.85rem;
  color: var(--paper);
  background: var(--sidebar);
  border-radius: 10px;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.toc-panel {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  color: var(--paper);
  background: linear-gradient(180deg, #102c4d 0%, var(--color-navy) 58%, #214e7b 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.toc-brand {
  display: grid;
  grid-template-columns: 5.4rem 1fr;
  gap: 0.8rem;
  align-items: center;
  min-height: 6.2rem;
  padding: 1.25rem 1.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.brand-mark {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  color: var(--paper);
  background: linear-gradient(135deg, var(--color-blue), var(--color-teal));
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
  font-size: 0.9rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.toc-brand > div strong,
.toc-brand > div span {
  display: block;
}

.brand-logo {
  display: grid;
  width: 5.4rem;
  height: 2.75rem;
  place-items: center;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.brand-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.toc-brand strong {
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.25;
}

.toc-brand > div span {
  margin-top: 0.2rem;
  color: var(--sidebar-muted);
  font-size: 0.75rem;
  line-height: 1.3;
}

.toc-label {
  margin: 1.2rem 1.4rem 0.6rem;
  color: var(--sidebar-muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.toc-nav {
  min-height: 0;
  padding: 0 0.65rem 1rem;
  overflow-y: auto;
  scrollbar-color: #6d8aa6 transparent;
  scrollbar-width: thin;
}

.toc-nav a {
  display: block;
  padding: 0.58rem 0.75rem;
  color: var(--sidebar-muted);
  border-left: 3px solid transparent;
  border-radius: 0 10px 10px 0;
  font-size: 0.79rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.toc-nav a:hover,
.toc-nav a[aria-current="true"] {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.09);
  border-left-color: var(--color-teal);
}

.toc-footer {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding: 1rem 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.final-state {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  color: #e9f5f1;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.final-state::before {
  width: 0.55rem;
  height: 0.55rem;
  background: #56b895;
  border-radius: 50%;
  content: "";
}

.text-button {
  padding: 0.45rem 0.7rem;
  color: inherit;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 999px;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}

.text-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.workspace {
  min-width: 0;
  margin-left: var(--sidebar-width);
  padding: 2.25rem clamp(1.25rem, 4vw, 4.5rem) 4rem;
}

.mobile-bar,
.nav-backdrop {
  display: none;
}

.report-document {
  width: min(100%, 78rem);
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.report-cover {
  position: relative;
  min-height: 23rem;
  padding: clamp(2.5rem, 6vw, 5.5rem) clamp(1.5rem, 7vw, 6rem) 3.5rem;
  overflow: hidden;
  color: var(--paper);
  background:
    linear-gradient(135deg, rgba(16, 44, 77, 0.98), rgba(33, 78, 123, 0.98) 58%, rgba(47, 117, 181, 0.98)),
    var(--sidebar);
}

.report-cover::before {
  position: absolute;
  top: -100px;
  right: -80px;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  content: "";
}

.report-cover::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 0.55rem;
  height: 100%;
  background: var(--color-teal);
  content: "";
}

.cover-kicker {
  position: relative;
  z-index: 1;
  margin: 0 0 1.1rem;
  color: #cde4f7;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.report-cover__identity {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: 0 0 1.45rem;
}

.report-cover__identity img {
  display: block;
  width: min(16rem, 100%);
  height: 5.5rem;
  object-fit: cover;
  object-position: center;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 16px;
  box-shadow: 0 12px 24px rgba(8, 25, 48, 0.24);
}

.report-cover__identity span {
  color: #dcecff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.report-cover h1 {
  position: relative;
  z-index: 1;
  max-width: 18ch;
  margin: 0 0 2.25rem;
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  font-weight: 950;
  line-height: 1.04;
  text-wrap: balance;
}

.report-cover > p:last-of-type {
  position: relative;
  z-index: 1;
  max-width: 55rem;
  margin: 0;
  padding-top: 1.35rem;
  color: #edf6ff;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 0.92rem;
  line-height: 1.85;
}

.report-cover strong {
  color: var(--paper);
}

.report-cover code {
  color: #dcecff;
  background: rgba(255, 255, 255, 0.12);
}

.cover-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 55rem;
  margin-top: 1.4rem;
}

.cover-stat {
  display: grid;
  gap: 2px;
  min-height: 90px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
}

.cover-stat span {
  color: #dcecff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cover-stat strong {
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  line-height: 1.1;
}

.cover-stat small {
  color: #edf6ff;
  font-size: 0.78rem;
}

.report-content {
  padding: 1rem clamp(1.5rem, 7vw, 6rem) 5rem;
}

.report-content > h2 {
  margin: 4.5rem 0 1.6rem;
  padding-top: 1.25rem;
  color: var(--color-navy);
  border-top: 2px solid var(--line-strong);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 900;
  line-height: 1.2;
  text-wrap: balance;
}

.report-content > h2::before {
  display: block;
  width: 3.2rem;
  height: 0.32rem;
  margin: -1.42rem 0 1.15rem;
  background: linear-gradient(90deg, var(--color-blue), var(--color-teal));
  border-radius: 999px;
  content: "";
}

.report-content > h3 {
  margin: 2.25rem 0 0.75rem;
  color: var(--color-teal);
  font-size: 1.22rem;
  font-weight: 900;
  line-height: 1.35;
}

.report-content p,
.report-content ul {
  max-width: 78ch;
}

.report-content p {
  margin: 0.85rem 0;
}

.report-content ul {
  padding-left: 1.35rem;
}

.report-content li {
  margin: 0.38rem 0;
  padding-left: 0.25rem;
}

.report-content li::marker {
  color: var(--color-teal);
}

strong {
  color: #18201e;
}

code {
  padding: 0.12em 0.34em;
  color: #1f466d;
  background: var(--code-bg);
  border-radius: 5px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.88em;
  overflow-wrap: anywhere;
}

.table-scroll {
  width: 100%;
  margin: 1.5rem 0 2.25rem;
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

table {
  width: 100%;
  min-width: 50rem;
  border-collapse: collapse;
  font-size: 0.79rem;
  line-height: 1.4;
}

th,
td {
  padding: 0.68rem 0.72rem;
  text-align: left;
  vertical-align: top;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

th:last-child,
td:last-child {
  border-right: 0;
}

thead th {
  color: var(--paper);
  background: var(--color-navy);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tbody tr:nth-child(even) {
  background: #f8fafc;
}

tbody tr:hover {
  background: var(--color-soft-blue);
}

td:first-child {
  font-weight: 800;
}

td[data-tone="critical"] {
  color: #8d2d20;
  background: var(--color-soft-red);
  font-weight: 900;
}

td[data-tone="high"] {
  color: #764d08;
  background: var(--color-soft-orange);
  font-weight: 900;
}

td[data-tone="phase"] {
  color: #125854;
  background: var(--color-soft-teal);
  font-weight: 900;
}

.section-anchor {
  color: inherit;
  text-decoration: none;
}

.section-anchor:hover {
  color: var(--color-blue);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.report-footer {
  display: flex;
  width: min(100%, 78rem);
  gap: 0.9rem;
  align-items: center;
  margin: 1.15rem auto 0;
  padding: 0 0 1rem;
}

.report-footer img {
  display: block;
  width: 10rem;
  height: 4rem;
  object-fit: cover;
  object-position: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}

.report-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.chatbot {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: min(380px, calc(100vw - 24px));
  font-size: 0.94rem;
}

.chatbot__toggle {
  padding: 14px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--color-navy), var(--color-blue));
  border: 0;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-elevated);
  font-weight: 950;
  cursor: pointer;
}

.chatbot__panel {
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(23, 54, 93, 0.16);
  border-radius: var(--radius-chat);
  box-shadow: var(--shadow-chat);
}

.chatbot__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--color-navy), var(--color-blue));
}

.chatbot__header .eyebrow {
  margin: 0;
  color: #dcecff;
  font-size: 0.72rem;
}

.chatbot__header h2 {
  margin: 2px 0 0;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
}

.chatbot__close {
  width: 32px;
  height: 32px;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  font-size: 1.25rem;
  cursor: pointer;
}

.chatbot__body {
  display: grid;
  gap: 12px;
  max-height: 70vh;
  padding: 14px;
}

.chatbot__messages {
  display: grid;
  gap: 10px;
  max-height: 38vh;
  padding-right: 3px;
  overflow: auto;
}

.chat-message {
  padding: 10px 12px;
  overflow-wrap: anywhere;
  border: 1px solid var(--color-line);
  border-radius: 16px;
  white-space: pre-wrap;
}

.chat-message--assistant {
  color: var(--color-ink);
  background: #fff;
}

.chat-message--user {
  justify-self: end;
  max-width: 88%;
  color: #fff;
  background: var(--color-navy);
  border-color: var(--color-navy);
}

.chatbot__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chatbot__suggestions button {
  padding: 7px 9px;
  color: var(--color-blue);
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  font-weight: 850;
  cursor: pointer;
}

.chatbot__suggestions button:hover,
.chatbot__suggestions button:focus-visible {
  background: var(--color-soft-blue);
  border-color: var(--color-blue);
}

.chatbot__status {
  min-height: 1.3em;
  margin: 0;
  color: var(--color-muted);
  font-size: 0.86rem;
}

.chatbot__status[data-error="true"] {
  color: var(--color-red);
  font-weight: 800;
}

.chatbot__retry {
  justify-self: start;
  padding: 5px 9px;
  color: var(--color-blue);
  background: var(--color-soft-blue);
  border: 1px solid rgba(47, 117, 181, 0.3);
  border-radius: 999px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.chatbot__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
}

.chatbot textarea {
  min-height: 44px;
  padding: 10px 11px;
  resize: none;
  font: inherit;
  border: 1px solid var(--color-line);
  border-radius: 14px;
}

.chatbot textarea:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 2px;
}

.chatbot .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--color-blue), var(--color-teal));
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
}

.chatbot .btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

@media (max-width: 920px) {
  html {
    scroll-padding-top: 5rem;
  }

  .toc-panel {
    width: min(20rem, 88vw);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .toc-panel {
    transform: translateX(0);
  }

  .nav-backdrop {
    position: fixed;
    z-index: 20;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    background: rgba(8, 15, 14, 0.55);
    border: 0;
    cursor: pointer;
  }

  body.nav-open .nav-backdrop {
    display: block;
  }

  .workspace {
    margin-left: 0;
    padding: 4.8rem 0 0;
  }

  .mobile-bar {
    position: fixed;
    z-index: 15;
    inset: 0 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.5rem;
    align-items: center;
    min-height: 3.8rem;
    padding: 0.65rem 0.8rem;
    color: var(--paper);
    background: linear-gradient(135deg, var(--color-navy), #214e7b);
    box-shadow: 0 5px 18px rgba(23, 54, 93, 0.22);
  }

  .mobile-bar > span {
    color: var(--sidebar-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
  }

  .mobile-bar .text-button:last-child {
    justify-self: end;
  }

  .report-document {
    width: 100%;
    border-radius: 0;
    box-shadow: none;
  }

  .report-footer {
    width: 100%;
    padding: 0 1.25rem 1.5rem;
  }
}

@media (max-width: 720px) {
  .cover-stats {
    grid-template-columns: 1fr;
  }

  .chatbot {
    right: 10px;
    bottom: 10px;
    max-width: calc(100vw - 20px);
  }

  .chatbot__panel {
    width: calc(100vw - 20px);
  }

  .chatbot__body {
    max-height: 76vh;
  }

  .chatbot__form {
    grid-template-columns: 1fr;
  }

  .chatbot .btn {
    width: 100%;
  }

  .chatbot__messages {
    max-height: 42vh;
  }
}

@media (max-width: 580px) {
  body {
    font-size: 15px;
  }

  .report-cover {
    min-height: 0;
    padding: 2.5rem 1.25rem 2.25rem;
  }

  .report-cover h1 {
    font-size: 2.35rem;
  }

  .report-cover__identity {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-cover__identity img {
    width: min(15rem, 100%);
    height: 5rem;
  }

  .report-cover__identity span {
    font-size: 0.7rem;
  }

  .report-cover > p:last-of-type {
    font-size: 0.8rem;
    line-height: 1.75;
  }

  .report-content {
    padding: 0.5rem 1.25rem 3.5rem;
  }

  .report-content > h2 {
    margin-top: 3.5rem;
    font-size: 1.65rem;
  }

  .mobile-bar > span {
    display: none;
  }

  .mobile-bar {
    grid-template-columns: 1fr 1fr;
  }

  .table-scroll {
    width: calc(100% + 2.5rem);
    margin-left: -1.25rem;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .toc-panel,
  .toc-nav a {
    transition: none;
  }
}

@media print {
  @page {
    size: A4;
    margin: 14mm 12mm 16mm;
  }

  :root {
    --ink: #000000;
    --paper: #ffffff;
  }

  body {
    color: #000000;
    background: #ffffff;
    font-size: 9.5pt;
    line-height: 1.45;
  }

  .toc-panel,
  .mobile-bar,
  .nav-backdrop,
  .skip-link,
  .chatbot {
    display: none !important;
  }

  .workspace {
    margin: 0;
    padding: 0;
  }

  .report-document {
    width: 100%;
    border-radius: 0;
    box-shadow: none;
  }

  .report-cover {
    min-height: 245mm;
    padding: 32mm 18mm;
    break-after: page;
    print-color-adjust: exact;
  }

  .report-content {
    padding: 0;
  }

  .report-footer {
    width: 100%;
    margin: 0;
    padding: 5mm 0 0;
  }

  .report-footer img {
    width: 42mm;
    height: 14mm;
    box-shadow: none;
  }

  .report-footer p {
    font-size: 8pt;
  }

  .report-content > h2 {
    margin-top: 8mm;
    padding-top: 3mm;
    font-size: 18pt;
    break-after: avoid;
  }

  .report-content > h3 {
    margin-top: 5mm;
    font-size: 12pt;
    break-after: avoid;
  }

  p,
  li {
    orphans: 3;
    widows: 3;
  }

  .table-scroll {
    margin: 4mm 0 6mm;
    overflow: visible;
    border-color: #777777;
  }

  table {
    min-width: 0;
    font-size: 6.6pt;
    line-height: 1.24;
  }

  th,
  td {
    padding: 1.4mm;
    border-color: #aaaaaa;
  }

  thead {
    display: table-header-group;
  }

  tr {
    break-inside: avoid;
  }

  a {
    color: #000000;
    text-decoration: none;
  }
}
