/* Kyo account and invite pages, matching the live room.
 * Also carries the /join/{token} front door, whose markup lives as a Go string
 * literal in internal/cloud/invite.go but shares every token below.
 */
:root {
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --ui: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --paper: #f2f0ec;
  --rule: #dcd8d0;
  --ink: #2a2622;
  --ink-2: #4a453c;
  --ink-3: #5f5a52;
  --ink-4: #6a655c;
  --ink-5: #8a857c;
  --field: #fbfaf7;
  --edge: #c5c0b8;
  --blue: #2456a8;
  --amber: #c77d1e;
  --green: #3a7a4e;
  --red: #a03828;
  --focus: rgba(36, 86, 168, 0.38);
}

* { box-sizing: border-box; margin: 0; }
.hidden { display: none !important; }

body {
  font: 14px/1.55 var(--ui);
  color: var(--ink-2);
  background: #e6e2da radial-gradient(120% 120% at 30% 0%, #ece8e0, #ddd8ce);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.auth-card {
  width: 100%;
  max-width: 26rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 2.6rem 2.6rem 2.2rem;
  box-shadow: 0 24px 60px rgba(42, 38, 34, 0.28);
}
.brand { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--ink); }
.brand-row { display: flex; align-items: center; gap: 10px; }
.brand-row .brand { flex: 1; }

/* The lede sentence: what this page is, in the document voice. */
.auth-lede { font-family: var(--serif); font-size: 17px; line-height: 1.4; color: var(--ink-2); margin-top: 1.1rem; }
.auth-card h1 { font-family: var(--serif); font-size: 24px; font-weight: 400; line-height: 1.3; color: var(--ink); margin-top: 1.2rem; }
.auth-card h1 .accent { border-bottom: 2px solid var(--amber); }
.auth-card h1 .who { color: var(--blue); font-weight: 700; }

/* Step dots — the signup flow is three moments, and says which one you are in. */
.steps-dots { display: flex; gap: 6px; align-items: center; color: var(--ink-5); font-size: 12px; }
.steps-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--edge); display: block; }
.steps-dots i.done { background: var(--ink); }
.steps-dots i.now { background: var(--amber); }

.auth-card form { display: flex; flex-direction: column; gap: .85rem; margin-top: 1.5rem; }
.auth-card label { display: flex; flex-direction: column; gap: .3rem; font-size: 12px; font-weight: 600; color: var(--ink-4); }
.auth-card input {
  font: 14px var(--ui);
  padding: .62rem .75rem;
  border-radius: 7px;
  border: 1px solid var(--edge);
  background: var(--field);
  color: var(--ink);
}
.auth-card input::placeholder { color: var(--ink-5); font-weight: 400; }
.auth-card input:focus { outline: none; border-color: var(--ink-3); box-shadow: 0 0 0 3px var(--focus); }
.auth-card button {
  font: 650 14px var(--ui);
  cursor: pointer;
  padding: .7rem .75rem;
  border-radius: 8px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  margin-top: .35rem;
  transition: background .12s;
}
.auth-card button:hover { background: #3b352f; }
.auth-card button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }

.auth-hint { font-size: 13px; color: var(--ink-4); line-height: 1.55; margin-top: .5rem; }
.auth-alt { font-size: 13px; color: var(--ink-4); margin-top: 1.3rem; text-align: center; }
.auth-alt a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.auth-error { color: var(--red); font-size: 13px; margin-top: 1rem; min-height: 1.1rem; }

/* The one inverted surface: a command you are meant to carry to a terminal. */
.command {
  display: flex; align-items: center; gap: 12px;
  background: var(--ink); border-radius: 8px; padding: .75rem 1rem; margin-top: .9rem;
}
.command code { font-family: var(--mono); font-size: 13px; color: #e8e2d4; flex: 1; word-break: break-all; }
.command button {
  margin: 0; color: #a89f8c; font-size: 12px; font-weight: 500;
  background: transparent; border: 1px solid #4a453c; padding: 3px 10px; border-radius: 5px;
}
.command button:hover { background: transparent; color: #e8e2d4; border-color: #6a655c; }

/* Numbered setup steps on the final signup panel. Install, then approve — a
   teammate with no `kyo` binary cannot act on the login command alone. */
.setup-step { margin-top: 1.5rem; }
.setup-step + .setup-step { padding-top: 1.3rem; border-top: 1px solid var(--edge, rgba(0,0,0,.08)); }
.setup-step-title { font-size: 13px; font-weight: 600; letter-spacing: .01em; margin-bottom: .35rem; }
.setup-step-title code { font-family: var(--mono); font-size: 12.5px; }
.setup-step .auth-hint { margin: 0; }

/* Multi-line snippets keep their line breaks but must still break a long URL,
   or the code element overflows the flex row and pushes the copy button out. */
.command-block { align-items: flex-start; }
.command-block code { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.command-block button { margin-top: 1px; flex: none; }

.auth-foot { display: flex; gap: 14px; margin-top: 1.4rem; align-items: baseline; flex-wrap: wrap; }
.auth-foot a { color: var(--ink-3); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.auth-foot .aside-note { color: var(--ink-5); font-size: 12px; }

/* --- Account page and password reset (ADR 026) ---
   Both reuse the auth card. The account page is a document rather than a form,
   so it is wider and its sections are ruled off from each other. */

.account-card { max-width: 34rem; }
.auth-back { color: var(--ink-3); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

.auth-card section { margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid var(--rule); }
.auth-card section h2 {
  font-family: var(--serif); font-size: 17px; font-weight: 400; color: var(--ink);
  margin-bottom: .5rem;
}
.auth-inline-link { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }

.account-rooms { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.account-rooms li { display: flex; flex-direction: column; gap: .1rem; }
.account-rooms strong { font-size: 14px; font-weight: 600; color: var(--ink); }
.room-meta { font-size: 12px; color: var(--ink-5); }

/* A checkbox is the one control on these pages that reads left-to-right. */
.checkbox-row { flex-direction: row !important; align-items: flex-start; gap: .55rem !important; font-weight: 400 !important; }
.checkbox-row input { width: auto; margin-top: 2px; }
.checkbox-row span { font-size: 13px; color: var(--ink-3); line-height: 1.5; }
.checkbox-row code { font-family: var(--mono); font-size: 12.5px; }

/* Owned-room decisions. Deliberately unstyled as a "choice" rather than a
   default: the select opens on "Choose…" and the form refuses to submit until
   every one of them has been answered. */
.decision {
  margin-top: .9rem; padding: .8rem .9rem; background: var(--field);
  border: 1px solid var(--rule); border-radius: 8px;
}
.decision-title { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: .5rem; }
.decision select {
  width: 100%; padding: .5rem .6rem; font: inherit; font-size: 13px;
  color: var(--ink); background: #fff; border: 1px solid var(--edge); border-radius: 6px;
}
.decision select + select { margin-top: .5rem; }
.decision-warn { margin-top: .5rem; font-size: 12.5px; }
.decision-warn:empty { display: none; }

.danger-note {
  background: #fbf2ef; border: 1px solid #e0c3ba; border-radius: 8px;
  padding: 1rem 1.1rem; border-top: 1px solid #e0c3ba !important;
}
.danger-note h2 { color: var(--red) !important; }
.danger-note button { margin-top: .8rem; }

.auth-card button.danger { background: var(--red); }
.auth-card button.danger:hover { background: #8d3123; }
