/* Robots’ Last Exam — shared page shell for content pages (Scenes, World).

   The same shell as the redesigned homepage, leaderboard and blog: the fixed top band with the
   RLE mark, mono caps navigation, the ink button with an inline arrow,
   and shared header spacing. These rules mirror /home-redesign.css,
   /leaderboard/redesign/redesign.css and /blog/redesign/blog-apple.css; keep them in step.

   Colour is the site palette (tools/apple_palette.py): white paper, #1d1d1f ink, #f5f5f7 mist,
   black for large dark surfaces, and one blue accent.

   Use: <body class="rle-shell"> … with the band / mark / topbar / site-footer markup. */

@font-face { font-family: "Inter"; src: url("/blog/shared/assets/fonts/Inter-latin-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/blog/shared/assets/fonts/JetBrainsMono-latin-var.woff2") format("woff2"); font-weight: 400 500; font-style: normal; font-display: swap; }

html:has(> body.rle-shell) { background: #ffffff; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 108px; }
.rle-shell {
  --ink: #1d1d1f;
  --paper: #ffffff;
  --cream: #f5f5f7;
  --mist: #f5f5f7;
  --panel: #1d1d1f;
  --brass: #2997ff; --night: #000000; --accent: #0071e3;

  --rail: 78px;                 /* x of the left vertical line */
  --top: 76px;                  /* height of the top band */
  --right: 14.4vw;              /* the footer's right vertical line */
  --pad: 32px;
  --r: 10px;                    /* media corners */

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --muted: color-mix(in srgb, var(--ink) 68%, var(--paper));
  --faint: color-mix(in srgb, var(--ink) 54%, var(--paper));
  --rule: color-mix(in srgb, var(--ink) 24%, transparent);
  --hair: color-mix(in srgb, var(--ink) 11%, transparent);
  --line: var(--rule);
  --ease: cubic-bezier(.2, .7, .2, 1);

  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15.4px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.rle-shell *, .rle-shell *::before, .rle-shell *::after { box-sizing: border-box; }
/* resets carry no weight of their own (:where), so every page rule can override them */
:where(.rle-shell) a { color: inherit; text-decoration: none; }
:where(.rle-shell) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:where(.rle-shell) :is(h1, h2, h3, p) { margin: 0; padding: 0; }
:where(.rle-shell) a, :where(.rle-shell) button { -webkit-tap-highlight-color: transparent; }
.rle-shell :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.rle-shell [hidden] { display: none !important; }
.rle-shell .skip { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--ink); color: var(--cream); border-radius: 4px; }
.rle-shell .skip:focus { top: 12px; }
.rle-shell .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- fixed top band: mark, navigation, call to action ---------- */
.rle-shell .band { position: fixed; top: 0; left: 0; right: 0; z-index: 35; height: var(--top); background: var(--paper); border-bottom: 1px solid color-mix(in srgb, var(--ink) 30%, transparent); pointer-events: none; }
.rle-shell .mark { position: fixed; left: 0; top: 0; z-index: 40; display: grid; place-items: center; width: var(--rail); height: var(--top); border-right: 1px solid color-mix(in srgb, var(--ink) 30%, transparent); color: var(--ink); font: 600 16px/1 var(--display); letter-spacing: -0.02em; }
.rle-shell .topbar { position: fixed; top: 0; right: 0; left: var(--rail); z-index: 40; display: flex; align-items: center; justify-content: flex-end; gap: 34px; height: var(--top); padding: 0 29px 0 var(--pad); color: var(--ink); }
.rle-shell .topbar nav { display: flex; gap: 30px; }
.rle-shell .topbar nav a, .rle-shell .caps-link { position: relative; padding: 6px 0; font: 500 13px/1.32 var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.rle-shell .topbar nav a::after, .rle-shell .caps-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.rle-shell .topbar nav a:hover::after, .rle-shell .topbar nav a:focus-visible::after, .rle-shell .topbar nav a[aria-current="page"]::after,
.rle-shell .caps-link:hover::after, .rle-shell .caps-link:focus-visible::after, .rle-shell .caps-link[aria-current]::after, .rle-shell .caps-link[aria-pressed="true"]::after { transform: scaleX(1); }

/* ---------- buttons ---------- */
.rle-shell .btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px; padding: 10px 16px; border-radius: 4px; background: var(--ink); color: #f5f5f7; font: 500 15px/1.25 var(--sans); white-space: nowrap; transition: background .25s, color .25s, box-shadow .25s; }
.rle-shell .btn .arr { flex: none; font: 1em/1 var(--sans); }
.rle-shell .btn:hover { background: #161617; }
.rle-shell .btn--line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); }
.rle-shell .btn--line:hover { background: transparent; box-shadow: inset 0 0 0 1px var(--ink); }

/* ---------- page ---------- */
.rle-shell .page { position: relative; width: min(1320px, calc(100% - 2 * (var(--rail) + var(--pad)))); margin: 0 auto; padding: calc(var(--top) + 72px) 0 88px; }
.rle-shell .eyebrow { font: 500 13px/1.3 var(--mono); letter-spacing: .09em; text-transform: uppercase; opacity: .86; }
.rle-shell .display { margin-top: 24px; font: 600 clamp(44px, 5vw, 88px)/1.05 var(--display); letter-spacing: -0.022em; }
.rle-shell .lede { max-width: 24em; margin-top: 30px; font: 400 clamp(20px, 1.9vw, 28px)/1.19 var(--display); letter-spacing: -0.008em; }
.rle-shell .note { color: var(--muted); font-size: 16px; line-height: 1.5; }
.rle-shell .section { padding: 56px 0 64px; border-top: 1px solid var(--rule); }
.rle-shell .section-title { margin-top: 16px; font: 600 clamp(28px, 2.6vw, 44px)/1.07 var(--display); letter-spacing: -0.02em; }
.rle-shell .spinner { display: inline-block; flex: none; width: 13px; height: 13px; border: 1px solid color-mix(in srgb, currentColor 22%, transparent); border-top-color: currentColor; border-radius: 50%; animation: rle-spin .9s linear infinite; }
@keyframes rle-spin { to { transform: rotate(360deg); } }

.rle-shell .world-stage-robot { display: block; opacity: .7; transition: opacity .3s, transform .3s; }
.rle-shell .world-stage-robot:hover { opacity: 1; transform: translateY(-3px); }
.rle-shell .world-stage-robot img { display: block; width: 40px; height: 40px; filter: invert(1) brightness(1.6); }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  html:has(> body.rle-shell) { scroll-padding-top: 84px; }
  .rle-shell { --rail: 44px; --top: 60px; --right: 0px; --pad: 18px; }
  .rle-shell .topbar nav { display: none; }
  .rle-shell .mark { font-size: 15px; }
  .rle-shell .topbar { padding-right: 14px; }
  .rle-shell .page { width: calc(100% - var(--rail) - 2 * var(--pad)); margin: 0 var(--pad) 0 calc(var(--rail) + var(--pad)); padding-top: calc(var(--top) + 40px); padding-bottom: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(> body.rle-shell) { scroll-behavior: auto; }
  .rle-shell *, .rle-shell *::before, .rle-shell *::after { transition: none !important; animation: none !important; }
}

/* RLE-MARK:BEGIN (generated by scripts/homepage/make_rle_mark.py) */
/* The mark is the impossible triangle; the letters stay in the markup for assistive technology. */
.mark, .rle-shell .mark { font-size: 0 !important; letter-spacing: 0; }
.mark::before { content: ""; position: absolute; inset: 0; margin: auto; display: block; width: 34px; height: 34px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 9.52 9.52%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%220.26%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M0.76 0.863L8.76 0.863L9.26 1.729L8.26 1.729L5.26 6.925L4.76 6.059L7.26 1.729L1.26 1.729Z%22/%3E%3Cpath d=%22M9.26 1.729L5.26 8.657L4.26 8.657L4.76 7.791L1.76 2.595L2.76 2.595L5.26 6.925L8.26 1.729Z%22/%3E%3Cpath d=%22M4.26 8.657L0.26 1.729L0.76 0.863L1.26 1.729L7.26 1.729L6.76 2.595L1.76 2.595L4.76 7.791Z%22/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 9.52 9.52%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%220.26%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M0.76 0.863L8.76 0.863L9.26 1.729L8.26 1.729L5.26 6.925L4.76 6.059L7.26 1.729L1.26 1.729Z%22/%3E%3Cpath d=%22M9.26 1.729L5.26 8.657L4.26 8.657L4.76 7.791L1.76 2.595L2.76 2.595L5.26 6.925L8.26 1.729Z%22/%3E%3Cpath d=%22M4.26 8.657L0.26 1.729L0.76 0.863L1.26 1.729L7.26 1.729L6.76 2.595L1.76 2.595L4.76 7.791Z%22/%3E%3C/svg%3E") center / contain no-repeat; transform-origin: 50.00% 39.39%; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.mark:hover::before, .mark:focus-visible::before { transform: rotate(120deg); }
@media (max-width: 900px) { .mark::before { width: 26px; height: 26px; } }
@media (prefers-reduced-motion: reduce) { .mark::before { transition: none; } .mark:hover::before, .mark:focus-visible::before { transform: none; } }
/* RLE-MARK:END */

.rle-shell .caps-link { font-size: 14px; }
