/* TraceByte address review · task-first UI layer
   Scoped to app.html so the editorial and premium site surfaces remain unchanged. */

:root {
  --review-navy: #0B1F3A;
  --review-navy-2: #14304F;
  --review-gold: #C9A24B;
  --review-gold-dark: #8A6D2F;
  --review-cream: #FBFAF7;
  --review-paper: #FFFFFF;
  --review-line: #E5E7EB;
  --review-ink: #111827;
  --review-ink-2: #374151;
  --review-muted: #6B7280;
  --review-muted-2: #4B5563;
  --review-amber: #A16207;
  --review-amber-bg: #FFFBEB;
  --review-red: #B42318;
  --review-red-bg: #FFF1F2;
  --review-green: #176B43;
  --review-green-bg: #F0FDF4;
}

body {
  background: var(--review-cream);
  color: var(--review-ink);
}

.wrapper {
  max-width: 1180px;
  padding: clamp(24px, 4vw, 48px) 24px 60px;
}

.container {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  gap: 22px;
  align-items: start;
}

.card {
  border-radius: 18px;
  padding: clamp(24px, 3.4vw, 36px);
  border-color: var(--review-line);
  box-shadow: 0 8px 24px rgba(11, 31, 58, .05);
}

.tool-card,
.coverage-preview {
  min-width: 0;
}

.tool-card h1 {
  margin-bottom: 10px;
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.14;
  letter-spacing: -.025em;
}

.coverage-preview .card-heading {
  margin-bottom: 10px;
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.18;
  letter-spacing: -.02em;
}

.tool-eyebrow,
.review-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  color: var(--review-gold-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.3;
  text-transform: uppercase;
}

.tool-eyebrow::before,
.review-eyebrow::before {
  width: 22px;
  height: 1px;
  background: currentColor;
  content: '';
}

.tool-lead,
.coverage-preview .card-lead {
  max-width: 62ch;
  margin-bottom: 24px;
  color: var(--review-muted-2);
  font-size: 15px;
  line-height: 1.6;
}

.field-label,
.chain-picker legend {
  display: block;
  margin-bottom: 7px;
  color: var(--review-navy);
  font-size: 13px;
  font-weight: 700;
}

.field-hint,
.chain-help {
  margin: 6px 0 0;
  color: var(--review-muted);
  font-size: 12px;
  line-height: 1.5;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, .32fr) auto;
  gap: 10px;
  margin: 0 0 16px;
}

.search-box input,
.chain-select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #CBD5E1;
  border-radius: 9px;
  background: #fff;
  color: var(--review-ink);
  font: inherit;
  font-size: 14px;
}

.search-box input::placeholder {
  color: #6B7280;
  opacity: 1;
}

.search-box input:focus,
.chain-select:focus {
  outline: 3px solid rgba(201, 162, 75, .22);
  outline-offset: 1px;
  border-color: var(--review-gold-dark);
  box-shadow: none;
}

.btn-search {
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 9px;
  background: var(--review-navy);
  font-size: 14px;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.btn-search:hover:not(:disabled) {
  background: var(--review-navy-2);
  box-shadow: 0 8px 20px rgba(11, 31, 58, .18);
  transform: translateY(-1px);
}

.btn-search:disabled {
  background: #64748B;
  opacity: .62;
}

.chain-picker {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.chain-picker legend {
  float: left;
  width: 100%;
  margin-bottom: 9px;
}

.chains {
  clear: both;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.chain-btn {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  color: var(--review-ink-2);
  font-size: 13px;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.chain-btn:hover:not(.dim),
.chain-btn:focus-visible:not(.dim) {
  border-color: var(--review-gold-dark);
  background: #FFFCF5;
}

.chain-btn.active {
  border-color: var(--review-navy);
  background: var(--review-navy);
  color: #fff;
}

.chain-btn.dim {
  opacity: .42;
}

.consent-row {
  margin-top: 16px !important;
  margin-bottom: 24px !important;
  padding: 13px 14px !important;
  border-left-width: 3px !important;
  border-radius: 0 8px 8px 0;
}

.consent-row label {
  font-size: 12px !important;
  line-height: 1.55 !important;
}

.tool-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 22px !important;
  padding-top: 17px !important;
  color: var(--review-muted) !important;
  font-size: 12px;
}

.tool-benefits > span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

.tool-benefits a {
  color: var(--review-navy);
  text-decoration: underline;
  text-decoration-color: rgba(201, 162, 75, .75);
  text-underline-offset: 3px;
}

.coverage-preview {
  background: #F8FAFC;
}

.coverage-preview .preview-list {
  display: grid;
  gap: 13px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.coverage-preview .preview-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding-top: 13px;
  border-top: 1px solid var(--review-line);
}

.coverage-preview .preview-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(201, 162, 75, .5);
  border-radius: 8px;
  color: var(--review-gold-dark);
  font-size: 14px;
  font-weight: 700;
}

.coverage-preview .preview-item strong {
  display: block;
  margin-bottom: 2px;
  color: var(--review-navy);
  font-size: 13px;
}

.coverage-preview .preview-item span {
  display: block;
  color: var(--review-muted);
  font-size: 12px;
  line-height: 1.5;
}

.coverage-preview .preview-link {
  display: inline-flex;
  margin-top: 22px;
  color: var(--review-navy);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(201, 162, 75, .75);
  text-underline-offset: 4px;
}

.results {
  grid-column: 1 / -1;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  scroll-margin-top: 90px;
}

.review-report {
  display: grid;
  gap: 16px;
}

.review-disclaimer {
  padding: 14px 16px;
  border: 1px solid #F3D19B;
  border-left: 3px solid #D97706;
  border-radius: 10px;
  background: rgba(217, 119, 6, .06);
}

.review-disclaimer-title {
  margin-bottom: 3px;
  color: #92400E;
  font-size: 13px;
  font-weight: 700;
}

.review-disclaimer-body,
.review-disclaimer a {
  color: var(--review-muted-2);
  font-size: 12px;
  line-height: 1.55;
}

.review-disclaimer a {
  display: inline-block;
  margin-top: 5px;
  color: var(--review-navy);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(201, 162, 75, .75);
  text-underline-offset: 3px;
}

.review-group {
  min-width: 0;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--review-line);
  border-radius: 16px;
  background: var(--review-paper);
  box-shadow: 0 7px 22px rgba(11, 31, 58, .04);
}

.review-group--risk {
  border-top: 3px solid var(--review-navy);
}

.review-group--coverage {
  border-top: 3px solid var(--review-gold);
}

.review-group--evidence {
  border-top: 3px solid #94A3B8;
}

.review-group-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.review-group-header h2 {
  margin: 0;
  color: var(--review-navy);
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.2;
}

.review-group-header p {
  max-width: 58ch;
  margin: 6px 0 0;
  color: var(--review-muted);
  font-size: 13px;
  line-height: 1.55;
}

.review-address {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  align-items: baseline;
  margin: -6px 0 21px;
  color: var(--review-muted);
  font-size: 12px;
}

.review-address code,
.review-provenance code {
  overflow-wrap: anywhere;
  color: var(--review-navy);
  font-family: var(--mono, ui-monospace, SFMono-Regular, Consolas, monospace);
  font-size: 12px;
}

.review-address .review-address-value {
  color: var(--review-ink-2);
}

.review-risk-layout {
  display: grid;
  grid-template-columns: minmax(220px, .72fr) minmax(0, 1.28fr);
  gap: 26px;
  align-items: center;
}

.review-score-wrap {
  display: grid;
  gap: 12px;
  align-content: center;
  min-height: 138px;
  padding: 20px;
  border: 1px solid var(--review-line);
  border-radius: 12px;
  background: #F8FAFC;
}

.review-score-label {
  color: var(--review-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.review-score {
  display: flex;
  gap: 5px;
  align-items: baseline;
  color: var(--review-navy);
  font-size: clamp(42px, 6vw, 58px);
  font-weight: 800;
  letter-spacing: -.05em;
  line-height: .95;
}

.review-score span {
  color: var(--review-muted);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
}

.review-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #E2E8F0;
}

.review-meter > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--review-navy);
}

.review-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 11px;
}

.review-status,
.review-model {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.review-status--navy {
  background: #E8EEF7;
  color: var(--review-navy);
}

.review-status--amber {
  background: var(--review-amber-bg);
  color: var(--review-amber);
}

.review-status--red {
  background: var(--review-red-bg);
  color: var(--review-red);
}

.review-model {
  border: 1px solid var(--review-line);
  background: #fff;
  color: var(--review-muted-2);
  font-weight: 600;
}

.review-risk-copy {
  color: var(--review-ink-2);
  font-size: 14px;
  line-height: 1.6;
}

.review-risk-copy strong {
  color: var(--review-navy);
}

.review-alert {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--review-red);
  border-radius: 0 8px 8px 0;
  background: var(--review-red-bg);
  color: var(--review-red);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.review-note {
  margin: 15px 0 0;
  color: var(--review-muted);
  font-size: 12px;
  line-height: 1.55;
}

.review-subsection {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--review-line);
}

.review-subsection h3 {
  margin: 0 0 11px;
  color: var(--review-navy);
  font-size: 15px;
  line-height: 1.3;
}

.review-component-list,
.review-factor-list,
.review-limitations,
.review-source-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.review-component-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid #F1F5F9;
}

.review-component-row:last-child {
  border-bottom: 0;
}

.review-component-name {
  color: var(--review-ink-2);
  font-size: 13px;
  font-weight: 600;
}

.review-component-detail {
  display: block;
  margin-top: 2px;
  color: var(--review-muted);
  font-size: 12px;
  line-height: 1.45;
}

.review-component-points {
  color: var(--review-navy);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.review-limitations li {
  position: relative;
  padding-left: 18px;
  color: var(--review-muted-2);
  font-size: 13px;
  line-height: 1.5;
}

.review-limitations li::before {
  position: absolute;
  top: .45em;
  left: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--review-gold);
  content: '';
}

.review-coverage-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.review-coverage-stat {
  padding: 14px 15px;
  border: 1px solid var(--review-line);
  border-radius: 10px;
  background: #F8FAFC;
}

.review-coverage-stat strong {
  display: block;
  color: var(--review-navy);
  font-size: 22px;
  line-height: 1;
}

.review-coverage-stat span {
  display: block;
  margin-top: 6px;
  color: var(--review-muted);
  font-size: 12px;
  line-height: 1.35;
}

.review-gap-banner {
  margin-bottom: 17px;
  padding: 12px 14px;
  border-left: 3px solid var(--review-amber);
  border-radius: 0 8px 8px 0;
  background: var(--review-amber-bg);
  color: var(--review-amber);
  font-size: 13px;
  line-height: 1.5;
}

.review-source-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.review-source-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--review-line);
  border-radius: 9px;
  background: #fff;
}

.review-source-status {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.review-source-status--ok {
  background: var(--review-green-bg);
  color: var(--review-green);
}

.review-source-status--unavailable,
.review-source-status--disabled,
.review-source-status--partial {
  background: var(--review-amber-bg);
  color: var(--review-amber);
}

.review-source-status--not_applicable {
  background: #F1F5F9;
  color: var(--review-muted-2);
}

.review-source-name {
  overflow-wrap: anywhere;
  color: var(--review-ink-2);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.review-source-note {
  margin-top: 2px;
  overflow-wrap: anywhere;
  color: var(--review-muted);
  font-size: 12px;
  line-height: 1.4;
}

.review-source-status-label {
  margin-top: 3px;
  color: var(--review-muted-2);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.review-details {
  margin-top: 16px;
  border-top: 1px solid var(--review-line);
}

.review-details summary {
  padding: 13px 0 2px;
  color: var(--review-navy);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.review-details summary::marker {
  color: var(--review-gold-dark);
}

.review-coverage-detail {
  padding-top: 10px;
}

.review-coverage-row {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) auto;
  gap: 10px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid #F1F5F9;
  font-size: 12px;
}

.review-coverage-row:last-child {
  border-bottom: 0;
}

.review-coverage-row strong {
  color: var(--review-ink-2);
}

.review-coverage-row span {
  color: var(--review-muted);
}

.review-coverage-row em {
  color: var(--review-navy);
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.review-method-note {
  margin: 13px 0 0;
  color: var(--review-muted);
  font-size: 12px;
  line-height: 1.5;
}

.review-next-step {
  margin-bottom: 20px;
  padding: 13px 15px;
  border: 1px solid var(--review-line);
  border-radius: 10px;
  background: #F8FAFC;
  color: var(--review-ink-2);
  font-size: 13px;
  line-height: 1.55;
}

.review-next-step strong {
  display: block;
  margin-bottom: 3px;
  color: var(--review-navy);
}

.review-factor-list {
  gap: 7px;
}

.review-factor {
  padding: 10px 12px;
  border-left: 3px solid #94A3B8;
  border-radius: 0 7px 7px 0;
  background: #F8FAFC;
  color: var(--review-ink-2);
  font-size: 13px;
  line-height: 1.5;
}

.review-factor--critical {
  border-left-color: var(--review-red);
  background: var(--review-red-bg);
}

.review-factor--warning {
  border-left-color: var(--review-amber);
  background: var(--review-amber-bg);
}

.review-factor--safe {
  border-left-color: var(--review-green);
  background: var(--review-green-bg);
}

.review-factor--neutral {
  border-left-color: #94A3B8;
  background: #F8FAFC;
}

.review-evidence-card {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--review-line);
  border-radius: 11px;
  background: #fff;
}

.review-evidence-card h3 {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin: 0 0 12px;
  color: var(--review-navy);
  font-size: 15px;
}

.review-evidence-card h3 span {
  color: var(--review-muted);
  font-size: 12px;
  font-weight: 600;
}

.review-inline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.review-mini-stat {
  padding: 11px 12px;
  border: 1px solid #EEF2F7;
  border-radius: 8px;
  background: #F8FAFC;
}

.review-mini-stat small {
  display: block;
  margin-bottom: 4px;
  color: var(--review-muted);
  font-size: 12px;
}

.review-mini-stat strong {
  color: var(--review-ink-2);
  font-size: 17px;
  line-height: 1.15;
}

.review-breakdown {
  display: grid;
  gap: 10px;
}

.review-breakdown-row {
  display: grid;
  gap: 5px;
}

.review-breakdown-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--review-muted-2);
  font-size: 12px;
}

.review-breakdown-label strong {
  color: var(--review-navy);
}

.review-breakdown-track {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #E2E8F0;
}

.review-breakdown-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.review-provenance {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--review-line);
  color: var(--review-muted);
  font-size: 12px;
  line-height: 1.5;
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.review-action {
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--review-navy);
  border-radius: 8px;
  background: var(--review-navy);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.review-action--secondary {
  background: #fff;
  color: var(--review-navy);
}

.review-action:hover {
  background: var(--review-navy-2);
}

.review-action--secondary:hover {
  background: #F8FAFC;
}

.review-action-note {
  margin: 10px 0 0;
  color: var(--review-muted);
  font-size: 12px;
  line-height: 1.5;
}

.review-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.review-stats-grid .stat-box {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--review-line);
  border-left: 3px solid var(--review-gold);
  border-radius: 9px;
  background: #F8FAFC;
}

.review-stats-grid .stat-label {
  margin-bottom: 5px;
  color: var(--review-muted);
  font-size: 12px;
  line-height: 1.3;
}

.review-stats-grid .stat-value {
  overflow-wrap: anywhere;
  color: var(--review-navy);
  font-size: 18px;
  line-height: 1.25;
}

.review-tx-wrap {
  overflow-x: auto;
  margin-top: 14px;
  border: 1px solid var(--review-line);
  border-radius: 10px;
}

.review-tx-wrap .tx-table {
  min-width: 680px;
  margin: 0;
}

.review-tx-wrap .tx-table th,
.review-tx-wrap .tx-table td {
  padding: 10px 12px;
  font-size: 12px;
}

.review-tx-wrap .tx-table th {
  background: #F8FAFC;
  color: var(--review-ink-2);
}

.review-empty {
  margin: 0;
  padding: 15px;
  border: 1px dashed #CBD5E1;
  border-radius: 9px;
  color: var(--review-muted);
  font-size: 13px;
  text-align: center;
}

.review-muted-text {
  color: var(--review-muted);
}

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

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

  .results {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .wrapper {
    padding: 18px 14px 42px;
  }

  .card {
    padding: 22px 18px;
    border-radius: 14px;
  }

  .search-box {
    grid-template-columns: 1fr;
  }

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

  .review-group {
    padding: 20px 16px;
    border-radius: 13px;
  }

  .review-group-header {
    display: block;
  }

  .review-risk-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .review-score-wrap {
    min-height: 0;
  }

  .review-coverage-summary,
  .review-source-list,
  .review-inline-grid,
  .review-stats-grid {
    grid-template-columns: 1fr;
  }

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

  .review-coverage-row span {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-search,
  .chain-btn {
    transition: none;
  }
}
