@import './variables.css';

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-primary);
  color: var(--neutral-800);
  line-height: 1.6;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  color: var(--neutral-900);
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ── Custom scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--neutral-400); border-radius: var(--radius-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--neutral-700); }

/* ── Skip link ───────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 9999;
  padding: 0.75rem 1.5rem;
  background: var(--neutral-900);
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
}
.skip-link:focus {
  top: 0;
}

/* ── Global focus ring ───────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--neutral-900);
  outline-offset: 2px;
}

/* ── Brand color text ────────────────────────────────────────────── */
.gradient-text {
  color: var(--primary-500);
}

/* ── Card ────────────────────────────────────────────────────────── */
.glass-panel,
.cute-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

/* ── Container ───────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  min-height: 44px;
  min-width: 44px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: 1.5px solid transparent;
  font-family: var(--font-primary);
  touch-action: manipulation;
  user-select: none;
  transition:
    background var(--duration-fast),
    box-shadow var(--duration-fast) var(--ease-out),
    transform var(--duration-fast),
    color var(--duration-fast),
    border-color var(--duration-fast);
}

.btn-primary {
  background: var(--primary-500);
  color: white;
  border-color: var(--primary-500);
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  background: var(--primary-700);
  border-color: var(--primary-700);
  box-shadow: var(--shadow-pop);
}

.btn-primary:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-sm);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-body);
}

.btn-outline:hover {
  background: var(--bg-subtle);
  border-color: var(--neutral-400);
  color: var(--text-strong);
}

.btn-outline:active {
  transform: scale(0.97);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Badges ──────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-tier-1 {
  background: var(--primary-500);
  color: white;
}

.badge-tier-2 {
  background: var(--mint-500);
  color: #0a3d27;
}

.badge-tier-3,
.badge-tier-\? {
  background: rgba(160, 124, 255, 0.18);
  color: var(--accent-600);
}

/* ── Scroll reveal ───────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Section eyebrow ─────────────────────────────────────────────── */
/* Pink pill chip — used above section titles to call out what's coming.
   Replaces the older gray-uppercase stamp look. */
.section-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--primary-700);
  background: rgba(245, 88, 142, 0.12);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
  text-transform: lowercase;
}

/* ── Shared minimal footer ───────────────────────────────────────── */
.footer-minimal {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  margin-top: 4rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--neutral-600);
  line-height: 1.7;
}
.footer-minimal a { color: var(--primary-500); padding: 0.5rem 0.75rem; display: inline-flex; align-items: center; min-height: 44px; }
.footer-minimal a:hover { color: var(--primary-700); }

/* ── Tip-the-dev pill — donation link with the rest of the GenZ voice
   tucked inline into the footer row. Pink wash + pill border so it
   reads as a button without screaming for attention. */
.tip-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.85rem !important;
  min-height: 32px !important;
  background: rgba(245, 88, 142, 0.1);
  color: var(--primary-700) !important;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.78rem;
  text-decoration: none;
  transition: background var(--duration-fast), transform var(--duration-fast), color var(--duration-fast);
  white-space: nowrap;
}
.tip-pill:hover {
  background: rgba(245, 88, 142, 0.2);
  color: var(--primary-700) !important;
  transform: translateY(-1px);
}
.tip-pill:focus-visible {
  outline: none;
  box-shadow: var(--shadow-glow);
}

/* ── Navbar base (shared across all pages) ───────────────────────── */
.navbar {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary-500);
}

/* ── Hamburger / mobile nav drawer ──────────────────────────────── */
.nav-hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0.35rem;
  color: var(--text-body);
  transition: background var(--duration-fast), color var(--duration-fast);
}
.nav-hamburger:hover { background: var(--bg-subtle); color: var(--text-strong); }
.nav-hamburger:focus-visible { outline: 2px solid var(--primary-500); outline-offset: 2px; }

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 11, 0.55);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out);
}
.nav-overlay.open { opacity: 1; pointer-events: auto; }

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 90vw);
  height: 100dvh;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  transform: translateX(100%);
  transition: transform var(--duration-base) var(--ease-out);
  overflow-y: auto;
}
.nav-drawer.open { transform: translateX(0); }

.nav-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.nav-drawer-close {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--duration-fast), color var(--duration-fast);
}
.nav-drawer-close:hover { background: var(--bg-subtle); color: var(--text-strong); }
.nav-drawer-close:focus-visible { outline: 2px solid var(--primary-500); outline-offset: 2px; }

.nav-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 2rem;
}
.nav-drawer-links a {
  padding: 0.875rem 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--neutral-700);
  border-bottom: 1px solid var(--neutral-200);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color var(--duration-fast), padding-left var(--duration-fast);
}
.nav-drawer-links a:last-child { border-bottom: none; }
.nav-drawer-links a:hover { color: var(--primary-500); padding-left: 0.5rem; }

.nav-drawer-cta { width: 100%; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast), background var(--duration-fast);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav-links a:hover { color: var(--text-strong); background: var(--bg-subtle); }
.nav-links a.active,
.nav-links a[aria-current="page"] { color: var(--primary-600); background: rgba(245,88,142,0.08); }

/* Header donate pill — sits between .nav-links and .user-menu so it's
   always reachable, regardless of auth state. Visually distinct from
   the main nav links so it reads as an action, not navigation. */
.nav-donate {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0 0.5rem 0 0.25rem;
  padding: 0.45rem 0.95rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-700);
  background: rgba(245, 88, 142, 0.1);
  border-radius: var(--radius-pill);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--duration-fast), color var(--duration-fast), transform var(--duration-fast);
  min-height: 36px;
}
.nav-donate:hover {
  background: rgba(245, 88, 142, 0.2);
  color: var(--primary-700);
  transform: translateY(-1px);
}
.nav-donate[aria-current="page"] {
  background: var(--primary-500);
  color: #ffffff;
}
.nav-donate:focus-visible {
  outline: none;
  box-shadow: var(--shadow-glow);
}
@media (max-width: 768px) {
  /* Drawer covers nav on mobile; hide the inline donate pill there to
     avoid crowding the header next to the hamburger. */
  .nav-donate { display: none; }
}

@media (max-width: 768px) {
  .nav-hamburger { display: flex; align-items: center; justify-content: center; }
  .nav-links { display: none; }
  .navbar > .btn { display: none; }
  .navbar { gap: 1rem; }
  .user-menu__email,
  .user-menu__signout { display: none; }
}

/* ── Staleness banner ────────────────────────────────────────────── */
.stale-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  background: rgba(255, 170, 122, 0.08);
  border: 1px solid var(--warning);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: #a0511a;
}
.stale-banner a { color: #a0511a; text-decoration: underline; font-weight: 700; }
.stale-banner-dismiss {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: #a0511a;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}

/* ── Severity badges ─────────────────────────────────────────────── */
.severity-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.severity-low    { background: rgba(90, 216, 163, 0.12); color: #1a6647; border: 1px solid var(--mint-500); }
.severity-medium { background: rgba(255, 170, 122, 0.12); color: #9a5416; border: 1px solid var(--peach-500); }
.severity-high   { background: rgba(245, 88, 142, 0.10); color: var(--primary-700); border: 1px solid var(--primary-400); }

/* ── Utility ─────────────────────────────────────────────────────── */
.hidden      { display: none !important; }
.text-center { text-align: center; }

@media (max-width: 480px) {
  .container { padding-left: 1rem; padding-right: 1rem; }
}

/* ── Hide decorative blobs (not brutalist) ───────────────────────── */
.bg-blob { display: none; }

/* ── Reduce motion ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ── User menu ─────────────────────────────────────────────────────── */
.user-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.user-menu__chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  padding: 0.25rem 0.75rem 0.25rem 0.25rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  background: var(--bg-card);
}

.user-menu__avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  object-fit: cover;
  display: block;
}

.user-menu__email {
  font-family: var(--font-primary);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-body);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu__signout {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
}

.user-menu__signin {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-family: var(--font-primary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.3rem 0.75rem;
  min-height: 44px;
  letter-spacing: 0.01em;
  transition: border-color var(--duration-fast), color var(--duration-fast), background var(--duration-fast);
}

.btn-ghost:hover {
  border-color: var(--error);
  color: var(--error);
  background: rgba(220,38,38,0.04);
}

/* ── Drive backup toggle (results page) ──────────────────────────────────── */
.drive-backup {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.drive-backup__row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.drive-backup__label {
  font-family: var(--font-primary);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-body);
}
.drive-backup__hint {
  font-family: var(--font-primary);
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}
.drive-backup__hint a {
  color: var(--primary-600);
}
.drive-toggle {
  flex-shrink: 0;
  margin-left: auto;
  width: 40px;
  height: 20px;
  background: var(--neutral-300);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  position: relative;
  padding: 0;
  transition: background 0.1s, border-color 0.1s;
}
.drive-toggle::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  border: 1px solid var(--border);
  top: 2px;
  left: 2px;
  transition: left 0.1s;
}
.drive-toggle[aria-checked="true"] {
  background: var(--primary-500);
  border-color: var(--primary-500);
}
.drive-toggle[aria-checked="true"]::after {
  left: calc(100% - 16px);
  border-color: transparent;
}
.drive-toggle[disabled],
.drive-toggle.uploading {
  opacity: 0.5;
  cursor: not-allowed;
}
.drive-backup__bar {
  height: 4px;
  background: var(--bg-subtle);
  border-radius: var(--radius-pill);
  margin-top: 0.5rem;
}
.drive-backup__fill {
  height: 100%;
  background: var(--primary-500);
  border-radius: var(--radius-pill);
  width: 0%;
  transition: width 0.25s;
}

/* ── Auto Drive backup status pill (P2) ──────────────────────────────────── */
.drive-backup__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(245, 88, 142, 0.08);
  color: var(--primary-700);
  font-size: 0.875rem;
  flex-shrink: 0;
}
.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--primary-600);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.link-btn--muted { color: var(--neutral-500); font-weight: 400; }
.link-btn:hover { color: var(--primary-700); }

/* ── Connections section (dashboard) ─────────────────────────────────────── */
.conn-list {
  display: grid;
  gap: 1rem;
}
.conn-card {
  padding: 1.25rem;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, rgba(0,0,0,0.06));
  border-radius: var(--radius-lg, 24px);
  box-shadow: var(--shadow-md);
}
.conn-card--coming-soon { opacity: 0.6; }
.conn-card__head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.conn-card__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.03);
  border-radius: 12px;
}
.conn-card__title { flex: 1; }
.conn-card__title h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--neutral-900);
}
.conn-card__title p {
  margin: 0;
  font-size: 0.825rem;
  color: var(--neutral-600);
  line-height: 1.5;
}
.conn-coming-soon {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: rgba(0,0,0,0.05);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--neutral-600);
  text-transform: uppercase;
  vertical-align: middle;
}
.conn-card__status {
  flex-shrink: 0;
  align-self: center;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.conn-card__status--on {
  background: rgba(90, 216, 163, 0.15);
  color: #2a8a64;
}
.conn-card__status--off {
  background: rgba(0,0,0,0.05);
  color: var(--neutral-600);
}
.conn-card__actions {
  margin-top: 1rem;
}
.conn-help {
  margin: 0 0 0.875rem;
  font-size: 0.78rem;
  color: var(--neutral-600);
}
.conn-help code {
  background: rgba(0,0,0,0.05);
  padding: 0.05rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
}
.conn-actions-row {
  display: flex;
  gap: 0.875rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ── Daily progress photo card (home page) ───────────────────────────────── */
.progress-card {
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  margin-top: 1.25rem;
}
.progress-card--anonymous {
  opacity: 0.55;
  background: var(--bg-subtle);
  box-shadow: none;
}
.progress-card__row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}
.progress-card__icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}
.progress-card__thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.progress-card__label {
  font-family: var(--font-primary);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-body);
  letter-spacing: 0.02em;
}
.progress-card__sub {
  font-family: var(--font-primary);
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}
.progress-card__streak {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.4rem;
}
.progress-card__dot {
  width: 8px;
  height: 8px;
  background: var(--primary-500);
  border-radius: 50%;
  flex-shrink: 0;
}
.progress-card__dot--empty {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}
.progress-card__bar {
  height: 4px;
  background: var(--bg-subtle);
  border-radius: var(--radius-pill);
  margin-top: 0.5rem;
}
.progress-card__fill {
  height: 100%;
  background: var(--primary-500);
  border-radius: var(--radius-pill);
  width: 0%;
  transition: width 0.25s;
}

/* ── Spot findings — per close-up AI observations ─────────────────────
   Shared between analyze.html (post-scan results) and recommendations.html
   (persistent report). Lives in base.css so both get the styles without
   loading each other's CSS file. */
.spotfindings-section {
  margin: 2rem 0;
  padding: 1.75rem 1.5rem;
  background: linear-gradient(180deg, rgba(160, 124, 255, 0.06) 0%, var(--bg-card) 60%);
  border: 1px solid rgba(160, 124, 255, 0.2);
  border-radius: var(--radius-lg);
}

.sf-header { margin-bottom: 1.25rem; text-align: left; }
.sf-title {
  margin: 0.4rem 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.01em;
}
.sf-sub {
  margin: 0;
  color: var(--neutral-600);
  font-size: 0.9rem;
}

.sf-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.sf-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.sf-card--derm {
  border-color: var(--peach-300);
  background: linear-gradient(180deg, rgba(255, 179, 128, 0.06) 0%, var(--bg-card) 60%);
}

.sf-thumb {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
  background: var(--neutral-100);
}
.sf-thumb--placeholder {
  background: repeating-linear-gradient(45deg, var(--neutral-100) 0 6px, var(--neutral-200) 6px 12px);
}

.sf-body { min-width: 0; }

.sf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.sf-concern {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  background: rgba(160, 124, 255, 0.12);
  color: var(--accent-700);
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sf-sev {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 100px;
  max-width: 200px;
}
.sf-sev-bar {
  flex: 1;
  height: 6px;
  background: var(--neutral-100);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.sf-sev-fill {
  height: 100%;
  background: var(--accent-500);
  border-radius: var(--radius-pill);
  transition: width var(--duration-base);
}
.sf-sev-num {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--neutral-600);
  white-space: nowrap;
}

.sf-note {
  margin: 0.5rem 0 0.4rem;
  font-size: 0.85rem;
  color: var(--neutral-700);
  font-style: italic;
}
.sf-note--empty { color: var(--neutral-400); }

.sf-obs {
  margin: 0.4rem 0 0;
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.55;
}

.sf-derm-callout {
  margin: 0.85rem 0 0;
  padding: 0.85rem 1rem;
  background: rgba(255, 179, 128, 0.18);
  border: 1px solid var(--peach-500);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--neutral-800);
}
.sf-derm-callout strong { display: inline-block; margin-bottom: 0.25rem; color: var(--neutral-900); }

@media (max-width: 600px) {
  .sf-card { grid-template-columns: 1fr; }
  .sf-thumb { width: 100%; height: 180px; }
  .sf-head { gap: 0.5rem; }
}
