:root {
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  color: #201937;
  background: #faf8f4;
  color-scheme: light;
  --ink: #201937;
  --muted: #615a71;
  --accent: #5639ad;
  --border: #e6dfed;
  --white: #fffefd;
  --lavender: #ece4ff;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--accent); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .64; cursor: wait; }
:focus-visible { outline: 3px solid #835ee4; outline-offset: 3px; }
#main:focus { outline: none; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.25rem, 5vw, 3.35rem); line-height: 1.04; letter-spacing: -.069em; }
h2 { font-size: 1.16rem; line-height: 1.3; letter-spacing: -.031em; }
h3 { font-size: .90rem; }
p { line-height: 1.55; }
.hint { color: var(--muted); }
.site-header { border-bottom: 1px solid var(--border); background: var(--white); }
.header-inner { width: min(calc(100% - 3rem), 66rem); min-height: 4.55rem; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.wordmark { display: inline-flex; gap: .57rem; align-items: center; color: var(--ink); text-decoration: none; font-weight: 780; letter-spacing: -.065em; font-size: 1.45rem; }
.bloom { width: 1.33rem; height: 1.33rem; display: inline-block; background: #6745c7; transform: rotate(15deg); border-radius: 63% 54% 65% 47%; box-shadow: inset -.33rem -.12rem 0 #9e82ea; }
nav { display: flex; align-items: center; gap: clamp(.68rem, 3.5vw, 1.7rem); }
nav a, .quiet { color: var(--muted); font-weight: 650; font-size: .875rem; text-decoration: none; }
nav a[aria-current="page"], nav a:hover, .quiet:hover { color: var(--accent); }
.quiet { padding: .35rem 0; border: none; background: none; white-space: nowrap; }
.loading { width: min(calc(100% - 3rem), 58rem); margin: 3.5rem auto; color: var(--muted); }
.auth-layout { width: min(calc(100% - 3rem), 61rem); margin: clamp(2rem, 8vh, 6rem) auto; display: grid; grid-template-columns: 1fr .95fr; min-height: 34rem; border: 1px solid var(--border); border-radius: 1.5rem; overflow: hidden; background: var(--white); }
.auth-illustration { min-height: 17rem; display: grid; place-items: center; position: relative; isolation: isolate; overflow: hidden; background: #e9dfff; }
.auth-illustration::after { position: absolute; inset: 0; content: ""; background: radial-gradient(ellipse at 70% 80%, #fff3da 0%, transparent 55%), radial-gradient(ellipse at 29% 27%, #c6b1f4 1%, transparent 58%); z-index: -1; }
.orbit { position: absolute; width: 78%; height: 50%; border: 1px solid #704fc65e; border-radius: 50%; transform: rotate(-28deg); }
.orbit-inner { width: 65%; height: 43%; transform: rotate(31deg); border-color: #fff9; }
.graphic { width: clamp(8rem, 19vw, 13rem); aspect-ratio: 1; transform: rotate(-10deg); display: grid; grid-template-columns: 1fr 1fr; filter: drop-shadow(0 1.15rem 1.35rem #56379537); }
.graphic i { border-radius: 100% 100% 18% 100%; background: linear-gradient(144deg, #9d79f4, #6844bb); }
.graphic i:nth-child(2) { transform: rotate(90deg); background: linear-gradient(144deg, #d9bdf9, #8f5cdf); }
.graphic i:nth-child(3) { transform: rotate(-90deg); background: linear-gradient(144deg, #b99af7, #5a369b); }
.graphic i:nth-child(4) { transform: rotate(180deg); background: linear-gradient(144deg, #f3daf8, #956fe0); }
.star { position: absolute; color: #6745ab; line-height: 1; }
.star-one { top: 22%; right: 18%; font-size: 2rem; }
.star-two { bottom: 24%; left: 20%; font-size: 1.2rem; }
.auth-card { align-self: center; padding: clamp(1.6rem, 5vw, 4rem); }
.auth-card > .hint, .page-heading > .hint { margin-top: .65rem; }
.auth-card form { margin-top: 1.7rem; }
form:not([method="dialog"]) { display: grid; gap: .94rem; }
form label { display: grid; gap: .42rem; font-size: .9rem; font-weight: 680; }
input { width: 100%; min-height: 3rem; padding: .68rem .82rem; border: 1px solid #d8cee5; border-radius: .67rem; color: var(--ink); background: #fff; font-weight: 500; }
input::placeholder { color: #756b81; }
.field-note { margin-top: -.6rem; font-size: .84rem; }
.primary, .secondary { min-height: 2.85rem; padding: .63rem 1.05rem; border-radius: .63rem; border: 1px solid transparent; font-weight: 710; text-align: center; }
.primary { color: #fff; background: #5538a6; }
.primary:hover { background: #45298d; }
.secondary { background: var(--white); color: var(--accent); border-color: #d5c3f3; }
.secondary:hover { background: #f3edff; }
.auth-card .primary { margin-top: .15rem; }
.switch { margin-top: 1.1rem; color: var(--muted); font-size: .9rem; }
.switch a, .text-link { text-underline-offset: .22rem; font-weight: 700; }
.error { color: #9d1e38; font-size: .89rem; }
.content { width: min(calc(100% - 3rem), 58rem); margin: clamp(2rem, 6vh, 4.5rem) auto; display: grid; gap: 1rem; }
.content.narrow { max-width: 41rem; }
.page-heading { margin: 0 0 .65rem; }
.panel, .balance { padding: clamp(1.15rem, 3.6vw, 1.8rem); border: 1px solid var(--border); border-radius: 1.05rem; background: var(--white); }
.dashboard-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1rem; }
.balance { min-height: 13.2rem; display: flex; flex-direction: column; justify-content: center; background: linear-gradient(125deg, #e7dafc, #f2eaff); border-color: #e3d3fb; }
.balance-value { display: flex; align-items: baseline; gap: .6rem; margin: .42rem 0 .34rem; font-weight: 690; }
.balance-value strong { font-size: clamp(3.45rem, 9vw, 5.25rem); line-height: 1; letter-spacing: -.092em; }
.balance p { color: #514469; font-size: .94rem; }
.membership { display: grid; gap: .55rem; align-content: center; justify-items: start; }
.text-link { margin-top: .4rem; }
.status, .pill { background: #efe8fc; color: #4d3480; border-radius: 6rem; font-weight: 700; width: max-content; padding: .29rem .65rem; font-size: .84rem; }
.pill { background: #f3ede5; color: #684e32; padding: .18rem .46rem; margin-left: .25rem; }
.activity, .account-panel, .browser-panel { display: grid; gap: .8rem; }
.activity-list { margin: 0; padding: 0; list-style: none; }
.activity-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--border); padding: .72rem 0; }
.activity-list li:last-child { padding-bottom: 0; }
.activity-list time { display: block; color: var(--muted); font-size: .84rem; margin-top: .13rem; }
.activity-list strong { white-space: nowrap; font-size: .90rem; }
.notice { border: 1px solid #d8c8f5; background: #f3ecff; color: #432575; border-radius: .7rem; padding: .7rem 1rem; }
.profile-form .primary { justify-self: start; }
.billing-panel { display: grid; gap: .8rem; justify-items: start; }
.billing-heading { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.price strong { font-size: 1.6rem; letter-spacing: -.06em; }
.price span { color: var(--muted); white-space: nowrap; }
.card-details { border-top: 1px solid var(--border); width: 100%; padding: .85rem 0 .1rem; }
.card-details p { margin-top: .28rem; color: var(--muted); }
dialog { max-width: min(calc(100% - 2rem), 26rem); border-radius: 1rem; border: 1px solid var(--border); padding: 1.6rem; color: var(--ink); }
dialog p { margin: .5rem 0 1.1rem; }
dialog::backdrop { background: #21133470; }
.dialog-buttons { display: flex; gap: .5rem; flex-wrap: wrap; }
dl { margin: 0; }
dl > div { display: grid; grid-template-columns: 7rem 1fr; gap: .65rem; border-top: 1px solid var(--border); padding: .65rem 0; }
dl > div:last-child { padding-bottom: 0; }
dt { color: var(--muted); font-size: .88rem; }
dd { margin: 0; overflow-wrap: anywhere; }

@media (max-width: 680px) {
  .auth-layout { grid-template-columns: 1fr; width: min(calc(100% - 2rem), 29rem); }
  .auth-illustration { min-height: 13rem; }
  .auth-card { padding: 1.65rem; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .header-inner, .content, .loading { width: calc(100% - 2rem); }
  .header-inner { min-height: 4rem; }
  .wordmark { font-size: 1.25rem; }
  nav { gap: .7rem; }
  nav a, .quiet { font-size: .79rem; }
}

@media (max-width: 400px) {
  .header-inner:has(nav:not([hidden])) { align-items: start; flex-direction: column; gap: .35rem; padding-block: .65rem .48rem; }
  nav { width: 100%; justify-content: space-between; }
}
