:root {
  color-scheme: light;
  --background: #e9ecef;
  --surface: #ffffff;
  --surface-muted: #eceff1;
  --text: #1c1715;
  --muted: #697077;
  --border: #d9dde1;
  --accent: #687078;
  --accent-dark: #2a0f0b;
  --brand: #2a0f0b;
  --brand-soft: #eceff1;
  --white: #ffffff;
  --shadow: 0 18px 45px rgb(42 15 11 / 10%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

a {
  color: var(--accent);
}

a:hover,
a:focus {
  color: var(--accent-dark);
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  padding: 72px 0 52px;
  background:
    radial-gradient(circle at top left, rgb(104 112 120 / 14%), transparent 28rem),
    linear-gradient(135deg, #fffdf9 0%, #eceff1 100%);
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.1;
}

h1 {
  max-width: 760px;
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  letter-spacing: -0.05em;
}

h2 {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.lede {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.15rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  padding: 48px 0;
}

.card {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  justify-content: flex-start;
  padding: 28px;
  color: inherit;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.card:hover,
.card:focus {
  color: inherit;
  border-color: rgb(104 112 120 / 45%);
  transform: translateY(-3px);
  box-shadow: 0 22px 55px rgb(21 32 51 / 14%);
}

.report-app {
  --canvas: #e9ecef;
  --panel: #f4f5f6;
  --ink: #1c1715;
  --line: #d9dde1;
  --radius-lg: 10px;
  --radius-md: 8px;
  --radius-sm: 6px;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 0 0, rgb(104 112 120 / 10%), transparent 28rem),
    var(--canvas);
  -webkit-font-smoothing: antialiased;
}

.report-app button,
.report-app input,
.report-app select {
  font: inherit;
}

.report-app button,
.report-app a {
  -webkit-tap-highlight-color: transparent;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.app-shell {
  display: grid;
  grid-template-rows: 76px minmax(0, 1fr);
  height: 100dvh;
  min-height: 100vh;
  overflow: hidden;
}

.topbar {
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 28px;
  border-bottom: 1px solid rgb(42 15 11 / 10%);
  background: rgb(255 253 249 / 90%);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand-link {
  color: inherit;
  text-decoration: none;
}

.brand-link:hover,
.brand-link:focus {
  color: inherit;
}

.brand-mark {
  display: block;
  width: 58px;
  height: 38px;
  margin-right: 15px;
  object-fit: contain;
}

.brand-copy {
  min-width: 0;
}

.home-brand {
  margin-bottom: 28px;
}

.brand-name {
  margin: 0;
  color: var(--brand);
  font-size: 16px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.brand-section {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--white);
  font-size: 12px;
  font-weight: 720;
  text-decoration: none;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.home-link:hover,
.home-link:focus {
  border-color: rgb(104 112 120 / 55%);
  color: var(--ink);
  background: var(--brand-soft);
}

.home-link__icon {
  width: 18px;
  height: 18px;
}

.workspace {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  padding: 18px;
  gap: 18px;
}

.workspace.sidebar-hidden {
  grid-template-columns: minmax(0, 1fr);
}

.sidebar,
.viewer {
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgb(42 15 11 / 9%);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.sidebar {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  height: 100%;
}

.sidebar-heading {
  padding: 24px 66px 20px 24px;
}

.sidebar-toggle {
  position: absolute;
  top: 19px;
  right: 18px;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--white);
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus {
  border-color: rgb(104 112 120 / 55%);
  background: var(--brand-soft);
}

.sidebar-toggle svg {
  width: 17px;
  height: 17px;
}

.workspace.sidebar-hidden .sidebar {
  display: none;
}

.sidebar-reopen {
  position: absolute;
  top: 37px;
  left: 30px;
  z-index: 4;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 8px 24px rgb(42 15 11 / 16%);
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.sidebar-reopen:hover,
.sidebar-reopen:focus {
  border-color: rgb(104 112 120 / 55%);
  background: var(--white);
}

.sidebar-reopen[hidden] {
  display: none;
}

.sidebar-reopen svg {
  width: 18px;
  height: 18px;
}

.report-app .eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.report-app h1 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(25px, 2vw, 31px);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1.08;
  text-wrap: balance;
}

.filters {
  display: grid;
  gap: 12px;
  padding: 0 24px 20px;
  border-bottom: 1px solid var(--line);
}

.field-control {
  width: 100%;
  min-height: 43px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  color: var(--ink);
  background: var(--white);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field-control {
  padding: 9px 11px;
}

.field-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(104 112 120 / 14%);
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 10px;
}

.report-app[data-report-kind="approval"] .filter-grid .field:last-child {
  grid-column: 1 / -1;
}

.field {
  display: grid;
  gap: 6px;
}

.field-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.filter-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
}

.test-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--panel);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.test-toggle:hover,
.test-toggle:focus-within {
  border-color: var(--accent);
  background: var(--white);
}

.test-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

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

.clear-button {
  padding: 4px 0;
  border: 0;
  color: var(--accent);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.clear-button[hidden] {
  display: none;
}

.report-list {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: #b8bec4 transparent;
}

.report-list-empty {
  margin: 36px 18px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
}

.report-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.report-item + .report-item {
  margin-top: 2px;
}

.report-item:hover {
  border-color: var(--line);
  background: var(--panel);
  transform: translateY(-1px);
}

.report-item[aria-current="true"] {
  border-color: rgb(104 112 120 / 28%);
  background: var(--brand-soft);
}

.country-badge {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  color: var(--white);
  background: var(--brand);
  line-height: 1;
  overflow: hidden;
  position: relative;
}

.country-flag {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.report-copy {
  min-width: 0;
}

.report-primary {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.new-tag {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--white);
  background: #568364;
  font-size: 9px;
  font-weight: 820;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.status-tag {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 820;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.status-tag--test {
  color: #7b2f20;
  background: #fff0ec;
}

.status-tag--approved {
  color: #1e5a35;
  background: #e6f5eb;
}

.status-tag--activated {
  color: #1d4f73;
  background: #e7f3fb;
}

.report-secondary {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.report-arrow {
  color: var(--muted);
  font-size: 18px;
  transition: translate 150ms ease;
}

.report-item:hover .report-arrow,
.report-item[aria-current="true"] .report-arrow {
  color: var(--accent);
  translate: 2px 0;
}

.viewer {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  background: #dfe3e6;
}

.viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding: 14px 18px 14px 23px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.workspace.sidebar-hidden .viewer-toolbar {
  padding-left: 68px;
}

.viewer-title {
  min-width: 0;
}

.viewer-heading-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.viewer-title h2 {
  min-width: 0;
  overflow: hidden;
  margin: 0;
  font-size: 15px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer-tags {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
}

.viewer-tags[hidden] {
  display: none;
}

.viewer-title p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.open-link {
  display: inline-grid;
  place-items: center;
  align-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--white);
  font-size: 12px;
  font-weight: 720;
  text-decoration: none;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.open-link svg {
  width: 18px;
  height: 18px;
}

.open-link:hover {
  border-color: rgb(104 112 120 / 55%);
  background: var(--brand-soft);
}

.open-link[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.viewer-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  padding: 16px;
}

.report-frame {
  display: block;
  width: 100%;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 7px;
  background: var(--white);
  box-shadow: 0 8px 28px rgb(42 15 11 / 12%);
}

.frame-loading {
  position: absolute;
  inset: 16px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--muted);
  background: var(--white);
  font-size: 13px;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.frame-loading.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.loader {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.loader-ring {
  width: 28px;
  height: 28px;
  border: 3px solid var(--brand-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.error-banner {
  margin: 18px;
  padding: 14px 16px;
  border: 1px solid #e2bcb1;
  border-radius: 7px;
  color: #7b2f20;
  background: #fff0ec;
  font-size: 13px;
  line-height: 1.5;
}

@keyframes spin {
  to {
    rotate: 360deg;
  }
}

@media (max-width: 900px) {
  .report-app {
    overflow: auto;
  }

  .app-shell {
    display: block;
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .topbar {
    min-height: 70px;
    padding: 12px 18px;
  }

  .workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(620px, 75vh);
    overflow: visible;
    padding: 12px;
    gap: 12px;
  }

  .workspace.sidebar-hidden {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(620px, 75vh);
  }

  .sidebar {
    max-height: 580px;
  }

  .report-list {
    max-height: 285px;
  }
}

@media (max-width: 540px) {
  .brand-mark {
    width: 48px;
    height: 32px;
    margin-right: 10px;
  }

  .brand-section {
    display: none;
  }

  .workspace {
    grid-template-rows: auto minmax(520px, 72vh);
  }

  .sidebar-heading {
    padding: 22px 60px 16px 18px;
  }

  .filters {
    padding: 0 18px 18px;
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }

  .viewer-toolbar {
    align-items: flex-start;
    padding: 14px;
  }

  .viewer-title p {
    max-width: 22ch;
  }

  .viewer-stage {
    padding: 8px;
  }

  .frame-loading {
    inset: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.card__label {
  margin-bottom: 22px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card__title {
  margin-bottom: 12px;
  font-size: 1.6rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.card__description {
  color: var(--muted);
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 28px;
  color: var(--muted);
  font-size: 0.95rem;
}

.panel {
  margin: 32px 0 48px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.panel p {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--muted);
}

.site-footer {
  padding: 0 0 36px;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0;
}

.site-footer p + p {
  margin-top: 6px;
}

code {
  padding: 0.15em 0.35em;
  background: var(--surface-muted);
  border-radius: 6px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
}

@media (max-width: 640px) {
  .site-header {
    padding: 48px 0 36px;
  }

  .card {
    min-height: auto;
  }
}
