/* Locora account site. Colours from the app (apps/app/ui/style.css): indigo, lime, warm cream. */
:root {
  --bg: #f3eee3;
  --surface: #fffaf0;
  --text: #22234f;
  --muted: #5f6089;
  --indigo: #3a3d92;
  --indigo-deep: #25276a;
  --lime: #c9e85a;
  --glow: #ddf76a;
  --ok: #2f7a3c;
  --again: #b8473a;
  --warn-bg: #f7e7b4;
  --warn-text: #5a4300;
  --line: #d3cbb9;
  --link: #3a3d92;
  --focus: #3a3d92;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17183a;
    --surface: #22244f;
    --text: #f3eee3;
    --muted: #b3b4d8;
    --line: #3a3d72;
    --ok: #8fd18a;
    --again: #ff9a8a;
    --warn-bg: #4a3f1a;
    --warn-text: #ffe7a0;
    --link: #ddf76a;
    --focus: #ddf76a;
    color-scheme: dark;
  }
}

[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
a { color: var(--link); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1:focus { outline: none; }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 .5rem; }
h2 { font-size: 1.15rem; margin: 0 0 .5rem; }
p { margin: 0 0 .75rem; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--surface); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem 1rem; max-width: 40rem; width: 100%; margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand-sub { font-weight: 400; color: var(--muted); }

main { flex: 1; width: 100%; max-width: 40rem; margin: 0 auto; padding: .5rem 1rem 2rem; }
.lead { color: var(--muted); }
.hint { color: var(--muted); }
.small { font-size: .875rem; margin-top: -.35rem; }
.aside { margin: .75rem 0 0; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 1.1rem 1.1rem 1.2rem; margin: 0 0 1rem;
  box-shadow: 0 1px 0 rgba(34, 35, 79, .04);
}

label { display: block; font-weight: 600; margin: .75rem 0 .3rem; }
label:first-child, h2 + label, .hint + label { margin-top: .25rem; }
input[type=email], input[type=password], input[type=text] {
  display: block; width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: .65rem .75rem; margin: 0 0 .5rem;
  min-height: 44px;
}
input:focus-visible { border-color: var(--focus); }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; margin: .75rem 0; }
.check input { width: 1.2rem; height: 1.2rem; margin: .15rem 0 0; flex: none; accent-color: var(--again); }

button {
  font: inherit; cursor: pointer; min-height: 44px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  padding: .55rem 1rem; margin-top: .25rem;
}
button:hover { border-color: var(--indigo); }
button.primary { background: var(--indigo); color: #fff; border-color: var(--indigo); font-weight: 600; }
button.primary:hover { background: var(--indigo-deep); }
button.danger { background: var(--again); color: #fff; border-color: var(--again); font-weight: 600; }
button.ghost { background: transparent; min-height: 40px; padding: .35rem .8rem; margin: 0; }
button:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: .6rem; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.mono { font-variant-numeric: tabular-nums; }

.badge {
  display: inline-block; font-size: .8rem; font-weight: 700; padding: .05rem .55rem;
  border-radius: 999px; margin-left: .25rem; white-space: nowrap; vertical-align: .05em;
}
.badge[data-kind=ok] { background: var(--lime); color: var(--indigo-deep); }
.badge[data-kind=warn] { background: var(--warn-bg); color: var(--warn-text); }

.notice { margin-top: 1rem; padding: .85rem 1rem; border-radius: 12px; background: var(--warn-bg); color: var(--warn-text); }
.notice button { margin-bottom: .25rem; }

.meter { height: 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; margin: 0 0 .6rem; }
.meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--indigo), var(--lime)); }

.msg { margin: .25rem 0 .5rem; font-weight: 500; }
.msg:empty { display: none; }
.msg[data-kind=error] { color: var(--again); }
.msg[data-kind=ok] { color: var(--ok); }
.msg[data-kind=info] { color: var(--muted); }
.banner:not(:empty) { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .6rem .9rem; }
.view > .msg:not(:empty) { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .6rem .9rem; }

.danger-zone summary { cursor: pointer; font-weight: 600; color: var(--again); min-height: 28px; }
.danger-zone[open] summary { margin-bottom: 1rem; }
.danger-zone hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }

.bottom {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: center;
  padding: 1.25rem 1rem 1.75rem; border-top: 1px solid var(--line); font-size: .95rem;
}

@media (max-width: 420px) {
  h1 { font-size: 1.5rem; }
  .facts { grid-template-columns: 1fr; gap: .1rem; }
  .facts dd { margin-bottom: .5rem; }
  .row button, .card > form > button, form.card > button { width: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  button, a { transition: background-color .15s, border-color .15s; }
}
.card > .msg:last-child { margin-bottom: 0; }
