/* Le Terminal install page — public install flow.
   Palette mirrors the LP at public/index.html. */

:root {
  --bg: #1a1410;
  --bg-soft: #221a14;
  --bg-counter: #2c2018;
  --line: #3a2c20;
  --text: #e8d8c0;
  --text-dim: #9a8870;
  --rene: #d4a574;
  --warn: #c87060;
  --ok: #7cb87c;
  --accent: #f4c576;
  --serif: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100vh; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; border-bottom: 1px dashed transparent; }
a:hover { border-bottom-color: var(--accent); }

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 80px;
  position: relative;
}
/* Atmospheric glow above the wordmark — same treatment as the LP hero,
   scaled to the install page's narrower column. */
.page::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 480px;
  height: 320px;
  background: radial-gradient(ellipse at center, rgba(244, 197, 118, 0.08) 0%, rgba(244, 197, 118, 0) 65%);
  pointer-events: none;
  z-index: 0;
}
.page > * { position: relative; z-index: 1; }

header { margin-bottom: 40px; }
header .brand {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 52px);
  color: var(--accent);
  letter-spacing: -0.005em;
  line-height: 1.1;
  margin: 0 0 6px;
}
/* "chez René" subtext mirrors the LP nav brand — same voice, same place. */
header .brand .chez {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-left: 10px;
  vertical-align: middle;
}
header .sub {
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
}
header .lede {
  margin-top: 26px;
  font-size: 15px;
  color: var(--text);
  line-height: 1.65;
  max-width: 600px;
}
header .lede em { color: var(--rene); font-style: italic; }

.toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-bottom: 24px;
  background: var(--bg-soft);
}
.toggle button {
  background: transparent;
  border: 0;
  color: var(--text-dim);
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
  letter-spacing: 0.04em;
}
.toggle button.active {
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
}

form {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px;
}
form .row { margin-bottom: 14px; }
form label {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
form .hint {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
  font-style: italic;
}
form input,
form textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 4px;
  outline: none;
  resize: vertical;
}
form input:focus,
form textarea:focus { border-color: var(--accent); }
form input.code {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
}

button.cta {
  background: var(--accent);
  color: var(--bg);
  border: 0;
  padding: 12px 18px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
}
button.cta:hover { filter: brightness(1.05); }
button.cta:disabled { opacity: 0.5; cursor: progress; }

.err {
  margin-top: 14px;
  color: var(--warn);
  font-size: 12px;
  min-height: 1em;
}
.err.hidden { display: none; }

/* ── Bundle view (after success) ─────────────────────────────────────── */
.bundle h2 {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--accent);
  font-weight: 500;
  margin: 0 0 6px;
}
.bundle .meta {
  color: var(--text-dim);
  font-size: 12px;
  margin-bottom: 22px;
}
.bundle .meta strong { color: var(--text); font-weight: 600; }
.bundle details {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-bottom: 12px;
}
.bundle summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bundle summary::-webkit-details-marker { display: none; }
.bundle summary .h {
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
}
.bundle summary .sub {
  color: var(--text-dim);
  font-size: 11px;
  font-style: italic;
}
.bundle .body {
  border-top: 1px solid var(--line);
  padding: 14px 16px;
  position: relative;
}
.bundle .body pre {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px;
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  overflow-x: auto;
  white-space: pre;
  max-height: 360px;
  overflow-y: auto;
}
.bundle .body .copy {
  position: absolute;
  top: 24px;
  right: 28px;
  background: var(--bg-counter);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 3px;
  cursor: pointer;
}
.bundle .body .copy:hover { color: var(--accent); border-color: var(--accent); }
.bundle .body .copy.copied { color: var(--ok); border-color: var(--ok); }

.footer {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-dim);
}
.footer a { color: var(--text-dim); border-bottom-color: var(--text-dim); }
.footer a:hover { color: var(--accent); border-bottom-color: var(--accent); }

@media (max-width: 600px) {
  .page { padding: 28px 18px 60px; }
  header .brand { font-size: 30px; }
  .bundle .body .copy { top: 18px; right: 22px; }
}

/* OAuth sign-in block — primary path, invite-code is the fallback. */
.oauth-block {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 22px 24px;
  margin: 18px 0 6px;
}
.oauth-block.oauth-primary {
  /* Subtle accent treatment so the OAuth path reads as primary,
     not as a sidebar to the invite-code form. */
  border-color: var(--accent);
  border-width: 1px;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 12%, transparent);
}
.oauth-headline {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -0.005em;
  line-height: 1.2;
}
.oauth-headline em {
  font-style: italic;
  color: var(--rene);
}
.oauth-sub {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-dim);
}
.oauth-sub em {
  color: var(--rene);
  font-style: italic;
}
.oauth-lede {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-dim);
}
.oauth-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.oauth-form label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.oauth-form input {
  flex: 1 1 200px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 3px;
}
.oauth-form input:focus { outline: none; border-color: var(--accent); }
.oauth-btn {
  background: #24292f;
  color: #fff;
  border: 1px solid #24292f;
  padding: 9px 16px;
  border-radius: 3px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.oauth-btn:hover { background: #1b1f24; border-color: #1b1f24; }
.oauth-hint {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--text-dim);
}
.divider {
  position: relative;
  text-align: center;
  margin: 18px 0 14px;
  color: var(--text-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: var(--line);
  z-index: 0;
}
.divider span {
  position: relative;
  z-index: 1;
  background: var(--bg);
  padding: 0 12px;
}
