/* ============================================================
   N-OF-1 EDU — Mobile-First Community App
   Theme: Teal (clinical) + Amber (education)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ── Variables ───────────────────────────────────────────────────────────── */
:root {
  --primary:         #0f766e;   /* teal-700 */
  --primary-light:   #ccfbf1;   /* teal-100 */
  --primary-dark:    #0d5b55;
  --primary-mid:     #14b8a6;   /* teal-500 */
  --accent:          #d97706;   /* amber-600 */
  --accent-light:    #fef3c7;   /* amber-100 */
  --accent-mid:      #f59e0b;   /* amber-500 */

  --success:         #16a34a;
  --success-light:   #dcfce7;
  --warning:         #ca8a04;
  --warning-light:   #fef9c3;
  --danger:          #dc2626;
  --danger-light:    #fee2e2;
  --info:            #2563eb;
  --info-light:      #dbeafe;

  --white:           #ffffff;
  --bg:              #f0fdfa;
  --slate-50:        #f8fafc;
  --slate-100:       #f1f5f9;
  --slate-200:       #e2e8f0;
  --slate-300:       #cbd5e1;
  --slate-400:       #94a3b8;
  --slate-500:       #64748b;
  --slate-600:       #475569;
  --slate-700:       #334155;
  --slate-800:       #1e293b;
  --slate-900:       #0f172a;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius-sm:  4px;
  --radius:     8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-2xl: 20px;
  --shadow-sm:  0 1px 2px 0 rgb(0 0 0 / .05);
  --shadow:     0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);
  --shadow-md:  0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
  --shadow-lg:  0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
  --header-h:   56px;
  --nav-h:      64px;
  --safe-top:   env(safe-area-inset-top,    0px);
  --safe-bottom:env(safe-area-inset-bottom, 0px);
  --transition: 180ms ease;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; font-family: var(--font); background: var(--bg); color: var(--slate-800); -webkit-font-smoothing: antialiased; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 0.875rem; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img, svg { display: block; }

/* ── App Shell ───────────────────────────────────────────────────────────── */
#app { display: flex; flex-direction: column; height: 100%; }

/* ── Splash ──────────────────────────────────────────────────────────────── */
#splash {
  position: fixed; inset: 0; z-index: 999;
  background: var(--primary);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  transition: opacity 0.4s ease;
}
#splash.fade-out { opacity: 0; pointer-events: none; }
.splash__icon {
  width: 72px; height: 72px; background: rgba(255,255,255,.15);
  border-radius: 18px; display: flex; align-items: center; justify-content: center;
}
.splash__icon svg { width: 40px; height: 40px; color: #fff; }
.splash__title { font-size: 1.5rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.splash__sub   { font-size: 0.8rem; font-weight: 500; color: rgba(255,255,255,.65); letter-spacing: 0.04em; text-transform: uppercase; }
.splash__loader {
  width: 28px; height: 28px; margin-top: 16px;
  border: 3px solid rgba(255,255,255,.2);
  border-top-color: #fff;
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Welcome / Onboarding ────────────────────────────────────────────────── */
#welcome-screen {
  position: fixed; inset: 0; z-index: 50;
  background: var(--bg); display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 32px 24px;
  text-align: center; overflow-y: auto;
}
.welcome__icon {
  width: 80px; height: 80px; background: var(--primary);
  border-radius: 24px; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; box-shadow: var(--shadow-lg);
}
.welcome__icon svg { width: 44px; height: 44px; color: #fff; }
.welcome__title  { font-size: 1.75rem; font-weight: 900; color: var(--slate-900); margin-bottom: 10px; letter-spacing: -0.03em; }
.welcome__sub    { font-size: 0.9rem; color: var(--slate-500); line-height: 1.6; max-width: 320px; margin: 0 auto 28px; }
.welcome__features { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 360px; margin: 0 auto 32px; text-align: left; }
.welcome__feat   { display: flex; align-items: flex-start; gap: 12px; background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow-sm); }
.welcome__feat-icon { width: 36px; height: 36px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.welcome__feat-icon--teal   { background: var(--primary-light); color: var(--primary); }
.welcome__feat-icon--amber  { background: var(--accent-light); color: var(--accent); }
.welcome__feat-icon--violet { background: #ede9fe; color: #7c3aed; }
.welcome__feat-icon--blue   { background: var(--info-light); color: var(--info); }
.welcome__feat-icon svg { width: 18px; height: 18px; }
.welcome__feat-body h4 { font-size: 0.875rem; font-weight: 700; color: var(--slate-800); }
.welcome__feat-body p  { font-size: 0.75rem; color: var(--slate-500); margin-top: 2px; }
.welcome__disclaimer { font-size: 0.7rem; color: var(--slate-400); max-width: 340px; margin: 0 auto 20px; line-height: 1.5; }

/* ── Header ──────────────────────────────────────────────────────────────── */
#app-header {
  height: calc(var(--header-h) + var(--safe-top));
  padding-top: var(--safe-top);
  background: var(--primary); color: #fff;
  display: flex; align-items: center; padding-left: 20px; padding-right: 16px;
  gap: 12px; flex-shrink: 0; box-shadow: 0 2px 8px rgb(15 118 110 / .25);
}
.header__logo {
  width: 36px; height: 36px; background: rgba(255,255,255,.15);
  border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
}
.header__logo svg { width: 20px; height: 20px; color: #fff; }
.header__name   { font-size: 1rem; font-weight: 800; letter-spacing: -0.02em; }
.header__sub    { font-size: 0.65rem; font-weight: 600; color: rgba(255,255,255,.65); text-transform: uppercase; letter-spacing: 0.06em; }
.header__spacer { flex: 1; }
.header__disclaimer {
  font-size: 0.6rem; font-weight: 600; color: rgba(255,255,255,.5);
  background: rgba(255,255,255,.1); border-radius: 6px; padding: 4px 8px;
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* ── Content Area ────────────────────────────────────────────────────────── */
#tab-content {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 8px);
  -webkit-overflow-scrolling: touch;
}
.tab-panel        { display: none; }
.tab-panel.active { display: block; }

/* ── Bottom Navigation ───────────────────────────────────────────────────── */
#bottom-nav {
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--white); border-top: 1px solid var(--slate-200);
  display: flex; flex-shrink: 0;
  box-shadow: 0 -2px 10px rgb(0 0 0 / .06);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; padding: 8px 0;
  font-size: 0.65rem; font-weight: 600; color: var(--slate-400);
  transition: color var(--transition), background var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.nav-item svg { width: 22px; height: 22px; transition: transform var(--transition); }
.nav-item:active svg { transform: scale(0.9); }
.nav-item.active { color: var(--primary); }
.nav-item.active svg { color: var(--primary); }

/* ── Page Scaffold ───────────────────────────────────────────────────────── */
.page { padding: 20px 16px; max-width: 640px; margin: 0 auto; }
.page-hero {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
  padding: 16px; background: var(--primary); border-radius: var(--radius-xl);
  color: #fff; box-shadow: var(--shadow-md);
}
.page-hero__icon {
  width: 48px; height: 48px; background: rgba(255,255,255,.15);
  border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.page-hero__icon svg { width: 26px; height: 26px; color: #fff; }
.page-hero__title { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.02em; }
.page-hero__sub   { font-size: 0.75rem; color: rgba(255,255,255,.7); margin-top: 3px; }

/* ── Section Heading ─────────────────────────────────────────────────────── */
.section-heading {
  font-size: 0.7rem; font-weight: 700; color: var(--slate-400);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin: 20px 0 10px;
}
.section-heading:first-child { margin-top: 0; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--white); border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl); padding: 18px;
  box-shadow: var(--shadow-sm); margin-bottom: 14px;
}
.card--teal   { border-left: 4px solid var(--primary); }
.card--amber  { border-left: 4px solid var(--accent); }
.card--violet { border-left: 4px solid #7c3aed; }
.card--info   { border-left: 4px solid var(--info); }
.card__header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.card__icon {
  width: 40px; height: 40px; border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.card__icon--teal   { background: var(--primary-light); color: var(--primary); }
.card__icon--amber  { background: var(--accent-light); color: var(--accent); }
.card__icon--violet { background: #ede9fe; color: #7c3aed; }
.card__icon--info   { background: var(--info-light); color: var(--info); }
.card__icon svg { width: 22px; height: 22px; }
.card__title  { font-size: 0.95rem; font-weight: 800; color: var(--slate-800); }
.card__sub    { font-size: 0.75rem; color: var(--slate-500); margin-top: 2px; }
.card__body   { font-size: 0.85rem; color: var(--slate-600); line-height: 1.65; }
.card__body p + p { margin-top: 8px; }

/* ── Check List ──────────────────────────────────────────────────────────── */
.check-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.check-list li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 0.82rem; color: var(--slate-700);
}
.check-list li::before {
  content: ''; display: block; width: 16px; height: 16px; flex-shrink: 0;
  background: var(--primary-light); border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='%230f766e' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13 4L6.5 11 3 7.5' stroke='%230f766e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 10px; background-position: center;
  margin-top: 2px;
}
.cross-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.cross-list li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 0.82rem; color: var(--slate-700);
}
.cross-list li::before {
  content: ''; display: block; width: 16px; height: 16px; flex-shrink: 0;
  background: var(--danger-light); border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' stroke='%23dc2626' stroke-width='2' stroke-linecap='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 4l8 8M12 4l-8 8'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 10px; background-position: center;
  margin-top: 2px;
}

/* ── Design Type Blocks ──────────────────────────────────────────────────── */
.design-types { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.design-type  { background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: var(--radius-lg); padding: 12px 14px; }
.design-type__name  { font-size: 0.8rem; font-weight: 800; color: var(--slate-700); margin-bottom: 6px; }
.design-type__desc  { font-size: 0.75rem; color: var(--slate-500); margin-top: 6px; line-height: 1.5; }
.schedule-blocks    { display: flex; flex-wrap: wrap; gap: 4px; }
.sblock {
  min-width: 34px; height: 28px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.02em;
}
.sblock--a  { background: var(--primary); color: #fff; }
.sblock--b  { background: var(--accent); color: #fff; }
.sblock--bl { background: var(--slate-300); color: var(--slate-700); }
.sblock--q  { background: #7c3aed; color: #fff; }

/* ── Comparison Table ────────────────────────────────────────────────────── */
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.compare-table th {
  background: var(--primary); color: #fff;
  padding: 8px 10px; text-align: left; font-weight: 700;
}
.compare-table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.compare-table th:last-child  { border-radius: 0 var(--radius-sm) 0 0; }
.compare-table td { padding: 7px 10px; border-bottom: 1px solid var(--slate-100); color: var(--slate-700); vertical-align: top; }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:nth-child(even) td { background: var(--slate-50); }

/* ── Disease Selector ────────────────────────────────────────────────────── */
.disease-tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.disease-tabs::-webkit-scrollbar { display: none; }
.disease-tab {
  flex-shrink: 0; padding: 8px 14px; border-radius: var(--radius-xl);
  font-size: 0.8rem; font-weight: 700; border: 1.5px solid var(--slate-200);
  background: var(--white); color: var(--slate-600);
  transition: all var(--transition); white-space: nowrap;
}
.disease-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Info Panel ──────────────────────────────────────────────────────────── */
.info-row  { display: flex; justify-content: space-between; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid var(--slate-100); font-size: 0.82rem; }
.info-row:last-child { border-bottom: none; }
.info-row__label { color: var(--slate-500); font-weight: 500; }
.info-row__value { color: var(--slate-800); font-weight: 700; text-align: right; max-width: 60%; }

/* ── Pill List ───────────────────────────────────────────────────────────── */
.pill-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pill {
  font-size: 0.72rem; font-weight: 600; padding: 4px 10px;
  border-radius: var(--radius-xl); border: 1px solid;
}
.pill--teal   { background: var(--primary-light); color: var(--primary); border-color: #99f6e4; }
.pill--amber  { background: var(--accent-light);  color: var(--accent);  border-color: #fde68a; }
.pill--violet { background: #ede9fe; color: #7c3aed; border-color: #c4b5fd; }
.pill--slate  { background: var(--slate-100); color: var(--slate-600); border-color: var(--slate-200); }

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 3px 8px; border-radius: var(--radius-xl);
}
.badge--green  { background: var(--success-light); color: var(--success); }
.badge--blue   { background: var(--info-light);    color: var(--info); }
.badge--amber  { background: var(--accent-light);  color: var(--accent); }
.badge--red    { background: var(--danger-light);  color: var(--danger); }
.badge--teal   { background: var(--primary-light); color: var(--primary); }

/* ── Profile Grid + Cards ────────────────────────────────────────────────── */
.profile-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.profile-card  {
  background: var(--slate-50); border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg); padding: 12px;
  transition: border-color var(--transition), background var(--transition);
}
.profile-card:hover { border-color: var(--primary-mid); background: #f0fdfa; }
.profile-card__top     { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
.profile-card__avatar  {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 800;
}
.profile-card__actions { display: flex; gap: 4px; }
.profile-card__actions button { padding: 4px; color: var(--slate-400); transition: color var(--transition); border-radius: var(--radius-sm); }
.profile-card__actions button:hover { color: var(--danger); }
.profile-card__actions button.export:hover { color: var(--primary); }
.profile-card__name    { font-size: 0.85rem; font-weight: 700; color: var(--slate-800); }
.profile-card__meta    { font-size: 0.72rem; color: var(--slate-500); margin-top: 2px; }
.profile-card__goal    { font-size: 0.7rem; color: var(--primary); font-weight: 600; margin-top: 5px; line-height: 1.4; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: var(--radius-lg); font-size: 0.85rem; font-weight: 700;
  transition: all var(--transition); -webkit-tap-highlight-color: transparent;
}
.btn-sm { padding: 6px 12px; font-size: 0.78rem; border-radius: var(--radius); }
.btn-block { width: 100%; }
.btn svg { width: 16px; height: 16px; }
.btn-primary  { background: var(--primary); color: #fff; box-shadow: var(--shadow); }
.btn-primary:active  { background: var(--primary-dark); transform: scale(0.98); }
.btn-accent   { background: var(--accent); color: #fff; box-shadow: var(--shadow); }
.btn-accent:active   { background: #b45309; transform: scale(0.98); }
.btn-outline  { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:active  { background: var(--primary-light); transform: scale(0.98); }
.btn-ghost    { background: var(--slate-100); color: var(--slate-700); }
.btn-ghost:active    { background: var(--slate-200); }
.btn-danger   { background: var(--danger); color: #fff; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-group  { margin-bottom: 14px; }
.form-label  { display: block; font-size: 0.72rem; font-weight: 700; color: var(--slate-500); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-lg); background: var(--white); color: var(--slate-800);
  font-size: 0.875rem; transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15,118,110,.1);
}
.form-textarea { resize: vertical; min-height: 72px; }
.form-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.range-row { display: flex; align-items: center; gap: 10px; }
.range-row input[type=range] { flex: 1; accent-color: var(--primary); }
.range-val { min-width: 28px; text-align: center; font-weight: 800; font-size: 0.9rem; color: var(--primary); }

/* ── Schedule Preview ────────────────────────────────────────────────────── */
.schedule-preview {
  margin: 14px 0 8px; padding: 14px; background: var(--slate-50);
  border: 1px dashed var(--slate-300); border-radius: var(--radius-lg);
}
.schedule-preview__label { font-size: 0.68rem; font-weight: 700; color: var(--slate-400); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.schedule-row   { display: flex; flex-wrap: wrap; gap: 5px; }
.sblock-lg {
  min-width: 48px; height: 36px; border-radius: var(--radius); padding: 0 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.03em;
}
.sblock-lg--a  { background: var(--primary); color: #fff; }
.sblock-lg--b  { background: var(--accent); color: #fff; }
.sblock-lg--bl { background: var(--slate-300); color: var(--slate-700); }
.sblock-lg--q  { background: #7c3aed; color: #fff; }
.schedule-legend { display: flex; gap: 14px; margin-top: 8px; font-size: 0.72rem; font-weight: 600; color: var(--slate-500); flex-wrap: wrap; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; }
.legend-dot--a  { background: var(--primary); }
.legend-dot--b  { background: var(--accent); }
.legend-dot--bl { background: var(--slate-300); }

/* ── Glossary ────────────────────────────────────────────────────────────── */
.glossary-search { position: relative; margin-bottom: 14px; }
.glossary-search input { padding-left: 38px; }
.glossary-search__icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--slate-400); }
.glossary-letter { font-size: 0.7rem; font-weight: 800; color: var(--primary); text-transform: uppercase; letter-spacing: 0.1em; padding: 10px 0 4px; border-bottom: 2px solid var(--primary-light); margin-bottom: 6px; }
.glossary-item  { padding: 10px 0; border-bottom: 1px solid var(--slate-100); }
.glossary-item:last-child { border-bottom: none; }
.glossary-item__term  { font-size: 0.85rem; font-weight: 800; color: var(--slate-800); }
.glossary-item__def   { font-size: 0.8rem; color: var(--slate-600); margin-top: 3px; line-height: 1.5; }
.glossary-item.hidden { display: none; }

/* ── Notice / Alert ──────────────────────────────────────────────────────── */
.notice {
  display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius-lg);
  border: 1px solid; margin: 14px 0; font-size: 0.8rem; line-height: 1.5;
}
.notice svg    { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.notice--amber { background: var(--accent-light); border-color: #fde68a; color: #92400e; }
.notice--teal  { background: var(--primary-light); border-color: #5eead4; color: #065f46; }
.notice--info  { background: var(--info-light); border-color: #bfdbfe; color: #1e40af; }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15,23,42,.5); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
}
.modal-backdrop.hidden { display: none; }
.modal {
  background: var(--white); border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  padding: 24px; width: 100%; max-width: 520px; max-height: 90vh;
  overflow-y: auto; box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal__title  { font-size: 1rem; font-weight: 800; color: var(--slate-800); }
.modal__close  { width: 32px; height: 32px; border-radius: 50%; background: var(--slate-100); color: var(--slate-500); display: flex; align-items: center; justify-content: center; }
.modal__close:hover { background: var(--slate-200); }
.modal__close svg { width: 16px; height: 16px; }
.modal__actions { display: flex; gap: 10px; margin-top: 20px; }
.modal__actions .btn { flex: 1; }

/* ── Empty State ─────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 40px 20px;
  color: var(--slate-400);
}
.empty-state svg { width: 48px; height: 48px; margin: 0 auto 12px; opacity: 0.3; }
.empty-state__title { font-size: 0.9rem; font-weight: 700; color: var(--slate-500); }
.empty-state__sub   { font-size: 0.78rem; margin-top: 4px; }

/* ── Action Row ──────────────────────────────────────────────────────────── */
.action-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ── Considerations List ─────────────────────────────────────────────────── */
.cons-list { display: flex; flex-direction: column; gap: 6px; }
.cons-item { display: flex; gap: 8px; align-items: flex-start; font-size: 0.8rem; color: var(--slate-700); }
.cons-item::before { content: '→'; color: var(--accent); font-weight: 800; flex-shrink: 0; }

/* ── Intervention Pair ───────────────────────────────────────────────────── */
.int-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin: 8px 0; }
.int-pill {
  padding: 6px 10px; border-radius: var(--radius-lg); font-size: 0.78rem; font-weight: 700;
  text-align: center; border: 1.5px solid;
}
.int-pill--a { background: var(--primary-light); color: var(--primary); border-color: #99f6e4; }
.int-pill--b { background: var(--accent-light); color: var(--accent); border-color: #fde68a; }
.int-vs { font-size: 0.72rem; font-weight: 800; color: var(--slate-400); text-align: center; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (min-width: 540px) {
  .profile-grid { grid-template-columns: 1fr 1fr 1fr; }
  .page { padding: 24px 20px; }
}

/* ── Utilities ───────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Splash content ──────────────────────────────────────────────────────── */
.splash__inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.splash__logo {
  width: 72px; height: 72px; background: rgba(255,255,255,.15);
  border-radius: 18px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.splash__logo svg { width: 44px; height: 44px; }
.splash__loader-bar {
  width: 28px; height: 28px;
  border: 3px solid rgba(255,255,255,.2);
  border-top-color: #fff;
  border-radius: 50%; animation: spin 0.7s linear infinite;
}

/* ── Welcome inner + features (alternate class names) ────────────────────── */
.welcome__inner  { display: flex; flex-direction: column; align-items: center; width: 100%; }
.welcome__logo {
  width: 80px; height: 80px; border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.welcome__logo svg { width: 80px; height: 80px; }
.welcome__feature {
  display: flex; align-items: flex-start; gap: 12px; background: var(--white);
  border: 1px solid var(--slate-200); border-radius: var(--radius-lg);
  padding: 14px; box-shadow: var(--shadow-sm);
}
.welcome__feature-icon { font-size: 1.25rem; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.welcome__feature strong { display: block; font-size: 0.85rem; font-weight: 700; color: var(--slate-800); }
.welcome__feature p { font-size: 0.75rem; color: var(--slate-500); margin-top: 2px; }

/* ── App Header (alternate class names) ──────────────────────────────────── */
.app-header__brand { display: flex; align-items: center; gap: 12px; flex: 1; }
.app-header__logo  {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
}
.app-header__title { font-size: 1rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.app-header__sub   { font-size: 0.63rem; font-weight: 600; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: 0.06em; }
