/* ============================================================
   MATH vs. VIBES, "06 Turned Up": the Receipts (rebrand preview).
   Load AFTER /assets/turned-up.css, on /receipts/ pages only.

   - Ink ground everywhere. The ink header band (crumb bar, tag, title,
     dek) runs full bleed.
   - Single receipts: the article sits on a paper sheet, so charts,
     READMEs and screenshots built for a light ground stay readable.
   - Index (body.rc-index): card grid with the homepage card rule:
     thumbnail fills its column, thin light border, hover lifts 3px,
     the border and offset shadow go orange, the thumb scales 1.025,
     180ms, off under prefers-reduced-motion. Whole card is the link.
   ============================================================ */
:root{
  --rc-ink:#121317; --rc-ink-2:#1A1C22; --rc-ink-3:#262932;
  --rc-paper:#FBF9F4; --rc-paper-2:#F5F1E8; --rc-dim:#C9CBD1; --rc-muted:#8E929E;
  --rc-line:rgba(251,249,244,.16); --rc-line-strong:rgba(251,249,244,.28);
  --rc-math:#2E5BFF; --rc-math-400:#4F77FF; --rc-vibes:#FF6230; --rc-vibes-400:#FF7D4D; --rc-vibes-900:#6B2009;
  --rc-cap:'Barlow Condensed','Arial Narrow',sans-serif;
  --rc-mono:'Space Mono','SFMono-Regular',ui-monospace,monospace;
  --rc-ease:180ms cubic-bezier(.2,.7,.3,1);
}
html{background:var(--rc-ink)}
body{background:var(--rc-ink)!important}

/* ---------- single receipt pages: header band on ink, article on a paper sheet ---------- */
body:not(.rc-index) > main{background:var(--rc-paper);color:#262932}
@media(min-width:861px){
  body:not(.rc-index) > main{max-width:820px;padding-left:50px;padding-right:50px}
}
body > main > .crumb:first-child{padding-left:max(20px,calc(50vw - 360px));padding-right:max(20px,calc(50vw - 360px))}
/* ink band: h1 + .sub paint ink edge to edge (border-image outset, no layout cost);
   h1's top outset also fills the gap up to the crumb bar, behind any feat/repo tag */
body:not(.rc-index) > main > h1{color:var(--rc-paper)!important;margin:14px 0 0!important;padding-bottom:14px;
  border-image:conic-gradient(var(--rc-ink) 0 0) fill 0/0/160px 100vw 0}
body:not(.rc-index) > main > .sub{color:var(--rc-dim)!important;margin:0!important;padding:0 0 40px;
  font-size:17px;line-height:1.5;border-image:conic-gradient(var(--rc-ink) 0 0) fill 0/0/0 100vw}
body:not(.rc-index) > main > .sub + *{margin-top:40px!important}
main > .feat-tag,main > .repo-tag{border-radius:0!important;background:var(--rc-math)!important;color:#fff!important;
  border:0!important;font-weight:700}
/* body copy on the sheet */
body:not(.rc-index) > main h2:not(.ep-head){font-family:var(--rc-cap);font-weight:800;text-transform:uppercase;
  font-size:28px;line-height:1;letter-spacing:0;color:#121317}
body:not(.rc-index) > main .md h1,body:not(.rc-index) > main .md h2,body:not(.rc-index) > main .md h3{
  font-family:inherit;text-transform:none;font-size:17px;line-height:1.3;font-weight:700}
body:not(.rc-index) .doc,body:not(.rc-index) .readme{border-radius:0!important;border-color:rgba(18,19,23,.18)!important}
body:not(.rc-index) .open-tag{border-radius:0!important}
body:not(.rc-index) .btn{border-radius:0!important}
body:not(.rc-index) .note{border-radius:0!important}
body:not(.rc-index) pre{border-radius:0!important}
body:not(.rc-index) .scoreline{border-radius:0!important}
body:not(.rc-index) .trail{border-top:3px solid #121317!important}
@media(max-width:860px){
  body:not(.rc-index) > main h2:not(.ep-head){font-size:25px}
}

/* ============================================================
   INDEX
   ============================================================ */
.rc-index > main{max-width:1180px;padding:48px 30px 96px;color:var(--rc-dim)}
.rc-index > main > .crumb:first-child{padding-left:max(20px,calc(50vw - 560px));padding-right:max(20px,calc(50vw - 560px))}
.rc-index main > h1{color:var(--rc-paper)!important;font-size:clamp(56px,9vw,104px)!important;margin:28px 0 14px!important}
.rc-index .sub{color:var(--rc-paper)!important;font-size:20px;line-height:1.45;max-width:640px;margin-bottom:18px!important}
.rc-index .intro{max-width:680px;color:var(--rc-dim);font-size:16px;line-height:1.65}
.rc-index a{color:var(--rc-paper)}

/* section heads: Barlow on ink with a hairline, like the homepage receipts caption */
.rc-index .ep-head{font-family:var(--rc-cap)!important;font-weight:800;text-transform:uppercase;
  font-size:30px!important;line-height:1;letter-spacing:0!important;color:var(--rc-paper)!important;
  border-bottom:1px solid var(--rc-line)!important;margin:64px 0 20px!important;padding-bottom:12px!important}
.rc-index .ep-head:first-of-type{margin-top:52px!important}

/* grid */
.rc-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
@media(max-width:980px){.rc-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}}
@media(max-width:620px){.rc-grid{grid-template-columns:1fr;gap:16px}}

/* the card */
.rc-index .row{display:flex!important;flex-direction:column;gap:0;margin:0!important;padding:0!important;
  background:var(--rc-ink-2);border:1px solid var(--rc-line-strong)!important;border-radius:0!important;
  color:inherit;text-decoration:none;position:relative;
  transition:transform var(--rc-ease),border-color var(--rc-ease),box-shadow var(--rc-ease)}
.rc-index .row .thumb{display:block;width:100%!important;height:auto!important;aspect-ratio:16/10;
  object-fit:cover;object-position:top;border:0!important;border-radius:0!important;
  background:var(--rc-paper-2);transition:transform var(--rc-ease)}
.rc-index .row > div{position:relative;z-index:1;flex:1;padding:18px 20px 22px;background:inherit}
.rc-index .row .file{font-family:var(--rc-mono);font-weight:700;font-size:10.5px;letter-spacing:.08em;
  text-transform:uppercase;color:var(--rc-vibes-400)!important;margin-bottom:8px;overflow-wrap:anywhere}
.rc-index .row h2{font-family:var(--rc-cap);font-weight:800;text-transform:uppercase;font-size:26px!important;
  line-height:1!important;color:var(--rc-paper)!important;margin:0 0 10px!important}
.rc-index .row p{font-size:14.5px!important;line-height:1.5;color:var(--rc-dim)!important}
/* thumb clip: the scale stays inside the frame */
.rc-index .row{overflow:hidden}

/* featured: paper plates, video thumbs at 16:9 */
.rc-index .row--feature{background:var(--rc-paper);border-left:1px solid var(--rc-line-strong)!important}
.rc-index .row--feature .thumb{aspect-ratio:16/9;object-position:center;background:var(--rc-ink-3)}
.rc-index .row--feature .file{color:var(--rc-vibes-900)!important}
.rc-index .row--feature h2{color:var(--rc-ink)!important;font-size:30px!important}
.rc-index .row--feature p{color:#262932!important}

/* hover / focus: lift, orange border + offset shadow, thumb scales */
.rc-index .row:hover,.rc-index .row:focus-visible{transform:translateY(-3px);
  border-color:var(--rc-vibes)!important;box-shadow:6px 6px 0 var(--rc-vibes)!important}
.rc-index .row:hover .thumb,.rc-index .row:focus-visible .thumb{transform:scale(1.025)}
.rc-index .row:focus-visible{outline:2px solid var(--rc-paper);outline-offset:3px}
@media(prefers-reduced-motion:reduce){
  .rc-index .row,.rc-index .row .thumb{transition:none}
  .rc-index .row:hover,.rc-index .row:focus-visible{transform:none}
  .rc-index .row:hover .thumb,.rc-index .row:focus-visible .thumb{transform:none}
}

/* closing note */
.rc-index .note{background:var(--rc-ink-2)!important;border:1px solid var(--rc-line)!important;
  border-left:6px solid var(--rc-vibes)!important;border-radius:0!important;color:var(--rc-dim);
  font-size:15px!important;padding:18px 22px!important;margin:64px 0 0!important;max-width:760px}
.rc-index .note a{color:var(--rc-paper);text-decoration-color:var(--rc-vibes);text-underline-offset:3px}
.rc-index .note a:hover{color:var(--rc-vibes-400)}

@media(max-width:620px){
  .rc-index > main{padding-left:20px;padding-right:20px}
  .rc-index .sub{font-size:18px}
  .rc-index .ep-head{font-size:26px!important;margin-top:48px!important}
  .rc-index .row h2{font-size:24px!important}
  .rc-index .row--feature h2{font-size:27px!important}
}

/* let the ink show under the sheet on wide screens */
@media(min-width:861px){body:not(.rc-index) > main{margin-bottom:72px}}
