:root {
  --bg-main: #050816;
  --bg-card: rgba(9, 9, 22, 0.9);
  --accent: #34d399;
  --accent-soft: rgba(52, 211, 153, 0.1);
  --accent-strong: #22c55e;
  --danger: #fb7185;
  --warning: #fbbf24;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --border-subtle: rgba(148, 163, 184, 0.2);
  --glass-blur: 22px;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --transition-fast: 150ms ease-out;
  --transition-med: 260ms ease-out;
}

/* RESET & BASE */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--text-main);
  background: radial-gradient(circle at 0% 0%, #0f172a 0, #020617 40%, #000 100%);
  -webkit-font-smoothing: antialiased;
  overflow-y: auto;
}


/* Chrome / Edge / Safari */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.app-shell::-webkit-scrollbar {
  width: 0px;
  height: 0px;
  display: none;
}

/* Firefox */
html {
  scrollbar-width: none;
}

/* Old Edge / IE */
body {
  -ms-overflow-style: none;
}

body {
  display: flex;
  align-items: stretch;
  justify-content: center;
}

/* APP SHELL */

.app-shell {
  min-height: 100vh;
  width: 100%;
  max-width: 1280px;
  padding: 16px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow-x: hidden;
  overflow-y: visible;
}

.app-shell::before {
  content: "";
  position: fixed;
  inset: -100px;
  background:
    radial-gradient(circle at 0% 20%, rgba(52, 211, 153, 0.12), transparent 55%),
    radial-gradient(circle at 100% 80%, rgba(59, 130, 246, 0.22), transparent 55%),
    radial-gradient(circle at 50% 0%, rgba(236, 72, 153, 0.16), transparent 55%);
  opacity: 0.9;
  z-index: -2;
  filter: blur(8px);
  animation: bgShift 22s ease-in-out infinite alternate;
}

@keyframes bgShift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-12px, 18px, 0) scale(1.03);
  }
  100% {
    transform: translate3d(10px, -14px, 0) scale(1.05);
  }
}

.app-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(
    rgba(15, 23, 42, 0.65),
    rgba(2, 6, 23, 0.9)
  );
  z-index: -1;
  mix-blend-mode: soft-light;
}

/* HEADER */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-xl);
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.85),
    rgba(15, 23, 42, 0.6)
  );
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(var(--glass-blur));
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: conic-gradient(from 180deg, #22c55e, #38bdf8, #e879f9, #22c55e);
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.8),
    0 20px 35px rgba(0, 0, 0, 0.7);
}

.brand-logo-inner {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 0%, #22c55e 0, #0f172a 40%, #020617 90%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: #f0fdf4;
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.9);
}

.brand-text-title {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.brand-text-title span.sugar {
  color: var(--text-main);
}

.brand-text-title .risk {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--accent-strong);
}

.brand-text-title .dotcom {
  font-size: 0.75rem;
  font-weight: 600;
  color: #a3a3a3;
  margin-left: 2px;
  opacity: 0.9;
  letter-spacing: -0.5px;
  position: relative;
  top: -1px;
}

.brand-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.header-pill {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(52, 211, 153, 0.4);
  background: radial-gradient(circle at 0 0, rgba(52, 211, 153, 0.2), transparent 60%);
  color: #bbf7d0;
  white-space: nowrap;
}

.header-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.9);
}

/* TOP NAV */

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.78rem;
}

.top-nav a {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.8);
  color: #e5e7eb;
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}

.top-nav a:hover {
  border-color: var(--accent);
  background: rgba(22, 163, 74, 0.18);
  transform: translateY(-0.5px);
}

.top-nav a.active {
  border-color: var(--accent-strong);
  background: radial-gradient(
    circle at 0 0,
    rgba(34, 197, 94, 0.28),
    rgba(15, 23, 42, 0.9)
  );
  color: #bbf7d0;
}

/* KNOWLEDGE STRIP */

.topics-strip {
  grid-column: 1 / -1;
  margin-top: 8px;
  background: radial-gradient(
    circle at 0 0,
    rgba(15, 23, 42, 0.9),
    rgba(15, 23, 42, 0.9)
  );
  border-radius: var(--radius-xl);
  padding: 12px 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(var(--glass-blur));
}

.topics-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.topics-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #e5e7eb;
}

.topics-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topics-links a {
  font-size: 0.78rem;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.5);
  text-decoration: none;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.85);
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
  white-space: nowrap;
}

.topics-links a:hover {
  border-color: rgba(52, 211, 153, 0.7);
  color: #ecfdf5;
  background: radial-gradient(
    circle at 0 0,
    rgba(34, 197, 94, 0.25),
    rgba(21, 128, 61, 0.7)
  );
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.5);
  transform: translateY(-0.5px);
}

/* MAIN LAYOUT */

main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

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

/* GENERIC CARD */

.card {
  background: radial-gradient(
    circle at 0 0,
    rgba(15, 23, 42, 0.9),
    rgba(15, 23, 42, 0.8)
  );
  border-radius: var(--radius-xl);
  padding: 16px 18px 18px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(var(--glass-blur));
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -60%;
  background: radial-gradient(circle at 10% 0, rgba(52, 211, 153, 0.08), transparent 55%);
  opacity: 1;
  pointer-events: none;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card-title-area {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chip {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: var(--text-muted);
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.pill-soft {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.7);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pill-soft span.dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #22c55e;
}

/* FORM */

form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  position: relative;
  z-index: 1;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
}

.field-units {
  grid-column: 1 / -1;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

label {
  font-size: 0.8rem;
  color: var(--text-main);
}

.field-helper {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.input,
select {
  width: 100%;
  border-radius: var(--radius-lg);
  padding: 9px 11px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: radial-gradient(
    circle at 0 0,
    rgba(15, 23, 42, 0.95),
    rgba(15, 23, 42, 0.95)
  );
  color: var(--text-main);
  font-size: 0.83rem;
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast),
    transform var(--transition-fast);
}

.input::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

.input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow:
    0 0 0 1px rgba(34, 197, 94, 0.4),
    0 0 24px rgba(34, 197, 94, 0.18);
  transform: translateY(-0.5px);
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(148, 163, 184, 0.9) 50%),
    linear-gradient(135deg, rgba(148, 163, 184, 0.9) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 30px;
}

/* Selecturi verzi */

.input.activity-select,
.input.adv-select {
  background: rgba(34, 197, 94, 0.25);
  border-color: rgba(52, 211, 153, 0.6);
  color: #ecfdf5;
  backdrop-filter: blur(6px);
}

.input.activity-select option,
.input.adv-select option {
  background-color: #065f46;
  color: #ffffff;
}

select.activity-select,
select.adv-select {
  -webkit-appearance: none;
  appearance: none;
}

/* SEGMENTED CONTROLS */

.segmented {
  display: inline-flex;
  padding: 2px;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.5);
  gap: 4px;
  flex-wrap: wrap;
}

.segmented button {
  border-radius: var(--radius-pill);
  border: none;
  padding: 6px 9px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  white-space: nowrap;
}

.segmented button.active {
  background: radial-gradient(
    circle at 0 0,
    rgba(34, 197, 94, 0.25),
    rgba(21, 128, 61, 0.7)
  );
  color: #ecfdf5;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.6);
  transform: translateY(-0.5px);
}

.segmented button:focus-visible {
  outline: 1px solid rgba(34, 197, 94, 0.7);
  outline-offset: 2px;
}

/* FORM FOOTER */

.form-footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}

/* SUBMIT BUTTON */

.submit-btn {
  border-radius: var(--radius-pill);
  border: none;
  padding: 9px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  background: linear-gradient(120deg, #22c55e, #4ade80, #22c55e);
  color: #022c22;
  box-shadow: 0 10px 22px rgba(22, 163, 74, 0.35);
  transition:
    transform var(--transition-med),
    box-shadow var(--transition-med),
    filter var(--transition-fast);
  white-space: nowrap;
}

.submit-btn span.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.7);
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.4);
    opacity: 0.65;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.submit-btn:hover {
  transform: translateY(-1px) scale(1.01);
  filter: brightness(1.05);
  box-shadow: 0 0 4px rgba(22, 163, 74, 0.65);
}

.submit-btn:active {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 2px 4px rgba(22, 163, 74, 0.5);
}

/* DISCLAIMER MIC SUB FORM */

.disclaimer {
  font-size: 0.7rem;
  color: var(--text-muted);
  max-width: 340px;
}

.disclaimer strong {
  color: #e5e7eb;
}

/* UNITS HELPERS */

.unit-group {
  display: none;
}

.unit-group.active {
  display: block;
}

.subfield-row {
  display: flex;
  gap: 6px;
}

.subfield-row .input {
  flex: 1;
}

/* ADVANCED BOX */

.advanced-box {
  grid-column: 1 / -1;
  margin-top: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  padding: 8px 10px;
}

.advanced-toggle {
  width: 100%;
  background: none;
  border: none;
  color: #cbd5e1;
  font-size: 0.83rem;
  text-align: left;
  padding: 4px 2px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.advanced-toggle:hover {
  color: var(--accent);
}

.advanced-toggle .arrow {
  transition: transform 0.3s ease;
  font-size: 0.9rem;
}

.advanced-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  margin-top: 6px;
}

.advanced-body.open {
  max-height: 800px;
}

/* RESULTS CARD (INDEX) */

.results-card {
  background: radial-gradient(
    circle at 100% 0,
    rgba(34, 197, 94, 0.22),
    rgba(15, 23, 42, 0.95)
  );
  border-radius: var(--radius-xl);
  padding: 16px 18px 18px;
  border: 1px solid rgba(52, 211, 153, 0.45);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(var(--glass-blur));
  position: relative;
  overflow: hidden;
}

.results-card::before {
  content: "";
  position: absolute;
  inset: -80%;
  background:
    radial-gradient(circle at 100% 0, rgba(34, 197, 94, 0.24), transparent 45%),
    conic-gradient(
      from 220deg,
      rgba(34, 197, 94, 0.1),
      transparent 30%,
      rgba(59, 130, 246, 0.2),
      transparent 70%,
      rgba(236, 72, 153, 0.22)
    );
  opacity: 0.7;
  pointer-events: none;
  mix-blend-mode: screen;
}

.results-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.results-title {
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.results-badge {
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(15, 23, 42, 0.8);
  background: rgba(15, 23, 42, 0.5);
  color: #bbf7d0;
}

.risk-score-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.risk-score-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.risk-score-value {
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.risk-score-max {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.risk-score-label {
  font-size: 0.75rem;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(15, 23, 42, 0.85);
  background: rgba(15, 23, 42, 0.7);
  text-align: center;
  align-self: center;
  min-width: 70%;
}

/* RISK BAR */

.risk-bar-wrap {
  width: 100%;
  margin-top: 8px;
}

.risk-bar-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #fbbf24, #fb7185);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.7),
    0 18px 30px rgba(15, 23, 42, 0.7);
}

.risk-bar-indicator {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid #f9fafb;
  background: radial-gradient(circle at 30% 0, #f97316, #b91c1c);
  box-shadow:
    0 0 0 2px rgba(15, 23, 42, 0.9),
    0 0 22px rgba(248, 250, 252, 0.9);
  transition:
    left 260ms cubic-bezier(0.22, 0.68, 0, 1),
    transform 260ms ease-out;
}

.risk-bar-indicator::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 1px solid rgba(248, 250, 252, 0.4);
  opacity: 0.6;
}

/* RISK TEXT / INTERPRETARE */

.risk-text {
  margin-top: 10px;
  font-size: 0.8rem;
  color: #e5e7eb;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.88);
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.risk-text-icon {
  font-size: 1.25rem;
  line-height: 1;
  margin-top: 2px;
}

.risk-text-body {
  flex: 1;
  text-align: left;
}

.risk-text-title {
  font-weight: 600;
  margin-bottom: 2px;
}

.risk-text-note {
  margin-top: 4px;
  font-size: 0.75rem;
  opacity: 0.9;
  color: #9ca3af;
}

/* RISK TEXT VARIANTS */

.risk-text--ok {
  border-color: rgba(34, 197, 94, 0.9);
  background: radial-gradient(
    circle at 0 0,
    rgba(22, 163, 74, 0.4),
    rgba(15, 23, 42, 0.95)
  );
}

.risk-text--ok .risk-text-title {
  color: #bbf7d0;
}

.risk-text--ok .risk-text-icon {
  color: #4ade80;
}

.risk-text--moderate {
  border-color: rgba(249, 115, 22, 0.9);
  background: radial-gradient(
    circle at 0 0,
    rgba(251, 146, 60, 0.35),
    rgba(15, 23, 42, 0.96)
  );
}

.risk-text--moderate .risk-text-title {
  color: #fed7aa;
}

.risk-text--moderate .risk-text-icon {
  color: #fdba74;
}

.risk-text--high {
  border-color: rgba(239, 68, 68, 0.95);
  background: radial-gradient(
    circle at 0 0,
    rgba(248, 113, 113, 0.4),
    rgba(15, 23, 42, 0.97)
  );
}

.risk-text--high .risk-text-title {
  color: #fecaca;
}

.risk-text--high .risk-text-icon {
  color: #fca5a5;
}

/* INSIGHTS */

.insights-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  font-size: 0.78rem;
}

.insight-item {
  border-radius: var(--radius-lg);
  padding: 7px 9px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.4);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.insight-bullet {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  margin-top: 4px;
  background: rgba(52, 211, 153, 0.85);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.8);
}

.insight-title {
  font-weight: 500;
  margin-bottom: 2px;
}

.insight-body {
  color: var(--text-muted);
  font-size: 0.76rem;
}

/* DATA QUALITY */

.data-quality {
  margin-top: auto;
  font-size: 0.7rem;
  color: #d1d5db;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.9;
}

.data-quality span.indicator {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.9);
}

/* LOADING STATE - RISK LOADER */

#riskLoader {
  display: none;
  margin-top: 6px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 145, 0, 0.08);
  border: 1px solid rgba(255, 145, 0, 0.3);
  text-align: center;
  animation: fadeIn 0.4s ease;
}

#riskLoader .loader-icon {
  font-size: 28px;
  color: #ff8c00;
  margin-bottom: 6px;
}

#riskLoader .loader-text {
  font-weight: 600;
  color: #ff8c00;
  margin-bottom: 10px;
}

#riskLoader .loader-sub {
  font-size: 14px;
  opacity: 0.7;
  margin-bottom: 14px;
}

#riskLoader .loader-strip {
  width: 100%;
  height: 6px;
  background: rgba(255, 145, 0, 0.25);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

#riskLoader .loader-strip::before {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: #ff8c00;
  border-radius: 6px;
  animation: slideBar 1.2s linear infinite;
}

@keyframes slideBar {
  0% {
    left: -40%;
  }
  100% {
    left: 100%;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* RESULTS CARD - LOADING STATE */

.results-card.is-loading {
  display: block;
  margin-bottom: 0;
}

.results-card.is-loading .risk-bar-wrap {
  opacity: 1;
  pointer-events: auto;
}

.results-card.is-loading .risk-text {
  opacity: 1;
  filter: none;
  text-align: center;
  justify-content: center;
}

/* GENERIC SPINNER ANIMATION (NU FOLOSEȘTE TRANSLATE) */

@keyframes spinCircle {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* SPINNER CENTRAT (PENTRU CERC CU translate(-50%,-50%)) */

@keyframes spinCircleCentered {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* EXEMPLU PULS INDICATOR (dacă vrei să îl păstrezi undeva) */

@keyframes riskPulse {
  from {
    transform: translate(-50%, -50%) scale(0.95);
  }
  to {
    transform: translate(-50%, -50%) scale(1.05);
  }
}

/* EMBED WIDGET (INDEX) */

.embed-widget {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.35);
  backdrop-filter: blur(14px);
}

.embed-title {
  margin: 0 0 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.embed-desc {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.embed-code {
  width: 100%;
  min-height: 100px;
  background: rgba(2, 6, 23, 0.9);
  color: #d1d5db;
  font-family: monospace;
  font-size: 0.72rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 8px;
  resize: none;
  outline: none;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.embed-code:focus {
  border-color: var(--accent);
  box-shadow:
    0 0 0 1px rgba(34, 197, 94, 0.5),
    0 0 18px rgba(34, 197, 94, 0.4);
}

/* FOOTER */

footer {
  margin-top: 4px;
  padding: 8px 10px;
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

footer a {
  color: #a5b4fc;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* INFO / SEO CARD */

.info-card {
  grid-column: 1 / -1;
  margin-top: 4px;
  background: radial-gradient(
    circle at 0 0,
    rgba(15, 23, 42, 0.9),
    rgba(15, 23, 42, 0.9)
  );
  border-radius: var(--radius-xl);
  padding: 16px 18px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(var(--glass-blur));
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: "";
  position: absolute;
  inset: -60%;
  background:
    radial-gradient(circle at 0 0, rgba(52, 211, 153, 0.18), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(59, 130, 246, 0.14), transparent 45%);
  opacity: 0.8;
  pointer-events: none;
  mix-blend-mode: screen;
}

.info-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.info-title {
  margin: 0 0 4px;
  font-size: 0.98rem;
  font-weight: 600;
}

.info-subtitle {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 520px;
}

.info-toggle {
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.info-toggle:hover {
  background: rgba(15, 23, 42, 0.95);
  border-color: var(--accent);
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.45);
  transform: translateY(-0.5px);
}

.info-toggle-icon {
  font-size: 0.75rem;
  transform-origin: center;
  transition: transform var(--transition-med);
}

.info-toggle[aria-expanded="true"] .info-toggle-icon {
  transform: rotate(-180deg);
}

.info-body {
  position: relative;
  z-index: 1;
  max-height: 0;
  overflow: hidden;
  transition: max-height 260ms ease-out;
}

.info-body.expanded {
  max-height: 1200px;
}

.info-body-inner {
  padding-top: 8px;
  font-size: 0.8rem;
  color: #e5e7eb;
}

.info-body-inner h3 {
  margin: 10px 0 4px;
  font-size: 0.86rem;
}

.info-body-inner p {
  margin: 4px 0 6px;
}

.info-body-inner ul {
  margin: 4px 0 8px 16px;
  padding: 0;
}

.info-body-inner li {
  margin-bottom: 3px;
}

.info-note {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.info-disclaimer {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  padding-top: 6px;
}

@media (max-width: 720px) {
  .info-card {
    padding: 14px 14px;
  }
  .info-title {
    font-size: 0.9rem;
  }
  .info-subtitle {
    font-size: 0.76rem;
  }
}

/* PAGE-TYPE STYLES (ABOUT / HOW IT WORKS) */

.page-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.page-title {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.lead {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 640px;
}

.pill-highlight {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(52, 211, 153, 0.5);
  background: rgba(15, 23, 42, 0.9);
  font-size: 0.75rem;
  color: #bbf7d0;
  margin-bottom: 12px;
}

.pill-highlight span.dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.9);
}

/* GRID TEXT + SIDE CARD */

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr);
  gap: 16px;
  margin-top: 8px;
}

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

.content-grid h2 {
  font-size: 1rem;
  margin: 10px 0 6px;
}

.content-grid p {
  font-size: 0.85rem;
  color: #e5e7eb;
  margin: 4px 0 8px;
}

.content-grid ul {
  font-size: 0.85rem;
  margin: 4px 0 10px 18px;
  color: #d1d5db;
}

.content-grid li {
  margin-bottom: 4px;
}

/* SIDE CARD */

.side-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.9);
  padding: 10px 12px;
  font-size: 0.82rem;
  position: relative;
  z-index: 1;
}

.side-card h3 {
  margin: 0 0 6px;
  font-size: 0.92rem;
}

.side-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.6);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

/* BULLETS CU PUNCT VERDE */

.bullet {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 6px;
}

.bullet-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.8);
  margin-top: 4px;
}

.bullet-text {
  font-size: 0.8rem;
  color: #e5e7eb;
}

/* DISCLAIMER BLOCK */

.disclaimer-block {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(148, 163, 184, 0.5);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.about-section {
  margin-bottom: 18px;
}

.about-section h2 {
  font-size: 1rem;
  margin: 10px 0 6px;
}

.about-section p {
  margin: 4px 0 8px;
  font-size: 0.85rem;
  color: #e5e7eb;
}

/* LINK STYLING GLOBAL */

a {
  color: var(--accent-strong);
  font-weight: 600;
  text-decoration: none;
  transition:
    color 0.2s ease,
    text-shadow 0.2s ease;
}

a:hover {
  color: #4ade80;
  text-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

/* CERC MARE SUGAR RISK INDEX */

.risk-score-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.risk-score-circle {
  width: 150px;
  height: 150px;
  border-radius: 999px;
  margin: 6px auto 10px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(
    from 0deg,
    #22c55e,
    #4ade80,
    #38bdf8,
    #a855f7,
    #22c55e
  );
  background-size: 200% 200%;
  animation: circleGlow 3.5s linear infinite;
  box-shadow:
    0 0 25px rgba(34, 197, 94, 0.5),
    0 0 40px rgba(59, 130, 246, 0.3);
  position: relative;          /* important pentru pseudo-element */
  overflow: hidden;            /* ca să stea spinnerul frumos în interior */
}
/* SPINNER MARE COMUN (WEB + MOBIL) */

.risk-score-circle::after {
  content: "";
  position: absolute;
  inset: 6px; /* inel mare, lasă o margine frumoasă în jur */
  border-radius: 999px;
  border: 3px solid transparent;
  border-top-color: #22c55e;
  border-right-color: #38bdf8;
  border-bottom-color: #f97316;
  border-left-color: #6366f1;
  opacity: 0;
  pointer-events: none;
  transform-origin: center center;
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.7);
  z-index: 1; /* sub textul cu scorul */
}

.results-card.is-loading .risk-score-circle::after {
  opacity: 1;
  animation: spinCircle 0.9s linear infinite;
}

@keyframes circleGlow {
  0% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 100% 0%;
  }
  100% {
    background-position: 0% 0%;
  }
}

.risk-score-circle-inner {
  width: 78%;
  height: 78%;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0, #0f172a, #020617 60%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.risk-score-value-big {
  font-size: 3.1rem;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.risk-score-percent-hint {
  margin-top: 4px;
  font-size: 0.75rem;
  color: #9ca3af;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  width: 100%;
}

/* STATUS MESSAGE (PREDIABETES + BLOOD SUGAR) */

.status-message {
  margin: 12px auto 8px auto;
  font-size: 0.95rem;
  font-weight: 600;
  display: none;
  text-align: center;
  max-width: 480px;
  line-height: 1.4;
}

.status-message.ok {
  color: #22c55e;
}

.status-message.warn {
  color: #f97316;
}

.status-message.danger {
  color: #ef4444;
}

/* INPUT / SELECT ERRORS */

.input-error {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.12) !important;
}

.select-error {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.12) !important;
}

.input-error-message {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 4px;
  display: none;
}

.input-error-message.active {
  display: block;
}

/* GENERIC ERROR ALERT */

.error-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.55);
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  color: #ef4444;
  font-size: 0.88rem;
  font-weight: 600;
  backdrop-filter: blur(2px);
}

.error-alert .error-icon {
  font-size: 1.25rem;
  line-height: 1;
}

/* VALUE COLOR STATES */

.risk-value-ok {
  color: #22c55e !important;
}

.risk-value-borderline {
  color: #f97316 !important;
}

.risk-value-extreme {
  color: #ef4444 !important;
}

/* SHARE BLOCK */

.share-block {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: radial-gradient(
      circle at top left,
      rgba(16, 185, 129, 0.16),
      transparent 55%
    ),
    rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
}

.share-title {
  font-weight: 600;
  color: #e5e7eb;
}

.share-subtitle {
  margin: 0;
  font-size: 0.78rem;
  color: #9ca3af;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 0.78rem;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.1s ease,
    box-shadow 0.15s ease;
}

.share-btn:hover {
  transform: translateY(-0.5px);
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

.share-btn.share-linkedin {
  border-color: rgba(37, 99, 235, 0.6);
}

.share-btn.share-reddit {
  border-color: rgba(248, 113, 113, 0.7);
}

.share-btn.share-x {
  border-color: rgba(148, 163, 184, 0.8);
}

.share-btn.share-facebook {
  border-color: rgba(59, 130, 246, 0.8);
}

.share-btn.share-whatsapp {
  border-color: rgba(34, 197, 94, 0.8);
}

.share-btn.share-copy {
  border-style: dashed;
}

.share-emoji {
  font-size: 1rem;
}

.share-feedback {
  margin-top: 4px;
  font-size: 0.76rem;
  color: #a3e635;
  min-height: 14px;
}

/* RATING BLOCK */

.rating-block {
  margin-top: 24px;
  padding: 16px 18px;
  border-radius: 16px;
  background: radial-gradient(
      circle at top left,
      rgba(59, 130, 246, 0.16),
      transparent 55%
    ),
    rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
}

.rating-title {
  font-weight: 500;
  color: #e5e7eb;
}

.rating-stars {
  display: flex;
  gap: 4px;
}

.rating-star {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #4b5563;
  transition:
    transform 0.1s ease,
    color 0.1s ease;
}

.rating-star.is-active {
  color: #facc15;
}

.rating-star:hover {
  transform: scale(1.1);
}

.rating-meta {
  font-size: 0.8rem;
  color: #9ca3af;
  display: flex;
  gap: 4px;
  align-items: center;
}

.rating-thanks {
  font-size: 0.78rem;
  color: #a3e635;
}

/* CHECKBOX PILLS */

.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.45);
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
}

.checkbox-pill input {
  width: 13px;
  height: 13px;
  accent-color: #22c55e;
}

/* EMBED LIVE WIDGET (EMBED PAGE) */

.embed-live-widget {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.embed-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.embed-header-link {
  font-size: 0.8rem;
  color: #a5b4fc;
  text-decoration: none;
  white-space: nowrap;
}

.embed-header-link:hover {
  text-decoration: underline;
}

.embed-result-panel {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: radial-gradient(
    circle at 100% 0,
    rgba(34, 197, 94, 0.22),
    rgba(15, 23, 42, 0.95)
  );
  padding: 10px 12px;
}

.embed-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.embed-result-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.embed-top-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.embed-top-main .risk-circle {
  width: 90px;
  height: 90px;
}

.embed-result-right {
  flex: 1;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.embed-result-help {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* CERC + SPINNER (EMBED) */

.risk-circle {
  border-radius: 999px;
  border: 3px solid rgba(248, 250, 252, 0.95);
  background: radial-gradient(circle at 30% 0, #22c55e, #0f172a);
  box-shadow:
    0 0 0 2px rgba(15, 23, 42, 0.9),
    0 0 26px rgba(34, 197, 94, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.risk-circle-value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.risk-circle-unit {
  font-size: 0.8rem;
  margin-left: 2px;
}

.risk-circle-spinner {
  position: absolute;
  inset: 9px;
  border-radius: 999px;
  border: 3px solid rgba(148, 163, 184, 0.3);
  border-top-color: #22c55e;
  border-right-color: #38bdf8;
  border-bottom-color: rgba(148, 163, 184, 0.12);
  border-left-color: rgba(148, 163, 184, 0.12);
  animation: spinCircle 0.85s linear infinite;
  opacity: 0;
  pointer-events: none;
}

.embed-live-widget.embed-loading .risk-circle-spinner {
  opacity: 1;
}

.embed-form-panel {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.94);
  padding: 10px 12px 12px;
}

.embed-form-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
}

/* RISK TEST (WIZARD) */

.rt-page {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

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

.rt-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.rt-card-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  font-size: 0.78rem;
}

/* PROGRESS */

.rt-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.rt-back-btn {
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  font-size: 0.8rem;
  padding: 6px 12px;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast),
    opacity 0.15s ease;
}

.rt-back-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.rt-back-btn:not(:disabled):hover {
  background: rgba(15, 23, 42, 0.98);
  border-color: var(--accent);
  transform: translateY(-0.5px);
}

.rt-progress {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rt-progress-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.rt-progress-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.45);
  overflow: hidden;
  position: relative;
}

.rt-progress-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #22c55e,
    #4ade80,
    #fbbf24,
    #fb7185
  );
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.6);
  transition: width 260ms cubic-bezier(0.22, 0.68, 0, 1);
}

.rt-progress-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.rt-progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9);
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.rt-progress-dot.is-active {
  background: radial-gradient(
    circle at 0 0,
    rgba(34, 197, 94, 0.4),
    rgba(15, 23, 42, 1)
  );
  border-color: rgba(34, 197, 94, 0.9);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.7);
  transform: scale(1.1);
}

.rt-progress-dot.is-complete:not(.is-active) {
  background: rgba(34, 197, 94, 0.4);
  border-color: rgba(34, 197, 94, 0.7);
}

/* STEPS WRAPPER */

.rt-steps-wrapper {
  position: relative;
  height: auto;
  transition: height 260ms cubic-bezier(0.22, 0.68, 0, 1);
}

.rt-step {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(40px) scale(0.98);
  transition:
    opacity 260ms var(--transition-med),
    transform 260ms var(--transition-med);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rt-step.is-current {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
  z-index: 2;
}

.rt-step.is-prev {
  opacity: 0;
  transform: translateX(-35px) scale(0.98);
  z-index: 1;
}

.rt-step.is-next {
  opacity: 0;
  transform: translateX(35px) scale(0.98);
  z-index: 1;
}

.rt-step-header {
  display: none; /* ascuns, folosim question-display */
}

/* QUESTION DISPLAY */

.rt-question-display {
  text-align: center;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rt-question-display .rt-step-title {
  font-size: 1.35rem;
  color: #fb923c;
  text-shadow: 0 0 14px rgba(251, 146, 60, 0.45);
  margin: 0;
}

.rt-question-display .rt-step-text {
  font-size: 0.9rem;
  color: var(--text-main);
  max-width: 520px;
  margin: 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 0 0, rgba(251, 146, 60, 0.18), transparent 60%),
    rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(251, 146, 60, 0.65);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.9),
    0 0 18px rgba(251, 146, 60, 0.45);
}

.rt-question-display .rt-step-kicker {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

/* OPTIONS */

.rt-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.rt-option {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(15, 23, 42, 0.92);
  padding: 9px 11px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.85rem;
  color: var(--text-main);
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.rt-option:hover {
  border-color: var(--accent);
  background: radial-gradient(
    circle at 0 0,
    rgba(34, 197, 94, 0.18),
    rgba(15, 23, 42, 0.96)
  );
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.55);
  transform: translateY(-1px);
}

.rt-option.is-selected {
  border-color: rgba(34, 197, 94, 0.9);
  background: radial-gradient(
    circle at 0 0,
    rgba(34, 197, 94, 0.38),
    rgba(15, 23, 42, 0.98)
  );
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.7);
}

.rt-option-main {
  font-weight: 500;
}

.rt-option-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* NOTE SUB WIZARD */

.rt-note {
  margin-top: 14px;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px dashed rgba(148, 163, 184, 0.5);
  padding-top: 8px;
}

/* RT RESULTS */

.rt-results-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rt-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.rt-results-title {
  margin: 0;
  font-size: 0.96rem;
}

#rtScoreValue.risk-value-ok {
  color: #22c55e;
}

#rtScoreValue.risk-value-borderline {
  color: #f97316;
}

#rtScoreValue.risk-value-extreme {
  color: #ef4444;
}

.rt-results-card .risk-bar-wrap {
  margin-top: 10px;
}

/* SHARE ROW (WIZARD) */

.rt-share-row {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px dashed rgba(148, 163, 184, 0.45);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rt-share-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.rt-share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rt-share-btn {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.96);
  padding: 6px 14px;
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.rt-share-btn:hover {
  border-color: #fb923c;
  background: radial-gradient(
    circle at 0 0,
    rgba(251, 146, 60, 0.26),
    rgba(15, 23, 42, 0.98)
  );
  box-shadow: 0 0 12px rgba(251, 146, 60, 0.55);
  transform: translateY(-0.5px);
}

.rt-share-feedback {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-height: 1em;
}

/* RESET BUTTON (WIZARD) */

.rt-reset-row {
  margin-top: 12px;
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
}

.rt-reset-btn {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(251, 146, 60, 0.65);
  color: #fb923c;
  transition: all 0.25s ease;
  box-shadow: 0 0 8px rgba(251, 146, 60, 0.35);
}

.rt-reset-btn:hover {
  background: radial-gradient(
    circle at 0 0,
    rgba(251, 146, 60, 0.2),
    rgba(15, 23, 42, 0.98)
  );
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(251, 146, 60, 0.55);
}

/* MOBILE LAYOUT - STRUCTURAL (HEADER/MAIN/FOOTER) */

@media (max-width: 720px) {
  .app-shell {
    max-width: 100%;
    padding: 8px 8px 56px;
    gap: 10px;
  }

  header {
    display: none;
  }

  main {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  main > .results-card {
    order: 1;
  }

  main > .card {
    order: 2;
  }

  main > .info-card {
    order: 3;
  }

  .results-card,
  .card,
  .info-card {
    padding: 12px 14px 14px;
    border-radius: 18px;
  }

  .embed-widget {
    display: none !important;
  }

  .topics-strip {
    display: none !important;
  }

  .rating-block,
  .share-block {
    display: none !important;
  }

  .data-quality {
    font-size: 0.68rem;
  }

  footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 10px;
    font-size: 0.7rem;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    background: linear-gradient(
      to top,
      rgba(15, 23, 42, 0.95),
      rgba(15, 23, 42, 0.9)
    );
    border-top: 1px solid rgba(148, 163, 184, 0.4);
    backdrop-filter: blur(14px);
    z-index: 20;
  }

  footer span:first-child {
    display: none;
  }

  footer span:last-child {
    width: 100%;
    text-align: center;
  }

  footer a {
    font-weight: 500;
  }
}

/* MOBILE - WIZARD LAYOUT */

@media (max-width: 720px) {
  .rt-page {
    display: flex;
    flex-direction: column;
  }

  .rt-card,
  .rt-results-card {
    padding: 12px 14px 14px;
  }

  .rt-steps-wrapper {
    min-height: 260px;
  }

  .rt-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .rt-card-meta {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    font-size: 0.78rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

@media (max-width: 640px) {
  .rt-card-meta {
    justify-content: flex-start;
  }
}

/* MOBILE - RESULTS CARD LIKE WIDGET, CU SPINNER CENTRAT */

/* MOBILE - RESULTS CARD LIKE WIDGET, CU SPINNER CENTRAT */
@media (max-width: 720px) {
  .results-card .risk-score-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    text-align: center;
  }

  /* CERCUL – centrat deasupra */
  .results-card .risk-score-circle {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto 4px auto;
    border-radius: 999px;
    border: 3px solid rgba(248, 250, 252, 0.95);
    background: radial-gradient(circle at 30% 0, #22c55e, #0f172a);
    box-shadow:
      0 0 0 2px rgba(15, 23, 42, 0.9),
      0 0 26px rgba(34, 197, 94, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

 .results-card .risk-score-circle-inner {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

  .results-card #scoreCircleValue {
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    color: #ecfdf5;
  }

  .risk-score-percent-hint {
    margin-top: 4px;
    font-size: 0.75rem;
    color: #9ca3af;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
    width: 100%;
  }

  /* SPINNER MARE CENTRAT ÎN CERC */
  .results-card .risk-score-circle::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 3px solid rgba(148, 163, 184, 0.35);
    border-top-color: #22c55e;
    border-right-color: #38bdf8;
    border-bottom-color: rgba(148, 163, 184, 0.15);
    border-left-color: rgba(148, 163, 184, 0.15);
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.7);
    transform: translate(-50%, -50%);
    opacity: 0;
    z-index: 3;          /* sub text, peste fundal */
    pointer-events: none;
    transition: opacity 0.15s ease;
  }

  .results-card.is-loading .risk-score-circle::before {
    opacity: 1;
    animation: spinCircleCentered 0.9s linear infinite;
  }

  /* TEXTUL "Low estimated 10-year risk" SUB CERC */
  .results-card #riskScoreLabel {
    margin-top: 2px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #e5e7eb;
    text-align: center;
    width: 100%;
  }

  /* BARA GRADATĂ SUB LABEL, PE LĂȚIME MAXIMĂ */
  .results-card .risk-bar-wrap {
    margin-top: 4px;
    width: 100%;
    align-self: stretch;
  }

  .results-card .risk-bar-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #22c55e, #fbbf24, #fb7185);
    position: relative;
    overflow: hidden;
    box-shadow:
      0 0 0 1px rgba(15, 23, 42, 0.7),
      0 10px 20px rgba(15, 23, 42, 0.9);
  }

  .results-card .risk-bar-indicator {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 2px solid #f9fafb;
    background: radial-gradient(circle at 30% 0, #f97316, #b91c1c);
    box-shadow:
      0 0 0 2px rgba(15, 23, 42, 0.9),
      0 0 18px rgba(248, 250, 252, 0.9);
  }

  /* TEXTUL DE INTERPRETARE RĂMÂNE DEDESUBT */
  .results-card #riskText {
    margin-top: 6px;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #9ca3af;
  }
}
/* CENTER HUB STRIP (between header and main) */
.hub-strip {
  border-radius: var(--radius-xl);
  padding: 18px 20px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: radial-gradient(
    circle at 0 0,
    rgba(15, 23, 42, 0.92),
    rgba(15, 23, 42, 0.82)
  );
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(var(--glass-blur));
}

.hub-inner.center {
  width: 100%;
  margin: 0;
  text-align: center;
}

.hub-title {
  text-align: center;
   margin-top: 0;
  margin-bottom: 8px;
}

.hub-text {
  margin: 0 0 10px 0;
  width: 100%;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-muted);
}
/* Highlighted medical disclaimer */
.hub-disclaimer {
  color: #22c55e; /* emerald / fluent green */
  font-weight: 500;
  position: relative;
}



.hub-links {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.hub-links a {
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.5);
  text-decoration: none;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.85);
  white-space: nowrap;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.hub-links a:hover {
  border-color: rgba(52, 211, 153, 0.7);
  color: #ecfdf5;
  background: radial-gradient(
    circle at 0 0,
    rgba(34, 197, 94, 0.25),
    rgba(21, 128, 61, 0.7)
  );
  transform: translateY(-0.5px);
}

@media (max-width: 768px) {
  .app-shell {
    display: flex;
    flex-direction: column;
  }
  header {
    order: 1;
  }
  main {
    order: 2;
  }
  .hub-strip {
    order: 3;
  }
}
@media (max-width: 720px) {
  .app-shell { display: flex; flex-direction: column; }

  /* header e hidden la tine, deci ordonăm doar ce rămâne vizibil */
  main { order: 1; }
  .hub-strip { order: 2; }
  footer { order: 3; }
}
/* A1C page: input + buttons on ONE line */
.a1c-inline{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:nowrap; /* prevent second row */
}

/* Keep your existing input look, only highlight BORDER */
#a1cPercent{
  flex:1 1 auto;
  min-width:220px;            /* important: prevents wrap */
  height:46px;
  background:transparent;     /* keep original, NOT orange fill */
  color:inherit;
  border:2px solid #ff7a00;   /* fluorescent orange border */
  box-shadow:0 0 0 3px rgba(255,122,0,0.18);
  text-align: center;
}

/* Center button content */
.submit-btn, .submit-btn-secondary{
  height:46px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  white-space:nowrap;
  flex:0 0 auto;              /* buttons don't stretch */
}

/* Invalid: ONLY border turns red (no fill) */
#a1cPercent.is-invalid{
  border-color:#ff2b2b;
  box-shadow:0 0 0 3px rgba(255,43,43,0.18);
}

/* Mobile: allow stacking (optional). If you want one line even on mobile, remove this block. */
@media (max-width:720px){
  .a1c-inline{
    flex-direction:column;
    align-items:stretch;
  }
  #a1cPercent{ min-width:0; }
}
/* Optical centering fix for buttons with pulse-dot */
.submit-btn .pulse-dot{
  position:absolute;
  left:14px;
}
/* Results circles: static interior, border only */
.risk-score-circle{
  animation: none !important;
  transition: none !important;
}

.risk-score-circle::before,
.risk-score-circle::after{
  animation: none !important;
  transition: none !important;
}

/* Keep border, neutral interior */
.risk-score-circle{
  background: transparent !important;
}
