/* Sign-in and account portal. */

/* ---------- sign in ---------- */

.auth { display: grid; justify-items: start; gap: 1.25rem; padding-block: clamp(1.5rem, 8vh, 6rem); }
@media (min-width: 48rem) { .auth { justify-items: center; } }
.auth-card {
  width: min(100%, 26rem); padding: clamp(1.25rem, 4vw, 2rem);
  background: var(--surface); border: 1px solid var(--line); border-radius: 1.4rem;
  view-transition-name: auth-card;
}
.step { display: grid; gap: 1.1rem; }
.step[hidden] { display: none; }
.step h1 { font-size: var(--step-3); }
.step .btn { width: 100%; }
.apple-btn { height: 46px; cursor: pointer; border-radius: 0.7rem; overflow: hidden; }
.apple-btn[hidden] { display: none; }
.or { display: flex; align-items: center; gap: 0.75rem; color: var(--muted); font-size: var(--step--1); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.field.code { font-stretch: 75%; font-weight: 700; font-size: 1.9rem; letter-spacing: 0.35em; text-align: center; min-height: 3.6rem; padding-left: 0.35em; }
.dev-code { font-size: var(--step--1); border: 1px dashed var(--blaze); border-radius: 0.6rem; padding: 0.5rem 0.75rem; }
.link { background: none; border: 0; padding: 0; font: inherit; font-size: var(--step--1); color: var(--muted); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; justify-self: start; }
.auth .fine { font-size: var(--step--1); }
#turnstile:empty { display: none; }

::view-transition-old(auth-card), ::view-transition-new(auth-card) { animation-duration: 0.35s; animation-timing-function: var(--ease); }

/* ---------- account ---------- */

.account { display: grid; gap: 1rem; padding-block: clamp(1rem, 4vw, 3rem); max-width: 60rem; transition: opacity 0.4s var(--ease); }
.account[aria-busy="true"] { opacity: 0; }
.account-head { margin-bottom: 1rem; }
.account-head h1 { font-size: var(--step-4); }
.account-head p { margin-top: 0.5rem; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 1.2rem; padding: clamp(1.1rem, 3vw, 1.6rem); }
.panel h2 { font-size: var(--step-2); margin-bottom: 1rem; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.cols { display: grid; gap: 1rem; }
@media (min-width: 48rem) { .cols { grid-template-columns: 1.2fr 1fr; } }

.pill { font-size: var(--step--1); font-weight: 600; padding: 0.2rem 0.7rem; border-radius: 99px; border: 1px solid var(--line); white-space: nowrap; }
.pill.pro { background: var(--blaze); color: #1a0a00; border-color: transparent; }

.hunts { list-style: none; margin: 0; padding: 0; }
.hunts li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 0.9rem; border-top: 1px solid var(--line); }
.hunt-name { font-weight: 640; font-size: var(--step-1); line-height: 1.2; }
.hunts .muted { font-size: var(--step--1); margin-top: 0.15rem; }
.hunt-weight { font-stretch: 66%; font-weight: 780; font-size: var(--step-3); line-height: 1; white-space: nowrap; }
.empty { color: var(--muted); padding-block: 0.5rem; max-width: var(--measure); }

#profile { display: grid; gap: 1.1rem; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: var(--step--1); font-weight: 560; margin-bottom: 0.4rem; padding: 0; }
.seg-lg { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; gap: 3px; border-radius: 0.7rem; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.seg-lg label { margin: 0; position: relative; }
.seg-lg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg-lg span { display: grid; place-items: center; min-height: 2.5rem; padding: 0 0.5rem; text-align: center; border-radius: 0.55rem; font-size: var(--step--1); font-weight: 560; transition: background-color 0.25s var(--ease), box-shadow 0.25s; }
.seg-lg input:checked + span { background: var(--bg); box-shadow: 0 1px 2px rgb(0 0 0 / 0.15); }
.seg-lg input:focus-visible + span { outline: 2px solid var(--blaze); outline-offset: 2px; }
.row { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.saved { font-size: var(--step--1); color: var(--muted); }

.plan-name { font-stretch: 66%; font-weight: 780; font-size: var(--step-3); line-height: 1; margin-bottom: 0.5rem; }
.facts { margin: 1.25rem 0 0; }
.facts div { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.6rem; border-top: 1px solid var(--line); font-size: var(--step--1); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }

.danger-zone { background: transparent; }
.danger-zone p { max-width: var(--measure); margin-bottom: 1rem; }

dialog {
  width: min(100% - 2rem, 26rem); padding: 1.5rem; border: 1px solid var(--line); border-radius: 1.2rem;
  background: var(--surface); color: var(--ink);
  opacity: 0; transform: translateY(12px) scale(0.97);
  transition: opacity 0.3s var(--ease), transform 0.45s var(--spring), overlay 0.3s allow-discrete, display 0.3s allow-discrete;
}
dialog[open] { opacity: 1; transform: none; }
@starting-style { dialog[open] { opacity: 0; transform: translateY(12px) scale(0.97); } }
dialog::backdrop { background: rgb(8 16 13 / 0); transition: background-color 0.3s, overlay 0.3s allow-discrete, display 0.3s allow-discrete; }
dialog[open]::backdrop { background: rgb(8 16 13 / 0.55); }
@starting-style { dialog[open]::backdrop { background: rgb(8 16 13 / 0); } }
dialog form { display: grid; gap: 1rem; }
dialog h2 { font-size: var(--step-2); }
