/* COHESION dark theme, locked palette ported from demos/electron-review. */
:root {
  --canvas: #141210;
  --surface: #1f1c17;
  --surface-2: #2a2620;
  --ink: #ede5d8;
  --ink-2: #b5a593;
  --ink-3: #8a887e;
  --olive: #9dab85;
  --border: rgba(237, 229, 216, 0.08);
  --border-strong: rgba(237, 229, 216, 0.16);
  --border-olive: rgba(157, 171, 133, 0.32);

  color: var(--ink);
  background: var(--canvas);
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

body {
  margin: 0;
}

button {
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  transition: background-color 160ms ease-out, border-color 160ms ease-out;
}

button:hover {
  border-color: var(--border-olive);
}

button:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
}

button:disabled {
  color: var(--ink-3);
  border-color: var(--border);
  cursor: default;
}

@media (prefers-reduced-motion: reduce) {
  button {
    transition: none;
  }
}

.shell {
  min-height: 100vh;
  padding: 28px;
  box-sizing: border-box;
}

.review {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 20px;
  max-width: 1120px;
  margin: 0 auto;
}

.gate,
.fallback,
.recommendation,
.workspace {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
}

.gate,
.fallback {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px;
  box-sizing: border-box;
}

.recommendation {
  padding: 24px;
  border-color: var(--border-olive);
}

.recommendation:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
}

.label {
  margin: 0 0 14px;
  color: var(--olive);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
}

.recommendation p:last-child {
  margin-bottom: 0;
  color: var(--ink-2);
}

.score-readout {
  display: grid;
  gap: 4px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-strong);
}

.score-readout strong {
  font-size: 22px;
  line-height: 1.2;
}

.score-readout span,
.fallback p,
.gate p {
  color: var(--ink-2);
}

.workspace {
  min-width: 0;
  overflow: hidden;
}

.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-strong);
}

.tabs button {
  min-width: 96px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
}

.tabs button:hover {
  color: var(--ink);
}

.tabs button.active {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--olive);
}

.evidence {
  height: 420px;
  overflow-y: auto;
  padding: 24px;
  box-sizing: border-box;
}

.evidence h2 {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 600;
}

.evidence p {
  margin: 0 0 24px;
  max-width: 68ch;
  color: var(--ink-2);
  text-wrap: pretty;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--border-strong);
  padding: 14px 20px;
}

#status {
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
}

#approve,
[data-retry-flow] {
  min-height: 44px;
  padding: 0 20px;
  background: var(--olive);
  border-color: var(--olive);
  color: #11170e;
  font-weight: 600;
}

#approve:hover,
[data-retry-flow]:hover {
  background: #aab894;
}

#approve:active,
[data-retry-flow]:active {
  background: #93a17c;
}

#approve:disabled {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--ink-3);
}

.turnstile-widget {
  min-height: 65px;
}

.sample-events {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.sample-events li {
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink-2);
}

.sample-score {
  font-weight: 600;
}

.mission,
.footer-note {
  max-width: 1120px;
  margin: 16px auto 0;
  color: var(--ink-3);
  font-size: 12px;
}

.footer-note {
  margin-top: 4px;
}

@media (max-width: 760px) {
  .shell {
    padding: 18px;
  }

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

  .actions {
    align-items: stretch;
    flex-direction: column;
  }
}
