/* Test Routes Expert — Partner Portal
   Dark theme, amber accent used sparingly. */

:root {
  --bg: #1a1a1a;
  --card: #2d2d2d;
  --card-raised: #353535;
  --line: #3d3d3d;
  --text: #f5f2ec;
  --muted: #a8a29a;
  --faint: #7a756e;
  --amber: #fcb040;
  --amber-dark: #e09a28;
  --green: #6fcf8e;
  --red: #e06a6a;
  --radius: 14px;
  --radius-sm: 9px;
  --font:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, sans-serif;
  --mono: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, Menlo, monospace;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

.wrap--narrow {
  max-width: 720px;
}

/* ---------- type ---------- */

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  margin-top: 0;
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--amber);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.lede {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--muted);
  max-width: 40em;
}

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

.faint {
  color: var(--faint);
  font-size: 0.85rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 14px;
}

/* ---------- header / footer ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand__mark {
  width: 34px;
  height: 34px;
  flex: none;
}

.brand__sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  gap: 22px;
  font-size: 0.92rem;
}

.header-nav a {
  color: var(--muted);
}

.header-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 96px;
  padding: 36px 0 48px;
  font-size: 0.85rem;
  color: var(--faint);
}

.site-footer a {
  color: var(--muted);
}

/* ---------- sections ---------- */

.section {
  padding: 72px 0 0;
}

.hero {
  padding: 72px 0 24px;
}

.hero h1 {
  max-width: 15em;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 32px;
}

.card--accent {
  border-color: rgba(252, 176, 64, 0.45);
  box-shadow: 0 0 0 1px rgba(252, 176, 64, 0.12);
}

.card + .card {
  margin-top: 20px;
}

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

.btn {
  display: inline-block;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 14px 28px;
  font: 600 1rem var(--font);
  cursor: pointer;
  text-align: center;
  transition:
    background 0.15s ease,
    transform 0.1s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--amber);
  color: #1a1a1a;
}

.btn--primary:hover {
  background: var(--amber-dark);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn--ghost:hover {
  border-color: var(--muted);
}

.btn--small {
  padding: 9px 16px;
  font-size: 0.88rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

/* ---------- lists / grids ---------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.check-list {
  list-style: none;
  margin: 0 0 1.2em;
  padding: 0;
}

.check-list li {
  padding: 7px 0 7px 32px;
  position: relative;
}

.check-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 14px;
  width: 16px;
  height: 9px;
  border-left: 2.5px solid var(--amber);
  border-bottom: 2.5px solid var(--amber);
  transform: rotate(-45deg);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--amber);
  color: var(--amber);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 14px;
}

/* ---------- code display ---------- */

.code-chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: clamp(1.7rem, 6vw, 2.6rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--amber);
  background: #232323;
  border: 1px dashed rgba(252, 176, 64, 0.5);
  border-radius: var(--radius-sm);
  padding: 14px 28px;
}

.code-chip--small {
  font-size: 1.25rem;
  padding: 8px 18px;
}

/* ---------- stat tiles / dashboard ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.stat__label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 6px;
}

.stat__value {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.stat__sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 4px;
}

.progress {
  background: #232323;
  border: 1px solid var(--line);
  border-radius: 99px;
  height: 14px;
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  background: var(--amber);
  border-radius: 99px;
  width: 0;
  transition: width 0.5s ease;
}

/* ---------- tables ---------- */

.table-scroll {
  overflow-x: auto;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

table.data th {
  text-align: left;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

table.data td {
  padding: 12px 14px;
  border-bottom: 1px solid #262626;
  white-space: nowrap;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 99px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.badge--amber {
  color: var(--amber);
  border-color: rgba(252, 176, 64, 0.5);
}

.badge--green {
  color: var(--green);
  border-color: rgba(111, 207, 142, 0.45);
}

.badge--red {
  color: var(--red);
  border-color: rgba(224, 106, 106, 0.45);
}

/* ---------- forms ---------- */

.field {
  width: 100%;
  background: #232323;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: 400 1rem var(--font);
  padding: 13px 16px;
  margin-bottom: 14px;
}

.field:focus {
  outline: none;
  border-color: var(--amber);
}

/* ---------- copy blocks (asset pack) ---------- */

.asset {
  margin-top: 24px;
}

.asset__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.asset__body {
  background: #232323;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  font-size: 0.95rem;
  white-space: pre-wrap;
  color: #ddd8d0;
}

/* ---------- notices / spinner ---------- */

.notice {
  border-left: 3px solid var(--amber);
  background: rgba(252, 176, 64, 0.07);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  font-size: 0.95rem;
}

.notice--error {
  border-left-color: var(--red);
  background: rgba(224, 106, 106, 0.08);
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--line);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 18px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hidden {
  display: none !important;
}

.center {
  text-align: center;
}

/* ---------- terms ---------- */

.terms h2 {
  margin-top: 2.2em;
  font-size: 1.35rem;
}

.terms ul {
  padding-left: 1.3em;
}

.terms li {
  margin-bottom: 0.5em;
}

blockquote.disclosure {
  margin: 1em 0;
  padding: 14px 20px;
  background: #232323;
  border-left: 3px solid var(--amber);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: #ddd8d0;
}

/* ---------- store badges ---------- */

.store-badges {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: #232323;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  color: var(--text);
  min-width: 190px;
}

.store-badge:hover {
  text-decoration: none;
  border-color: var(--muted);
}

.store-badge svg {
  width: 26px;
  height: 26px;
  flex: none;
}

.store-badge small {
  display: block;
  font-size: 0.68rem;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.store-badge strong {
  font-size: 1rem;
  line-height: 1.25;
}

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

@media (max-width: 760px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 24px 20px;
  }

  .hero {
    padding-top: 48px;
  }

  .section {
    padding-top: 56px;
  }

  .header-nav {
    display: none;
  }

  table.data td,
  table.data th {
    padding: 9px 10px;
  }
}
