/* Stardust CMS consent site. Colours follow cms-web (deep navy, lavender). */
:root {
  --bg: #0d1220;
  --panel: #161d31;
  --field: #0f1527;
  --edge: #283150;
  --fg: #f3f4f8;
  --muted: #a3acc2;
  --primary: #a891ed;
  --ink: #150f2c;
  --error: #ff9a8f;
  --radius: 18px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", "Noto Sans TC", sans-serif;
}
.shell {
  width: 100%;
  max-width: 860px;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--edge);
  box-shadow: 0 24px 70px #000a;
}
.shell.single { grid-template-columns: 1fr; max-width: 520px; }

/* Brand panel */
.hero {
  padding: 36px 30px;
  color: #fff;
  background:
    radial-gradient(1px 1px at 20% 30%, #fff9 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 15%, #fff7 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 55% 65%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 85% 80%, #fff6 50%, transparent 51%),
    radial-gradient(1px 1px at 35% 88%, #fff7 50%, transparent 51%),
    radial-gradient(1px 1px at 10% 60%, #fff5 50%, transparent 51%),
    radial-gradient(500px 400px at 0% 0%, #5b47b8 0%, transparent 65%),
    radial-gradient(500px 400px at 100% 100%, #2c3f8f 0%, transparent 60%),
    #0b0f1d;
}
.hero-logo { width: 48px; height: 48px; border-radius: 12px; box-shadow: 0 6px 18px #0008; }
.hero h2 { margin: 18px 0 8px; font-size: 22px; }
.hero p { color: #d4d8ea; margin: 0 0 18px; }
.hero-points { list-style: none; padding: 0; margin: 0; }
.hero-points li { position: relative; padding-left: 22px; margin: 8px 0; color: #e6e8f4; }
.hero-points li::before { content: "✦"; position: absolute; left: 0; color: var(--primary); }

/* Content panel */
.panel { background: var(--panel); padding: 34px 32px 26px; min-height: 360px; }
.eyebrow {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}
h1 { margin: 0 0 8px; font-size: 21px; line-height: 1.35; }
.hl { color: var(--primary); }
.as { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.as b { color: var(--fg); font-weight: 600; }

/* Sign-in form */
.form label { display: block; margin: 12px 0 6px; color: var(--muted); font-size: 13px; }
.form input {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: var(--field);
  color: var(--fg);
  font: inherit;
}
.form input:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: transparent; }
.error { min-height: 1.4em; margin: 10px 0 0; color: var(--error); font-size: 14px; }

/* Permissions */
.perm-grid { display: grid; gap: 10px; margin-bottom: 16px; }
.perm {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: var(--field);
}
.perm svg { flex: none; margin-top: 2px; color: var(--primary); }
.perm b { display: block; font-weight: 600; }
.perm span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
/* The choice under the cards (#733). */
.perm.choice { margin: -6px 0 16px; }
.perm.choice label { cursor: pointer; }
.perm.choice input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--primary); }
.perm.choice span { display: block; }
/* The second choice, which needs the first (#768). */
.perm.choice.sub { margin-left: 28px; }
.perm.choice input:disabled + div { opacity: 0.55; }
.choice-list { margin: 4px 0 4px; padding-left: 18px; color: var(--muted); font-size: 13px; }

.dest { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--muted); font-size: 14px; }
.dest svg { flex: none; }
.dest code { color: #fff; font-weight: 600; overflow-wrap: anywhere; }

/* Buttons */
.actions { display: flex; gap: 10px; justify-content: flex-end; }
.btn {
  padding: 11px 20px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn.primary { background: var(--primary); color: var(--ink); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--edge); }
.btn.ghost:hover:not(:disabled) { border-color: var(--muted); }
.btn.wide { width: 100%; margin-top: 14px; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Messages and progress */
.fine { margin: 16px 0 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.message-text { margin: 0; }
.working-text { margin: 12px 0 0; text-align: center; color: var(--muted); }
.spinner {
  width: 28px;
  height: 28px;
  margin: 60px auto 0;
  border: 3px solid var(--edge);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* Links */
a { color: var(--primary); }
a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.linkish {
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* Connected apps (oauth/connections.html) */
.notice {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: var(--field);
  font-size: 14px;
}
.apps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.app {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: var(--field);
}
.app-text { flex: 1 1 220px; min-width: 0; }
.app-text b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.app-meta, .app-claim { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.app-claim { font-size: 12px; }
.app-access { display: block; color: var(--fg); font-size: 13px; margin-top: 2px; }
.app-hint { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; overflow-wrap: anywhere; }
.repeated { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.repeated p { margin: 0 0 6px; }
.app-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.app .error { flex-basis: 100%; min-height: 0; margin: 0; }
.confirm-text { color: var(--fg); font-size: 13px; }
.empty { margin: 0; color: var(--muted); }
.btn.small { padding: 7px 14px; font-size: 14px; }
.btn.danger { background: var(--error); color: var(--ink); }
.btn.danger:hover:not(:disabled) { filter: brightness(1.05); }

/* The guide (index.html) */
/* minmax(0, …): a long unbreakable line (the MCP address, a command) must scroll in
   its own box, not widen the column past the page and get clipped. */
.shell.doc { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.shell.doc .hero { padding: 28px 30px; }
.shell.doc .hero h1 { margin: 14px 0 6px; font-size: 24px; }
.doc-body { background: var(--panel); padding: 8px 32px 30px; }
.doc-body h2 { margin: 26px 0 8px; font-size: 18px; }
.doc-body p, .doc-body li { color: var(--fg); }
.doc-body ol, .doc-body ul { padding-left: 22px; margin: 8px 0; }
.doc-body li { margin: 6px 0; }
.doc-body .muted { color: var(--muted); }
.doc-body code { padding: 1px 5px; border-radius: 6px; background: var(--field); font-size: 13px; overflow-wrap: anywhere; }
.doc-body pre {
  margin: 10px 0;
  padding: 12px 14px;
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: var(--field);
  overflow-x: auto;
}
.doc-body pre code { padding: 0; background: none; font-size: 13px; }
/* The Stardust CMS address: its own card, so it is the one thing on the page
   a reader cannot miss (Edward, 2026-10-06). The Copy button wraps below the
   address on a narrow screen. */
.address-card {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 12px 0 6px; padding: 14px 16px;
  border: 2px solid var(--primary); border-radius: 12px; background: var(--field);
}
.address { display: block; overflow-x: auto; padding: 12px 14px; border: 1px solid var(--primary); border-radius: 10px; background: var(--field); font-weight: 600; user-select: all; }
.address-card .address { flex: 1 1 280px; min-width: 0; padding: 4px 0; border: 0; background: none; font-size: 16px; }
.btn.copy { flex: 0 0 auto; padding: 8px 16px; }
.doc-body table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 14px; }
.doc-body th, .doc-body td { text-align: left; vertical-align: top; padding: 8px 10px; border-top: 1px solid var(--edge); }
.doc-body th { color: var(--muted); font-weight: 600; }

@media (max-width: 720px) {
  body { padding: 0; place-items: stretch; }
  .shell { grid-template-columns: 1fr; border-radius: 0; border: 0; min-height: 100vh; align-content: start; background: var(--panel); }
  .hero { padding: 22px 20px; }
  .hero p, .hero-points { display: none; }
  .hero h2 { margin: 10px 0 0; font-size: 18px; }
  .panel { padding: 24px 20px; min-height: 0; }
  .doc-body { padding: 4px 20px 24px; }
  .shell.doc .hero p { display: block; }
}
