/* sites/companion/src/assets/chrome.css
 *
 * Styles for the lead-capture chrome appended to the two verbatim artifacts.
 *
 * These two pages are OUTSIDE the brand token system by ruling: tokens.css is
 * deliberately not linked into them, because token discipline is what destroyed
 * the owner's design the first time. The --sl-* custom properties below are
 * LOCAL to this file, declared on .sl-chrome itself, and are not brand tokens.
 *
 * Every selector in this file starts with .sl-chrome, and nothing is set on
 * body, html, :root or any bare element selector. append-chrome.test.mjs
 * asserts both mechanically — if you add a rule that breaks the rule, the
 * suite fails rather than the artifact's design.
 *
 * Properties are set explicitly rather than left to inherit: both artifacts
 * carry bare element rules (the editorial lab has `h2 { max-width: 15ch;
 * font-size: clamp(2.6rem, 5.2vw, 5.3rem) }`, med3 has `button, input,
 * textarea, select { font: inherit }`) that would otherwise deform this block.
 */

.sl-chrome {
  --sl-ink: #0c1a1f;
  --sl-paper: #f2efe8;
  --sl-muted: #a3b4b9;
  --sl-accent: #e0603f;
  --sl-line: rgba(242, 239, 232, 0.22);
  --sl-field: rgba(242, 239, 232, 0.06);

  display: block;
  margin: 0;
  padding: clamp(2.75rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2.5rem);
  border: 0;
  border-top: 3px solid var(--sl-accent);
  background: var(--sl-ink);
  color: var(--sl-paper);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
}

.sl-chrome * {
  box-sizing: border-box;
}

/* The med3 deck is a fixed-viewport app: `html, body { height: 100%;
 * overflow: hidden }` clips anything in normal flow, and `main.deck` is a
 * 100dvh scroll-snap container. So this variant lives inside that container as
 * a trailing snap panel, with its own snap alignment and enough padding to
 * clear the artifact's fixed app-bar (4.5rem) and slide navigation (4.8rem).
 * It carries no `deck-slide` class, so the deck still counts 23 slides. */
.sl-chrome--deck {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 6rem;
  padding-bottom: 6rem;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.sl-chrome-inner {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 0;
}

.sl-chrome-eyebrow {
  max-width: none;
  margin: 0 0 0.5rem;
  padding: 0;
  color: var(--sl-accent);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sl-chrome-heading {
  max-width: none;
  margin: 0 0 0.75rem;
  padding: 0;
  color: var(--sl-paper);
  font-family: inherit;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: normal;
  text-transform: none;
}

.sl-chrome-lede {
  max-width: 38rem;
  margin: 0 0 1.75rem;
  padding: 0;
  color: var(--sl-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.sl-chrome-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  align-items: end;
  margin: 0;
  padding: 0;
}

.sl-chrome-label {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  color: var(--sl-muted);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sl-chrome-label--wide {
  grid-column: 1 / -1;
}

.sl-chrome-input {
  width: 100%;
  margin: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--sl-line);
  border-radius: 0.6rem;
  background: var(--sl-field);
  color: var(--sl-paper);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
  text-transform: none;
}

.sl-chrome-textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.sl-chrome-input:focus-visible {
  outline: 2px solid var(--sl-accent);
  outline-offset: 2px;
}

.sl-chrome-button {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 2.9rem;
  margin: 0;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 0.6rem;
  background: var(--sl-paper);
  color: var(--sl-ink);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  cursor: pointer;
}

.sl-chrome-button:hover {
  background: #ffffff;
}

.sl-chrome-button:focus-visible {
  outline: 2px solid var(--sl-accent);
  outline-offset: 2px;
}

.sl-chrome-status {
  grid-column: 1 / -1;
  max-width: none;
  min-height: 1.4rem;
  margin: 0;
  padding: 0;
  color: var(--sl-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Fine print INSIDE the form grid, subordinate to it — no rule above it and no
 * band of its own. The site's full disclaimer renders separately in its own
 * footer; this is the short static fallback that survives scripts being off. */
.sl-chrome-note {
  grid-column: 1 / -1;
  max-width: 40rem;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--sl-muted);
  font-size: 0.75rem;
  line-height: 1.5;
  opacity: 0.85;
}

@media (max-width: 560px) {
  .sl-chrome-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-height: 680px) {
  .sl-chrome--deck {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
}

/* The med3 deck supports printing every slide with its speaker notes. A lead
 * form on a printout is noise, so it is excluded deliberately. */
@media print {
  .sl-chrome {
    display: none;
  }
}
