:root {
  color-scheme: light;
  --paper: #f3f5fa;
  --ink: #17213a;
  --muted: #53617a;
  --line: #e2e7f0;
  --navy: #151d36;
  --coral: #ff7878;
  --white: #fff;
  font: 16px/1.5 "Inter", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 3px solid #9d393f; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -.035em; }
svg { width: 1.2rem; height: 1.2rem; flex-shrink: 0; }
.shell { width: min(1100px, calc(100% - 48px)); margin-inline: auto; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.nav, .section-head, .actions, .record-person { display: flex; align-items: center; gap: 12px; }
.nav, .section-head { justify-content: space-between; }
.nav { min-height: 78px; }
.brand, .profile-brand { display: inline-flex; align-items: center; gap: 12px; line-height: 1.15; }
.brand strong, .profile-brand strong { display: block; font-size: 1.24rem; font-weight: 800; letter-spacing: .02em; }
.brand small, .profile-brand small { display: block; margin-top: 4px; }
.brand small { color: var(--muted); }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 14px; background: var(--navy); }
.brand-mark img { width: 19px; height: 31px; object-fit: contain; }
.dashboard { padding-block: 32px 64px; }
.banner { isolation: isolate; position: relative; overflow: hidden; background: var(--navy); color: #fff; border-radius: 34px; display: flex; align-items: center; min-height: 340px; }
.banner-copy { position: relative; z-index: 1; padding: clamp(26px, 5vw, 65px); max-width: 640px; }
.banner h1 { font-size: clamp(3rem, 7vw, 5.5rem); line-height: .98; letter-spacing: -.065em; margin-block: 14px 16px; }
.banner p { color: #d1d9ed; max-width: 420px; }
.banner .org-label { font-size: .82rem; color: #ffaaaa; }
.banner .button { margin-top: 24px; }
.logo-art { pointer-events: none; position: absolute; height: min(120%, 530px); aspect-ratio: 1; top: 50%; right: -1%; translate: 0 -50%; display: grid; place-items: center; background: repeating-linear-gradient(90deg, #aabce30d 0 1px, transparent 1px 36px), repeating-linear-gradient(0deg, #aabce30d 0 1px, transparent 1px 36px), radial-gradient(ellipse at center, #633549a0, #151d3600 66%); mask-image: radial-gradient(ellipse, #000 50%, #0000 78%); }
.logo-art .orbit { position: absolute; inset: 14%; border: 1px solid #f99ba252; border-radius: 50%; }
.logo-art .inner { inset: 23%; border-style: dashed; border-color: #d6def15c; }
.logo-art img { width: 31%; height: 59%; object-fit: contain; rotate: -13deg; filter: drop-shadow(0 12px 22px #130d24bb); animation: mark-in .9s cubic-bezier(.2,.7,.2,1) both; }
.logo-art i, .logo-art b { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #ffa3a3; box-shadow: 0 0 16px #ff9898; }
.logo-art i { left: 22%; top: 27%; }
.logo-art b { right: 15%; bottom: 44%; width: 6px; height: 6px; }
.surface { background: #fff; border: 1px solid var(--line); border-radius: 26px; }
.library, .editor { padding: clamp(18px, 3vw, 34px); margin-top: 24px; }
.section-head { flex-wrap: wrap; }
.section-head h2 { display: flex; align-items: center; gap: 9px; font-size: clamp(1.35rem, 3vw, 1.75rem); }
.count { border-radius: 999px; padding: 5px 9px; background: #edf0f7; font-size: .85rem; letter-spacing: 0; color: var(--muted); }
.empty { display: grid; justify-items: center; gap: 11px; text-align: center; padding: 38px 8px 18px; }
.empty > span, .contact-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: #ffe9e9; color: #953a48; }
.empty h3 { font-size: 1.15rem; }
.button, .icon-button { border: 1px solid transparent; display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; padding: 9px 15px; border-radius: 13px; font-weight: 650; transition: background .18s, border-color .18s, translate .18s; }
.button:hover, .icon-button:hover { translate: 0 -2px; }
.primary { background: var(--coral); color: #291821; }
.primary:hover { background: #ff9696; }
.soft, .icon-button { background: #f1f4fa; color: var(--ink); }
.soft:hover, .icon-button:hover { background: #e5eaf5; }
.icon-button { width: 44px; padding: 0; }
.quiet-link { color: #435271; display: inline-flex; gap: 6px; align-items: center; font-weight: 650; font-size: .9rem; }
.quiet-link:hover { text-decoration: underline; }
.quiet-link svg { width: 16px; height: 16px; }
.stack { display: grid; gap: 16px; }
.editor .stack { margin-top: 20px; }
.form-grid, .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row { grid-template-columns: 1fr 1fr auto; align-items: end; }
label { display: grid; gap: 5px; color: #34415b; font-weight: 600; }
input { width: 100%; min-height: 46px; border-radius: 12px; border: 1px solid #cbd4e2; padding: 9px 12px; color: var(--ink); background: #fbfcff; }
input::placeholder { color: #69758a; font-weight: 400; }
.add-field { margin-top: 12px; }
.actions { flex-wrap: wrap; }
.delete-form { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 16px; }
.danger { border: none; background: transparent; color: #a72e3f; padding: 6px 0; text-decoration: underline; }
.error, .notice, .copy-status { padding: 12px 16px; border-radius: 12px; margin-top: 14px; }
.error { color: #882638; background: #ffe8eb; }
.notice, .copy-status { color: #1d5749; background: #e0f5ec; }
.copy-status { position: fixed; bottom: 20px; right: 20px; z-index: 2; }
.records { list-style: none; margin: 15px 0 0; padding: 0; }
.records li { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-block: 14px; }
.records li:last-child { padding-bottom: 0; }
.record-person { min-width: 0; overflow-wrap: anywhere; }
.record-person small { display: block; color: var(--muted); }
.avatar { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 15px; background: #ffe8e7; color: #8e2c3c; font-weight: 750; }
.auth-page, .profile-page { background: radial-gradient(ellipse at 50% 0, #e1e7f6, transparent 680px), var(--paper); }
.auth-page { display: grid; place-items: center; }
.auth { width: min(440px, calc(100% - 32px)); margin: 36px auto; padding: clamp(24px, 5vw, 38px); }
.auth h1 { margin-top: 28px; font-size: 2rem; }
.muted { color: var(--muted); margin-top: 8px; }
.auth form { margin-block: 22px; }
.profile { width: min(620px, calc(100% - 32px)); margin: 40px auto; }
.business-card { overflow: hidden; box-shadow: 0 24px 60px #1b2e5014; animation: open .54s cubic-bezier(.2,.7,.2,1) both; }
.profile-cover { position: relative; min-height: 215px; background: var(--navy); color: #fff; padding: 25px clamp(18px, 6vw, 38px); overflow: hidden; }
.profile-brand { position: relative; z-index: 1; align-items: flex-start; }
.profile-brand .brand-mark { background: #ffffff12; }
.profile-brand small { max-width: 172px; color: #e4e8f3; }
.profile-cover .logo-art { height: 155%; right: -18px; }
.profile-body { padding: 0 clamp(18px, 6vw, 38px) 32px; }
.profile-avatar { position: relative; margin-top: -34px; border: 4px solid #fff; width: 74px; height: 74px; border-radius: 24px; font-size: 1.6rem; }
.profile h1 { font-size: clamp(2.1rem, 7vw, 3.5rem); margin: 12px 0 8px; overflow-wrap: anywhere; }
.position { color: var(--muted); font-size: 1.14rem; overflow-wrap: anywhere; }
.profile-actions { margin-top: 23px; }
.contacts, .details { margin: 26px 0 0; }
.contacts a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.contacts a:hover strong { text-decoration: underline; }
.contacts small { display: block; color: var(--muted); }
.details div { padding: 12px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.details dt { color: var(--muted); font-size: .88rem; }
.details dd { margin: 2px 0 0; white-space: pre-wrap; }
.contact-help { margin-top: 12px; color: var(--muted); font-size: .9rem; }
.contact-help summary { cursor: pointer; width: fit-content; }
.contact-help p, .contact-help a { margin-top: 8px; }
dialog { width: min(360px, calc(100% - 30px)); position: fixed; padding: 23px; text-align: center; border: 1px solid var(--line); border-radius: 24px; color: var(--ink); }
dialog[open] { animation: open .25s ease-out both; }
dialog::backdrop { background: #111a31a0; }
.dialog-close { display: flex; margin: 0 0 8px auto; }
dialog img { display: block; margin: 9px auto; max-width: 100%; height: auto; }
@keyframes open { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes mark-in { from { opacity: 0; transform: rotate(-17deg) scale(.84); } to { opacity: 1; transform: none; } }
@supports (animation-timeline: view()) {
  .contacts a, .details div { animation: open both linear; animation-timeline: view(); animation-range: entry 0% entry 75%; }
}
@media (max-width: 630px) {
  .shell { width: calc(100% - 32px); }
  .nav { min-height: 66px; }
  .banner { min-height: 342px; border-radius: 24px; }
  .banner .logo-art { height: 78%; right: -34%; opacity: .46; }
  .banner-copy { padding-inline: 22px; }
  .records li { align-items: flex-start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: minmax(0, 1fr) auto; }
  .field-row > label:first-child { grid-column: 1 / -1; }
  .profile { margin-top: 16px; }
  .profile-cover { min-height: 180px; }
  .profile-cover .logo-art { right: -60px; }
  .profile-actions .primary { flex: 1 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

