:root {
  color-scheme: light;
  --ink: #18392f;
  --muted: #4d6259;
  --green: #176b57;
  --green-dark: #11513f;
  --line: #d8e6dc;
  --wash: #edf6ef;
  --paper: #fff;
  color: var(--ink);
  background: #f4f8f5;
  font: 100%/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; padding: 0 1rem 2rem; min-height: 100vh; }
h1, h2, p { margin: 0; }
p { overflow-wrap: anywhere; }

.brand {
  max-width: 28rem;
  margin: 0 auto;
  padding-block: 1.3rem;
  font: 2rem/1.2 Georgia, "Times New Roman", serif;
  letter-spacing: .045em;
}

.card {
  width: min(100%, 28rem);
  margin: clamp(.4rem, 5vw, 2rem) auto 0;
  padding: clamp(1rem, 5vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 6px 26px rgb(24 57 47 / 6%);
}

.eyebrow { margin-bottom: .35rem; font-size: .84rem; font-weight: 750; color: var(--green-dark); }
h1 { font-size: clamp(1.55rem, 6vw, 2rem); line-height: 1.2; letter-spacing: -.035em; }
h2 { font-size: 1.12rem; line-height: 1.35; margin-bottom: .35rem; }
section, #loading, #session-retry { margin-top: 1.3rem; }
section > p, #loading, noscript p { color: var(--muted); }

#status:not(:empty) {
  margin-top: 1rem;
  padding: .65rem .75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--wash);
}
#status[data-kind="error"]:not(:empty) { color: #763126; background: #fff3ee; border-color: #ecc8bb; }

form { display: grid; gap: .6rem; margin-top: 1.05rem; }
label { font-weight: 700; }
input, button { font: inherit; }
input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: .6rem .75rem;
  border: 1px solid #b8cdbf;
  border-radius: 10px;
  background: #fcfdfc;
  color: var(--ink);
}
#code { letter-spacing: .14em; font-variant-numeric: tabular-nums; }
button {
  min-height: 44px;
  max-width: 100%;
  padding: .55rem .8rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 750;
  overflow-wrap: anywhere;
  cursor: pointer;
}
button:disabled { opacity: .58; cursor: wait; }
input:focus-visible, button:focus-visible, h2:focus-visible { outline: 3px solid #458672; outline-offset: 2px; }
.primary { background: var(--green); color: #fff; margin-top: .25rem; }
.primary:hover { background: var(--green-dark); }
.secondary { border-color: var(--line); background: var(--paper); color: var(--green-dark); }
.secondary:hover { background: var(--wash); }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .8rem; }
#logout-form { justify-items: start; }
