/* ── Page Layout ──────────────────────────────────────────────────────────── */
.page {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}
.page-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}
.page-narrow {
  max-width: 480px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

/* ── Stack helpers ────────────────────────────────────────────────────────── */
.stack-sm  { display: flex; flex-direction: column; gap: 8px; }
.stack-md  { display: flex; flex-direction: column; gap: 16px; }
.stack-lg  { display: flex; flex-direction: column; gap: 28px; }
.row       { display: flex; align-items: center; gap: 12px; }
.row-apart { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap      { flex-wrap: wrap; }

/* ── Typography helpers ───────────────────────────────────────────────────── */
.text-sm   { font-size: 13px; }
.text-muted { color: var(--ink3); }
.text-ink4  { color: var(--ink4); }
.bold      { font-weight: 600; }
.serif     { font-family: var(--serif); }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 20px;
  margin-top: auto;
}
.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--ink4);
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--ink4); text-decoration: none; }
.footer-links a:hover { color: var(--ink2); }

/* ── App Nav (authenticated) ──────────────────────────────────────────────── */
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-menu-btn {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border2);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  gap: 3px;
  flex-direction: column;
  padding: 0;
}
.nav-menu-btn span {
  width: 16px; height: 1.5px;
  background: var(--ink2);
  border-radius: 2px;
  display: block;
}

/* ── Drawer ───────────────────────────────────────────────────────────────── */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(19,17,16,.4);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.drawer-backdrop.open { opacity: 1; pointer-events: all; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(300px, 85vw);
  background: var(--white);
  z-index: 160;
  transform: translateX(100%);
  transition: transform .25s ease;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-md);
}
.drawer.open { transform: translateX(0); }
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.drawer-close {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--ink3);
}
.drawer-nav { flex: 1; padding: 8px 0; overflow-y: auto; }
.drawer-link {
  display: flex; align-items: center;
  padding: 14px 20px;
  font-size: 15px; color: var(--ink2);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.drawer-link:hover { background: var(--bg2); }
.drawer-link:last-child { border-bottom: none; }
.drawer-link.danger { color: var(--red); }
.drawer-sep { border: none; border-top: 1px solid var(--border); margin: 8px 0; }

/* ── Consent List Card ────────────────────────────────────────────────────── */
.consent-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .15s, border-color .15s;
}
.consent-card:hover {
  border-color: var(--border2);
  box-shadow: var(--shadow-sm);
}
.consent-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.consent-card-name { font-size: 16px; font-weight: 500; color: var(--ink); }
.consent-card-title { font-size: 13px; color: var(--ink3); }
.consent-card-meta {
  display: flex; align-items: center;
  gap: 10px; flex-wrap: wrap;
}
.consent-card-date { font-size: 12px; color: var(--ink4); }
.scope-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.scope-tag {
  font-size: 11px; font-weight: 500;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--bg2);
  color: var(--ink3);
}

/* ── FAB ──────────────────────────────────────────────────────────────────── */
.fab {
  position: fixed; bottom: 24px; right: 20px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-size: 24px;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
  z-index: 50;
}
.fab:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(0,0,0,.25); }

/* ── Search Bar ───────────────────────────────────────────────────────────── */
.search-bar {
  position: relative;
  margin-bottom: 16px;
}
.search-bar input {
  padding-left: 40px;
  background: var(--white);
}
.search-bar-icon {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--ink4); font-size: 16px;
  pointer-events: none;
}

/* ── QR Block ─────────────────────────────────────────────────────────────── */
.qr-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.qr-block canvas, .qr-block img { display: inline-block; }

/* ── Proof Block ──────────────────────────────────────────────────────────── */
.proof-row {
  display: flex; justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}
.proof-row:last-child { border-bottom: none; }
.proof-label { font-size: 12px; font-weight: 500; color: var(--ink4); text-transform: uppercase; letter-spacing: .06em; }
.proof-value { font-size: 14px; color: var(--ink2); text-align: right; word-break: break-all; }

/* ── Onboarding Layout ────────────────────────────────────────────────────── */
.ob-layout {
  min-height: 100dvh;
  display: flex; flex-direction: column;
}
.ob-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}
.ob-content {
  flex: 1;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 20px 80px;
}
.ob-inner { width: 100%; max-width: 520px; }
.ob-progress-bar { margin-bottom: 32px; }
.ob-progress-label {
  font-size: 12px; color: var(--ink4);
  margin-bottom: 8px;
  display: flex; justify-content: space-between;
}

/* ── Profession Cards ────────────────────────────────────────────────────── */
.profession-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.profession-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 16px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  display: flex; flex-direction: column; gap: 8px;
}
.profession-card:hover, .profession-card.selected {
  border-color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.profession-card-icon { font-size: 28px; }
.profession-card-label { font-size: 14px; font-weight: 500; color: var(--ink); line-height: 1.3; }
.profession-card.full { grid-column: span 2; flex-direction: row; align-items: center; gap: 14px; }

/* ── Section Blocks (Onboarding Step B / Create Step 2) ──────────────────── */
.module-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 12px;
}
.module-block-header {
  padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer;
  user-select: none;
}
.module-block-title { font-size: 15px; font-weight: 500; color: var(--ink); }
.module-block-body {
  padding: 0 20px 20px;
  border-top: 1px solid var(--border);
}
.module-block-body.hidden { display: none; }

/* ── Create Flow Screen ───────────────────────────────────────────────────── */
.create-header {
  padding: 24px 20px 0;
  max-width: 680px;
  margin: 0 auto;
}
.create-body {
  max-width: 680px;
  margin: 0 auto;
  padding: 20px 20px 80px;
}

/* ── Scope Grid ───────────────────────────────────────────────────────────── */
.scope-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

/* ── Filter Tabs ─────────────────────────────────────────────────────────── */
.filter-tabs {
  display: flex; gap: 0;
  background: var(--bg2);
  border-radius: var(--r-md);
  padding: 4px;
  margin-bottom: 16px;
}
.filter-tab {
  flex: 1; text-align: center;
  padding: 7px 8px;
  font-size: 13px; font-weight: 500;
  color: var(--ink3);
  border-radius: var(--r-sm);
  cursor: pointer; border: none;
  background: transparent;
  font-family: var(--sans);
  transition: all .15s;
  text-decoration: none;
}
.filter-tab.active {
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; justify-content: center; }
}

/* ── Legal / Prose Docs ───────────────────────────────────────────────────── */
.doc-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}
.doc-wrap h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.15;
}
.doc-date {
  font-size: 13px;
  color: var(--ink4);
  margin-bottom: 48px;
  display: block;
}
.doc-section {
  border-top: 1px solid var(--border);
  padding-top: 32px;
  margin-top: 32px;
}
.doc-section h2 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 12px;
  margin-top: 0;
}
.doc-section p,
.doc-section li {
  font-size: 15px;
  color: var(--ink3);
  line-height: 1.8;
  margin-bottom: 12px;
}
.doc-section p:last-child { margin-bottom: 0; }
.doc-section a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.doc-section ul {
  padding-left: 20px;
  margin-bottom: 12px;
}
.doc-back {
  font-size: 13px;
  color: var(--ink4);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 36px;
}
.doc-back:hover { color: var(--ink); }

/* ── SEO Pages ────────────────────────────────────────────────────────────── */
.seo-hero {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 72px 24px 64px;
  text-align: center;
}
.seo-hero-inner {
  max-width: 680px;
  margin: 0 auto;
}
.seo-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink4);
  margin-bottom: 16px;
}
.seo-hero h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.15;
  margin-bottom: 18px;
}
.seo-sub {
  font-size: 17px;
  color: var(--ink3);
  line-height: 1.65;
  max-width: 560px;
  margin: 0 auto 32px;
}
.seo-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.seo-section {
  margin-bottom: 44px;
}
.seo-section h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 12px;
  margin-top: 0;
}
.seo-section p {
  font-size: 16px;
  color: var(--ink2);
  line-height: 1.8;
  margin: 0;
}
.seo-cta-box {
  background: var(--ink);
  border-radius: var(--r-xl);
  padding: 44px 32px;
  text-align: center;
  margin-top: 56px;
}
.seo-cta-box h2 {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--white);
  margin-bottom: 10px;
}
.seo-cta-box p {
  color: rgba(255,255,255,.65);
  font-size: 15px;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ── FAQ Accordion ────────────────────────────────────────────────────────── */
.faq-list {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--white);
}
.faq-item { border-bottom: 1px solid var(--border); }
.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;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  text-align: left;
  line-height: 1.4;
}
.faq-q:hover { background: var(--bg); }
.faq-icon {
  flex-shrink: 0;
  color: var(--ink3);
  transition: transform .2s;
}
.faq-item.open .faq-icon { transform: rotate(180deg); }
.faq-a {
  display: none;
  padding: 0 24px 20px;
}
.faq-item.open .faq-a { display: block; }
.faq-a p {
  font-size: 15px;
  color: var(--ink3);
  line-height: 1.75;
  margin: 0;
}
