/* Page chrome for /see-it-run/board/ and its translations.
 *
 * 🔴 CLASS SELECTORS ONLY, and neither home.css nor locales.css is loaded. The replay mounts
 * its own <header>, <main> and <section> inside #board-replay, and those two files style
 * bare `header`, `main`, `section` and `h2` (sticky headers, section padding, a narrow-phone
 * `header { flex-wrap }` rule), which would reach into the board. The replay scopes its own
 * theme under .board-replay-root; this file keeps the same promise from the page's side.
 *
 * The language-switch rules repeat the ones in locales.css for the same reason.
 */
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
.br-bar {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  height: 68px;
  padding: 0.9rem clamp(1.2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--rule);
  font-size: 0.9rem;
}
.br-brand { display: flex; align-items: center; margin-right: auto; }
.br-lockup { height: 20px; width: auto; display: block; }
.br-bar a { color: var(--ink); text-decoration: none; }
.br-bar a:hover { color: var(--brand-bright); }

/* Same width and gutters as the board below, so their left edges line up. */
.br-intro, .br-foot {
  width: min(100% - 2 * clamp(0.6rem, 2vw, 1.5rem), 96rem);
  margin: 0 auto;
  padding: 0 clamp(0.6rem, 1.5vw, 1.2rem);
}
.br-intro { padding-top: 3rem; padding-bottom: 1.6rem; }
.br-kicker {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--violet);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.br-intro h1 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -0.024em;
  text-wrap: balance;
}
.br-intro p { margin: 0 0 0.8rem; max-width: 66ch; color: var(--ink-2); }
.br-intro p.br-prov { color: var(--muted); font-size: 0.9rem; }

/* The board needs a definite height: the app's root fills its container. */
.br-board {
  width: min(100% - 2 * clamp(0.6rem, 2vw, 1.5rem), 96rem);
  height: max(46rem, calc(100vh - 7rem));
  margin: 0 auto;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
}
.br-foot { padding-top: 1.4rem; padding-bottom: 4rem; }
.br-foot a { color: var(--brand-bright); }
.br-nojs { padding: 2rem; color: var(--ink-2); }

.language-switch { position: relative; flex-shrink: 0; color: var(--ink); font-size: 0.88rem; }
.language-switch summary { display: flex; align-items: center; gap: 0.4rem; cursor: pointer; list-style: none; padding: 0.45rem 0.2rem; }
.language-switch summary::-webkit-details-marker { display: none; }
.language-switch summary:focus-visible, .language-switch a:focus-visible { outline: 2px solid var(--brand-bright); outline-offset: 3px; }
.language-icon { font-size: 0.9rem; line-height: 1; white-space: nowrap; }
.language-icon span { font-size: 0.68rem; vertical-align: -0.25em; margin-left: -0.12em; }
.language-caret { font-size: 0.7rem; }
.language-switch nav { position: absolute; top: 100%; right: 0; z-index: 60; display: flex; flex-direction: column; gap: 0.15rem; min-width: 9rem; padding: 0.4rem; background: var(--bg-deep); border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 12px 30px rgb(0 0 0 / 45%); }
.language-switch:not([open]) nav { display: none; }
.language-switch nav a { display: block; padding: 0.45rem 0.7rem; text-decoration: none; color: var(--ink); text-align: left; white-space: nowrap; }
.language-switch nav a:hover, .language-switch nav a[aria-current] { background: rgb(32 140 183 / 18%); border-radius: 4px; }
