/* The Always-On Store: page styles on top of brand/brand.css. */
.store-hero .wrap { align-items: center; }
.store-title { font: 700 clamp(44px, 7.4vw, 96px)/.9 var(--display); text-transform: uppercase; display: grid; justify-items: start; }
.store-title .g { display: inline-block; }

/* The door sign: the one bold element. */
.sign { display: inline-grid; gap: 6px; background: var(--black); color: var(--white); padding: 16px 22px 14px; border: 3px solid var(--white); box-shadow: 10px 10px 0 rgba(0,0,0,.45); margin: 28px 0 0; }
.sign .aoa-lockup { font-size: clamp(34px, 4.4vw, 52px); display: flex; gap: .4em; align-items: baseline; }
.sign .aoa-lockup .on { font-size: 1.26em; line-height: .7; }
.sign .row { display: flex; gap: 18px; flex-wrap: wrap; font: 500 14px/1.3 var(--body); color: #CFE6F4; }
.sign .row b { color: var(--white); font-weight: 600; }

.mcp-box { margin-top: 26px; max-width: 560px; }
.mcp-box label { display: block; font: 600 14px/1.3 var(--body); margin-bottom: 6px; }
.mcp-row { display: flex; border: 2px solid var(--white); background: rgba(0,0,0,.35); }
.mcp-row code { flex: 1; padding: 12px 14px; font: 500 15px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--white); overflow-x: auto; white-space: nowrap; }
.mcp-row button { border-radius: 0; }
.mcp-box p { font-size: 14px; color: #DCEFF9; margin-top: 10px; }

/* Lobby */
.lobby-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; }
@media (max-width: 900px) { .lobby-grid { grid-template-columns: 1fr; } }
.block h3 { font: 400 22px/1 var(--head); text-transform: uppercase; margin-bottom: 14px; }
.block .sub { color: var(--muted); font-size: 14px; margin: -6px 0 14px; }
.funnel { display: grid; gap: 8px; }
.funnel-row { display: grid; grid-template-columns: 110px 1fr 56px; gap: 10px; align-items: center; font-size: 14px; }
.funnel-row .bar { height: 22px; background: var(--mist); position: relative; }
.funnel-row .bar span { position: absolute; inset: 0 auto 0 0; background: var(--sky); min-width: 2px; }
.funnel-row .n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.funnel-row .n small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; align-items: end; height: 150px; position: relative; padding-top: 6px; }
.hours .h { background: var(--sky); min-height: 2px; position: relative; }
.hours .h.night { background: var(--abyss); }
.hours-office { position: absolute; top: 0; bottom: -2px; left: calc(9 / 24 * 100%); width: calc(8.5 / 24 * 100%); box-shadow: inset 0 0 0 2px var(--black); pointer-events: none; }
.hours-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.share { font-size: 17px; margin-top: 14px; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); border: 2px solid var(--black); }
.trio div { padding: 14px 16px; border-left: 2px solid var(--black); }
.trio div:first-child { border-left: 0; }
.trio dt { font-size: 13px; color: var(--muted); }
.trio dd { margin: 4px 0 0; font: 400 34px/1 var(--head); }
.families { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.families li { display: flex; justify-content: space-between; border-bottom: 1px solid var(--rule); padding: 6px 0; }
.empty-lobby { border: 2px dashed #9AA8B3; padding: 28px; text-align: left; }
.empty-lobby p { font-size: 20px; margin: 0 0 6px; font-weight: 600; }

/* Bonus */
.bonus { display: grid; grid-template-columns: .8fr 1.2fr; gap: 32px; align-items: start; }
@media (max-width: 900px) { .bonus { grid-template-columns: 1fr; } }
.codes-left { font: 700 clamp(56px, 8vw, 96px)/.9 var(--display); }
.codes-left small { display: block; font: 500 16px/1.4 var(--body); margin-top: 8px; color: var(--ink-soft); }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-top: 14px; }
.inline-form .field { margin: 0; min-width: 220px; }

/* Books */
.books { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .books { grid-template-columns: 1fr; } }
.book { border: 2px solid var(--black); padding: 18px; display: grid; gap: 10px; align-content: start; background: var(--white); }
.book .fmt { font: 400 26px/1 var(--head); text-transform: uppercase; }
.book .meta { font-size: 13px; color: var(--muted); }
.book .price { font-weight: 600; }
.book .retailers { display: grid; gap: 8px; }
.releases { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.releases li { display: grid; grid-template-columns: 120px 1fr auto; gap: 14px; border-bottom: 1px solid var(--rule); padding: 10px 0; align-items: center; }

/* Sub pages */
.band { background: var(--cover-h); color: var(--white); padding: 28px 0; }
.band h1 { font: 700 clamp(34px, 5vw, 58px)/.95 var(--display); text-transform: uppercase; }
.band p { margin: 8px 0 0; color: #E6F4FC; }
.page { padding: 40px 0 72px; }
.page .narrow { max-width: 720px; }
.order-card { display: flex; justify-content: space-between; gap: 12px; border: 2px solid var(--black); padding: 14px 18px; margin-bottom: 22px; background: var(--mist); flex-wrap: wrap; }
.order-card strong { font-size: 18px; }
fieldset.optins { border: 2px solid var(--black); padding: 12px 16px; margin: 18px 0; }
fieldset.optins legend { font-weight: 600; padding: 0 6px; }
.code-box { border: 3px solid var(--black); box-shadow: 10px 10px 0 var(--sky); padding: 22px; margin: 22px 0; max-width: 560px; }
.code-box code { display: block; font: 700 28px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; margin: 10px 0 14px; word-break: break-all; }
.leave { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: start; }
@media (max-width: 760px) { .leave { grid-template-columns: 1fr; } }
.qr { width: 196px; height: 196px; border: 2px solid var(--black); padding: 8px; background: var(--white); }
.qr svg, .qr img { width: 100%; height: 100%; display: block; }
.status-pill { display: inline-block; font: 600 14px/1 var(--body); padding: 8px 10px; background: var(--black); color: var(--white); }
.admin-claim { border: 2px solid var(--black); padding: 16px; display: grid; grid-template-columns: 1fr 260px; gap: 18px; margin-bottom: 14px; }
@media (max-width: 800px) { .admin-claim { grid-template-columns: 1fr; } }
.admin-claim dl { display: grid; grid-template-columns: 130px 1fr; gap: 4px 12px; margin: 0; font-size: 14px; }
.admin-claim dt { color: var(--muted); }
.admin-claim .proof { border: 1px solid var(--rule); min-height: 160px; display: grid; place-items: center; background: var(--mist); }
.admin-claim .proof img { max-height: 320px; width: auto; }
.admin-claim .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: end; }
textarea.codes { width: 100%; min-height: 140px; font: 14px/1.4 ui-monospace, Menlo, monospace; border: 2px solid var(--black); padding: 10px; }
.terms h2 { font-size: 26px; margin: 28px 0 10px; }
.terms li { margin: 6px 0; }

/* ---- Polish and motion --------------------------------------------------- */
.store-hero .sign { box-shadow: 10px 10px 0 rgba(0, 0, 0, .55); }
.store-hero .mcp-row { box-shadow: 8px 8px 0 rgba(0, 0, 0, .45); background: rgba(0, 0, 0, .6); }
.store-hero .mcp-row code::before { content: ""; display: inline-block; width: 9px; height: 9px; background: var(--ember); margin-right: 10px; }

.session-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
@media (max-width: 900px) { .session-grid { grid-template-columns: 1fr; } }
.session h2 { margin-bottom: 18px; }
.session-steps { margin: 18px 0 22px; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.session-steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: 4px 12px; font-size: 15px; }
.session-steps li::before { content: counter(s); grid-row: span 2; font: 400 26px/1 var(--head); background: var(--black); color: var(--white); display: grid; place-items: center; height: 40px; }
.session-steps strong { display: block; }
.term { background: #000; color: #E6F4FC; border: 2px solid var(--black); box-shadow: 12px 12px 0 var(--sky); min-height: 430px; }
.term-bar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; background: var(--abyss); font: 600 13px/1.3 var(--body); }
.term-bar span:last-child { font-weight: 400; color: #9FC4DA; }
.term-body { list-style: none; margin: 0; padding: 16px 14px 20px; display: grid; gap: 9px; font: 500 14px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.term-body li { display: grid; grid-template-columns: 58px 1fr; gap: 10px; }
.term-body .who { font: 600 11px/1 var(--body); padding: 5px 0; text-align: center; align-self: start; background: #16303F; color: #CFE6F4; }
.term-body .t-you .who { background: var(--white); color: var(--black); }
.term-body .t-call .who, .term-body .t-agent .who { background: var(--sky); color: var(--white); }
.term-body .t-call b { color: var(--white); }
.term-body .t-call .what { color: #8FCBEE; }
.term-body .t-back .what { color: #B9C7D1; }
.term-body .t-you .what, .term-body .t-agent .what { font-family: var(--body); font-size: 15px; color: var(--white); }
.term-body .t-you { margin-bottom: 6px; } .term-body .t-agent { margin-top: 6px; }
.term-body li.typing .what::after { content: ""; display: inline-block; width: 8px; height: 1em; background: var(--ember); vertical-align: -2px; margin-left: 3px; }

.funnel-row .bar span { width: 0; transition: width .7s cubic-bezier(.2, .7, .2, 1); }
.hours .h { height: 0; transition: height .6s cubic-bezier(.2, .7, .2, 1); }
.hours .h:hover { background: var(--ember); }
.trio { background: var(--white); box-shadow: 8px 8px 0 var(--sky); }
.codes-left { color: var(--black); }
.book { box-shadow: 5px 5px 0 var(--rule); }
.book .fmt { display: flex; align-items: center; gap: 10px; }
.book .fmt::before { content: ""; width: 10px; height: 26px; background: var(--sky); }
.book:nth-child(2) .fmt::before { background: var(--ember); } .book:nth-child(3) .fmt::before { background: var(--abyss); }

/* Sub pages: the band carries the key art. */
.band { position: relative; overflow: hidden; background: linear-gradient(90deg, #000 0%, #09283A 30%, #135C7F 52%, #1F97D4 70%, #1F97D4 100%); }
.band .wrap { position: relative; z-index: 1; }
.band::after { content: ""; position: absolute; right: max(10px, calc(50vw - 590px)); top: 50%; margin-top: -159px; width: 411px; height: 420px; background: url("../brand/img/keyart-head.webp") center / 100% 100% no-repeat; pointer-events: none; }
@media (max-width: 760px) { .band::after { opacity: .0; } }
.page .panel, .code-box, .order-card { box-shadow: 8px 8px 0 var(--sky); }
.order-card { box-shadow: 6px 6px 0 var(--black); }

@media (prefers-reduced-motion: no-preference) {
  .sign .on { animation: sign 6s steps(1, end) infinite; }
  @keyframes sign { 0%, 100% { opacity: 1; transform: none; } 3% { opacity: .2; } 4% { opacity: 1; transform: translateX(4px); } 6% { opacity: .4; transform: translateX(-3px); } 7% { opacity: 1; transform: none; } 61% { transform: translateX(3px); } 62% { transform: none; } }
  .term-body li { animation: term-in .22s steps(3, end); }
  @keyframes term-in { from { opacity: 0; transform: translateX(-10px); } }
  .term-body li.typing .what::after { animation: fx-blink .7s steps(1, end) infinite; }
  .store-hero .mcp-row code::before { animation: fx-blink 1s steps(1, end) infinite; }
}

/* Protocol lab */
.proto-intro { max-width: none; margin: 10px 0 22px; }
.proto-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.proto { border: 2px solid var(--black); background: var(--white); padding: 16px 18px; box-shadow: 6px 6px 0 var(--sky); display: grid; grid-template-rows: auto auto 1fr auto; gap: 6px; }
.proto h3 { font-size: 18px; margin: 0; }
.proto p { margin: 0; font-size: 14px; }
.proto-tag { font: 600 12px/1.3 var(--body); color: var(--sky); }
.proto .btn { justify-self: start; margin-top: 6px; }
.proto-count { font-size: 12px; color: var(--muted); }
.proto-out { margin-top: 24px; border: 2px solid var(--black); padding: 16px 18px; background: #F4F9FC; }
.proto-out-h { font-weight: 700; margin: 0 0 10px; }
.proto-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.proto-who { margin: 0 0 6px; font-size: 14px; }
.proto-status { display: inline-block; font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--black); color: var(--white); padding: 3px 5px; margin-left: 6px; }
.proto-step.is-err .proto-status { background: var(--ember); }
.proto-log pre { margin: 0 0 6px; max-height: 260px; overflow: auto; font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 10px 12px; white-space: pre-wrap; word-break: break-word; }
.proto-req { background: var(--white); border: 1px solid #C9D6DE; }
.proto-res { background: #0B1F2B; color: #DCEFFA; }
.proto-note { margin: 0; font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { .proto-grid { grid-template-columns: 1fr; } }
.mandate { margin: 18px 0; max-width: 720px; }
.mandate summary { cursor: pointer; font-weight: 600; }
.mandate pre { font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #0B1F2B; color: #DCEFFA; padding: 10px 12px; overflow: auto; max-height: 280px; white-space: pre-wrap; word-break: break-word; }

/* Inner store pages (go, claim, status, terms) share the main page's chrome: full-width header and band, black centered footer. */
body[data-chrome="shell"] { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body[data-chrome="shell"] > main { flex: 1 0 auto; }
body[data-chrome="shell"] .aoa-top .wrap,
body[data-chrome="shell"] .band .wrap,
body[data-chrome="shell"] .test-strip .wrap { max-width: none; padding-left: clamp(24px, 5vw, 96px); padding-right: clamp(24px, 5vw, 96px); }
body[data-chrome="shell"] .band::after { content: none; }
body[data-chrome="shell"] .shell-foot { background: #000; color: var(--white); margin: 0; box-shadow: 0 -1px 0 #1d2a33; }
body[data-chrome="shell"] .shell-foot .wrap { display: flex; justify-content: center; text-align: center; max-width: none; padding: 20px clamp(24px, 5vw, 96px); }
body[data-chrome="shell"] .shell-foot .foot-legal { margin: 0; font-size: 12px; line-height: 1.45; color: #B9C7D1; }
body[data-chrome="shell"] .legal-2 { display: inline-block; }
body[data-chrome="shell"] .shell-foot .foot-legal { max-width: none; }
body[data-chrome="shell"] .page .wrap:not(.narrow) { max-width: none; padding-left: clamp(24px, 5vw, 96px); padding-right: clamp(24px, 5vw, 96px); }
.proto.is-active { box-shadow: 6px 6px 0 var(--black); outline: 3px solid var(--sky); outline-offset: -2px; }
.admin-log { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-log th, .admin-log td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #DCE3E8; vertical-align: top; }
.admin-log th { font-weight: 700; border-bottom: 2px solid var(--black); }
.admin-log tr.is-refused td { color: #B42318; }

/* Ready-made prompts under the connector/plugin address */
.prompt-box { margin-top: 16px; }
.prompt-label { font: 600 14px/1.3 var(--body); margin: 0 0 8px !important; color: var(--white) !important; }
.prompt-tabs { display: flex; flex-wrap: nowrap; gap: 6px; margin-bottom: 8px; }
.prompt-tab { flex: 0 1 auto; white-space: nowrap; font: 500 13px/1 var(--body); color: var(--white); background: rgba(0,0,0,.35); border: 1.5px solid rgba(255,255,255,.7); padding: 7px 10px; cursor: pointer; }
.prompt-tab[aria-selected="true"] { background: var(--white); color: var(--black); border-color: var(--white); }
.prompt-tab:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.store-hero .prompt-row { align-items: stretch; }
.prompt-stack { flex: 1; display: grid; }
.prompt-stack .prompt-text { grid-area: 1 / 1; margin: 0 !important; max-width: none !important; padding: 10px 14px; font-size: 14px; line-height: 1.45; color: var(--white) !important; visibility: hidden; }
.prompt-stack .prompt-text.is-on { visibility: visible; }
.store-hero .mcp-box { max-width: 620px; }
@media (max-width: 480px) { .prompt-tabs { flex-wrap: wrap; } }
.store-hero .mcp-box .mcp-main p { max-width: none; }

/* v2 print orders: order form, timeline, demo checkout */
.print-order { margin: 0 0 36px; padding: 24px; background: var(--white); border: 3px solid var(--black); box-shadow: 8px 8px 0 var(--sky); }
.print-order h3 { font-size: 24px; margin: 0 0 8px; }
.print-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 16px 0 8px; }
.print-form label { font-weight: 600; }
.print-form select { font: inherit; padding: 8px 10px; border: 2px solid var(--black); background: var(--white); }
.test-banner { background: #FFF4D6; border-left: 6px solid #E0A800; padding: 10px 14px; font-weight: 600; margin: 0 0 18px; }
.order-head { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.order-head p { margin: 0; }
.order-sum { font-size: 17px; }
.milestones { list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; padding: 0; margin: 22px 0; counter-reset: ms; }
.milestones li { counter-increment: ms; padding: 10px 8px; border-top: 6px solid #D5DEE5; font: 600 14px/1.25 var(--body); color: #5E6A72; }
.milestones li::before { content: counter(ms) ". "; }
.milestones li.is-done { border-top-color: var(--sky); color: var(--black); }
.order-pay { margin: 0 0 22px; }
.order-h { font-size: 26px; margin: 26px 0 12px; }
.steps { list-style: none; padding: 0; margin: 0 0 16px; border-left: 3px solid var(--black); }
.steps .step { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 4px 18px; padding: 12px 0 12px 18px; border-bottom: 1px solid #DCE3E8; position: relative; }
.steps .step::before { content: ""; position: absolute; left: -9px; top: 18px; width: 15px; height: 15px; background: var(--white); border: 3px solid var(--black); }
.steps .step.is-new { animation: step-in .6s ease-out; }
@keyframes step-in { from { background: #E3F2FB; } to { background: transparent; } }
.step-meta { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #5E6A72; }
.step-meta .src { align-self: flex-start; font: 600 12px/1 var(--body); padding: 5px 7px; background: var(--black); color: var(--white); }
.src-hostinger .src { background: #1F97D4; }
.src-lulu .src { background: #10344F; }
.src-stripe .src { background: #10344F; }
.src-agent .src, .src-reader .src { background: var(--white); color: var(--black); border: 2px solid var(--black); }
.step-main strong { display: block; font-size: 17px; }
.step-main > span { display: block; color: #33414A; }
.step-main .ao-nb { display: inline; color: inherit; }
.step-main details { margin-top: 6px; }
.step-main summary { cursor: pointer; font-size: 14px; color: #0E6FA3; }
.step-main pre { white-space: pre-wrap; word-break: break-word; font-size: 12.5px; background: #F2F5F7; padding: 10px; max-height: 320px; overflow: auto; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: #0E6FA3; text-decoration: underline; cursor: pointer; }
@media (max-width: 700px) {
  .milestones { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps .step { grid-template-columns: 1fr; }
  .step-meta { flex-direction: row; align-items: center; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .steps .step.is-new { animation: none; } }
.send-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 12px; align-items: end; padding: 10px 0; }
.send-form label { display: flex; flex-direction: column; font-size: 13px; font-weight: 600; gap: 4px; }
.send-form input { font: inherit; font-weight: 400; padding: 6px 8px; border: 1.5px solid var(--black); }
.print-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 8px; }
.print-choice { border-top: 3px solid var(--black); padding-top: 12px; }
.print-choice .note { margin-top: 8px; }
.print-choice code { white-space: nowrap; }
@media (max-width: 700px) { .print-choices { grid-template-columns: 1fr; } }
.supplies { border-left: 6px solid #1F97D4; padding: 10px 14px; background: #F2F5F7; color: #000; }
.proto--all { margin-top: 14px; grid-template-rows: auto; }
.proto-ph { margin: 0 0 14px; font-size: 13px; color: var(--muted); max-width: none; }
.proto-ph code { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; background: #fff; padding: 1px 4px; border: 1px solid #C9D6DE; }
.proto-msg { position: relative; margin: 0 0 8px; }
.proto-dir { margin: 0 0 4px; font: 600 12px/1.3 var(--body); color: var(--sky); }
.proto-copy { position: absolute; top: 22px; right: 6px; font: 600 11px/1 var(--body); padding: 4px 7px; border: 1px solid #C9D6DE; background: #fff; color: #000; cursor: pointer; }
.proto-res + .proto-copy { background: #1B3445; color: #DCEFFA; border-color: #2E5068; }
.proto-log pre { max-height: 360px; }
@media (max-width: 960px) { .proto-grid { grid-template-columns: 1fr; } }
.proto-real { border-left: 6px solid #1F97D4; background: #fff; padding: 12px 14px; }
.proto-real p { margin: 0 0 8px; font-size: 14px; max-width: none; } /* the text fills the box, not the 68ch default */
/* v3 address and exact-total page */
.addr-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 16px 0 0; max-width: 520px; }
.addr-form label { font-weight: 600; margin-top: 8px; }
.addr-form input, .addr-form select { font: inherit; padding: 10px 12px; border: 2px solid var(--black); background: var(--white); }
.addr-form input:focus-visible, .addr-form select:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.addr-country { margin-top: 12px; }
.total-table { width: 100%; max-width: 520px; border-collapse: collapse; margin: 16px 0; font-variant-numeric: tabular-nums; }
.total-table th, .total-table td { padding: 10px 0; border-bottom: 2px solid var(--black); vertical-align: top; }
.total-table th { text-align: left; font-weight: 600; }
.total-table th .note { display: block; font-weight: 400; margin: 2px 0 0; }
.total-table td { text-align: right; white-space: nowrap; padding-left: 16px; }
.total-table .total-row th, .total-table .total-row td { font-size: 1.25em; font-weight: 700; border-bottom: 4px solid var(--black); }
.addr-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
/* Hero: readable sizes for everything under the headline (was 13 to 15px) */
/* A wider column on large screens: fewer wrapped lines, so the shell zooms the copy down less. */
@media (min-width: 821px) { body[data-shell] .store-hero .hero-copy { width: min(760px, 54cqw); } .store-hero .mcp-box { max-width: none; } .store-hero .lede { max-width: 40em; } }
.store-hero .kicker { font-size: 17px; line-height: 1.4; max-width: none; }
.store-hero .lede { font-size: clamp(18px, 1.4vw, 21px); }
.store-hero .btn--strong { font-size: 16px; }
.store-hero .mcp-box label, .store-hero .prompt-label { font-size: 16px; }
.store-hero .mcp-box .mcp-main p { font-size: 15px; line-height: 1.5; }
.store-hero .mcp-row code { font-size: 15px; }
.store-hero .btn--small { font-size: 15px; }
.store-hero .prompt-tabs button { font-size: 14px; padding: 5px 11px; }
.store-hero .prompt-stack .prompt-text { font-size: 16px; line-height: 1.45; padding: 10px 14px; }
@media (max-width: 760px) { .store-hero .hero-copy { max-width: none; } }

/* Order page: the Six Gates of Agentic Commerce, split view. Left: gates and steps. Right: the selected step's message. */
:root { --err: #C62828; --err-bg: #FDECEC; }
body[data-chrome="shell"] .order-page .wrap { max-width: none; padding-left: clamp(24px, 5vw, 96px); padding-right: clamp(24px, 5vw, 96px); }
.order-split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.order-right { position: sticky; top: 16px; }
.order-foot { margin-top: 24px; border-top: 2px solid var(--black); padding-top: 12px; max-width: none; }
.src-printer .src { background: #10344F; }

.gates { list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; padding: 0; margin: 22px 0; }
.gate { display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; border-top: 6px solid #D5DEE5; color: #5E6A72; }
.gate-n { font: 700 12px/1.2 var(--body); text-transform: uppercase; letter-spacing: .04em; }
.gate-name { font: 600 14px/1.25 var(--body); }
.gate-state { font-size: 13px; }
.gate.is-open { border-top-color: var(--sky); color: var(--black); }
.gate.is-current { border-top-color: var(--black); color: var(--black); }
.gate.is-current .gate-state::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; background: var(--sky); vertical-align: 1px; }
.gate.is-error { border-top-color: var(--err); color: var(--err); background: var(--err-bg); }
/* A test order stops before printing: Gate 5 turns orange once the Print Platform has the order. */
.gate.is-simulated { border-top-color: #E8890C; color: #8A4B00; background: #FFF4E5; }
.gate.is-simulated .gate-state { font-weight: 700; }
.gate-group.test-stop { margin-top: 18px; padding: 16px 18px; border-left: 4px solid #E8890C; background: #FFF4E5; }
.gate-group.test-stop h3 { color: #8A4B00; }
.test-stop p { margin: 0 0 12px; }
.test-stop .btn { margin-top: 4px; }
.gate.is-error .gate-state { font-weight: 700; }

.gate-group { margin: 0 0 18px; }
.gate-group h3 { font-size: 18px; margin: 18px 0 6px; }
.gate-group.is-error h3 { color: var(--err); }
.step-pick { all: unset; cursor: pointer; display: inline; }
.step-pick:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.step-pick strong { display: inline; }
.step.is-selected { background: #EEF6FC; }
.step.is-selected::before { background: var(--sky) !important; }
.steps .step.is-error::before { border-color: var(--err); background: var(--err); }
.step.is-error .step-main strong, .step.is-error .step-main > span { color: var(--err); }
.step.is-error { background: var(--err-bg); }
.step.is-error.is-selected { box-shadow: inset 4px 0 0 var(--err); }

/* The red flag: a pennant on a pole, drawn in CSS. */
.flag { display: inline-block; position: relative; width: 12px; height: 14px; margin-right: 8px; vertical-align: -1px; border-left: 2px solid currentColor; }
.flag::after { content: ""; position: absolute; left: 0; top: 0; width: 10px; height: 8px; background: var(--err); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.status-pill.is-error { background: var(--err); color: var(--white); border-color: var(--err); }
.status-pill.is-error .flag { color: var(--white); }
.status-pill.is-error .flag::after { background: var(--white); }
.step.is-error .flag { color: var(--err); }

.wire { border: 2px solid var(--black); background: #0F2533; color: #DCEFFA; padding: 14px 16px; max-height: calc(100vh - 48px); overflow: auto; }
.wire-label { margin: 0 0 4px; font: 600 12px/1.3 var(--body); text-transform: uppercase; letter-spacing: .05em; color: #8FC9EA; }
.wire-title { margin: 0 0 10px; font: 700 16px/1.35 var(--body); color: var(--white); }
.wire-title.is-error { color: #FF8A80; }
.wire-code { margin: 0; white-space: pre-wrap; word-break: break-word; font: 12.5px/1.5 var(--mono, ui-monospace, monospace); color: #DCEFFA; background: transparent; padding: 0; max-height: none; }
.wire-code.is-error { border-left: 4px solid #FF8A80; padding-left: 10px; }
.wire-empty { margin: 0; color: #B9D3E3; }

@media (max-width: 980px) {
  .order-split { grid-template-columns: 1fr; }
  .order-right { position: static; }
  .gates { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 520px) { .gates { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.addr-form .sample-note { grid-column: 1 / -1; margin: 0 0 6px; padding: 10px 14px; border-left: 4px solid #1F97D4; background: #EAF5FB; font: 400 15px/1.45 var(--body); color: #000; }
/* Checkout page: split like the order timeline, errors in red. */
.alert.is-error { color: var(--err); background: var(--err-bg); border-color: var(--err); }
.alert.is-error .flag { color: var(--err); }
.checkout-left .panel { margin: 0; }
.wire-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.wire-tab { font: 600 12px/1 var(--body); padding: 6px 10px; border: 1px solid #5C8AA6; background: transparent; color: #DCEFFA; cursor: pointer; }
.wire-tab.is-on { background: #1F97D4; border-color: #1F97D4; color: #fff; }
.wire-tab.is-error { border-color: #FF8A80; color: #FF8A80; }
.wire-tab.is-on.is-error { background: #C62828; border-color: #C62828; color: #fff; }
.wire-tab:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.wire-rule { border: 0; border-top: 1px solid #2E5770; margin: 14px 0; }
.wire .flag::after { background: #FF8A80; }
/* The header stays in place while a page scrolls (pages that use the one-screen shell never scroll). */
body:not([data-shell]) > header, body:not([data-shell]) > .aoa-top { position: sticky; top: 0; z-index: 50; }
body:not([data-shell]) .order-right { top: 74px; }
body:not([data-shell]) .wire { max-height: calc(100vh - 106px); }
html:has(> body:not([data-shell])) { scroll-padding-top: 74px; }
.print-order .print-lede { max-width: none; }
/* Test and demo banners run across the full width at the top of the order and checkout pages. */
.test-strip { background: #FFF4D6; border-bottom: 3px solid #E0A100; border-top: 3px solid #E0A100; }
.test-strip .test-banner { margin: 0; padding: 12px 0; max-width: none; border: 0; background: transparent; box-shadow: none; }
/* The Six Gates rail as a full-width strip under the title band (checkout, demo checkout and order pages). */
.gate-strip { background: var(--white); border-bottom: 1px solid #D5DEE5; }
.gate-strip .gates { margin: 0 0 14px; }
.gate-strip-h { margin: 14px 0 6px; max-width: none; font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.gate-strip-h b { font: 700 13px/1.2 var(--body); text-transform: uppercase; letter-spacing: .05em; }
.gate-strip-h span { color: #3A464E; }
.gate .flag { margin-right: 6px; }
body[data-chrome="shell"] .gate-strip .wrap { max-width: none; padding-left: clamp(24px, 5vw, 96px); padding-right: clamp(24px, 5vw, 96px); }
@media (max-width: 720px) { .gates { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.print-order .gates { margin: 14px 0 18px; }
.order-left .order-pay { margin-top: 18px; }
/* Space between a panel's last item and its "Next: …" button. */
body[data-shell] .panel-go { padding-top: 36px; }
.proto-foot { margin-top: 18px; max-width: none; } .proto-intro sup a, .proto-foot sup { text-decoration: none; font-weight: 700; }
/* Buy the book: the paperback as the store's one product, next to a tile for the AI-agent prompt. */
.shop-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: stretch; margin-top: 8px; }
.product-card, .agent-card { border: 2px solid var(--black); background: var(--white); box-shadow: 6px 6px 0 var(--sky); padding: 18px; }
.product-card { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 18px; align-items: start; }
.pc-cover { display: block; padding: 0; border: 0; background: #EEF4F8; cursor: pointer; transition: transform .15s ease; }
.pc-cover:hover { transform: translateY(-3px); }
.pc-cover:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.pc-cover img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 4px 4px 0 rgba(0,0,0,.25); }
.pc-title { margin: 0; font: 700 19px/1.25 var(--body); }
.pc-fmt { margin: 2px 0 0; font-size: 14px; color: #4A565E; }
.pc-price { margin: 4px 0 10px; font: 700 22px/1.2 var(--body); }
.product-card .print-form { margin: 0 0 6px; display: grid; grid-template-rows: auto auto; grid-auto-flow: column; justify-content: start; align-items: end; gap: 4px 14px; }
.product-card .print-form label { margin: 0; }
.pc-actions { display: grid; gap: 12px; margin-top: 10px; }
.pc-action .note { margin: 6px 0 0; }
.agent-card { display: flex; flex-direction: column; gap: 8px; }
.agent-card h4 { margin: 0; font: 700 19px/1.25 var(--body); }
.agent-card p { margin: 0; max-width: none; }
.agent-card-tag { font: 700 12px/1.2 var(--body); text-transform: uppercase; letter-spacing: .05em; color: var(--sky); }
.agent-card-prompt { margin-top: 4px; padding: 12px 14px; border: 2px dashed #9FB3C1; color: #5E6A72; font-size: 14px; flex: 1; min-height: 90px; }
@media (prefers-reduced-motion: reduce) { .pc-cover, .pc-cover:hover { transition: none; transform: none; } }
@media (max-width: 900px) { .shop-row { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .product-card { grid-template-columns: 96px minmax(0, 1fr); } }
/* Store parts: the footer scrolls with each part; the fixed footer shows only on the front page. */
body[data-shell][data-view="stage"] > footer { display: none; }
.shell-foot.panel-foot { margin-top: 24px; }
body[data-shell][data-view="hero"] .panel-foot { display: none; }
body[data-shell] [data-panel]:has(> .panel-foot) { padding-bottom: 0; }
.pc-bonus { margin: 0 0 12px; padding: 8px 10px; background: #EAF5FB; border-left: 4px solid var(--sky); font-size: 14px; line-height: 1.45; max-width: none; }
.pc-bonus a { white-space: nowrap; }
.hero-bonus { font-weight: 700; }
#books .print-order { margin-top: 0; }
.checkout-intro { margin: 0 0 16px; max-width: none; font-size: 17px; line-height: 1.5; }
body[data-chrome="shell"] main > .test-strip:first-child { border-top: 0; }
/* Agent tile: the prompt with its watch code, then the agent's steps and the order, live. */
.agent-card code { font-size: 12.5px; word-break: break-all; }
#agent-prompt { color: var(--black); border-style: solid; border-color: var(--black); background: #F5F9FC; flex: 0 0 auto; min-height: 0; font-size: 14.5px; line-height: 1.5; }
.agent-watch { border-top: 2px solid var(--black); padding-top: 12px; margin-top: 4px; }
.watch-h { margin: 6px 0 6px; font: 700 12px/1.2 var(--body); text-transform: uppercase; letter-spacing: .05em; }
.watch-steps { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.watch-steps li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: baseline; font-size: 14px; }
.watch-steps .src { font: 600 11px/1 var(--body); padding: 3px 6px; background: var(--black); color: var(--white); white-space: nowrap; }
.watch-steps time { font-size: 12px; color: #5E6A72; white-space: nowrap; }
.watch-steps li.is-error { color: var(--err); }
.watch-wait { margin: 0; font-size: 14px; color: #3A464E; }
.watch-dot { display: inline-block; width: 9px; height: 9px; margin-right: 8px; background: var(--sky); animation: fx-blink 1s steps(1, end) infinite; }
@media (prefers-reduced-motion: reduce) { .watch-dot { animation: none; } }
.agent-watch .gates { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 4px 0 10px; }
.agent-watch .gate { padding: 6px 6px; }
.agent-watch .gate-name { font-size: 12.5px; }
.watch-go { margin: 4px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }

/* Phones: the gate rail in two columns, and the paperback card stacked (cover, then details, then the form). */
@media (max-width: 560px) {
  .gates, .agent-watch .gates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gate { overflow-wrap: anywhere; hyphens: auto; }
  .product-card { grid-template-columns: 1fr; gap: 14px; padding: 16px; box-shadow: 4px 4px 0 var(--sky); }
  .pc-cover { width: 140px; }
  .product-card .print-form { grid-template-rows: none; grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); justify-content: stretch; gap: 4px; }
  .product-card .print-form select, .product-card .print-form input { width: 100%; max-width: 100%; }
  .pc-actions .btn { width: 100%; text-align: center; }
  .agent-card { padding: 16px; box-shadow: 4px 4px 0 var(--sky); }
}

/* A book without a storefront: one column, no Six Gates. */
.order-plain { max-width: 720px; }
.order-plain .step { cursor: default; }
.fresh-link { margin-top: 28px; padding: 20px; border: 1px solid #d9d9d9; border-radius: 8px; max-width: 560px; }
.fresh-link label { display: block; font-weight: 600; margin-bottom: 6px; }
.fresh-row { display: flex; gap: 10px; flex-wrap: wrap; }
.fresh-row input { flex: 1 1 220px; font: inherit; padding: 9px 12px; border: 1.5px solid #000; border-radius: 4px; }
.ib-top { background: #fff; border-bottom: 4px solid #1F97D4; }
.ib-top .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 18px; }
.ib-top a { color: #000; }
.ib-brand { font-family: "Norwester Pro", Poppins, sans-serif; font-size: 1.6rem; letter-spacing: .02em; text-decoration: none; }
.ib-brand span { color: #1F97D4; }
.ib-foot { background: #fff; color: #444; margin-top: 72px; border-top: 1px solid #ddd; padding: 24px 0 40px; font-size: .85rem; }
.ib-foot a { color: #000; }
.no-gates .order-right { display: none; }
.no-gates .order-split { display: block; max-width: 720px; }

/* Inside the shop embed on another site: the page shows only the sale itself. */
.embedded header[data-aoa-top], .embedded footer[data-aoa-foot], .embedded .ib-top, .embedded .ib-foot { display: none !important; }
.embedded body { padding-top: 0; }
.stripe-embedded { margin-top: 18px; min-height: 420px; }
/* "All three" run: protocol per step. Colors: UCP brand blue, ACP amber, AP2 violet, payment slate. */
.proto-out { --p-ucp: #1F97D4; --p-acp: #C77700; --p-ap2: #6B4FBB; --p-pay: #5B6B78; --p-print: #2F7A47; }
.proto-uses { border-left: 6px solid var(--uses); padding-left: 12px; }
.proto-uses.uses-two { border-left: 0; padding-left: 18px; background: linear-gradient(to bottom, var(--uses-split)) left / 6px 100% no-repeat; }
.proto-chip { display: inline-block; font: 700 11px/1 var(--body); color: #fff; padding: 3px 6px; margin-right: 6px; vertical-align: 1px; }
/* Tags use darker shades of the line colors so white text keeps at least 4.5:1 contrast. */
.tag-ucp { background: #136C9A; } .tag-acp { background: #8F5300; } .tag-ap2 { background: var(--p-ap2); } .tag-pay { background: var(--p-pay); } .tag-print { background: #276A3C; }
.proto-legend { margin: 0 0 12px; font-size: 13px; max-width: none; }
.proto-legend .proto-chip { margin-right: 4px; }
.proto-legend .note { display: block; margin-top: 4px; color: var(--muted); }

/* Protocol lab: who talks to whom, and over which protocol (public/js/protocols.js, entityMap). */
.proto-map { margin: 0 0 16px; padding: 12px 14px; background: #fff; border: 1px solid #C9D6DE; }
.proto-map-h { margin: 0 0 8px; font-weight: 700; max-width: none; }
.proto-links { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.proto-link { display: grid; grid-template-columns: minmax(120px, 11rem) 1fr auto 1fr minmax(120px, 11rem); align-items: center; column-gap: 6px; row-gap: 2px; --c: var(--p-ucp); }
.link-acp { --c: var(--p-acp); } .link-ap2 { --c: var(--p-ap2); } .link-pay { --c: var(--p-pay); } .link-print { --c: var(--p-print); }
.proto-ent { font: 700 13px/1.2 var(--body); border: 2px solid var(--c); padding: 5px 8px; text-align: center; background: #fff; }
.proto-wire { height: 4px; background: var(--c); min-width: 16px; }
.proto-link .proto-chip { margin: 0; }
.proto-what { grid-column: 1 / -1; font-size: 13px; color: var(--muted); padding-left: 2px; }
@media (max-width: 640px) {
  .proto-link { grid-template-columns: 1fr auto 1fr; }
  .proto-link .proto-wire { display: none; }
}
