/* accounts.leyr.stream. The values are leyr.stream's own (site/public/site.css):
   Leyr green on its neutral dark surfaces. Kept here, not linked, because
   the page loads nothing from another origin but the mark. */
:root {
  color-scheme: dark;
  --accent: #1db954;
  --accent-hi: color-mix(in oklab, var(--accent) 82%, white);
  --on-accent: #030504;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 35%, transparent);
  --glow: color-mix(in srgb, var(--accent) 16%, transparent);
  --bg: #0a0a0b;
  --bg-2: #0e0f10;
  --surface: #131416;
  --surface-2: #191a1d;
  --line: rgb(255 255 255 / 0.07);
  --line-2: rgb(255 255 255 / 0.12);
  --fg: #ededef;
  --fg-2: #a3a3ab;
  --fg-3: #6e6e78;
  --bad: #e8705f;
  --bad-soft: color-mix(in srgb, var(--bad) 12%, transparent);
  --warn: #e2c78f;
  --sans: "Inter Variable", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --r: 12px;
  --r-lg: 18px;
  --gutter: 20px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

body {
  margin: 0;
  min-height: 100vh;
  font: 16px/1.55 var(--sans);
  color: var(--fg);
  background:
    radial-gradient(60rem 30rem at 50% -10rem, var(--glow), transparent 70%),
    var(--bg);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-hi); text-underline-offset: .2em; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.top { display: flex; align-items: center; justify-content: space-between; padding: var(--gutter); max-width: 44rem; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--fg); font-weight: 650; text-decoration: none; font-size: 1.1rem; }

.wrap { width: 100%; max-width: 44rem; margin: 0 auto; padding: .5rem var(--gutter) 5rem; }
.auth { max-width: 26rem; margin: 2rem auto; }

h1 { font-size: clamp(1.6rem, 6vw, 2.1rem); line-height: 1.15; margin: 0 0 .4rem; letter-spacing: -0.02em; }
.lead { color: var(--fg-2); margin: 0 0 1.25rem; }
.quiet { color: var(--fg-2); }
.small, .small-print { font-size: .875rem; }
.small-print { color: var(--fg-3); margin-top: 1rem; }

.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem;
  box-shadow: 0 30px 80px -40px rgb(0 0 0 / .8);
  animation: rise .35s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* Fields */
form { margin: 0; }
.field { display: grid; gap: .4rem; margin-bottom: 1rem; }
.field label { font-weight: 560; font-size: .95rem; }
.field label .quiet { font-weight: 400; font-size: .85rem; margin-left: .25rem; }
input {
  width: 100%; min-height: 2.9rem; font: inherit; color: inherit;
  background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r); padding: .7rem .85rem;
  transition: border-color .15s, box-shadow .15s;
}
input:hover { border-color: rgb(255 255 255 / .2); }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.hint { margin: 0; color: var(--fg-3); font-size: .85rem; }

.secret { position: relative; }
.secret input { padding-right: 4.5rem; }
.reveal {
  position: absolute; top: 50%; right: .4rem; transform: translateY(-50%);
  min-height: 2.1rem; padding: 0 .7rem; font: inherit; font-size: .85rem; font-weight: 600;
  color: var(--fg-2); background: transparent; border: 0; border-radius: 8px; cursor: pointer;
}
.reveal:hover { color: var(--fg); background: var(--line); }
.reveal:focus-visible { outline: 2px solid var(--accent); }

.meter { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--bad); transition: width .25s var(--ease), background-color .25s; }
.meter[data-level="2"] span { background: var(--warn); }
.meter[data-level="3"] span, .meter[data-level="4"] span { background: var(--accent); }

.form-error { margin: 0 0 1rem; color: var(--bad); font-size: .925rem; min-height: 0; }
.form-error:empty { display: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.75rem; padding: .55rem 1.15rem; font: inherit; font-weight: 600; color: var(--fg);
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .1s, filter .15s;
}
.btn:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--fg-2); }
.btn.ghost:hover { color: var(--fg); background: var(--line); }
.btn.danger { background: var(--bad); color: #1a0705; border-color: transparent; }
.btn.small { min-height: 2.25rem; padding: .35rem .9rem; font-size: .9rem; }
.btn.wide { width: 100%; margin-top: .25rem; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.busy span { opacity: .0; }
.btn.busy { position: relative; }
.btn.busy::after {
  content: ""; position: absolute; width: 1.1rem; height: 1.1rem; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.switch { margin: 1.25rem 0 0; text-align: center; color: var(--fg-2); }
.help { margin-top: .75rem; color: var(--fg-2); font-size: .925rem; text-align: center; }
.help summary { cursor: pointer; color: var(--fg-2); list-style: none; }
.help summary::-webkit-details-marker { display: none; }
.help summary:hover { color: var(--fg); }
.help p { text-align: left; margin: .6rem 0 0; }

/* Account */
.hero { display: flex; align-items: center; gap: 1.1rem; margin: 1rem 0 1.25rem; animation: rise .35s var(--ease) both; }
.avatar {
  flex: none; width: 4.25rem; height: 4.25rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.7rem; font-weight: 700; color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent-hi), var(--accent));
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.who { min-width: 0; }
.who h1 { margin: 0; overflow-wrap: anywhere; }
.sub { margin: .15rem 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; color: var(--fg-2); overflow-wrap: anywhere; }
.pill { font-size: .75rem; font-weight: 600; border-radius: 999px; padding: .1rem .55rem; border: 1px solid var(--line-2); }
.pill.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.pill.ok { color: var(--accent-hi); border-color: var(--accent-line); }

.glance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-bottom: 1.5rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: .8rem .9rem; display: grid; gap: .15rem; min-width: 0; }
.stat .k { color: var(--fg-3); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.stat .v { font-weight: 600; font-size: .95rem; overflow-wrap: anywhere; }
@media (max-width: 30rem) { .glance { grid-template-columns: 1fr 1fr; } .glance .stat:last-child { grid-column: 1 / -1; } }

.group { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--fg-3); margin: 1.5rem .25rem .5rem; font-weight: 650; }
.rows { padding: .25rem 1.25rem; }
.row-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.rows > :last-child, .rows > .row-item:has(+ .flow[hidden]:last-child) { border-bottom: 0; }
.row-text { display: grid; gap: .1rem; min-width: 0; }
.row-text .k { font-weight: 600; }
.row-text .v { color: var(--fg-2); font-size: .925rem; overflow-wrap: anywhere; }

.flow { padding: .25rem 0 1.25rem; border-bottom: 1px solid var(--line); animation: open .25s var(--ease) both; }
@keyframes open { from { opacity: 0; transform: translateY(-4px); } }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.note { color: var(--fg-2); font-size: .9rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: .7rem .85rem; margin: 0 0 1rem; }

.steps { display: flex; gap: .5rem; padding: 0; margin: .25rem 0 1rem; list-style: none; counter-reset: step; font-size: .85rem; color: var(--fg-3); }
.steps li { counter-increment: step; display: flex; align-items: center; gap: .4rem; }
.steps li::before {
  content: counter(step); width: 1.4rem; height: 1.4rem; border-radius: 50%; display: grid; place-items: center;
  font-size: .75rem; font-weight: 700; border: 1px solid var(--line-2);
}
.steps li + li::after { content: none; }
.steps li.on { color: var(--fg); }
.steps li.on::before { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.steps li.done::before { content: "✓"; background: var(--accent-soft); color: var(--accent-hi); border-color: var(--accent-line); }

.list { list-style: none; padding: 0; margin: .25rem 0 1rem; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .what { display: grid; gap: .1rem; min-width: 0; }
.list .what b { font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.list .what span { color: var(--fg-2); font-size: .875rem; }
.confirm { background: var(--bad-soft); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); border-radius: var(--r); padding: .9rem 1rem; margin-bottom: 1rem; }
.confirm p { margin: 0 0 .75rem; }

.loading { display: grid; place-items: center; padding: 4rem 0; }
.spinner { width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; }

.toast {
  position: fixed; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom)); transform: translateX(-50%);
  max-width: min(28rem, calc(100vw - 2rem)); padding: .75rem 1.1rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--accent-line); color: var(--fg);
  box-shadow: 0 20px 50px -20px rgb(0 0 0 / .9); font-weight: 550; text-align: center;
  animation: toast .3s var(--ease) both;
}
.toast.bad { border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 8px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
