:root {
  --bg: #f5f6f3;
  --surface: #fff;
  --ink: #202c29;
  --muted: #626e69;
  --line: #dce2dc;
  --brand: #17634b;
  --tint: #eaf3ed;
  --fail: #a43132;
  --warn: #865b12;
  --success: #17634b;
  --radius: 12px;
  --space: 24px;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--brand);
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
button,
.button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  padding: 11px 16px;
  display: inline-block;
  font-weight: 600;
}
button:hover,
.button:hover {
  background: var(--tint);
}
button.primary,
.button.primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
input,
select {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: #fff;
  color: var(--ink);
  max-width: 100%;
}
:focus-visible {
  outline: 3px solid #538bda;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 224px;
  background: #eef1eb;
  border-right: 1px solid var(--line);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.logo {
  font-size: 20px;
  letter-spacing: -1px;
  font-weight: 750;
  margin-bottom: 48px;
  color: var(--ink);
}
.logo b {
  background: var(--brand);
  color: white;
  padding: 5px 9px;
  border-radius: 8px;
  margin-right: 8px;
}
.sidebar a.nav {
  padding: 13px;
  border-radius: 7px;
  color: var(--muted);
}
.sidebar a.active {
  background: #dfe9df;
  color: var(--brand);
  font-weight: 650;
}
.sidebar small {
  margin-top: auto;
  color: var(--muted);
  line-height: 1.7;
}
main {
  margin-left: 224px;
  padding: 0 44px 64px;
  max-width: 1900px;
}
.topbar {
  height: 86px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 42px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.7px;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 750;
}
h1 {
  font-size: 38px;
  letter-spacing: -1.5px;
  margin: 12px 0;
  line-height: 1.15;
}
h2 {
  font-size: 20px;
  letter-spacing: -0.5px;
  margin: 0 0 16px;
}
h3 {
  font-size: 15px;
  margin: 0 0 8px;
}
p {
  line-height: 1.6;
}
.muted {
  color: var(--muted);
}
.intro {
  margin-bottom: 32px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  min-width: 0;
}
.start-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr);
  gap: 24px;
}
.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 18px;
  margin: 28px 0 20px;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 9px;
}
input {
  width: 100%;
}
.help {
  font-size: 12px;
  color: var(--muted);
  margin: 9px 0;
}
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.steps {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}
.steps li {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 16px;
}
.steps b {
  color: var(--brand);
  font-size: 12px;
}
.steps p {
  font-size: 13px;
  margin: 5px 0 0;
  color: var(--muted);
}
.note {
  background: var(--tint);
  border-radius: 8px;
  padding: 16px;
  font-size: 13px;
  line-height: 1.7;
  margin-top: 24px;
}
.error {
  color: var(--fail);
}
.notice {
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  background: white;
  border-radius: 7px;
  margin: 20px 0;
  overflow-wrap: anywhere;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.metric {
  padding: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.metric strong {
  display: block;
  font-size: 30px;
  letter-spacing: -1px;
  margin-top: 10px;
}
.metric span {
  font-size: 12px;
  color: var(--muted);
}
.live-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 24px;
}
.queue {
  max-height: 680px;
  overflow: auto;
}
.queue-row {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.queue-row code {
  display: block;
  margin: 10px 0;
  color: var(--muted);
}
code,
pre {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  word-break: break-word;
}
pre {
  padding: 16px;
  background: var(--bg);
  border-radius: 7px;
  max-height: 300px;
  overflow: auto;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 650;
  padding: 4px 8px;
  background: var(--bg);
  border-radius: 5px;
}
.badge.fail {
  color: var(--fail);
  background: #fbeeed;
}
.badge.warn {
  color: var(--warn);
  background: #fbf3df;
}
.badge.pass {
  color: var(--success);
  background: var(--tint);
}
.badge.not-measured {
  color: #5b6570;
  background: #edf0f4;
}
progress {
  width: 100%;
  height: 8px;
  accent-color: var(--brand);
  margin: 15px 0;
}
.category {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.category.active {
  background: var(--tint);
  border-radius: 6px;
  color: var(--brand);
  font-weight: 700;
}
.category small {
  white-space: nowrap;
}
.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0;
}
.filters > * {
  flex: 1;
  min-width: 150px;
}
.issue {
  border-top: 1px solid var(--line);
  padding: 20px 0;
}
.issue summary {
  cursor: pointer;
  display: flex;
  gap: 12px;
  align-items: center;
  list-style: none;
}
.issue summary strong {
  flex: 1;
  overflow-wrap: anywhere;
}
.issue summary::after {
  content: "+";
  color: var(--brand);
}
.issue[open] summary::after {
  content: "−";
}
.issue .evidence {
  margin-top: 20px;
  padding-left: 16px;
  border-left: 2px solid var(--line);
}
.coverage {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.coverage > div {
  flex: 1;
  padding: 16px;
  background: var(--bg);
  border-radius: 8px;
  min-width: 160px;
}
.coverage span {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.split-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
details.options {
  margin: 20px 0;
}
details.options label {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 16px 20px 0 0;
}
input[type="checkbox"] {
  width: auto;
}
.options input[type="number"] {
  width: 65px;
}
.empty {
  padding: 48px;
  text-align: center;
  color: var(--muted);
}
@media (min-width: 1500px) {
  main {
    padding-left: 64px;
    padding-right: 64px;
  }
  .panel {
    padding: 32px;
  }
}
@media (max-width: 1000px) {
  .sidebar {
    width: 180px;
  }
  main {
    margin-left: 180px;
    padding: 0 24px 40px;
  }
  .start-grid {
    grid-template-columns: 1fr;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .sidebar {
    position: static;
    width: auto;
    padding: 16px;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }
  .logo {
    margin: 0 auto 0 0;
    font-size: 17px;
  }
  .sidebar small {
    display: none;
  }
  .sidebar a.nav {
    padding: 8px;
  }
  main {
    margin: 0;
    padding: 0 16px 32px;
  }
  .topbar {
    height: 70px;
    margin-bottom: 28px;
  }
  .topbar select {
    width: 130px;
  }
  h1 {
    font-size: 30px;
  }
  .panel {
    padding: 20px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .live-grid {
    display: flex;
    flex-direction: column;
  }
  .live-grid .checks {
    order: -1;
  }
  .metrics {
    gap: 8px;
  }
  .metric {
    padding: 15px;
  }
  .issue summary {
    flex-wrap: wrap;
  }
  .issue summary strong {
    min-width: 180px;
  }
  .split-heading {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
/* The shared registry retains every existing merchant tool. */
.sidebar {
  overflow-y: auto;
}
.sidebar .logo {
  margin-bottom: 26px;
  flex-shrink: 0;
}
.workspace-links {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 24px;
}
.workspace-links .nav {
  font-size: 13px;
  padding: 10px 13px;
}
.workspace-section {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 18px 13px 8px;
}
@media (max-width: 700px) {
  .sidebar .logo {
    margin-bottom: 6px;
  }
  .workspace-links {
    flex-direction: row;
    overflow-x: auto;
    flex-basis: 100%;
    margin: 0;
    min-width: 0;
    padding-bottom: 4px;
  }
  .workspace-links .nav {
    flex-shrink: 0;
    white-space: nowrap;
  }
  .workspace-section {
    display: none;
  }
}
/* Shared chrome and compatibility tokens for existing feature pages. */
:root {
  color-scheme: light;
  --border: var(--line);
  --border-strong: #cbd5cd;
  --accent: var(--brand);
  --pass: var(--success);
  --text: var(--ink);
  --canvas-bg: var(--bg);
  --surface-muted: var(--bg);
  --surface-field: var(--surface);
  --text-subtle: var(--muted);
  --interactive: var(--brand);
  --interactive-hover: #0e4936;
  --btn-inverted: var(--brand);
  --btn-inverted-hover: #0e4936;
  --tag-neutral-bg: var(--bg);
  --tag-neutral-text: var(--muted);
  --tag-green-bg: var(--tint);
  --tag-green-text: var(--brand);
}
body.workspace-existing {
  display: block;
  background: var(--bg);
  color: var(--ink);
}
.workspace-main,
.workspace-existing .app-main {
  margin-left: 224px;
  padding: 0 44px 64px;
  min-width: 0;
  max-width: 1900px;
}
.workspace-main > .topbar {
  flex-shrink: 0;
}
.workspace-main .topbar select {
  min-width: 0;
  width: 160px;
  margin: 0;
  padding: 12px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 14px;
}
.workspace-page {
  min-width: 0;
  overflow-wrap: anywhere;
}
.workspace-existing .workspace-page > h1 {
  font-size: 36px;
  margin: 12px 0 20px;
  letter-spacing: -1px;
}
.workspace-existing .workspace-page .toolbar {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: var(--radius);
  gap: 16px;
  align-items: end;
}
.workspace-existing .workspace-page .toolbar select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  background: var(--surface);
  color: var(--ink);
}
.workspace-existing .workspace-page .toolbar > div {
  min-width: 0;
  flex: 1;
}
.workspace-existing .workspace-page .stat,
.workspace-existing .workspace-page .priority,
.workspace-existing .workspace-page .area-card {
  background: var(--surface);
  border-color: var(--line);
  padding: 24px;
}
.workspace-existing .workspace-page .area-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.workspace-existing .workspace-page .area-card header {
  gap: 16px;
}
.workspace-existing .workspace-page .area-card li {
  line-height: 1.65;
  margin: 8px 0;
}
.workspace-existing .workspace-page button.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}
.workspace-existing .workspace-page table {
  max-width: 100%;
}
.workspace-existing .workspace-page code,
.workspace-existing .workspace-page td {
  overflow-wrap: anywhere;
  word-break: break-word;
}
@media (min-width: 1500px) {
  .workspace-main,
  .workspace-existing .app-main {
    padding-left: 64px;
    padding-right: 64px;
  }
}
@media (max-width: 1100px) {
  .workspace-existing .workspace-page .area-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 1000px) {
  .workspace-main,
  .workspace-existing .app-main {
    margin-left: 180px;
    padding: 0 24px 40px;
  }
}
@media (max-width: 700px) {
  .workspace-main,
  .workspace-existing .app-main {
    margin: 0;
    padding: 0 16px 32px;
  }
  .workspace-existing .workspace-page .area-grid {
    grid-template-columns: 1fr;
  }
  .workspace-existing .workspace-page .toolbar {
    align-items: stretch;
  }
  .workspace-existing .workspace-page .toolbar > div {
    flex-basis: 100%;
  }
  .workspace-main .topbar select {
    width: 130px;
  }
  .workspace-existing .workspace-page select {
    min-width: 0;
    max-width: 100%;
  }
}
.audit-store-select {
  width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
}
.audit-parameters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 24px 0 12px;
}
.audit-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 0 26px;
  border-top: 1px solid var(--line);
}
.audit-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}
.audit-options input {
  width: auto;
  accent-color: var(--brand);
}
.audit-store-preview {
  align-self: start;
  overflow: hidden;
}
.selected-store-name {
  margin: 18px 0 8px;
  overflow-wrap: anywhere;
}
.audit-store-preview > code {
  display: block;
  color: var(--muted);
  margin-bottom: 20px;
}
.audit-store-shot {
  display: block;
  width: 100%;
  aspect-ratio: 16/11;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.audit-preview-empty {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 24px;
  color: var(--muted);
}
@media (max-width: 700px) {
  .audit-parameters {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Keep account controls together at the right edge of the shared header. */
.workspace-main > .topbar > .muted {
  flex: 1;
  min-width: 0;
}
.workspace-main > .topbar > #language {
  margin-left: auto;
  flex-shrink: 0;
}
.workspace-main > .topbar > .account-logout {
  flex-shrink: 0;
}
.audit-scope-controls {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 24px;
}
.audit-scope-controls select {
  width: 100%;
  min-width: 0;
}
.audit-scope-controls label {
  margin-top: 16px;
}
.audit-execution {
  margin: 24px 0;
}
.audit-execution p {
  font-size: 13px;
  overflow-wrap: anywhere;
}
