/* Test detail — landing design system */
:root {
  --td-blue: #0056d2;
  --td-blue-soft: #eef3ff;
  --td-ink: #1a1a2e;
  --td-muted: #64748b;
  --td-border: #e8e8e8;
  --td-bg: #f5f7fa;
  --td-cta: #ffd500;
  --td-cta-hover: #e6c000;
  --td-font: 'Figtree', 'Open Sans', system-ui, sans-serif;
  --td-radius: 12px;
  --td-max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body.upl-test-detail {
  margin: 0;
  padding: 0;
  font-family: var(--td-font);
  color: var(--td-ink);
  background: var(--td-bg);
  -webkit-font-smoothing: antialiased;
}

/* Sticky Astra topbar — sit flush at top (no body pad for fixed header) */
body.upl-test-detail.upl-landing-astra header.upl-topbar.upl-topbar--astra.upl-topbar--detached {
  position: sticky;
  top: 0;
  margin: 0;
  padding: 0;
}

.td-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.td-main {
  width: min(100% - 40px, var(--td-max));
  margin: 0 auto;
  padding: 20px 0 56px;
  flex: 1;
}

/* Hero */
.td-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px 28px;
  align-items: start;
  background: #fff;
  border: 1px solid var(--td-border);
  border-radius: var(--td-radius);
  padding: 28px 32px;
  margin-bottom: 24px;
}

.td-hero__logo {
  width: 88px;
  height: 88px;
  border-radius: 16px;
  border: 1px solid var(--td-border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.td-hero__logo img {
  max-width: 72%;
  max-height: 72%;
  object-fit: contain;
}

.td-hero__meta {
  min-width: 0;
}

.td-hero__badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.td-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--td-blue);
  background: var(--td-blue-soft);
  border-radius: 999px;
  padding: 5px 12px;
}

.td-badge--warn {
  color: #b45309;
  background: #fff7ed;
}

.td-hero__code {
  font-size: 13px;
  font-weight: 700;
  color: var(--td-blue);
  letter-spacing: 0.02em;
  margin: 0 0 4px;
}

.td-hero__title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 12px;
  color: var(--td-ink);
}

.td-stars {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.td-stars li {
  width: 18px;
  height: 18px;
  color: #d1d5db;
}

.td-stars li.is-on {
  color: #f59e0b;
}

.td-stars svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

.td-hero__soon {
  margin: 10px 0 0;
  font-size: 14px;
  color: #b45309;
  font-weight: 600;
}

/* Layout grid */
.td-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.td-card {
  background: #fff;
  border: 1px solid var(--td-border);
  border-radius: var(--td-radius);
  padding: 24px 28px;
  margin-bottom: 20px;
}

.td-card:last-child {
  margin-bottom: 0;
}

.td-card__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--td-ink);
}

.td-card__body {
  font-size: 15px;
  line-height: 1.65;
  color: #374151;
  margin: 0;
}

.td-card__body + .td-card__body {
  margin-top: 12px;
}

.td-callout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: linear-gradient(135deg, #f0f6ff 0%, #f8fafc 100%);
  border: 1px solid #dbe7ff;
  border-radius: 10px;
  padding: 16px 18px;
  margin-top: 16px;
}

.td-callout__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--td-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.td-callout__icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.td-callout__title {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--td-ink);
}

.td-callout__text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--td-muted);
  margin: 0;
}

/* Stats */
.td-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.td-stat {
  background: #fff;
  border: 1px solid var(--td-border);
  border-radius: var(--td-radius);
  padding: 18px 16px;
  text-align: center;
}

.td-stat__num {
  font-size: 26px;
  font-weight: 800;
  color: var(--td-blue);
  line-height: 1.1;
  margin: 0 0 4px;
}

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

/* Skills */
.td-skills {
  list-style: none;
  margin: 0;
  padding: 0;
}

.td-skills__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

.td-skills__row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.td-skills__row:first-child {
  padding-top: 0;
}

.td-skills__name {
  font-size: 14px;
  font-weight: 500;
  color: #334155;
  line-height: 1.4;
}

.td-skills__pct {
  font-size: 13px;
  font-weight: 700;
  color: var(--td-blue);
  background: var(--td-blue-soft);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.td-skills__empty {
  font-size: 14px;
  color: var(--td-muted);
  margin: 0;
}

/* Links */
.td-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.td-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--td-blue);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.td-links a:hover {
  text-decoration: underline;
}

.td-links svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* CTA panel */
.td-cta {
  position: sticky;
  top: 88px;
  background: #fff;
  border: 1px solid var(--td-border);
  border-radius: var(--td-radius);
  padding: 24px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.td-cta__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
}

.td-cta__sub {
  font-size: 13px;
  color: var(--td-muted);
  line-height: 1.5;
  margin: 0 0 18px;
}

.td-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.td-field input {
  width: 100%;
  height: 44px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--td-ink);
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.td-field input:focus {
  border-color: var(--td-blue);
  box-shadow: 0 0 0 3px rgba(0, 86, 210, 0.12);
}

.td-cta__err {
  min-height: 20px;
  margin: 8px 0 0;
  font-size: 13px;
  color: #dc2626;
  font-weight: 600;
}

.td-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  margin-top: 14px;
  border: 0;
  border-radius: 10px;
  background: var(--td-cta);
  color: #111;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.td-btn:hover {
  background: var(--td-cta-hover);
  color: #111;
  text-decoration: none;
}

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

.td-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
}

.td-cta__note {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--td-muted);
  text-align: center;
  line-height: 1.45;
}

.td-cta__note a {
  color: var(--td-blue);
  font-weight: 600;
  text-decoration: none;
}

.td-cta__note a:hover {
  text-decoration: underline;
}

/* Footer */
.td-footer {
  padding: 22px clamp(20px, 4vw, 40px);
  background: #f1f5f9;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: #64748b;
}

.td-footer__tag {
  color: #94a3b8;
}

/* Login prompt modal */
.td-modal[hidden] {
  display: none !important;
}

.td-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.td-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.td-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 400px);
  background: #fff;
  border-radius: 14px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.td-modal__dialog h4 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}

.td-modal__dialog p {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--td-muted);
  line-height: 1.5;
}

.td-modal__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.td-modal__actions .td-btn {
  width: auto;
  min-width: 120px;
  margin-top: 0;
  padding: 0 20px;
}

.td-btn--ghost {
  background: #f1f5f9;
  color: #334155;
}

.td-btn--ghost:hover {
  background: #e2e8f0;
  color: #111;
}

.td-btn--blue {
  background: var(--td-blue);
  color: #fff;
}

.td-btn--blue:hover {
  background: #0046ad;
  color: #fff;
}

/* Topbar stubs used by landing partial */
#uplBackdrop {
  display: none;
}

/* Login dropdown markup is included by the shared topbar but unused on
   Astra pages (Login/Sign Up link out). Hide without index.php inline CSS. */
.upl-login-dropdown,
.upl-login-dropdown--hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .td-grid {
    grid-template-columns: 1fr;
  }

  .td-cta {
    position: static;
  }

  .td-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .td-main {
    width: min(100% - 28px, var(--td-max));
    padding: 16px 0 40px;
  }

  .td-hero {
    grid-template-columns: 1fr;
    padding: 22px 20px;
    text-align: center;
  }

  .td-hero__logo {
    margin: 0 auto;
  }

  .td-hero__badge-row {
    justify-content: center;
  }

  .td-stars {
    justify-content: center;
  }

  .td-card {
    padding: 20px;
  }

  .td-footer {
    justify-content: center;
    text-align: center;
  }
}
