/* The Studio's public pages: early-access showcase + pilot login, "not on the list", "page not found" and error pages.
   Mobile first, system fonts, strict CSP compatible (zero inline styles or scripts). */

:root {
  color-scheme: dark;
  --bg: #0c0d0f;
  --panel: #15181c;
  --line: #262b31;
  --text: #eceae4;
  --muted: #a6a39b;
  --accent: #8fc1b5;
  --accent-ink: #0f1513;
  --gold: #e8c36b;
  --gold-ink: #161208;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 0%, #1b1912 0%, var(--bg) 58%);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main {
  width: 100%;
  max-width: 26rem;
  padding: 32px 20px;
  text-align: center;
}

main.showcase {
  max-width: 48rem;
  padding: 44px 22px 36px;
}

.page-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0 auto 18px;
  font-size: 0.96rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--text);
}

.page-brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  flex: none;
}

.hero-kicker {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 12px;
  border: 1px solid rgba(232, 195, 107, 0.35);
  border-radius: 999px;
  background: rgba(232, 195, 107, 0.08);
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

h1 {
  margin: 0 0 14px;
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 38rem;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 1.05rem;
}

p {
  margin: 0 0 16px;
}

a {
  color: var(--accent);
}

.muted {
  color: var(--muted);
  font-size: 0.88rem;
}

.notice {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.cta-stack {
  display: grid;
  gap: 12px;
  max-width: 26rem;
  margin: 0 auto 34px;
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 10px 20px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}

.button.gold {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--gold-ink);
}

.button.quiet {
  border-color: var(--line);
  background: var(--panel);
  color: var(--text);
}

/* A button that cannot be pressed yet looks it. The fills above are this page's own styles, and a page's own styles
   always win over the browser's disabled look, so without this rule a disabled gold button looked ready on iPhone
   Safari and Android Chrome. (studio.css dims its own buttons; the pages built on this sheet do not load it.) */
.button:disabled,
.button[aria-disabled="true"] {
  border-color: var(--line);
  background: var(--panel);
  color: var(--muted);
  cursor: default;
}

.button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
}

.pillars {
  display: grid;
  gap: 14px;
  margin: 0 0 28px;
  text-align: left;
}

@media (min-width: 680px) {
  .pillars {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pillar {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(21, 24, 28, 0.88);
}

.pillar h2 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--gold);
}

.pillar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.48;
}

.faq-block {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(21, 24, 28, 0.65);
  text-align: left;
  margin-bottom: 28px;
}

.faq-block h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
}

.faq-block dl {
  margin: 0;
}

.faq-block dt {
  font-weight: 600;
  margin-top: 12px;
  color: var(--text);
}

.faq-block dt:first-child {
  margin-top: 0;
}

.faq-block dd {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.gate-foot {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

label {
  display: block;
  margin: 24px 0 8px;
  color: var(--muted);
}

input[type="email"] {
  width: 100%;
  min-height: 52px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
}

button.button {
  width: 100%;
  margin-top: 12px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.legal-doc-row {
  margin: 0 0 18px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.legal-gate-form {
  max-width: 38rem;
  margin: 0 auto;
  text-align: left;
}

/* What a form hides stays hidden. The hidden attribute hides only through the browser's own style sheet, so any
   display this sheet or tabs.css gives (.button, .cta-stack, .legal-check-row) used to beat it: on the add-a-file
   page the lyrics tick showed with no lyrics, a done box offered a .mid link to "#", and the MIDI export page showed
   the send button it hides (tests/test_mcp_import_page_browser.py, Chromium and WebKit). */
.legal-gate-form [hidden] {
  display: none !important;
}

/* A file field kept out of sight, not hidden: on the add-a-file page it is the only way to choose a file. Hidden
   (display none), no keyboard reached it and a screen reader named no button for it. Out of sight, the first Tab
   reaches it, Space opens it, and its label, drawn as the gold button right after it, opens it by a tap or a click
   and shows the focus ring while it has keyboard focus. tabs.css draws every file field as a block the width of its
   box with the browser's own "Choose File", so these win with !important, as shell.css's .sr-only does. */
.legal-gate-form input.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.legal-gate-form input.sr-only:focus-visible + label {
  outline: 3px solid var(--text);
  outline-offset: 3px;
}

.legal-check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(232, 195, 107, 0.4);
  border-radius: 12px;
  background: rgba(232, 195, 107, 0.07);
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.48;
  cursor: pointer;
}

.legal-check-row input[type="checkbox"] {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--gold);
  cursor: pointer;
}

/* A tick's caption sits above its words, beside the box, and says whether the tick is needed. It is never part of
   the words: the checkbox is named by the words alone and reads the caption as its description. */
.check-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

/* A caption on one line is a pill: its radius is half its height (1.6em of line and two 1px borders). A long caption
   ("Only if you're covering another writer's song" on a phone) wraps, and then has round corners, not round ends. */
.check-need {
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: calc(0.8em + 1px);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.6;
}

.check-need.is-required {
  border-color: rgba(232, 195, 107, 0.6);
  color: var(--gold);
}

.legal-gate-form .cta-stack {
  margin-bottom: 12px;
}

/* The line right above a form's main button: why the button waits, or why the last press did not go through.
   Empty, it takes no room but stays in the page, so a screen reader hears each new line. */
.send-status {
  max-width: 26rem;
  margin: 0 auto;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: center;
}

.send-status.is-error {
  color: #f0a39a;
}

.reviewer-key-input {
  width: 100%;
  max-width: 440px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #121216;
  color: #f4f4f6;
  margin: 6px 0 12px;
  font: inherit;
}

.faq-block.is-picked {
  padding: 12px 14px;
  margin-bottom: 14px;
  background: rgba(21, 24, 28, 0.9);
}

.faq-block.is-picked .mcp-file-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
}

.faq-block.is-picked .mcp-file-copy {
  flex: 1 1 13rem;
  min-width: 0;
}

.faq-block.is-picked h2 {
  margin: 0 0 2px;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.faq-block.is-picked p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.faq-block.is-picked .mcp-file-cta {
  margin: 0;
  max-width: none;
}

.button.mcp-change-btn {
  min-height: 36px;
  margin: 0;
  padding: 6px 12px;
  font-size: 0.84rem;
}

html.is-in-chat body {
  min-height: 0;
  display: block;
  background: transparent;
}

html.is-in-chat main.showcase {
  max-width: none;
  padding: 12px 14px 14px;
  text-align: left;
}

html.is-in-chat .legal-gate-form {
  max-width: none;
}

html.is-in-chat .faq-block {
  padding: 12px 14px;
  margin-bottom: 12px;
}

html.is-in-chat .notice {
  margin: 0 0 12px;
  padding: 10px 12px;
  font-size: 0.9rem;
}

html.is-in-chat .legal-check-row {
  padding: 10px 12px;
  margin-bottom: 10px;
}

html.is-in-chat .legal-gate-form .cta-stack {
  max-width: none;
  margin-bottom: 4px;
}

html.is-in-chat .send-status {
  max-width: none;
  margin: 0 0 8px;
}

html.is-in-chat textarea#mcp-lyrics-text {
  min-height: 76px;
}
