/* A51 brand tokens (from a51-site/src/style.css). Spacing follows the phi scale: 5 8 13 21 34 55. */
:root {
  --black: #000;
  --ink: #0d0c0a;
  --line: #2a2a2a;
  --line-gold: rgba(200, 169, 106, 0.34);
  --ivory: #f5f3ed;
  --ash: #9a9a9a;
  --gold: #c8a96a;
  --gold-light: #f6e7b4;
  --danger: #d98b7a;
  --font: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  --r: 2px;
  --f1: 5px; --f2: 8px; --f3: 13px; --f4: 21px; --f5: 34px; --f6: 55px;
  --ease: cubic-bezier(0.618, 0, 0.382, 1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--black);
  color: var(--ivory);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
}

.shell {
  max-width: 420px;
  margin: 0 auto;
  padding: var(--f6) var(--f4);
  display: flex;
  flex-direction: column;
  gap: var(--f5);
  min-height: 100vh;
  justify-content: center;
}

.brand { display: flex; align-items: baseline; gap: var(--f2); }
.mark { font-weight: 600; letter-spacing: 0.21em; color: var(--gold); font-size: 1.272rem; }
.sub { font-size: 0.786rem; color: var(--ash); letter-spacing: 0.08em; }

.card {
  border: 1px solid var(--line-gold);
  border-radius: var(--r);
  background: var(--ink);
  padding: var(--f5) var(--f4);
  display: flex;
  flex-direction: column;
  gap: var(--f4);
}

h1 { font-size: 1.618rem; font-weight: 500; margin: 0; letter-spacing: 0.02em; }
h2 { font-size: 1.1rem; font-weight: 500; margin: 0; color: var(--gold-light); }
p { margin: 0; }
.muted { color: var(--ash); }
.fine { font-size: 0.786rem; color: var(--ash); text-align: center; }

form { display: flex; flex-direction: column; gap: var(--f3); }

label { display: flex; flex-direction: column; gap: var(--f1); font-size: 0.786rem; color: var(--ash); letter-spacing: 0.04em; }

input, select {
  font: inherit;
  color: var(--ivory);
  background: var(--black);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--f2) var(--f3);
  min-height: 44px;
}
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }

button, .button {
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.08em;
  min-height: 44px;
  padding: var(--f2) var(--f4);
  border-radius: var(--r);
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--black);
  cursor: pointer;
  transition: background 0.382s var(--ease), color 0.382s var(--ease);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button:hover, .button:hover { background: var(--gold-light); border-color: var(--gold-light); }
button.ghost, .button.ghost { background: transparent; color: var(--gold); }
button.ghost:hover, .button.ghost:hover { background: rgba(200, 169, 106, 0.12); color: var(--gold-light); }
button:disabled { opacity: 0.5; cursor: default; }

.links { display: flex; justify-content: space-between; gap: var(--f3); flex-wrap: wrap; font-size: 0.786rem; }
.links button { min-height: 0; padding: 0; border: 0; background: none; color: var(--ash); text-decoration: underline; font-weight: 500; letter-spacing: 0; }
.links button:hover { color: var(--gold); background: none; }

.status { font-size: 0.875rem; min-height: 1.4em; }
.status.error { color: var(--danger); }
.status.ok { color: var(--gold-light); }

.apps { display: flex; flex-direction: column; gap: var(--f2); }
.apps .button { justify-content: space-between; }

.codes { display: grid; grid-template-columns: 1fr 1fr; gap: var(--f2); font-family: ui-monospace, Consolas, monospace; font-size: 1rem; }
.codes span { border: 1px solid var(--line); padding: var(--f2); text-align: center; border-radius: var(--r); }

.secret { font-family: ui-monospace, Consolas, monospace; word-break: break-all; color: var(--gold-light); }

hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

@media (max-width: 480px) {
  .shell { padding: var(--f4) var(--f3); }
  .card { padding: var(--f4) var(--f3); }
  .codes { grid-template-columns: 1fr; }
}

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