/**
 * Spin Check - mobile-first calm diagnostic UI
 */

.spin-check-page {
  --sos-bg: linear-gradient(165deg, #f0f7ff 0%, #f6f8fb 45%, #ffffff 100%);
  --sos-card: #ffffff;
  --sos-border: #dbe4f0;
  --sos-muted: #64748b;
  --sos-accent: #0e7490;
  --sos-accent-soft: rgba(8, 145, 178, 0.08);
  --sos-radius: 16px;
  min-height: 60vh;
}

.spin-check-main {
  padding-bottom: 3rem;
}

.spin-check-hub-wrap {
  max-width: 46rem;
  margin-inline: auto;
}

.spin-check-hero {
  text-align: center;
  padding: 1.25rem 0 1.5rem;
  max-width: 38rem;
  margin: 0 auto;
}

.spin-check-hero h1 {
  font-size: clamp(1.45rem, 4.5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
  color: var(--ht-text, #0f172a);
  line-height: 1.2;
}

.spin-check-hero-lead {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--sos-muted);
  font-weight: 500;
}

.spin-check-tool-wrap {
  max-width: 28rem;
  margin: 0 auto;
  padding: 0 4px;
}

.spin-check-tool-heading {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.25rem;
  color: var(--ht-text, #0f172a);
}

.spin-check-tool-sub {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--sos-muted);
  text-align: center;
}

.spin-check-prose p {
  margin: 0 0 0.75rem;
  font-size: 0.98rem;
  line-height: 1.62;
  color: #334155;
}

.spin-check-prose p:last-child {
  margin-bottom: 0;
}

.spin-check-muted-lead {
  color: var(--sos-muted) !important;
  font-size: 0.9rem !important;
}

.spin-check-cat {
  margin-top: 1.35rem;
}

.spin-check-cat-title {
  font-size: 0.97rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 0.55rem;
  color: #0f172a;
}

.spin-check-related-guides {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--sos-border);
}

.spin-check-related-guides h2 {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 0.75rem;
}

.spin-check-related-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #1e293b;
}

.spin-check-related-list li + li {
  margin-top: 0.35rem;
}

.spin-check-related-list a {
  font-weight: 600;
}

.spin-check-sos-note {
  margin-top: 1rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--sos-muted);
}

.spin-check-faq-section {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--sos-border);
}

.spin-check-faq-section > h2 {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 0.65rem;
}

.spin-check-faq-item {
  border: 1px solid var(--sos-border);
  border-radius: 12px;
  background: #fafbfc;
  margin-top: 0.6rem;
  padding: 0.5rem 0.75rem 0.65rem;
}

.spin-check-faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
  list-style: none;
}

.spin-check-faq-item summary::-webkit-details-marker {
  display: none;
}

.spin-check-faq-item[open] summary {
  margin-bottom: 0.5rem;
}

.spin-check-faq-item .spin-check-p {
  margin: 0;
  font-size: 0.92rem;
}

.spin-check-card {
  background: var(--sos-card);
  border: 1px solid var(--sos-border);
  border-radius: var(--sos-radius);
  box-shadow: 0 10px 34px rgba(15, 23, 42, 0.06);
  padding: 1.1rem 1rem 1.25rem;
}

.spin-check-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.spin-check-step-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--sos-muted);
  letter-spacing: 0.02em;
}

.spin-check-progress-track {
  flex: 1;
  min-width: 100px;
  height: 6px;
  background: #e8eef6;
  border-radius: 99px;
  overflow: hidden;
}

.spin-check-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #06b6d4, #0e7490);
  border-radius: 99px;
  transition: width 0.35s ease;
  width: 0%;
}

.spin-check-q-title {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--ht-text, #0f172a);
  line-height: 1.35;
}

.spin-check-options {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.spin-check-opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.95rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid var(--sos-border);
  border-radius: 12px;
  cursor: pointer;
  line-height: 1.35;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.spin-check-opt:hover,
.spin-check-opt:focus-visible {
  background: var(--sos-accent-soft);
  border-color: rgba(8, 145, 178, 0.35);
  outline: none;
}

.spin-check-opt:active {
  transform: scale(0.99);
}

.spin-check-toolbar {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

.spin-check-reset {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sos-muted);
  background: none;
  border: none;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-family: inherit;
  padding: 0.35rem 0.25rem;
}

.spin-check-reset:focus-visible {
  outline: 2px solid var(--sos-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.spin-check-first-urgent {
  font-size: 0.95rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  color: #1e3a5f;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.spin-check-verdict {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
  color: #0f172a;
  line-height: 1.3;
}

.spin-check-subhead {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #475569;
  margin: 0.9rem 0 0.35rem;
}

.spin-check-p {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  line-height: 1.58;
  color: #334155;
}

.spin-check-steps {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.95rem;
  line-height: 1.52;
  color: #1e293b;
}

.spin-check-steps li + li {
  margin-top: 0.35rem;
}

.spin-check-result-actions {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.spin-check-btn-primary {
  display: inline-block;
  text-align: center;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  background: #0e7490;
  border-radius: 12px;
  border: none;
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
}

.spin-check-btn-primary:hover {
  background: #155e75;
  color: #ffffff;
}

.spin-check-btn-ghost {
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sos-accent);
  text-decoration: none;
  padding: 0.5rem;
}

.spin-check-index-link-section {
  margin-top: 2.75rem;
  padding-top: 2rem;
  border-top: 1px solid var(--sos-border);
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

.spin-check-index-link-section h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: #0f172a;
}

.spin-check-symptom-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.spin-check-symptom-grid a {
  color: #0e7490;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.spin-check-symptom-grid a:hover {
  color: #155e75;
}

/* Standalone diagnosis pages */
.spin-check-article {
  max-width: 40rem;
  margin: 0 auto;
}

.spin-check-article h1.digest-hub-title {
  font-size: clamp(1.35rem, 4vw, 1.65rem);
}

.spin-check-confidence {
  font-size: 0.92rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  margin: 1rem 0;
  color: #475569;
}

.spin-check-warn-box {
  font-size: 0.92rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: #fefce8;
  border: 1px solid #fde047;
  margin: 1rem 0;
  color: #713f12;
}

.spin-check-related-inline {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: #475569;
}

.spin-check-related-inline a {
  color: #0e7490;
  font-weight: 600;
}

@media (min-width: 640px) {
  .spin-check-card {
    padding: 1.35rem 1.35rem 1.5rem;
  }
}

/* Urgency badge on diagnosis pages - instant severity read for a panicking searcher */
.spin-check-urgency {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.7rem;
  border: 1px solid transparent;
}
.spin-check-urgency-critical { background: #fdeaea; color: #b91c1c; border-color: #f6cccc; }
.spin-check-urgency-urgent { background: #fdf1da; color: #b45309; border-color: #f6ddaf; }
.spin-check-urgency-watch { background: #ecfeff; color: #0e7490; border-color: #b9ecf5; }

/* "Do this first" callout - the single most important action, boxed at the top */
.spin-check-firstaction {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 1.4rem auto 0;
  max-width: 44rem;
  padding: 0.95rem 1.1rem;
  background: #ecfeff;
  border: 1px solid #a5e8f5;
  border-left: 5px solid #0e7490;
  border-radius: 12px;
}
.spin-check-firstaction-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0e7490;
}
.spin-check-firstaction-text {
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.5;
  color: #0f172a;
}

/* Honest bottom-of-page disclaimer on every Spin Check page */
.spin-check-disclaimer {
  max-width: 44rem;
  margin: 0 0 1.5rem;
  padding: 0.85rem 1.05rem;
  font-size: 0.85rem;
  line-height: 1.55;
  color: #64748b;
  text-align: left;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.spin-check-disclaimer strong { color: #475569; }
