/* ============================================================
   styles.css — Digistone Design System
   Palette: Dark Teal #001e24 | Seafoam #b3ceca | Teal CTA #005660
   Fonts:  Roboto Mono (headings) | Inter (body)
   ============================================================ */

/* ─── Design Tokens ──────────────────────────────────────── */
:root {
  --navy:          #001e24;
  --navy-mid:      #003040;
  --navy-light:    #004455;
  --navy-card:     rgba(0, 42, 60, 0.85);
  --gold:          #b3ceca;
  --gold-light:    #cde0de;
  --gold-dim:      rgba(179, 206, 202, 0.18);
  --gold-border:   rgba(179, 206, 202, 0.28);
  --warm-white:    #f0f8f8;
  --warm-off:      #d8eded;
  --warm-muted:    #8ecbd4;
  --text-primary:  #f0f8f8;
  --text-secondary:#a8d0d4;
  --text-muted:    #6b9ea8;
  --success:       #4caf7d;
  --success-bg:    rgba(76, 175, 125, 0.12);
  --error:         #e57373;
  --error-bg:      rgba(229, 115, 115, 0.12);
  --border:        rgba(179, 206, 202, 0.28);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --shadow-sm:     0 2px 12px rgba(0,0,0,0.25);
  --shadow-md:     0 4px 24px rgba(0,0,0,0.35);
  --shadow-lg:     0 8px 48px rgba(0,0,0,0.45);
  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     20px;
  --radius-xl:     32px;
  --transition:    0.3s ease;
  --font-serif:    'Roboto Mono', 'Courier New', monospace;
  --font-sans:     'Inter', system-ui, -apple-system, sans-serif;
}

/* ─── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--navy);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

#app { min-height: 100vh; }
#view-container { opacity: 1; transition: opacity 0.35s ease; }
#view-container.fading { opacity: 0; }

/* ─── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 400; line-height: 1.25; }
h1 { font-size: clamp(28px, 5vw, 48px); }
h2 { font-size: clamp(22px, 3.5vw, 36px); }
h3 { font-size: clamp(18px, 2.5vw, 26px); }
h4 { font-size: 18px; }
p  { line-height: 1.75; }

a { color: var(--gold); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.8; }

.text-gold    { color: var(--gold); }
.text-muted   { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-center  { text-align: center; }
.text-serif   { font-family: var(--font-serif); }

.italic { font-style: italic; }
.small  { font-size: 13px; }

/* ─── Layout ─────────────────────────────────────────────── */
.container     { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-sm  { max-width: 720px;  margin: 0 auto; padding: 0 24px; }
.container-xs  { max-width: 520px;  margin: 0 auto; padding: 0 24px; }

.page          { min-height: 100vh; padding: 40px 0 80px; }
.page-inner    { max-width: 760px; margin: 0 auto; padding: 0 24px; }

.flex          { display: flex; }
.flex-center   { display: flex; align-items: center; justify-content: center; }
.flex-between  { display: flex; align-items: center; justify-content: space-between; }
.flex-col      { display: flex; flex-direction: column; }
.gap-8         { gap: 8px; }
.gap-12        { gap: 12px; }
.gap-16        { gap: 16px; }
.gap-24        { gap: 24px; }
.gap-32        { gap: 32px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ─── Family Portal Header ───────────────────────────────── */
.ds-steps-row {
  display: flex;
  align-items: flex-start;
  position: relative;
  margin-bottom: 0;
}
.ds-steps-row-center {
  flex: 1;
}
.ds-back-to-memorials {
  position: absolute;
  left: -180px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.82rem;
  color: #b3ceca;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.ds-back-to-memorials:hover { opacity: 0.7; text-decoration: underline; }
@media (max-width: 900px) {
  .ds-back-to-memorials {
    position: static;
    transform: none;
    display: block;
    margin-bottom: 16px;
  }
  .ds-steps-row { flex-direction: column; }
}

.ds-portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid rgba(179,206,202,0.15);
  background: var(--navy, #001e24);
  position: sticky;
  top: 0;
  z-index: 100;
}
.ds-portal-logo {
  font-family: 'Roboto Mono', monospace;
  font-size: 14px;
  color: #b3ceca;
  letter-spacing: 0.12em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.9;
}
.ds-portal-logo:hover { opacity: 1; }
.ds-portal-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.ds-portal-nav-back {
  font-size: 0.82rem;
  font-weight: 600;
  color: #b3ceca;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.15s;
}
.ds-portal-nav-back:hover { color: #f0f8f8; }
.ds-portal-nav-link {
  font-size: 0.82rem;
  color: rgba(179,206,202,0.55);
  text-decoration: none;
  transition: color 0.15s;
}
.ds-portal-nav-link:hover { color: #b3ceca; }

@media (max-width: 600px) {
  .ds-portal-nav-link { display: none; }
  .ds-portal-nav { gap: 16px; }
}

/* ─── Header / Nav ───────────────────────────────────────── */
.site-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  z-index: 10;
}

.logo {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--gold);
  letter-spacing: 1.5px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo span.logo-mark { font-size: 18px; }

.nav-link {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--text-primary); background: var(--border-subtle); opacity: 1; }

/* ─── Cards ─────────────────────────────────────────────── */
.card {
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.card:hover { border-color: var(--gold); box-shadow: var(--shadow-md); }
.card-sm    { padding: 18px; }
.card-lg    { padding: 40px; }

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.3px;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: #005660;
  color: #ffffff;
  box-shadow: 0 2px 16px rgba(0,86,96,0.35);
}
.btn-primary:hover:not(:disabled) {
  background: #006c78;
  box-shadow: 0 4px 24px rgba(0,86,96,0.5);
  transform: translateY(-1px);
  color: #ffffff;
  opacity: 1;
}

.btn-secondary {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold-border);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--gold-dim);
  border-color: var(--gold);
  opacity: 1;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}
.btn-ghost:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--border-subtle);
  opacity: 1;
}

.btn-danger {
  background: transparent;
  color: var(--error);
  border: 1px solid rgba(229,115,115,0.3);
}
.btn-danger:hover:not(:disabled) {
  background: var(--error-bg);
  opacity: 1;
}

.btn-lg { padding: 16px 36px; font-size: 16px; border-radius: var(--radius-md); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-full { width: 100%; }
.btn-icon { padding: 10px; border-radius: 50%; }

/* ─── Forms ──────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-row    { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.label-required::after { content: ' *'; color: var(--gold); }

input, textarea, select {
  background: rgba(255,255,255,0.05);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 12px 16px;
  transition: border-color var(--transition), background var(--transition);
  width: 100%;
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--gold);
  background: rgba(179,206,202,0.06);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
select option { background: var(--navy-mid); color: var(--text-primary); }
textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

.field-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.field-error { font-size: 12px; color: var(--error); margin-top: 4px; }

/* Inline editable text */
.editable {
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  margin: -4px -8px;
  cursor: text;
  transition: border-color var(--transition), background var(--transition);
}
.editable:hover { border-color: var(--border-subtle); background: rgba(255,255,255,0.03); }
.editable:focus { border-color: var(--gold); background: rgba(179,206,202,0.06); outline: none; }

/* ─── Progress Steps ──────────────────────────────────────── */
.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 28px 24px 20px;
  position: relative;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.step-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  color: var(--text-muted);
  transition: all var(--transition);
  position: relative;
  flex-shrink: 0;
  line-height: 1;
}
.step-dot.active  { border-color: var(--gold); background: var(--gold); color: var(--navy); }
.step-dot.done    { border-color: var(--gold); background: transparent; color: var(--gold); }
.step-dot.done::after { content: '✓'; font-size: 13px; }
.step-dot.done .step-num { display: none; }

/* Clickable steps */
a.step-dot.clickable {
  text-decoration: none;
  cursor: pointer;
}
a.step-dot.clickable:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: scale(1.12);
}
a.step-label.clickable {
  text-decoration: none;
  cursor: pointer;
}
a.step-label.clickable:hover {
  color: var(--gold);
}

.step-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  text-align: center;
}
.step-item.active .step-label  { color: var(--gold); }
.step-item.done .step-label    { color: var(--text-secondary); }

.step-connector {
  flex: 1;
  height: 1.5px;
  background: var(--border-subtle);
  min-width: 32px;
  max-width: 80px;
  margin: 0 -1px;
  margin-bottom: 24px; /* Align with dot center */
  transition: background var(--transition);
}
.step-connector.done { background: var(--gold); }

@media (max-width: 600px) {
  .step-label { display: none; }
  .step-connector { min-width: 20px; }
}

/* ─── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.badge-high     { background: var(--success-bg); color: var(--success);  border: 1px solid rgba(76,175,125,0.3); }
.badge-possible { background: var(--gold-dim);   color: var(--gold);     border: 1px solid var(--gold-border); }
.badge-none     { background: rgba(255,255,255,0.06); color: var(--text-muted); border: 1px solid var(--border-subtle); }

.status-badge { border-radius: 100px; font-size: 11px; font-weight: 600; padding: 3px 10px; letter-spacing: 0.5px; text-transform: uppercase; }
.status-draft     { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.status-pending   { background: rgba(179,206,202,0.12); color: var(--gold); }
.status-invited   { background: rgba(76,175,125,0.12);  color: var(--success); }
.status-published { background: rgba(76,175,125,0.2);   color: var(--success); border: 1px solid rgba(76,175,125,0.35); }

/* ─── Photo Grid ─────────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.photo-grid-sm { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.photo-grid-lg { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }

.photo-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  background: rgba(255,255,255,0.05);
}
.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-card:hover       { border-color: var(--gold-border); transform: scale(1.02); }
.photo-card.selected    { border-color: var(--gold); }
.photo-card.selected::after {
  content: '✓';
  position: absolute;
  top: 8px; right: 8px;
  width: 22px; height: 22px;
  background: var(--gold);
  color: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
}
.photo-card .era-tag {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  padding: 20px 8px 8px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.photo-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-card .video-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.8);
  font-size: 28px;
  pointer-events: none;
}

/* ─── Upload Area ────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  max-width: 100%;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--gold);
  background: var(--gold-dim);
}
.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.upload-icon { font-size: 32px; margin-bottom: 8px; opacity: 0.6; }
.upload-zone h4 { font-family: var(--font-serif); margin-bottom: 6px; }
.upload-zone p  { font-size: 14px; color: var(--text-muted); }
@media (max-width: 580px) {
  .upload-zone { padding: 20px 16px; }
  .upload-icon { font-size: 24px; margin-bottom: 6px; }
}

/* Social import buttons */
.social-sources {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.source-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-subtle);
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.source-btn:hover { border-color: var(--gold-border); background: var(--gold-dim); }
.source-btn .source-icon { font-size: 18px; }

/* ─── Dashboard Case List ────────────────────────────────── */
.case-list { display: flex; flex-direction: column; gap: 12px; }
.case-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: var(--navy-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
}
.case-row:hover { border-color: var(--gold-border); background: rgba(255,255,255,0.04); }
.case-name { font-family: var(--font-serif); font-size: 18px; margin-bottom: 4px; }
.case-meta { font-size: 13px; color: var(--text-muted); }

/* Stat cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.stat-card {
  background: var(--navy-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
}
.stat-number { font-family: var(--font-serif); font-size: 36px; color: var(--gold); margin-bottom: 4px; }
.stat-label  { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ─── Story / Memorial Content ───────────────────────────── */
.story-section { margin-bottom: 48px; }
.story-section h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--gold);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gold-dim);
}
.story-body { font-size: 16px; line-height: 1.9; color: var(--text-secondary); white-space: pre-wrap; }
.story-body p { margin-bottom: 16px; }

.about-text { font-family: var(--font-serif); font-size: 18px; font-style: italic; line-height: 1.8; color: var(--warm-off); }

/* Editable story section */
.story-editable {
  font-size: 16px;
  line-height: 1.9;
  min-height: 200px;
  resize: vertical;
  color: var(--text-secondary);
}

/* ─── Memorial Hero ──────────────────────────────────────── */
.memorial-hero {
  text-align: center;
  padding: 80px 24px 60px;
  background: linear-gradient(180deg, rgba(0,30,36,0) 0%, rgba(0,30,36,0.6) 100%);
  position: relative;
}
.memorial-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(179,206,202,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.memorial-name {
  font-family: var(--font-serif);
  font-size: clamp(36px, 7vw, 72px);
  font-weight: 400;
  color: var(--warm-white);
  margin-bottom: 16px;
}
.memorial-dates { font-size: 20px; color: var(--text-secondary); letter-spacing: 2px; margin-bottom: 8px; }
.memorial-location { font-size: 15px; color: var(--text-muted); }
.memorial-divider { width: 60px; height: 1.5px; background: var(--gold); margin: 32px auto; opacity: 0.6; }

/* ─── Photo Gallery (Memorial View) ──────────────────────── */
.gallery-grid {
  columns: 3;
  column-gap: 12px;
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}
.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.03); }

/* ── Instagram-style 1:1 Gallery (Memorial page) ──────── */
.ds-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.ds-gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
  border-radius: 2px;
}
.ds-gallery-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.ds-gallery-item:hover .ds-gallery-media { transform: scale(1.04); }
.ds-gallery-play-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  pointer-events: none;
}
.ds-gallery-broken {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  opacity: 0.3;
}
@media (max-width: 480px) {
  .ds-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
.gallery-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  padding: 20px 12px 10px;
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.gallery-item:hover .gallery-caption { transform: translateY(0); }
@media (max-width: 768px) { .gallery-grid { columns: 2; } }
@media (max-width: 480px) { .gallery-grid { columns: 1; } }

/* ─── Voice Recordings ───────────────────────────────────── */
.ds-voice-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
}
.ds-voice-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(94,202,212,0.06);
  border: 1px solid rgba(94,202,212,0.12);
  border-radius: 12px;
}
.ds-voice-icon { font-size: 28px; flex-shrink: 0; }
.ds-voice-info { flex: 1; min-width: 0; }
.ds-voice-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.ds-voice-card audio {
  width: 100%;
  height: 36px;
  border-radius: 8px;
}

/* ─── Video Embeds ───────────────────────────────────────── */
.ds-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
@media (max-width: 480px) { .ds-video-grid { grid-template-columns: 1fr; } }
.ds-video-card {
  border-radius: 12px;
  overflow: hidden;
  background: rgba(26,39,68,0.5);
  border: 1px solid rgba(94,202,212,0.1);
}
.ds-video-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
}
.ds-video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}
.ds-video-title {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-secondary);
}
.ds-video-link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-decoration: none;
  color: var(--text-secondary);
  transition: color .2s;
}
.ds-video-link-card:hover { color: var(--gold); }
.ds-video-link-card p {
  margin-top: 12px;
  font-size: 13px;
  word-break: break-all;
}

/* ─── Comment Cards ──────────────────────────────────────── */
.comment-card {
  background: rgba(179,206,202,0.06);
  border: 1px solid rgba(179,206,202,0.1);
  border-radius: 12px;
  padding: 16px 20px;
}
.comment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.comment-author { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.comment-time { font-size: 11px; color: var(--text-muted); }
.comment-text { font-size: 15px; line-height: 1.7; color: var(--text-secondary); }

/* ─── QR Code Section ────────────────────────────────────── */
.qr-wrap {
  text-align: center;
  padding: 32px;
  background: var(--warm-white);
  border-radius: var(--radius-lg);
  display: inline-block;
}
.qr-wrap img { width: 220px; height: 220px; display: block; }

/* ─── Contributions ──────────────────────────────────────── */
.contribution-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 16px;
}
.contribution-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.contributor-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 1.5px solid var(--gold-border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--gold);
  flex-shrink: 0;
}
.contribution-text { font-size: 15px; line-height: 1.7; color: var(--text-secondary); }

/* ─── Toast Notifications ────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  max-width: 360px;
  box-shadow: var(--shadow-md);
  pointer-events: auto;
  animation: slideInToast 0.3s ease forwards;
  border-left: 3px solid transparent;
}
.toast-success { background: #1a2d24; color: var(--success); border-left-color: var(--success); }
.toast-error   { background: #2d1a1a; color: var(--error);   border-left-color: var(--error);   }
.toast-info    { background: var(--navy-mid); color: var(--gold); border-left-color: var(--gold); }
@keyframes slideInToast {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ─── Loading Overlay ────────────────────────────────────── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 20, 28, 0.92);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.loading-inner { text-align: center; }
.loading-spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 20px;
}
.loading-message {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--text-secondary);
  font-style: italic;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Animated progress bar for AI / upload loading ──────── */
.ds-progress-bar-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}
.ds-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--teal, #5ecad4));
  border-radius: 4px;
  animation: ds-progress-sweep 18s ease-out forwards;
}
@keyframes ds-progress-sweep {
  0%   { width: 0%; }
  15%  { width: 25%; }
  40%  { width: 50%; }
  70%  { width: 75%; }
  100% { width: 92%; }
}
.ds-progress-ring {
  position: relative;
  width: 48px;
  height: 48px;
}

/* ─── Story Editor ───────────────────────────────────────── */
.ds-story-editor {
  min-height: 260px;
  line-height: 1.9;
  font-size: 16px;
  white-space: pre-wrap;
  outline: none;
  border: 1.5px solid rgba(179,206,202,0.15);
  border-radius: var(--radius-md, 10px);
  padding: 16px;
  color: var(--text-primary);
  background: rgba(179,206,202,0.04);
  transition: border-color 0.2s, background 0.2s;
  cursor: default;
  user-select: text;
}
/* Active / editing state */
.ds-story-editor-active {
  border-color: #b3ceca;
  background: rgba(179,206,202,0.08);
  cursor: text;
  caret-color: #b3ceca;
}
.ds-story-editor-active:focus {
  border-color: #b3ceca;
}
.ds-story-editor[data-placeholder="true"]:empty::before {
  content: 'Write the life story here, or answer the questions below and let AI create one…';
  color: var(--text-muted, rgba(179,206,202,0.4));
  font-style: italic;
  pointer-events: none;
}

/* Edit Story button */
.ds-story-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(179,206,202,0.12);
  color: #b3ceca;
  border: 1.5px solid rgba(179,206,202,0.35);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ds-story-edit-btn:hover {
  background: rgba(179,206,202,0.22);
  border-color: #b3ceca;
  color: #f0f8f8;
}
/* Done editing state */
.ds-story-edit-btn-active {
  background: rgba(42,122,91,0.15);
  color: #6ecba6;
  border-color: rgba(110,203,166,0.45);
}
.ds-story-edit-btn-active:hover {
  background: rgba(42,122,91,0.28);
  color: #a8e6cb;
}

/* Hint text below editor */
.ds-story-hint {
  margin-top: 10px;
  font-size: 0.78rem;
  color: rgba(179,206,202,0.5);
  line-height: 1.5;
}
.ds-story-hint strong { color: rgba(179,206,202,0.75); }

/* ─── Modal ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.25s ease;
}
.modal {
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 540px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.25s ease;
}
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ─── Section Divider ────────────────────────────────────── */
.section-divider { border: none; border-top: 1px solid var(--border-subtle); margin: 40px 0; }
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ─── Inline Alert ───────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-info    { background: rgba(179,206,202,0.1);  border: 1px solid var(--gold-border);      color: var(--gold-light); }
.alert-success { background: var(--success-bg);       border: 1px solid rgba(76,175,125,0.3);    color: var(--success); }
.alert-error   { background: var(--error-bg);         border: 1px solid rgba(229,115,115,0.3);   color: var(--error); }

/* ─── Empty State ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.empty-icon   { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-family: var(--font-serif); margin-bottom: 8px; color: var(--text-secondary); }
.empty-state p  { font-size: 14px; max-width: 320px; margin: 0 auto; }

/* ─── Contributor Invite List ────────────────────────────── */
.contributor-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.contributor-row .remove-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  transition: color var(--transition);
}
.contributor-row .remove-btn:hover { color: var(--error); }

/* ─── Publish Success Screen ─────────────────────────────── */
.publish-success {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 60px 24px;
}
.publish-success .success-icon {
  font-size: 56px;
  margin-bottom: 24px;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.08); opacity: 0.85; }
}

/* ─── URL Display ────────────────────────────────────────── */
.url-display {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: var(--gold);
  word-break: break-all;
}
.url-display .copy-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  transition: color var(--transition);
}
.url-display .copy-btn:hover { color: var(--gold); }

/* ─── Responsive Adjustments ─────────────────────────────── */
@media (max-width: 768px) {
  .card, .card-lg { padding: 20px; }
  .page { padding: 24px 0 60px; }
  .modal { padding: 28px 20px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .social-sources { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
}

@media (max-width: 480px) {
  .social-sources { grid-template-columns: 1fr 1fr; }
  .case-row { grid-template-columns: 1fr; gap: 12px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(179,206,202,0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(179,206,202,0.45); }

/* ─── Selection Color ────────────────────────────────────── */
::selection { background: rgba(179,206,202,0.25); color: var(--warm-white); }

/* ─── Dashboard v2 — Rich Analytics Layout ──────────────── */

.dash-header {
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0,30,36,0.97);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.dash-nav {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.dash-nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  border: none;
  background: none;
  font-family: var(--font-sans);
}
.dash-nav-link:hover  { color: var(--text-primary); background: var(--border-subtle); opacity: 1; }
.dash-nav-link.active { color: var(--gold); background: var(--gold-dim); opacity: 1; }

.dash-search-wrap { position: relative; }
.dash-search {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  padding: 8px 16px 8px 36px;
  font-size: 13px;
  color: var(--text-primary);
  width: 200px;
  outline: none;
  transition: all var(--transition);
  font-family: var(--font-sans);
}
.dash-search:focus          { border-color: var(--gold-border); background: rgba(179,206,202,0.06); width: 240px; }
.dash-search::placeholder   { color: var(--text-muted); }
.dash-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
  line-height: 1;
}

.dash-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 1.5px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
}

/* Stat cards */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
.dash-stat {
  background: var(--navy-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: border-color var(--transition), transform var(--transition);
}
.dash-stat:hover   { border-color: var(--gold-border); transform: translateY(-2px); }
.dash-stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}
.dash-stat-num   { font-family: var(--font-serif); font-size: 34px; font-weight: 400; color: var(--text-primary); line-height: 1; margin-bottom: 6px; }
.dash-stat-lbl   { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.dash-stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
}
.trend-up  { background: rgba(76,175,125,0.15);  color: var(--success); }
.trend-neu { background: rgba(255,255,255,0.06); color: var(--text-muted); }

/* Chart containers */
.dash-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
.dash-chart-card {
  background: var(--navy-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px 24px 16px;
}
.dash-chart-title { font-size: 15px; font-weight: 500; color: var(--text-primary); margin-bottom: 2px; }
.dash-chart-sub   { font-size: 12px; color: var(--text-muted); margin-bottom: 20px; }
.dash-chart-wrap  { position: relative; height: 180px; }

/* Quick summary cards */
.dash-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.dash-sum-card {
  background: var(--navy-card);
  border: 1px solid var(--border-subtle);
  border-left-width: 4px;
  border-radius: var(--radius-md);
  padding: 20px 20px 16px;
}
.dash-sum-num { font-family: var(--font-serif); font-size: 28px; font-weight: 400; line-height: 1; margin-bottom: 8px; }
.dash-sum-lbl { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; }

/* Cases data table */
.dash-table-card {
  background: var(--navy-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 48px;
}
.dash-table-hd {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}
.dash-table-hd-title { font-size: 16px; font-weight: 500; color: var(--text-primary); }
.dash-table {
  width: 100%;
  border-collapse: collapse;
}
.dash-table th {
  text-align: left;
  padding: 12px 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.02);
}
.dash-table td {
  padding: 14px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.dash-table tr:last-child td    { border-bottom: none; }
.dash-table tbody tr:hover td   { background: rgba(255,255,255,0.025); cursor: pointer; }

.case-avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 1.5px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 12px;
  color: var(--gold);
  flex-shrink: 0;
}

.type-badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.type-memorial  { background: rgba(79,126,255,0.15);  color: #7aa3ff; }
.type-tribute   { background: rgba(0,86,96,0.20);        color: #5ecad4; }
.type-biography { background: rgba(20,184,166,0.15);   color: #2dd4bf; }
.type-event     { background: rgba(167,139,250,0.15);  color: #c4b5fd; }

.tbl-action {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  transition: all var(--transition);
  font-family: var(--font-sans);
}
.tbl-action:hover { border-color: var(--gold-border); color: var(--gold); background: var(--gold-dim); }

/* Dashboard responsive */
@media (max-width: 1100px) {
  .dash-stats   { grid-template-columns: repeat(2, 1fr); }
  .dash-charts  { grid-template-columns: 1fr; }
  .dash-summary { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .dash-header       { padding: 14px 20px; }
  .dash-nav          { display: none; }
  .dash-search-wrap  { display: none; }
  .dash-stats        { grid-template-columns: repeat(2, 1fr); }
  .dash-summary      { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Page Type Selector ─────────────────────────────────── */
.page-type-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}

.page-type-card {
  background: var(--navy-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 12px 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  user-select: none;
}
.page-type-card:hover {
  border-color: var(--gold-border);
  background: var(--gold-dim);
  transform: translateY(-2px);
}
.page-type-card.selected {
  border-color: var(--gold);
  background: var(--gold-dim);
  box-shadow: 0 0 0 1px var(--gold);
}

.page-type-icon {
  font-size: 28px;
  margin-bottom: 10px;
  line-height: 1;
  display: block;
}

.page-type-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
  line-height: 1.3;
}
.page-type-card.selected .page-type-label {
  color: var(--text-primary);
}

@media (max-width: 640px) {
  .page-type-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 400px) {
  .page-type-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ================================================================
   PLATFORM ITERATION — NEW COMPONENT STYLES
   ================================================================ */

/* ─── DashHeader (Tab Nav) ───────────────────────────────────── */
.dash-header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
}
.dash-logo {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 1.5px;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-logo:hover { opacity: 0.85; }
.dash-tab-nav {
  display: flex;
  gap: 2px;
  flex: 1;
  justify-content: center;
}
.dash-tab {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.dash-tab:hover       { color: var(--text-primary); background: rgba(255,255,255,0.05); opacity: 1; }
.dash-tab.active      { color: var(--gold); background: var(--gold-dim); opacity: 1; }
.dash-header-actions  { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

@media (max-width: 900px) {
  .dash-tab-nav { gap: 0; }
  .dash-tab     { padding: 8px 10px; font-size: 12px; }
}
@media (max-width: 700px) {
  /* Tabs and new-btn hidden by the 768px mobile overhaul block;
     hamburger menu provides navigation instead */
}

/* ─── Tier Badge ─────────────────────────────────────────────── */
.tier-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border: 1px solid;
}

/* ─── Tier Gate Prompt ───────────────────────────────────────── */
.tier-gate {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: rgba(179,206,202,0.06);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 24px 0;
}
.tier-gate-icon { font-size: 28px; flex-shrink: 0; }
.tier-gate-body { flex: 1; }
.tier-gate-title { font-size: 15px; font-weight: 500; color: var(--text-primary); margin-bottom: 6px; }
.tier-gate-sub   { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }

/* ─── Privacy Badge ──────────────────────────────────────────── */
.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.privacy-public   { background: rgba(76,175,125,0.15);  color: var(--success); }
.privacy-password { background: rgba(179,206,202,0.12); color: var(--gold-light); }
.privacy-private  { background: rgba(229,115,115,0.15); color: var(--error); }

/* ─── Status Badge ───────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.status-draft     { background: rgba(255,255,255,0.08);  color: var(--text-muted); }
.status-pending   { background: rgba(255,193,7,0.15);    color: #fbbf24; }
.status-invited   { background: rgba(79,126,255,0.15);   color: #7aa3ff; }
.status-published { background: rgba(76,175,125,0.15);   color: var(--success); }

/* ─── Privacy Option Cards ───────────────────────────────────── */
.privacy-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.privacy-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--navy-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  user-select: none;
}
.privacy-option:hover   { border-color: var(--gold-border); background: rgba(179,206,202,0.04); }
.privacy-option.selected { border-color: var(--gold); background: var(--gold-dim); }
.privacy-option input[type="radio"] { display: none; }
.privacy-option-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 40px;
  text-align: center;
}
.privacy-option-body { flex: 1; }
.privacy-option-title { font-size: 15px; font-weight: 500; color: var(--text-primary); margin-bottom: 3px; }
.privacy-option-desc  { font-size: 13px; color: var(--text-muted); line-height: 1.4; }

/* ─── Toggle Switch ──────────────────────────────────────────── */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-label-group  { flex: 1; }
.toggle-label        { font-size: 14px; font-weight: 500; color: var(--text-primary); display: block; margin-bottom: 3px; cursor: pointer; }
.toggle-switch       { position: relative; flex-shrink: 0; }
.toggle-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track {
  display: block;
  width: 44px;
  height: 24px;
  background: rgba(255,255,255,0.12);
  border-radius: 100px;
  position: relative;
  cursor: pointer;
  transition: background var(--transition);
}
.toggle-switch input:checked + .toggle-track { background: var(--accent); }
.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.toggle-switch input:checked + .toggle-track .toggle-thumb { transform: translateX(20px); }

/* ─── Generic Dash Card ──────────────────────────────────────── */
.dash-card {
  background: var(--navy-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
}
.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
}
.dash-card-title { font-size: 15px; font-weight: 500; color: var(--text-primary); }

/* ─── Dash Section ───────────────────────────────────────────── */
.dash-section         { margin-bottom: 32px; }
.dash-section-header  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.dash-section-title   { font-size: 17px; font-weight: 500; color: var(--text-primary); }

/* ─── Data Table (generic) ───────────────────────────────────── */
.table-wrap  { overflow-x: auto; }
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}
.filter-select {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}
.filter-select:focus { border-color: var(--gold-border); }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th {
  text-align: left;
  padding: 12px 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.02);
  white-space: nowrap;
}
.data-table td {
  padding: 14px 20px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.data-table tr:last-child td   { border-bottom: none; }
.data-table tbody tr:hover td  { background: rgba(255,255,255,0.025); cursor: pointer; }
.table-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ─── Subtabs ────────────────────────────────────────────────── */
.subtab-row {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}
.subtab {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-sans);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--transition), border-color var(--transition);
}
.subtab:hover  { color: var(--text-primary); }
.subtab.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ─── Stat Cards (analytics) ─────────────────────────────────── */
.stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-cards-grid--sm {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.stat-card .stat-icon {
  font-size: 28px;
  margin-bottom: 12px;
  display: block;
  opacity: 0.85;
}
.stat-card .stat-body  { }
.stat-card .stat-value { font-family: var(--font-serif); font-size: 32px; color: var(--gold); line-height: 1; margin-bottom: 6px; }
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ─── Analytics Grid + Bar Charts ───────────────────────────── */
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 768px) { .analytics-grid { grid-template-columns: 1fr; } }

.chart-bar-wrap  { display: flex; flex-direction: column; gap: 10px; }
.chart-bar       { display: flex; align-items: center; gap: 12px; }
.chart-bar-label { font-size: 12px; color: var(--text-muted); width: 90px; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-bar-inner-wrap { flex: 1; background: rgba(255,255,255,0.06); border-radius: 100px; height: 8px; overflow: hidden; }
.chart-bar-inner { height: 100%; border-radius: 100px; background: linear-gradient(90deg, var(--accent), var(--gold)); transition: width 0.6s ease; }
.chart-bar-val   { font-size: 12px; color: var(--text-secondary); width: 36px; text-align: right; flex-shrink: 0; }

/* ─── Settings View ──────────────────────────────────────────── */
.settings-section {
  background: var(--navy-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  margin-bottom: 20px;
}
.settings-section h3 {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}
.settings-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ─── Customers View ─────────────────────────────────────────── */
.customers-view { padding: 24px 0; }

/* ─── Empty State Block (component version) ──────────────────── */
.empty-state-block {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}
.empty-state-icon  { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state-title { font-family: var(--font-serif); font-size: 20px; color: var(--text-secondary); margin-bottom: 10px; }
.empty-state-msg   { font-size: 14px; color: var(--text-muted); max-width: 320px; margin: 0 auto 24px; line-height: 1.6; }

/* ─── Content Review Queue ───────────────────────────────────── */
.queue-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.queue-item:last-child { border-bottom: none; }
.queue-item-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-subtle);
}
.queue-item-info  { flex: 1; min-width: 0; }
.queue-item-name  { font-size: 14px; font-weight: 500; color: var(--text-primary); margin-bottom: 4px; }
.queue-item-meta  { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.queue-item-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ─── Memorials Tab Grid ─────────────────────────────────────── */
.memorials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.memorial-card {
  background: var(--navy-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
  cursor: pointer;
}
.memorial-card:hover { border-color: var(--gold-border); transform: translateY(-2px); }
.memorial-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(0,86,96,0.4), rgba(0,30,36,0.8));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 32px;
  color: var(--gold);
  opacity: 0.5;
}
.memorial-card-body { padding: 18px 20px; }
.memorial-card-name { font-family: var(--font-serif); font-size: 17px; margin-bottom: 6px; }
.memorial-card-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.memorial-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ─── Memorial Share Bar ─────────────────────────────────────── */
.memorial-share-bar {
  background: var(--navy-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 32px;
}
.memorial-url-display {
  font-size: 13px;
  color: var(--text-muted);
  font-family: monospace;
  padding: 8px 12px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  word-break: break-all;
}
.memorial-share-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity var(--transition), transform var(--transition);
}
.btn-share:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-share-wa { background: #25D366; color: #fff; }
.btn-share-fb { background: #1877F2; color: #fff; }

/* ─── Memorial Follow Card ───────────────────────────────────── */
.memorial-follow-card {
  background: var(--navy-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  text-align: center;
  margin-bottom: 32px;
}
.memorial-follow-card h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  margin-bottom: 10px;
}
.memorial-follow-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.6;
}

/* ─── Memorial Footer ────────────────────────────────────────── */
.memorial-footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 48px;
}
.memorial-footer-brand {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 0.6;
  transition: opacity var(--transition);
}
.memorial-footer-brand:hover { opacity: 1; }

/* ─── Comment Cards ──────────────────────────────────────────── */
.comment-card {
  background: var(--navy-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 12px;
}
.comment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 1.5px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 12px;
  color: var(--gold);
  flex-shrink: 0;
  font-weight: 600;
}
.comment-meta        { flex: 1; }
.comment-author      { font-size: 14px; font-weight: 500; color: var(--text-primary); margin-bottom: 2px; }
.comment-date        { font-size: 11px; color: var(--text-muted); }
.comment-body        { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.comment-add-form    { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border-subtle); }
.comment-add-form h4 { font-size: 15px; font-weight: 500; color: var(--text-primary); margin-bottom: 16px; }

/* ─── Password Gate ──────────────────────────────────────────── */
.memorial-lock-card {
  max-width: 420px;
  margin: 80px auto;
  background: var(--navy-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
}
.lock-icon { font-size: 48px; margin-bottom: 20px; opacity: 0.7; }
.memorial-lock-card h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  margin-bottom: 10px;
}
.memorial-lock-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}
.lock-error {
  font-size: 13px;
  color: var(--error);
  margin-top: 12px;
  min-height: 20px;
}

/* ─── NFC Tag Inventory ──────────────────────────────────────── */
.nfc-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}
.nfc-tag-active    { background: rgba(76,175,125,0.15); color: var(--success); }
.nfc-tag-unlinked  { background: rgba(255,255,255,0.08); color: var(--text-muted); }
.nfc-tag-inactive  { background: rgba(229,115,115,0.12); color: var(--error); }

/* ─── Publish Success Page ───────────────────────────────────── */
.publish-success-card {
  max-width: 560px;
  margin: 80px auto;
  text-align: center;
  padding: 0 24px;
}
.publish-check {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(76,175,125,0.15);
  border: 2px solid rgba(76,175,125,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 24px;
}

/* ─── Responsive additions ───────────────────────────────────── */
@media (max-width: 640px) {
  .stat-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .memorial-share-actions { flex-direction: column; align-items: stretch; }
  .memorial-share-actions .btn,
  .memorial-share-actions .btn-share { justify-content: center; }
  .memorial-lock-card { padding: 32px 24px; margin: 40px auto; }
  .memorials-grid { grid-template-columns: 1fr; }
  .settings-section { padding: 20px; }
  .table-toolbar { padding: 12px 16px; }
}

/* ============================================================
   LOGIN / ROLE SELECTION PAGE
   ============================================================ */

.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: #0a0a0a;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-brand {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: #f8f5f0;
  margin-bottom: 0.4rem;
}

.login-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: #666;
  letter-spacing: 0.05em;
}

.login-prompt {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login-prompt h2 {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.1rem;
  font-weight: 400;
  color: #f8f5f0;
  margin-bottom: 0.4rem;
}

.login-prompt p {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: #555;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  width: 100%;
  max-width: 780px;
}

.role-card {
  background: #111;
  border: 1px solid #222;
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  transition: border-color 0.2s;
}

.role-card:hover {
  border-color: #444;
}

.role-card-ghost {
  background: #0d0d0d;
  border-style: dashed;
}

.role-card-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.role-icon {
  font-size: 1.4rem;
  color: #666;
  flex-shrink: 0;
  margin-top: 2px;
}

.role-info h3 {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.95rem;
  font-weight: 500;
  color: #f8f5f0;
  margin-bottom: 0.3rem;
}

.role-info p {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: #555;
  line-height: 1.5;
}

.role-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: #fff;
  color: #333;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  width: 100%;
}

.btn-google:hover {
  background: #f0f0f0;
}

.btn-email {
  background: transparent;
  color: #888;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  width: 100%;
}

.btn-email:hover {
  border-color: #444;
  color: #bbb;
}

.memorial-lookup {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.memorial-lookup input {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: #f8f5f0;
  width: 100%;
  box-sizing: border-box;
  outline: none;
}

.memorial-lookup input:focus {
  border-color: #555;
}

.memorial-lookup input::placeholder {
  color: #444;
}

.btn-visit {
  background: #1a1a2e;
  color: #8888ff;
  border: 1px solid #2a2a4a;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
  width: 100%;
}

.btn-visit:hover {
  background: #22224a;
}

.btn-guest {
  background: transparent;
  color: #666;
  border: 1px solid #1e1e1e;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.15s;
  width: 100%;
}

.btn-guest:hover {
  color: #999;
}

/* Mobile */
@media (max-width: 600px) {
  .role-grid {
    grid-template-columns: 1fr;
  }

  .login-brand {
    font-size: 1.1rem;
  }

  .login-prompt h2 {
    font-size: 0.95rem;
  }
}
/* ============================================================
   Digistone Homepage CSS
   Design tokens: --navy #001e24 | --gold #b3ceca | --warm-white #f0f8f8
   ============================================================ */

/* ── Reset / Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #001e24;
  color: #f0f8f8;
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ──────────────────────────────────────────────────── */
.home-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 30, 36, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(179, 206, 202, 0.12);
}

.home-nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-nav-logo {
  font-family: 'Roboto Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #b3ceca;
  text-transform: uppercase;
}

.home-nav-cta {
  display: inline-block;
  padding: 8px 22px;
  border: 1.5px solid #b3ceca;
  border-radius: 6px;
  color: #b3ceca;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.home-nav-cta:hover {
  background: #b3ceca;
  color: #001e24;
}

/* ── HERO ─────────────────────────────────────────────────── */
.home-hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 80px 32px 60px;
  max-width: 1140px;
  margin: 0 auto;
  gap: 60px;
}

.home-hero-inner {
  flex: 1 1 500px;
}

.home-hero-label {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #b3ceca;
  margin-bottom: 20px;
}

.home-hero-headline {
  font-family: 'Roboto Mono', monospace;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.18;
  color: #f0f8f8;
  margin-bottom: 24px;
}

.home-hero-sub {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(240, 248, 248, 0.72);
  max-width: 520px;
  margin-bottom: 40px;
}

.home-hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-hero-primary {
  display: inline-block;
  padding: 14px 32px;
  background: #b3ceca;
  color: #001e24;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-hero-primary:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-hero-ghost {
  display: inline-block;
  padding: 14px 32px;
  border: 1.5px solid rgba(179, 206, 202, 0.4);
  color: #b3ceca;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 6px;
  transition: border-color 0.2s, color 0.2s;
}
.btn-hero-ghost:hover { border-color: #b3ceca; color: #f0f8f8; }

/* ── HERO PREVIEW CARD ────────────────────────────────────── */
.home-hero-card {
  flex: 0 0 320px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preview-card {
  background: #003040;
  border: 1px solid rgba(179, 206, 202, 0.2);
  border-radius: 16px;
  padding: 28px;
  width: 300px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.preview-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.preview-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(179, 206, 202, 0.18);
  border: 1.5px solid #b3ceca;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: #b3ceca;
  flex-shrink: 0;
}

.preview-name {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.88rem;
  font-weight: 700;
  color: #f0f8f8;
  margin-bottom: 3px;
}

.preview-dates {
  font-size: 0.78rem;
  color: rgba(240, 248, 248, 0.5);
  font-family: 'Roboto Mono', monospace;
}

.preview-quote {
  font-size: 0.88rem;
  font-style: italic;
  color: rgba(240, 248, 248, 0.7);
  line-height: 1.5;
  margin-bottom: 16px;
  padding-top: 4px;
  border-top: 1px solid rgba(179, 206, 202, 0.1);
  padding-top: 14px;
}

.preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.preview-tags span {
  padding: 4px 10px;
  background: rgba(179, 206, 202, 0.1);
  border: 1px solid rgba(179, 206, 202, 0.2);
  border-radius: 100px;
  font-size: 0.72rem;
  color: #b3ceca;
  font-family: 'Roboto Mono', monospace;
  letter-spacing: 0.05em;
}

.preview-tap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: rgba(240, 248, 248, 0.45);
  border-top: 1px solid rgba(179, 206, 202, 0.1);
  padding-top: 14px;
  font-family: 'Roboto Mono', monospace;
}

.preview-tap-icon {
  font-size: 1.1rem;
  color: #b3ceca;
  opacity: 0.7;
}

/* ── SECTIONS (shared) ────────────────────────────────────── */
.home-section {
  padding: 96px 32px;
  border-top: 1px solid rgba(179, 206, 202, 0.08);
}

.home-section-dark {
  background: #00141a;
}

.home-section-access {
  background: rgba(179, 206, 202, 0.04);
}

.home-section-inner {
  max-width: 1140px;
  margin: 0 auto;
}

.home-section-narrow {
  max-width: 720px;
}

.home-section-label {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #b3ceca;
  margin-bottom: 16px;
}

.home-section-headline {
  font-family: 'Roboto Mono', monospace;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
  color: #f0f8f8;
  margin-bottom: 48px;
}

.home-section-cta {
  text-align: center;
  margin-top: 48px;
}

.btn-teal {
  display: inline-block;
  padding: 14px 32px;
  background: transparent;
  border: 1.5px solid #b3ceca;
  color: #b3ceca;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.btn-teal:hover { background: #b3ceca; color: #001e24; }

/* ── WHAT IS — EXPLAINER CARDS ───────────────────────────── */
.explainer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 0;
}

.explainer-card {
  background: #003040;
  border: 1px solid rgba(179, 206, 202, 0.15);
  border-radius: 12px;
  padding: 32px;
  transition: border-color 0.2s, transform 0.2s;
}
.explainer-card:hover {
  border-color: rgba(179, 206, 202, 0.4);
  transform: translateY(-4px);
}

.explainer-label {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #b3ceca;
  margin-bottom: 16px;
}

.explainer-card p {
  font-size: 0.95rem;
  line-height: 1.72;
  color: rgba(240, 248, 248, 0.7);
}

.explainer-card strong {
  color: #f0f8f8;
  font-weight: 600;
}

/* ── HOW IT WORKS — STEPS ────────────────────────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.step-card {
  padding: 28px 24px;
  border-left: 2px solid rgba(179, 206, 202, 0.2);
  transition: border-color 0.2s;
}
.step-card:hover { border-left-color: #b3ceca; }

/* Scoped to step-card only — avoids overriding progress stepper dots */
.step-card .step-num {
  font-family: 'Roboto Mono', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: rgba(179, 206, 202, 0.25);
  margin-bottom: 14px;
  line-height: 1;
}

.step-card h3 {
  font-family: 'Roboto Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: #f0f8f8;
  margin-bottom: 10px;
}

.step-card p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(240, 248, 248, 0.6);
}

/* ── FOR WHO ──────────────────────────────────────────────── */
.for-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.for-card {
  background: #003040;
  border: 1px solid rgba(179, 206, 202, 0.12);
  border-radius: 12px;
  padding: 40px;
}

.for-tag {
  display: inline-block;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #b3ceca;
  border: 1px solid rgba(179, 206, 202, 0.3);
  border-radius: 100px;
  padding: 4px 14px;
  margin-bottom: 20px;
}

.for-card h3 {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  color: #f0f8f8;
  margin-bottom: 14px;
}

.for-card > p {
  font-size: 0.92rem;
  line-height: 1.65;
  color: rgba(240, 248, 248, 0.65);
  margin-bottom: 24px;
}

.for-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.for-list li {
  font-size: 0.88rem;
  color: rgba(240, 248, 248, 0.72);
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}

.for-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: #b3ceca;
  font-size: 0.8rem;
}

/* ── ROLE / ACCESS CARDS ──────────────────────────────────── */
.role-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.role-card {
  background: #002830;
  border: 1px solid rgba(179, 206, 202, 0.15);
  border-radius: 12px;
  padding: 28px;
  transition: border-color 0.2s;
}
.role-card:hover { border-color: rgba(179, 206, 202, 0.35); }

.role-card-ghost {
  border-style: dashed;
  border-color: rgba(179, 206, 202, 0.1);
  background: transparent;
}

.home-access-sub {
  font-size: 0.95rem;
  color: rgba(240, 248, 248, 0.55);
  margin-top: -32px;
  margin-bottom: 40px;
}

.role-card-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.role-icon {
  font-size: 1.5rem;
  color: #b3ceca;
  line-height: 1;
  flex-shrink: 0;
  padding-top: 2px;
}

.role-info h3 {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.98rem;
  font-weight: 700;
  color: #f0f8f8;
  margin-bottom: 6px;
}

.role-info p {
  font-size: 0.85rem;
  line-height: 1.55;
  color: rgba(240, 248, 248, 0.55);
}

.role-card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Google sign-in button */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 20px;
  background: #f0f8f8;
  color: #001e24;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: opacity 0.18s, transform 0.15s;
  text-align: center;
}
.btn-google:hover { opacity: 0.9; transform: translateY(-1px); }

/* Email button */
.btn-email {
  width: 100%;
  padding: 10px 20px;
  background: transparent;
  color: rgba(240, 248, 248, 0.65);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  border: 1px solid rgba(179, 206, 202, 0.2);
  border-radius: 7px;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s;
  text-align: center;
}
.btn-email:hover { border-color: rgba(179, 206, 202, 0.5); color: #f0f8f8; }

/* Guest button */
.btn-guest {
  width: 100%;
  padding: 11px 20px;
  background: transparent;
  color: rgba(240, 248, 248, 0.5);
  font-family: 'Roboto Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  border: 1px dashed rgba(179, 206, 202, 0.2);
  border-radius: 7px;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s;
}
.btn-guest:hover { color: #b3ceca; border-color: rgba(179, 206, 202, 0.5); }

/* ── MEMORIAL SEARCH ──────────────────────────────────────── */
.memorial-lookup {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

#memorial-search-input {
  width: 100%;
  padding: 11px 16px;
  background: rgba(240, 248, 248, 0.06);
  border: 1px solid rgba(179, 206, 202, 0.25);
  border-radius: 7px;
  color: #f0f8f8;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.18s;
}
#memorial-search-input::placeholder { color: rgba(240, 248, 248, 0.3); }
#memorial-search-input:focus { border-color: #b3ceca; }

.btn-visit {
  width: 100%;
  padding: 11px 20px;
  background: #b3ceca;
  color: #001e24;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: opacity 0.18s;
}
.btn-visit:hover { opacity: 0.85; }

.search-results {
  background: #002830;
  border: 1px solid rgba(179, 206, 202, 0.2);
  border-radius: 8px;
  overflow: hidden;
  max-height: 220px;
  overflow-y: auto;
}

.search-results.hidden { display: none; }

.search-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(179, 206, 202, 0.08);
  cursor: pointer;
  transition: background 0.15s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(179, 206, 202, 0.08); }

.sri-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f0f8f8;
  margin-bottom: 2px;
}

.sri-dates {
  font-size: 0.78rem;
  color: rgba(240, 248, 248, 0.45);
  font-family: 'Roboto Mono', monospace;
}

.search-loading,
.search-empty {
  padding: 16px;
  font-size: 0.85rem;
  color: rgba(240, 248, 248, 0.45);
  text-align: center;
  font-style: italic;
}

/* ── FAQ ──────────────────────────────────────────────────── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(179, 206, 202, 0.12);
  border-radius: 12px;
  overflow: hidden;
}

.faq-item {
  border-bottom: 1px solid rgba(179, 206, 202, 0.1);
  background: #002830;
}
.faq-item:last-child { border-bottom: none; }

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: none;
  border: none;
  color: #f0f8f8;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: color 0.18s;
}
.faq-q:hover { color: #b3ceca; }

.faq-icon {
  font-size: 1.3rem;
  color: #b3ceca;
  flex-shrink: 0;
  transition: transform 0.25s;
  line-height: 1;
}

.faq-a {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(240, 248, 248, 0.62);
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-a {
  max-height: 300px;
  padding: 0 24px 20px;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

/* ── FOOTER ───────────────────────────────────────────────── */
.home-footer {
  border-top: 1px solid rgba(179, 206, 202, 0.1);
  padding: 56px 32px;
  background: #00141a;
}

.home-footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  text-align: center;
}

.home-footer-logo {
  font-family: 'Roboto Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #b3ceca;
  margin-bottom: 12px;
}

.home-footer-tag {
  font-size: 0.88rem;
  color: rgba(240, 248, 248, 0.45);
  margin-bottom: 10px;
  font-style: italic;
}

.home-footer-copy {
  font-size: 0.78rem;
  color: rgba(240, 248, 248, 0.25);
  font-family: 'Roboto Mono', monospace;
  letter-spacing: 0.05em;
}

/* ── DigiKey Modal ────────────────────────────────────────── */
.dk-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.dk-modal {
  background: var(--bg-card, #0f1829);
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
  border-radius: 16px;
  width: 100%; max-width: 520px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}
.dk-modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px 0;
}
.dk-modal-header h3 { font-size: 17px; font-weight: 600; }
.dk-modal-close {
  background: none; border: none; color: var(--text-secondary); font-size: 22px; cursor: pointer; padding: 4px 8px;
}
.dk-modal-body { padding: 16px 24px 24px; }

.dk-assign-option:hover {
  border-color: var(--accent, #5ecad4) !important;
  background: rgba(94,202,212,0.04);
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .home-hero {
    flex-direction: column;
    min-height: auto;
    padding: 60px 24px 48px;
    gap: 40px;
  }

  .home-hero-card { order: -1; }

  .explainer-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .for-grid { grid-template-columns: 1fr; }
  .role-grid { grid-template-columns: 1fr; }

  .home-section { padding: 64px 24px; }
}

@media (max-width: 580px) {
  .home-nav-inner { padding: 14px 20px; }
  .home-hero { padding: 48px 20px 40px; }
  .home-section { padding: 56px 20px; }

  .home-hero-headline { font-size: 1.75rem; }
  .home-section-headline { font-size: 1.45rem; }

  .steps-grid { grid-template-columns: 1fr; }
  .home-hero-ctas { flex-direction: column; }

  .preview-card { width: 100%; max-width: 320px; }

  .for-card { padding: 28px 24px; }
  .role-card { padding: 22px 20px; }
}

/* ============================================================
   Homepage — Centered sections, new content blocks
   ============================================================ */

/* Centered section variant */
.home-section-centered {
  text-align: center;
}
.home-section-centered .home-section-label,
.home-section-centered .home-section-headline,
.home-section-centered .home-section-sub {
  text-align: center;
}
.home-section-centered .home-section-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.home-section-centered .home-section-headline {
  margin-left: auto;
  margin-right: auto;
}

/* Section subtitle */
.home-section-sub {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(240, 248, 248, 0.6);
  max-width: 580px;
  margin: -28px auto 48px;
  text-align: center;
}

/* ── WHAT IS — body text ─────────────────────────────────── */
.what-is-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 40px;
  max-width: 640px;
  text-align: center;
}
.what-is-body p {
  font-size: 1.02rem;
  line-height: 1.78;
  color: rgba(240, 248, 248, 0.68);
}
.what-is-body strong {
  color: #b3ceca;
  font-weight: 600;
}

/* ── WHO WE SERVE ─────────────────────────────────────────── */
.serve-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
  margin-top: 8px;
}

.serve-card {
  background: #002830;
  border: 1px solid rgba(179, 206, 202, 0.12);
  border-radius: 12px;
  padding: 32px 28px;
  text-align: left;
  transition: border-color 0.2s, transform 0.2s;
}
.serve-card:hover {
  border-color: rgba(179, 206, 202, 0.35);
  transform: translateY(-3px);
}

.serve-icon {
  font-size: 1.4rem;
  color: #b3ceca;
  margin-bottom: 14px;
  display: block;
}

.serve-card h3 {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.88rem;
  font-weight: 700;
  color: #f0f8f8;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.serve-card p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: rgba(240, 248, 248, 0.58);
}

/* ── OUR ROLE ─────────────────────────────────────────────── */
.our-role-body {
  font-size: 1.05rem;
  line-height: 1.72;
  color: rgba(240, 248, 248, 0.65);
  max-width: 580px;
  text-align: center;
  margin-bottom: 48px;
}
.our-role-body strong {
  color: #b3ceca;
  font-weight: 600;
}

.role-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
}

.role-pillar {
  text-align: center;
  padding: 28px 20px;
  border: 1px solid rgba(179, 206, 202, 0.1);
  border-radius: 12px;
  background: rgba(0, 40, 48, 0.5);
}

.role-pillar-icon {
  font-size: 1.6rem;
  color: #b3ceca;
  margin-bottom: 12px;
}

.role-pillar-label {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f0f8f8;
  margin-bottom: 10px;
}

.role-pillar p {
  font-size: 0.86rem;
  line-height: 1.6;
  color: rgba(240, 248, 248, 0.55);
}

/* ── Nav logo as link ─────────────────────────────────────── */
.home-nav-logo {
  text-decoration: none;
  cursor: pointer;
}

/* ── Footer logo clickable ────────────────────────────────── */
#footer-home-link {
  cursor: pointer;
}
#footer-home-link:hover {
  opacity: 0.8;
}

/* ── Access section role-grid centered ────────────────────── */
.home-section-access .role-grid {
  width: 100%;
  max-width: 900px;
}

/* ── Responsive additions ─────────────────────────────────── */
@media (max-width: 900px) {
  .serve-grid { grid-template-columns: repeat(2, 1fr); }
  .role-pillars { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 580px) {
  .serve-grid { grid-template-columns: 1fr; }
  .role-pillars { grid-template-columns: 1fr; }
  .what-is-body { text-align: left; }
  .our-role-body { text-align: left; }
  .home-section-sub { text-align: left; margin-left: 0; }
}

/* ============================================================
   HOMEPAGE v3 — Mercury-style (hp- prefix)
   ============================================================ */

/* ── Nav ───────────────────────────────────────────────────── */
.hp-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(0, 30, 36, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(179, 206, 202, 0.1);
}
.hp-nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 16px 40px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.hp-logo {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #b3ceca;
  text-decoration: none;
  flex-shrink: 0;
}
.hp-nav-links {
  display: flex;
  gap: 32px;
  flex: 1;
}
.hp-nav-link {
  font-size: 0.88rem;
  color: rgba(240, 248, 248, 0.55);
  text-decoration: none;
  transition: color 0.18s;
  letter-spacing: 0.01em;
}
.hp-nav-link:hover { color: #f0f8f8; }
.hp-nav-cta {
  margin-left: auto;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b3ceca;
  text-decoration: none;
  border: 1.5px solid rgba(179, 206, 202, 0.35);
  padding: 8px 20px;
  border-radius: 6px;
  transition: background 0.18s, color 0.18s;
  flex-shrink: 0;
}
.hp-nav-cta:hover { background: #b3ceca; color: #001e24; }

/* ── Hero ──────────────────────────────────────────────────── */
.hp-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  max-width: 1160px;
  margin: 0 auto;
  padding: 100px 40px 80px;
}
.hp-hero-badge {
  display: inline-block;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #b3ceca;
  border: 1px solid rgba(179, 206, 202, 0.3);
  border-radius: 100px;
  padding: 5px 14px;
  margin-bottom: 28px;
}
.hp-hero-headline {
  font-family: 'Roboto Mono', monospace;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  color: #f0f8f8;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}
.hp-hero-sub {
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(240, 248, 248, 0.62);
  margin-bottom: 40px;
  max-width: 480px;
}
.hp-hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ── Buttons ───────────────────────────────────────────────── */
.hp-btn-primary {
  display: inline-block;
  padding: 14px 30px;
  background: #b3ceca;
  color: #001e24;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  transition: opacity 0.18s, transform 0.15s;
}
.hp-btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.hp-btn-primary.hp-btn-lg { padding: 16px 40px; font-size: 0.88rem; }

.hp-btn-ghost {
  display: inline-block;
  padding: 14px 30px;
  background: transparent;
  border: 1.5px solid rgba(179, 206, 202, 0.3);
  color: rgba(240, 248, 248, 0.75);
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 7px;
  transition: border-color 0.18s, color 0.18s;
}
.hp-btn-ghost:hover { border-color: #b3ceca; color: #f0f8f8; }

/* ── Product Mockup ────────────────────────────────────────── */
.hp-mockup-wrap {
  display: flex;
  justify-content: center;
}
.hp-mockup-browser {
  background: #002830;
  border: 1px solid rgba(179, 206, 202, 0.15);
  border-radius: 14px;
  overflow: hidden;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(179, 206, 202, 0.08);
}
.hp-mockup-bar {
  background: #001e24;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(179, 206, 202, 0.1);
}
.hp-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(179, 206, 202, 0.2);
  display: inline-block;
}
.hp-mockup-url {
  flex: 1;
  text-align: center;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.68rem;
  color: rgba(240, 248, 248, 0.3);
  background: rgba(255,255,255,0.04);
  padding: 4px 12px;
  border-radius: 4px;
}
.hp-mockup-screen {
  padding: 24px;
}
.hp-mock-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.hp-mock-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(179, 206, 202, 0.15);
  border: 1.5px solid rgba(179, 206, 202, 0.3);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.8rem; font-weight: 700;
  color: #b3ceca;
  flex-shrink: 0;
}
.hp-mock-name {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.88rem; font-weight: 700;
  color: #f0f8f8; margin-bottom: 3px;
}
.hp-mock-dates {
  font-size: 0.74rem;
  color: rgba(240, 248, 248, 0.4);
  font-family: 'Roboto Mono', monospace;
}
.hp-mock-badge {
  margin-left: auto;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: #4caf7d;
  background: rgba(76, 175, 125, 0.12);
  border: 1px solid rgba(76, 175, 125, 0.25);
  padding: 4px 10px;
  border-radius: 100px;
}
.hp-mock-img-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 18px;
}
.hp-mock-img {
  aspect-ratio: 1;
  border-radius: 6px;
}
.hp-mock-img-more {
  background: rgba(179, 206, 202, 0.08) !important;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem;
  color: rgba(240, 248, 248, 0.4);
  font-family: 'Roboto Mono', monospace;
}
.hp-mock-quote {
  font-size: 0.84rem;
  font-style: italic;
  color: rgba(240, 248, 248, 0.6);
  line-height: 1.55;
  margin-bottom: 14px;
  padding: 12px;
  background: rgba(179, 206, 202, 0.05);
  border-left: 2px solid rgba(179, 206, 202, 0.3);
  border-radius: 0 6px 6px 0;
}
.hp-mock-tags {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px;
}
.hp-mock-tags span {
  padding: 3px 10px;
  background: rgba(179, 206, 202, 0.08);
  border: 1px solid rgba(179, 206, 202, 0.18);
  border-radius: 100px;
  font-size: 0.7rem;
  color: #b3ceca;
  font-family: 'Roboto Mono', monospace;
}
.hp-mock-footer {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid rgba(179, 206, 202, 0.1);
  padding-top: 12px;
}
.hp-mock-nfc {
  font-size: 0.72rem;
  color: rgba(240, 248, 248, 0.35);
  font-family: 'Roboto Mono', monospace;
}
.hp-mock-views {
  font-size: 0.72rem;
  color: rgba(179, 206, 202, 0.5);
  font-family: 'Roboto Mono', monospace;
}

/* ── Trust Bar ─────────────────────────────────────────────── */
.hp-trust-bar {
  border-top: 1px solid rgba(179, 206, 202, 0.08);
  border-bottom: 1px solid rgba(179, 206, 202, 0.08);
  background: rgba(179, 206, 202, 0.03);
  padding: 20px 40px;
}
.hp-trust-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.hp-trust-label {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(240, 248, 248, 0.3);
}
.hp-trust-item {
  font-size: 0.85rem;
  color: rgba(240, 248, 248, 0.45);
  letter-spacing: 0.01em;
}
.hp-trust-sep { color: rgba(179, 206, 202, 0.2); }

/* ── Shared Section Styles ─────────────────────────────────── */
.hp-section {
  padding: 100px 40px;
}
.hp-section-alt {
  background: #00141a;
}
.hp-section-access {
  background: rgba(179, 206, 202, 0.03);
  border-top: 1px solid rgba(179, 206, 202, 0.08);
  border-bottom: 1px solid rgba(179, 206, 202, 0.08);
}
.hp-section-inner {
  max-width: 1160px;
  margin: 0 auto;
}
.hp-section-narrow {
  max-width: 680px;
}
.hp-section-head {
  text-align: center;
  margin-bottom: 64px;
}
.hp-label {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #b3ceca;
  margin-bottom: 16px;
  display: block;
}
.hp-section-headline {
  font-family: 'Roboto Mono', monospace;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  color: #f0f8f8;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}
.hp-section-sub {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(240, 248, 248, 0.55);
  max-width: 540px;
  margin: 0 auto;
}

/* ── Two-col layout ────────────────────────────────────────── */
.hp-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.hp-two-col-left .hp-label { margin-bottom: 20px; }
.hp-two-col-left .hp-section-headline { margin-bottom: 0; font-size: clamp(1.6rem, 2.5vw, 2.2rem); }
.hp-body-lg {
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(240, 248, 248, 0.78);
  margin-bottom: 18px;
}
.hp-body {
  font-size: 0.95rem;
  line-height: 1.75;
  color: rgba(240, 248, 248, 0.58);
  margin-bottom: 14px;
}
.hp-body strong { color: #b3ceca; font-weight: 600; }
.hp-what-stats {
  display: flex;
  gap: 32px;
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid rgba(179, 206, 202, 0.1);
}
.hp-stat-num {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.82rem;
  font-weight: 700;
  color: #b3ceca;
  margin-bottom: 4px;
}
.hp-stat-label {
  font-size: 0.78rem;
  color: rgba(240, 248, 248, 0.4);
}

/* ── Who We Serve Grid ─────────────────────────────────────── */
.hp-serve-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: rgba(179, 206, 202, 0.06);
  border: 1px solid rgba(179, 206, 202, 0.1);
  border-radius: 16px;
  overflow: hidden;
}
.hp-serve-card {
  background: #00141a;
  padding: 36px 32px;
  transition: background 0.2s;
}
.hp-serve-card:hover { background: #001e24; }
.hp-serve-icon-wrap {
  margin-bottom: 18px;
}
.hp-serve-img {
  width: 48px; height: 48px;
  border-radius: 10px;
  object-fit: cover;
  opacity: 0.85;
}
.hp-serve-card h3 {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.88rem;
  font-weight: 700;
  color: #f0f8f8;
  margin-bottom: 10px;
  line-height: 1.3;
}
.hp-serve-card p {
  font-size: 0.87rem;
  line-height: 1.65;
  color: rgba(240, 248, 248, 0.52);
}

/* ── How It Works ──────────────────────────────────────────── */
.hp-steps {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}
.hp-step {
  flex: 1;
}
.hp-step-arrow {
  color: rgba(179, 206, 202, 0.25);
  font-size: 1.5rem;
  margin-top: 80px;
  flex-shrink: 0;
}
.hp-step-num {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: #b3ceca;
  margin-bottom: 16px;
}
.hp-step-img {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid rgba(179, 206, 202, 0.1);
  background: #002830;
  aspect-ratio: 16/10;
}
.hp-step-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.8;
}
.hp-step h3 {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: #f0f8f8;
  margin-bottom: 10px;
}
.hp-step p {
  font-size: 0.88rem;
  line-height: 1.68;
  color: rgba(240, 248, 248, 0.55);
}

/* ── Access / Role Cards ───────────────────────────────────── */
.hp-role-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}
.hp-role-card {
  background: #002030;
  border: 1px solid rgba(179, 206, 202, 0.12);
  border-radius: 14px;
  padding: 28px;
  transition: border-color 0.2s;
}
.hp-role-card:hover { border-color: rgba(179, 206, 202, 0.3); }
.hp-role-ghost {
  border-style: dashed;
  background: transparent;
  border-color: rgba(179, 206, 202, 0.08);
}
.hp-role-top {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 22px;
}
.hp-role-icon {
  font-size: 1.4rem;
  color: #b3ceca;
  flex-shrink: 0;
  line-height: 1;
  padding-top: 2px;
}
.hp-role-top h3 {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.92rem;
  font-weight: 700;
  color: #f0f8f8;
  margin-bottom: 6px;
}
.hp-role-top p {
  font-size: 0.84rem;
  line-height: 1.55;
  color: rgba(240, 248, 248, 0.48);
}
.hp-role-actions { display: flex; flex-direction: column; gap: 10px; }

.hp-btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 16px;
  background: #f0f8f8; color: #001e24;
  font-family: 'Inter', sans-serif; font-size: 0.88rem; font-weight: 600;
  border: none; border-radius: 7px; cursor: pointer;
  transition: opacity 0.18s;
}
.hp-btn-google:hover { opacity: 0.9; }

.hp-btn-email {
  width: 100%; padding: 10px 16px;
  background: transparent; color: rgba(240, 248, 248, 0.6);
  font-family: 'Inter', sans-serif; font-size: 0.85rem;
  border: 1px solid rgba(179, 206, 202, 0.18);
  border-radius: 7px; cursor: pointer;
  transition: border-color 0.18s, color 0.18s;
}
.hp-btn-email:hover { border-color: rgba(179, 206, 202, 0.45); color: #f0f8f8; }

.hp-btn-ghost-sm {
  width: 100%; padding: 11px 16px;
  background: transparent; color: rgba(240, 248, 248, 0.4);
  font-family: 'Roboto Mono', monospace; font-size: 0.78rem; letter-spacing: 0.06em;
  border: 1px dashed rgba(179, 206, 202, 0.15);
  border-radius: 7px; cursor: pointer;
  transition: color 0.18s, border-color 0.18s;
}
.hp-btn-ghost-sm:hover { color: #b3ceca; border-color: rgba(179, 206, 202, 0.35); }

/* ── Memorial Search ───────────────────────────────────────── */
.hp-search-wrap { display: flex; flex-direction: column; gap: 10px; position: relative; }
#memorial-search-input {
  width: 100%; padding: 11px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(179, 206, 202, 0.2);
  border-radius: 7px; color: #f0f8f8;
  font-family: 'Inter', sans-serif; font-size: 0.88rem;
  outline: none; transition: border-color 0.18s;
}
#memorial-search-input::placeholder { color: rgba(240, 248, 248, 0.28); }
#memorial-search-input:focus { border-color: #b3ceca; }
.hp-btn-search {
  width: 100%; padding: 11px 16px;
  background: #b3ceca; color: #001e24;
  font-family: 'Roboto Mono', monospace; font-size: 0.8rem; font-weight: 700;
  border: none; border-radius: 7px; cursor: pointer;
  transition: opacity 0.18s;
}
.hp-btn-search:hover { opacity: 0.85; }
.hp-search-results {
  background: #002030; border: 1px solid rgba(179, 206, 202, 0.18);
  border-radius: 8px; overflow: hidden; max-height: 200px; overflow-y: auto;
}
.hp-search-results.hidden { display: none; }
.hp-search-result {
  padding: 12px 14px; border-bottom: 1px solid rgba(179, 206, 202, 0.06);
  cursor: pointer; transition: background 0.15s;
}
.hp-search-result:last-child { border-bottom: none; }
.hp-search-result:hover { background: rgba(179, 206, 202, 0.07); }
.hp-sr-name { font-size: 0.9rem; font-weight: 600; color: #f0f8f8; margin-bottom: 2px; }
.hp-sr-dates { font-size: 0.75rem; color: rgba(240,248,248,0.4); font-family: 'Roboto Mono', monospace; }
.hp-search-msg { padding: 14px; font-size: 0.85rem; color: rgba(240,248,248,0.4); text-align: center; font-style: italic; }

/* ── FAQ ───────────────────────────────────────────────────── */
.hp-faq {
  border: 1px solid rgba(179, 206, 202, 0.1);
  border-radius: 14px;
  overflow: hidden;
}
.hp-faq-item {
  border-bottom: 1px solid rgba(179, 206, 202, 0.08);
  background: rgba(0, 20, 26, 0.6);
}
.hp-faq-item:last-child { border-bottom: none; }
.hp-faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; background: none; border: none;
  color: #f0f8f8; font-family: 'Inter', sans-serif; font-size: 0.95rem; font-weight: 500;
  text-align: left; cursor: pointer; transition: color 0.18s;
}
.hp-faq-q:hover { color: #b3ceca; }
.hp-faq-icon { font-size: 1.3rem; color: #b3ceca; flex-shrink: 0; transition: transform 0.25s; }
.hp-faq-a {
  font-size: 0.9rem; line-height: 1.72;
  color: rgba(240, 248, 248, 0.58);
  padding: 0 24px; max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.hp-faq-item.open .hp-faq-a { max-height: 300px; padding: 0 24px 20px; }
.hp-faq-item.open .hp-faq-icon { transform: rotate(45deg); }

/* ── CTA Banner ────────────────────────────────────────────── */
.hp-cta-banner {
  padding: 100px 40px;
  background: linear-gradient(160deg, #001e24 0%, #003040 100%);
  border-top: 1px solid rgba(179, 206, 202, 0.1);
}
.hp-cta-headline {
  font-family: 'Roboto Mono', monospace;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  color: #f0f8f8;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}
.hp-cta-sub {
  font-size: 1rem;
  color: rgba(240, 248, 248, 0.55);
  margin-bottom: 40px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
}

/* ── Footer ────────────────────────────────────────────────── */
.hp-footer {
  background: #00141a;
  border-top: 1px solid rgba(179, 206, 202, 0.08);
  padding: 56px 40px;
}
.hp-footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  text-align: center;
}
.hp-footer-top { margin-bottom: 24px; }
.hp-footer-logo {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #b3ceca;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 10px;
}
.hp-footer-tag {
  font-size: 0.88rem;
  color: rgba(240, 248, 248, 0.35);
  font-style: italic;
}
.hp-footer-divider {
  height: 1px;
  background: rgba(179, 206, 202, 0.08);
  margin-bottom: 24px;
}
.hp-footer-copy {
  font-size: 0.76rem;
  color: rgba(240, 248, 248, 0.2);
  font-family: 'Roboto Mono', monospace;
  letter-spacing: 0.05em;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hp-hero { grid-template-columns: 1fr; padding: 60px 24px 48px; gap: 48px; }
  .hp-hero-sub { max-width: 100%; }
  .hp-two-col { grid-template-columns: 1fr; gap: 48px; }
  .hp-serve-grid { grid-template-columns: repeat(2, 1fr); }
  .hp-steps { flex-direction: column; }
  .hp-step-arrow { display: none; }
  .hp-role-grid { grid-template-columns: 1fr; }
  .hp-section { padding: 72px 24px; }
  .hp-nav-links { display: none; }
  .hp-trust-bar { padding: 16px 24px; }
}
@media (max-width: 580px) {
  .hp-serve-grid { grid-template-columns: 1fr; }
  .hp-hero-headline { font-size: 2rem; }
  .hp-hero-actions { flex-direction: column; }
  .hp-nav-inner { padding: 14px 20px; }
  .hp-section { padding: 56px 20px; }
  .hp-what-stats { flex-direction: column; gap: 20px; }
}

/* ============================================================
   HOMEPAGE v4 — Mercury-inspired (ds- prefix)
   ============================================================ */

/* ── Nav ─────────────────────────────────────────────────── */
.ds-nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(0, 30, 36, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(179, 206, 202, 0.08);
}
.ds-nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 40px; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.ds-nav-user,
.ds-nav-auth-btns { margin-left: auto; }
.ds-nav-logo {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.2em; color: #b3ceca;
  text-decoration: none; flex-shrink: 0;
}
.ds-nav-center {
  display: flex; gap: 6px;
  position: absolute; left: 50%; transform: translateX(-50%);
}
.ds-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  height: 36px;
  padding: 0 18px;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(240,248,248,0.55);
  text-decoration: none;
  border: 1px solid rgba(179,206,202,0.12);
  border-radius: 20px;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
  white-space: nowrap;
  box-sizing: border-box;
}
.ds-nav-link:hover { color: #f0f8f8; background: rgba(179,206,202,0.08); border-color: rgba(179,206,202,0.25); }
.ds-nav-link.active { color: #f0f8f8; background: rgba(179,206,202,0.1); border-color: rgba(179,206,202,0.3); }

/* Auth buttons in nav */
.ds-nav-auth-btns {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.ds-nav-signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 20px;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(240,248,248,0.7);
  text-decoration: none;
  border: 1px solid rgba(179,206,202,0.25);
  border-radius: 20px;
  transition: color 0.18s, border-color 0.18s;
}
.ds-nav-signin:hover { color: #f0f8f8; border-color: rgba(179,206,202,0.5); }
.ds-nav-signup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #001e24;
  text-decoration: none;
  background: #b3ceca;
  border: 1px solid #b3ceca;
  border-radius: 20px;
  transition: background 0.18s, opacity 0.18s;
}
.ds-nav-signup:hover { opacity: 0.9; }

/* ── Buttons ─────────────────────────────────────────────── */
.ds-btn-primary {
  display: inline-block; padding: 13px 28px;
  background: #b3ceca; color: #001e24;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.06em; text-decoration: none;
  border-radius: 8px; border: none; cursor: pointer;
  transition: opacity 0.18s, transform 0.15s;
}
.ds-btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.ds-btn-primary.ds-btn-lg { padding: 16px 40px; font-size: 0.88rem; }

.ds-btn-outline {
  display: inline-block; padding: 13px 28px;
  background: transparent;
  border: 1.5px solid rgba(179,206,202,0.25);
  color: rgba(240,248,248,0.7);
  font-size: 0.9rem; text-decoration: none;
  border-radius: 8px; transition: border-color 0.18s, color 0.18s;
}
.ds-btn-outline:hover { border-color: #b3ceca; color: #f0f8f8; }

/* ── Hero ────────────────────────────────────────────────── */
.ds-hero { padding: 100px 40px 0; text-align: center; }
.ds-hero-inner { max-width: 820px; margin: 0 auto; }
.ds-hero-badge {
  display: inline-block;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: #b3ceca; border: 1px solid rgba(179,206,202,0.25);
  border-radius: 100px; padding: 5px 16px; margin-bottom: 32px;
}
.ds-hero-headline {
  font-family: 'Roboto Mono', monospace;
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 700; line-height: 1.08;
  color: #f0f8f8; margin-bottom: 28px;
  letter-spacing: -0.02em;
}
.ds-hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.7; color: rgba(240,248,248,0.55);
  margin-bottom: 44px; max-width: 600px; margin-left: auto; margin-right: auto;
}
.ds-hero-actions {
  display: flex; gap: 14px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 72px;
}

/* ── Product Screenshot ───────────────────────────────────── */
.ds-hero-screen {
  max-width: 1100px; margin: 0 auto;
  padding: 0 40px;
}
.ds-screen-wrap {
  background: #002030;
  border: 1px solid rgba(179,206,202,0.15);
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  box-shadow: 0 -8px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(179,206,202,0.06);
}
.ds-screen-bar {
  background: #001820;
  padding: 12px 18px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid rgba(179,206,202,0.08);
}
.ds-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.ds-dot.red    { background: #ff5f57; }
.ds-dot.yellow { background: #febc2e; }
.ds-dot.green  { background: #28c840; }
.ds-screen-url {
  flex: 1; text-align: center;
  font-family: 'Roboto Mono', monospace; font-size: 0.66rem;
  color: rgba(240,248,248,0.25);
  background: rgba(255,255,255,0.04);
  padding: 4px 14px; border-radius: 4px; margin: 0 40px;
}
.ds-screen-body {
  display: flex; min-height: 340px;
}
.ds-screen-sidebar {
  width: 180px; flex-shrink: 0;
  background: #001820;
  border-right: 1px solid rgba(179,206,202,0.07);
  padding: 24px 0;
}
.ds-ss-logo {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.15em; color: #b3ceca;
  padding: 0 20px; margin-bottom: 28px;
}
.ds-ss-nav { display: flex; flex-direction: column; gap: 2px; }
.ds-ss-item {
  padding: 9px 20px; font-size: 0.83rem;
  color: rgba(240,248,248,0.4); cursor: pointer;
  transition: color 0.15s, background 0.15s;
  border-radius: 0;
}
.ds-ss-item.active {
  color: #f0f8f8;
  background: rgba(179,206,202,0.08);
  border-left: 2px solid #b3ceca;
}
.ds-ss-item:hover:not(.active) { color: rgba(240,248,248,0.7); }

.ds-screen-main { flex: 1; padding: 24px 28px; }
.ds-screen-topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.ds-screen-title {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.9rem; font-weight: 700; color: #f0f8f8;
}
.ds-screen-btn {
  font-size: 0.75rem; color: #001e24;
  background: #b3ceca; padding: 6px 14px;
  border-radius: 6px; font-family: 'Roboto Mono', monospace;
  font-weight: 700; letter-spacing: 0.04em; cursor: pointer;
}
.ds-screen-cards { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.ds-sc-card {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(179,206,202,0.08);
  border-radius: 8px; padding: 12px 16px;
}
.ds-sc-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(179,206,202,0.12);
  border: 1px solid rgba(179,206,202,0.2);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Roboto Mono', monospace; font-size: 0.7rem;
  font-weight: 700; color: #b3ceca; flex-shrink: 0;
}
.ds-sc-info { flex: 1; }
.ds-sc-name { font-size: 0.84rem; font-weight: 600; color: #f0f8f8; margin-bottom: 2px; }
.ds-sc-dates { font-size: 0.72rem; color: rgba(240,248,248,0.35); font-family: 'Roboto Mono', monospace; }
.ds-sc-status {
  font-family: 'Roboto Mono', monospace; font-size: 0.65rem;
  letter-spacing: 0.06em; padding: 3px 10px; border-radius: 100px;
}
.ds-sc-status.published { color: #4caf7d; background: rgba(76,175,125,0.12); border: 1px solid rgba(76,175,125,0.2); }
.ds-sc-status.review    { color: #f59e0b; background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.2); }
.ds-sc-status.draft     { color: rgba(240,248,248,0.4); background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); }

.ds-screen-stats { display: flex; gap: 24px; border-top: 1px solid rgba(179,206,202,0.08); padding-top: 20px; }
.ds-ss-stat { flex: 1; }
.ds-ss-num { font-family: 'Roboto Mono', monospace; font-size: 1.3rem; font-weight: 700; color: #b3ceca; margin-bottom: 3px; }
.ds-ss-lbl { font-size: 0.72rem; color: rgba(240,248,248,0.35); }

/* ── Trust Bar ───────────────────────────────────────────── */
.ds-trust {
  border-top: 1px solid rgba(179,206,202,0.08);
  border-bottom: 1px solid rgba(179,206,202,0.08);
  padding: 20px 40px;
  background: rgba(0,20,26,0.5);
}
.ds-trust-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  justify-content: center; flex-wrap: wrap;
}
.ds-trust-label {
  font-family: 'Roboto Mono', monospace; font-size: 0.66rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(240,248,248,0.25);
}
.ds-trust-item { font-size: 0.85rem; color: rgba(240,248,248,0.4); }
.ds-trust-dot  { color: rgba(179,206,202,0.2); }

/* ── Shared Sections ─────────────────────────────────────── */
.ds-section { padding: 120px 40px; }
.ds-section-alt { background: #00141a; }
.ds-section-inner { max-width: 1200px; margin: 0 auto; }
.ds-narrow { max-width: 700px; }
.ds-section-head { text-align: center; margin-bottom: 72px; }
.ds-section-head-left { text-align: left; }
.ds-label {
  display: block; margin-bottom: 14px;
  font-family: 'Roboto Mono', monospace;
  font-size: 1rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: #b3ceca;
}
.ds-section-headline {
  font-family: 'Roboto Mono', monospace;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700; line-height: 1.15; color: #f0f8f8;
  margin-bottom: 18px; letter-spacing: -0.01em;
}
.ds-section-sub {
  font-size: 1.02rem; line-height: 1.72;
  color: rgba(240,248,248,0.52);
  max-width: 560px; margin: 0 auto;
}

/* ── Feature Grid (Mercury 2x2) ──────────────────────────── */
.ds-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.ds-feature-card {
  border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(179,206,202,0.1);
  transition: transform 0.2s;
}
.ds-feature-card:hover { transform: translateY(-4px); }
.ds-feature-dark { background: #001820; }
.ds-feature-teal { background: #00262e; }
.ds-feature-img {
  width: 100%; aspect-ratio: 16/9;
  object-fit: cover; display: block; opacity: 0.85;
}
.ds-feature-caption { padding: 28px 32px; }
.ds-feature-caption h3 {
  font-family: 'Roboto Mono', monospace;
  font-size: 1rem; font-weight: 700;
  color: #f0f8f8; margin-bottom: 10px;
}
.ds-feature-caption p {
  font-size: 0.9rem; line-height: 1.65;
  color: rgba(240,248,248,0.52);
}

/* ── Who We Serve ────────────────────────────────────────── */
.ds-serve-list { display: flex; flex-direction: column; gap: 0; }
.ds-serve-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: center;
  padding: 64px 0;
  border-top: 1px solid rgba(179,206,202,0.08);
}
.ds-serve-row:first-child { border-top: none; }
.ds-serve-row-flip .ds-serve-left { order: 2; }
.ds-serve-row-flip .ds-serve-img-wrap { order: 1; }
.ds-serve-left { display: flex; gap: 24px; align-items: flex-start; }
.ds-serve-num {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.15em;
  color: rgba(179,206,202,0.4); flex-shrink: 0;
  padding-top: 5px;
}
.ds-serve-left h3 {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.15rem; font-weight: 700;
  color: #f0f8f8; margin-bottom: 14px; line-height: 1.3;
}
.ds-serve-left p { font-size: 1.15rem; line-height: 1.72; color: rgba(240,248,248,0.55); }
.ds-serve-img-wrap img {
  width: 100%; border-radius: 14px;
  object-fit: cover; aspect-ratio: 16/10;
  border: 1px solid rgba(179,206,202,0.1);
  opacity: 0.85;
}

/* ── How It Works ────────────────────────────────────────── */
.ds-steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.ds-step-num {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.18em;
  color: #b3ceca; margin-bottom: 20px;
}
.ds-step h3 {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.1rem; font-weight: 700;
  color: #f0f8f8; margin-bottom: 14px;
}
.ds-step p { font-size: 1.15rem; line-height: 1.7; color: rgba(240,248,248,0.52); }
.ds-step { border-top: 2px solid rgba(179,206,202,0.15); padding-top: 28px; }

/* ── Role / Access Cards ─────────────────────────────────── */
.ds-role-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 16px; max-width: 880px; margin: 0 auto;
}
.ds-role-card {
  background: #001e24;
  border: 1px solid rgba(179,206,202,0.12);
  border-radius: 14px; padding: 28px;
  transition: border-color 0.2s;
}
.ds-role-card:hover { border-color: rgba(179,206,202,0.3); }
.ds-role-ghost {
  border-style: dashed; background: transparent;
  border-color: rgba(179,206,202,0.08);
}
.ds-role-top { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 22px; }
.ds-role-icon { font-size: 1.3rem; color: #b3ceca; flex-shrink: 0; }
.ds-role-top h3 {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.9rem; font-weight: 700;
  color: #f0f8f8; margin-bottom: 6px;
}
.ds-role-top p { font-size: 1.05rem; line-height: 1.6; color: rgba(240,248,248,0.45); }
.ds-role-actions { display: flex; flex-direction: column; gap: 10px; }

.ds-btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 16px;
  background: #f0f8f8; color: #001e24;
  font-family: 'Inter', sans-serif; font-size: 0.88rem; font-weight: 600;
  border: none; border-radius: 7px; cursor: pointer;
  transition: opacity 0.18s;
}
.ds-btn-google:hover { opacity: 0.9; }
.ds-btn-email {
  width: 100%; padding: 10px 16px; background: transparent;
  color: rgba(240,248,248,0.55); font-family: 'Inter', sans-serif;
  font-size: 0.85rem; border: 1px solid rgba(179,206,202,0.18);
  border-radius: 7px; cursor: pointer; transition: border-color 0.18s, color 0.18s;
}
.ds-btn-email:hover { border-color: rgba(179,206,202,0.4); color: #f0f8f8; }
.ds-btn-ghost-role {
  width: 100%; padding: 11px 16px; background: transparent;
  color: rgba(240,248,248,0.35); font-family: 'Roboto Mono', monospace;
  font-size: 0.78rem; letter-spacing: 0.05em;
  border: 1px dashed rgba(179,206,202,0.12);
  border-radius: 7px; cursor: pointer; transition: color 0.18s, border-color 0.18s;
}
.ds-btn-ghost-role:hover { color: #b3ceca; border-color: rgba(179,206,202,0.3); }

/* ── Memorial Search ─────────────────────────────────────── */
.ds-search-wrap { display: flex; flex-direction: column; gap: 10px; }
#memorial-search-input {
  width: 100%; padding: 11px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(179,206,202,0.2);
  border-radius: 7px; color: #f0f8f8;
  font-family: 'Inter', sans-serif; font-size: 0.88rem;
  outline: none; transition: border-color 0.18s;
}
#memorial-search-input::placeholder { color: rgba(240,248,248,0.25); }
#memorial-search-input:focus { border-color: #b3ceca; }
.ds-btn-find {
  width: 100%; padding: 11px 16px; background: #b3ceca; color: #001e24;
  font-family: 'Roboto Mono', monospace; font-size: 0.8rem; font-weight: 700;
  border: none; border-radius: 7px; cursor: pointer; transition: opacity 0.18s;
}
.ds-btn-find:hover { opacity: 0.85; }
.ds-search-results {
  background: #001e24; border: 1px solid rgba(179,206,202,0.15);
  border-radius: 8px; overflow: hidden; max-height: 200px; overflow-y: auto;
}
.ds-search-results.hidden { display: none; }
.ds-search-result {
  padding: 12px 14px; border-bottom: 1px solid rgba(179,206,202,0.06);
  cursor: pointer; transition: background 0.15s;
}
.ds-search-result:last-child { border-bottom: none; }
.ds-search-result:hover { background: rgba(179,206,202,0.07); }
.ds-sr-name { font-size: 0.9rem; font-weight: 600; color: #f0f8f8; margin-bottom: 2px; }
.ds-sr-dates { font-size: 0.75rem; color: rgba(240,248,248,0.35); font-family: 'Roboto Mono', monospace; }
.ds-search-msg { padding: 14px; font-size: 0.85rem; color: rgba(240,248,248,0.4); text-align: center; font-style: italic; }

/* ── FAQ ─────────────────────────────────────────────────── */
.ds-faq { border: 1px solid rgba(179,206,202,0.1); border-radius: 14px; overflow: hidden; }
.ds-faq-item { border-bottom: 1px solid rgba(179,206,202,0.08); }
.ds-faq-item:last-child { border-bottom: none; }
.ds-faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 28px; background: none; border: none;
  color: #f0f8f8; font-family: 'Inter', sans-serif; font-size: 1rem; font-weight: 500;
  text-align: left; cursor: pointer; transition: color 0.18s;
}
.ds-faq-q:hover { color: #b3ceca; }
.ds-faq-icon { font-size: 1.4rem; color: #b3ceca; flex-shrink: 0; transition: transform 0.25s; }
.ds-faq-a {
  font-size: 1.05rem; line-height: 1.75; color: rgba(240,248,248,0.55);
  padding: 0 28px; max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.ds-faq-item.open .ds-faq-a { max-height: 400px; padding: 0 28px 22px; font-size: 1.1rem !important; line-height: 1.75 !important; }
.ds-faq-item.open .ds-faq-icon { transform: rotate(45deg); }

/* ── CTA Banner ──────────────────────────────────────────── */
.ds-cta {
  padding: 120px 40px;
  background: linear-gradient(160deg, #001e24 0%, #003040 100%);
  border-top: 1px solid rgba(179,206,202,0.08);
  text-align: center;
}
.ds-cta-inner { max-width: 640px; margin: 0 auto; }
.ds-cta-headline {
  font-family: 'Roboto Mono', monospace;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700; color: #f0f8f8;
  margin-bottom: 18px; letter-spacing: -0.01em;
}
.ds-cta-sub {
  font-size: 1.02rem; color: rgba(240,248,248,0.52);
  margin-bottom: 44px; line-height: 1.65;
}

/* ── Footer ──────────────────────────────────────────────── */
.ds-footer { background: #00141a; border-top: 1px solid rgba(179,206,202,0.08); padding: 64px 40px; }
.ds-footer-inner { max-width: 1200px; margin: 0 auto; text-align: center; }
.ds-footer-logo {
  font-family: 'Roboto Mono', monospace; font-size: 0.88rem;
  font-weight: 700; letter-spacing: 0.2em; color: #b3ceca;
  text-decoration: none; display: inline-block; margin-bottom: 10px;
}
.ds-footer-tag { font-size: 0.88rem; color: rgba(240,248,248,0.3); font-style: italic; margin-bottom: 28px; }
.ds-footer-divider { height: 1px; background: rgba(179,206,202,0.07); margin-bottom: 24px; }
.ds-footer-copy { font-size: 0.74rem; color: rgba(240,248,248,0.2); font-family: 'Roboto Mono', monospace; letter-spacing: 0.05em; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .ds-hero { padding: 72px 24px 0; }
  .ds-hero-screen { padding: 0 24px; }
  .ds-feature-grid { grid-template-columns: 1fr; }
  .ds-serve-row { grid-template-columns: 1fr; gap: 32px; }
  .ds-serve-row-flip .ds-serve-left { order: 0; }
  .ds-serve-row-flip .ds-serve-img-wrap { order: 0; }
  .ds-screen-sidebar { width: 140px; }
}
@media (max-width: 768px) {
  .ds-nav-center { display: none; }
  .ds-nav-auth-btns { gap: 6px; }
  .ds-nav-signin, .ds-nav-signup { height: 32px; padding: 0 14px; font-size: 0.78rem; }
  .ds-steps { grid-template-columns: 1fr; gap: 32px; }
  .ds-role-grid { grid-template-columns: 1fr; }
  .ds-section { padding: 80px 24px; }
  .ds-hero-headline { font-size: 2.6rem; }
  .ds-hero-actions { flex-direction: column; align-items: center; }
  .ds-screen-sidebar { display: none; }
  .ds-hero-sub br { display: none; }
  .ds-partners-reel { gap: 32px; padding-right: 32px; }
  .ds-partner-logo { font-size: 0.85rem; }
  .ds-mem-photos { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .ds-hero-headline { font-size: 2rem; letter-spacing: -0.01em; }
  .ds-section { padding: 64px 20px; }
  .ds-nav-inner { padding: 0 20px; }
  .ds-hero-cta-row { gap: 8px; }
  .ds-hero-cta-row .ds-btn-outline { font-size: 0.85rem; }
  .ds-partner-logo { font-size: 0.78rem; }
  .ds-partners-reel { gap: 24px; padding-right: 24px; }
  .ds-mem-photos img { border-radius: 4px; }
}

/* ============================================================
   HOMEPAGE v5 — Header fixes, primary color, scrolling trust
   ============================================================ */

/* ── Override: all section headlines = primary color, max 2 lines ── */
.ds-hero-headline,
.ds-section-headline,
.ds-cta-headline {
  color: #b3ceca;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Hero headline stays large but capped at 2 lines */
.ds-hero-headline {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.12;
  margin-bottom: 24px;
}

/* Section headlines — tighter, 2-line safe size */
.ds-section-headline {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.18;
  margin-bottom: 16px;
}

/* CTA headline */
.ds-cta-headline {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.18;
  margin-bottom: 16px;
}

/* ── Uniform body text ─────────────────────────────────────── */
.ds-hero-sub,
.ds-section-sub,
.ds-feature-caption p,
.ds-cta-sub {
  font-size: 1.05rem;
  line-height: 1.72;
  color: rgba(240, 248, 248, 0.55);
}

/* Who We Serve, How It Works, Access — larger body text */
.ds-serve-left p { font-size: 1.15rem; line-height: 1.72; color: rgba(240,248,248,0.55); }
.ds-step p       { font-size: 1.15rem; line-height: 1.72; color: rgba(240,248,248,0.55); }
.ds-role-top p   { font-size: 1.05rem; line-height: 1.6;  color: rgba(240,248,248,0.55); }
.ds-faq-a        { font-size: 1.05rem; line-height: 1.75; color: rgba(240,248,248,0.55); }

/* Hero sub */
.ds-hero-sub {
  font-size: 1.1rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 40px;
}

/* Section headings within cards */
.ds-feature-caption h3,
.ds-serve-left h3,
.ds-step h3,
.ds-role-top h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f0f8f8;
  margin-bottom: 10px;
  font-family: 'Roboto Mono', monospace;
}

/* Small labels */
.ds-step-num,
.ds-serve-num,
.ds-hero-badge {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: #b3ceca;
}
.ds-label {
  font-size: 1rem;
  letter-spacing: 0.18em;
  color: #b3ceca;
}

/* ── Scrolling Trust Banner ────────────────────────────────── */
.ds-trust {
  overflow: hidden;
  border-top: 1px solid rgba(179, 206, 202, 0.08);
  border-bottom: 1px solid rgba(179, 206, 202, 0.08);
  padding: 18px 0;
  background: rgba(0, 20, 26, 0.6);
  /* remove old styles */
  display: block;
}

.ds-trust-track {
  display: flex;
  width: max-content;
  animation: ds-marquee 32s linear infinite;
}

.ds-trust-track:hover {
  animation-play-state: paused;
}

@keyframes ds-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ds-trust-reel {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 28px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ds-trust-item {
  font-size: 0.84rem;
  color: rgba(240, 248, 248, 0.38);
  letter-spacing: 0.02em;
  font-family: 'Inter', sans-serif;
}

.ds-trust-sep {
  color: #b3ceca;
  opacity: 0.3;
  font-size: 0.6rem;
}

/* Remove old static trust styles */
.ds-trust-inner,
.ds-trust-label,
.ds-trust-dot {
  display: none;
}


/* ============================================================
   AUTH PAGE — Sign In / Sign Up (signin.js)
   ============================================================ */

.auth-page {
  min-height: 100vh;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  position: relative;
}

.auth-back {
  position: absolute;
  top: 24px;
  left: 28px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: rgba(240, 248, 248, 0.45);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.auth-back:hover { color: var(--warm-white); }

.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(0, 30, 36, 0.85);
  border: 1px solid rgba(179, 206, 202, 0.12);
  border-radius: 16px;
  padding: 40px 36px 36px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

/* Logo */
.auth-logo {
  font-family: 'Roboto Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #b3ceca;
  text-align: center;
  margin-bottom: 28px;
  cursor: pointer;
}

/* Role toggle */
.auth-role-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(179, 206, 202, 0.1);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  margin-bottom: 16px;
}

.auth-role-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: rgba(240, 248, 248, 0.5);
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 7px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}
.auth-role-btn.active {
  background: rgba(179, 206, 202, 0.14);
  color: #b3ceca;
}
.auth-role-btn:hover:not(.active) {
  color: rgba(240, 248, 248, 0.75);
}

/* Sign in / Create account tabs */
.auth-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid rgba(179, 206, 202, 0.1);
  margin-bottom: 24px;
}

.auth-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: rgba(240, 248, 248, 0.45);
  font-family: 'Inter', sans-serif;
  font-size: 0.84rem;
  font-weight: 500;
  padding: 8px 14px 10px;
  cursor: pointer;
  transition: all 0.18s;
}
.auth-tab.active {
  color: #b3ceca;
  border-bottom-color: #b3ceca;
}
.auth-tab:hover:not(.active) {
  color: rgba(240, 248, 248, 0.75);
}

/* Heading */
.auth-heading {
  margin-bottom: 22px;
}
.auth-heading h1 {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--warm-white);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.auth-heading p {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: rgba(240, 248, 248, 0.5);
  margin: 0;
  line-height: 1.5;
}

/* ── Social Sign-In Stack ──────────────────────────────── */
.auth-social-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.auth-social-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(179, 206, 202, 0.15);
  border-radius: 8px;
  color: var(--warm-white, #f0f8f8);
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 11px 16px;
  cursor: pointer;
  transition: all 0.18s;
  position: relative;
}
.auth-social-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(179, 206, 202, 0.3);
}
.auth-social-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.auth-social-apple svg { color: #fff; }
.auth-social-soon {
  position: absolute;
  right: 14px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(179, 206, 202, 0.5);
  font-weight: 600;
}

/* ── Role Picker (Sign Up step 1) ───────────────────────── */
.auth-picker-wrap {
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 60px;
  text-align: center;
}
.auth-picker-wrap .auth-logo { cursor: pointer; margin-bottom: 40px; }
.auth-picker-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--warm-white, #f0f8f8);
  margin-bottom: 8px;
}
.auth-picker-sub {
  color: rgba(240,248,248,0.5);
  font-size: 0.95rem;
  margin-bottom: 36px;
}
.auth-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.auth-picker-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(179,206,202,0.1);
  border-radius: 14px;
  padding: 28px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.25s, transform 0.2s, background 0.25s;
  color: var(--warm-white, #f0f8f8);
  font-family: inherit;
}
.auth-picker-card:hover {
  border-color: rgba(179,206,202,0.35);
  background: rgba(179,206,202,0.06);
  transform: translateY(-3px);
}
.auth-picker-icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(179,206,202,0.08);
  border-radius: 50%;
  margin-bottom: 16px;
  color: #b3ceca;
}
.auth-picker-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--warm-white, #f0f8f8);
}
.auth-picker-card p {
  font-size: 0.8rem;
  color: rgba(240,248,248,0.5);
  line-height: 1.45;
  margin-bottom: 14px;
  min-height: 50px;
}
.auth-picker-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  width: 100%;
  text-align: left;
}
.auth-picker-card ul li {
  font-size: 0.75rem;
  color: rgba(240,248,248,0.45);
  padding: 4px 0 4px 16px;
  position: relative;
}
.auth-picker-card ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #b3ceca;
  font-size: 0.7rem;
}
.auth-picker-cta {
  margin-top: auto;
  font-size: 0.82rem;
  font-weight: 600;
  color: #b3ceca;
  letter-spacing: 0.02em;
}
.auth-picker-card:hover .auth-picker-cta { text-decoration: underline; }
.auth-picker-card-guest {
  border-style: dashed;
}
.auth-picker-signin {
  font-size: 0.85rem;
  color: rgba(240,248,248,0.4);
}
.auth-picker-signin a { color: #b3ceca; text-decoration: none; }
.auth-picker-signin a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .auth-picker-grid { grid-template-columns: repeat(2, 1fr); }
  .auth-picker-title { font-size: 1.5rem; }
}
@media (max-width: 480px) {
  .auth-picker-grid { grid-template-columns: 1fr; max-width: 340px; margin-left: auto; margin-right: auto; }
}

/* Google button (legacy) */
.auth-google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(179, 206, 202, 0.15);
  border-radius: 8px;
  color: var(--warm-white);
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 11px 16px;
  cursor: pointer;
  transition: all 0.18s;
  margin-bottom: 16px;
}
.auth-google-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(179, 206, 202, 0.3);
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(179, 206, 202, 0.1);
}
.auth-divider span {
  font-family: 'Inter', sans-serif;
  font-size: 0.76rem;
  color: rgba(240, 248, 248, 0.3);
  white-space: nowrap;
}

/* Form fields */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-field label {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(240, 248, 248, 0.6);
  letter-spacing: 0.02em;
}

.auth-field input,
.auth-field select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(179, 206, 202, 0.14);
  border-radius: 8px;
  color: var(--warm-white);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  padding: 10px 13px;
  outline: none;
  transition: border-color 0.18s, background 0.18s;
  -webkit-appearance: none;
}
.auth-field input::placeholder {
  color: rgba(240, 248, 248, 0.25);
}
.auth-field input:focus,
.auth-field select:focus {
  border-color: rgba(179, 206, 202, 0.45);
  background: rgba(255, 255, 255, 0.08);
}
.auth-field select option {
  background: #001e24;
  color: var(--warm-white);
}

/* Password field with show/hide */
.auth-pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-pw-wrap input {
  flex: 1;
  padding-right: 56px;
}
.auth-pw-toggle {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: rgba(179, 206, 202, 0.55);
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 6px;
  transition: color 0.18s;
}
.auth-pw-toggle:hover { color: #b3ceca; }

/* Submit button */
.auth-submit {
  width: 100%;
  background: #b3ceca;
  border: none;
  border-radius: 8px;
  color: var(--navy);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 12px 16px;
  cursor: pointer;
  margin-top: 4px;
  transition: opacity 0.18s, transform 0.12s;
  letter-spacing: 0.01em;
}
.auth-submit:hover { opacity: 0.88; }
.auth-submit:active { transform: scale(0.99); }
.auth-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Switch links */
.auth-switch {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: rgba(240, 248, 248, 0.45);
  text-align: center;
  margin-top: 16px;
  margin-bottom: 0;
}
.auth-switch a {
  color: #b3ceca;
  text-decoration: none;
  font-weight: 500;
}
.auth-switch a:hover { text-decoration: underline; }

/* Optional label */
.auth-optional {
  color: rgba(240, 248, 248, 0.3);
  font-weight: 400;
  font-size: 0.74rem;
}

/* Terms copy */
.auth-terms {
  font-family: 'Inter', sans-serif;
  font-size: 0.74rem;
  color: rgba(240, 248, 248, 0.28);
  text-align: center;
  margin-top: 14px;
  margin-bottom: 0;
  line-height: 1.55;
}

/* Mobile */
@media (max-width: 480px) {
  .auth-card {
    padding: 32px 22px 28px;
    border-radius: 12px;
  }
  .auth-back {
    top: 16px;
    left: 16px;
  }
}

/* Google SDK rendered button wrapper */
.auth-google-btn-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  min-height: 44px;
}
.auth-google-btn-wrap iframe {
  border-radius: 8px !important;
}

/* Hero email capture form */
.ds-hero-email {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  max-width: 480px;
}
.ds-hero-email input {
  flex: 1;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(179,206,202,0.2);
  border-radius: 8px;
  color: var(--warm-white);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  padding: 11px 16px;
  outline: none;
  transition: border-color 0.18s;
}
.ds-hero-email input::placeholder { color: rgba(240,248,248,0.35); }
.ds-hero-email input:focus { border-color: rgba(179,206,202,0.5); }
@media (max-width: 560px) {
  .ds-hero-email { flex-direction: column; }
  .ds-hero-email input { width: 100%; }
}

/* ── Hero: buttons side by side ─────────────────────────── */
.ds-hero-email {
  margin-bottom: 14px;
}
.ds-hero-email input {
  width: 100%;
  max-width: 420px;
}

/* ── Hero screen → trust bar spacing ────────────────────── */
.ds-hero-screen {
  margin-bottom: 0;
  padding-bottom: 56px;
}

/* ── Memorial page mockup ────────────────────────────────── */
.ds-memorial-body {
  background: #0d2a2e;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
}
.ds-mem-header {
  background: rgba(0,0,0,0.2);
  padding: 10px 20px;
  border-bottom: 1px solid rgba(179,206,202,0.1);
}
.ds-mem-nav {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #b3ceca;
}
.ds-mem-profile {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px 12px;
}
.ds-mem-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(179,206,202,0.3);
  flex-shrink: 0;
}
.ds-mem-identity { flex: 1; }
.ds-mem-name {
  font-size: 1rem;
  font-weight: 700;
  color: #f0f8f8;
  margin: 0 0 3px;
  font-family: 'Roboto Mono', monospace;
}
.ds-mem-dates {
  font-size: 0.72rem;
  color: rgba(179,206,202,0.7);
  margin: 0 0 5px;
  letter-spacing: 0.03em;
}
.ds-mem-tagline {
  font-size: 0.72rem;
  color: rgba(240,248,248,0.45);
  margin: 0;
  font-style: italic;
  line-height: 1.4;
}
.ds-mem-bio {
  padding: 0 24px 14px;
  font-size: 0.72rem;
  color: rgba(240,248,248,0.6);
  line-height: 1.65;
  border-bottom: 1px solid rgba(179,206,202,0.08);
}
.ds-mem-bio p { margin: 0; }
.ds-mem-photos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 14px 24px 20px;
}
.ds-mem-photos img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

/* ── Memorial Carousel ──────────────────────────────────── */
.ds-carousel-viewport {
  overflow: hidden;
  position: relative;
}
.ds-carousel-track {
  position: relative;
  min-height: 340px;
}
.ds-carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.ds-carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
}
.ds-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 16px 0 8px;
}
.ds-carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(179,206,202,0.4);
  background: transparent;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s;
  padding: 0;
}
.ds-carousel-dot.active {
  background: #b3ceca;
  border-color: #b3ceca;
}
.ds-carousel-dot:hover { border-color: #b3ceca; }

/* ── Partner Logo Bar ──────────────────────────────────── */
.ds-partners {
  padding: 40px 0 32px;
  text-align: center;
  border-bottom: 1px solid rgba(179,206,202,0.06);
  overflow: hidden;
}
.ds-partners-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(179,206,202,0.45);
  margin: 0 0 24px;
  font-weight: 500;
}
.ds-partners-track {
  display: flex;
  width: max-content;
  animation: partnerScroll 30s linear infinite;
}
.ds-partners-reel {
  display: flex;
  gap: 48px;
  padding-right: 48px;
  flex-shrink: 0;
}
.ds-partner-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(240,248,248,0.35);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.ds-partner-icon {
  font-size: 1.1rem;
  opacity: 0.5;
}
@keyframes partnerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── NFC/QR Onboarding Carousel ────────────────────────── */
.ds-nfc-carousel {
  max-width: 700px;
  margin: 0 auto;
}
.ds-nfc-steps {
  position: relative;
  min-height: 280px;
}
.ds-nfc-step {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 40px;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
  transform: translateY(12px);
  pointer-events: none;
  cursor: pointer;
}
.ds-nfc-step.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
}
.ds-nfc-visual {
  flex-shrink: 0;
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ds-nfc-icon-large {
  position: relative;
  color: #b3ceca;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ds-nfc-tap-ring {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px solid rgba(179,206,202,0.3);
  animation: nfcPulse 2s ease-out infinite;
}
@keyframes nfcPulse {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}
.ds-nfc-text { flex: 1; }
.ds-nfc-step-num {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(179,206,202,0.5);
  margin-bottom: 6px;
}
.ds-nfc-text h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #f0f8f8;
  margin: 0 0 10px;
}
.ds-nfc-text p {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(240,248,248,0.65);
  margin: 0;
}
.ds-nfc-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 20px 0 16px;
}
.ds-nfc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(179,206,202,0.4);
  background: transparent;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s;
  padding: 0;
}
.ds-nfc-dot.active {
  background: #b3ceca;
  border-color: #b3ceca;
}
.ds-nfc-dot:hover { border-color: #b3ceca; }
.ds-nfc-also {
  text-align: center;
  font-size: 0.85rem;
  color: rgba(240,248,248,0.4);
  margin-top: 8px;
}
.ds-nfc-also strong { color: rgba(240,248,248,0.6); }

@media (max-width: 580px) {
  .ds-nfc-step {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  .ds-nfc-visual {
    width: 100px;
    height: 100px;
  }
  .ds-nfc-icon-large svg { width: 48px; height: 48px; }
  .ds-nfc-tap-ring { width: 72px; height: 72px; }
  .ds-nfc-steps { min-height: 340px; }
  .ds-carousel-track { min-height: 360px; }
}

/* ── Homepage role card sign-in buttons: equal width ─────── */
.ds-role-card .ds-btn-google,
.ds-role-card .ds-btn-email {
  width: 100%;
  box-sizing: border-box;
}

/* ── Hero: single-row CTA (email + both buttons) ─────────── */
.ds-hero-cta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  flex-wrap: nowrap;
  margin-bottom: 72px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}
.ds-hero-cta-row input,
.ds-hero-cta-row .ds-btn-primary,
.ds-hero-cta-row .ds-btn-outline {
  height: 48px;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  border-radius: 8px;
}
.ds-hero-cta-row input {
  flex: 1;
  min-width: 0;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(179,206,202,0.2);
  color: var(--warm-white);
  padding: 0 16px;
  outline: none;
  transition: border-color 0.18s;
}
.ds-hero-cta-row .ds-btn-primary {
  padding: 0 28px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.ds-hero-cta-row .ds-btn-outline {
  padding: 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ds-hero-cta-row input::placeholder { color: rgba(240,248,248,0.35); }
.ds-hero-cta-row input:focus { border-color: rgba(179,206,202,0.5); }
.ds-hero-cta-row .ds-btn-primary,
.ds-hero-cta-row .ds-btn-outline {
  flex-shrink: 0;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .ds-hero-cta-row { flex-wrap: wrap; }
  .ds-hero-cta-row input { width: 100%; flex: none; }
  .ds-hero-cta-row .ds-btn-primary,
  .ds-hero-cta-row .ds-btn-outline { flex: 1; text-align: center; }
}

/* ── Memorial mockup: centered profile ───────────────────── */
.ds-mem-profile {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  gap: 8px !important;
  padding: 24px 24px 14px !important;
}
.ds-mem-name { text-align: center; }
.ds-mem-dates { text-align: center; }
.ds-mem-tagline { text-align: center; }
.ds-mem-bio { text-align: center; }

/* ── Role cards: push buttons to bottom so they align ────── */
.ds-role-card {
  display: flex !important;
  flex-direction: column !important;
}
.ds-role-actions {
  margin-top: auto !important;
}

/* ── Body text size boost: Who We Serve, How It Works, FAQ, Access ── */
.ds-serve-left p   { font-size: 1.15rem !important; line-height: 1.72; }
.ds-serve-left h3  { font-size: 1.25rem !important; }
.ds-step p         { font-size: 1.15rem !important; line-height: 1.72; }
.ds-step h3        { font-size: 1.2rem !important; }
.ds-faq-q          { font-size: 1.1rem !important; }
.ds-faq-a          { font-size: 1.05rem !important; line-height: 1.78; }
.ds-role-top p     { font-size: 1.05rem !important; line-height: 1.6; }
.ds-section-sub    { font-size: 1.1rem !important; line-height: 1.72; }

/* ============================================================
   AUTH NAV DROPDOWN
   ============================================================ */

.ds-nav-user {
  position: relative;
}

/* old circular avatar rule removed — pill style defined below */

.ds-nav-drop {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: #001e24;
  border: 1px solid rgba(179,206,202,0.2);
  border-radius: 10px;
  padding: 8px 0;
  z-index: 1000;
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.ds-nav-drop.open { display: block; }

.ds-nav-drop-header {
  padding: 12px 16px 10px;
}
.ds-nav-drop-name {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: #f0f8f8;
  letter-spacing: 0.03em;
}
.ds-nav-drop-email {
  font-size: 0.75rem;
  color: rgba(240,248,248,0.45);
  margin-top: 2px;
}

.ds-nav-drop-divider {
  height: 1px;
  background: rgba(179,206,202,0.15);
  margin: 6px 0;
}

.ds-nav-drop-item {
  display: block;
  width: 100%;
  padding: 9px 16px;
  font-size: 0.85rem;
  color: rgba(240,248,248,0.8);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}
.ds-nav-drop-item:hover {
  background: rgba(179,206,202,0.1);
  color: #f0f8f8;
}
.ds-nav-drop-signout {
  color: rgba(240,248,248,0.5);
}
.ds-nav-drop-signout:hover {
  color: #f0f8f8;
  background: rgba(179,206,202,0.1);
}

/* ============================================================
   FAMILY DASHBOARD
   ============================================================ */

.ds-family-dash {
  min-height: 100vh;
  background: var(--navy, #001e24);
  padding: 60px 24px 100px;
}
.ds-family-dash-inner {
  max-width: 1080px;
  margin: 0 auto;
}
.ds-family-dash-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 20px;
}
.ds-family-dash-title {
  font-family: 'Roboto Mono', monospace;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: #f0f8f8;
  margin-bottom: 6px;
}
.ds-family-dash-sub {
  font-size: 1rem;
  color: rgba(240,248,248,0.5);
}

.ds-family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.ds-family-card {
  background: rgba(179,206,202,0.06);
  border: 1px solid rgba(179,206,202,0.15);
  border-radius: 14px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.2s;
  position: relative;
}
.ds-family-card:hover { border-color: rgba(179,206,202,0.35); }

.ds-family-card-top { display: flex; }

.ds-badge {
  display: inline-block;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid currentColor;
}
.ds-badge-draft       { color: rgba(240,248,248,0.4); }
.ds-badge-review      { color: #f5c842; }
.ds-badge-building    { color: #b3ceca; }
.ds-badge-published   { color: #5dd98a; }
.ds-badge-archived    { color: rgba(240,248,248,0.25); }

.ds-family-card-photo-wrap {
  position: absolute;
  top: 20px;
  right: 20px;
}
.ds-family-card-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(179,206,202,0.2);
}
.ds-family-card-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(179,206,202,0.06);
  color: rgba(179,206,202,0.3);
}

/* ── Profile Photo Selector (Media step) ──────────────── */
.ds-profile-photo-selector {
  display: flex;
  justify-content: center;
}
.ds-profile-photo-circle {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px dashed rgba(179,206,202,0.3);
  overflow: visible;
  cursor: pointer;
  transition: border-color 0.2s;
}
.ds-profile-photo-circle .ds-profile-photo-img,
.ds-profile-photo-circle .ds-profile-photo-placeholder {
  border-radius: 50%;
  overflow: hidden;
}
.ds-profile-photo-circle:hover {
  border-color: rgba(179,206,202,0.6);
  border-style: solid;
}
.ds-profile-photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  gap: 4px;
  color: rgba(179,206,202,0.35);
}
.ds-profile-photo-placeholder span {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}
.ds-profile-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ds-profile-photo-edit {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #b3ceca;
  color: #001e24;
  border: 3px solid var(--surface-raised, #111c2e);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.ds-profile-photo-edit:hover { transform: scale(1.15); box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
.ds-profile-photo-edit svg { width: 16px; height: 16px; }
.ds-family-card-name {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: #f0f8f8;
}
.ds-family-card-dates, .ds-family-card-loc {
  font-size: 0.85rem;
  color: rgba(240,248,248,0.45);
  margin-top: 4px;
}

/* ── Card action buttons (family dashboard) ─────────────────── */
.ds-family-card-footer {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

/* Base style shared by all three */
.ds-card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-align: center;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  background: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
  white-space: nowrap;
}

/* View — seafoam filled */
.ds-card-btn-view {
  background: #b3ceca;
  color: #001e24;
  border-color: #b3ceca;
}
.ds-card-btn-view:hover { background: #9abfbb; border-color: #9abfbb; }

/* Edit — light outlined, warm white text */
.ds-card-btn-edit {
  background: rgba(240,248,248,0.08);
  color: #e0eeec;
  border-color: rgba(240,248,248,0.3);
}
.ds-card-btn-edit:hover {
  background: rgba(240,248,248,0.15);
  border-color: rgba(240,248,248,0.55);
  color: #f0f8f8;
}

/* Publish — green outlined */
.ds-card-btn-publish {
  background: rgba(42,122,91,0.1);
  color: #6ecba6;
  border-color: rgba(110,203,166,0.45);
}
.ds-card-btn-publish:hover {
  background: rgba(42,122,91,0.25);
  border-color: #6ecba6;
  color: #a8e6cb;
}
.ds-card-btn-publish:disabled { opacity: 0.4; cursor: not-allowed; }

/* Delete — subtle red danger button */
.ds-card-btn-delete {
  background: rgba(231,76,60,0.08);
  color: #e67e73;
  border-color: rgba(231,76,60,0.3);
}
.ds-card-btn-delete:hover {
  background: rgba(231,76,60,0.2);
  border-color: #e74c3c;
  color: #f5b7b1;
}

/* Disabled — greyed out, non-interactive */
.ds-card-btn-disabled {
  color: rgba(240,248,248,0.22);
  border-color: rgba(240,248,248,0.1);
  cursor: default;
  pointer-events: none;
}

/* Extra action row — Pair DigiKey & Print Obituary */
.ds-family-card-extras {
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
}
.ds-card-extra-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.ds-card-extra-btn:hover {
  background: rgba(179,206,202,0.25);
  border-color: var(--gold);
}
.ds-card-extra-btn svg {
  flex-shrink: 0;
}

/* Shared global sm buttons used outside cards */
.ds-btn-primary-sm {
  display: inline-block;
  padding: 10px 20px;
  background: #b3ceca;
  color: #001e24;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}
.ds-btn-primary-sm:hover { opacity: 0.85; }

.ds-btn-outline-sm {
  display: inline-block;
  padding: 10px 20px;
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}
.ds-btn-outline-sm:hover { background: var(--navy); color: var(--warm-white); }

.ds-btn-outline-light {
  display: inline-block;
  padding: 10px 22px;
  border: 1px solid rgba(179,206,202,0.4);
  color: #b3ceca;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: 8px;
  transition: border-color 0.15s, color 0.15s;
}
.ds-btn-outline-light:hover {
  border-color: #b3ceca;
  color: #f0f8f8;
}

.ds-family-empty {
  text-align: center;
  padding: 80px 24px;
  color: rgba(240,248,248,0.5);
}
.ds-family-empty-icon {
  font-size: 2.5rem;
  color: #b3ceca;
  margin-bottom: 24px;
}
.ds-family-empty h2 {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.4rem;
  color: #f0f8f8;
  margin-bottom: 12px;
}
.ds-family-empty p {
  font-size: 1rem;
  max-width: 440px;
  margin: 0 auto 28px;
  line-height: 1.7;
}

/* ============================================================
   VISITOR BROWSE PAGE
   ============================================================ */

.ds-browse {
  min-height: 100vh;
  background: var(--navy, #001e24);
  padding: 60px 24px 100px;
}
.ds-browse-inner {
  max-width: 1080px;
  margin: 0 auto;
}
.ds-browse-header {
  margin-bottom: 52px;
}
.ds-browse-title {
  font-family: 'Roboto Mono', monospace;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: #f0f8f8;
  margin: 12px 0 12px;
}
.ds-browse-sub {
  font-size: 1rem;
  color: rgba(240,248,248,0.5);
}

/* Search bar */
.ds-browse-search-wrap {
  margin-bottom: 32px;
}
.ds-browse-search {
  width: 100%;
  padding: 14px 20px;
  background: rgba(179,206,202,0.06);
  border: 1px solid rgba(179,206,202,0.15);
  border-radius: 12px;
  color: #f0f8f8;
  font-size: 15px;
  outline: none;
  transition: border-color .2s;
}
.ds-browse-search::placeholder { color: rgba(240,248,248,0.3); }
.ds-browse-search:focus { border-color: rgba(201,168,76,0.5); }

/* Section heading */
.ds-browse-section {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
}
.ds-browse-section-title {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: #f0f8f8;
}
.ds-browse-section-sub {
  font-size: 0.82rem;
  color: rgba(240,248,248,0.35);
}

/* ── Memorial Photo Grid ───────────────────────────────────── */
.ds-mem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
@media (max-width: 540px) {
  .ds-mem-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

.ds-mem-card {
  display: flex;
  flex-direction: column;
  background: rgba(179,206,202,0.05);
  border: 1px solid rgba(179,206,202,0.12);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  transition: border-color .2s, transform .15s, box-shadow .2s;
}
.ds-mem-card:hover {
  border-color: rgba(201,168,76,0.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

/* Photo area */
.ds-mem-card-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: rgba(26,39,68,0.6);
  overflow: hidden;
}
.ds-mem-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.ds-mem-card:hover .ds-mem-card-photo img {
  transform: scale(1.04);
}
.ds-mem-card-lock {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  z-index: 2;
}
.ds-mem-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: rgba(179,206,202,0.4);
  background: linear-gradient(145deg, rgba(26,39,68,0.8), rgba(0,30,36,0.9));
}

/* Info area */
.ds-mem-card-info {
  padding: 16px 16px 8px;
  flex: 1;
}
.ds-mem-card-name {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: #f0f8f8;
  margin-bottom: 6px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ds-mem-card-dates {
  font-size: 0.78rem;
  color: rgba(240,248,248,0.45);
  margin-bottom: 3px;
}
.ds-mem-card-loc {
  font-size: 0.78rem;
  color: rgba(201,168,76,0.6);
}

/* Action area */
.ds-mem-card-action {
  padding: 10px 16px 14px;
}
.ds-mem-card-btn {
  display: inline-block;
  font-size: 0.75rem;
  font-family: 'Roboto Mono', monospace;
  color: rgba(179,206,202,0.5);
  letter-spacing: 0.04em;
  transition: color .2s;
}
.ds-mem-card:hover .ds-mem-card-btn {
  color: #c9a84c;
}

/* Legacy old grid styles (kept for backward compat) */
.ds-browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.ds-browse-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(179,206,202,0.06);
  border: 1px solid rgba(179,206,202,0.15);
  border-radius: 14px;
  padding: 28px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.15s;
}
.ds-browse-card:hover {
  border-color: rgba(179,206,202,0.4);
  transform: translateY(-2px);
}
.ds-browse-card-icon { font-size: 1.2rem; color: #b3ceca; }
.ds-browse-card-name { font-family: 'Roboto Mono', monospace; font-size: 1.05rem; font-weight: 700; color: #f0f8f8; }
.ds-browse-card-dates, .ds-browse-card-loc { font-size: 0.85rem; color: rgba(240,248,248,0.45); }
.ds-browse-card-cta { margin-top: auto; font-size: 0.82rem; color: #b3ceca; font-family: 'Roboto Mono', monospace; letter-spacing: 0.04em; }

.ds-browse-empty {
  text-align: center;
  padding: 80px 24px;
  color: rgba(240,248,248,0.5);
}
.ds-browse-empty-icon {
  font-size: 2.5rem;
  color: #b3ceca;
  margin-bottom: 24px;
}
.ds-browse-empty h2 {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.4rem;
  color: #f0f8f8;
  margin-bottom: 12px;
}
.ds-browse-empty p {
  font-size: 1rem;
  max-width: 400px;
  margin: 0 auto 28px;
  line-height: 1.7;
}

/* Loading spinner */
.ds-loading-wrap {
  text-align: center;
  padding: 80px 24px;
  color: rgba(240,248,248,0.5);
  font-size: 0.95rem;
}
.ds-spinner {
  width: 32px; height: 32px;
  border: 2px solid rgba(179,206,202,0.2);
  border-top-color: #b3ceca;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Auth nav additions ─────────────────────────────────────── */
.ds-nav-drop-role {
  display: inline-block;
  margin-top: 5px;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b3ceca;
  background: rgba(179,206,202,0.12);
  border: 1px solid rgba(179,206,202,0.25);
  padding: 2px 8px;
  border-radius: 20px;
}

.ds-nav-avatar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border-radius: 24px;
  border: 1.5px solid rgba(179,206,202,0.3);
  background: rgba(179,206,202,0.08);
  transition: background 0.15s, border-color 0.15s;
}
.ds-nav-avatar:hover {
  background: rgba(179,206,202,0.18);
  border-color: rgba(179,206,202,0.55);
  opacity: 1;
}
.ds-nav-avatar-label {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  color: #f0f8f8;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.ds-nav-avatar-caret {
  font-size: 0.65rem;
  color: rgba(240,248,248,0.7);
  line-height: 1;
  transition: transform 0.2s;
}
.ds-nav-drop.open ~ * .ds-nav-avatar-caret,
.ds-nav-avatar[aria-expanded="true"] .ds-nav-avatar-caret {
  transform: rotate(180deg);
}

/* ============================================================
   SHARED PAGE SHELL
   ============================================================ */
.ds-page-shell {
  min-height: 100vh;
  background: var(--warm-white, #f0f8f8);
  color: var(--navy, #001e24);
}

/* ============================================================
   DIGIKEY PAGE — Redesigned
   ============================================================ */

/* ── Hero ──────────────────────────────────────────────── */
.dk-hero {
  padding: 120px 40px 60px;
  text-align: center;
  background: linear-gradient(180deg, #001e24 0%, #0a2f36 100%);
}
.dk-hero-inner { max-width: 680px; margin: 0 auto; }
.dk-hero-badge {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #b3ceca;
  border: 1px solid rgba(179,206,202,0.25);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
  font-weight: 600;
}
.dk-hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  color: #b3ceca;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}
.dk-hero-sub {
  font-size: 1.1rem;
  color: rgba(240,248,248,0.6);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
}

/* ── Sections ──────────────────────────────────────────── */
.dk-section { padding: 80px 40px; }
.dk-section-alt { background: rgba(179,206,202,0.04); }
.dk-section-inner { max-width: 1100px; margin: 0 auto; }
.dk-narrow { max-width: 700px; }
.dk-section-head { text-align: center; margin-bottom: 48px; }
.dk-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold, #c8a97e);
  font-weight: 600;
  margin-bottom: 10px;
}
.dk-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary, #f0f8f8);
  margin: 0;
}

/* ── Step Card Carousel ────────────────────────────────── */
.dk-carousel-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}
.dk-carousel-viewport {
  flex: 1;
  overflow: hidden;
}
.dk-carousel-track {
  display: flex;
  gap: 24px;
  padding: 40px 0;
  align-items: center;
  transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
  will-change: transform;
}
.dk-step-card {
  flex: 0 0 300px;
  background: var(--surface-raised, #111c2e);
  border: 1px solid rgba(179,206,202,0.06);
  border-radius: 16px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform: scale(0.78);
  opacity: 0.3;
  transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1),
              opacity 0.5s ease,
              border-color 0.3s ease,
              box-shadow 0.5s ease;
}
.dk-step-card.active {
  transform: scale(1);
  opacity: 1;
  border-color: rgba(179,206,202,0.35);
  box-shadow: 0 0 60px rgba(179,206,202,0.1), 0 12px 40px rgba(0,0,0,0.35);
}
.dk-step-card:hover:not(.active) {
  opacity: 0.45;
}
.dk-step-icon-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.dk-step-icon {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b3ceca;
  background: rgba(179,206,202,0.08);
  border-radius: 50%;
}
.dk-step-icon-pulse { overflow: visible; }
.dk-pulse-ring {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid rgba(179,206,202,0.25);
  animation: dkPulse 2s ease-out infinite;
}
@keyframes dkPulse {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.6); opacity: 0; }
}
.dk-step-num {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold, #c8a97e);
  opacity: 0.7;
}
.dk-step-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary, #f0f8f8);
  margin: 0 0 8px;
}
.dk-step-desc {
  font-size: 0.85rem;
  color: var(--text-secondary, rgba(240,248,248,0.55));
  line-height: 1.65;
  margin: 0 0 20px;
}

/* Step visual mini-illustrations */
.dk-step-visual {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: auto;
}
.dk-step-mockup {
  width: 120px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(179,206,202,0.1);
}
.dk-mock-bar {
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  background: rgba(0,0,0,0.3);
}
.dk-mock-bar span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(179,206,202,0.3);
}
.dk-mock-body {
  padding: 12px;
  background: rgba(179,206,202,0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.dk-mock-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(179,206,202,0.15);
}
.dk-mock-line {
  height: 4px;
  border-radius: 2px;
  background: rgba(179,206,202,0.12);
}
.dk-mock-line-lg { width: 80%; }
.dk-mock-line-sm { width: 55%; }
.dk-mock-grid {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}
.dk-mock-grid div {
  width: 28px;
  height: 22px;
  border-radius: 3px;
  background: rgba(179,206,202,0.1);
}
.dk-product-mini-grid {
  display: flex;
  gap: 12px;
}
.dk-product-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border: 1px solid rgba(179,206,202,0.1);
  border-radius: 8px;
  background: rgba(179,206,202,0.04);
}
.dk-pmini-icon { font-size: 20px; color: #b3ceca; }
.dk-product-mini span { font-size: 10px; color: rgba(240,248,248,0.5); font-weight: 500; }

.dk-tap-demo {
  display: flex;
  align-items: center;
  gap: 16px;
  color: rgba(179,206,202,0.5);
}
.dk-tap-phone { opacity: 0.6; }
.dk-tap-waves { display: flex; flex-direction: column; gap: 4px; }
.dk-tap-wave {
  width: 20px;
  height: 2px;
  background: rgba(179,206,202,0.3);
  border-radius: 2px;
  animation: dkWave 1.5s ease-in-out infinite;
}
@keyframes dkWave {
  0%, 100% { opacity: 0.2; transform: scaleX(0.6); }
  50% { opacity: 0.8; transform: scaleX(1); }
}
.dk-tap-tag { opacity: 0.5; }

.dk-share-demo { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dk-share-avatars { display: flex; }
.dk-share-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(179,206,202,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: rgba(240,248,248,0.5);
  margin-left: -4px;
  border: 2px solid var(--surface-raised, #111c2e);
}
.dk-share-av:first-child { margin-left: 0; }
.dk-share-av-plus { background: rgba(200,169,126,0.15); color: var(--gold, #c8a97e); }
.dk-share-line { width: 40px; height: 1px; background: rgba(179,206,202,0.1); }
.dk-share-note { font-size: 10px; color: rgba(240,248,248,0.35); margin: 0; }

/* Carousel arrows */
.dk-carousel-arrow {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(179,206,202,0.15);
  background: rgba(255,255,255,0.03);
  color: #b3ceca;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}
.dk-carousel-arrow:hover { background: rgba(179,206,202,0.1); }

/* Carousel dots */
.dk-carousel-dots { display: flex; justify-content: center; gap: 10px; padding: 24px 0 8px; }
.dk-dot {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1.5px solid rgba(179,206,202,0.3);
  background: transparent; cursor: pointer; padding: 0;
  transition: background 0.3s, border-color 0.3s;
}
.dk-dot.active { background: #b3ceca; border-color: #b3ceca; }
.dk-dot:hover { border-color: #b3ceca; }

.dk-qr-note { text-align: center; font-size: 0.85rem; color: var(--text-muted, rgba(240,248,248,0.35)); margin-top: 12px; }
.dk-qr-note strong { color: var(--text-secondary, rgba(240,248,248,0.55)); }

/* ── Products ──────────────────────────────────────────── */
.dk-products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.dk-product-card {
  position: relative;
  background: var(--surface-raised, #111c2e);
  border: 1px solid rgba(179,206,202,0.08);
  border-radius: 16px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s, transform 0.3s;
}
.dk-product-card:hover { border-color: rgba(179,206,202,0.2); transform: translateY(-4px); }
.dk-product-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 160px;
  background: rgba(179,206,202,0.04);
  border: 2px dashed rgba(179,206,202,0.15);
  border-radius: 12px;
  margin-bottom: 20px;
  color: rgba(179,206,202,0.3);
}
.dk-product-img-placeholder svg { opacity: 0.35; stroke: rgba(179,206,202,0.5); }
.dk-product-img-placeholder span { font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; }
.dk-product-featured { border-color: var(--gold-border, rgba(200,169,126,0.3)); }
.dk-product-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--gold, #c8a97e); color: #001e24;
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; padding: 4px 14px; border-radius: 12px;
}
.dk-product-top { margin-bottom: 20px; }
.dk-product-icon { font-size: 28px; color: #b3ceca; margin-bottom: 14px; }
.dk-product-top h3 { font-size: 1.15rem; font-weight: 700; color: var(--text-primary, #f0f8f8); margin: 0 0 8px; }
.dk-product-top p { font-size: 0.85rem; color: var(--text-secondary, rgba(240,248,248,0.55)); line-height: 1.6; margin: 0; }
.dk-product-specs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.dk-product-specs span { font-size: 0.7rem; color: rgba(179,206,202,0.5); background: rgba(179,206,202,0.06); padding: 3px 10px; border-radius: 4px; font-weight: 500; }
.dk-product-bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dk-product-price { font-size: 1.6rem; font-weight: 700; color: var(--text-primary, #f0f8f8); }
.dk-product-price span { font-size: 0.8rem; font-weight: 400; color: var(--text-muted, rgba(240,248,248,0.35)); }
.dk-order-btn { flex-shrink: 0; }

/* ── Bulk CTA ──────────────────────────────────────────── */
.dk-bulk-card {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding: 40px; border: 1px solid rgba(179,206,202,0.1); border-radius: 16px;
  background: rgba(179,206,202,0.04);
}
.dk-bulk-text h2 { font-size: 1.4rem; font-weight: 700; color: var(--text-primary, #f0f8f8); margin: 0 0 8px; }
.dk-bulk-text p { font-size: 0.9rem; color: var(--text-secondary, rgba(240,248,248,0.55)); line-height: 1.6; margin: 0; max-width: 500px; }

/* ── FAQ ───────────────────────────────────────────────── */
.dk-faq { display: flex; flex-direction: column; gap: 8px; }
.dk-faq-item { border: 1px solid rgba(179,206,202,0.08); border-radius: 10px; overflow: hidden; transition: border-color 0.2s; }
.dk-faq-item:hover { border-color: rgba(179,206,202,0.15); }
.dk-faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; background: none; border: none; color: var(--text-primary, #f0f8f8);
  font-size: 0.95rem; font-weight: 600; cursor: pointer; text-align: left;
}
.dk-faq-icon { font-size: 1.2rem; color: var(--gold, #c8a97e); transition: transform 0.2s; }
.dk-faq-a {
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 20px; font-size: 0.88rem; color: var(--text-secondary, rgba(240,248,248,0.55)); line-height: 1.7;
}
.dk-faq-item.open .dk-faq-a { max-height: 200px; padding: 0 20px 16px; }
.dk-faq-item.open .dk-faq-icon { transform: rotate(45deg); }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
  .dk-hero { padding: 100px 24px 48px; }
  .dk-hero-title { font-size: 2.4rem; }
  .dk-section { padding: 60px 24px; }
  .dk-products { grid-template-columns: 1fr; }
  .dk-bulk-card { flex-direction: column; text-align: center; padding: 32px 24px; }
  .dk-step-card { flex: 0 0 260px; }
  .dk-carousel-arrow { display: none; }
}
@media (max-width: 480px) {
  .dk-hero-title { font-size: 2rem; }
  .dk-hero-sub { font-size: 0.95rem; }
  .dk-step-card { flex: 0 0 240px; padding: 24px 18px; }
}

/* ============================================================
   OLD DIGIKEY STYLES (legacy compat)
   ============================================================ */
.ds-digikey-hero {
  background: var(--navy, #001e24);
  padding: 80px 0 70px;
  text-align: center;
}
.ds-digikey-hero-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px;
}
.ds-digikey-hero-title {
  font-family: 'Roboto Mono', monospace;
  font-size: 3rem;
  color: #f0f8f8;
  margin: 12px 0 16px;
  letter-spacing: -0.02em;
}
.ds-digikey-hero-sub {
  font-size: 1.05rem;
  color: rgba(240,248,248,0.7);
  line-height: 1.65;
}
.ds-digikey-section {
  padding: 64px 0;
}
.ds-digikey-section-alt {
  background: #e6f0ef;
}
.ds-digikey-section-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
}
.ds-digikey-section-title {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.4rem;
  color: var(--navy, #001e24);
  margin-bottom: 36px;
  letter-spacing: -0.01em;
}
.ds-digikey-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}
.ds-digikey-step {
  padding: 28px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(0,30,36,0.08);
}
.ds-digikey-step-num {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.6rem;
  color: #b3ceca;
  font-weight: 700;
  margin-bottom: 12px;
}
.ds-digikey-step h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--navy);
}
.ds-digikey-step p { font-size: 0.9rem; color: #4a6067; line-height: 1.6; }

.ds-digikey-products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.ds-digikey-product {
  background: #fff;
  border: 1.5px solid rgba(0,30,36,0.1);
  border-radius: 14px;
  padding: 32px 28px;
  position: relative;
}
.ds-digikey-product-featured {
  border-color: #b3ceca;
  box-shadow: 0 0 0 3px rgba(179,206,202,0.25);
}
.ds-digikey-product-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #b3ceca;
  color: var(--navy);
  font-family: 'Roboto Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  white-space: nowrap;
}
.ds-digikey-product-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  color: #b3ceca;
}
.ds-digikey-product h3 {
  font-family: 'Roboto Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}
.ds-digikey-product-desc {
  font-size: 0.88rem;
  color: #4a6067;
  line-height: 1.6;
  margin-bottom: 16px;
}
.ds-digikey-product-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.ds-digikey-product-specs span {
  font-size: 0.72rem;
  background: #e6f0ef;
  color: var(--navy);
  padding: 3px 10px;
  border-radius: 20px;
  font-family: 'Roboto Mono', monospace;
}
.ds-digikey-product-price {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
}
.ds-digikey-price-period {
  font-size: 0.85rem;
  font-weight: 400;
  color: #7a9a9e;
}
.ds-digikey-cta { width: 100%; text-align: center; cursor: pointer; }

.ds-digikey-bulk {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  background: var(--navy);
  border-radius: 16px;
  padding: 40px;
}
.ds-digikey-bulk-text h2 {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.2rem;
  color: #f0f8f8;
  margin-bottom: 8px;
}
.ds-digikey-bulk-text p {
  font-size: 0.9rem;
  color: rgba(240,248,248,0.65);
  max-width: 500px;
  line-height: 1.6;
}
.ds-digikey-bulk .ds-btn-outline-sm {
  border-color: rgba(179,206,202,0.5);
  color: #b3ceca;
  white-space: nowrap;
  flex-shrink: 0;
}
.ds-digikey-bulk .ds-btn-outline-sm:hover { background: rgba(179,206,202,0.15); color: #f0f8f8; }

.ds-digikey-faq { display: flex; flex-direction: column; gap: 20px; }
.ds-digikey-faq-item {
  background: #fff;
  border-radius: 10px;
  padding: 20px 24px;
  border: 1px solid rgba(0,30,36,0.08);
}
.ds-digikey-faq-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.ds-digikey-faq-item p { font-size: 0.88rem; color: #4a6067; line-height: 1.6; }

/* ============================================================
   SETTINGS & PRIVACY PAGE
   ============================================================ */
.ds-settings-layout {
  display: flex;
  min-height: 100vh;
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 24px;
  gap: 48px;
}
.ds-settings-nav {
  flex-shrink: 0;
  width: 200px;
}
.ds-settings-nav-title {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #7a9a9e;
  margin-bottom: 14px;
}
.ds-settings-nav-item {
  display: block;
  padding: 9px 12px;
  font-size: 0.88rem;
  color: #4a6067;
  text-decoration: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  margin-bottom: 2px;
}
.ds-settings-nav-item:hover { background: rgba(0,30,36,0.05); color: var(--navy); }
.ds-settings-nav-item.active { background: var(--navy); color: #f0f8f8; font-weight: 600; }
.ds-settings-nav-divider { height: 1px; background: rgba(0,30,36,0.1); margin: 10px 0; }
.ds-settings-nav-danger { color: #c0392b; }
.ds-settings-nav-danger:hover { background: #fdf0ef; color: #c0392b; }

.ds-settings-content { flex: 1; }
.ds-settings-section { padding-bottom: 32px; }
.ds-settings-section-hidden { display: none; }
.ds-settings-section-title {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1.5px solid rgba(0,30,36,0.1);
}
.ds-settings-section-desc { font-size: 0.88rem; color: #4a6067; margin-bottom: 24px; line-height: 1.6; }

.ds-settings-avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.ds-settings-avatar-circle {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: #b3ceca;
  color: var(--navy);
  font-family: 'Roboto Mono', monospace;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
}
.ds-settings-avatar-name { font-weight: 700; font-size: 0.95rem; color: var(--navy); }
.ds-settings-avatar-role { font-size: 0.8rem; color: #7a9a9e; margin-top: 2px; }

.ds-settings-field-group { margin-bottom: 24px; }
.ds-settings-field-group h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
}
.ds-settings-field { margin-bottom: 18px; }
.ds-settings-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}
.ds-settings-field-optional {
  font-weight: 400;
  color: #7a9a9e;
  font-size: 0.78rem;
}
.ds-settings-field input[type="text"],
.ds-settings-field input[type="email"],
.ds-settings-field input[type="tel"],
.ds-settings-field input[type="password"] {
  width: 100%;
  max-width: 420px;
  padding: 10px 14px;
  border: 1.5px solid rgba(0,30,36,0.15);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--navy);
  background: #fff;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.ds-settings-field input:focus { outline: none; border-color: #b3ceca; }
.ds-settings-field-hint { font-size: 0.78rem; color: #7a9a9e; margin-top: 5px; }

/* Toggle switches */
.ds-settings-toggles { display: flex; flex-direction: column; gap: 0; margin-bottom: 24px; }
.ds-settings-toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(0,30,36,0.07);
}
.ds-settings-toggle-label { font-size: 0.9rem; font-weight: 600; color: var(--navy); margin-bottom: 3px; }
.ds-settings-toggle-desc { font-size: 0.82rem; color: #7a9a9e; line-height: 1.5; }
.ds-toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; margin-top: 2px; }
.ds-toggle input { opacity: 0; width: 0; height: 0; }
.ds-toggle span {
  position: absolute; inset: 0;
  background: rgba(0,30,36,0.15);
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s;
}
.ds-toggle span::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.ds-toggle input:checked + span { background: #2a7a5b; }
.ds-toggle input:checked + span::before { transform: translateX(20px); }

/* Danger zone */
.ds-settings-danger-zone {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1.5px solid rgba(0,30,36,0.1);
}
.ds-settings-danger-zone h3 { font-size: 0.9rem; font-weight: 700; color: var(--navy); margin-bottom: 16px; }
.ds-settings-danger-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0,30,36,0.07);
}
.ds-btn-danger-outline { border-color: #c0392b; color: #c0392b; }
.ds-btn-danger-outline:hover { background: #c0392b; color: #fff; }

/* Security */
.ds-settings-security-block {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1.5px solid rgba(0,30,36,0.1);
}
.ds-settings-security-block h3 { font-size: 0.9rem; font-weight: 700; color: var(--navy); margin-bottom: 12px; }
.ds-settings-session-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  background: #e6f0ef;
  border-radius: 8px;
  font-size: 0.85rem;
}
.ds-settings-session-device { font-weight: 600; color: var(--navy); }
.ds-settings-session-detail { color: #7a9a9e; }

/* Billing */
.ds-settings-plan-card {
  background: var(--navy);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 28px;
}
.ds-settings-plan-label {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(179,206,202,0.7);
  margin-bottom: 6px;
}
.ds-settings-plan-name {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  color: #f0f8f8;
  margin-bottom: 6px;
}
.ds-settings-plan-desc { font-size: 0.85rem; color: rgba(240,248,248,0.6); margin-bottom: 20px; }
.ds-settings-plan-card .ds-btn-outline-sm {
  border-color: rgba(179,206,202,0.4);
  color: #b3ceca;
}
.ds-settings-plan-card .ds-btn-outline-sm:hover { background: rgba(179,206,202,0.15); color: #f0f8f8; }
.ds-settings-payment-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  font-size: 0.9rem;
  color: var(--navy);
  border-bottom: 1px solid rgba(0,30,36,0.07);
}
.ds-settings-payment-icon { font-size: 1.2rem; }
.ds-settings-link-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: #2a7a5b;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.ds-settings-billing-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 0.88rem;
  color: #4a6067;
  border-bottom: 1px solid rgba(0,30,36,0.07);
}

/* ============================================================
   HELP & SUPPORT PAGE
   ============================================================ */
.ds-help-hero {
  background: var(--navy);
  padding: 72px 0 60px;
  text-align: center;
}
.ds-help-hero-inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 24px;
}
.ds-help-hero-title {
  font-family: 'Roboto Mono', monospace;
  font-size: 2.4rem;
  color: #f0f8f8;
  margin: 12px 0 28px;
}
.ds-help-search input {
  width: 100%;
  padding: 14px 20px;
  border-radius: 40px;
  border: none;
  font-size: 0.95rem;
  background: rgba(255,255,255,0.1);
  color: #f0f8f8;
  outline: none;
  box-sizing: border-box;
  transition: background 0.15s;
}
.ds-help-search input::placeholder { color: rgba(240,248,248,0.45); }
.ds-help-search input:focus { background: rgba(255,255,255,0.16); }

.ds-help-section { padding: 60px 0; }
.ds-help-section-alt { background: #e6f0ef; }
.ds-help-section-inner { max-width: 1020px; margin: 0 auto; padding: 0 32px; }
.ds-help-section-title {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.35rem;
  color: var(--navy);
  margin-bottom: 32px;
}

.ds-help-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.ds-help-card {
  background: #fff;
  border: 1.5px solid rgba(0,30,36,0.08);
  border-radius: 12px;
  padding: 28px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ds-help-card:hover { border-color: #b3ceca; box-shadow: 0 6px 20px rgba(0,30,36,0.08); }
.ds-help-card-icon { font-size: 1.6rem; color: #b3ceca; margin-bottom: 12px; }
.ds-help-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.ds-help-card p { font-size: 0.85rem; color: #4a6067; line-height: 1.55; margin-bottom: 14px; }
.ds-help-card-link { font-size: 0.82rem; font-weight: 600; color: #2a7a5b; }

/* FAQ accordion */
.ds-help-faq { display: flex; flex-direction: column; }
.ds-help-faq-item { border-bottom: 1px solid rgba(0,30,36,0.1); }
.ds-help-faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 4px;
  background: none;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  gap: 16px;
}
.ds-help-faq-q:hover { color: #2a7a5b; }
.ds-help-faq-caret { font-size: 0.75rem; flex-shrink: 0; transition: transform 0.2s; }
.ds-help-faq-item.open .ds-help-faq-caret { transform: rotate(180deg); }
.ds-help-faq-a { display: none; padding: 0 4px 18px; }
.ds-help-faq-item.open .ds-help-faq-a { display: block; }
.ds-help-faq-a p { font-size: 0.88rem; color: #4a6067; line-height: 1.65; }
.ds-help-faq-a a { color: #2a7a5b; }

/* Contact grid */
.ds-help-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.ds-help-contact-card {
  background: #fff;
  border: 1.5px solid rgba(0,30,36,0.08);
  border-radius: 12px;
  padding: 28px;
}
.ds-help-contact-icon { font-size: 1.4rem; color: #b3ceca; margin-bottom: 12px; }
.ds-help-contact-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.ds-help-contact-card p { font-size: 0.85rem; color: #4a6067; line-height: 1.55; margin-bottom: 18px; }
.ds-help-contact-card .ds-btn-primary-sm { font-size: 0.78rem; }

/* ── Family dashboard header actions ───────────────────────── */
.ds-family-dash-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* ── Modal ──────────────────────────────────────────────────── */
.ds-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.ds-modal-overlay.hidden { display: none; }

.ds-modal {
  background: #012a31;
  border: 1px solid rgba(179,206,202,0.2);
  border-radius: 16px;
  padding: 36px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}

.ds-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.ds-modal-header h2 {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: #f0f8f8;
}
.ds-modal-close {
  background: none;
  border: none;
  color: rgba(240,248,248,0.4);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.15s;
}
.ds-modal-close:hover { color: #f0f8f8; }

.ds-modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.ds-modal-field label {
  font-size: 0.8rem;
  color: rgba(240,248,248,0.6);
  font-family: 'Roboto Mono', monospace;
  letter-spacing: 0.04em;
}
.ds-required { color: #b3ceca; }
.ds-modal-field input {
  background: rgba(179,206,202,0.06);
  border: 1px solid rgba(179,206,202,0.2);
  border-radius: 8px;
  padding: 11px 14px;
  color: #f0f8f8;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s;
}
.ds-modal-field input:focus {
  outline: none;
  border-color: #b3ceca;
}
.ds-modal-field input::placeholder { color: rgba(240,248,248,0.25); }

.ds-modal-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.ds-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 28px;
}

.ds-btn-primary {
  display: inline-block;
  padding: 11px 24px;
  background: #b3ceca;
  color: #001e24;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.ds-btn-primary:hover { opacity: 0.85; }

/* ── Admin Edit Bar (memorial page, org admins only) ────────── */
.ds-admin-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: #001e24;
  border-bottom: 1px solid rgba(179,206,202,0.25);
  flex-wrap: wrap;
  gap: 10px;
}
.ds-admin-bar-label {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #b3ceca;
}
.ds-admin-bar-actions {
  display: flex;
  gap: 10px;
}
.ds-admin-bar-btn {
  display: inline-block;
  padding: 7px 18px;
  background: #b3ceca;
  color: #001e24;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s;
}
.ds-admin-bar-btn:hover { opacity: 0.85; }
.ds-admin-bar-btn-ghost {
  background: transparent;
  border: 1px solid rgba(179,206,202,0.35);
  color: #b3ceca;
}
.ds-admin-bar-btn-ghost:hover {
  border-color: #b3ceca;
  color: #f0f8f8;
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   PRINT MEMORIAL / CANVA OBITUARY  (Step 5)
   ═══════════════════════════════════════════════════════════════ */

.ds-print-section {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  background: rgba(94, 202, 212, 0.03);
}

.ds-print-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.ds-print-icon {
  font-size: 26px;
  flex-shrink: 0;
  margin-top: 2px;
}

.ds-print-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 5px;
}

.ds-print-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Template picker grid */
.ds-template-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.ds-template-card {
  cursor: pointer;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
  user-select: none;
}

.ds-template-card:hover {
  border-color: var(--teal);
}

.ds-template-card-selected {
  border-color: var(--teal) !important;
  box-shadow: 0 0 0 3px rgba(94, 202, 212, 0.18);
}

.ds-template-radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Mock template previews */
.ds-template-preview {
  height: 100px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ds-template-preview-dark {
  background: #1a2744;
}

.ds-template-preview-light {
  background: #f5f0e8;
}

.ds-tmpl-bar {
  width: 40%;
  height: 3px;
  background: rgba(94, 202, 212, 0.7);
  border-radius: 2px;
}

.ds-tmpl-bar-light {
  background: rgba(80, 120, 100, 0.5);
}

.ds-tmpl-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 4px;
}

.ds-tmpl-line {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
}

.ds-tmpl-line-dk {
  background: rgba(30, 40, 50, 0.18);
}

.ds-tmpl-line-h { width: 75%; }
.ds-tmpl-line-m { width: 55%; }
.ds-tmpl-line-s { width: 80%; height: 3px; }

.ds-template-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--surface);
  border-top: 1px solid var(--border-subtle);
}

.ds-template-name {
  font-size: 13px;
  font-weight: 500;
}

.ds-template-check {
  font-size: 12px;
  color: var(--teal);
  opacity: 0;
  transition: opacity 0.15s;
}

.ds-template-card-selected .ds-template-check {
  opacity: 1;
}

/* Print helper result panel */
.ds-print-helper {
  background: var(--surface-raised, #111c2e);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
}

.ds-print-helper-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--teal);
}

.ds-print-helper-note {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 14px;
}

.ds-print-copy-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ds-print-copy-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
}

.ds-print-copy-row-bio {
  align-items: flex-start;
}

.ds-print-copy-label {
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  min-width: 80px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: 2px;
}

.ds-print-copy-val {
  color: var(--text-primary);
  line-height: 1.5;
}

.ds-print-bio-text {
  max-height: 80px;
  overflow-y: auto;
  font-size: 12px;
  color: var(--text-secondary);
}

@media (max-width: 500px) {
  .ds-template-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .ds-template-preview {
    height: 80px;
    padding: 10px;
  }
}

/* ── Social Media Import Grid (Family View) ────────────── */
.ds-social-import-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.ds-social-import-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle, rgba(255,255,255,.08));
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.ds-social-import-btn:hover:not(:disabled) {
  border-color: var(--gold-border, rgba(200,169,126,.3));
  background: rgba(255,255,255,0.05);
}
.ds-social-import-btn:disabled { opacity: 0.55; cursor: default; }
.ds-social-svg { flex-shrink: 0; }
.ds-social-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary, #fff);
  text-align: center;
}
.ds-social-badge {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted, #666);
  background: rgba(255,255,255,0.05);
  padding: 2px 6px;
  border-radius: 4px;
}
@media (max-width: 480px) {
  .ds-social-import-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Guided Questions (Story Step) ─────────────────────── */
.ds-guided-questions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 8px;
}
.ds-gq-item {}
.ds-gq-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary, #aaa);
  margin-bottom: 5px;
}
.ds-gq-input {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border-subtle, rgba(255,255,255,.08));
  border-radius: var(--radius-md, 8px);
  padding: 10px 12px;
  color: var(--text-primary, #fff);
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.ds-gq-input:focus {
  border-color: var(--gold, #c8a97e);
}
.ds-gq-input::placeholder {
  color: var(--text-muted, #555);
  font-style: italic;
}

/* ── DigiKey Add-On Card ───────────────────────────────── */
.ds-addon-card {
  border: 1px solid var(--border-subtle, rgba(255,255,255,.08));
  border-radius: var(--radius-md, 8px);
  padding: 24px;
  margin-bottom: 20px;
  background: rgba(94,202,212,0.04);
}
.ds-addon-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}
.ds-addon-icon-wrap {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(94,202,212,0.1);
  border-radius: 10px;
  color: var(--teal, #5ecad4);
}
.ds-addon-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
}
.ds-addon-desc {
  font-size: 13px;
  color: var(--text-secondary, #aaa);
  margin: 0;
  line-height: 1.5;
}
.ds-addon-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.ds-addon-option {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--border-subtle, rgba(255,255,255,.08));
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.ds-addon-option:hover {
  border-color: var(--gold-border, rgba(200,169,126,.3));
  background: rgba(255,255,255,0.02);
}
.ds-addon-option input[type="radio"] {
  accent-color: var(--gold, #c8a97e);
  vertical-align: middle;
  margin-right: 10px;
}
.ds-addon-option-body {
  display: inline;
}
.ds-addon-option-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #fff);
}
.ds-addon-option-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--gold, #c8a97e);
  float: right;
}
.ds-addon-option-desc {
  display: block;
  font-size: 12px;
  color: var(--text-muted, #666);
  margin-top: 4px;
  padding-left: 26px;
}
.ds-addon-cta {
  width: 100%;
}
@media (max-width: 480px) {
  .ds-addon-option { padding: 12px; }
}

/* ── Save Draft Button ─────────────────────────────────── */
.ds-save-draft-btn {
  font-size: 13px !important;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.ds-save-draft-btn:hover { opacity: 1; }

/* ── DigiKey Publish Step Product Cards ───────────────── */
.dk-publish-products {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dk-publish-card {
  position: relative;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  padding: 16px;
  border: 1.5px solid var(--border-subtle, rgba(255,255,255,.08));
  border-radius: var(--radius-md, 10px);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.2s;
  background: rgba(94,202,212,0.03);
}
.dk-publish-card:hover {
  border-color: var(--gold-border, rgba(200,169,126,.35));
  background: rgba(94,202,212,0.06);
  transform: translateY(-1px);
}
.dk-publish-card-selected {
  border-color: var(--gold, #c8a97e) !important;
  background: rgba(200,169,126,0.08) !important;
  box-shadow: 0 0 0 1px var(--gold, #c8a97e);
}
.dk-publish-radio {
  position: absolute;
  top: 16px;
  right: 16px;
  accent-color: var(--gold, #c8a97e);
}
.dk-publish-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary, #fff);
  color: var(--bg-primary, #0d1b2a);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 14px;
  border-radius: 20px;
  white-space: nowrap;
}
.dk-publish-img-placeholder {
  width: 100px;
  height: 100px;
  border: 1.5px dashed rgba(179,206,202,0.2);
  border-radius: var(--radius-md, 8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(179,206,202,0.3);
  background: rgba(179,206,202,0.04);
  flex-shrink: 0;
}
.dk-publish-info {
  min-width: 0;
}
.dk-publish-info .dk-publish-icon {
  font-size: 18px;
  margin-bottom: 4px;
  opacity: 0.5;
}
.dk-publish-info h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary, #fff);
  margin-bottom: 4px;
}
.dk-publish-info p {
  font-size: 13px;
  color: var(--text-secondary, #aaa);
  line-height: 1.4;
  margin-bottom: 8px;
}
.dk-publish-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.dk-publish-specs span {
  font-size: 11px;
  padding: 3px 10px;
  border: 1px solid var(--border-subtle, rgba(255,255,255,.1));
  border-radius: 20px;
  color: var(--text-muted, #888);
  white-space: nowrap;
}
.dk-publish-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary, #fff);
}
.dk-publish-price span {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted, #888);
}
.dk-publish-featured {
  border-color: var(--gold-border, rgba(200,169,126,.25));
}
@media (max-width: 480px) {
  .dk-publish-card {
    grid-template-columns: 1fr;
  }
  .dk-publish-img-placeholder {
    width: 100%;
    height: 80px;
  }
}

/* ── Obituary Template Photo Placeholder ───────────────── */
.ds-tmpl-photo-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
}
.ds-tmpl-photo-light {
  background: rgba(0,0,0,0.06);
}
.ds-print-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.ds-print-actions .btn { flex: 1; min-width: 180px; text-align: center; }

/* ═══════════════════════════════════════════════════════════════
   NOTIFICATION BELL — Admin Dashboard
   ═══════════════════════════════════════════════════════════════ */

.ds-notif-wrap {
  position: relative;
}

.ds-notif-btn {
  background: transparent;
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.1));
  border-radius: 8px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.15s;
  color: inherit;
}

.ds-notif-btn:hover {
  background: rgba(255,255,255,0.08);
}

.ds-notif-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #e74c3c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  border: 2px solid var(--dash-header-bg, #0f1829);
}

.ds-notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  background: #1a2744;
  border: 1px solid rgba(94,202,212,0.2);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 1000;
  overflow: hidden;
}

.ds-notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
  font-weight: 600;
  color: #e0eaf0;
}

.ds-notif-read-all {
  background: none;
  border: none;
  font-size: 12px;
  color: #5ecad4;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.ds-notif-read-all:hover { text-decoration: underline; }

.ds-notif-list {
  max-height: 360px;
  overflow-y: auto;
}

.ds-notif-empty {
  padding: 32px 16px;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.35);
}

.ds-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: background 0.12s;
  position: relative;
}

.ds-notif-item:hover { background: rgba(94,202,212,0.07); }
.ds-notif-item:last-child { border-bottom: none; }

.ds-notif-read { opacity: 0.5; }

.ds-notif-item-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.ds-notif-item-body { flex: 1; min-width: 0; }

.ds-notif-item-msg {
  font-size: 13px;
  color: #dce8f0;
  line-height: 1.4;
  margin: 0 0 4px;
}

.ds-notif-item-time {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  margin: 0;
}

.ds-notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5ecad4;
  flex-shrink: 0;
  margin-top: 5px;
}

/* Dash header actions alignment */
.dash-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ============================================================
   MOBILE RESPONSIVE OVERHAUL
   Breakpoints: 768px (tablet), 580px (phone), 400px (small phone)
   ============================================================ */

/* ─── Hamburger Button ──────────────────────────────────── */
.dash-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 25;
}
.dash-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.dash-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.dash-hamburger.open span:nth-child(2) { opacity: 0; }
.dash-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ─── Mobile Slide-Down Menu ───────────────────────────── */
.dash-mobile-menu {
  display: none;
  flex-direction: column;
  padding: 8px 16px 16px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(0,30,36,0.98);
}
.dash-mobile-menu:not(.hidden) { display: flex; }
.dash-mobile-link {
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.dash-mobile-link:hover, .dash-mobile-link.active {
  color: var(--gold);
  background: var(--gold-dim);
  opacity: 1;
}
.dash-mobile-cta {
  margin-top: 8px;
  padding: 12px 16px;
  background: var(--gold-dim);
  color: var(--gold);
  text-align: center;
  border-radius: var(--radius-md);
  font-weight: 600;
}

/* ─── Contenteditable Bio Editor ────────────────────────── */
[contenteditable="true"] {
  cursor: text;
  -webkit-user-modify: read-write;
}
[contenteditable="true"]:focus {
  border-color: var(--gold) !important;
  background: rgba(179,206,202,0.04);
  outline: none;
}
[contenteditable="true"]:empty::before {
  content: 'Click here to edit…';
  color: var(--text-muted);
  font-style: italic;
}
#bio-editor, #bio-editor-family {
  min-height: 120px;
  line-height: 1.8;
  font-size: 16px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* ─── Memorial Tabs ────────────────────────────────────── */
.ds-mem-tabs-wrap {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--bg-primary, #0a0a0a);
  border-bottom: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.ds-mem-tabs {
  display: flex;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  gap: 4px;
}
.ds-mem-tabs::-webkit-scrollbar { display: none; }
.ds-mem-tab {
  flex-shrink: 0;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted, #888);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.ds-mem-tab:hover {
  color: var(--text-primary, #fff);
}
.ds-mem-tab.active {
  color: var(--gold, #c8a97e);
  border-bottom-color: var(--gold, #c8a97e);
}

@media (max-width: 580px) {
  .ds-mem-tab {
    padding: 12px 14px;
    font-size: 13px;
  }
}

/* ─── Share Dropdown ────────────────────────────────────── */
.ds-share-wrap { position: relative; display: inline-block; }
.ds-share-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.ds-share-trigger:hover { border-color: var(--gold-border); color: var(--gold); }
.ds-share-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  padding: 8px;
  z-index: 50;
}
.ds-share-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: none;
  width: 100%;
  font-family: var(--font-sans);
}
.ds-share-option:hover { background: var(--gold-dim); color: var(--gold); opacity: 1; }
.ds-share-divider { height: 1px; background: var(--border-subtle); margin: 4px 0; }

/* ─── Filter Pills ──────────────────────────────────────── */
.ds-pill {
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.ds-pill:hover {
  border-color: var(--gold-border);
  color: var(--text-primary);
}
.ds-pill.active {
  background: var(--gold-dim);
  border-color: var(--gold-border);
  color: var(--gold);
}

/* ─── Family Portal Hamburger ───────────────────────────── */
.portal-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}
.portal-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.portal-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.portal-hamburger.open span:nth-child(2) { opacity: 0; }
.portal-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
.portal-mobile-menu {
  display: none;
  flex-direction: column;
  width: 100%;
  padding: 8px 0;
  border-top: 1px solid var(--border-subtle);
}
.portal-mobile-menu:not(.hidden) { display: flex; }
.portal-mobile-menu a {
  padding: 12px 16px;
  font-size: 15px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.portal-mobile-menu a:hover { color: var(--gold); background: var(--gold-dim); opacity: 1; }

@media (max-width: 580px) {
  .portal-hamburger { display: flex; }
  .ds-portal-nav { display: none; }
  .ds-portal-header { flex-wrap: wrap; }
}

/* ─── TABLET — 768px ─────────────────────────────────────── */
@media (max-width: 768px) {
  /* Show hamburger, hide desktop nav */
  .dash-hamburger { display: flex; }
  .dash-tab-nav { display: none !important; }
  .dash-new-btn { display: none; }
  .dash-header { padding: 12px 16px; }
  .dash-header-inner { gap: 12px; }

  /* Layout containers */
  .container, .container-sm, .container-xs { padding: 0 16px; }
  .page { padding: 24px 0 60px; }
  .page-inner { padding: 0 16px; }

  /* Dashboard grid — 2 columns on tablet */
  .stat-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }

  /* Cards */
  .card { padding: 20px; }

  /* Memorial cards grid */
  .memorial-card-thumb { height: 140px; }

  /* Family dashboard grid */
  .ds-family-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
  .ds-family-dash-header { margin-bottom: 32px; }
  .ds-family-dash { padding: 40px 16px 80px; }

  /* Portal header (family view) */
  .ds-portal-header { padding: 14px 16px; }

  /* Progress steps — compact */
  .progress-steps { gap: 4px; padding: 0 8px; }
  .step-label { font-size: 10px; }
  .step-connector { min-width: 16px; }

  /* Form rows */
  .form-row { grid-template-columns: 1fr !important; }

  /* Analytics grid */
  .analytics-grid { grid-template-columns: 1fr !important; }

  /* Auth tabs */
  .auth-tabs { gap: 0; }
  .auth-tab { padding: 8px 10px; font-size: 0.78rem; }
}

/* ─── PHONE — 580px ──────────────────────────────────────── */
@media (max-width: 580px) {
  /* Typography scale down */
  h1 { font-size: 24px !important; }
  h2 { font-size: 20px !important; }
  h3 { font-size: 17px !important; }

  /* Dashboard stat grid — single column */
  .stat-grid { grid-template-columns: 1fr !important; }

  /* Memorial hero section — reduce padding */
  .memorial-hero { padding: 40px 16px 32px; }
  .memorial-name { font-size: 28px !important; }
  .memorial-dates { font-size: 16px; }

  /* Gallery — 2 columns, smaller gaps */
  .gallery-grid { columns: 2 !important; column-gap: 8px; }
  .gallery-item { margin-bottom: 8px; }

  /* Buttons — full width on mobile */
  .btn-row, .ds-btn-group { flex-direction: column; gap: 8px; }
  .btn-row .btn, .ds-btn-group .btn { width: 100%; text-align: center; }

  /* Table — horizontal scroll */
  .dash-table-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .dash-table { min-width: 600px; }

  /* Family cards — single column */
  .ds-family-grid { grid-template-columns: 1fr !important; }
  .ds-family-card { padding: 20px; }

  /* Memorial card grid — single column */
  .ds-memorial-grid { grid-template-columns: 1fr !important; }

  /* Portal nav — hide secondary links, keep back button */
  .ds-portal-nav-link { display: none; }
  .ds-portal-nav { gap: 8px; }

  /* Hide search on small screens */
  .dash-search-wrap { display: none; }

  /* Video grid */
  .ds-video-grid { grid-template-columns: 1fr !important; }

  /* Edit form areas — full width */
  .edit-photo-thumb { min-width: unset; }
  #existing-photos-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)) !important; }

  /* Status pills — wrap and center */
  .ds-status-pills, .ds-filter-pills {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }

  /* Modal/dialog — full width */
  .ds-modal-content, .ds-dialog { width: 95vw !important; max-width: 95vw !important; margin: 16px auto; }
}

/* ─── SMALL PHONE — 400px ────────────────────────────────── */
@media (max-width: 400px) {
  /* Even tighter padding */
  .container, .container-sm, .container-xs { padding: 0 12px; }
  .card { padding: 16px; }
  .ds-family-card { padding: 16px; }

  /* Gallery — single column */
  .gallery-grid { columns: 1 !important; }

  /* Progress steps — icons only, hide labels */
  .step-label { display: none; }
  .step-dot { width: 28px; height: 28px; }
  .step-num { font-size: 11px; }
  .step-connector { min-width: 12px; }
  .progress-steps { gap: 2px; }

  /* Dashboard logo — shorter */
  .dash-logo { font-size: 15px; letter-spacing: 1px; }

  /* Auth form */
  .auth-tab { padding: 6px 8px; font-size: 0.72rem; }
}

/* ─── Fix: Images too large on mobile memorial view ──────── */
@media (max-width: 768px) {
  /* Profile photo circle — cap size */
  .memorial-profile-photo {
    width: 120px !important;
    height: 120px !important;
  }

  /* Inline images in memorial — constrain */
  #memorial-root img {
    max-width: 100%;
    height: auto;
  }

  /* Memorial section spacing */
  .mb-48 { margin-bottom: 32px; }
  .mt-48 { margin-top: 32px; }
}

/* ─── Fix: Auth screen flicker on role switch ────────────── */
.auth-panel {
  transition: none !important;
  animation: none !important;
}
.auth-panel[style*="display: none"] {
  display: none !important;
}

/* ─── Fix: Consistent button styles ─────────────────────── */
.btn, .btn-primary, .btn-secondary, .btn-ghost {
  font-family: var(--font-sans);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

/* ─── Mobile touch targets — min 44px ───────────────────── */
@media (max-width: 768px) {
  .btn, .btn-primary, .btn-secondary, .btn-ghost,
  .dash-tab, .auth-tab, .nav-link, .ds-portal-nav-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* ============================================================
   MEMORIAL PAGE — Redesigned Views
   Hero, Story, Nav Cards, Media, Tributes, Engagement, Comments
   ============================================================ */

/* ─── Hero ───────────────────────────────────────────────── */
.mem-hero {
  position: relative;
  padding: 72px 24px 32px;
  text-align: center;
  background: linear-gradient(180deg, rgba(0,30,36,0.95) 0%, var(--navy) 100%);
}
.mem-hero-inner {
  max-width: 520px;
  margin: 0 auto;
}
.mem-hero-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 24px;
  border: 3px solid var(--gold-border);
  box-shadow: var(--shadow-md);
}
.mem-hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mem-hero-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--gold);
  background: var(--navy-mid);
}
.mem-hero-name {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.2;
}
.mem-hero-born {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.mem-hero-dates {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.mem-hero-title {
  font-size: 14px;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0;
}
.mem-hero-share {
  position: relative;
  display: inline-block;
}
.mem-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}
.mem-share-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
}

/* ─── Tab Toggle ─────────────────────────────────────────── */
.mem-tabs-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  border-bottom: 1px solid var(--border-subtle);
}
.mem-tabs {
  display: flex;
  justify-content: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mem-tabs::-webkit-scrollbar { display: none; }
.mem-tab {
  flex-shrink: 0;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  font-family: var(--font-sans);
  white-space: nowrap;
}
.mem-tab:hover {
  color: var(--text-secondary);
}
.mem-tab-active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.mem-tab-count {
  font-size: 11px;
  background: rgba(255,255,255,0.08);
  padding: 1px 7px;
  border-radius: 100px;
  margin-left: 4px;
  vertical-align: middle;
}
.mem-tab-active .mem-tab-count {
  background: rgba(179,206,202,0.15);
}

/* ─── Share Grid ─────────────────────────────────────────── */
.mem-share-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.mem-share-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  background: var(--navy-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
}
.mem-share-card:hover {
  border-color: var(--gold-border);
  background: var(--navy-mid);
}
.mem-share-card-icon {
  font-size: 24px;
}
.mem-share-card-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ─── Like Count Badge ───────────────────────────────────── */
.mem-like-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  margin-left: 2px;
}

/* ─── Life Story ─────────────────────────────────────────── */
.mem-story {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 40px;
}
.mem-section-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
}
.mem-story-text {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-secondary);
  white-space: pre-line;
}

/* ─── Section Navigation Cards ───────────────────────────── */
.mem-nav-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}
.mem-nav-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  background: var(--navy-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
}
.mem-nav-card:hover {
  background: var(--navy-mid);
  border-color: var(--gold-border);
}
.mem-nav-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-dim);
  border-radius: var(--radius-sm);
  color: var(--gold);
}
.mem-nav-label {
  flex: 1;
  font-weight: 600;
  font-size: 16px;
}
.mem-nav-count {
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.06);
  padding: 2px 10px;
  border-radius: 100px;
  font-weight: 500;
}
.mem-nav-arrow {
  font-size: 18px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.mem-nav-card:hover .mem-nav-arrow {
  transform: translateX(3px);
  color: var(--gold);
}

/* ─── Follow Card ────────────────────────────────────────── */
.mem-follow-card {
  background: var(--navy-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 40px;
}
.mem-follow-card input[type="email"] {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.mem-follow-card input[type="email"]:focus {
  border-color: var(--gold);
}

/* ─── Sub-page Header (Media / Tributes) ─────────────────── */
.mem-sub-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 50;
}
.mem-back-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.2s;
  font-family: var(--font-sans);
}
.mem-back-btn:hover {
  color: var(--gold);
}
.mem-sub-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ─── Media Sections ─────────────────────────────────────── */
.mem-media-section {
  padding: 32px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.mem-media-section:last-child {
  border-bottom: none;
}
.mem-media-heading {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.mem-media-count {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255,255,255,0.06);
  padding: 2px 9px;
  border-radius: 100px;
}

/* ─── Photo Grid ─────────────────────────────────────────── */
.mem-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.mem-photo-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
}
.mem-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.mem-photo-item:hover img {
  transform: scale(1.04);
}
.mem-photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 4px;
  padding: 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  opacity: 0;
  transition: opacity 0.25s ease;
  justify-content: flex-end;
}
.mem-photo-item:hover .mem-photo-overlay,
.mem-video-item:hover .mem-photo-overlay {
  opacity: 1;
}

/* ─── Engagement Buttons (Like / Comment) ────────────────── */
.mem-engage-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: none;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  backdrop-filter: blur(4px);
}
.mem-engage-btn:hover {
  background: rgba(0,0,0,0.7);
  transform: scale(1.1);
}
.mem-engage-btn.liked {
  background: rgba(200,169,126,0.25);
}
.mem-engage-btn.liked svg {
  fill: var(--gold);
  stroke: var(--gold);
}

/* ─── Video Grid ─────────────────────────────────────────── */
.mem-video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.mem-video-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
}
.mem-video-item video {
  width: 100%;
  display: block;
  border-radius: var(--radius-sm);
}

/* ─── Voice Memos ────────────────────────────────────────── */
.mem-voice-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mem-voice-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--navy-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}
.mem-voice-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-dim);
  border-radius: var(--radius-sm);
  font-size: 18px;
}
.mem-voice-info {
  flex: 1;
  min-width: 0;
}
.mem-voice-info audio {
  max-width: 100%;
}

/* ─── External Links Grid ────────────────────────────────── */
.mem-links-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.mem-link-card {
  background: var(--navy-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s;
}
.mem-link-card:hover {
  border-color: var(--gold-border);
}
.mem-link-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
}
.mem-link-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.mem-link-title {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}
.mem-link-external {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  text-decoration: none;
  color: var(--text-primary);
}
.mem-link-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-dim);
  border-radius: var(--radius-sm);
  font-size: 16px;
  color: var(--gold);
  flex-shrink: 0;
}

/* ─── Tributes List ──────────────────────────────────────── */
.mem-tributes-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 24px;
}
.mem-tribute-card {
  background: var(--navy-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
}
.mem-tribute-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.mem-tribute-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold-dim);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}
.mem-tribute-text {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-secondary);
}
.mem-tribute-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 16px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.mem-tribute-photo {
  aspect-ratio: 1;
  overflow: hidden;
}
.mem-tribute-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── Comment Panel (Bottom Sheet) ───────────────────────── */
.mem-comment-panel {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.mem-comment-panel-inner {
  width: 100%;
  max-width: 520px;
  max-height: 70vh;
  background: var(--navy-mid);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  flex-direction: column;
  animation: slideUpPanel 0.3s ease;
}
@keyframes slideUpPanel {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.mem-comment-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.mem-comment-panel-header h4 {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
}
.mem-comment-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  min-height: 120px;
}
.mem-comment-panel-input {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
}
.mem-comment-panel-input input {
  flex: 1;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}
.mem-comment-panel-input input:focus {
  border-color: var(--gold);
}

/* ─── Individual Comments ────────────────────────────────── */
.mem-comment-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
}
.mem-comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold-dim);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.mem-comment-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mem-comment-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
}
.mem-comment-time {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── Memorial Page — Mobile ─────────────────────────────── */
@media (max-width: 600px) {
  .mem-hero {
    padding: 56px 20px 36px;
  }
  .mem-hero-photo {
    width: 120px;
    height: 120px;
  }
  .mem-hero-name {
    font-size: 26px;
  }
  .mem-photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .mem-video-grid {
    grid-template-columns: 1fr;
  }
  .mem-tribute-photos {
    grid-template-columns: repeat(2, 1fr);
  }
  .mem-comment-panel-inner {
    max-height: 80vh;
  }
  .mem-share-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .mem-tab {
    padding: 12px 16px;
    font-size: 13px;
  }
}

/* ============================================================
   RESPONSIVE POLISH — Consolidated Device Adaptation
   Covers gaps not handled by per-component breakpoints.
   Breakpoints: 1024 (tablet landscape), 768 (tablet portrait),
   480 (phone landscape), 375 (phone portrait)
   ============================================================ */

/* ─── Tablet Landscape (1024px) ──────────────────────────── */
@media (max-width: 1024px) {
  /* Tighten main containers */
  .container { padding-left: 20px; padding-right: 20px; }

  /* Dashboard stat cards — 2 col */
  .dash-stats { grid-template-columns: repeat(2, 1fr); }

  /* Dashboard charts — stack */
  .dash-charts { grid-template-columns: 1fr; }
}

/* ─── Tablet Portrait (768px) ────────────────────────────── */
@media (max-width: 768px) {
  /* Scale down large display numbers */
  .stat-number, .dash-stat-num { font-size: 28px; }

  /* Form inputs — minimum touch-friendly size */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  input[type="tel"],
  input[type="url"],
  input[type="date"],
  textarea,
  select,
  .filter-select,
  .dash-search {
    font-size: 16px; /* prevents iOS zoom on focus */
    min-height: 44px;
    padding: 10px 14px;
  }

  /* Buttons — min touch target */
  button, .btn, [class*="btn-"] {
    min-height: 44px;
  }

  /* DigiKey publish cards — 2 col then stack */
  .dk-publish-products {
    gap: 14px;
  }

  /* Template grid — ensure 2 col */
  .ds-template-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  /* Dashboard summary cards */
  .dash-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Tables — allow horizontal scroll */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .data-table {
    min-width: 600px;
  }

  /* Tighten page headers */
  h1 { font-size: 24px; }
  .page-header h1, .text-center h1 { font-size: 26px; }

  /* Family card extras — keep row but tighter */
  .ds-family-card-extras {
    gap: 6px;
    padding: 0 12px 12px;
  }
  .ds-card-extra-btn {
    font-size: 11px;
    padding: 7px 8px;
  }
}

/* ─── Phone Landscape / Large Phone (480px) ──────────────── */
@media (max-width: 480px) {
  /* Further scale display numbers */
  .stat-number, .dash-stat-num { font-size: 24px; }
  .empty-state-icon, .lock-icon { font-size: 36px; }

  /* Dashboard stats — single column */
  .dash-stats { grid-template-columns: 1fr; }
  .dash-summary { grid-template-columns: 1fr; }

  /* Container padding — tighter */
  .container { padding-left: 16px; padding-right: 16px; }

  /* Page headers */
  h1 { font-size: 22px; }
  h2 { font-size: 18px; }

  /* DigiKey cards — full stack */
  .dk-publish-products {
    grid-template-columns: 1fr;
  }
  .dk-publish-card {
    grid-template-columns: 1fr;
  }
  .dk-publish-img-placeholder {
    height: 100px;
  }

  /* Template grid — full stack */
  .ds-template-grid {
    grid-template-columns: 1fr;
  }

  /* Memorial hero — compact */
  .mem-hero { padding: 48px 16px 28px; }
  .mem-hero-photo { width: 100px; height: 100px; margin-bottom: 16px; }
  .mem-hero-name { font-size: 22px; }
  .mem-hero-dates { font-size: 13px; }

  /* Family card buttons — stack extras vertically */
  .ds-family-card-extras {
    flex-direction: column;
  }

  /* Share grid — 2 col */
  .mem-share-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .mem-share-card {
    padding: 14px 8px;
  }

  /* Comment panel — full width */
  .mem-comment-panel-inner {
    max-height: 85vh;
    border-radius: 16px 16px 0 0;
  }

  /* Follow card */
  .mem-follow-card {
    padding: 16px;
  }

  /* Print section actions — stack */
  .ds-print-actions {
    flex-direction: column;
    gap: 8px;
  }

  /* Auth tabs — smaller */
  .auth-tab { padding: 6px 10px; font-size: 12px; }
}

/* ─── Small Phone (375px and below) ──────────────────────── */
@media (max-width: 375px) {
  /* Even tighter spacing */
  .container { padding-left: 12px; padding-right: 12px; }

  h1 { font-size: 20px; }
  h2 { font-size: 16px; }

  /* Progress steps — dots only, no labels */
  .step-label { display: none; }
  .step-dot, .step-dot.clickable { width: 28px; height: 28px; }
  .step-num { font-size: 12px; }
  .step-connector { min-width: 16px; }

  /* Card padding */
  .card { padding: 14px; }
  .dk-publish-card { padding: 12px; }
  .dk-publish-info h4 { font-size: 14px; }
  .dk-publish-price { font-size: 22px; }

  /* Nav buttons — compact */
  .mem-nav-card { padding: 14px 16px; gap: 12px; }
  .mem-nav-label { font-size: 14px; }

  /* Tabs — scrollable, no wrap */
  .mem-tab { padding: 10px 14px; font-size: 12px; }

  /* Photo grid — 2 col always */
  .mem-photo-grid { grid-template-columns: repeat(2, 1fr); gap: 2px; }

  /* Family dashboard */
  .ds-family-card-name { font-size: 16px; }
  .ds-family-card-dates { font-size: 12px; }
  .ds-card-btn { font-size: 11px; padding: 6px 8px; }
}

/* ─── Safe area insets (iPhone notch / gesture bar) ──────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .mem-comment-panel-input {
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }
  .memorial-footer {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
  .ds-family-dash {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ─── Hover-capable devices only (no ghost hovers on touch) ─ */
@media (hover: hover) and (pointer: fine) {
  .mem-photo-overlay { opacity: 0; }
  .mem-photo-item:hover .mem-photo-overlay,
  .mem-video-item:hover .mem-photo-overlay { opacity: 1; }
}
/* Touch devices — always show engagement buttons */
@media (hover: none) {
  .mem-photo-overlay { opacity: 1; background: linear-gradient(transparent 50%, rgba(0,0,0,0.4)); }
}

/* ─── Landscape phone — limit hero height ────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
  .mem-hero { padding: 32px 24px 20px; }
  .mem-hero-photo { width: 80px; height: 80px; margin-bottom: 12px; }
  .mem-hero-name { font-size: 20px; }
}
