/* The buyer's private pages, rendered by the Worker (worker/orders.mjs): the kit page (/a/<link>), the Playbook's
   sales page and the Playbook itself, and the link-not-working page. Same look as the sales page (home.css): the lilac
   band with the kit logo, Bricolage headings, soft tiles, numbered boxes, the black-and-yellow button. */

.in { max-width: 46rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 48rem) { .in { padding: 0 2rem; } }

/* the lilac band stays lilac with black text in dark mode, like the sales page hero */
.band { background: var(--kit-seo); color: var(--kr-black); }
.band .in { padding-top: 1.25rem; padding-bottom: 2.75rem; display: grid; gap: 1rem; }
.band-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; }
.band .logo-light { display: block !important; } .band .logo-dark { display: none !important; }
.band h1 { font-size: clamp(2.5rem, 8vw, 4rem); margin-top: 1.75rem; }
.band .lead { font-size: 1.1875rem; line-height: 1.5; max-width: 38rem; }
.band .lead p { margin: 0 0 .75em; } .band .lead p:last-child { margin: 0; }
.band .fine { color: #3B3A36; margin: 0; }
.band .buy { background: var(--kr-black); color: var(--kr-yellow); }
.band :focus-visible { outline-color: var(--kr-black); }
.get { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: .5rem; }
.get p { margin: 0; font-weight: 700; }
.get .buy svg { margin-left: -.25rem; }

/* the back button: a real button, outlined on lilac, filled on hover */
.back { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 1.1rem 0 .8rem; border-radius: 999px; border: 2px solid var(--kr-black); background: rgba(250,250,247,.45); color: var(--kr-black); font-weight: 700; font-size: 1rem; text-decoration: none; transition: background-color .2s cubic-bezier(.16,1,.3,1), color .2s cubic-bezier(.16,1,.3,1); }
.back:hover { background: var(--kr-black); color: var(--kit-seo); }

.page { padding-top: 3rem; padding-bottom: 4rem; display: grid; gap: 3rem; }
.page h2 { font-size: clamp(1.75rem, 4.5vw, 2.25rem); margin-bottom: 1rem; }

/* numbered boxes: the install steps, the guide's steps, the Playbook's parts */
.boxes, .guide ol.steps, .parts { list-style: none; margin: 0; padding: 0; counter-reset: n; display: grid; gap: .625rem; }
.boxes > li, .guide ol.steps > li, .parts > li { counter-increment: n; position: relative; padding: 1rem 1rem 1rem 3.75rem; border-radius: 12px; background: var(--tile); line-height: 1.55; min-height: 4.25rem; }
.boxes > li::before, .guide ol.steps > li::before, .parts > li::before { content: counter(n); position: absolute; left: 1rem; top: 1rem; width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; background: var(--button-bg); color: var(--button-fg); font: 800 1rem/1 var(--font-display); }
.boxes > li { padding-top: 1.375rem; }
.boxes > li > span { display: block; margin-bottom: .25rem; }
.guide ol.steps > li > ul { margin-top: .4rem; }

/* code to paste: a dark box with a Copy button (shown by /access.js when the clipboard works) */
code { font: .9em/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--tile); border-radius: 5px; padding: .1em .4em; overflow-wrap: anywhere; }
.code { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: .5rem; margin: .5rem 0 0; padding: .375rem .375rem .375rem 1rem; border-radius: 10px; background: var(--kr-black); color: var(--kr-white); border: 1px solid var(--line); }
.code pre { margin: 0; padding: .55rem 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.code pre code { background: none; padding: 0; color: inherit; font-size: .9375rem; }
.code.wide pre { white-space: pre; overflow-x: auto; }
.code pre:focus-visible { outline-offset: 2px; }
.copy { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 5rem; padding: 0 .9rem; border: 0; border-radius: 8px; background: var(--kr-yellow); color: var(--kr-black); font: 700 .9375rem/1 var(--font-body); cursor: pointer; transition: background-color .2s cubic-bezier(.16,1,.3,1); }
.copy[hidden] { display: none; }
.copy.done { background: var(--kit-setup); }
.code .copy:focus-visible { outline-color: var(--kr-yellow); }
/* inline phrase to paste: a small Copy chip; its tap area is stretched to 44px */
.paste { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3rem .4rem; max-width: 100%; vertical-align: baseline; }
.paste code { min-width: 0; }
.copy.sm { position: relative; min-height: 30px; min-width: 0; padding: 0 .6rem; font-size: .8125rem; border-radius: 6px; background: var(--button-bg); color: var(--button-fg); }
.copy.sm::after { content: ""; position: absolute; inset: -7px -3px; }
.copy.sm.done { background: var(--kit-setup); color: var(--kr-black); }

/* install: Claude Code | Codex. Without JavaScript both lists show, each under its own heading */
.pick { display: none; }
.js .pick { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 1rem; border-radius: 999px; background: var(--tile); }
.pick button { min-height: 44px; padding: 0 1.25rem; border: 0; border-radius: 999px; background: transparent; color: var(--fg); font: 700 1rem/1 var(--font-body); cursor: pointer; }
.pick button[aria-pressed="true"] { background: var(--button-bg); color: var(--button-fg); }
.ai-h { font-size: 1.25rem; margin: 1.25rem 0 .75rem; }
.js .ai-h { display: none; }
.js .install:not([data-show="codex"]) [data-ai="codex"], .js .install[data-show="codex"] [data-ai="claude"] { display: none; }

/* the three helper lines, each in its own colour */
.notes { list-style: none; margin: -1rem 0 0; padding: 0; display: grid; gap: .625rem; }
@media (min-width: 44rem) { .notes { grid-template-columns: repeat(3, 1fr); } }
.notes li { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: start; padding: 1rem 1.125rem; border-radius: 14px; color: var(--kr-black); font-weight: 700; line-height: 1.4; }
.notes li:nth-child(1) { background: var(--kr-yellow); }
.notes li:nth-child(2) { background: var(--kit-setup); }
.notes li:nth-child(3) { background: var(--kit-seo); }

/* the Playbook card on the kit page: its own block, after the install */
.pb { display: grid; gap: 1.25rem; padding: 1.5rem; border-radius: 16px; background: var(--kr-black); color: var(--kr-white); border: 1px solid var(--line); }
@media (min-width: 40rem) { .pb { grid-template-columns: 1fr auto; align-items: center; padding: 1.75rem 2rem; } }
.page .pb h2 { font-size: 1.625rem; margin: 0 0 .35rem; }
.pb p { margin: 0; color: #D6D4CE; }
.pb .buy { background: var(--kr-yellow); color: var(--kr-black); justify-self: start; }
.pb :focus-visible { outline-color: var(--kr-yellow); }

/* footer: the logo, the back button where there is one, the contact line */
.foot { border-top: 1px solid var(--line); }
.foot .in { padding-top: 2rem; padding-bottom: 2.5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; }
.foot .fine { margin: 0; flex-basis: 100%; }
.foot .back { border-color: var(--fg); background: transparent; color: var(--fg); }
.foot .back:hover { background: var(--fg); color: var(--bg); }

/* the Playbook's sales page */
.parts h3 { font-size: 1.25rem; line-height: 1.2; margin-bottom: .35rem; }
.parts p { margin: 0; }
.parts img { width: 100%; height: auto; margin-top: .875rem; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
@media (min-width: 44rem) { .parts .with-shot { display: grid; grid-template-columns: minmax(0, 1fr) 13rem; gap: 1.25rem; align-items: start; } .parts img { margin: 0; } }
.inside { padding: 1.5rem; border-radius: 16px; background: var(--kr-yellow); color: var(--kr-black); }
.page .inside h2 { font-size: 1.5rem; }
.inside ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
@media (min-width: 40rem) { .inside ul { grid-template-columns: 1fr 1fr; } }
.inside li { display: flex; align-items: center; gap: .6rem; font-weight: 700; }
.inside li svg { flex: none; padding: 3px; border-radius: 50%; background: var(--kr-black); color: var(--kr-yellow); }
.close-buy { display: grid; gap: 1rem; justify-items: start; }
.close-buy .fine { max-width: 36rem; margin: 0; }

/* the Playbook */
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: n; display: grid; gap: .5rem; }
.toc li { counter-increment: n; }
.toc a { display: grid; grid-template-columns: 2.25rem 1fr auto; gap: 1rem; align-items: center; min-height: 44px; padding: .875rem 1rem; border-radius: 12px; background: var(--tile); font-weight: 700; line-height: 1.3; text-decoration: none; transition: background-color .2s cubic-bezier(.16,1,.3,1); }
.toc a::before { content: counter(n); width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; background: var(--kit-seo); color: var(--kr-black); font: 800 1rem/1 var(--font-display); }
.toc a::after { content: ""; width: 1rem; height: 1rem; background: currentColor; -webkit-mask: var(--down) center / contain no-repeat; mask: var(--down) center / contain no-repeat; --down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 4v12m0 0l-5-5m5 5l5-5' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.toc a:hover { background: var(--kit-seo); color: var(--kr-black); }
.guide { display: grid; gap: 3.5rem; }
.part { scroll-margin-top: 1rem; display: grid; gap: 1rem; padding-top: 2.5rem; border-top: 1px solid var(--line); }
.part > * { margin: 0; }
.part-head { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; }
.badge { width: 3rem; height: 3rem; border-radius: 14px; display: grid; place-items: center; background: var(--kit-seo); color: var(--kr-black); font: 800 1.5rem/1 var(--font-display); }
.page .part h2 { margin: 0; padding-top: .3rem; }
.part h3 { font-size: 1.25rem; margin-top: 1rem; }
.part p, .part li { line-height: 1.65; }
.part ul { margin: 0; padding-left: 1.25rem; display: grid; gap: .4rem; }
.part a { font-weight: 700; }
.lead { font-size: 1.1875rem; line-height: 1.55; }
.part .lead strong { display: block; font: 800 .9375rem/1.2 var(--font-display); letter-spacing: 0; margin-bottom: .25rem; }
.shot { margin: .5rem 0; }
.shot img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); background: #fff; box-shadow: 0 10px 28px rgba(20,20,20,.08); }
.shot figcaption { margin-top: .625rem; font-size: .9375rem; color: var(--muted); }
.tip, .done { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: start; padding: 1rem 1.125rem; border-radius: 14px; color: var(--kr-black); }
.tip { background: var(--kr-yellow); }
.done { background: var(--kit-setup); }
.tip p, .done p { margin: 0; }
.done svg { padding: 3px; border-radius: 50%; background: var(--kr-black); color: var(--kit-setup); width: 26px; height: 26px; }
.prompts { display: grid; gap: .75rem; padding: 1.25rem; border-radius: 16px; background: var(--kit-seo); color: var(--kr-black); }
.part .prompts h3 { margin: 0; }
.prompts p { margin: 0; }
.prompts .code { margin: 0; }
/* inline code and Copy chips on the coloured panels keep black on light in both themes */
.tip code, .done code, .prompts p code { background: rgba(255,255,255,.6); color: var(--kr-black); }
.tip .copy.sm, .done .copy.sm { background: var(--kr-black); color: var(--kr-yellow); }
.tip :focus-visible, .done :focus-visible, .prompts :focus-visible { outline-color: var(--kr-black); }
.extra h2 { font-size: clamp(1.75rem, 4.5vw, 2.25rem); }
/* grid tracks never grow past the column: long links, code and wide screenshots wrap or scroll inside their box */
.page, .guide, .part, .prompts { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 30rem) { .code:not(.wide) { grid-template-columns: minmax(0, 1fr); padding-right: 1rem; } .code:not(.wide) .copy { justify-self: end; margin: 0 -.625rem .375rem 0; } .code:not(.wide) pre { padding-bottom: 0; } }
