:root {
  --navy: #06283a;
  --navy-ink: #0b2635;
  --navy-soft: #21495c;
  --mist: #f1f5f8;
  --paper: #f7f8fa;
  --white: #ffffff;
  --taupe: #c9ad8d;
  --taupe-pale: #f3ece5;
  --line: #d9e1e6;
  --line-strong: #b8c5cc;
  --muted: #5f7079;
  --success: #246b4a;
  --success-bg: #eaf5ef;
  --warning: #8a5b14;
  --warning-bg: #fbf3df;
  --danger: #97443f;
  --danger-bg: #faecea;
  --shadow: 0 10px 30px rgba(6, 40, 58, 0.08);
  --sidebar-width: 232px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--navy-ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.topbar {
  align-items: center;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  display: flex;
  height: 72px;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand-lockup {
  align-items: center;
  display: inline-flex;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
}

.brand-lockup strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
}

.brand-lockup small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.brand-mark {
  align-items: center;
  background: var(--navy);
  border-radius: 4px;
  color: var(--mist);
  display: flex;
  flex: 0 0 42px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-weight: 700;
  height: 42px;
  justify-content: center;
  overflow: hidden;
}

.brand-mark img {
  background: var(--navy);
  height: 100%;
  object-fit: contain;
  padding: 5px;
  width: 100%;
}

.topbar-actions,
.mode-control {
  align-items: center;
  display: flex;
}

.topbar-actions {
  gap: 12px;
}

.mode-control {
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px;
}

.mode-button {
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  min-width: 76px;
  padding: 7px 11px;
}

.mode-button.is-active {
  background: var(--white);
  box-shadow: 0 1px 4px rgba(6, 40, 58, 0.12);
  color: var(--navy);
}

.button {
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
}

.button-primary {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.button-secondary {
  background: var(--white);
}

.button-quiet {
  background: transparent;
  border-color: transparent;
  color: var(--navy-soft);
}

.button:hover,
.mode-button:hover,
.nav-item:hover,
.platform-tab:hover {
  filter: brightness(0.96);
}

.button:focus-visible,
.mode-button:focus-visible,
.nav-item:focus-visible,
.platform-tab:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(201, 173, 141, 0.62);
  outline-offset: 2px;
}

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

.sidebar {
  background: var(--white);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 72px);
  padding: 26px 18px 20px;
  position: sticky;
  top: 72px;
  align-self: start;
  height: calc(100vh - 72px);
}

.nav-label,
.eyebrow,
.field-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  margin: 0;
  text-transform: uppercase;
}

.nav-label {
  padding: 0 10px 8px;
}

.section-nav {
  display: grid;
  gap: 3px;
}

.nav-item {
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  padding: 10px 10px;
  text-align: left;
  width: 100%;
}

.nav-item.is-active {
  background: var(--mist);
  border-left-color: var(--taupe);
  color: var(--navy);
}

.sidebar-meta {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  font-size: 11px;
  gap: 8px;
  margin-top: auto;
  padding: 16px 8px 0;
}

.status-dot {
  background: var(--success);
  border-radius: 50%;
  display: block;
  height: 7px;
  width: 7px;
}

.main-content {
  min-width: 0;
  padding: 42px clamp(24px, 4vw, 64px) 72px;
}

.section {
  display: none;
  margin: 0 auto;
  max-width: 1240px;
}

.section.is-active {
  display: block;
}

.section-heading,
.overview-heading {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 32px;
  justify-content: space-between;
  margin-bottom: 26px;
  padding-bottom: 22px;
}

.section-heading h1,
.overview-heading h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1.1;
  margin: 6px 0 0;
}

.section-heading > p,
.overview-heading > p {
  color: var(--muted);
  margin: 0;
  max-width: 520px;
}

.overview-heading {
  align-items: center;
}

.overview-heading h1 {
  font-size: 40px;
  max-width: 680px;
}

.mode-note {
  background: var(--taupe-pale);
  border-left: 3px solid var(--taupe);
  color: var(--navy-soft);
  max-width: 360px;
  padding: 14px 16px;
}

.summary-grid {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 30px;
  overflow: hidden;
}

.summary-item {
  background: var(--white);
  border: 1px solid var(--line);
  margin-right: -1px;
  min-height: 118px;
  padding: 20px;
}

.summary-item strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1.15;
  margin-top: 12px;
}

.summary-item strong.is-text {
  font-family: inherit;
  font-size: 17px;
  line-height: 1.35;
}

.content-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  margin-bottom: 28px;
}

.content-panel,
.copy-card,
.visual-card,
.checklist-group,
.gallery-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.content-panel {
  padding: 24px;
}

.content-panel h2,
.platform-header h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 10px;
}

.content-panel h3 {
  font-size: 15px;
  margin: 22px 0 8px;
}

.content-panel > :last-child,
.copy-card > :last-child,
.visual-card > :last-child {
  margin-bottom: 0;
}

.panel-header,
.copy-card-header,
.gallery-header,
.checklist-heading,
.platform-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.panel-header {
  border-bottom: 1px solid var(--line);
  margin: -2px 0 18px;
  padding-bottom: 14px;
}

.panel-header h2,
.panel-header h3 {
  margin: 0;
}

.platform-tabs {
  display: flex;
  gap: 3px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.platform-tab {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 750;
  min-height: 40px;
  padding: 8px 15px;
}

.platform-tab.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.platform-header {
  align-items: center;
  background: var(--navy);
  border-radius: 6px 6px 0 0;
  color: var(--white);
  padding: 24px 26px;
}

.platform-header p {
  color: #dbe6eb;
  margin: 4px 0 0;
}

.platform-body {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 0;
  padding: 26px;
}

.definition-grid {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 28px;
}

.definition-item {
  border-bottom: 1px solid var(--line);
  padding: 16px 18px 16px 0;
}

.definition-item dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.definition-item dd {
  font-weight: 650;
  margin: 5px 0 0;
}

.copy-grid,
.visual-grid,
.gallery-grid,
.checklist-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.copy-card,
.visual-card {
  padding: 20px;
}

.copy-card-header {
  margin-bottom: 14px;
}

.copy-card h3,
.visual-card h3,
.gallery-item h3,
.checklist-group h2 {
  font-size: 16px;
  margin: 0;
}

.copy-value {
  background: var(--paper);
  border-left: 3px solid var(--taupe);
  font-size: 15px;
  margin: 0;
  min-height: 72px;
  padding: 14px 16px;
  white-space: pre-wrap;
}

.copy-meta {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 12px;
  gap: 10px;
  margin-top: 12px;
}

.count-meter {
  background: var(--line);
  border-radius: 2px;
  flex: 1;
  height: 4px;
  overflow: hidden;
}

.count-meter span {
  background: var(--success);
  display: block;
  height: 100%;
}

.badge {
  background: var(--mist);
  border-radius: 3px;
  color: var(--navy-soft);
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  padding: 4px 7px;
  text-transform: uppercase;
}

.badge-pass,
.badge-ready {
  background: var(--success-bg);
  color: var(--success);
}

.badge-partial,
.badge-warning,
.badge-missing {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge-fail,
.badge-blocked {
  background: var(--danger-bg);
  color: var(--danger);
}

.subsection {
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 26px;
}

.subsection-heading {
  align-items: end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.subsection-heading h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  margin: 0;
}

.subsection-heading p {
  color: var(--muted);
  margin: 0;
}

.recommendation-list,
.plain-list {
  margin: 0;
  padding-left: 20px;
}

.recommendation-list li,
.plain-list li {
  margin-bottom: 9px;
}

.link-path {
  align-items: center;
  background: var(--mist);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
  padding: 14px 16px;
}

.path-step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 12px;
  font-weight: 750;
  padding: 6px 9px;
}

.path-arrow {
  color: var(--muted);
}

.visual-preview,
.gallery-preview {
  align-items: center;
  background: var(--mist);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: center;
  min-height: 240px;
  overflow: hidden;
  position: relative;
}

.visual-preview {
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-bottom: 16px;
}

.visual-preview img,
.gallery-preview img {
  height: 100%;
  max-height: 420px;
  object-fit: contain;
  width: 100%;
}

.image-placeholder {
  color: var(--muted);
  max-width: 240px;
  padding: 38px 22px;
  text-align: center;
}

.image-placeholder strong {
  color: var(--navy-soft);
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  margin-bottom: 5px;
}

.gallery-item {
  overflow: hidden;
}

.gallery-body {
  padding: 18px;
}

.gallery-header {
  margin-bottom: 10px;
}

.gallery-body p {
  color: var(--muted);
  font-size: 13px;
  margin: 6px 0 0;
}

.filters {
  align-items: end;
  background: var(--white);
  border: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
  padding: 16px;
}

.filter-field {
  display: grid;
  gap: 5px;
  min-width: 180px;
}

.filter-field label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.filter-field input,
.filter-field select {
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  min-height: 40px;
  padding: 8px 10px;
}

.filter-field.is-search {
  flex: 1 1 280px;
}

.result-count {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 12px;
}

.swatch-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 26px;
}

.swatch {
  background: var(--white);
  border: 1px solid var(--line);
  min-width: 0;
}

.swatch-color {
  height: 96px;
}

.swatch-info {
  padding: 12px;
}

.swatch-info strong,
.swatch-info span {
  display: block;
}

.swatch-info span {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.brand-lockup-preview {
  align-items: center;
  background: var(--navy);
  display: flex;
  justify-content: center;
  min-height: 260px;
  padding: 36px;
}

.brand-lockup-preview img {
  max-height: 170px;
  object-fit: contain;
}

.qa-table,
.markdown table {
  border-collapse: collapse;
  font-size: 13px;
  width: 100%;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.qa-table th,
.qa-table td,
.markdown th,
.markdown td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
}

.qa-table th,
.markdown th {
  background: var(--mist);
  color: var(--navy-soft);
  font-size: 11px;
  text-transform: uppercase;
}

.markdown {
  color: #263f4b;
  overflow-wrap: anywhere;
}

.markdown h1,
.markdown h2,
.markdown h3 {
  color: var(--navy-ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.25;
}

.markdown h1 {
  font-size: 25px;
}

.markdown h2 {
  border-top: 1px solid var(--line);
  font-size: 21px;
  margin-top: 28px;
  padding-top: 22px;
}

.markdown h3 {
  font-size: 17px;
  margin-top: 22px;
}

.markdown blockquote {
  background: var(--mist);
  border-left: 3px solid var(--taupe);
  margin: 16px 0;
  padding: 12px 16px;
}

.markdown code {
  background: var(--mist);
  border-radius: 3px;
  font-size: 12px;
  padding: 2px 4px;
}

details {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 14px;
}

summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

details .markdown,
details .detail-body {
  margin-top: 14px;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}

.detail-list div {
  background: var(--paper);
  padding: 10px 12px;
}

.detail-list dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 3px 0 0;
}

.checklist-group {
  padding: 20px;
}

.checklist-heading {
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
  padding-bottom: 12px;
}

.checklist-items {
  display: grid;
}

.check-item {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  display: flex;
  gap: 10px;
  padding: 11px 0;
}

.check-item:last-child {
  border-bottom: 0;
}

.check-item input {
  accent-color: var(--navy);
  flex: 0 0 auto;
  height: 17px;
  margin: 3px 0 0;
  width: 17px;
}

.check-item.is-complete span {
  color: var(--muted);
  text-decoration: line-through;
}

.progress-track {
  background: var(--line);
  border-radius: 2px;
  height: 6px;
  margin: 0 0 24px;
  overflow: hidden;
}

.progress-track span {
  background: var(--success);
  display: block;
  height: 100%;
}

.loading-state {
  margin: 80px auto;
  max-width: 620px;
}

.loading-state p {
  color: var(--muted);
}

.loading-line {
  animation: pulse 1.5s ease-in-out infinite;
  background: var(--line);
  display: block;
  height: 22px;
  margin-bottom: 12px;
  width: 100%;
}

.loading-line-short {
  width: 58%;
}

@keyframes pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.9; }
}

.toast {
  background: var(--navy-ink);
  border-radius: 4px;
  bottom: 22px;
  color: var(--white);
  font-size: 13px;
  left: 50%;
  opacity: 0;
  padding: 10px 14px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 10px);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 50;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

body[data-mode="client"] [data-internal] {
  display: none !important;
}

@media (max-width: 980px) {
  .summary-grid,
  .swatch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid,
  .definition-grid {
    grid-template-columns: 1fr;
  }

  .definition-item {
    padding-right: 0;
  }
}

@media (max-width: 760px) {
  .topbar {
    height: auto;
    min-height: 72px;
    padding: 12px 16px;
  }

  .brand-lockup small {
    display: none;
  }

  .brand-lockup strong {
    font-size: 15px;
  }

  .topbar-actions {
    gap: 7px;
  }

  .mode-button {
    min-width: 62px;
    padding: 6px 8px;
  }

  .button-primary {
    padding-left: 10px;
    padding-right: 10px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    display: block;
    height: auto;
    min-height: 0;
    overflow-x: auto;
    padding: 9px 12px;
    position: sticky;
    top: 72px;
    z-index: 15;
  }

  .nav-label,
  .sidebar-meta {
    display: none;
  }

  .section-nav {
    display: flex;
    gap: 4px;
    width: max-content;
  }

  .nav-item {
    border: 1px solid transparent;
    border-radius: 4px;
    flex: 0 0 auto;
    padding: 7px 10px;
  }

  .nav-item.is-active {
    border-color: var(--line);
  }

  .main-content {
    padding: 28px 16px 56px;
  }

  .section-heading,
  .overview-heading,
  .subsection-heading {
    align-items: flex-start;
    display: grid;
    gap: 12px;
  }

  .section-heading h1,
  .overview-heading h1 {
    font-size: 30px;
  }

  .mode-note {
    max-width: none;
  }

  .copy-grid,
  .visual-grid,
  .gallery-grid,
  .checklist-grid {
    grid-template-columns: 1fr;
  }

  .platform-header,
  .platform-body,
  .content-panel {
    padding: 20px;
  }

  .filters {
    align-items: stretch;
    display: grid;
  }

  .filter-field {
    min-width: 0;
  }
}

@media (max-width: 500px) {
  .brand-mark {
    display: none;
  }

  .brand-lockup strong {
    font-size: 14px;
    max-width: 96px;
  }

  .mode-button {
    min-width: 50px;
  }

  #print-report {
    font-size: 0;
    min-width: 50px;
  }

  #print-report::after {
    content: "Print";
    font-size: 12px;
  }

  .summary-grid,
  .swatch-grid {
    grid-template-columns: 1fr;
  }

  .summary-item {
    min-height: 0;
  }

  .button-primary {
    font-size: 12px;
  }
}

@media print {
  @page {
    margin: 0.65in;
    size: letter portrait;
  }

  body {
    background: var(--white);
    color: #000000;
    font-size: 10pt;
  }

  .topbar,
  .sidebar,
  .filters,
  .platform-tabs,
  .copy-card .button,
  .toast,
  .loading-state {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .main-content {
    padding: 0;
  }

  body.is-printing .section {
    display: block !important;
    max-width: none;
  }

  body[data-mode="client"] [data-internal],
  body[data-mode="client"] #qa {
    display: none !important;
  }

  .section {
    break-before: page;
  }

  #overview {
    break-before: auto;
  }

  .section-heading,
  .overview-heading {
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .section-heading h1,
  .overview-heading h1 {
    color: #000000;
    font-size: 23pt;
  }

  .summary-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .summary-item,
  .content-panel,
  .copy-card,
  .visual-card,
  .gallery-item,
  .checklist-group,
  .platform-body {
    border-color: #aab2b6;
    box-shadow: none;
  }

  .copy-grid,
  .visual-grid,
  .gallery-grid,
  .checklist-grid {
    gap: 12px;
  }

  .copy-card,
  .visual-card,
  .gallery-item,
  .checklist-group,
  .content-panel,
  .qa-table tr {
    break-inside: avoid;
  }

  .platform-header {
    background: #e8eef1;
    color: #000000;
    margin-top: 20px;
  }

  .platform-package + .platform-package {
    break-before: page;
  }

  .platform-header p {
    color: #333333;
  }

  .visual-preview,
  .gallery-preview {
    min-height: 150px;
  }

  details:not([open]) > :not(summary) {
    display: none !important;
  }
}
