/* ODE Design Review Layer — review.css
   Non-canonical review aid for owner design review preview (v1.2).
   Self-contained: replicates design tokens from the canonical v1.2 design system. */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  padding-bottom: 64px;
}

.rv-wrap { max-width: 780px; margin: 0 auto; padding: 20px 16px; }

.rv-crumb { font-size: 13px; margin-bottom: 14px; }
.rv-crumb a { color: var(--primary); text-decoration: none; }
.rv-crumb a:hover { text-decoration: underline; }

h1 { font-size: 22px; margin-bottom: 4px; }
.rv-sub { color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.rv-scope {
  font-size: 12px; color: #92400e; background: #fef3c7; border: 1px solid #fde68a;
  border-radius: 8px; padding: 8px 12px; margin: 12px 0;
}

.rv-index { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 6px; }
.rv-index a {
  font-size: 12px; padding: 4px 10px; border: 1px solid var(--border);
  border-radius: 999px; background: white; text-decoration: none; color: var(--text);
}
.rv-index a:hover { border-color: var(--primary); color: var(--primary); }

section.rv-state {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin: 14px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.sid {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px; color: #1e40af; background: #dbeafe;
  padding: 2px 8px; border-radius: 999px; letter-spacing: .3px;
  margin-bottom: 8px;
}
section.rv-state h2 { font-size: 17px; margin-bottom: 4px; }
.rv-req { font-size: 13px; color: var(--muted); margin: 4px 0 12px; }

/* --- mock surfaces --- */
.mock {
  border: 1px dashed #cbd5e1; border-radius: 10px;
  padding: 12px; background: #f8fafc;
}
.mock + .mock { margin-top: 8px; }
.mock-dark { background: #0f172a; border-color: #334155; color: #e2e8f0; }

/* bars / banners */
.m-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 8px; font-size: 13px; font-weight: 500;
}
.m-bar.amber { background: #fef3c7; color: #92400e; }
.m-bar.red { background: #fee2e2; color: #991b1b; }
.m-bar.blue { background: #dbeafe; color: #1e40af; }
.m-bar.green { background: #d1fae5; color: #065f46; }
.m-bar.gray { background: #f1f5f9; color: #334155; }

/* cards */
.m-card {
  background: white; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px; font-size: 14px;
}
.m-card h4 { font-size: 14px; margin-bottom: 4px; }
.m-card p { font-size: 13px; color: var(--muted); }

/* buttons */
.m-btn {
  display: inline-block; border: none; border-radius: 9px;
  padding: 9px 16px; font-size: 14px; font-weight: 600;
  background: #e2e8f0; color: #334155; cursor: default;
}
.m-btn.primary { background: var(--primary); color: white; }
.m-btn.danger { background: var(--danger); color: white; }
.m-btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.m-btn.disabled, .m-btn[disabled] { background: #94a3b8; color: white; }
.m-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }

/* badges + dots */
.mbadge { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.mbadge.green { background: #d1fae5; color: #065f46; }
.mbadge.yellow { background: #fef3c7; color: #92400e; }
.mbadge.red { background: #fee2e2; color: #991b1b; }
.mbadge.blue { background: #dbeafe; color: #1e40af; }
.mbadge.gray { background: #f1f5f9; color: #475569; }

.mdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.mdot.green { background: var(--success); }
.mdot.amber { background: var(--warning); }
.mdot.red { background: var(--danger); }
.mdot.blue { background: var(--primary); }
.mdot.gray { background: #94a3b8; }

/* spinner + progress */
@keyframes rv-spin { to { transform: rotate(360deg); } }
.mspinner {
  width: 16px; height: 16px; border: 2px solid #cbd5e1; border-top-color: var(--primary);
  border-radius: 50%; animation: rv-spin 0.9s linear infinite;
  display: inline-block; vertical-align: -3px; flex: 0 0 auto;
}
.mprogress { height: 6px; background: #e2e8f0; border-radius: 999px; overflow: hidden; margin-top: 8px; }
.mprogress > i { display: block; height: 100%; width: 45%; background: var(--primary); border-radius: 999px; }

/* skeleton */
.mskel { background: linear-gradient(90deg,#e2e8f0 25%,#f1f5f9 50%,#e2e8f0 75%); border-radius: 6px; height: 12px; margin: 8px 0; }
.mskel.w60 { width: 60%; } .mskel.w80 { width: 80%; } .mskel.w40 { width: 40%; }

/* key-value rows */
.rv-kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.rv-kv:last-child { border-bottom: none; }
.rv-kv .k { color: var(--muted); } .rv-kv .v { font-weight: 600; text-align: right; }

/* notes */
.rv-actions { font-size: 13px; margin-top: 12px; }
.rv-actions strong { color: var(--text); }
.rv-note { font-size: 12px; color: var(--muted); margin-top: 6px; }
.rv-note code { background: #f1f5f9; padding: 1px 5px; border-radius: 5px; font-size: 11px; }

/* chips */
.rv-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rv-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px; background: #f1f5f9; border: 1px solid var(--border);
  border-radius: 999px; padding: 2px 8px; color: #334155;
}

/* tables */
.rv-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.rv-table th, .rv-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.rv-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); background: #f8fafc; }

/* accessibility demo */
.a11y-good { border-left: 4px solid var(--success); background: #f0fdf4; padding: 10px 12px; border-radius: 6px; font-size: 13px; }
.a11y-bad { border-left: 4px solid var(--danger); background: #fef2f2; padding: 10px 12px; border-radius: 6px; font-size: 13px; }

.rv-footer { font-size: 12px; color: var(--muted); margin-top: 28px; text-align: center; }
.rv-footer code { background: #f1f5f9; padding: 1px 5px; border-radius: 5px; }

/* hub pages */
.hub { max-width: 640px; margin: 0 auto; padding: 32px 16px; }
.hub .brand { font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 18px; }
.hub h1 { font-size: 24px; }
.hub .links { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
.hub a.link {
  display: block; background: white; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; text-decoration: none; color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06); transition: border-color .15s;
}
.hub a.link:hover { border-color: var(--primary); }
.hub a.link strong { display: block; font-size: 16px; margin-bottom: 4px; }
.hub a.link span { font-size: 13px; color: var(--muted); }
.hub a.link.primary { border-color: var(--primary); }
.hub footer { margin-top: 28px; font-size: 12px; color: var(--muted); }
.hub footer div { margin-top: 4px; }
.hub code { background: #f1f5f9; padding: 1px 5px; border-radius: 5px; }
