:root {
  --ink: #17212f;
  --muted: #647083;
  --line: #dfe6ee;
  --surface: rgba(255, 255, 255, 0.88);
  --blue: #176bda;
  --blue-dark: #0f51ad;
  --soft-blue: #e8f1ff;
  --green: #18794e;
  --soft-green: #e7f6ed;
  --amber: #9b5c00;
  --soft-amber: #fff4d8;
  --red: #ba2d35;
  --text: var(--ink);
  --accent: var(--blue);
  --accent-soft: var(--soft-blue);
  --surface-soft: #f3f5f8;
  --good: var(--green);
  --danger: var(--red);
  --shadow: 0 20px 60px rgba(28, 50, 77, 0.1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f4f7fb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(106, 165, 255, 0.22), transparent 32rem),
    radial-gradient(circle at 90% 12%, rgba(147, 116, 255, 0.14), transparent 30rem),
    #f4f7fb;
}

button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(23, 107, 218, 0.28);
  outline-offset: 2px;
}

.shell { min-height: 100vh; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 750; letter-spacing: -0.02em; }
.brand img { width: 34px; height: 34px; object-fit: contain; }
.brand small { display: block; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; }

.page { width: min(1120px, calc(100% - 36px)); margin: 0 auto; padding: 46px 0 72px; }
.landing-page { padding-top: 27px; }
.landing-brand { display: flex; align-items: center; gap: 11px; font-size: 17px; letter-spacing: -.025em; }
.landing-brand img { width: 34px; height: 34px; }
.admin-shell { display: grid; min-height: 100vh; grid-template-columns: 258px minmax(0,1fr); background: #f7f8fa; }
.admin-sidebar { position: sticky; top: 0; display: flex; height: 100vh; min-width: 0; flex-direction: column; padding: 18px 12px 14px; border-right: 1px solid var(--line); background: #fff; }
.admin-brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 21px; }
.admin-brand img { width: 34px; height: 34px; }
.admin-brand strong { display: block; }
.admin-brand strong { font-size: 17px; letter-spacing: -.025em; }
.admin-nav { display: grid; gap: 2px; }
.admin-nav-label { padding: 11px 11px 6px; color: #818a97; font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.admin-nav-label.separated { margin-top: 14px; padding-top: 19px; border-top: 1px solid var(--line); }
.admin-nav a { display: flex; min-height: 40px; align-items: center; gap: 11px; padding: 8px 11px; border-radius: 8px; color: #455163; text-decoration: none; font-size: 13px; font-weight: 650; }
.admin-nav a > span { width: 20px; color: #6f7b8c; font-size: 16px; text-align: center; }
.admin-nav a:hover { background: #f3f5f8; }
.admin-nav a.active { color: var(--blue-dark); background: var(--soft-blue); }
.admin-nav a.active > span { color: var(--blue); }
.admin-sidebar-footer { position: relative; margin-top: auto; padding: 13px 3px 0; border-top: 1px solid var(--line); }
.admin-main { min-width: 0; }
.admin-content { width: min(1180px,calc(100% - 48px)); margin: 0 auto; padding: 38px 0 90px; }
.dashboard-page { padding-top: 4px; }
.admin-shell .card { border-radius: 13px; box-shadow: 0 2px 7px rgba(31,47,68,.055); }
.admin-shell .setup-quest { border-radius: 10px; }
.admin-shell .dashboard-head { margin-bottom: 21px; }
.admin-shell .dashboard-head h1 { margin: 8px 0 7px; font-size: clamp(34px,4vw,48px); }
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: clamp(32px, 7vw, 90px); min-height: calc(100vh - 105px); }
.eyebrow { color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(42px, 6vw, 72px); line-height: 0.98; letter-spacing: -0.055em; margin-bottom: 24px; }
h2 { font-size: clamp(26px, 3vw, 38px); line-height: 1.08; letter-spacing: -0.035em; }
h3 { font-size: 17px; letter-spacing: -0.015em; }
.lede { max-width: 620px; color: #536174; font-size: clamp(17px, 2vw, 21px); line-height: 1.55; }
.trust-list { display: grid; gap: 13px; margin-top: 32px; }
.trust-item { display: flex; gap: 12px; align-items: flex-start; color: #4d5b6e; font-size: 14px; }
.trust-icon { display: grid; place-items: center; flex: 0 0 25px; height: 25px; border-radius: 50%; background: var(--soft-blue); color: var(--blue); font-weight: 800; }

.card {
  background: var(--surface);
  border: 1px solid rgba(216, 225, 235, 0.92);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 34px);
}
.auth-card { max-width: 440px; width: 100%; justify-self: end; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 26px; border-radius: 12px; background: #eef2f6; }
.tab { border: 0; border-radius: 9px; padding: 10px; color: var(--muted); background: transparent; cursor: pointer; font-weight: 700; }
.tab.active { color: var(--ink); background: white; box-shadow: 0 2px 8px rgba(30, 48, 71, 0.08); }
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field-note { margin: -2px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.legacy-login-hint { margin-top: -4px; }
label { font-size: 13px; font-weight: 720; color: #435064; }
input, textarea {
  width: 100%;
  border: 1px solid #ccd7e3;
  border-radius: 11px;
  padding: 12px 13px;
  color: var(--ink);
  background: rgba(255,255,255,0.9);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,107,218,.11); outline: 0; }
textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.45; }
.error { color: var(--red); font-size: 13px; margin: 10px 0; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 11px;
  padding: 11px 16px;
  background: var(--blue);
  color: white;
  cursor: pointer;
  font-weight: 750;
  transition: transform .12s, background .12s;
}
.button:hover { background: var(--blue-dark); transform: translateY(-1px); }
.button.secondary { color: var(--ink); background: #edf2f7; }
.button.secondary:hover { background: #e2e9f1; }
.button.danger { color: var(--red); background: #fff0f1; }
.button.link { color: var(--blue); background: transparent; padding-inline: 6px; }
.button[disabled] { opacity: .55; cursor: wait; transform: none; }
.button.full { width: 100%; }
.button.compact { padding: 8px 12px; font-size: 12px; text-decoration: none; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

.dashboard-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.dashboard-head h1 { font-size: clamp(34px, 5vw, 54px); margin: 7px 0 8px; }
.dashboard-head p { color: var(--muted); margin: 0; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.identity-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; max-width: 820px; }
.private-alias-card form { margin-top: 18px; }
.span-7 { grid-column: span 7; }
.span-5 { grid-column: span 5; }
.span-12 { grid-column: 1 / -1; }
.card-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.card-head h3 { margin-bottom: 5px; }
.card-head p { color: var(--muted); font-size: 13px; margin: 0; line-height: 1.45; }
.setup-board { padding-block: 26px; }
.setup-board .card-head h3 { margin: 5px 0; font-size: 23px; }
.setup-quest-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.setup-quest { position: relative; display: grid; grid-template-columns: 34px minmax(0,1fr); align-content: start; gap: 11px; min-height: 150px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: rgba(248,250,252,.82); }
.setup-quest.done { border-color: #bfe2cd; background: #f5fbf7; }
.setup-quest.optional { border-style: dashed; }
.setup-quest-marker { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #bdcbe0; border-radius: 50%; color: var(--blue); background: white; font-weight: 850; }
.setup-quest.done .setup-quest-marker { border-color: var(--green); color: white; background: var(--green); }
.setup-quest strong { display: block; margin: 4px 0 5px; font-size: 14px; }
.setup-quest p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.setup-quest-action { grid-column: 2; align-self: end; margin-top: 12px; }
.status { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 750; white-space: nowrap; }
.status.good { color: var(--green); background: var(--soft-green); }
.status.warn { color: var(--amber); background: var(--soft-amber); }
.status.blue { color: var(--blue); background: var(--soft-blue); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.did { padding: 12px; border-radius: 10px; background: #f3f6f9; color: #526073; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; word-break: break-all; }
.identity-proof-row { display: flex; align-items: center; gap: 12px; }
.identity-proof-row .did { min-width: 0; flex: 1; }
.identity-proof-identicon { flex: 0 0 auto; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.profile-surface { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 3px 14px rgba(31,47,68,.07); }
.profile-cover { position: relative; height: clamp(210px,28vw,340px); overflow: hidden; background: #e9eef8; }
.profile-cover > img, .profile-cover-fallback { width: 100%; height: 100%; object-fit: cover; }
.profile-cover-fallback { background: radial-gradient(circle at 22% 18%,rgba(255,255,255,.7),transparent 28%), linear-gradient(135deg,#e3eeff,#e9dcff 52%,#dff5ee); }
.profile-cover-actions { position: absolute; right: 18px; bottom: 18px; display: flex; gap: 8px; opacity: .72; transition: opacity .15s ease; }
.profile-cover:hover .profile-cover-actions, .profile-cover:focus-within .profile-cover-actions { opacity: 1; }
.profile-cover-actions .button { box-shadow: 0 7px 22px rgba(20,34,50,.16); }
.profile-identity-row { display: flex; min-height: 118px; align-items: flex-start; gap: 20px; padding: 0 30px 16px; }
.profile-avatar-wrap { position: relative; flex: 0 0 auto; margin-top: -48px; }
.profile-avatar-wrap .ui-avatar { width: 126px; height: 126px; border: 5px solid white; border-radius: 34px; box-shadow: 0 12px 32px rgba(28,45,66,.18); }
.profile-camera { position: absolute; right: -3px; bottom: 3px; display: grid; width: 39px; height: 39px; place-items: center; border: 3px solid white; border-radius: 50%; background: var(--blue); color: white; cursor: pointer; box-shadow: 0 5px 14px rgba(28,45,66,.2); }
.profile-name-block { min-width: 0; padding-top: 18px; }
.profile-name-block h2 { margin: 0 0 3px; font-size: clamp(25px,3vw,34px); }
.profile-name-block > span { color: var(--muted); font-size: 13px; }
.profile-did-cue { display: flex; align-items: center; gap: 7px; margin-top: 9px; color: var(--muted); }
.profile-did-cue code { font-size: 10px; }
.profile-editor { display: grid; padding: 25px 30px 30px; border-top: 1px solid var(--line); grid-template-columns: minmax(260px,.8fr) minmax(280px,1.2fr); gap: 34px; }
.profile-editor form { display: flex; align-items: end; gap: 10px; }
.profile-editor form .field { min-width: 0; flex: 1; margin: 0; }
.profile-image-help { padding: 15px 17px; border-radius: 13px; background: #f5f7fa; }
.profile-image-help strong { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.profile-image-help p { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.profile-image-help .button { margin-top: 7px; }
.profile-error { margin: 0; padding: 0 30px 24px; }
.profile-proof-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; padding: 22px 26px !important; }
.profile-proof-card > div { display: flex; align-items: center; gap: 15px; }
.profile-proof-card h3 { margin: 0 0 4px; }
.profile-proof-card p { max-width: 700px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.profile-proof-icon { flex: 0 0 auto; padding: 4px; border: 1px solid var(--line); border-radius: 12px; }
.drawer { display: flex; gap: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: rgba(248,250,252,.85); }
.drawer-icon { font-size: 22px; }
.drawer strong { display: block; margin-bottom: 4px; }
.drawer p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.app-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); }
.app-row:first-child { border-top: 0; }
.app-origin { font-weight: 720; font-size: 14px; overflow-wrap: anywhere; }
.scopes { color: var(--muted); font-size: 12px; margin-top: 4px; }
.service-details { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 18px; }
.service-details > div { min-width: 105px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(248,250,252,.85); }
.service-details strong, .service-details span { display: block; }
.service-details strong { font-size: 13px; }
.service-details span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.service-form { margin-top: 14px; }
.service-form .field { max-width: 580px; }
.service-custody-summary { margin: 14px 0 0; max-width: 690px; }
.empty { padding: 18px; border: 1px dashed #cbd7e3; border-radius: 13px; color: var(--muted); font-size: 14px; text-align: center; }

.setup-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(20,30,44,.62); backdrop-filter: blur(6px); }
.setup-wizard { position: relative; display: grid; grid-template-columns: 250px minmax(340px,1fr) 330px; width: min(1180px, 100%); height: min(760px, calc(100vh - 40px)); overflow: hidden; border-radius: 24px; background: white; box-shadow: 0 34px 120px rgba(10,24,43,.38); }
.setup-close { position: absolute; top: 14px; right: 15px; z-index: 3; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; color: #566478; background: rgba(255,255,255,.86); cursor: pointer; font-size: 25px; }
.setup-rail { display: flex; min-width: 0; flex-direction: column; padding: 28px 18px 20px; border-right: 1px solid var(--line); background: white; }
.setup-rail h2 { margin: 7px 4px 24px; font-size: 24px; }
.setup-rail .eyebrow { margin-left: 4px; }
.setup-rail .ui-guided-steps { flex: 1; margin-top: 10px; --step-count: 3; }
.setup-rail .ui-guided-steps li { min-height: 0; }
.setup-rail .ui-guided-steps li::after { display: none; }
.setup-rail ol { flex: 1; margin: 0; padding: 0; list-style: none; }
.setup-rail li { position: relative; min-height: 68px; }
.setup-rail li:not(:last-child)::after { content: ""; position: absolute; left: 18px; top: 40px; bottom: -2px; width: 2px; background: #dce4ed; }
.setup-rail li.done:not(:last-child)::after { background: rgba(24,121,78,.55); }
.setup-rail li button { display: grid; grid-template-columns: 36px minmax(0,1fr); width: 100%; align-items: center; gap: 10px; border: 0; border-radius: 12px; padding: 5px 7px; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.setup-rail li button:hover:not(:disabled), .setup-rail li.selected button { background: var(--soft-blue); }
.setup-rail li button:disabled { cursor: default; }
.setup-rail li button > span { position: relative; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; margin-left: 5px; border: 1.5px solid #aebbc9; border-radius: 50%; color: #758295; background: white; font-size: 11px; font-weight: 800; }
.setup-rail li.done button > span { border-color: var(--green); color: white; background: var(--green); }
.setup-rail li.selected:not(.done) button > span { border-color: var(--blue); color: white; background: var(--blue); }
.setup-rail li.upcoming strong { color: #8a95a4; }
.setup-rail li strong { min-width: 0; font-size: 12px; line-height: 1.35; }
.setup-rail .ui-guided-steps li { min-height: 0; }
.setup-rail .ui-guided-steps li::after { display: none; }
.setup-progress { padding: 16px 5px 0; border-top: 1px solid var(--line); }
.setup-progress > div { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.setup-progress > div strong { color: var(--ink); }
.setup-progress progress { width: 100%; height: 6px; margin: 8px 0 7px; border: 0; border-radius: 999px; overflow: hidden; appearance: none; }
.setup-progress progress::-webkit-progress-bar { background: #e7edf4; }
.setup-progress progress::-webkit-progress-value { background: var(--blue); }
.setup-progress progress::-moz-progress-bar { background: var(--blue); }
.setup-progress .button { width: 100%; }
.setup-content { overflow: auto; padding: clamp(46px,7vh,76px) clamp(34px,5vw,64px); }
.setup-content h2 { max-width: 650px; margin: 18px 0 15px; font-size: clamp(30px,4vw,47px); }
.setup-lede { max-width: 650px; margin-bottom: 28px; color: var(--muted); font-size: 16px; line-height: 1.65; }
.setup-breadcrumb { display: flex; align-items: center; gap: 9px; color: var(--blue); font-size: 13px; font-weight: 760; }
.setup-breadcrumb > span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--soft-blue); }
.setup-content form, .setup-content > .button-row, .setup-content > button { max-width: 580px; }
.setup-content .field { margin-top: 8px; }
.setup-callout, .setup-success { display: grid; gap: 4px; max-width: 620px; margin: 20px 0; padding: 16px; border-radius: 14px; }
.setup-callout { color: #714300; background: var(--soft-amber); }
.setup-success { color: var(--green); background: var(--soft-green); }
.setup-callout span, .setup-success span { font-size: 13px; line-height: 1.5; }
.custody-list { display: grid; max-width: 650px; gap: 10px; margin-bottom: 26px; }
.custody-list > div { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); }
.custody-list > div:first-child { border-top: 0; }
.custody-list span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.provider-instructions { display: flex; max-width: 650px; gap: 13px; margin: -5px 0 24px; padding: 16px; border: 1px solid #cfdced; border-radius: 14px; background: #f5f9ff; }
.provider-instructions > span { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 10px; background: white; color: var(--blue); }
.provider-instructions strong { font-size: 13px; }
.provider-instructions ol { margin: 8px 0 10px; padding-left: 19px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.provider-instructions a { display: inline-flex; align-items: center; gap: 5px; color: var(--blue); font-size: 12px; font-weight: 750; }
.setup-finale { max-width: 660px; text-align: left; }
.setup-finale > span { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; color: white; background: var(--green); font-size: 27px; font-weight: 850; }
.setup-finale h2 { margin-top: 20px; }
.setup-finale > p { color: var(--muted); font-size: 15px; line-height: 1.6; }
.setup-visual { overflow: auto; padding: 70px 30px 34px; border-left: 1px solid #dbe5f1; background: linear-gradient(155deg,#eff6ff,#f7f3ff); }
.setup-visual h3 { margin: 9px 0 17px; font-size: 25px; line-height: 1.15; }
.setup-visual ul { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.setup-visual li { position: relative; padding-left: 23px; color: #536174; font-size: 13px; line-height: 1.5; }
.setup-visual li::before { content: ""; position: absolute; left: 2px; top: .42em; width: 8px; height: 4px; border-bottom: 2px solid var(--green); border-left: 2px solid var(--green); transform: rotate(-45deg); }
.setup-visual-art { min-height: 250px; margin-bottom: 30px; border: 1px solid rgba(99,130,170,.14); border-radius: 24px; box-shadow: 0 18px 44px rgba(48,73,105,.12); }
.recovery-art { position: relative; display: grid; place-items: center; color: white; background: radial-gradient(circle at 30% 25%,#70a9ff,transparent 28%), linear-gradient(150deg,#253b79,#6e4bd8); }
.recovery-art > span { display: grid; place-items: center; width: 112px; height: 112px; border: 2px solid rgba(255,255,255,.78); border-radius: 28px; background: rgba(255,255,255,.12); font-size: 60px; }
.recovery-art > i { position: absolute; bottom: 28px; padding: 7px 16px; border-radius: 999px; background: rgba(9,18,50,.34); font-style: normal; letter-spacing: .3em; }
.service-art { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 24px; background: linear-gradient(145deg,#ffffff,#e4efff); }
.service-art span { padding: 12px 10px; border: 1px solid #cbd9ea; border-radius: 12px; color: var(--blue-dark); background: white; box-shadow: 0 7px 20px rgba(30,68,115,.09); font-size: 11px; font-weight: 800; }
.service-art b { color: #8293aa; }

.authorization-page { --authorization-background: #fff9f2; display: grid; min-height: 100vh; grid-template-columns: minmax(420px, 1.08fr) minmax(420px, .92fr); background: var(--authorization-background); }
.app-showcase { position: relative; display: flex; min-height: 100vh; overflow: hidden; align-items: center; flex-direction: column; justify-content: center; padding: clamp(34px, 5vw, 76px); background: transparent; }
.showcase-hero { display: block; width: min(100%,720px); height: auto; max-height: calc(100vh - 72px); object-fit: contain; }
.showcase-copy { position: relative; z-index: 2; max-width: 530px; }
.showcase-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; font-size: 20px; font-weight: 800; letter-spacing: -.03em; }
.showcase-brand img { width: 42px; height: 42px; }
.showcase-copy h1 { max-width: 560px; margin-bottom: 20px; font-size: clamp(45px, 5vw, 70px); }
.showcase-copy p { max-width: 540px; color: #5d5667; font-size: 17px; line-height: 1.6; }
.showcase-notes { position: relative; width: min(520px, 92%); height: 270px; margin-top: 30px; }
.showcase-notes article { position: absolute; width: 65%; min-height: 130px; padding: 22px; border: 1px solid rgba(0,0,0,.05); border-radius: 6px 6px 18px 6px; box-shadow: 0 18px 44px rgba(48,38,61,.12); font-size: 15px; font-weight: 650; line-height: 1.55; }
.showcase-notes article:nth-child(1) { top: 20px; left: 0; background: #fff1b8; transform: rotate(-5deg); }
.showcase-notes article:nth-child(2) { top: 0; right: 0; background: #dff1ff; transform: rotate(4deg); }
.showcase-notes article:nth-child(3) { right: 12%; bottom: 0; background: #ffe2e7; transform: rotate(1deg); }
.authorization-panel { display: flex; min-height: 100vh; align-items: center; justify-content: center; flex-direction: column; padding: 34px; background: transparent; }
.authorization-content { width: min(100%,470px); }
.authorization-app-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 22px; }
.authorization-app-brand img { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 11px; object-fit: contain; }
.authorization-app-brand strong, .authorization-app-brand small { display: block; }
.authorization-app-brand strong { font-size: 18px; letter-spacing: -.025em; }
.authorization-app-brand small { max-width: 310px; overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.popup-card { width: 100%; max-height: calc(100vh - 170px); overflow: auto; padding: 28px; }
.authorization-provider { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 17px; color: var(--muted); font-size: 11px; }
.authorization-provider img { width: 20px; height: 20px; object-fit: contain; }
.authorization-provider strong { color: var(--ink); }
.origin-box { border: 1px solid var(--line); background: #f7f9fc; border-radius: 14px; padding: 14px; margin: 18px 0; }
.origin-box strong { display: block; font-size: 15px; margin-bottom: 3px; overflow-wrap: anywhere; }
.origin-box span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.permission-list { margin: 14px 0 22px; }
.permission { display: flex; gap: 13px; margin: 0; padding: 12px 0; border-top: 1px solid var(--line); }
.permission:first-child { border-top: 0; }
.permission-mark { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 11px; background: var(--soft-blue); color: var(--blue); font-size: 19px; }
.permission h3 { margin: 0 0 3px; font-size: 14px; }
.permission p { color: var(--muted); font-size: 13px; line-height: 1.5; }
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.consent-actions .deny { grid-column: 1 / -1; }
.security-note { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 18px 0 0; text-align: center; }

.modal-backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(21,31,45,.5); display: grid; place-items: center; padding: 18px; backdrop-filter: blur(5px); }
.modal { width: min(100%, 520px); max-height: calc(100vh - 36px); overflow: auto; background: white; border-radius: 22px; padding: 28px; box-shadow: 0 24px 90px rgba(14,28,47,.3); }
.recovery-code { font: 750 18px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .06em; padding: 16px; border-radius: 12px; background: #17212f; color: white; text-align: center; word-break: break-word; user-select: all; }
.warning-box { margin: 14px 0; padding: 13px; border-radius: 12px; color: #714300; background: var(--soft-amber); font-size: 13px; line-height: 1.5; }
.toast { position: fixed; right: 22px; bottom: 22px; max-width: 380px; padding: 12px 16px; border-radius: 12px; color: white; background: #17212f; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s; z-index: 50; }
.toast.show { opacity: 1; transform: translateY(0); }
.spinner { width: 22px; height: 22px; margin: 18px auto; border: 3px solid #dce6f1; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 780px) {
  .identity-fields { grid-template-columns: 1fr; gap: 0; }
  .admin-shell { display: block; }
  .admin-sidebar { position: sticky; z-index: 12; display: block; width: 100%; height: auto; padding: 9px 10px 7px; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-brand { display: none; }
  .admin-nav { display: flex; overflow-x: auto; gap: 3px; scrollbar-width: none; }
  .admin-nav::-webkit-scrollbar { display: none; }
  .admin-nav-label { display: none; }
  .admin-nav { padding-right: 48px; }
  .admin-sidebar-footer { position: absolute; top: 7px; right: 10px; margin: 0; padding: 0; border: 0; }
  .admin-nav a { min-width: max-content; min-height: 37px; padding-inline: 10px; }
  .admin-content { width: min(100% - 28px,700px); padding-top: 25px; }
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .auth-card { justify-self: stretch; max-width: none; }
  .span-7, .span-5 { grid-column: 1 / -1; }
  .dashboard-head { align-items: flex-start; flex-direction: column; }
  .profile-editor { grid-template-columns: 1fr; }
  .profile-proof-card { align-items: flex-start; flex-direction: column; }
  .setup-quest-list { grid-template-columns: 1fr; }
  .setup-quest { min-height: 0; }
  .top-actions .handle-label { display: none; }
  .authorization-page { display: block; background: var(--authorization-background); }
  .app-showcase { display: none; }
  .has-app-hero .app-showcase { display: grid; min-height: 280px; padding: 20px 20px 0; }
  .has-app-hero .showcase-hero { width: min(100%,390px); max-height: 310px; }
  .authorization-panel { min-height: 100vh; padding: 22px 14px; }
  .has-app-hero .authorization-panel { min-height: auto; padding: 26px 14px 48px; }
  .popup-card { max-height: none; }
}

@media (max-width: 1050px) {
  .setup-wizard { grid-template-columns: 235px minmax(0,1fr); }
  .setup-visual { display: none; }
}

@media (max-width: 680px) {
  .setup-backdrop { padding: 0; }
  .setup-wizard { display: block; width: 100%; height: 100vh; border-radius: 0; overflow: auto; }
  .setup-rail { display: block; padding: 22px 18px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .setup-rail h2 { margin-bottom: 14px; font-size: 21px; }
  .setup-rail ol { display: flex; gap: 5px; }
  .setup-rail li { flex: 1; min-height: 0; }
  .setup-rail li::after, .setup-rail li strong { display: none; }
  .setup-rail li button { display: grid; grid-template-columns: 1fr; justify-items: center; padding: 6px; }
  .setup-rail li button > span { margin: 0; }
  .setup-progress { display: none; }
  .setup-content { overflow: visible; padding: 36px 22px 60px; }
  .setup-content h2 { font-size: 33px; }
  .custody-list > div { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 520px) {
  .profile-cover { height: 180px; }
  .profile-cover-actions { right: 10px; bottom: 10px; opacity: 1; }
  .profile-identity-row { gap: 14px; padding-inline: 18px; }
  .profile-avatar-wrap .ui-avatar { width: 92px; height: 92px; border-width: 4px; border-radius: 25px; }
  .profile-avatar-wrap { margin-top: -34px; }
  .profile-camera { width: 34px; height: 34px; }
  .profile-name-block { padding-top: 10px; }
  .profile-editor { padding-inline: 18px; }
  .profile-editor form { align-items: stretch; flex-direction: column; }
  .identity-proof-row { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; }
}
