/* Shared styling for the CRUCIBLE account surface (login + account home).
   Tokens and type mirror index.html. */
:root {
  --red: #aa3d1d;
  --red-dim: #7a1f16;
  --bg: #0e0e0e;
  --surface: #141414;
  --border: #222222;
  --text: #d6d0c8;
  --muted: #6b6560;
  --label: #888078;
  --white: #f0ece5;
  --green: #5a7d3d;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "EB Garamond", Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

nav {
  border-bottom: 1px solid var(--border);
  padding: 22px 24px;
}
.nav-logo {
  font-family: "Space Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--white);
  text-decoration: none;
}
.nav-logo span { color: var(--red); }

.wrap {
  max-width: 420px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.wrap.wide { max-width: 560px; }

h1 {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 32px;
  font-weight: 500;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 8px;
}
.sub {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 28px;
}

form.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 24px;
}

label {
  display: block;
  font-family: "Space Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--label);
  margin-bottom: 6px;
}

input[type="email"],
input[type="password"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--white);
  font-family: "EB Garamond", Georgia, serif;
  font-size: 17px;
  padding: 10px 12px;
  outline: none;
  border-radius: 0;
  transition: border-color 0.18s;
  -webkit-appearance: none;
}
input:focus { border-color: var(--red); }
input::placeholder { color: var(--muted); opacity: 0.5; }

button {
  all: unset;
  display: inline-block;
  text-align: center;
  background: var(--red);
  color: #fff;
  font-family: "Space Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 13px 20px;
  cursor: pointer;
  transition: background 0.18s, opacity 0.18s;
}
button:hover { background: #8a3018; }
button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
button.secondary:hover { background: #181818; border-color: var(--label); }
/* Google — the recommended path, so it reads as a solid dark-grey button
   above the email/password fields rather than a faint outline. */
button.google {
  background: #2f2f2f;
  color: var(--white);
  border: 1px solid #454545;
}
button.google:hover { background: #3a3a3a; border-color: #5a5a5a; }
button:disabled { opacity: 0.4; cursor: default; }

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.error-text {
  color: var(--red);
  font-family: "Space Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.note-text {
  color: var(--label);
  font-family: "Space Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.links {
  margin-top: 16px;
  font-size: 14px;
}
.links p { margin-top: 4px; }
.links a { color: var(--red); text-decoration: none; }
.links a:hover { text-decoration: underline; }
.links .muted { color: var(--muted); }

/* ── Account home ── */
.acct-head {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 20px 22px;
  margin-bottom: 20px;
}
.acct-email {
  font-family: "Space Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--white);
}
.acct-status {
  font-size: 15px;
  color: var(--text);
  margin-top: 6px;
}

.app-card {
  border-left: 3px solid var(--card-accent, var(--red));
  background: var(--surface);
  padding: 18px 20px;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* Per-app accents — kept in sync with index.html's .tool-card.is-* */
.app-card.is-held  { --card-accent: #b8801f; --card-accent-dim: #7a5714; }
.app-card.is-ledgr { --card-accent: #4caf6d; --card-accent-dim: #2f6b44; }
.app-card.is-bloc  { --card-accent: #4a84ab; --card-accent-dim: #2f5670; }
.app-card.is-pakt  { --card-accent: #8a63ab; --card-accent-dim: #5c4373; }
.app-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.app-card-name {
  font-family: "Space Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--white);
}
.app-card-tag {
  font-family: "Space Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 2px 7px;
}
.app-card-tag.is-live {
  color: var(--card-accent, var(--white));
  border-color: var(--card-accent-dim, var(--label));
}
.app-card-blurb { font-size: 15px; color: var(--muted); }
.app-card button { align-self: flex-start; }
/* Enabled launch button takes the app's colour; disabled ones stay muted. */
.app-card button:not(:disabled) {
  background: var(--card-accent, var(--red));
}
.app-card button:not(:disabled):hover {
  background: var(--card-accent-dim, #8a3018);
}

.acct-foot {
  margin-top: 28px;
  font-size: 14px;
}
.acct-foot a { color: var(--muted); text-decoration: none; cursor: pointer; }
.acct-foot a:hover { color: var(--text); text-decoration: underline; }
