:root {
  --relatix-ink: #001b44;
  --relatix-marine: #0252a1;
  --relatix-turquoise: #b9e7fe;
  --relatix-purple-ink: #433d66;
  --relatix-purple-accent: #722d5a;
  --relatix-glow: #efe4d0;
  --relatix-white: #ffffff;
  --relatix-sky-panel: #a2beda;
  --relatix-cream-panel: #f7ebd6;
  --surface: #f7fbfd;
  --border: rgba(0, 27, 68, 0.14);
  --border-strong: rgba(2, 82, 161, 0.42);
  --shadow: 0 18px 48px rgba(0, 27, 68, 0.12);
  --shadow-soft: 0 10px 22px rgba(0, 27, 68, 0.10);
  --radius-card: 14px;
  --radius-field: 12px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--relatix-ink);
  background:
    radial-gradient(90% 38% at 50% 0%, rgba(239, 228, 208, 0.34), rgba(239, 228, 208, 0) 58%),
    linear-gradient(180deg, rgba(185, 231, 254, 0.42), rgba(255, 255, 255, 0) 360px),
    var(--surface);
  font-family: "Libre Franklin", "Helvetica Neue", helvetica, arial, sans-serif;
  line-height: 1.55;
}

a {
  color: var(--relatix-marine);
}

.app-shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
}

.app-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.app-header__inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  color: var(--relatix-ink);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-decoration: none;
  text-transform: uppercase;
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 700;
}

.app-nav a {
  color: var(--relatix-ink);
  text-decoration: none;
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.72rem;
}

.app-nav a:hover,
.app-nav a:focus-visible {
  color: var(--relatix-purple-accent);
  background: rgba(185, 231, 254, 0.26);
}

.app-main {
  padding: clamp(32px, 5vw, 56px) 0;
}

.auth-panel,
.dashboard-hero,
.form-panel,
.debug-panel,
.panel {
  background: var(--relatix-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}

.auth-panel {
  min-height: 360px;
  display: grid;
  align-items: center;
  gap: 32px;
  padding: clamp(28px, 6vw, 64px);
  border: 2px solid var(--relatix-marine);
  background:
    linear-gradient(135deg, rgba(185, 231, 254, 0.22), rgba(239, 228, 208, 0.28)),
    var(--relatix-white);
}

.auth-panel--login {
  justify-items: center;
  text-align: center;
}

.auth-panel__copy {
  max-width: 680px;
}

.auth-panel__primary-action {
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--relatix-marine);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.12;
}

h1 {
  max-width: 760px;
  font-size: clamp(2rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(1.35rem, 3vw, 2.1rem);
}

.lede,
.muted,
.panel p {
  color: rgba(0, 27, 68, 0.72);
}

.lede {
  max-width: 640px;
  margin: 20px 0 0;
  font-size: 1.08rem;
}

.auth-panel--login .lede {
  margin-right: auto;
  margin-left: auto;
}

.button,
.rx-btn {
  position: relative;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 3.2rem;
  min-width: 11.5rem;
  padding: 0.88rem 1.62rem;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  background:
    radial-gradient(120% 60% at 50% 8%, rgba(247, 188, 124, 0.22) 0%, rgba(247, 188, 124, 0) 34%),
    linear-gradient(180deg, rgba(2, 82, 161, 0.84) 0%, rgba(0, 27, 68, 0.90) 62%, rgba(0, 27, 68, 0.94) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -10px 14px rgba(0, 27, 68, 0.18),
    0 6px 10px rgba(0, 27, 68, 0.20);
  color: var(--relatix-white);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  transition: transform 180ms ease, box-shadow 220ms ease, color 160ms ease;
}

.button::after,
.rx-btn::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -24%;
  height: 48%;
  border-radius: var(--radius-pill);
  pointer-events: none;
  opacity: 0.30;
  filter: blur(20px);
  background: radial-gradient(circle at 50% 42%, rgba(239, 228, 208, 0) 0%, rgba(239, 228, 208, 0.52) 28%, rgba(185, 231, 254, 0.24) 60%, rgba(185, 231, 254, 0) 84%);
  transition: opacity 240ms ease, transform 260ms ease, filter 260ms ease;
}

.button:hover,
.button:focus-visible,
.rx-btn:hover,
.rx-btn:focus-visible {
  color: var(--relatix-white);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 239, 211, 0.76),
    inset 0 -14px 20px rgba(2, 82, 161, 0.18),
    0 6px 10px rgba(0, 27, 68, 0.20),
    0 0 34px rgba(239, 228, 208, 0.34),
    0 0 70px rgba(185, 231, 254, 0.26),
    0 0 28px rgba(247, 188, 124, 0.58),
    0 0 66px rgba(242, 154, 104, 0.42);
}

.button:hover::after,
.button:focus-visible::after,
.rx-btn:hover::after,
.rx-btn:focus-visible::after {
  opacity: 1;
  transform: scaleX(1.44);
  filter: blur(40px);
}

.button--secondary,
.rx-btn-secondary {
  background:
    linear-gradient(180deg, rgba(239, 228, 208, 0.60), rgba(239, 228, 208, 0.20) 34%, rgba(185, 231, 254, 0.18) 100%),
    linear-gradient(135deg, rgba(185, 231, 254, 0.20), rgba(114, 45, 90, 0.16));
  color: var(--relatix-ink);
  text-shadow: none;
}

.button--secondary:hover,
.button--secondary:focus-visible,
.rx-btn-secondary:hover,
.rx-btn-secondary:focus-visible {
  color: var(--relatix-ink);
}

.button--google::before {
  content: "G";
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  margin-right: 2px;
  border-radius: 50%;
  background: var(--relatix-white);
  color: #4285f4;
  font-family: arial, sans-serif;
  font-weight: 800;
  text-shadow: none;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: clamp(24px, 4vw, 44px);
  border: 2px solid var(--relatix-marine);
  background:
    radial-gradient(70% 80% at 100% 0%, rgba(239, 228, 208, 0.38), rgba(239, 228, 208, 0) 54%),
    linear-gradient(135deg, rgba(185, 231, 254, 0.30), rgba(255, 255, 255, 0.94) 46%, rgba(239, 228, 208, 0.30));
}

.avatar {
  width: 84px;
  height: 84px;
  flex: 0 0 84px;
  border: 3px solid var(--relatix-glow);
  border-radius: 50%;
  object-fit: cover;
}

.dashboard-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
  padding: 0.52rem 0.86rem;
  border: 1px solid rgba(2, 82, 161, 0.28);
  border-radius: var(--radius-pill);
  background: rgba(185, 231, 254, 0.32);
  color: var(--relatix-ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.dashboard-status::before {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--relatix-marine);
  box-shadow: 0 0 0 4px rgba(185, 231, 254, 0.55);
}

.dashboard-actions,
.panel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 18px;
  margin-top: 24px;
}

.panel {
  min-height: 220px;
  padding: clamp(20px, 3vw, 28px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 251, 253, 0.96)),
    var(--relatix-white);
  box-shadow: var(--shadow-soft);
}

.panel--cream {
  background: var(--relatix-cream-panel);
}

.panel--sky {
  background: rgba(162, 190, 218, 0.72);
}

.panel--featured {
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(239, 228, 208, 0.22), rgba(239, 228, 208, 0) 42%),
    linear-gradient(135deg, var(--relatix-ink), var(--relatix-marine));
  color: var(--relatix-white);
  border-color: rgba(255, 255, 255, 0.45);
}

.panel--featured .eyebrow,
.panel--featured p {
  color: var(--relatix-glow);
}

.profile-depth {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.profile-depth__item {
  display: grid;
  gap: 6px;
}

.profile-depth__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(0, 27, 68, 0.76);
  font-size: 0.92rem;
  font-weight: 700;
}

.profile-depth__track {
  height: 0.72rem;
  overflow: hidden;
  border: 1px solid rgba(0, 27, 68, 0.15);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.86);
}

.profile-depth__fill {
  height: 100%;
  border-radius: inherit;
  background:
    repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255, 255, 255, 0.22) 5px, rgba(255, 255, 255, 0.22) 7px),
    linear-gradient(90deg, var(--relatix-marine), var(--relatix-purple-accent));
}

/* ── Dashboard task list ───────────────────────────────────────────────────── */
.panel--tasks { grid-column: 1 / -1; }

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

.tasks-progress { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tasks-progress__ring circle:last-child {
  stroke-dasharray: 0, 100;
  transition: stroke-dasharray 0.8s ease;
}
.tasks-progress__label { font-size: 0.8rem; font-weight: 700; color: var(--relatix-marine); }

.task-list { display: grid; gap: 8px; }

.task-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; transition: border-color 0.2s;
}
.task-item:hover { border-color: var(--relatix-marine); }
.task-item--done { background: #f7fbfd; opacity: 0.8; }

.task-area-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.task-area-dot--cognitive { background: #2563eb; }
.task-area-dot--wellbeing { background: #16a34a; }

.task-body { flex: 1; min-width: 0; }
.task-title { font-weight: 700; font-size: 0.92rem; }
.task-meta { font-size: 0.78rem; color: rgba(0,27,68,0.55); margin-top: 2px; }

.task-badge { font-size: 0.78rem; font-weight: 700; color: #16a34a; white-space: nowrap; }

.task-btn { padding: 6px 14px; min-height: 34px; font-size: 0.85rem; white-space: nowrap; }

.supporter-section {
  margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px;
}
.supporter-section summary {
  cursor: pointer; font-size: 0.87rem; font-weight: 700; color: rgba(0,27,68,0.65);
  list-style: none; display: flex; align-items: center; gap: 6px;
}
.supporter-section summary::before { content: '▶'; font-size: 0.65em; }
.supporter-section[open] summary::before { content: '▼'; }

.opportunity-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.opportunity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0.78rem 0.86rem;
  border: 1px solid rgba(0, 27, 68, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
}

.opportunity-item strong {
  display: block;
}

.opportunity-item span {
  color: rgba(0, 27, 68, 0.68);
  font-size: 0.9rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.62rem;
  border-radius: var(--radius-pill);
  background: rgba(239, 228, 208, 0.92);
  color: var(--relatix-ink);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.form-panel {
  max-width: 760px;
  padding: clamp(28px, 5vw, 48px);
  border: 2px solid var(--relatix-marine);
  background: rgba(185, 231, 254, 0.22);
}

.stacked-form {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.stacked-form label {
  font-weight: 800;
}

.stacked-form input,
.stacked-form textarea {
  width: 100%;
  border: 2px solid var(--relatix-marine);
  border-radius: var(--radius-field);
  padding: 12px 14px;
  color: var(--relatix-ink);
  background: var(--relatix-glow);
  font: inherit;
}

.stacked-form input:focus,
.stacked-form textarea:focus {
  border-color: var(--relatix-ink);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(185, 231, 254, 0.45);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.debug-panel {
  margin-top: 24px;
  padding: 16px 18px;
  color: rgba(0, 27, 68, 0.72);
  background: rgba(239, 228, 208, 0.72);
  box-shadow: none;
}

.debug-panel code {
  display: inline-block;
  margin-left: 8px;
  color: var(--relatix-ink);
  overflow-wrap: anywhere;
}

/* Landing dashboard placeholder */

.landing-dashboard {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 680px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.landing-dashboard__sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 16px;
  border-right: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(185, 231, 254, 0.42), rgba(247, 235, 214, 0.50)),
    var(--relatix-white);
}

.landing-dashboard__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  color: var(--relatix-ink);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.landing-dashboard__brand-dot {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: var(--relatix-marine);
  box-shadow: 0 0 0 4px rgba(185, 231, 254, 0.55);
}

.landing-dashboard__nav-group {
  display: grid;
  gap: 4px;
}

.landing-dashboard__nav-label {
  margin: 10px 10px 2px;
  color: rgba(0, 27, 68, 0.56);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.landing-dashboard__nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  color: rgba(0, 27, 68, 0.74);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.landing-dashboard__nav-item span {
  width: 1.1rem;
  color: var(--relatix-marine);
  text-align: center;
}

.landing-dashboard__nav-item:hover,
.landing-dashboard__nav-item:focus-visible,
.landing-dashboard__nav-item--active {
  background: rgba(255, 255, 255, 0.78);
  color: var(--relatix-ink);
}

.landing-dashboard__participant {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 14px 10px 0;
  border-top: 1px solid var(--border);
}

.landing-dashboard__participant strong,
.landing-dashboard__participant span {
  display: block;
}

.landing-dashboard__participant strong {
  font-size: 0.86rem;
}

.landing-dashboard__participant span {
  color: rgba(0, 27, 68, 0.58);
  font-size: 0.74rem;
}

.landing-dashboard__avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border-radius: 50%;
  background: var(--relatix-glow);
  color: var(--relatix-ink);
  font-weight: 800;
}

.landing-dashboard__main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding: clamp(18px, 3vw, 26px);
  background:
    radial-gradient(90% 46% at 100% 0%, rgba(239, 228, 208, 0.26), rgba(239, 228, 208, 0) 52%),
    rgba(255, 255, 255, 0.62);
}

.landing-dashboard__topbar,
.dashboard-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.landing-dashboard__topbar h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.landing-dashboard__topbar .muted {
  margin: 8px 0 0;
}

.landing-dashboard__top-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.dashboard-card {
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
}

.dashboard-card--cream {
  background: rgba(247, 235, 214, 0.82);
}

.dashboard-card--profile {
  background: rgba(162, 190, 218, 0.44);
}

.dashboard-card--feed {
  background: rgba(255, 255, 255, 0.80);
}

.dashboard-card__header {
  margin-bottom: 12px;
}

.dashboard-card__header h2 {
  font-size: 1rem;
}

.dashboard-card__header a,
.dashboard-card__header span {
  color: var(--relatix-marine);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
}

.compact-list {
  display: grid;
}

.compact-item,
.opportunity-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 27, 68, 0.10);
}

.compact-item:last-child,
.opportunity-row:last-child {
  border-bottom: 0;
}

.compact-item__check {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 2px solid rgba(0, 27, 68, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
}

.compact-item--done .compact-item__check {
  position: relative;
  border-color: var(--relatix-marine);
  background: var(--relatix-marine);
}

.compact-item--done .compact-item__check::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 3px;
  width: 6px;
  height: 4px;
  border-left: 2px solid var(--relatix-white);
  border-bottom: 2px solid var(--relatix-white);
  transform: rotate(-45deg);
}

.compact-item__copy,
.opportunity-row__copy {
  min-width: 0;
  flex: 1;
}

.compact-item__copy strong,
.compact-item__copy span,
.opportunity-row__copy strong,
.opportunity-row__copy span {
  display: block;
}

.compact-item__copy strong,
.opportunity-row__copy strong {
  overflow: hidden;
  color: var(--relatix-ink);
  font-size: 0.9rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-item__copy span,
.opportunity-row__copy span {
  color: rgba(0, 27, 68, 0.62);
  font-size: 0.75rem;
}

.compact-actions {
  display: flex;
  gap: 5px;
  flex: 0 0 auto;
}

.compact-action {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(0, 27, 68, 0.14);
  border-radius: 10px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.58);
  color: var(--relatix-ink);
  font: inherit;
  font-weight: 800;
  line-height: 1;
}

.compact-action:hover,
.compact-action:focus-visible {
  transform: translateY(-1px);
}

.compact-action--go {
  border-color: rgba(2, 82, 161, 0.30);
  color: var(--relatix-marine);
  background: rgba(185, 231, 254, 0.38);
}

.compact-action--later {
  color: #854f0b;
  background: rgba(239, 228, 208, 0.72);
}

.compact-action--skip {
  color: var(--relatix-purple-accent);
  background: rgba(255, 255, 255, 0.70);
}

.opportunity-row__icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--relatix-marine);
  font-weight: 800;
}

.depth-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.depth-item {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.depth-item span,
.depth-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.depth-item span {
  color: rgba(0, 27, 68, 0.68);
  font-size: 0.78rem;
  font-weight: 700;
}

.depth-item strong {
  font-size: 0.76rem;
}

.depth-track {
  height: 9px;
  overflow: hidden;
  border: 1px solid rgba(0, 27, 68, 0.13);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.70);
}

.depth-fill {
  height: 100%;
  border-radius: inherit;
}

.depth-fill--complete {
  background:
    repeating-linear-gradient(90deg, transparent, transparent 5px, rgba(255, 255, 255, 0.22) 5px, rgba(255, 255, 255, 0.22) 7px),
    var(--relatix-marine);
}

.depth-fill--partial {
  background:
    repeating-linear-gradient(45deg, transparent, transparent 4px, rgba(255, 255, 255, 0.22) 4px, rgba(255, 255, 255, 0.22) 6px),
    var(--relatix-purple-accent);
}

.depth-fill--empty {
  background: transparent;
}

.depth-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
  color: rgba(0, 27, 68, 0.68);
  font-size: 0.78rem;
  font-weight: 700;
}

.depth-key {
  width: 11px;
  height: 11px;
  display: inline-block;
  margin-right: 5px;
  border-radius: 3px;
  vertical-align: -1px;
}

.depth-key--complete {
  background: var(--relatix-marine);
}

.depth-key--partial {
  background: var(--relatix-purple-accent);
}

.depth-key--empty {
  border: 2px solid rgba(0, 27, 68, 0.24);
}

/* ── Dashboard feed ──────────────────────────────────────────────────────── */

.feed-customise-link {
  font-size: 0.82rem;
  color: var(--relatix-marine);
  text-decoration: none;
}

.feed-customise-link:hover {
  text-decoration: underline;
}

.feed-onboarding {
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: rgba(0, 93, 209, 0.07);
  border-left: 3px solid var(--relatix-marine);
}

.feed-onboarding p {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: var(--relatix-ink);
  line-height: 1.5;
}

.feed-onboarding__cta {
  display: inline-block;
  margin-top: 4px;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--relatix-marine);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.feed-onboarding__cta:hover {
  opacity: 0.9;
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 80px;
}

.feed-item {
  min-width: 0;
  padding: 0 16px;
  border-right: 1px solid rgba(0, 27, 68, 0.10);
}

.feed-item:first-child { padding-left: 0; }
.feed-item:last-child { padding-right: 0; border-right: 0; }

.feed-item__title {
  display: block;
  margin: 0 0 7px;
  color: var(--relatix-ink);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
}

.feed-item__title:hover { text-decoration: underline; }

.feed-item__excerpt {
  margin: 0 0 8px;
  color: rgba(0, 27, 68, 0.70);
  font-size: 0.78rem;
  line-height: 1.5;
}

.feed-item__date {
  font-size: 0.74rem;
  font-weight: 700;
  color: rgba(0, 27, 68, 0.45);
  letter-spacing: 0.02em;
}

.feed-loading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px 0;
}

.feed-loading__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(0, 27, 68, 0.25);
  animation: feed-pulse 1.2s ease-in-out infinite;
}

.feed-loading__dot:nth-child(2) { animation-delay: 0.2s; }
.feed-loading__dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes feed-pulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.9); }
  40%           { opacity: 1;   transform: scale(1.1); }
}

.feed-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px 0;
  color: rgba(0, 27, 68, 0.55);
  font-size: 0.86rem;
  text-align: center;
}

.feed-empty a { color: var(--relatix-marine); }

/* ── Feed preferences page ───────────────────────────────────────────────── */

.feed-prefs-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

.feed-prefs-header {
  margin-bottom: 32px;
}

.feed-prefs-back {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 0.84rem;
  color: var(--relatix-marine);
  text-decoration: none;
}

.feed-prefs-back:hover { text-decoration: underline; }

.feed-prefs-header h1 {
  margin: 0 0 10px;
  font-size: 1.5rem;
}

.feed-prefs-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.feed-prefs-group {
  margin: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.feed-prefs-group legend {
  padding: 0 6px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--relatix-ink);
}

.feed-prefs-hint {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: rgba(0, 27, 68, 0.60);
  line-height: 1.5;
}

.feed-prefs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.feed-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1.5px solid rgba(0, 27, 68, 0.22);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(0, 27, 68, 0.75);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  user-select: none;
}

.feed-chip input[type=checkbox] {
  display: none;
}

.feed-chip:hover {
  border-color: var(--relatix-marine);
  color: var(--relatix-marine);
}

.feed-chip--selected {
  border-color: var(--relatix-marine);
  background: var(--relatix-marine);
  color: #fff;
}

.feed-chip--selected:hover {
  opacity: 0.88;
  color: #fff;
}

.feed-keywords-input {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1.5px solid rgba(0, 27, 68, 0.22);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.6;
  resize: vertical;
  color: var(--relatix-ink);
  background: #fff;
  box-sizing: border-box;
}

.feed-keywords-input:focus {
  outline: none;
  border-color: var(--relatix-marine);
  box-shadow: 0 0 0 3px rgba(0, 93, 209, 0.12);
}

.feed-prefs-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.feed-prefs-save {
  padding: 10px 28px;
  border: none;
  border-radius: 6px;
  background: var(--relatix-marine);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.feed-prefs-save:hover { opacity: 0.88; }
.feed-prefs-save:disabled { opacity: 0.5; cursor: not-allowed; }

.feed-prefs-status {
  font-size: 0.84rem;
  color: rgba(0, 27, 68, 0.65);
}

/* Form renderer */

.rx-form,
.rx-result {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 0 40px;
}

.rx-form-header {
  margin-bottom: 28px;
}

.rx-form-header h1 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.rx-form-desc {
  color: rgba(0, 27, 68, 0.7);
  margin: 0;
  font-size: 0.97rem;
}

.rx-progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.rx-progress-bar {
  flex: 1;
  height: 8px;
  background: rgba(0, 27, 68, 0.12);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.rx-progress-fill {
  height: 100%;
  background:
    repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255, 255, 255, 0.22) 5px, rgba(255, 255, 255, 0.22) 7px),
    linear-gradient(90deg, var(--relatix-marine), var(--relatix-purple-accent));
  border-radius: var(--radius-pill);
  transition: width 0.3s;
}

.rx-progress-label {
  font-size: 0.82rem;
  color: rgba(0, 27, 68, 0.55);
  white-space: nowrap;
}

.rx-error-banner {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  padding: 10px 14px;
  border-radius: var(--radius-field);
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.rx-nav {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 32px;
  flex-wrap: wrap;
}

.rx-hint {
  font-size: 0.85rem;
  color: rgba(0, 27, 68, 0.55);
}

.rx-error {
  color: #b91c1c;
  font-size: 0.9rem;
  margin: 8px 0 0;
}

.rx-btn-primary {
  color: var(--relatix-white);
}

.rx-btn-google {
  background: var(--relatix-white);
  color: #3c4043;
  border: 1px solid #dadce0;
  box-shadow: 0 4px 10px rgba(0, 27, 68, 0.10);
  font-weight: 700;
  padding: 10px 20px;
  text-shadow: none;
}

.rx-btn-google::after {
  content: none;
}

.rx-btn-google:hover {
  background: #f8f9fa;
  color: #3c4043;
}

.rx-btn-google img {
  vertical-align: middle;
}

.rx-likert-wrap,
.rx-matrix-wrap {
  overflow-x: auto;
}

.rx-likert-table,
.rx-matrix-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.91rem;
}

.rx-likert-table th,
.rx-matrix-table th {
  background: rgba(162, 190, 218, 0.62);
  font-weight: 700;
  text-align: center;
  padding: 8px 6px;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  white-space: nowrap;
}

.rx-likert-table tr,
.rx-matrix-table tr {
  border-bottom: 1px solid var(--border);
}

.rx-likert-table tr.rx-answered,
.rx-matrix-table tr.rx-answered {
  background: rgba(247, 235, 214, 0.52);
}

.rx-likert-table tr.rx-row-error,
.rx-matrix-table tr.rx-row-error {
  background: #fff8f8;
  outline: 1px solid #fca5a5;
}

.rx-q-col {
  min-width: 180px;
  max-width: 320px;
}

.rx-q-text {
  padding: 10px 12px;
  line-height: 1.4;
}

.rx-radio-cell {
  text-align: center;
  padding: 8px 10px;
}

.rx-radio-cell input[type="radio"] {
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: var(--relatix-marine);
}

.rx-domain-heading {
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--relatix-marine);
  margin: 28px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--relatix-marine);
}

.rx-card {
  background: var(--relatix-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s;
}

.rx-card.rx-card-error {
  border-color: #fca5a5;
  background: #fff8f8;
}

.rx-card.rx-answered {
  border-color: var(--relatix-marine);
}

.rx-card-q {
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.4;
}

.rx-card-options {
  display: grid;
  gap: 6px;
}

.rx-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-field);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.86);
}

.rx-option:hover {
  border-color: var(--relatix-marine);
  background: rgba(185, 231, 254, 0.24);
}

.rx-option-selected {
  background: rgba(185, 231, 254, 0.42);
  border-color: var(--relatix-marine);
  font-weight: 600;
}

.rx-option-free {
  border-style: dashed;
  color: rgba(0, 27, 68, 0.6);
}

.rx-option input[type="radio"] {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--relatix-marine);
}

.rx-freetext {
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border: 2px solid var(--relatix-marine);
  border-radius: var(--radius-field);
  background: var(--relatix-glow);
  color: var(--relatix-ink);
  font: inherit;
  font-size: 0.9rem;
  resize: vertical;
}

.rx-matrix-group {
  margin-bottom: 32px;
}

.rx-matrix-note {
  font-size: 0.91rem;
  color: rgba(0, 27, 68, 0.7);
  background: rgba(247, 235, 214, 0.72);
  border-left: 3px solid var(--relatix-marine);
  border-radius: 0 var(--radius-field) var(--radius-field) 0;
  padding: 10px 14px;
  margin-bottom: 12px;
  line-height: 1.5;
}

.rx-result {
  text-align: center;
}

.rx-result-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(185, 231, 254, 0.56);
  color: var(--relatix-marine);
  font-size: 1.8rem;
  margin: 24px auto 16px;
}

.rx-result h2 {
  margin-bottom: 28px;
  font-size: 1.5rem;
}

.rx-result h2 em {
  font-style: normal;
  color: var(--relatix-marine);
}

.rx-score-section {
  margin: 0 auto 32px;
  max-width: 560px;
  text-align: left;
}

.rx-score-total {
  font-size: 3rem;
  font-weight: 800;
  color: var(--relatix-marine);
  text-align: center;
}

.rx-score-interpretation {
  text-align: center;
  color: rgba(0, 27, 68, 0.7);
  margin-bottom: 16px;
}

.rx-score-label {
  font-weight: 700;
  margin-bottom: 12px;
}

.rx-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.rx-bar-label {
  flex: 0 0 160px;
  font-size: 0.88rem;
  font-weight: 600;
}

.rx-bar-track {
  flex: 1;
  height: 14px;
  background: rgba(0, 27, 68, 0.12);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.rx-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.6s ease;
}

.rx-bar-teal,
.rx-bar-green {
  background:
    repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255, 255, 255, 0.22) 5px, rgba(255, 255, 255, 0.22) 7px),
    linear-gradient(90deg, var(--relatix-marine), var(--relatix-purple-accent));
}

.rx-bar-pct {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(0, 27, 68, 0.7);
  width: 30px;
}

.rx-disclaimer {
  font-size: 0.82rem;
  color: rgba(0, 27, 68, 0.55);
  max-width: 560px;
  margin: 0 auto 24px;
  line-height: 1.5;
}

.rx-save-cta {
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(239, 228, 208, 0.22), rgba(239, 228, 208, 0) 42%),
    linear-gradient(135deg, var(--relatix-ink), var(--relatix-marine));
  color: var(--relatix-glow);
  padding: 28px 32px;
  border-radius: var(--radius-card);
  max-width: 480px;
  margin: 0 auto;
}

.rx-save-cta p {
  margin: 0 0 16px;
}

.rx-save-cta--saved {
  background: rgba(185, 231, 254, 0.48);
  color: var(--relatix-ink);
}

.rx-muted {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.68);
  margin: 12px 0 0 !important;
}

.rx-save-cta--saved .rx-muted {
  color: rgba(0, 27, 68, 0.65);
}

body.rx-embed {
  background: transparent;
  padding: 0;
  margin: 0;
  min-height: unset;
}

body.rx-embed .rx-form,
body.rx-embed .rx-result {
  padding: 16px;
}

@media (max-width: 820px) {
  .app-header__inner {
    display: grid;
    align-items: start;
  }

  .dashboard-hero,
  .dashboard-grid,
  .landing-dashboard,
  .landing-dashboard__top-row,
  .depth-grid,
  .feed-grid {
    grid-template-columns: 1fr;
  }

  .landing-dashboard__sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .landing-dashboard__nav-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-dashboard__nav-label {
    grid-column: 1 / -1;
  }

  .landing-dashboard__participant {
    margin-top: 8px;
  }

  .landing-dashboard__topbar,
  .dashboard-card__header {
    align-items: flex-start;
  }

  .feed-item {
    padding: 12px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(0, 27, 68, 0.10);
  }

  .feed-item:last-child {
    border-bottom: 0;
  }

  .app-nav {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .dashboard-status {
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 20px, 1120px);
  }

  .button,
  .rx-btn {
    width: 100%;
    min-width: 0;
  }

  .opportunity-item,
  .opportunity-row,
  .compact-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .landing-dashboard__main,
  .landing-dashboard__sidebar {
    padding: 16px;
  }

  .landing-dashboard__nav-group {
    grid-template-columns: 1fr;
  }

  .compact-actions {
    width: 100%;
  }

  .compact-action {
    width: 36px;
    height: 36px;
  }

  .rx-bar-row {
    align-items: stretch;
    flex-direction: column;
    gap: 5px;
  }

  .rx-bar-label,
  .rx-bar-pct {
    width: auto;
    flex: none;
  }
}
