/* Shared surfaces for navigation, account, activity, sharing and Atlas. */
:root{
 --craft-panel:var(--surface-reading,var(--solid));
 --craft-edge:var(--surface-edge,var(--line));
 --craft-lavender:color-mix(in srgb,var(--accent) 15%,var(--craft-panel));
}

/* 1. The bottom dock has a quiet base and a thin accent along the selected lens. */
@media(forced-colors:none) and (prefers-reduced-transparency:no-preference) and (prefers-contrast:no-preference){
 body .mobile-nav{
  background:
   linear-gradient(80deg,transparent 23%,color-mix(in srgb,var(--material-glass-sheen) 20%,transparent) 56%,transparent 84%),
   linear-gradient(183deg,color-mix(in srgb,var(--material-glass-sheen) 31%,transparent),transparent 52%),
   color-mix(in srgb,var(--material-glass) 91%,var(--solid));
 }
 body .mobile-nav .nav-button.active::before{
  inset-block:3px;
  border-radius:14px;
  border-color:color-mix(in srgb,var(--dock-accent) 42%,transparent);
  background:
   linear-gradient(90deg,transparent,var(--dock-accent) 24% 76%,transparent) center bottom 3px/18px 2px no-repeat,
   radial-gradient(ellipse at 42% 2%,color-mix(in srgb,var(--dock-accent) 26%,var(--material-glass-sheen)),transparent 75%),
   var(--glass-tab);
 }
}

/* 2. A persistent selection marker for the wide layout. */
@media(min-width:801px){
 body .rail .rail-nav .nav-button.active{
  background:var(--craft-lavender);
  color:var(--accent);
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 28%,transparent);
 }
 body .rail .rail-nav .nav-button.active::before{height:24px;width:3px;border-radius:4px;}
 body .rail .rail-nav .nav-button:focus-visible{outline:2px solid var(--accent);outline-offset:3px;}
}

/* 3. Account title and access choices share one calm hierarchy. */
.account-screen .account-card h1{
 margin-block:0 10px;
 font-size:clamp(2rem,5vw,2.85rem);
 font-weight:820;
 line-height:1.04;
 letter-spacing:-.052em;
}
.account-screen .account-card .account-lead{
 max-width:32ch;
 font-size:.94rem;
 line-height:1.55;
}
.account-screen .account-card .auth-tabs{
 margin-block-start:18px;
 border-radius:14px;
 background:#9992ab13;
 border-color:#cbbbdf3b;
}
.account-screen .account-card .auth-tabs button{font-size:.875rem;border-radius:10px;}
.account-screen .account-card .auth-tabs [aria-pressed=true]{
 background:#e8d8fa;color:#281b35;box-shadow:none;
}

/* 4. Clear labels, input boundaries and a distinct password control. */
.account-card #auth-form .form-grid{gap:14px;margin-block-start:17px;}
.account-card #auth-form .field :is(input,textarea){
 min-height:50px;border-color:#c1acce55;background:#120d2370;border-radius:12px;
}
.account-card #auth-form .field :is(input,textarea):focus{
 outline:2px solid #d5b9ef;
 outline-offset:2px;
}
.account-card #auth-form .auth-password button{
 background:#cbb6e419;border:1px solid #cbb6e441;border-radius:8px;
 opacity:1;
 min-height:44px;
}
.account-card #auth-form .auth-password button[aria-pressed=true]{color:#efd5fe;background:#916bb54c;}
.account-card #auth-form .account-hint{padding:9px 10px;border-inline-start:2px solid #ad8cc5;background:#9a77ae12;}

/* 5. Pending access and the latest request are readable together. */
.account-card .beta-own-request{
 margin-block:16px 14px;padding:14px 15px;border-radius:12px;border-inline-start:3px solid #c9a9ed;
 background:#b994de17;
}
.account-card .beta-live-status{
 display:flex;align-items:center;gap:8px;width:fit-content;max-width:100%;
 padding:7px 10px;margin-block:12px;
 border:1px solid #d8beec50;border-radius:8px;background:#d8beec18;color:#f2e8fa;
}
.account-card .beta-live-status::before{content:"";width:6px;height:6px;flex:none;border-radius:50%;background:#c9a9ed;}

/* 6. Status choices put the selected row on its own surface. */
.orbita-settings-page .settings-presence-choices .privacy-choice{
 border-radius:12px;border:1px solid var(--surface-edge);
 background:var(--surface-reading);color:var(--surface-ink);
}
.orbita-settings-page .settings-presence-choices [aria-pressed=true]{
 border-color:color-mix(in srgb,var(--accent) 48%,var(--surface-edge));background:var(--surface-picked);
}
.orbita-settings-page .settings-choice-mark{border-radius:8px;}

/* 7. A quieter line between a setting and its switch. */
.orbita-settings-page .settings-row{
 min-height:48px;gap:12px;padding-block:9px;margin:0;
}
.orbita-settings-page .settings-row+.settings-row{border-top:1px solid var(--craft-edge);}
.orbita-settings-page .settings-row>span{
 min-width:0;line-height:1.42;overflow-wrap:anywhere;
}
.orbita-settings-page .settings-row .switch{flex:none;}

/* 8. Unread events have a stable left edge and a separate marker. */
.activity-inbox .notification-row{
 border:1px solid var(--craft-edge);border-radius:12px;
 background:var(--craft-panel);
}
.activity-inbox .notification-row.unread{
 border-inline-start:3px solid var(--accent);
 background:color-mix(in srgb,var(--accent) 10%,var(--craft-panel));
}
.activity-inbox .notification-unread{
 width:7px;height:7px;align-self:start;margin-block-start:5px;
}
.activity-inbox .notification-open small{font-weight:700;color:var(--accent);}

/* 9. Recipient rows read like a selection list. */
.link-share-modal .share-contacts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;}
.link-share-modal .share-contact{
 min-width:0;min-height:54px;padding:6px 7px;
 display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:7px;align-items:center;
 border:1px solid var(--craft-edge);background:var(--craft-panel);border-radius:11px;text-align:start;
}
.link-share-modal .share-contact[aria-pressed=true]{background:var(--craft-lavender);border-color:var(--accent);}
.link-share-modal .share-contact .share-face{width:37px;height:37px;margin:0;}
.link-share-modal .share-face :is(.avatar,.share-group-face){width:32px;height:32px;}
.link-share-modal .share-contact .share-check{position:static;width:16px;height:16px;}
.link-share-modal .share-contact .share-check .icon{width:12px;height:12px;}
.link-share-modal .share-contact-copy{min-width:0;}
@media(max-width:350px){.link-share-modal .share-contacts{grid-template-columns:minmax(0,1fr);}}

/* 10. Large real distance and a separate progress rail in the Atlas. */
.atlas-sheet .atlas-score{
 padding:16px;
 border-radius:14px;
 background:linear-gradient(145deg,var(--craft-lavender),var(--craft-panel) 74%);
 border:1px solid var(--craft-edge);
}
.atlas-sheet .atlas-score strong{
 font-size:clamp(1.95rem,7vw,2.75rem);letter-spacing:-.045em;font-variant-numeric:tabular-nums;
}
.atlas-sheet .atlas-score progress{margin-block-start:12px;height:7px;}
.atlas-sheet .atlas-districts>div{font-variant-numeric:tabular-nums;}

@media(prefers-reduced-motion:no-preference){
 .account-card[data-craft-auth-mode=signup] :is(.auth-providers,#auth-form:not([hidden])),
 .account-card #auth-form[data-craft-email-reveal],
 .beta-channels details[open]>form{
  animation:craft-account-arrive 215ms var(--motion-ease);
 }
 .account-card[data-craft-auth-mode=recover] #auth-form .field:has([name=code]),
 .account-card[data-craft-auth-mode=login] #auth-form{
  animation:craft-account-return 210ms var(--motion-ease);
 }
 .account-gathering-invite[data-craft-invite-ready]>small{animation:craft-account-arrive 220ms var(--motion-ease);}
 .orbita-settings-page .switch[data-craft-switch]::before{
  animation:craft-switch-return 195ms var(--motion-ease);
 }
 .orbita-settings-page .switch[data-craft-switch][aria-checked=true]::before{
  animation-name:craft-switch-advance;
 }
}
@keyframes craft-account-arrive{
 from{opacity:.55;translate:0 8px}to{opacity:1;translate:0}
}
@keyframes craft-account-return{
 from{opacity:.54;translate:-7px 0}to{opacity:1;translate:0}
}
@keyframes craft-switch-advance{from{translate:-16px 0}to{translate:0}}
@keyframes craft-switch-return{from{translate:16px 0}to{translate:0}}
