:root {
  color-scheme: light;
  --ink: #242044;
  --muted: #514b69;
  --violet: #5236a4;
  --violet-dark: #3b277c;
  --line: rgba(81, 68, 128, .22);
  --glass: rgba(255, 255, 255, .57);
  --mist: rgba(247, 246, 255, .8);
  --highlight: rgba(255, 255, 255, .9);
  --shadow: 0 20px 65px rgba(79, 54, 152, .13);
  font: 100%/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #ececfb;
}

* { box-sizing: border-box; }
body {
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(ellipse 35rem 29rem at 94% 10%, #82e3eaa8, transparent 80%),
    radial-gradient(ellipse 38rem 29rem at 0% 35%, #c49df0b0, transparent 83%),
    radial-gradient(ellipse 30rem 34rem at 91% 96%, #aba5ed96, transparent 80%),
    linear-gradient(145deg, #f5f0ff 5%, #ebf3fc 68%, #eeecff);
}
a { color: var(--violet-dark); }
button, input { font: inherit; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2.35rem, 5.7vw, 4.8rem); line-height: 1.01; letter-spacing: -.065em; }
h2 { font-size: 1.4rem; line-height: 1.23; letter-spacing: -.027em; }
p, dd { overflow-wrap: anywhere; }

.topbar { padding: 1rem 1.35rem 0; }
.topbar-content {
  max-width: 71rem;
  min-height: 4.35rem;
  margin: auto;
  padding: .55rem .7rem .55rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .8rem;
  border: 1px solid var(--highlight);
  border-radius: 2.5rem;
  background: linear-gradient(125deg, #ffffffbb, #fbf9ff65);
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #fffa, 0 9px 30px #554b8b15;
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  backdrop-filter: blur(22px) saturate(145%);
}
.brand { display: inline-flex; align-items: center; gap: .58rem; color: var(--ink); text-decoration: none; white-space: nowrap; font-size: 1.03rem; }
.brand strong { font-weight: 800; letter-spacing: -.035em; }
.brand-mark { width: 2.45rem; height: 2.45rem; object-fit: contain; filter: drop-shadow(0 3px 7px #5e40ab36); }
.brand-product { margin-left: .5rem; color: var(--muted); font-size: .88rem; font-weight: 550; }
.nav-link { text-decoration: none; padding: .52rem .9rem; border-radius: 2rem; font-weight: 700; font-size: .9rem; }
.nav-link, .subtle {
  background: #ffffff8f;
  border: 1px solid #fff;
  box-shadow: inset 0 1px 0 #fff, 0 3px 9px #51407313;
}
.nav-link:hover, .subtle:hover { background: #fff; }
.layout { width: min(100%, 71rem); margin: auto; padding: clamp(1.75rem, 5vw, 3.4rem) 1.35rem 3.75rem; }
.narrow { max-width: 41rem; }
.eyebrow { color: var(--violet-dark); margin-bottom: .8rem; font-size: .91rem; font-weight: 750; }
.lead { margin-top: .95rem; color: var(--muted); font-size: 1.07rem; }

.welcome, .panel, .connection-cards div {
  border: 1px solid var(--highlight);
  background: linear-gradient(135deg, #ffffffac, var(--glass) 63%, #f5f5ff72);
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #fff9, var(--shadow);
  -webkit-backdrop-filter: blur(25px) saturate(135%);
  backdrop-filter: blur(25px) saturate(135%);
}
.welcome {
  position: relative;
  isolation: isolate;
  min-height: 28.1rem;
  display: grid;
  grid-template-columns: 1.18fr 1fr;
  overflow: hidden;
  border-radius: 2.4rem;
  background:
    radial-gradient(ellipse at 93% 10%, #a2e7ec8f, transparent 51%),
    radial-gradient(ellipse at 84% 91%, #b9a8f1a6, transparent 59%),
    linear-gradient(124deg, #fffdfde6 8%, #fbf8ffa1 58%, #e6e7ff8c);
}
.hero-copy { position: relative; z-index: 1; align-self: center; padding: clamp(2.15rem, 5.5vw, 4.35rem); }
.hero-copy h1 { max-width: 8ch; }
.hero-copy .lead { max-width: 33ch; font-size: 1.12rem; }
.webmail-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.45rem; }
.hero-art { position: relative; display: grid; min-width: 0; place-items: center; min-height: 22rem; }
.glass-disc {
  display: grid;
  position: relative;
  width: min(21.8rem, 84%);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #ffffffe8;
  border-radius: 50%;
  background: radial-gradient(circle at 24% 15%, #ffffffc9, #ffffff39 38%, #a095e852 81%, #f1edff86);
  box-shadow: inset 2px 2px 18px #fffffff0, inset -4px -12px 23px #856fcb32, 0 26px 49px #5f50a727;
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  backdrop-filter: blur(24px) saturate(145%);
}
.glass-disc::before, .glass-disc::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid #ffffff7a; pointer-events: none; }
.glass-disc::before { inset: 6.5%; }
.glass-disc::after { inset: -8%; border-style: solid; border-color: #ffffff75; }
.glass-disc img { position: relative; display: block; width: 76%; height: auto; filter: drop-shadow(0 16px 20px #51419744); }
.domain-chip {
  position: absolute;
  left: 50%;
  bottom: max(2.55rem, 10%);
  transform: translateX(-50%);
  padding: .49rem .9rem;
  color: #302454;
  border: 1px solid #fff;
  border-radius: 2rem;
  background: linear-gradient(145deg, #ffffffb8, #f8f4ff88);
  box-shadow: inset 0 1px 0 white, 0 9px 22px #4936732c;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  font-size: .93rem;
  font-weight: 710;
  white-space: nowrap;
}
.welcome-detail { padding: 2.15rem .15rem 0; scroll-margin-top: 1.35rem; }
.welcome-detail p { color: var(--muted); margin-top: .3rem; }
.connection { margin: 1.15rem 0 0; }
.connection div { display: grid; grid-template-columns: 5.5rem 1fr; gap: .3rem .85rem; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.connection dt { color: var(--muted); font-weight: 540; }
.connection dd { margin: 0; font-weight: 740; }
.connection-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.connection-cards div { display: block; border-radius: 1.22rem; border-bottom: 1px solid var(--highlight); padding: .9rem 1.1rem; }
.connection-cards dt { font-size: .9rem; }
.connection-cards dd { margin-top: .12rem; font-size: 1.04rem; }
.connection-cards dd span { margin-left: .35rem; color: var(--muted); font-size: .9rem; font-weight: 620; }

.panel { border-radius: 1.65rem; padding: clamp(1.32rem, 4vw, 2.15rem); min-width: 0; }
.panel > p:not(.eyebrow) { margin-top: .65rem; color: var(--muted); }
.narrow { padding-block: clamp(2rem, 5vw, 3.65rem); }
.narrow h1 { font-size: clamp(2.05rem, 4vw, 3rem); }
.page-heading { margin-bottom: 1.7rem; }
.page-heading h1 { font-size: clamp(2.35rem, 4vw, 3.75rem); }
.admin-grid { display: grid; grid-template-columns: minmax(0, .89fr) minmax(0, 1.11fr); gap: 1.05rem; align-items: start; }

.stack { display: flex; flex-direction: column; margin-top: 1.3rem; }
label { display: block; font-weight: 730; font-size: .95rem; margin-bottom: .34rem; }
.stack > label:not(:first-of-type) { margin-top: 1rem; }
.optional { margin-left: .35rem; color: var(--muted); font-size: .875rem; font-weight: 480; }
input { min-height: 2.9rem; width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: .78rem; padding: .55rem .8rem; background: #ffffffd6; color: var(--ink); box-shadow: inset 0 1px 2px #5441790d; }
input[readonly] { background: var(--mist); }
input:focus { outline: 2px solid var(--violet); outline-offset: 1px; }
.domain-field { display: flex; align-items: stretch; }
.domain-field input { border-radius: .78rem 0 0 .78rem; }
.domain-field span { display: grid; place-items: center; border: 1px solid var(--line); border-left: 0; border-radius: 0 .78rem .78rem 0; padding: 0 .75rem; color: var(--muted); background: var(--mist); white-space: nowrap; font-size: .91rem; }
.password-field { position: relative; }
.password-field input { padding-right: 5.3rem; }
.password-field button { position: absolute; right: .52rem; top: 50%; transform: translateY(-50%); }
.hint { margin-top: .35rem; font-size: .9rem; color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; padding: .58rem 1.02rem; border-radius: 1.7rem; font-weight: 720; text-decoration: none; min-height: 2.7rem; cursor: pointer; }
.primary { background: linear-gradient(140deg, #6b4dc2, #493091); border-color: #4b359899; color: #fff; box-shadow: inset 0 1px 0 #ffffff66, 0 8px 20px #502ca734; }
.primary:hover { background: linear-gradient(140deg, #5e42b0, #3f287f); }
.secondary { background: #ffffffbd; color: var(--violet-dark); border-color: #a795d8; }
.secondary:hover { background: white; }
.subtle { color: var(--violet-dark); }
.stack > .button { margin-top: 1.23rem; align-self: flex-start; }
.panel > .button { margin-top: 1.15rem; }
.text-button { background: transparent; border: 0; padding: .36rem; color: var(--violet-dark); font-weight: 700; font-size: .875rem; cursor: pointer; }
.text-button:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; }
.feedback { display: block; border: 1px solid; border-radius: .85rem; padding: .78rem; margin-top: 1rem; }
.panel .feedback.error { border-color: #e1a4b3; color: #8d2637; background: #fff3f7; }
.feedback.success { border-color: #abd3c7; color: #155743; background: #ecfaf5; }
.feedback label { margin-top: .55rem; }
.feedback .button { margin-top: .55rem; }
.invite-list { margin: .55rem 0 0; padding: 0; list-style: none; }
.invite-list li { padding: .72rem 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: .65rem; }
.invite-list strong, .address { overflow-wrap: anywhere; }
.invite-list small { display: block; margin-top: .2rem; color: var(--muted); font-size: .85rem; }
.invite-state { display: flex; flex-direction: column; align-items: flex-end; }
.state { background: #eeeaf8; border-radius: 1rem; padding: .12rem .5rem; font-size: .82rem; white-space: nowrap; font-weight: 700; }
.state.pending { color: #644a00; background: #fff3c6; }
.state.active { color: #146247; background: #e5f9ef; }
.panel .empty { margin-top: .85rem; padding: 1rem; background: var(--mist); border-radius: .9rem; }
.panel .address { color: var(--violet-dark); font-weight: 750; }

@media (max-width: 48rem) {
  .admin-grid { grid-template-columns: 1fr; }
  .welcome { min-height: 0; }
  .hero-copy { padding: 2rem 1.5rem 2.05rem; }
  .hero-art { min-height: 16rem; }
  .domain-chip { bottom: 1.8rem; }
  .topbar, .layout { padding-inline: .95rem; }
}
@media (max-width: 34rem) {
  .welcome { grid-template-columns: 1fr; border-radius: 1.7rem; }
  .hero-copy { padding-bottom: .2rem; }
  .hero-copy h1 { max-width: 13ch; }
  .hero-art { min-height: 14.5rem; }
  .glass-disc { width: 11.9rem; }
  .domain-chip { bottom: 1rem; }
  .connection-cards { grid-template-columns: 1fr; }
  .connection-cards div { display: grid; grid-template-columns: 1fr 1.25fr; align-items: baseline; padding: .75rem .9rem; }
  .connection-cards dd { margin: 0; }
}
@media (max-width: 25rem) {
  .brand-product { display: none; }
  .domain-field { flex-wrap: wrap; }
  .domain-field input { border-radius: .78rem .78rem 0 0; }
  .domain-field span { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 .78rem .78rem; padding: .25rem .7rem; flex-grow: 1; justify-content: start; }
  .invite-list li { flex-direction: column; }
  .invite-state { align-items: flex-start; }
}
@media (prefers-reduced-transparency: reduce) {
  .topbar-content, .welcome, .panel, .connection-cards div, .domain-chip { background: #fdfbff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .glass-disc { background: #eae4fc; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
