:root {
  --ink: #151515;
  --muted: #666;
  --line: #dedede;
  --panel: #f5f5f5;
  --accent: #0b6b5f;
  --menu-width: min(320px, 88vw);
}

* { box-sizing: border-box; }

html,
body {
  min-height: 100%;
  margin: 0;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #fff;
}

a { color: inherit; }

.side-menu {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  width: var(--menu-width);
  display: flex;
  overflow: auto;
  flex-direction: column;
  padding: 22px 18px 34px;
  color: #fff;
  background: rgba(12, 13, 16, 0.97);
  box-shadow: 8px 0 24px rgba(0, 0, 0, 0.22);
  transform: translateX(-100%);
  transition: transform 200ms ease;
}

.side-menu.is-open { transform: translateX(0); }

.menu-logo {
  display: block;
  width: 112px;
  margin: 0 auto 18px;
}

.menu-logo img {
  display: block;
  width: 100%;
  max-height: 112px;
  object-fit: contain;
}

.menu-project-title {
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.3;
  text-align: center;
}

.menu-tree,
.menu-tree ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu-tree ul { padding-left: 18px; }

.menu-tree a,
.menu-tree span {
  display: block;
  padding: 7px 0;
  color: #fff;
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none;
}

.menu-tree a:hover,
.menu-tree a:focus-visible {
  color: #d9e8a6;
  text-decoration: underline;
}

.menu-tree span { color: #aaa; }

.side-menu > .menu-tree {
  flex: 1 0 auto;
  padding-bottom: 32px;
}

.menu-copyright {
  flex: 0 0 auto;
  margin-top: 0;
  padding: 18px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: #b9b9b9;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.menu-toggle {
  position: fixed;
  z-index: 30;
  top: 14px;
  left: 14px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  color: #fff;
  background: rgba(12, 13, 16, 0.82);
  cursor: pointer;
  transition: left 200ms ease, background 160ms ease;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  position: absolute;
  left: 11px;
  width: 20px;
  height: 2px;
  content: '';
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle::before { top: 13px; }
.menu-toggle span { top: 20px; }
.menu-toggle::after { top: 27px; }

.menu-toggle.is-open {
  left: calc(var(--menu-width) - 58px);
  background: transparent;
}

.menu-toggle.is-open::before {
  top: 20px;
  transform: rotate(45deg);
}

.menu-toggle.is-open span { opacity: 0; }

.menu-toggle.is-open::after {
  top: 20px;
  transform: rotate(-45deg);
}

.viewer { min-height: 100vh; }

.viewer iframe {
  display: block;
  width: 100%;
  height: 100vh;
  border: 0;
}

.page-content {
  max-width: 1040px;
  margin: 0 auto;
  padding: 64px 32px;
}

.page-content--cover {
  position: relative;
  max-width: none;
  min-height: 100vh;
  padding: 0;
}

.page-content > h1 {
  margin: 0 0 28px;
  font-size: 34px;
}

.cover-hero {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background-color: #222;
  background-position: center;
  background-size: cover;
}

.cover-title {
  width: 100%;
  padding: 22px clamp(24px, 7vw, 120px);
  color: #fff;
  background: rgba(0, 0, 0, 0.58);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
}

.cover-title > :first-child { margin-top: 0; }
.cover-title > :last-child { margin-bottom: 0; }

.cover-title h1,
.cover-title h2,
.cover-title p {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  font-weight: 700;
}

.section-navigation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.section-navigation-link {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid #c9c9c9;
  background: #fff;
  text-decoration: none;
}

.section-navigation-link:hover,
.section-navigation-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.section-navigation-link span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.section-navigation-link strong {
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.3;
}

.section-navigation-link--previous { grid-column: 1; }

.section-navigation-link--next {
  grid-column: 2;
  text-align: right;
}

.page-content--cover .section-navigation {
  position: absolute;
  z-index: 2;
  right: clamp(16px, 4vw, 56px);
  bottom: 102px;
  left: clamp(16px, 4vw, 56px);
  margin: 0;
  padding: 0;
  border: 0;
}

.page-content--cover .section-navigation-link {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(0, 0, 0, 0.62);
}

.page-content--cover .section-navigation-link span {
  color: rgba(255, 255, 255, 0.76);
}

.report-footer {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 34px;
  padding: 26px 0 4px;
  border-top: 1px solid var(--line);
  color: #34383c;
  text-align: center;
}

.report-footer-logo {
  display: block;
  width: min(250px, 70vw);
  height: auto;
}

.report-footer p {
  margin: 0;
  font-size: 12px;
}

.page-content--cover .report-footer {
  position: absolute;
  z-index: 2;
  right: 16px;
  bottom: 16px;
  left: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  color: #fff;
}

.page-content--cover .report-footer-logo {
  width: 180px;
}

.content-block {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.content-block h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.summary {
  color: var(--muted);
  font-weight: 700;
}

.body {
  overflow-wrap: anywhere;
  line-height: 1.58;
}

.body b,
.body strong {
  font-weight: 700;
}

.body u {
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.body h1,
.body h2,
.body h3 {
  margin: 0 0 18px;
  color: #202428;
  line-height: 1.25;
}

.body h1 { font-size: 26px; }
.body h2 { font-size: 22px; }
.body h3 { font-size: 18px; }

.body img {
  max-width: 100%;
  height: auto;
}

.report-section-title {
  margin: 4px 0 10px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
  color: var(--ink);
  font-size: 32px;
  font-weight: 750;
  line-height: 1.2;
}

.report-section-title > :first-child { margin-top: 0; }
.report-section-title > :last-child { margin-bottom: 0; }
.report-section-title h1,
.report-section-title h2,
.report-section-title h3,
.report-section-title p { color: inherit; font: inherit; }

.body iframe {
  display: block;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  height: auto;
  margin: 0 auto;
  border: 0;
}

.video-link {
  max-width: 900px;
  margin: 0 auto;
}

.video-link > a {
  display: grid;
  gap: 5px;
  color: var(--ink);
  text-decoration: none;
}

.video-link-preview {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #17191c;
}

.video-link-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  transition: opacity 160ms ease, transform 160ms ease;
}

.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68px;
  height: 48px;
  border-radius: 8px;
  background: #e62117;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
}

.video-play::after {
  position: absolute;
  top: 13px;
  left: 28px;
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 17px solid #fff;
  content: '';
}

.video-link strong {
  margin-top: 7px;
  font-size: 16px;
}

.video-link > a > span:last-child {
  color: var(--muted);
  font-size: 13px;
}

.video-link > a:hover .video-link-preview img,
.video-link > a:focus-visible .video-link-preview img {
  opacity: 1;
  transform: scale(1.015);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 16px;
  margin-top: 18px;
}

.media-grid figure {
  min-width: 0;
  margin: 0;
}

.media-link {
  display: block;
  overflow: hidden;
  background: #eee;
}

.media-grid img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.media-grid figcaption {
  padding-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.media-grid--single { max-width: 900px; margin-right: auto; margin-left: auto; }
.media-grid--left { max-width: min(52%, 620px); margin-right: auto; margin-left: 0; }
.media-grid--right { max-width: min(52%, 620px); margin-right: 0; margin-left: auto; }

.image-text-layout {
  display: grid;
  align-items: start;
  gap: clamp(22px, 4vw, 52px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.image-text-layout .media-grid {
  margin-top: 0;
  grid-template-columns: 1fr;
}

.image-text-copy > :first-child { margin-top: 0; }
.image-text-copy > :last-child { margin-bottom: 0; }

.body-columns {
  display: grid;
  align-items: start;
  gap: 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rb-block {
  display: grid;
  align-items: stretch;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.9fr) minmax(0, 1fr);
  gap: 0;
  padding: 0;
  border: 1px solid var(--line);
  break-inside: avoid;
}

.rb-block + .rb-block { border-top: 0; }

.rb-primary,
.rb-media,
.rb-secondary {
  min-width: 0;
  padding: 18px;
}

.rb-primary {
  position: relative;
  padding-top: 50px;
  background: #f3f4f3;
}

.rb-number {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: #17191c;
  font-size: 14px;
  font-weight: 700;
}

.rb-media {
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.rb-media:empty { background: #fafafa; }
.rb-media figure { margin: 0; }

.rb-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 340px;
  object-fit: contain;
}

.rb-media figcaption {
  padding-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.rb-primary .body > :first-child,
.rb-secondary > :first-child { margin-top: 0; }

.rb-primary .body > :last-child,
.rb-secondary > :last-child { margin-bottom: 0; }

.attachment-list,
.external-link-list {
  display: grid;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.attachment-list a,
.external-link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  background: #f7f8f7;
  text-decoration: none;
}

.attachment-list a { justify-content: flex-start; }
.attachment-list a:hover,
.external-link-list a:hover { border-color: var(--accent); background: #f0f6f4; }

.chart {
  margin-top: 24px;
}

.chart--horizontal {
  display: grid;
  gap: 14px;
}

.chart-bar {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(180px, 3fr) 44px;
  align-items: center;
  gap: 12px;
}

.chart-label {
  font-size: 14px;
  line-height: 1.3;
}

.chart-track {
  height: 18px;
  overflow: hidden;
  background: #e6e7e8;
}

.chart-track span {
  display: block;
  width: var(--chart-value);
  height: 100%;
  background: var(--chart-color);
}

.chart-bar strong {
  font-size: 15px;
}

.chart--vertical {
  display: flex;
  align-items: end;
  gap: 14px;
  min-height: 300px;
  padding-top: 18px;
  border-bottom: 1px solid var(--line);
}

.chart--vertical .chart-bar {
  display: grid;
  flex: 1 1 0;
  grid-template: 28px 200px minmax(42px, auto) / 1fr;
  gap: 7px;
  min-width: 0;
  text-align: center;
}

.chart--vertical .chart-label {
  grid-row: 3;
}

.chart--vertical .chart-track {
  align-self: end;
  width: min(58px, 80%);
  height: 200px;
  margin: 0 auto;
  transform: rotate(180deg);
}

.chart--vertical .chart-track span {
  width: 100%;
  height: var(--chart-value);
}

.chart--vertical .chart-bar strong {
  grid-row: 1;
}

.chart--gauges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 24px;
}

.chart-gauge {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.chart-gauge-ring {
  display: grid;
  width: 116px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--chart-color) var(--chart-value), #e5e5e5 0);
  place-content: center;
  position: relative;
}

.chart-gauge-ring::before {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  content: '';
  background: #fff;
}

.chart-gauge-ring strong,
.chart-gauge-ring span {
  position: relative;
  z-index: 1;
}

.chart-gauge-ring strong {
  font-size: 28px;
}

.chart-gauge-ring span {
  color: var(--muted);
  font-size: 12px;
}

.chart-pie-layout {
  display: grid;
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
  grid-template-columns: minmax(240px, 380px) minmax(220px, 1fr);
}

.chart-pie {
  width: min(100%, 380px);
  aspect-ratio: 1;
  margin: auto;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  box-shadow: 0 12px 24px rgba(19, 31, 27, 0.12);
}

.chart-pie-legend {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chart-pie-legend li {
  display: grid;
  align-items: center;
  gap: 10px;
  grid-template-columns: 18px minmax(0, 1fr);
}

.chart-pie-swatch {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 3px;
}

.chart-pie-legend strong { white-space: nowrap; }

.status-list { overflow-x: auto; margin-top: 20px; }

.status-list table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.status-list td {
  padding: 9px 12px;
  border: 1px solid #d9dddb;
  vertical-align: middle;
}

.status-list-icon,
.status-list-result { width: 48px; text-align: center; }
.status-list-icon img { display: block; width: 28px; height: 28px; margin: auto; object-fit: contain; }
.status-list-result img { display: block; width: 25px; height: 25px; margin: auto; object-fit: contain; }
.status-list-label { min-width: 240px; }
.status-list-note { min-width: 180px; color: var(--muted); }

.lightbox {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 56px 72px 32px;
  color: #fff;
  background: rgba(0, 0, 0, 0.94);
}

.lightbox.is-open { display: flex; }
.lightbox-open { overflow: hidden; }

.lightbox figure {
  display: grid;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  place-items: center;
}

.lightbox img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 110px);
  object-fit: contain;
}

.lightbox figcaption {
  padding-top: 10px;
  font-size: 14px;
  text-align: center;
}

.lightbox button {
  position: fixed;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close { top: 14px; right: 14px; }
.lightbox-prev,
.lightbox-next { top: calc(50% - 23px); }
.lightbox-prev { left: 14px; }
.lightbox-next { right: 14px; }

.admin-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px;
}

.admin-header,
.project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.admin-header { padding-bottom: 16px; }
.project-row { padding: 18px 0; }

.project-row h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.project-row p {
  margin: 0;
  color: var(--muted);
}

.project-row nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-catalog { margin-top: 24px; }

.project-catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.project-catalog-toolbar {
  padding-bottom: 18px;
  border-bottom: 2px solid var(--ink);
}

.project-catalog-toolbar h2,
.year-project-group h3 { margin: 0; }

.project-catalog-toolbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.year-filter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.year-filter label { font-size: 14px; font-weight: 700; }

.year-filter select {
  min-height: 38px;
  padding: 7px 34px 7px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.client-project-group { padding: 24px 0 0; }

.client-project-heading { margin: 0; }

.client-project-toggle {
  display: grid;
  width: 100%;
  min-height: 56px;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 0;
  border-left: 4px solid var(--accent);
  border-radius: 0;
  color: var(--ink);
  background: #e8eae9;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.client-project-toggle:hover { background: #dde1df; }

.client-project-toggle:focus-visible {
  outline: 3px solid rgba(0, 106, 94, 0.25);
  outline-offset: 2px;
}

.client-project-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 160ms ease;
}

.client-project-toggle[aria-expanded="false"] .client-project-chevron {
  transform: rotate(-45deg) translate(-1px, -1px);
}

.client-project-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 21px;
  font-weight: 700;
}

.client-project-count {
  color: #505856;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.client-project-content[hidden] { display: none; }

.year-project-group { padding-top: 20px; }

.year-project-group h3 {
  padding-bottom: 8px;
  color: var(--accent);
  font-size: 16px;
}

.year-project-group .project-list { border-top: 1px solid var(--line); }

.button,
.project-row a,
.project-row button,
.project-link {
  display: inline-block;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.project-row a:hover,
.project-row button:hover,
.project-link:hover {
  border-color: #aaa;
  background: #f8f8f8;
}

.project-link--disabled,
.project-link--disabled:hover {
  border-color: #d5d8d7;
  color: #747a78;
  background: #f0f1f1;
  cursor: not-allowed;
}

.button--primary {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.button--primary:hover {
  border-color: #075249;
  background: #075249;
}

.project-row form,
.admin-actions form { margin: 0; }

.admin-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-navigation {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.admin-navigation form { margin: 0; }

.admin-navigation-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 8px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}

.admin-navigation-link:hover,
.admin-navigation-link:focus-visible {
  border-bottom-color: #aeb3b1;
  outline: 0;
}

.admin-navigation-link.is-active {
  border-bottom-color: var(--accent);
  color: var(--accent);
  font-weight: 800;
}

.maintenance-shell { max-width: 1280px; }

.maintenance-summary {
  display: grid;
  margin: 28px 0 34px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.maintenance-summary article {
  min-width: 0;
  padding: 22px 18px;
}

.maintenance-summary article + article { border-left: 1px solid var(--line); }

.maintenance-summary strong,
.maintenance-summary span { display: block; }

.maintenance-summary strong {
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 30px;
  line-height: 1;
}

.maintenance-summary span { color: var(--muted); font-size: 13px; }

.maintenance-panel { margin-top: 34px; }

.maintenance-panel > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}

.maintenance-panel h2 { margin: 0; font-size: 21px; }
.maintenance-panel header p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.maintenance-panel > header form { margin: 0; }

.maintenance-count {
  display: grid;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  color: #fff;
  background: var(--ink);
  place-items: center;
  font-size: 13px;
  font-weight: 800;
}

.maintenance-table-wrap { overflow-x: auto; }

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

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

.maintenance-table th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.media-audit-summary {
  display: grid;
  margin-top: 18px;
  border-bottom: 1px solid var(--line);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.media-audit-summary span {
  padding: 13px 12px;
  border-left: 3px solid #aeb3b1;
  font-size: 13px;
}

.media-audit-summary strong { display: block; margin-bottom: 3px; font-size: 20px; }
.media-audit-summary .is-ok { border-left-color: var(--accent); }
.media-audit-summary .is-warning { border-left-color: #c47b16; }
.media-audit-summary .is-alert { border-left-color: #a32828; }

.maintenance-warning {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 4px solid #a32828;
  color: #721c1c;
  background: #fff1f1;
  font-size: 13px;
}

.maintenance-warning ul {
  max-height: 190px;
  overflow: auto;
  margin: 10px 0 0;
  padding-left: 22px;
}

.media-audit-list { max-height: 430px; margin-top: 18px; border: 1px solid var(--line); }
.media-audit-list .maintenance-table thead { position: sticky; top: 0; background: #fff; }

.maintenance-danger-action {
  display: flex;
  justify-content: flex-end;
  margin: 16px 0 0;
}

.maintenance-ok {
  margin: 18px 0 0;
  padding: 13px 15px;
  border-left: 4px solid var(--accent);
  color: #075249;
  background: #edf8f4;
}

.quarantine-batches { margin-top: 28px; }
.quarantine-batches h3 { margin: 0 0 10px; font-size: 17px; }
.quarantine-batches form { margin: 0; }

.maintenance-row-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.maintenance-row-actions form { margin: 0; }

.usage-filter {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.usage-filter > label:first-child { font-size: 13px; font-weight: 700; }

.usage-filter select {
  min-height: 38px;
  padding: 7px 30px 7px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.usage-filter-check {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.usage-filter-check input { width: 17px; height: 17px; }

.usage-summary {
  display: grid;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.usage-summary span { padding: 16px 14px; color: var(--muted); font-size: 13px; }
.usage-summary span + span { border-left: 1px solid var(--line); }
.usage-summary strong { display: block; margin-bottom: 3px; color: var(--ink); font-size: 24px; }

.usage-layout {
  display: grid;
  gap: 28px;
  margin-top: 24px;
  grid-template-columns: minmax(260px, .8fr) minmax(420px, 1.2fr);
}

.usage-layout h3 { margin: 0 0 10px; font-size: 16px; }
.usage-users { grid-column: 1 / -1; }

.usage-daily {
  max-height: 390px;
  overflow-y: auto;
  padding-right: 8px;
}

.usage-daily-row {
  display: grid;
  min-height: 28px;
  align-items: center;
  gap: 9px;
  grid-template-columns: 44px minmax(0, 1fr) 32px;
  font-size: 12px;
}

.usage-daily-row time { color: var(--muted); }
.usage-daily-row strong { text-align: right; }

.usage-bar { display: block; height: 8px; background: #e6e7e8; }
.usage-bar > span { display: block; height: 100%; background: var(--accent); }

.token-summary {
  display: grid;
  margin-top: 18px;
  border-bottom: 1px solid var(--line);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.token-summary span {
  padding: 14px 13px;
  border-left: 3px solid #aeb3b1;
  font-size: 13px;
}

.token-summary strong { display: block; margin-bottom: 3px; font-size: 21px; }
.token-summary .is-active { border-left-color: var(--accent); }
.token-summary .is-expired { border-left-color: #a32828; }
.token-summary .is-used { border-left-color: #5b6970; }
.token-history { max-height: 420px; margin-top: 18px; }

.token-status {
  display: inline-block;
  padding: 3px 7px;
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
}

.token-status--active { border-color: #73aa9e; color: #075249; background: #edf8f4; }
.token-status--expired { border-color: #d9a4a4; color: #721c1c; background: #fff1f1; }
.token-status--used { color: #4d5555; background: #f1f3f2; }
.maintenance-panel .button:disabled { cursor: not-allowed; opacity: .5; }

.signed-user {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.empty-state {
  padding: 28px 0;
  color: var(--muted);
}

.split-editor {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  margin-top: 24px;
}

.split-editor aside,
.split-editor section {
  padding: 18px;
  background: var(--panel);
}

.project-link {
  display: block;
  margin-bottom: 8px;
  background: #fff;
}

.login-page {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  background: #f1f3f2;
  place-items: center;
}

.login-shell {
  width: min(100%, 420px);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.09);
}

.login-logo {
  display: block;
  width: 170px;
  max-height: 90px;
  margin: 0 auto 28px;
  object-fit: contain;
}

.login-shell h1 {
  margin: 0 0 24px;
  font-size: 25px;
  text-align: center;
}

.login-form {
  display: grid;
  gap: 10px;
}

.login-form label {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 700;
}

.login-form input {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #bbb;
  border-radius: 4px;
  font: inherit;
}

.login-form input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(11, 107, 95, 0.14);
}

.login-form .button { margin-top: 12px; }

.form-error {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-left: 4px solid #a32828;
  color: #721c1c;
  background: #fff1f1;
}

.form-success {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-left: 4px solid #0b6b5f;
  color: #075249;
  background: #edf8f4;
}

.login-help {
  margin: -10px 0 18px;
  color: #5c6665;
  font-size: 14px;
  line-height: 1.5;
}

.login-secondary-link {
  display: block;
  margin-top: 18px;
  color: #075249;
  font-size: 14px;
  text-align: center;
}

.login-wide-button {
  display: block;
  width: 100%;
  text-align: center;
}

.login-password-note {
  margin: 0;
  color: #667070;
  font-size: 12px;
}

.result-shell {
  width: min(100% - 32px, 640px);
  margin: 12vh auto 0;
  text-align: center;
}

.result-logo {
  width: 180px;
  max-height: 90px;
  margin-bottom: 28px;
  object-fit: contain;
}

.result-shell h1 {
  margin: 8px 0 14px;
  font-size: 30px;
}

.result-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.result-kicker--error { color: #a32828; }

.result-path {
  overflow-wrap: anywhere;
  margin: 0 0 26px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
}

.result-shell > .signed-user { margin-top: 18px; }

.admin-shell--wide {
  width: min(100%, 1540px);
  max-width: none;
}

.editor-browser {
  display: grid;
  min-height: calc(100vh - 132px);
  grid-template-columns: 220px 270px minmax(0, 1fr);
}

.editor-clients,
.editor-projects {
  padding: 22px 16px 40px 0;
  border-right: 1px solid var(--line);
}

.editor-projects { padding-left: 16px; }

.editor-stage { min-width: 0; padding-left: 24px; }

.editor-stage-empty {
  display: grid;
  min-height: 55vh;
  color: var(--muted);
  place-items: center;
}

.editor-browser-list { margin-top: 14px; }

.editor-browser-item {
  display: grid;
  width: 100%;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 8px 9px;
  border: 0;
  border-bottom: 1px solid #ededed;
  color: var(--ink);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.editor-browser-item:hover { background: #f5f6f5; }

.editor-browser-item.is-selected {
  box-shadow: inset 3px 0 var(--accent);
  background: #eef6f3;
}

.editor-browser-item strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-browser-item span {
  color: var(--muted);
  font-size: 11px;
}

.editor-toolbar {
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.editor-toolbar h2 { margin: 0; font-size: 20px; }

.editor-toolbar label {
  font-size: 13px;
  font-weight: 800;
}

.editor-toolbar select,
.editor-dialog select,
.editor-dialog input,
.editor-inline-form input,
.module-name-form input {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #bbb;
  border-radius: 4px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.editor-toolbar select { min-width: min(420px, 42vw); }

.editor-status {
  min-height: 20px;
  margin: 0 0 0 auto;
  color: var(--accent);
  font-size: 13px;
}

.editor-status.is-error { color: #a32828; }

.editor-workspace {
  display: grid;
  min-height: calc(100vh - 200px);
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
}

.editor-pages {
  padding: 22px 20px 40px 0;
  border-right: 1px solid var(--line);
}

.editor-content { padding: 22px 0 60px 28px; }

.editor-panel-header,
.editor-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.editor-panel-header h2 { font-size: 18px; }
.editor-panel-header h3 { font-size: 20px; }
.editor-page-header h2 { font-size: 26px; }

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  place-items: center;
}

.icon-button:hover:not(:disabled) {
  border-color: #999;
  background: #f4f4f4;
}

.icon-button:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.icon-button--danger { color: #a32828; }

.editor-icon-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.editor-tree,
.editor-tree-children {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.editor-tree-children {
  margin-top: 2px;
  padding-left: 17px;
  border-left: 1px solid var(--line);
}

.editor-tree-row {
  display: grid;
  min-height: 38px;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) 30px;
  border-bottom: 1px solid #ededed;
}

.editor-tree-row.is-selected {
  box-shadow: inset 3px 0 var(--accent);
  background: #eef6f3;
}

.editor-tree-row.is-hidden .editor-page-select {
  color: #888;
  text-decoration: line-through;
}

.editor-page-select {
  overflow: hidden;
  padding: 8px 8px 8px 11px;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.editor-count {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.editor-eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.editor-page-settings {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.editor-inline-form {
  display: grid;
  width: min(100%, 680px);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.editor-inline-form label {
  grid-column: 1 / -1;
  font-size: 13px;
  font-weight: 800;
}

.editor-toggle {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  white-space: nowrap;
}

.editor-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.editor-modules { padding-top: 26px; }

.module-list { margin-top: 14px; }

.module-row {
  display: grid;
  min-height: 82px;
  align-items: center;
  gap: 14px;
  grid-template-columns: 36px 8px minmax(0, 1fr) auto;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.module-drag-handle {
  display: grid;
  width: 34px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  color: #777;
  background: transparent;
  font-size: 19px;
  line-height: 1;
  cursor: grab;
  place-items: center;
}

.module-drag-handle:hover,
.module-drag-handle:focus-visible {
  color: var(--ink);
  background: #eeeeee;
}

.module-drag-handle:active { cursor: grabbing; }

.module-row.is-dragging {
  opacity: 0.48;
  background: #eef6f3;
}

.module-marker {
  align-self: stretch;
  border-radius: 2px;
}

.module-meta {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
}

.module-main { min-width: 0; }

.module-name-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.editor-empty {
  margin: 18px 0;
  color: var(--muted);
}

.editor-dialog {
  width: min(92vw, 520px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
}

.editor-dialog::backdrop { background: rgba(0, 0, 0, 0.5); }

.editor-dialog form {
  display: grid;
  gap: 10px;
  padding: 22px;
}

.editor-dialog header,
.editor-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.editor-dialog header { margin-bottom: 10px; }
.editor-dialog footer { justify-content: flex-end; margin-top: 14px; }
.editor-dialog h2 { margin: 0; font-size: 21px; }
.editor-dialog label { margin-top: 4px; font-size: 13px; font-weight: 800; }

.project-browser-shell { max-width: 980px; }

.project-browser-toolbar {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
}

.project-browser-archived {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.project-browser-archived input { width: 17px; height: 17px; }

.project-browser {
  display: grid;
  margin-top: 26px;
  grid-template-columns: minmax(250px, 0.8fr) minmax(340px, 1.2fr);
  border: 1px solid var(--line);
}

.project-browser-column { min-width: 0; }
.project-browser-column + .project-browser-column { border-left: 1px solid var(--line); }

.project-browser-header {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  color: #fff;
  background: #242728;
}

.project-browser-header h2 {
  overflow: hidden;
  margin: 0;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-browser-add,
.project-browser-edit {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  place-items: center;
}

.project-browser-add {
  margin-left: auto;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.project-browser-add:hover:not(:disabled) { background: rgba(255, 255, 255, 0.26); }
.project-browser-add:disabled { opacity: 0.35; cursor: not-allowed; }

.project-browser-list { min-height: 360px; background: #fafafa; }

.project-browser-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  border-bottom: 1px solid var(--line);
}

.project-browser-row.is-archived { opacity: 0.62; }

.project-browser-item {
  display: grid;
  width: 100%;
  min-height: 68px;
  align-items: center;
  gap: 12px;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  padding: 10px 14px;
  border: 0;
  border-bottom: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.project-browser-item:hover,
.project-browser-item.is-selected { background: #eef6f3; }

.project-browser-item.is-selected { box-shadow: inset 4px 0 var(--accent); }

.project-browser-edit {
  align-self: center;
  color: var(--ink);
  background: transparent;
}

.project-browser-edit:hover { color: var(--accent); background: #edf3f1; }

.project-browser-icon {
  display: grid;
  width: 42px;
  height: 42px;
  border-radius: 6px;
  color: #fff;
  background: #5b6970;
  font-size: 18px;
  place-items: center;
}

.project-browser-column + .project-browser-column .project-browser-icon { background: #b55f89; }

.project-browser-item strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
}

.project-browser-meta { color: var(--muted); font-size: 12px; }
.project-browser-list .editor-empty { padding: 18px 14px; }

.editor-dialog textarea,
.editor-dialog select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #bbb;
  border-radius: 4px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.editor-dialog textarea { resize: vertical; }
.dialog-status { min-height: 20px; margin: 2px 0 0; color: #a32828; font-size: 13px; }
.dialog-spacer { flex: 1 1 auto; }
.button--danger { border-color: #a32828; color: #fff; background: #a32828; }
.button--danger:hover { background: #842020; }

.project-editor-page { overflow: hidden; background: #f6f7f6; }

.project-editor-shell [hidden] { display: none !important; }

.project-editor-shell {
  display: grid;
  height: 100vh;
  min-height: 0;
  grid-template-rows: 66px minmax(0, 1fr);
}

.project-editor-topbar {
  display: grid;
  z-index: 3;
  align-items: center;
  gap: 16px;
  grid-template-columns: auto minmax(180px, 1fr) minmax(120px, auto) auto;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.project-editor-topbar .button i { margin-right: 6px; }

.project-editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-editor-actions .button { white-space: nowrap; }

.project-editor-identity { min-width: 0; }
.project-editor-identity p { margin: 0 0 2px; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.project-editor-identity h1 { overflow: hidden; margin: 0; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.project-editor-topbar .editor-status { margin: 0; text-align: right; }

.project-editor-workspace {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(250px, 310px) minmax(340px, 410px) minmax(420px, 1fr);
}

.project-editor-pane {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 18px;
  background: #fff;
}

.project-editor-pane + .project-editor-pane { border-left: 1px solid var(--line); }

.project-editor-tree-pane { background: #f4f5f4; }
.project-editor-modules-pane { background: #fafafa; }

.project-editor-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-editor-pane-header h2 { margin: 0; font-size: 18px; }

.project-editor-modules-pane .editor-page-header h2 { font-size: 21px; }

.editor-page-settings--stacked {
  align-items: stretch;
  flex-direction: column;
  gap: 10px;
  padding: 18px 0;
}

.project-editor-modules-pane .module-row {
  grid-template-columns: 32px 6px minmax(0, 1fr) 36px;
  padding: 10px 0;
}

.module-row.is-selected {
  box-shadow: inset 3px 0 var(--accent);
  background: #eef6f3;
}

.project-editor-content-pane {
  position: relative;
  background: #fff;
}

.module-content-empty,
.module-content-placeholder {
  display: grid;
  min-height: 60vh;
  color: #b5b8b7;
  place-content: center;
  text-align: center;
}

.module-content-empty i,
.module-content-placeholder i { font-size: 84px; }
.module-content-empty p { margin: 16px 0 0; font-size: 15px; }
.module-content-selection h2 { margin: 0; font-size: 24px; }
.module-content-placeholder { min-height: 48vh; }

.module-content-header {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.module-content-loading { padding: 24px 0; color: var(--muted); }

.module-content-form {
  display: grid;
  gap: 16px;
  padding: 20px 0 40px;
}

.module-content-form > label,
.module-content-option label,
.rich-field > label,
.code-field > label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 800;
}

.module-content-form > input,
.module-content-option select,
.code-editor {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cfd3d1;
  border-radius: 5px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.module-content-fields { display: grid; gap: 18px; }

.rich-field,
.code-field { min-width: 0; }

.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 5px;
  border: 1px solid #cfd3d1;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  background: #f1f3f2;
}

.rich-tool {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  color: #222;
  background: transparent;
  font: inherit;
  cursor: pointer;
  place-items: center;
}

.rich-tool:hover,
.rich-tool:focus-visible { background: #fff; box-shadow: 0 0 0 1px #c9cdcb; }
.rich-tool.is-active { color: #fff; background: var(--accent); }

.rich-editor {
  min-height: 190px;
  overflow-wrap: anywhere;
  padding: 14px;
  border: 1px solid #cfd3d1;
  border-radius: 0 0 5px 5px;
  outline: none;
  background: #fff;
  line-height: 1.55;
}

.rich-editor:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(11, 107, 95, 0.14); }
.rich-editor p:first-child { margin-top: 0; }
.rich-editor p:last-child { margin-bottom: 0; }

.code-editor {
  min-height: 150px;
  resize: vertical;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.45;
}

.rich-source {
  min-height: 190px;
  border-radius: 0 0 5px 5px;
}

.embed-preview {
  display: grid;
  min-height: 120px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f4f5f4;
  place-items: center;
}

.embed-preview p { margin: 0; padding: 22px; color: var(--muted); text-align: center; }
.embed-preview iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; }

.module-existing-data {
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.module-existing-data h3 { margin: 12px 0; font-size: 16px; }

.media-add-form {
  display: grid;
  align-items: end;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f6f8f7;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) auto;
}

.media-add-form label { font-size: 12px; font-weight: 800; }
.media-add-field { display: grid; min-width: 0; gap: 5px; }

.media-limit-notice {
  margin: 0 0 16px;
  padding: 11px 13px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  background: #f2f7f5;
}

.media-add-form input,
.media-edit-form input {
  min-width: 0;
  width: 100%;
  padding: 8px 9px;
  border: 1px solid #cfd3d1;
  border-radius: 4px;
  background: #fff;
  font: inherit;
}

.media-add-form input[type="file"] { padding: 6px; font-size: 12px; }
.media-add-form--link { grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1.2fr) auto; }

.existing-media-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
}

.existing-media-item {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8f9f8;
}

.media-manager-item { transition: opacity 120ms ease, box-shadow 120ms ease; }
.media-manager-item.is-dragging { opacity: 0.55; box-shadow: 0 0 0 2px var(--accent); }

.media-manager-preview {
  display: grid;
  min-height: 112px;
  color: #747a77;
  background: #edf0ee;
  place-items: center;
  text-decoration: none;
}

.media-manager-preview > i { font-size: 34px; }

.existing-media-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.existing-media-item > i { display: grid; min-height: 100px; color: #8b918e; font-size: 32px; place-items: center; }
.existing-media-item p { overflow-wrap: anywhere; margin: 0; padding: 8px; font-size: 12px; }

.media-edit-form { display: grid; gap: 7px; padding: 9px; }
.media-edit-form input { font-size: 12px; }

.media-manager-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.media-manager-actions .icon-button { width: 31px; height: 31px; }
.media-drag-handle { cursor: grab; }
.media-drag-handle:active { cursor: grabbing; }

.chart-editor { display: grid; gap: 8px; }

.chart-editor-heading,
.chart-editor-row {
  display: grid;
  align-items: center;
  gap: 8px;
  grid-template-columns: 38px minmax(180px, 1fr) minmax(80px, 120px) minmax(130px, 170px) 38px;
}

.chart-editor-heading {
  padding: 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.chart-editor-row {
  padding: 8px;
  border: 1px solid var(--line);
  background: #fff;
  transition: opacity 120ms ease, box-shadow 120ms ease;
}

.chart-editor-row.is-dragging { opacity: 0.55; box-shadow: 0 0 0 2px var(--accent); }

.chart-editor-heading--list,
.chart-editor-row--list {
  grid-template-columns: 38px minmax(180px, 1fr) minmax(125px, 155px) minmax(150px, 180px) 38px;
}

.chart-editor-heading--double-list,
.chart-editor-row--double-list {
  grid-template-columns: 38px minmax(170px, 1fr) minmax(120px, 145px) minmax(150px, 180px) minmax(170px, 1fr) 38px;
}

.chart-editor-row input,
.chart-editor-row select {
  min-width: 0;
  width: 100%;
  padding: 8px 9px;
  border: 1px solid #cfd3d1;
  border-radius: 4px;
  background: #fff;
  font: inherit;
}

.chart-row-drag { cursor: grab; }
.chart-row-drag:active { cursor: grabbing; }

.chart-icon-field {
  display: grid;
  align-items: center;
  gap: 7px;
  grid-template-columns: 30px minmax(0, 1fr);
}

.chart-icon-field img { width: 28px; height: 28px; object-fit: contain; }

.chart-result-picker {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(3, 40px);
}

.chart-result-picker button {
  display: grid;
  width: 40px;
  height: 36px;
  padding: 5px;
  border: 1px solid #cfd3d1;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  place-items: center;
}

.chart-result-picker button:hover,
.chart-result-picker button:focus-visible { border-color: var(--ink); }
.chart-result-picker button.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(25, 116, 84, 0.2); }
.chart-result-picker img { width: 22px; height: 22px; object-fit: contain; }

.chart-color-field {
  display: grid;
  align-items: center;
  gap: 7px;
  grid-template-columns: 16px minmax(0, 1fr);
}

.chart-color-swatch { width: 16px; height: 16px; border: 1px solid rgba(0, 0, 0, 0.16); border-radius: 50%; }
.chart-color-swatch[data-color="green"] { background: #238b57; }
.chart-color-swatch[data-color="orange"] { background: #d87a18; }
.chart-color-swatch[data-color="red"] { background: #c43d3d; }
.chart-color-swatch[data-color="blue"] { background: #2774ae; }
.chart-color-swatch[data-color="yellow"] { background: #c99a16; }

.chart-editor-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 6px; }
.chart-editor-actions .button i { margin-right: 6px; }
.module-content-note { margin: 0; padding: 14px; border-left: 3px solid var(--accent); background: #f2f7f5; }
.module-content-actions { display: flex; justify-content: flex-end; padding-top: 4px; }
.module-content-actions .button i { margin-right: 6px; }

.editor-dialog--templates { width: min(94vw, 860px); }

.template-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.template-fieldset legend {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 800;
}

.template-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
}

.template-option {
  display: grid;
  min-width: 0;
  gap: 8px;
  justify-items: center;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  cursor: pointer;
}

.template-option:hover { border-color: #999; background: #f7f7f7; }
.template-option.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(11, 107, 95, 0.18); }

.template-option-icon {
  display: grid;
  width: 52px;
  height: 52px;
  border-radius: 7px;
  color: #fff;
  font-size: 23px;
  place-items: center;
}

.template-option > span:last-child {
  overflow: hidden;
  width: 100%;
  font-size: 11px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1150px) and (min-width: 761px) {
  .project-editor-workspace {
    grid-template-columns: 260px 350px minmax(360px, 1fr);
    overflow-x: auto;
  }
}

@media (max-width: 1100px) and (min-width: 761px) {
  .editor-browser {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .editor-projects { border-right: 0; }

  .editor-stage {
    grid-column: 1 / -1;
    padding: 0;
    border-top: 1px solid var(--line);
  }

  .editor-stage-empty { min-height: 220px; }
}

.button-secondary {
  color: #202526;
  border-color: #c9cecf;
  background: #fff;
}

.button-secondary:hover {
  color: #075249;
  border-color: #075249;
  background: #f4f8f7;
}

.user-admin-shell { max-width: 1500px; }

.user-notice {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #c9cecf;
  border-radius: 6px;
  background: #f5f7f7;
}

.user-notice--success {
  color: #075249;
  border-color: #92c8ba;
  background: #edf8f4;
}

.user-notice--error {
  color: #8c1f28;
  border-color: #e4a7ac;
  background: #fff3f4;
}

.user-notice--compact {
  margin: 14px 0;
  font-size: 14px;
}

.user-admin-layout {
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
  min-height: 680px;
  border: 1px solid #d9dddd;
  background: #fff;
}

.user-directory {
  padding: 20px 0;
  border-right: 1px solid #d9dddd;
  background: #f5f6f6;
}

.user-field-label {
  display: block;
  margin: 0 18px 7px;
  font-size: 13px;
  font-weight: 700;
}

.user-search {
  width: calc(100% - 36px);
  min-height: 42px;
  margin: 0 18px 16px;
  padding: 9px 11px;
  border: 1px solid #bfc5c5;
  border-radius: 4px;
  background: #fff;
  font: inherit;
}

.user-search:focus,
.user-field input:focus,
.user-field select:focus {
  outline: 2px solid #7fb8ad;
  outline-offset: 1px;
  border-color: #075249;
}

.user-list {
  max-height: 760px;
  overflow: auto;
  border-top: 1px solid #d9dddd;
}

.user-list-item {
  display: grid;
  gap: 3px;
  padding: 13px 18px;
  color: #202526;
  border-bottom: 1px solid #d9dddd;
  text-decoration: none;
}

.user-list-item:hover { background: #e9eeee; }

.user-list-item[hidden] { display: none; }

.user-list-item.is-active {
  padding-left: 14px;
  border-left: 4px solid #075249;
  background: #fff;
}

.user-list-item strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.user-list-item span { font-size: 13px; }

.user-list-item small {
  color: #667070;
  font-size: 12px;
}

.user-list-empty { padding: 20px 18px; color: #667070; }

.user-editor { min-width: 0; }

.user-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px;
  border-bottom: 1px solid #d9dddd;
}

.user-editor-heading p {
  margin: 0 0 4px;
  color: #667070;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.user-editor-heading h2 { margin: 0; overflow-wrap: anywhere; font-size: 22px; }

.user-status {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.user-status.is-active { color: #075249; background: #dff1eb; }
.user-status.is-inactive { color: #6d3136; background: #f2dfe1; }

.user-form-section {
  padding: 24px 26px;
  border-bottom: 1px solid #d9dddd;
}

.user-form-section h3 { margin: 0 0 18px; font-size: 17px; }

.user-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.user-field { display: grid; align-content: start; gap: 7px; }
.user-field--wide { grid-column: 1 / -1; }
.user-field > span { font-size: 13px; font-weight: 700; }
.user-field small { color: #667070; font-size: 12px; }

.user-field input,
.user-field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #bfc5c5;
  border-radius: 4px;
  background: #fff;
  font: inherit;
}

.user-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  font-weight: 700;
}

.user-toggle input,
.permission-option input { width: 18px; height: 18px; accent-color: #075249; }

.user-section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.user-section-heading h3 { margin-bottom: 5px; }
.user-section-heading p { margin: 0; color: #667070; font-size: 13px; }

.user-section-heading > span {
  flex: 0 0 auto;
  padding: 5px 8px;
  color: #075249;
  border: 1px solid #a8cbc3;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.assigned-permissions {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.assigned-permission {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid #d9dddd;
  border-radius: 4px;
  background: #fafbfb;
}

.assigned-permission > div { display: grid; gap: 3px; min-width: 0; }
.assigned-permission strong { overflow-wrap: anywhere; font-size: 14px; }
.assigned-permission span { color: #667070; font-size: 12px; }

.permission-remove {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 0;
  color: #8c1f28;
  border: 1px solid #d7b2b6;
  border-radius: 4px;
  background: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.permission-remove:hover { color: #fff; border-color: #8c1f28; background: #8c1f28; }
.permission-empty { margin: 0; padding: 14px; color: #667070; border: 1px dashed #bfc5c5; }
.permission-empty[hidden] { display: none; }

.permission-add {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #d9dddd;
}

.permission-add > label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 700; }

.permission-add > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.permission-add select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #bfc5c5;
  border-radius: 4px;
  background: #fff;
  font: inherit;
}

.user-form-actions {
  display: flex;
  gap: 10px;
  padding: 20px 26px;
  background: #f5f6f6;
}

.project-access-shell { max-width: 1050px; }

.project-access-kicker {
  margin: 0 0 5px;
  color: #667070;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.project-access-panel {
  border: 1px solid #d9dddd;
  background: #fff;
}

.project-access-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  border-bottom: 1px solid #d9dddd;
  background: #f5f6f6;
}

.project-access-toolbar h2 { margin: 0 0 4px; font-size: 19px; }
.project-access-toolbar p { margin: 0; color: #667070; font-size: 13px; }

.project-access-search {
  display: grid;
  gap: 6px;
  width: min(100%, 360px);
}

.project-access-search span,
.project-access-add > label { font-size: 13px; font-weight: 700; }

.project-access-search input,
.project-access-add select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #bfc5c5;
  border-radius: 4px;
  background: #fff;
  font: inherit;
}

.project-access-search input:focus,
.project-access-add select:focus {
  outline: 2px solid #7fb8ad;
  outline-offset: 1px;
  border-color: #075249;
}

.project-access-list { padding: 0 24px; }

.project-access-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid #d9dddd;
}

.project-access-user[hidden] { display: none; }
.project-access-user > div { display: grid; gap: 3px; min-width: 0; }
.project-access-user strong { overflow-wrap: anywhere; font-size: 14px; }
.project-access-user span { font-size: 13px; }
.project-access-user small { color: #667070; font-size: 12px; }
.project-access-user form { margin: 0; }
.project-access-user .project-access-inactive { color: #8c1f28; font-weight: 700; }

.project-access-list > .permission-empty { margin: 18px 0; }

.project-access-add {
  padding: 22px 24px;
  border-top: 1px solid #d9dddd;
  background: #f5f6f6;
}

.project-access-add > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 7px;
}

.project-access-add > small { display: block; margin-top: 8px; color: #667070; }
.project-access-add .button:disabled { cursor: not-allowed; opacity: .55; }

@media (max-width: 900px) {
  .user-admin-layout { grid-template-columns: 240px minmax(0, 1fr); }
  .user-form-grid { grid-template-columns: 1fr; }
  .user-field--wide { grid-column: auto; }
}

@media (max-width: 760px) {
  .page-content { padding: 64px 20px 32px; }
  .page-content--cover { padding: 0; }

  .cover-title h1,
  .cover-title h2,
  .cover-title p { font-size: inherit; }

  .cover-title {
    padding: 18px 20px;
    font-size: 34px;
    line-height: 1.12;
  }

  .section-navigation {
    gap: 10px;
  }

  .section-navigation-link {
    padding: 11px 12px;
  }

  .page-content--cover .section-navigation {
    right: 12px;
    bottom: 94px;
    left: 12px;
  }

  .page-content--cover .section-navigation-link strong {
    font-size: 13px;
  }

  .page-content--cover .report-footer-logo {
    width: 160px;
  }

  .menu-logo { width: 92px; }

  .lightbox { padding: 56px 14px 72px; }

  .chart-bar {
    grid-template-columns: 1fr 38px;
  }

  .chart--horizontal .chart-label {
    grid-column: 1 / -1;
  }

  .chart--vertical {
    overflow-x: auto;
  }

  .chart--vertical .chart-bar {
    flex: 0 0 100px;
  }

  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: 14px;
  }

  .project-row,
  .admin-header,
  .split-editor { display: block; }

  .project-catalog-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .client-project-toggle {
    grid-template-columns: 18px minmax(0, 1fr);
    padding: 12px;
  }

  .client-project-name { font-size: 18px; }

  .client-project-count {
    grid-column: 2;
    white-space: normal;
  }

  .year-filter { align-items: stretch; flex-direction: column; }
  .year-filter select, .year-filter .button { width: 100%; }

  .admin-actions { margin-top: 14px; }
  .admin-header-tools { align-items: stretch; justify-content: flex-start; margin-top: 14px; }
  .admin-navigation { justify-content: flex-start; margin-top: 14px; }
  .admin-header-tools .admin-navigation { width: 100%; margin-top: 0; }
  .maintenance-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .maintenance-summary article:nth-child(3) { border-left: 0; }
  .maintenance-summary article:nth-child(n+3) { border-top: 1px solid var(--line); }
  .media-audit-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .usage-filter { align-items: stretch; justify-content: flex-start; margin-top: 14px; }
  .usage-filter .button { width: 100%; }
  .usage-summary { grid-template-columns: 1fr; }
  .usage-summary span + span { border-top: 1px solid var(--line); border-left: 0; }
  .usage-layout { grid-template-columns: 1fr; }
  .usage-users { grid-column: auto; }
  .token-summary { grid-template-columns: 1fr; }
  .token-summary span + span { border-top: 1px solid var(--line); }

  .user-admin-layout { display: block; min-height: 0; }
  .user-directory { border-right: 0; border-bottom: 1px solid #d9dddd; }
  .user-list { max-height: 300px; }
  .user-editor-heading, .user-section-heading { align-items: flex-start; }
  .user-editor-heading, .user-form-section { padding-right: 18px; padding-left: 18px; }
  .permission-add > div { grid-template-columns: 1fr; }
  .permission-add .button { width: 100%; }
  .user-form-actions { position: sticky; bottom: 0; z-index: 2; padding: 14px 18px; border-top: 1px solid #d9dddd; }

  .project-access-toolbar { display: block; padding: 18px; }
  .project-access-search { width: 100%; margin-top: 16px; }
  .project-access-list { padding: 0 18px; }
  .project-access-add { padding: 18px; }
  .project-access-add > div { grid-template-columns: 1fr; }
  .project-access-add .button { width: 100%; }

  .project-row nav { margin-top: 14px; }

  .login-shell { padding: 26px 20px; }

  .admin-shell--wide { padding: 20px 16px; }

  .editor-toolbar {
    align-items: stretch;
    flex-direction: column;
    padding: 16px 0;
  }

  .editor-toolbar select { width: 100%; min-width: 0; }
  .editor-status { margin-left: 0; }

  .editor-workspace { display: block; min-height: 0; }

  .editor-browser { display: block; min-height: 0; }

  .editor-clients,
  .editor-projects {
    padding: 20px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .editor-stage { padding-left: 0; }
  .editor-stage-empty { min-height: 180px; }

  .editor-pages {
    padding: 20px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .editor-content { padding: 22px 0 50px; }

  .editor-page-header,
  .editor-page-settings { align-items: stretch; flex-direction: column; }

  .editor-page-settings { gap: 14px; }
  .editor-inline-form { width: 100%; }

  .module-row {
    align-items: start;
    grid-template-columns: 34px 6px minmax(0, 1fr);
  }

  .module-row > .editor-icon-actions { grid-column: 3; }
  .module-name-form { grid-template-columns: 1fr; }

  .project-editor-modules-pane .module-row {
    grid-template-columns: 34px 6px minmax(0, 1fr);
  }

  .project-editor-modules-pane .module-row > .editor-icon-actions { grid-column: 3; }

  .result-shell { margin-top: 8vh; }

  .project-browser { grid-template-columns: 1fr; }
  .project-browser-column + .project-browser-column { border-top: 1px solid var(--line); border-left: 0; }

  .project-editor-page { overflow: auto; }

  .project-editor-shell {
    height: auto;
    min-height: 100vh;
    grid-template-rows: auto auto;
  }

  .project-editor-topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .project-editor-topbar .editor-status {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: left;
  }

  .project-editor-actions .button {
    width: 42px;
    min-width: 42px;
    padding: 8px;
    text-align: center;
  }

  .project-editor-actions .button i { margin-right: 0; }
  .project-editor-actions .button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .project-editor-workspace { display: block; overflow: visible; }

  .project-editor-pane {
    max-height: none;
    overflow: visible;
    border-bottom: 1px solid var(--line);
  }

  .project-editor-pane + .project-editor-pane { border-left: 0; }
  .project-editor-tree-pane { max-height: 52vh; overflow: auto; }
  .module-content-empty, .module-content-placeholder { min-height: 240px; }
  .media-add-form, .media-add-form--link { grid-template-columns: 1fr; }
  .chart-editor-heading { display: none; }
  .chart-editor-row { grid-template-columns: 36px minmax(0, 1fr) 36px; }
  .chart-editor-row input,
  .chart-editor-row .chart-color-field,
  .chart-editor-row .chart-icon-field,
  .chart-editor-row .chart-result-picker { grid-column: 2; }
  .chart-editor-row > .icon-button:last-child { grid-column: 3; grid-row: 1; }
  .chart-editor-actions { align-items: stretch; flex-direction: column; }
  .chart-pie-layout { grid-template-columns: 1fr; }
  .chart-pie { width: min(82vw, 340px); }
  .report-section-title { font-size: 25px; }
  .body-columns { grid-template-columns: 1fr; }
  .image-text-layout { grid-template-columns: 1fr; }
  .rb-block { grid-template-columns: 1fr; }
  .rb-block + .rb-block { border-top: 1px solid var(--line); }
  .rb-media {
    border-top: 1px solid var(--line);
    border-right: 0;
    border-bottom: 1px solid var(--line);
    border-left: 0;
  }
  .rb-media:empty { display: none; }
  .media-grid--left, .media-grid--right { max-width: 100%; margin-right: 0; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .side-menu,
  .menu-toggle,
  .menu-toggle span,
  .menu-toggle::before,
  .menu-toggle::after,
  .media-grid img { transition: none; }
}
