/* Verify console — dark, glassy, plain CSS (no build step). */

:root {
  /* surfaces */
  --bg: #080b12;
  --bg-elev: #0d121c;
  --surface: rgba(20, 26, 38, 0.72);
  --surface-solid: #141a26;
  --surface-quiet: rgba(148, 166, 199, 0.06);

  /* lines */
  --border: rgba(148, 166, 199, 0.16);
  --border-strong: rgba(148, 166, 199, 0.3);

  /* text */
  --text: #e8edf7;
  --text-muted: #93a1bd;
  --text-dim: #6a7791;

  /* brand + states */
  --accent: #7c9cff;
  --accent-strong: #5b7dff;
  --accent-soft: rgba(124, 156, 255, 0.14);
  --teal: #4fd1c5;
  --pass: #3ddc97;
  --pass-soft: rgba(61, 220, 151, 0.14);
  --fail: #ff6b81;
  --fail-soft: rgba(255, 107, 129, 0.14);
  --unable: #ffc857;
  --unable-soft: rgba(255, 200, 87, 0.14);

  /* decoration */
  --grad-surface: linear-gradient(180deg, rgba(124, 156, 255, 0.1), rgba(124, 156, 255, 0) 42%);
  --grad-accent: linear-gradient(135deg, #5b7dff, #7c9cff 45%, #4fd1c5);
  --grad-dot: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0));
  --glow-accent: 0 0 0 1px rgba(124, 156, 255, 0.35), 0 18px 40px -18px rgba(91, 125, 255, 0.55);
  --shadow-card: 0 22px 50px -30px rgba(3, 7, 18, 0.9);

  /* geometry */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);

  --font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at 12% -8%, rgba(91, 125, 255, 0.22), transparent 62%),
    radial-gradient(760px 460px at 92% 4%, rgba(79, 209, 197, 0.12), transparent 60%),
    radial-gradient(900px 700px at 50% 120%, rgba(124, 156, 255, 0.08), transparent 65%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p,
ol,
ul {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

.icon {
  width: 16px;
  height: 16px;
  flex: none;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 20;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  color: var(--text);
  text-decoration: none;
}

.skip-link:focus {
  left: 12px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------- layout ---------- */

.shell {
  display: grid;
  grid-template-columns: 336px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  max-width: 1560px;
  margin: 0 auto;
  padding: 22px;
}

.sidebar {
  position: sticky;
  top: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: calc(100vh - 44px);
  max-height: calc(100vh - 44px);
  min-height: 0;
  overflow: hidden;
}

.main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* ---------- cards ---------- */

.card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background-color: var(--surface);
  background-image: var(--grad-surface);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 216, 255, 0.35), transparent);
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  flex: 0 1 auto;
  min-height: 0;
}

.panel-tasks {
  flex: 1 1 0;
  min-height: 152px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-quiet);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.pill-accent {
  border-color: rgba(124, 156, 255, 0.45);
  background: var(--accent-soft);
  color: var(--accent);
}

.hint {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-dim);
}

.hint .icon {
  margin-top: 2px;
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

/* ---------- act as ---------- */

.role-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-height: 96px;
  overflow-y: auto;
  padding-right: 6px;
  margin-right: -6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 166, 199, 0.28) transparent;
}

.role-list::-webkit-scrollbar,
.task-groups::-webkit-scrollbar {
  width: 6px;
}

.role-list::-webkit-scrollbar-thumb,
.task-groups::-webkit-scrollbar-thumb {
  background: rgba(148, 166, 199, 0.28);
  border-radius: var(--radius-pill);
}

.role {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.role:hover {
  background: var(--surface-quiet);
  border-color: var(--border);
}

.role input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-mark {
  position: relative;
  width: 14px;
  height: 14px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: rgba(8, 11, 18, 0.7);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.role-mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--grad-accent);
  transform: scale(0);
  transition: transform var(--transition);
}

.role input:checked + .role-mark {
  border-color: var(--accent);
  box-shadow: var(--glow-accent);
}

.role input:checked + .role-mark::after {
  transform: scale(1);
}

.role input:focus-visible + .role-mark {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.role:has(input:checked) {
  background: var(--accent-soft);
  border-color: rgba(124, 156, 255, 0.35);
}

.role-name {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role:has(input:checked) .role-name {
  color: var(--text);
}

.role-tag {
  margin-left: auto;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ---------- task groups ---------- */

.task-groups {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
  margin-right: -6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 166, 199, 0.28) transparent;
}

.task-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.group-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 0 2px;
}

.group-title {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.group-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

.task-item {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 11px 9px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.task-item:hover {
  background: var(--surface-quiet);
  border-color: var(--border);
}

.task-item::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 9px;
  bottom: 9px;
  width: 2px;
  border-radius: var(--radius-pill);
  background: transparent;
  transition: background var(--transition);
}

.task-item.is-active {
  background: var(--accent-soft);
  border-color: rgba(124, 156, 255, 0.4);
}

.task-item.is-active::before {
  background: var(--grad-dot), var(--accent);
  background-color: var(--accent);
}

.task-name {
  font-size: 13px;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.task-item.is-active .task-name {
  color: var(--text);
  font-weight: 600;
}

.task-checks {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

/* ---------- workflow checkpoints ---------- */

.workflow {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkpoint {
  font-size: 13px;
  color: var(--text-muted);
  padding-left: 12px;
  border-left: 2px solid rgba(124, 156, 255, 0.45);
}

.checkpoint strong {
  color: var(--text);
}

.earlier-toggle {
  align-self: flex-start;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  font-size: 12px;
}

.earlier-toggle .chevron {
  transition: transform var(--transition);
}

.earlier-toggle[aria-expanded="true"] .chevron {
  transform: rotate(90deg);
}

.earlier {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px dashed var(--border-strong);
  background: rgba(8, 11, 18, 0.4);
}

.earlier[hidden] {
  display: none;
}

.earlier li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.earlier .earlier-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

/* ---------- verify header ---------- */

.verify {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.verify-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.verify-headline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.badge {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(79, 209, 197, 0.4);
  background: rgba(79, 209, 197, 0.14);
  color: var(--teal);
}

.badge[data-tone="draft"] {
  border-color: rgba(255, 200, 87, 0.4);
  background: var(--unable-soft);
  color: var(--unable);
}

.badge[data-tone="progress"] {
  border-color: rgba(124, 156, 255, 0.4);
  background: var(--accent-soft);
  color: var(--accent);
}

.title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-size: 12px;
  color: var(--text-dim);
}

.meta-chip {
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-quiet);
  color: var(--text-muted);
  white-space: nowrap;
}

.meta-chip.is-code {
  font-family: var(--font-mono);
  font-size: 11px;
}

.meta-chip.is-accent {
  border-color: rgba(124, 156, 255, 0.4);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* ---------- progress ---------- */

.progress {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.dots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: rgba(8, 11, 18, 0.6);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  transition: border-color var(--transition), background var(--transition), color var(--transition),
    box-shadow var(--transition);
}

.dot[data-state="pass"] {
  border-color: rgba(61, 220, 151, 0.5);
  background: var(--pass-soft);
  color: var(--pass);
}

.dot[data-state="fail"] {
  border-color: rgba(255, 107, 129, 0.5);
  background: var(--fail-soft);
  color: var(--fail);
}

.dot[data-state="unable"] {
  border-color: rgba(255, 200, 87, 0.5);
  background: var(--unable-soft);
  color: var(--unable);
}

.dot[data-state="pass"],
.dot[data-state="fail"],
.dot[data-state="unable"] {
  font-weight: 600;
  box-shadow: 0 10px 24px -16px rgba(0, 0, 0, 0.9);
}

.summary {
  font-size: 12.5px;
  color: var(--text-dim);
}

.summary .count {
  color: var(--text);
  font-weight: 600;
}

.summary .sep {
  padding: 0 6px;
  color: rgba(148, 166, 199, 0.5);
}

.summary .num-pass {
  color: var(--pass);
}

.summary .num-fail {
  color: var(--fail);
}

.summary .num-unable {
  color: var(--unable);
}

/* ---------- checks ---------- */

.check-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.check-item {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background-color: rgba(13, 18, 28, 0.72);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: rise 260ms ease both;
}

.check-item[data-recorded="true"] {
  border-color: var(--border-strong);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.check-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.check-index {
  flex: none;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-quiet);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

.check-question {
  font-size: 14px;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.check-question b {
  color: var(--text);
  font-weight: 600;
}

.check-question code,
.expected code,
.checkpoint code {
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid rgba(124, 156, 255, 0.28);
  background: rgba(124, 156, 255, 0.12);
  font-family: var(--font-mono);
  font-size: 12px;
  color: #b9caff;
  overflow-wrap: anywhere;
}

.expected {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 11px 13px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(8, 11, 18, 0.55);
}

.expected-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.expected p {
  font-size: 12.5px;
  color: var(--text-muted);
}

.record-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.result-group {
  display: flex;
  flex: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(8, 11, 18, 0.5);
}

.result-btn {
  padding: 7px 16px;
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.result-btn:last-child {
  border-right: 0;
}

.result-btn:hover {
  background: var(--surface-quiet);
  color: var(--text);
}

.result-btn[aria-pressed="true"][data-status="pass"] {
  background: var(--pass-soft);
  color: var(--pass);
}

.result-btn[aria-pressed="true"][data-status="fail"] {
  background: var(--fail-soft);
  color: var(--fail);
}

.result-btn[aria-pressed="true"][data-status="unable"] {
  background: var(--unable-soft);
  color: var(--unable);
}

.note {
  flex: 1 1 220px;
  min-width: 0;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(8, 11, 18, 0.5);
  font-size: 12.5px;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.note::placeholder {
  color: var(--text-dim);
}

.note:focus {
  outline: none;
  border-color: rgba(124, 156, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(124, 156, 255, 0.14);
}

.status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
}

.status-line .state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

.status-line .state[data-status="pass"] {
  color: var(--pass);
}

.status-line .state[data-status="fail"] {
  color: var(--fail);
}

.status-line .state[data-status="unable"] {
  color: var(--unable);
}

.status-line .noted {
  color: var(--accent);
  font-weight: 500;
}

/* ---------- empty state ---------- */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 46px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: rgba(13, 18, 28, 0.55);
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-icon {
  display: inline-flex;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--accent-soft);
  color: var(--accent);
}

.empty-icon svg {
  width: 24px;
  height: 24px;
}

.empty-title {
  font-size: 15px;
  font-weight: 600;
}

.empty-copy {
  max-width: 44ch;
  font-size: 12.5px;
  color: var(--text-dim);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: rgba(8, 11, 18, 0.5);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition),
    transform var(--transition), box-shadow var(--transition);
}

.btn[hidden] {
  display: none;
}

.btn:hover {
  color: var(--text);
  border-color: rgba(124, 156, 255, 0.4);
}

.btn:active {
  transform: translateY(1px);
}

.btn-accent {
  flex: none;
  border-color: transparent;
  background-image: var(--grad-accent);
  color: #081020;
  box-shadow: 0 14px 34px -18px rgba(91, 125, 255, 0.9);
}

.btn-accent:hover {
  color: #081020;
  filter: brightness(1.06);
}

.btn-accent[data-state="copied"] {
  background-image: none;
  background-color: var(--pass-soft);
  border-color: rgba(61, 220, 151, 0.5);
  color: var(--pass);
}

.btn-accent[data-state="failed"] {
  background-image: none;
  background-color: var(--fail-soft);
  border-color: rgba(255, 107, 129, 0.5);
  color: var(--fail);
}

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 296px minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px;
  }

  .sidebar {
    position: static;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .panel,
  .panel-tasks {
    flex: 0 0 auto;
    min-height: 0;
  }

  .role-list,
  .task-groups {
    flex: 0 0 auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    margin-right: 0;
    padding-right: 0;
  }

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

  .btn-accent {
    align-self: flex-start;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 13.5px;
  }

  .shell {
    padding: 12px;
    gap: 14px;
  }

  .card,
  .check-item {
    border-radius: var(--radius);
  }

  .panel,
  .workflow,
  .verify,
  .check-item {
    padding: 14px;
  }

  .title {
    font-size: 18px;
  }

  .dot {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  .result-group {
    width: 100%;
  }

  .result-btn {
    flex: 1 1 0;
    padding: 9px 6px;
  }

  .note {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
