:root {
  color-scheme: light;

  /* Website palette */
  --color-text-black: #1f1a22;
  --color-text-black-rgb: 31 26 34;
  --color-soft-sand: #f1e3cf;
  --color-soft-sand-rgb: 241 227 207;
  --color-tile-blue: #2e5d86;
  --color-tile-blue-rgb: 46 93 134;
  --color-accent-blue: var(--color-tile-blue);
  --color-accent-blue-rgb: var(--color-tile-blue-rgb);
  --color-majorelle-blue: var(--color-tile-blue);
  --color-majorelle-blue-rgb: var(--color-tile-blue-rgb);
  --color-terracotta: #b35a41;
  --color-terracotta-rgb: 179 90 65;
  --color-dusty-lavender: #c6b5d1;
  --color-dusty-lavender-rgb: 198 181 209;

  /* Legacy aliases preserved for existing selectors */
  --color-dark-fig: var(--color-text-black);
  --color-dark-fig-rgb: var(--color-text-black-rgb);
  --color-sunbaked-terracotta: var(--color-terracotta);
  --color-sunbaked-terracotta-rgb: var(--color-terracotta-rgb);
  --color-deep-mineral-blue: var(--color-majorelle-blue);
  --color-deep-mineral-blue-rgb: var(--color-majorelle-blue-rgb);
  --color-clay-terracotta: var(--color-terracotta);
  --color-clay-terracotta-rgb: var(--color-terracotta-rgb);
  --color-limestone-cream: var(--color-soft-sand);
  --color-limestone-cream-rgb: var(--color-soft-sand-rgb);
  --color-olive-sage: var(--color-dusty-lavender);
  --color-olive-sage-rgb: var(--color-dusty-lavender-rgb);
  --color-dusty-sky: var(--color-dusty-lavender);
  --color-dusty-sky-rgb: var(--color-dusty-lavender-rgb);
  --color-charcoal-ink: var(--color-dark-fig);
  --color-charcoal-ink-rgb: var(--color-dark-fig-rgb);
  --color-burnt-terracotta: var(--color-terracotta);
  --color-burnt-terracotta-rgb: var(--color-terracotta-rgb);
  --color-warm-riad-sand: var(--color-soft-sand);
  --color-warm-riad-sand-rgb: var(--color-soft-sand-rgb);
  --color-zellige-turquoise: var(--color-tile-blue);
  --color-zellige-turquoise-rgb: var(--color-tile-blue-rgb);
  --color-saffron-yellow: var(--color-dusty-lavender);
  --color-saffron-yellow-rgb: var(--color-dusty-lavender-rgb);

  /* App aliases mapped onto the website palette */
  --background: var(--color-soft-sand);
  --surface: var(--color-soft-sand);
  --surface-low: color-mix(in srgb, var(--color-soft-sand) 88%, #fff);
  --surface-mid: color-mix(in srgb, var(--color-soft-sand) 82%, var(--color-dusty-lavender));
  --surface-high: color-mix(in srgb, var(--color-soft-sand) 72%, var(--color-dusty-lavender));
  --surface-highest: color-mix(in srgb, var(--color-soft-sand) 62%, var(--color-dusty-lavender));
  --paper: color-mix(in srgb, var(--color-soft-sand) 74%, #fff);
  --ink: var(--color-text-black);
  --muted: rgb(var(--color-text-black-rgb) / 0.72);
  --primary: var(--color-terracotta);
  --primary-strong: color-mix(in srgb, var(--color-terracotta) 78%, #000);
  --primary-container: color-mix(in srgb, var(--color-terracotta) 86%, var(--color-soft-sand));
  --secondary-container: color-mix(in srgb, var(--color-terracotta) 26%, var(--color-soft-sand));
  --teal: var(--color-tile-blue);
  --teal-container: color-mix(in srgb, var(--color-tile-blue) 26%, var(--color-soft-sand));
  --danger: #9f1d1d;
  --danger-soft: color-mix(in srgb, #9f1d1d 18%, var(--color-soft-sand));
  --outline-soft: rgb(var(--color-text-black-rgb) / 0.14);
  --ambient-shadow: 0 12px 32px rgb(var(--color-text-black-rgb) / 0.07);
  --deep-shadow: 0 28px 52px rgb(var(--color-text-black-rgb) / 0.12);
  --focus-ring: 0 0 0 3px rgb(var(--color-majorelle-blue-rgb) / 0.5);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--color-text-black);
  color: var(--ink);
  font-family: Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

svg {
  width: 1.35em;
  height: 1.35em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.app-frame {
  width: min(100%, 430px);
  min-height: 100svh;
  height: 100svh;
  margin: 0 auto;
  background: var(--background);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: calc(16px + env(safe-area-inset-top)) 24px 10px;
  background: linear-gradient(180deg, rgb(var(--color-soft-sand-rgb) / 0.96), rgb(var(--color-soft-sand-rgb) / 0.74));
  backdrop-filter: blur(24px);
}

.app-frame.auth-mode .topbar {
  display: none;
}

.app-frame.wizard-mode .topbar {
  display: none;
}

.app-frame.wizard-mode .screen {
  padding: 24px 20px calc(36px + env(safe-area-inset-bottom));
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-label {
  display: none;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.step-tracker {
  position: sticky;
  top: 0;
  z-index: 7;
  height: 3px;
  background: var(--surface-highest);
}

.step-tracker span {
  display: block;
  height: 100%;
  width: 12%;
  background: var(--primary);
  transition: width 180ms ease;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.menu-mark {
  display: inline-flex;
  color: var(--primary);
}

.icon-button,
.avatar-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  color: var(--primary);
  background: transparent;
}

.avatar-button {
  color: #ffffff;
  background: var(--color-text-black);
  box-shadow: 0 0 0 2px var(--secondary-container);
  border-radius: 14px;
  font-size: 12px;
  font-weight: 800;
}

.topbar h1 {
  margin: 0;
  color: var(--primary);
  font-size: 23px;
  line-height: 1.1;
  font-weight: 800;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow.teal {
  color: var(--teal);
}

.screen {
  flex: 1;
  padding: 28px 24px calc(128px + env(safe-area-inset-bottom));
  overflow: auto;
}

.onboarding-shell {
  min-height: calc(100svh - 60px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.onboarding-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-top: env(safe-area-inset-top);
}

.onboarding-header h2 {
  margin: 4px 0 0;
  color: var(--primary);
  font-size: 29px;
  line-height: 1.05;
  font-weight: 800;
}

.onboarding-header > span {
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  height: 34px;
  color: var(--primary);
  background: var(--secondary-container);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.onboarding-progress {
  height: 5px;
  overflow: hidden;
  background: var(--surface-highest);
  border-radius: 999px;
}

.onboarding-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--teal));
  transition: width 180ms ease;
}

.wizard-card {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  background: var(--paper);
  border-radius: 8px;
  box-shadow: var(--ambient-shadow);
}

.wizard-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 31px;
  line-height: 1.08;
  font-weight: 800;
}

.wizard-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.wizard-card .form-grid {
  gap: 14px;
}

.wizard-card .field.wide {
  grid-column: 1 / -1;
}

.wizard-list {
  display: grid;
  gap: 12px;
  margin: 8px 0;
}

.wizard-list div {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px;
  color: var(--muted);
  background: var(--surface-low);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.35;
}

.wizard-list svg {
  color: var(--teal);
}

.ownership-note,
.ownership-card {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: start;
  gap: 12px;
  color: var(--muted);
  background: rgb(var(--color-tile-blue-rgb) / 0.24);
  border-radius: 8px;
  box-shadow: inset 4px 0 0 var(--teal);
}

.ownership-note {
  padding: 14px;
  font-size: 14px;
  line-height: 1.4;
}

.ownership-card {
  margin: -12px 0 28px;
  padding: 18px;
  font-size: 15px;
  line-height: 1.45;
}

.ownership-note svg,
.ownership-card svg {
  color: var(--teal);
}

.ownership-card p {
  margin: 0;
}

.home-hero-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.tip-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--primary);
  background: rgb(var(--color-soft-sand-rgb) / 0.86);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgb(var(--color-text-black-rgb) / 0.1);
}

.tip-button svg {
  width: 22px;
  height: 22px;
}

.tip-button span {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  color: #ffffff;
  background: var(--primary);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.tip-button.has-tips {
  box-shadow: inset 0 0 0 2px rgb(var(--color-terracotta-rgb) / 0.24), var(--ambient-shadow);
}

.profile-settings-form {
  display: grid;
  gap: 18px;
}

.profile-save-button {
  width: 100%;
}

.profile-section-highlight {
  animation: profile-highlight 1600ms ease-out;
  box-shadow: 0 0 0 4px rgb(var(--color-terracotta-rgb) / 0.18), var(--ambient-shadow);
}

@keyframes profile-highlight {
  0% {
    box-shadow: 0 0 0 8px rgb(var(--color-terracotta-rgb) / 0.3), var(--ambient-shadow);
  }
  100% {
    box-shadow: 0 0 0 4px rgb(var(--color-terracotta-rgb) / 0.18), var(--ambient-shadow);
  }
}

.wizard-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: auto;
}

.wizard-actions .secondary-button,
.wizard-actions .primary-button {
  width: 100%;
}

.itsme-card,
.cozo-card,
.wizard-card.done {
  text-align: center;
}

.itsme-phone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 8px auto 4px;
  width: min(100%, 260px);
  padding: 28px 18px;
  overflow: hidden;
  color: var(--color-text-black);
  background: #ffffff;
  border: 10px solid var(--color-text-black);
  border-radius: 30px;
  box-shadow: 0 24px 42px rgb(var(--color-text-black-rgb) / 0.16);
}

.itsme-phone::after {
  content: "";
  position: absolute;
  inset: auto 18px 14px;
  height: 4px;
  background: var(--color-text-black);
  border-radius: 999px;
}

.itsme-logo {
  display: inline-grid;
  place-items: center;
  width: 76px;
  height: 76px;
  color: #ffffff;
  background: #ff4a2a;
  border-radius: 22px;
  font-size: 19px;
  font-weight: 900;
}

.itsme-rings {
  position: relative;
  width: 88px;
  height: 42px;
}

.itsme-rings span {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 34px;
  height: 34px;
  border: 2px solid rgb(255 74 42 / 0.45);
  border-radius: 50%;
}

.itsme-rings span:nth-child(2) {
  width: 54px;
  height: 54px;
}

.itsme-rings span:nth-child(3) {
  width: 74px;
  height: 74px;
}

.itsme-phone.scanning .itsme-rings span {
  animation: itsme-pulse 900ms ease-in-out infinite;
}

.itsme-phone.verified .itsme-logo {
  background: var(--teal);
}

.itsme-phone strong {
  font-size: 18px;
  line-height: 1.2;
}

.itsme-phone p {
  color: var(--muted);
  font-size: 13px;
}

@keyframes itsme-pulse {
  0%,
  100% {
    scale: 0.92;
    opacity: 0.45;
  }

  50% {
    scale: 1.08;
    opacity: 1;
  }
}

.cozo-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 10px 0;
}

.cozo-preview div {
  display: grid;
  gap: 4px;
  padding: 18px 12px;
  background: var(--surface-low);
  border-radius: 8px;
}

.cozo-preview strong {
  color: var(--primary);
  font-size: 30px;
  line-height: 1;
}

.cozo-preview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  width: min(calc(100% - 32px), 398px);
  margin: 0;
  padding: 12px 8px calc(12px + env(safe-area-inset-bottom));
  background: rgb(var(--color-soft-sand-rgb) / 0.88);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -18px 42px rgb(var(--color-text-black-rgb) / 0.14);
  transform: translateX(-50%);
  backdrop-filter: blur(24px);
  transition: transform 180ms ease, opacity 180ms ease;
  will-change: transform;
}

.tabbar.nav-hidden {
  opacity: 0.94;
  transform: translateX(-50%) translateY(calc(100% - 14px));
}

.tab-button {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 58px;
  padding: 7px 4px;
  color: var(--muted);
  background: transparent;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.home-documents-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  margin-bottom: 18px;
}

.compact-list {
  gap: 10px;
}

.compact-list .mini-item {
  padding: 14px;
  border-radius: 18px;
}

.tab-button.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  box-shadow: var(--ambient-shadow);
}

.nav-icon {
  display: inline-flex;
}

.paper-card,
.paper-section,
.folder-card,
.summary-hero {
  background: var(--paper);
  border-radius: 32px;
  box-shadow: var(--ambient-shadow);
}

.paper-card,
.paper-section {
  padding: 24px;
  margin-bottom: 24px;
}

.paper-section {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.home-hero {
  margin: 10px 0 26px;
}

.home-hero h2,
.data-hero h2,
.vault-hero h2,
.share-hero h2,
.auth-copy h2 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: clamp(42px, 13vw, 58px);
  line-height: 1.04;
  font-weight: 800;
}

.home-hero h2 span,
.data-hero h2 span,
.vault-hero h2 {
  color: var(--primary-container);
}

.summary-hero {
  padding: 38px 32px;
  margin-bottom: 32px;
  background: var(--surface-low);
  box-shadow: none;
}

.summary-hero p:last-child {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.55;
  font-weight: 500;
}

.summary-hero strong {
  color: var(--teal);
}

.cta-card {
  margin-bottom: 32px;
  padding: 32px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  border-radius: 28px;
  box-shadow: var(--deep-shadow);
}

.cta-card svg {
  width: 34px;
  height: 34px;
  margin-bottom: 26px;
}

.cta-card h2 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.15;
}

.cta-card p {
  margin: 0 0 26px;
  color: rgb(255 255 255 / 0.9);
  line-height: 1.45;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.section-heading.compact {
  align-items: center;
  margin: 28px 0 16px;
}

.section-heading h2,
.section-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.15;
  font-weight: 800;
}

.section-heading p,
.muted {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.auth-layout {
  display: grid;
  gap: 24px;
}

.secure-auth {
  min-height: calc(100svh - 120px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
  padding: 12px 0 36px;
}

.secure-auth.verify-auth {
  justify-content: flex-start;
  gap: 18px;
  padding-top: 8px;
}

.secure-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  color: var(--primary);
}

.secure-brand strong {
  font-size: 25px;
  font-weight: 800;
}

.secure-intro {
  text-align: center;
}

.secure-intro h2 {
  margin: 0;
  font-size: 46px;
  line-height: 1.08;
  font-weight: 800;
}

.verify-auth .secure-intro h2 {
  margin-top: 6px;
  font-size: 40px;
  line-height: 1.02;
}

.secure-intro p {
  width: min(100%, 340px);
  margin: 16px auto 0;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.45;
}

.verify-auth .secure-intro p:not(.eyebrow) {
  width: min(100%, 330px);
  margin-top: 12px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.45;
}

.verify-auth .secure-intro p strong {
  color: var(--ink);
  font-weight: 800;
}

.secure-panel {
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.secure-field {
  gap: 12px;
}

.secure-field span {
  color: var(--primary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  letter-spacing: 0;
}

.secure-field input {
  min-height: 66px;
  border-radius: 0;
  background: color-mix(in srgb, var(--color-terracotta) 13%, var(--color-soft-sand));
  box-shadow: inset 0 0 0 2px rgb(var(--color-text-black-rgb) / 0.18);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
}

.demo-account-note,
.fake-mail-card {
  padding: 18px;
  color: var(--primary);
  background: color-mix(in srgb, var(--color-soft-sand) 88%, #fff);
  border-radius: 4px;
  box-shadow: inset 0 0 0 2px rgb(var(--color-terracotta-rgb) / 0.14);
}

.demo-account-note {
  display: grid;
  gap: 4px;
}

.demo-account-note strong,
.fake-mail-card h3,
.fake-mail-card strong {
  color: var(--ink);
}

.demo-account-note span,
.fake-mail-card span {
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
}

.fake-mail-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  text-align: left;
}

.fake-mail-card h3 {
  margin: 0;
  font-size: 22px;
}

.fake-mail-card strong {
  flex: 0 0 auto;
  padding: 9px 10px;
  color: var(--primary);
  background: rgb(var(--color-terracotta-rgb) / 0.09);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 20px;
  letter-spacing: 0.12em;
  line-height: 1;
  white-space: nowrap;
}

.fake-mail-card .eyebrow {
  margin: 0 0 4px;
}

.fake-mail-card span {
  display: block;
  line-height: 1.3;
}

.verification-display {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
  margin-bottom: 12px;
}

.verification-display span {
  display: grid;
  place-items: center;
  min-height: 50px;
  color: var(--ink);
  background: var(--surface-low);
  border: 1px solid var(--outline-soft);
  border-radius: 8px;
  box-shadow: inset 0 -2px 0 rgb(var(--color-text-black-rgb) / 0.05);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 26px;
  font-weight: 800;
}

.verification-display span.active {
  border-color: rgb(var(--color-terracotta-rgb) / 0.62);
  box-shadow: 0 0 0 3px rgb(var(--color-terracotta-rgb) / 0.10);
}

.verification-display span.filled {
  color: var(--primary);
  background: rgb(var(--color-terracotta-rgb) / 0.10);
  border-color: rgb(var(--color-terracotta-rgb) / 0.28);
}

.verification-quick-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.verification-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.verification-pad button {
  min-height: 52px;
  color: var(--primary);
  background: rgb(255 255 255 / 0.28);
  border: 1px solid var(--outline-soft);
  border-radius: 8px;
  box-shadow: none;
  font-size: 20px;
  font-weight: 800;
}

.verification-pad button:active {
  translate: 0 1px;
  background: rgb(var(--color-terracotta-rgb) / 0.10);
}

.secure-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 70px;
  margin-top: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--color-terracotta));
  border-radius: 4px;
  box-shadow: var(--deep-shadow);
  font-size: 22px;
  font-weight: 800;
}

.secure-submit:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  filter: grayscale(0.35);
}

.biometric-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 66px;
  margin-top: 16px;
  overflow: hidden;
  color: var(--primary);
  background: color-mix(in srgb, var(--color-terracotta) 13%, var(--color-soft-sand));
  border-radius: 4px;
  box-shadow: inset 0 0 0 2px rgb(var(--color-text-black-rgb) / 0.18);
  font-size: 18px;
  font-weight: 800;
}

.verification-quick-actions .biometric-button {
  min-height: 46px;
  margin-top: 0;
  gap: 8px;
  padding: 0 13px;
  background: var(--surface-low);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--outline-soft);
  font-size: 13px;
}

.verification-quick-actions .biometric-button svg {
  width: 17px;
  height: 17px;
}

.verification-quick-actions .text-button {
  min-height: 42px;
  padding: 0 4px;
  font-size: 12px;
  white-space: nowrap;
}

.biometric-button::after {
  content: "";
  position: absolute;
  inset: 0;
  translate: -110% 0;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.48), transparent);
}

.biometric-button.scanning::after {
  animation: biometric-scan 820ms ease-out;
}

.biometric-orbit {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgb(var(--color-terracotta-rgb) / 0.10);
}

.biometric-orbit svg {
  width: 22px;
  height: 22px;
}

.biometric-button.scanning .biometric-orbit {
  animation: biometric-pulse 820ms ease-out;
}

@keyframes biometric-scan {
  from {
    translate: -110% 0;
  }

  to {
    translate: 110% 0;
  }
}

@keyframes biometric-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgb(var(--color-terracotta-rgb) / 0);
  }

  45% {
    box-shadow: 0 0 0 10px rgb(var(--color-terracotta-rgb) / 0.14);
  }
}

.auth-copy {
  padding: 12px 0 0;
}

.auth-copy p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}

.auth-panel h2 {
  margin: 0 0 22px;
  font-size: 25px;
  line-height: 1.15;
}

.security-note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 24px;
  padding: 18px;
  background: var(--surface-low);
  border-radius: 16px;
  box-shadow: inset 4px 0 0 var(--primary);
}

.security-note svg {
  color: var(--primary);
  flex: 0 0 auto;
}

.security-note strong,
.security-note span {
  display: block;
}

.security-note span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-section-title {
  margin: 10px 0 -4px 4px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-section-title.wide {
  grid-column: 1 / -1;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  margin-left: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

input,
textarea,
select {
  width: 100%;
  border: 0;
  border-radius: 12px 12px 8px 8px;
  padding: 13px 14px;
  color: var(--ink);
  background: var(--surface-high);
  outline: 0;
  box-shadow: inset 0 -2px 0 rgb(var(--color-text-black-rgb) / 0.24);
}

textarea {
  min-height: 82px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  background: var(--paper);
  box-shadow: inset 0 -2px 0 var(--primary), 0 0 0 4px rgb(var(--color-terracotta-rgb) / 0.12);
}

select {
  appearance: none;
}

@media (min-width: 620px) {
  .profile-card .form-grid,
  .wizard-card .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-card .primary-button,
  .wizard-actions {
    grid-column: 1 / -1;
  }
}

.primary-button,
.secondary-button,
.danger-button,
.ghost-button,
.inverted-button,
.inverted-ghost-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  font-weight: 800;
  text-decoration: none;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
}

.secondary-button {
  color: var(--primary);
  background: var(--surface-low);
}

.danger-button {
  color: var(--danger);
  background: var(--danger-soft);
}

.ghost-button,
.text-button {
  min-height: 38px;
  color: var(--primary);
  background: transparent;
  padding: 8px 4px;
}

.inverted-button {
  width: 100%;
  color: var(--primary);
  background: var(--paper);
}

.inverted-ghost-button {
  color: #ffffff;
  background: rgb(255 255 255 / 0.14);
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.button-row > button,
.button-row > a {
  flex: 1 1 145px;
}

.switch-auth {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.switch-auth button {
  min-height: auto;
  color: var(--primary);
  background: transparent;
  padding: 4px;
  font-weight: 800;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stats-grid.two-up {
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 28px;
}

.stat {
  min-height: 112px;
  padding: 16px;
  border-radius: 24px;
  background: var(--surface-low);
}

.stat svg {
  color: var(--primary);
}

.stat strong {
  display: block;
  margin-top: 10px;
  font-size: 26px;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.teal-stat {
  background: var(--surface-highest);
}

.teal-stat svg {
  color: var(--teal);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--primary-strong);
  background: var(--secondary-container);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.needs_id {
  color: var(--primary);
  background: var(--surface-highest);
}

.status-pill.needs_form,
.status-pill.email_draft,
.status-pill.followup_needed {
  color: var(--primary-strong);
  background: color-mix(in srgb, var(--color-terracotta) 22%, var(--color-soft-sand));
}

.status-pill.received {
  color: var(--teal);
  background: rgb(var(--color-tile-blue-rgb) / 0.36);
}

.status-pill.found,
.status-pill.requested {
  color: var(--muted);
  background: var(--surface-mid);
}

.request-action-panel {
  display: grid;
  gap: 14px;
}

.request-flow-list,
.request-notification-list {
  display: grid;
  gap: 12px;
}

.request-flow-card,
.request-notification-item {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: var(--surface-low);
  border: 1px solid var(--outline-soft);
  border-radius: 22px;
}

.request-flow-card h3,
.request-notification-item h3 {
  margin: 8px 0 4px;
  font-size: 16px;
}

.request-flow-card p,
.request-notification-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.request-notification-item {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.email-preview {
  max-height: 320px;
  overflow: auto;
  margin: 18px 0;
  padding: 16px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--outline-soft);
  border-radius: 18px;
  font: 500 13px/1.5 Manrope, ui-sans-serif, system-ui, sans-serif;
  white-space: pre-wrap;
}

.mini-list,
.source-list,
.document-list,
.summary-list {
  display: grid;
  gap: 16px;
}

.mini-item,
.source-item,
.document-item,
.summary-item {
  background: var(--paper);
  border-radius: 24px;
}

.mini-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
}

.mini-item h3,
.source-item h3,
.document-item h3,
.summary-item h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
}

.mini-item p,
.source-item p,
.document-item p,
.summary-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.data-hero,
.vault-hero,
.share-hero {
  margin: 6px 0 28px;
}

.data-hero p,
.vault-hero p,
.share-hero p {
  max-width: 86%;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.48;
}

.source-section {
  display: grid;
  gap: 12px;
}

.source-item {
  padding: 22px;
}

.source-item header,
.document-item header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.source-lockup,
.document-lockup {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.source-icon,
.doc-icon,
.folder-symbol {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  color: var(--primary);
  background: rgb(var(--color-terracotta-rgb) / 0.44);
}

.source-icon.teal {
  color: var(--teal);
  background: rgb(var(--color-tile-blue-rgb) / 0.28);
}

.source-icon.warm {
  color: var(--primary);
  background: rgb(var(--color-terracotta-rgb) / 0.10);
}

.progress-row {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.progress-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-mid);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.source-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.transparency-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 14px;
  color: var(--muted);
  background: color-mix(in srgb, var(--color-soft-sand) 88%, #fff);
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgb(var(--color-terracotta-rgb) / 0.14);
  font-size: 13px;
  line-height: 1.4;
}

.transparency-note svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.source-contact {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 12px;
  color: var(--muted);
  background: var(--surface-low);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.35;
}

.care-source-results {
  margin-top: 20px;
}

.care-source-result-list {
  display: grid;
  gap: 12px;
}

.care-source-candidate {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--surface-low);
  border-radius: 8px;
}

.care-source-candidate h3 {
  margin: 8px 0 6px;
  font-size: 18px;
  line-height: 1.2;
}

.care-source-candidate p,
.care-source-candidate em {
  display: block;
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.summary-warning-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  margin: -8px 0 18px;
  padding: 18px;
  background: color-mix(in srgb, var(--color-terracotta) 14%, var(--paper));
  border-radius: 8px;
  box-shadow: inset 4px 0 0 var(--primary), var(--ambient-shadow);
}

.summary-warning-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--primary);
  background: rgb(var(--color-soft-sand-rgb) / 0.72);
  border-radius: 999px;
}

.summary-warning-card h3 {
  margin: 2px 0 8px;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.22;
}

.summary-warning-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.transparency-panel {
  display: grid;
  gap: 12px;
  margin: 20px 0;
  padding: 18px;
  background: var(--surface-low);
  border-radius: 20px;
}

.transparency-panel strong {
  color: var(--primary);
}

.email-editor-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.email-editor {
  min-height: min(52vh, 460px);
  font-family: ui-monospace, SFMono-Regular, "Cascadia Mono", "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.email-response-preview {
  overflow: auto;
  max-height: 260px;
  margin: 0;
  white-space: pre-wrap;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, "Cascadia Mono", "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
}

.editor-note {
  margin-top: 0;
}

.source-actions input:not([hidden]) + button {
  margin-top: 0;
}

.folder-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 30px;
}

.vault-action-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.vault-action-card {
  padding: 22px;
  background: var(--surface-low);
  box-shadow: none;
}

.vault-action-card h2 {
  margin: 4px 0 8px;
  color: var(--ink);
  font-size: 22px;
}

.vault-action-card p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.45;
}

.folder-card {
  position: relative;
  overflow: hidden;
  min-height: 236px;
  padding: 28px;
  background: var(--surface-low);
  box-shadow: none;
}

.folder-card.private {
  background: var(--paper);
  box-shadow: var(--ambient-shadow);
}

.folder-card.drag-over {
  box-shadow: inset 0 0 0 4px rgb(var(--color-tile-blue-rgb) / 0.16), var(--ambient-shadow);
}

.accent-strip {
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  background: var(--primary-container);
}

.folder-card.private .accent-strip {
  background: var(--teal);
}

.folder-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 26px;
}

.folder-meta-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.info-icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  color: var(--teal);
  background: rgb(var(--color-tile-blue-rgb) / 0.14);
  border-radius: 999px;
}

.info-icon-button svg {
  width: 18px;
  height: 18px;
}

.folder-card h2 {
  margin: 0 0 10px;
  font-size: 25px;
}

.folder-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.folder-card.private .folder-symbol {
  color: var(--teal);
  background: rgb(var(--color-tile-blue-rgb) / 0.25);
}

.folder-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 24px;
}

.folder-tags span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-right: -6px;
  border-radius: 12px;
  color: var(--primary-strong);
  background: var(--secondary-container);
  box-shadow: 0 0 0 2px var(--surface-low);
  font-size: 9px;
  font-weight: 800;
}

.folder-card.private .folder-tags span {
  color: var(--teal);
  background: rgb(var(--color-tile-blue-rgb) / 0.38);
  box-shadow: 0 0 0 2px var(--paper);
}

.document-panel {
  overflow: hidden;
  padding: 24px 0 10px;
}

.document-panel .section-heading {
  padding: 0 24px;
}

.vault-source-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 24px 14px;
}

.document-list {
  padding: 0 14px 8px;
}

.document-item {
  padding: 16px 14px;
  background: transparent;
}

.document-item:hover {
  background: var(--surface-low);
}

.document-item[draggable="true"] {
  cursor: grab;
}

.document-item h3 {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-select {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 50px;
}

.document-select input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.document-select span {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: var(--surface-high);
  box-shadow: inset 0 0 0 2px rgb(var(--color-text-black-rgb) / 0.28);
}

.document-select input:checked + span {
  background: var(--teal);
  box-shadow: inset 0 0 0 2px var(--teal);
}

.document-select input:checked + span::after {
  content: "";
  display: block;
  width: 10px;
  height: 6px;
  margin: 6px auto 0;
  border: solid #ffffff;
  border-width: 0 0 2px 2px;
  rotate: -45deg;
}

.doc-date {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

.document-actions {
  display: flex;
  gap: 8px;
  margin: 12px 0 0 64px;
}

.document-actions a,
.document-actions button {
  flex: 1;
}

.document-source-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.document-source-row.prominent {
  margin: 14px 0;
  font-size: 13px;
}

.source-kind {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface-low);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.source-kind.official {
  color: var(--teal);
  background: rgb(var(--color-tile-blue-rgb) / 0.14);
}

.source-kind.uploaded {
  color: var(--primary);
  background: rgb(var(--color-terracotta-rgb) / 0.16);
}

.document-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  color: var(--primary);
  background: var(--surface-low);
  text-decoration: none;
  font-weight: 800;
}

.summary-list {
  margin-bottom: 24px;
}

.summary-item {
  padding: 22px;
}

.summary-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.summary-language-picker {
  display: grid;
  gap: 5px;
  min-width: 118px;
}

.summary-language-picker span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-language-picker select {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 8px;
}

.summary-text {
  display: block;
  margin-top: 14px;
  white-space: pre-wrap;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

.summary-preview-button {
  display: grid;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.summary-preview-button .summary-text {
  max-height: 154px;
  overflow: hidden;
}

.summary-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--outline-soft);
  color: var(--muted);
  font-size: 12px;
}

.summary-preview-footer strong {
  color: var(--primary);
}

.summary-detail-modal {
  width: min(760px, calc(100vw - 28px));
}

.summary-build-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.summary-build-panel div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--outline-soft);
  border-radius: 12px;
  background: var(--surface-low);
}

.summary-build-panel strong {
  font-size: 24px;
}

.summary-build-panel span,
.summary-source-group .muted {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.summary-source-section,
.summary-full-text,
.summary-detail-share {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.summary-source-section h3,
.summary-full-text h3,
.summary-source-group h4 {
  margin: 0;
}

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

.summary-source-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--outline-soft);
  border-radius: 12px;
  color: inherit;
  background: var(--surface-low);
  text-align: left;
  cursor: pointer;
}

.summary-source-link strong,
.summary-source-link small {
  display: block;
}

.summary-source-link small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.summary-source-link em {
  align-self: start;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-source-link em.official {
  color: var(--teal);
  background: rgb(var(--color-tile-blue-rgb) / 0.14);
}

.summary-source-link em.uploaded {
  color: var(--primary);
  background: rgb(var(--color-terracotta-rgb) / 0.16);
}

.document-preview-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.document-preview-heading h2 {
  margin-bottom: 4px;
}

.document-preview-body {
  max-height: 38svh;
  overflow: auto;
  margin: 14px 0 18px;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface-low);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.summary-share-methods {
  margin-bottom: 0;
}

.share-output {
  display: grid;
  gap: 20px;
}

.share-summary-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  margin-bottom: 22px;
}

.share-expiry-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  margin-bottom: 22px;
}

.share-scope-options {
  display: grid;
  gap: 10px;
}

.share-scope-options button {
  display: grid;
  gap: 4px;
  justify-items: start;
  padding: 14px;
  color: var(--ink);
  background: var(--surface-low);
  border: 1px solid var(--outline-soft);
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
}

.share-scope-options button span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.share-scope-options button.active {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary);
}

.share-scope-options button.active span {
  color: rgb(255 255 255 / 0.84);
}

.share-duration-control {
  display: grid;
  gap: 12px;
}

.share-duration-control h2 {
  margin: 0 0 4px;
  font-size: 22px;
}

.share-duration-control p,
.share-expiry-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.share-duration-control input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

.duration-scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.summary-action-grid {
  display: grid;
  gap: 14px;
}

.summary-action-grid article {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--outline-soft);
  border-radius: 18px;
  background: var(--surface-low);
}

.summary-action-grid h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.18;
}

.summary-action-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.summary-action-grid .eyebrow {
  color: var(--teal);
}

.share-qr-card,
.share-link-card,
.family-card,
.share-private-card,
.share-security-note,
.share-method-card {
  margin-bottom: 22px;
  border-radius: 32px;
}

.share-qr-card {
  padding: 28px;
  background: var(--surface-low);
}

.share-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.share-card-heading h2,
.share-link-card h2,
.family-card h2,
.share-private-card h2,
.share-method-card h2 {
  margin: 0 0 6px;
  font-size: 21px;
  line-height: 1.18;
}

.share-card-heading p,
.share-link-card p,
.family-card p,
.share-private-card p,
.share-security-note p,
.share-method-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.share-card-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  color: var(--primary);
  background: color-mix(in srgb, var(--color-terracotta) 13%, var(--color-soft-sand));
  border-radius: 14px;
}

.share-card-icon.neutral {
  color: var(--muted);
  background: var(--surface-high);
}

.qr-frame {
  display: grid;
  place-items: center;
  width: min(190px, 100%);
  margin: 0 auto 18px;
  padding: 10px;
  background: var(--paper);
  border-radius: 16px;
  box-shadow: var(--ambient-shadow);
}

.qr-frame #qr-canvas {
  width: 100%;
  border-radius: 8px;
  box-shadow: none;
}

.code-box.compact {
  min-height: 48px;
  font-size: 22px;
}

.share-link-card {
  padding: 28px;
  color: #ffffff;
  background: linear-gradient(145deg, var(--color-tile-blue), var(--teal));
  box-shadow: var(--deep-shadow);
}

.share-link-card .share-card-icon {
  margin-bottom: 24px;
  color: #ffffff;
  background: rgb(255 255 255 / 0.18);
}

.share-link-card h2,
.share-link-card p {
  color: #ffffff;
}

.share-link-card p {
  margin-bottom: 24px;
  opacity: 0.9;
}

.share-link.on-teal {
  margin-top: 16px;
  color: #ffffff;
  font-size: 12px;
}

.share-methods {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.share-method-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  background: var(--paper);
  box-shadow: var(--ambient-shadow);
}

.share-method-card.disabled {
  background: rgb(255 255 255 / 0.42);
  box-shadow: none;
}

.share-method-card.disabled .share-card-icon {
  color: var(--muted);
  background: var(--surface-high);
}

.share-method-card .muted {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.share-secret-placeholder {
  display: grid;
  gap: 6px;
  padding: 16px;
  color: var(--muted);
  background: var(--surface-low);
  border: 1px dashed var(--outline-soft);
  border-radius: 18px;
}

.share-secret-placeholder strong {
  color: var(--ink);
  font-size: 15px;
}

.share-secret-placeholder span {
  font-size: 12px;
  line-height: 1.4;
}

.shared-language-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.shared-language-actions a {
  padding: 9px 12px;
  color: var(--primary);
  background: var(--surface-low);
  border: 1px solid var(--outline-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.translation-warning {
  padding: 14px;
  color: var(--primary);
  background: color-mix(in srgb, var(--color-soft-sand) 90%, #fff);
  border: 1px solid color-mix(in srgb, var(--color-terracotta) 32%, var(--color-soft-sand));
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.45;
}

.original-summary {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--outline-soft);
}

.original-summary summary {
  color: var(--primary);
  font-weight: 900;
  cursor: pointer;
}

.qr-placeholder {
  display: grid;
  place-items: center;
  width: 146px;
  aspect-ratio: 1;
  margin: 2px auto 0;
  border: 1px dashed rgb(var(--color-text-black-rgb) / 0.28);
  border-radius: 18px;
  color: var(--muted);
  background: var(--surface-low);
  font-weight: 800;
}

.family-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  overflow: hidden;
  padding: 28px;
  background: var(--paper);
  box-shadow: var(--ambient-shadow);
}

.family-stack {
  display: flex;
  margin-top: 18px;
}

.family-stack span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-right: -6px;
  color: var(--primary);
  background: var(--surface-high);
  border-radius: 12px;
  box-shadow: 0 0 0 2px var(--paper);
  font-size: 11px;
  font-weight: 800;
}

.share-private-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 28px;
  background: var(--surface-low);
}

.share-private-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.share-private-card i {
  position: relative;
  width: 50px;
  height: 30px;
  border-radius: 999px;
  background: var(--surface-highest);
}

.share-private-card i::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgb(var(--color-text-black-rgb) / 0.18);
  transition: transform 160ms ease;
}

.share-private-card input:checked + i {
  background: var(--primary);
}

.share-private-card input:checked + i::after {
  transform: translateX(20px);
}

.share-security-note {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px;
  background: rgb(255 255 255 / 0.38);
}

.share-security-note svg {
  flex: 0 0 auto;
  color: var(--teal);
}

.code-box {
  display: grid;
  place-items: center;
  min-height: 82px;
  border-radius: 18px;
  color: var(--teal);
  background: rgb(var(--color-tile-blue-rgb) / 0.26);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0;
}

.share-link {
  display: block;
  overflow-wrap: anywhere;
  color: var(--primary);
  font-weight: 800;
}

.qr-wrap {
  display: grid;
  place-items: center;
}

#qr-canvas {
  width: min(260px, 100%);
  height: auto;
  border-radius: 22px;
  background: white;
  box-shadow: var(--ambient-shadow);
}

.empty-state {
  border-radius: 22px;
  padding: 22px;
  color: var(--muted);
  background: var(--surface-low);
  text-align: center;
  font-size: 14px;
}

.access-card {
  padding: 28px;
  margin-top: 26px;
  background: var(--surface-mid);
  border-radius: 32px;
}

.activity-list {
  display: grid;
  gap: 18px;
}

.activity-list.full {
  max-height: 60svh;
  overflow: auto;
  padding-right: 4px;
}

.activity-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.activity-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  color: var(--teal);
  background: var(--paper);
  border-radius: 16px;
  box-shadow: var(--ambient-shadow);
}

.activity-item h3 {
  margin: 0;
  font-size: 15px;
}

.activity-item p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.activity-item strong {
  color: var(--teal);
  font-size: 12px;
}

.access-card .secondary-button {
  width: 100%;
  margin-top: 22px;
  color: var(--muted);
  background: rgb(255 255 255 / 0.38);
}

.vault-tools {
  display: grid;
  gap: 12px;
  padding: 0 24px 18px;
}

.selection-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.selection-row .text-button {
  min-height: auto;
  padding: 0;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (min-width: 620px) {
  .vault-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.fab-button {
  position: fixed;
  right: max(22px, calc((100vw - 430px) / 2 + 22px));
  bottom: calc(102px + env(safe-area-inset-bottom));
  z-index: 8;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  min-height: 56px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  border-radius: 18px;
  box-shadow: var(--deep-shadow);
  font-size: 34px;
  line-height: 1;
  font-weight: 400;
}

.overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgb(var(--color-text-black-rgb) / 0.28);
  backdrop-filter: blur(8px);
}

.drawer-panel,
.popover-panel,
.modal-panel {
  position: fixed;
  z-index: 31;
  color: var(--ink);
  background: rgb(var(--color-soft-sand-rgb) / 0.94);
  box-shadow: var(--deep-shadow);
  backdrop-filter: blur(24px);
}

.drawer-panel {
  top: calc(12px + env(safe-area-inset-top));
  left: max(12px, calc((100vw - 430px) / 2 + 12px));
  width: min(360px, calc(100vw - 36px));
  max-height: calc(100svh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow: auto;
  padding: 22px;
  border-radius: 28px;
}

.popover-panel {
  top: calc(72px + env(safe-area-inset-top));
  right: max(14px, calc((100vw - 430px) / 2 + 14px));
  width: min(380px, calc(100vw - 28px));
  max-height: 76svh;
  overflow: auto;
  padding: 22px;
  border-radius: 28px;
}

.modal-panel {
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  width: min(400px, calc(100vw - 28px));
  max-height: 86svh;
  overflow: auto;
  transform: translateX(-50%);
  padding: 24px;
  border-radius: 32px;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.drawer-panel h2,
.popover-panel h2,
.modal-panel h2,
.privacy-illustration h2 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.12;
}

.drawer-panel p,
.popover-panel p,
.modal-panel p,
.privacy-illustration p {
  color: var(--muted);
}

.contact-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.contact-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--outline-soft);
}

.contact-list strong {
  font-size: 13px;
}

.contact-list span {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.drawer-nav {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

.drawer-nav.compact {
  margin: 20px 0;
}

.drawer-nav button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  width: 100%;
  padding: 14px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.drawer-nav button.active,
.drawer-nav button:hover {
  color: var(--primary);
  background: var(--surface-low);
}

.profile-tip-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.profile-tip-item {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--surface-low);
  border-radius: 8px;
}

.profile-tip-item h3 {
  margin: 0 0 3px;
  font-size: 15px;
  line-height: 1.2;
}

.profile-tip-item p {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.profile-tip-item.done {
  opacity: 0.75;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 14px;
  color: #ffffff;
  background: var(--color-text-black);
  box-shadow: 0 0 0 3px var(--secondary-container);
  border-radius: 18px;
  font-weight: 800;
}

.profile-menu .danger-button {
  width: 100%;
}

.privacy-illustration {
  overflow: hidden;
  margin-bottom: 24px;
}

.secure-window {
  display: grid;
  place-items: center;
  min-height: 230px;
  margin-bottom: 26px;
  background: var(--surface-mid);
  border-radius: 32px;
}

.secure-window::before {
  content: "";
  width: 64px;
  height: 8px;
  align-self: start;
  margin-top: -4px;
  background: var(--teal);
  border-radius: 999px;
}

.secure-window div {
  width: 70%;
  aspect-ratio: 1;
  border-radius: 32px;
  background: var(--surface-high);
}

.privacy-list {
  display: grid;
  gap: 14px;
}

.advanced-export-section {
  margin-top: 18px;
}

.advanced-export-section details {
  padding: 16px;
  background: var(--surface-low);
  border-radius: 8px;
}

.advanced-export-section summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 900;
}

.advanced-export-section h3 {
  margin: 16px 0 8px;
  font-size: 18px;
}

.advanced-export-section p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.toggle-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
  background: var(--paper);
  border-radius: 24px;
  box-shadow: var(--ambient-shadow);
}

.toggle-card strong,
.toggle-card em {
  display: block;
}

.toggle-card strong {
  font-size: 16px;
}

.toggle-card em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.35;
}

.toggle-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-card i {
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: var(--surface-highest);
}

.toggle-card i::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgb(var(--color-text-black-rgb) / 0.18);
  transition: transform 160ms ease;
}

.toggle-card input:checked + i {
  background: var(--teal);
}

.toggle-card input:checked + i::after {
  transform: translateX(20px);
}

.notification-stream {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top));
  left: 50%;
  z-index: 40;
  display: grid;
  gap: 10px;
  width: min(390px, calc(100% - 28px));
  transform: translateX(-50%);
  pointer-events: none;
}

.notification-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  background: rgb(var(--color-soft-sand-rgb) / 0.96);
  border: 1px solid var(--outline-soft);
  border-radius: 22px;
  box-shadow: var(--deep-shadow);
  pointer-events: auto;
}

.notification-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.notification-actions .secondary-button,
.notification-actions .text-button {
  min-height: 38px;
  padding: 9px 11px;
  white-space: nowrap;
}

.notification-card h2 {
  margin: 2px 0 4px;
  font-size: 18px;
  line-height: 1.15;
}

.notification-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 20;
  width: min(382px, calc(100% - 28px));
  transform: translateX(-50%);
  padding: 14px 16px;
  border-radius: 18px;
  color: #ffffff;
  background: var(--color-text-black);
  box-shadow: 0 18px 42px rgb(var(--color-text-black-rgb) / 0.24);
  font-size: 14px;
}

.hidden {
  display: none !important;
}

.share-body {
  background: var(--background);
}

.share-page {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 24px;
}

.share-summary {
  padding: 24px;
  background: white;
  border-radius: 32px;
  box-shadow: var(--ambient-shadow);
}

.share-summary h1 {
  margin: 6px 0;
  color: var(--primary);
  font-size: 30px;
  line-height: 1.15;
}

@media (min-width: 760px) {
  .app-frame {
    min-height: min(100svh, 920px);
    margin-top: 0;
  }

  .folder-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 420px) {
  .summary-build-panel {
    grid-template-columns: 1fr;
  }

  .summary-source-link {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .summary-source-link em {
    grid-column: 2;
    justify-self: start;
  }
}
