/* pixrend v3, "The Frame". One stylesheet, no build step.
   Structure: 1 tokens, 2 base, 3 header and footer, 4 components,
   5 the frame and the caption, 6 landing, 7 ledger, 8 workbench,
   9 panel stack, 10 docs margin, 11 motion.

   ---------------------------------------------------------------------------
   SHARED MARKUP, copy verbatim on every page. Only aria-current moves.
   ---------------------------------------------------------------------------
   <header class="site-header"><div class="container">
     <a class="logo" href="/"><span class="mark" aria-hidden="true"></span>pixrend</a>
     <nav class="nav-links">
       <a href="/playground.html">Playground</a><a href="/docs.html">Docs</a>
       <a href="/pricing.html">Pricing</a><a href="/alternatives.html">Alternatives</a>
       <a class="nav-cta" href="/dashboard.html">Dashboard</a>
     </nav>
   </div></header>

   <footer class="site-footer"><div class="container">
     <div class="footer-links">
       <a href="/playground.html">Playground</a>
       <a href="/docs.html">Docs</a>
       <a href="/pricing.html">Pricing</a>
       <a href="/alternatives.html">Alternatives</a>
       <a href="/og-image-size.html">OG image sizes</a>
       <a href="/vs-vercel-og.html">vs Vercel OG</a>
       <a href="/terms.html">Terms</a>
       <a href="/privacy.html">Privacy</a>
       <a href="/refunds.html">Refunds</a>
     </div>
     <p class="caption"><span>pixrend.com</span><span></span><span><a href="mailto:support@pixrend.com">support@pixrend.com</a></span></p>
   </div></footer>

   The caption is the signature line: three cells, left says what it is, middle
   is an empty span that draws a hairline, right states a checkable fact.
   Lower case always, never numbered, never set in caps.
     <p class="caption"><span>POST /v1/render</span><span></span><span>200 image/png</span></p>

   A code block on a docs page:
     <figure class="code">
       <figcaption class="caption"><span>POST /v1/render</span><span></span><span>200 image/png</span></figcaption>
       <pre><code>...</code></pre>
     </figure>

   A docs page body is <body class="doc">. Three columns at 1024px and up,
   for pages with four or more h2 sections:
     <main class="doc-layout">
       <nav class="doc-index" aria-label="On this page"><ul><li><a href="#id">Heading</a></li></ul></nav>
       <div class="doc-body"> ... h1, sections ... </div>
     </main>
   Pages with fewer sections drop .doc-index and keep <main class="doc-layout">;
   the centre column holds its own measure either way.

   Real API output is wrapped in the frame, and only real output:
     <figure class="frame frame-og"><img src="..." width="1200" height="630" alt="..."></figure>
     <p class="caption"><span>sample-output.png</span><span></span><span>1200x630 png</span></p>
   ------------------------------------------------------------------------- */

/* 1 tokens ---------------------------------------------------------------- */

@font-face { font-family: "Archivo"; src: url("/fonts/archivo-var.woff2") format("woff2-variations");
  font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400; font-display: swap; }

:root {
  color-scheme: light;
  /* ground and ink */
  --paper: #F3F3F5;  --surface: #FFFFFF;
  --ink: #16161A;    --ink-2: #45464E;  --ink-3: #5E606A;
  --rule: #DCDCE1;   --rule-2: #7F808A;          /* rule-2: control borders, 3:1+ everywhere */
  /* the one accent */
  --guide: #AE1257;  --guide-hover: #9B0F4C;  --on-guide: #FFFFFF;
  /* the frame sub-system: never inverts */
  --plate: #DDDDE1;  --plate-ink: #3A3A40;  --tick: #AE1257;
  --success: #1F7A3D;  --danger: #B3261E;
  /* shape */
  --r: 0;                                          /* one radius, locked */
  /* structure */
  --col: 1200px;  --half: 600px;  --gutter: 24px;  --measure: 68ch;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
  /* type */
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --t-1: 12px; --t-2: 14px; --t-3: 16px; --t-4: 18px; --t-5: 22px;
  --t-6: 27px; --t-7: 34px; --t-8: clamp(30px, 8.2vw, 40px);
  --lh-tight: 1.04; --lh-head: 1.1; --lh-body: 1.55;
  /* motion */
  --d-press: 80ms; --d-arrive: 480ms; --ease-out: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) { :root {
  color-scheme: dark;
  --paper: #101014; --surface: #17171C;
  --ink: #F2F2F5;   --ink-2: #B6B7C0; --ink-3: #8A8B95;
  --rule: #2A2A31;  --rule-2: #70707C;
  --guide: #FF6FA3; --guide-hover: #FF8FB8; --on-guide: #101014;
  --success: #5BD67F; --danger: #FF8A80;
  /* --plate, --plate-ink, --tick unchanged on purpose */
} }

/* 2 base ----------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* .btn and .frame set display, which would beat the UA rule */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--t-3)/var(--lh-body) var(--sans);
  font-synthesis-weight: none;
}
body.doc { font-size: 15px; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; color: var(--ink); }
h1 {
  font-size: var(--t-8); line-height: var(--lh-tight);
  font-stretch: 119%; font-weight: 730; letter-spacing: -0.026em;
}
h2 {
  font-size: var(--t-7); line-height: var(--lh-head);
  font-stretch: 113%; font-weight: 680; letter-spacing: -0.015em;
}
h3 { font-size: var(--t-5); line-height: var(--lh-head); font-stretch: 106%; font-weight: 640; }
h4 { font-size: var(--t-4); font-stretch: 104%; font-weight: 620; }
body.doc h2 { font-size: var(--t-6); font-stretch: 110%; font-weight: 660; }

p { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 var(--s-4); padding-left: 1.2em; }
li { margin: 0 0 var(--s-1); }
strong { font-weight: 620; }
hr { border: 0; border-top: 1px solid var(--rule); margin: var(--s-7) 0; }

a { color: var(--ink); text-decoration-color: var(--rule-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--guide); outline-offset: 2px; }

img, svg { max-width: 100%; }
code, kbd, samp, pre { font-family: var(--mono); }
code { font-size: 0.92em; color: var(--ink); }
pre {
  margin: 0; background: var(--surface); border: 1px solid var(--rule);
  padding: var(--s-4) 20px; font-size: 13.5px; line-height: 1.6;
  overflow-x: auto; color: var(--ink); border-radius: var(--r);
}
pre code { font-size: inherit; }

.container { max-width: var(--col); margin: 0 auto; padding: 0 var(--gutter); }
main section { padding: var(--s-9) 0; }
main section + section { padding-top: var(--s-9); }
.measure { max-width: var(--measure); }
.lede { font-size: var(--t-4); color: var(--ink-2); }
.section-sub { color: var(--ink-2); max-width: 62ch; }
.small-print { font-size: var(--t-2); color: var(--ink-3); max-width: 78ch; }
.section-head { margin-bottom: var(--s-6); }
.section-head h2 { margin-bottom: var(--s-3); }
.section-head .section-sub:last-child, .section-head .caption:last-child { margin-bottom: 0; }
.request + .small-print, .plans + .small-print { margin-top: var(--s-6); }

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  main section { padding: 56px 0; }
  main section + section { padding-top: 56px; }
}

/* 3 header and footer ---------------------------------------------------- */

.site-header { background: var(--surface); border-bottom: 1px solid var(--rule); }
.site-header .container {
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: var(--s-5);
}
.logo {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  font: 600 17px/1 var(--sans); font-stretch: 104%; letter-spacing: -0.01em; color: var(--ink);
}
.mark {
  display: inline-block; width: 26px; aspect-ratio: 1200 / 630;
  border: 1.5px solid var(--ink); position: relative;
}
.mark::after { content: ""; position: absolute; inset: 0 0 0 auto; width: 33.333%; background: var(--guide); }

.nav-links { display: flex; align-items: center; gap: var(--s-5); }
.nav-links a {
  font: 500 var(--t-2)/1.4 var(--sans); color: var(--ink-2); text-decoration: none;
  display: flex; align-items: center; min-height: 44px; padding: 12px 0;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current] { color: var(--ink); }
.nav-links .nav-cta { color: var(--guide); font-weight: 600; }

@media (max-width: 900px) {
  .site-header .container { height: auto; flex-direction: column; align-items: flex-start; gap: 0; padding-top: 14px; }
  .logo { min-height: 30px; }
  .nav-links { gap: 20px; width: 100%; }
  .nav-links a[href="/alternatives.html"] { display: none; }
}
@media (max-width: 420px) { .nav-links { gap: 14px; } }

.site-footer { border-top: 1px solid var(--rule); padding: var(--s-7) 0; margin-top: var(--s-9); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); margin-bottom: var(--s-5); }
.footer-links a {
  font-size: var(--t-2); color: var(--ink-2); text-decoration: none;
  display: flex; align-items: center; min-height: 44px;
}
.footer-links a:hover { color: var(--ink); }
.site-footer .caption { margin-top: 0; }
.site-footer .caption a { color: var(--ink-3); }

/* 4 components ----------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px; border-radius: var(--r);
  font: 600 var(--t-2)/1 var(--sans); font-stretch: 104%;
  background: var(--surface); border: 1px solid var(--rule-2); color: var(--ink);
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform var(--d-press) var(--ease-out);
}
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--guide); outline-offset: 2px; }
.btn[disabled] { color: var(--ink-3); border-color: var(--rule); cursor: default; }
.btn-primary { background: var(--guide); border-color: var(--guide); color: var(--on-guide); }
.btn-primary:hover { background: var(--guide-hover); border-color: var(--guide-hover); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }

.field { display: block; margin-bottom: var(--s-4); }
.field > label, .field-label {
  display: block; margin-bottom: 6px; font: 500 var(--t-2)/1.4 var(--sans); color: var(--ink-2);
}
input, select, textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--rule-2);
  border-radius: var(--r); min-height: 44px; padding: 10px 12px;
  font: 400 var(--t-3)/1.45 var(--sans); color: var(--ink);
}
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, select:focus, textarea:focus {
  border-color: var(--ink); outline: 2px solid var(--guide); outline-offset: 2px;
}
textarea { font-family: var(--mono); font-size: 13.5px; line-height: 1.6; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

.status-msg { font-size: var(--t-2); color: var(--ink-2); min-height: 1.4em; }
.status-msg.ok { color: var(--success); }
.status-msg.error { color: var(--danger); }

.callout { border-left: 2px solid var(--guide); padding: var(--s-3) var(--s-4); margin: var(--s-5) 0; }
.callout > :last-child { margin-bottom: 0; }

table { width: 100%; border-collapse: collapse; font-size: var(--t-2); }
th {
  font: 500 var(--t-2)/1.4 var(--sans); color: var(--ink-2); text-align: left;
  padding: 0 12px 8px 0; border-bottom: 1px solid var(--ink);
}
td { padding: 10px 12px 10px 0; vertical-align: top; color: var(--ink); }
tbody + tbody td, tbody + tbody th { border-top: 1px solid var(--rule); }
.table-wrap { overflow-x: auto; }

/* 5 the frame and the caption -------------------------------------------- */

.caption {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  font: 400 var(--t-1)/1.4 var(--mono); color: var(--ink-3); margin: 10px 0 0;
}
.caption > span:nth-child(2) { border-top: 1px solid var(--rule); }
@media (max-width: 640px) {
  .caption { grid-template-columns: auto 1fr; }
  .caption > span:nth-child(3) { grid-column: 1 / -1; }
}

/* The frame is the plate, and the plate never inverts: its ink is fixed too,
   so anything inside it stays readable in both themes. */
.frame { position: relative; display: block; background: var(--plate); color: var(--plate-ink); margin: 0; }
pre.frame { border: 0; }
.frame > pre { background: transparent; border: 0; }
.frame-og { aspect-ratio: 1200 / 630; }
.frame > img, .frame > canvas { display: block; width: 100%; height: auto; }
.frame-og > img { height: 100%; object-fit: cover; }
.frame::after {
  content: ""; position: absolute; inset: -10px; pointer-events: none;
  background-image:
    linear-gradient(var(--tick), var(--tick)), linear-gradient(var(--tick), var(--tick)),
    linear-gradient(var(--tick), var(--tick)), linear-gradient(var(--tick), var(--tick)),
    linear-gradient(var(--tick), var(--tick)), linear-gradient(var(--tick), var(--tick)),
    linear-gradient(var(--tick), var(--tick)), linear-gradient(var(--tick), var(--tick));
  background-repeat: no-repeat;
  background-position: left top, left top, right top, right top,
                       left bottom, left bottom, right bottom, right bottom;
  background-size: 16px 2px, 2px 16px, 16px 2px, 2px 16px,
                   16px 2px, 2px 16px, 16px 2px, 2px 16px;
}
.frame:empty::before, .frame.is-empty::before {
  content: "no render yet"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font: 400 var(--t-1)/1 var(--mono); color: var(--plate-ink);
}
@media (max-width: 900px) {
  .frame::after {
    background-size: 12px 2px, 2px 12px, 12px 2px, 2px 12px,
                     12px 2px, 2px 12px, 12px 2px, 2px 12px;
  }
}

/* 6 landing -------------------------------------------------------------- */

.hero { padding-top: var(--s-8); }
.hero-split { display: grid; grid-template-columns: 480px minmax(0, 1fr); gap: var(--s-8); align-items: start; }
.hero-copy > h1 { margin-bottom: var(--s-5); }
.hero-copy > .lede { margin-bottom: var(--s-6); }
.hero-shot { max-width: var(--half); margin: 0; }
@media (max-width: 1100px) { .hero-split { grid-template-columns: 1fr 1fr; gap: var(--s-6); } }
@media (max-width: 900px) {
  .hero { padding-top: var(--s-7); }
  .hero-split { grid-template-columns: 1fr; gap: var(--s-7); }
  .hero-shot { max-width: 100%; }
}

.band { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.request { max-width: 900px; }
.request-out {
  display: grid; grid-template-columns: repeat(3, 1fr); margin-top: var(--s-6);
  border-top: 1px solid var(--rule);
}
.request-out > div {
  padding: var(--s-5) var(--s-5) 0 0; font-size: var(--t-2); color: var(--ink-2);
  border-left: 1px solid var(--rule); padding-left: var(--s-5);
}
.request-out > div:first-child { border-left: 0; padding-left: 0; }
.request-out strong { display: block; margin-bottom: 6px; color: var(--ink); font-weight: 620; }
@media (max-width: 760px) {
  .request-out { grid-template-columns: 1fr; }
  .request-out > div { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: var(--s-4); }
  .request-out > div:first-child { border-top: 0; }
}

.bento {
  display: grid; grid-template-columns: 1.65fr 1fr; gap: 1px;
  background: var(--rule); border: 1px solid var(--rule); margin-top: var(--s-6);
}
.cell { background: var(--paper); padding: var(--s-6); }
.cell h3 { margin-bottom: var(--s-3); }
.cell p { font-size: var(--t-2); color: var(--ink-2); }
.cell-wide { grid-row: span 2; }
.cell-price { background: var(--surface); display: flex; flex-direction: column; }
.cell-stack { display: flex; flex-direction: column; gap: var(--s-5); justify-content: space-between; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6) var(--s-5); margin-top: var(--s-5); }
.pair > figure { margin: 0; }
.figure {
  font: 700 var(--t-7)/1 var(--sans); font-stretch: 113%; letter-spacing: -0.015em;
  margin: var(--s-2) 0 var(--s-4); color: var(--ink);
}
.figure span { font: 400 var(--t-2)/1 var(--mono); color: var(--ink-3); margin-left: var(--s-2); letter-spacing: 0; }
.stack-list {
  display: flex; flex-wrap: wrap; gap: var(--s-4); list-style: none; padding: 0; margin: 0;
  font: 400 var(--t-1)/1 var(--mono); color: var(--ink-3);
}
.stack-list li { margin: 0; }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; }
  .cell { padding: var(--s-5); }
  .cell-wide { grid-row: auto; }
}
@media (max-width: 560px) { .pair { grid-template-columns: 1fr; } }

.limits { max-width: var(--measure); border-top: 1px solid var(--ink); padding-top: var(--s-5); }
.limits h2 { margin-bottom: var(--s-4); }
.limits p { color: var(--ink-2); }

/* 7 ledger (pricing, landing plans) ------------------------------------- */

.plans {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--ink); margin-top: var(--s-6);
}
.plan { position: relative; padding: var(--s-5); border-left: 1px solid var(--rule); display: flex; flex-direction: column; }
.plan:first-child { border-left: 0; }
.plan .name { font: 500 var(--t-2)/1.4 var(--sans); color: var(--ink-2); margin-bottom: var(--s-3); }
.plan .price { font: 700 var(--t-6)/1 var(--sans); font-stretch: 110%; letter-spacing: -0.015em; color: var(--ink); }
.plan .price span { font: 400 var(--t-2)/1 var(--mono); color: var(--ink-3); margin-left: 6px; letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: var(--s-4) 0 var(--s-5); font-size: var(--t-2); color: var(--ink-2); }
.plan ul li { margin-bottom: 6px; }
.plan .btn { margin-top: auto; }
.plan-row { padding: var(--s-3) 0; border-bottom: 1px solid var(--rule); font-size: var(--t-2); color: var(--ink-2); }
.plan-row:last-of-type { border-bottom: 0; }
.plan-row .plan-row-label { display: block; font: 400 var(--t-1)/1.4 var(--mono); color: var(--ink-3); }
.plan.featured { background: var(--surface); }
.plan.featured::before {
  content: ""; position: absolute; inset: 6px; pointer-events: none;
  background-image:
    linear-gradient(var(--guide), var(--guide)), linear-gradient(var(--guide), var(--guide)),
    linear-gradient(var(--guide), var(--guide)), linear-gradient(var(--guide), var(--guide)),
    linear-gradient(var(--guide), var(--guide)), linear-gradient(var(--guide), var(--guide)),
    linear-gradient(var(--guide), var(--guide)), linear-gradient(var(--guide), var(--guide));
  background-repeat: no-repeat;
  background-position: left top, left top, right top, right top,
                       left bottom, left bottom, right bottom, right bottom;
  background-size: 14px 2px, 2px 14px, 14px 2px, 2px 14px,
                   14px 2px, 2px 14px, 14px 2px, 2px 14px;
}
.plans-note { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); margin-top: var(--s-7); }
.plans-note > div { max-width: 60ch; font-size: var(--t-2); color: var(--ink-2); border-left: 1px solid var(--rule); padding-left: var(--s-5); }
.plans-note > div:first-child { border-left: 0; padding-left: 0; }
@media (max-width: 900px) {
  .plans { grid-template-columns: 1fr; }
  .plan { border-left: 0; border-bottom: 1px solid var(--rule); }
  .plan:last-child { border-bottom: 0; }
  .plans-note { grid-template-columns: 1fr; gap: var(--s-5); }
  .plans-note > div { border-left: 0; padding-left: 0; }
}

/* 8 workbench (playground) --------------------------------------------- */

.page-head { padding-top: var(--s-6); }
.page-head h1 { margin-bottom: var(--s-4); }
.playground-grid { display: grid; grid-template-columns: 5fr 7fr; gap: var(--s-7); align-items: start; }
.playground-grid > * { align-self: start; }
.playground-grid .field textarea { min-height: 200px; }
.preview-frame { position: relative; display: block; background: var(--plate); aspect-ratio: 1200 / 630; margin: 0; }
.preview-frame > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.preview-frame::after {
  content: ""; position: absolute; inset: -10px; pointer-events: none;
  background-image:
    linear-gradient(var(--tick), var(--tick)), linear-gradient(var(--tick), var(--tick)),
    linear-gradient(var(--tick), var(--tick)), linear-gradient(var(--tick), var(--tick)),
    linear-gradient(var(--tick), var(--tick)), linear-gradient(var(--tick), var(--tick)),
    linear-gradient(var(--tick), var(--tick)), linear-gradient(var(--tick), var(--tick));
  background-repeat: no-repeat;
  background-position: left top, left top, right top, right top,
                       left bottom, left bottom, right bottom, right bottom;
  background-size: 16px 2px, 2px 16px, 16px 2px, 2px 16px,
                   16px 2px, 2px 16px, 16px 2px, 2px 16px;
}
@media (min-width: 900px) { .playground-col-preview { position: sticky; top: var(--s-5); } }
@media (max-width: 900px) { .playground-grid { grid-template-columns: 1fr; gap: var(--s-6); } }

/* 9 panel stack (dashboard) ------------------------------------------- */

body.app { font-size: 15px; }
body.app main { max-width: 720px; margin: 0 auto; padding: var(--s-7) var(--gutter) 0; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--rule);
  padding: var(--s-6); margin-bottom: var(--s-5);
}
.card > h2 {
  position: absolute; top: -8px; left: 20px; padding: 0 6px; background: var(--surface);
  font: 400 12px/1 var(--mono); color: var(--ink-3); letter-spacing: 0; font-stretch: normal;
}
.card > h2 + * { margin-top: 0; }
.usage-bar { height: 3px; background: var(--rule); margin: var(--s-2) 0 var(--s-4); }
.usage-bar > div { height: 100%; background: var(--guide); }
.usage-nums { font: 400 var(--t-1)/1.4 var(--mono); color: var(--ink-3); }
.key-row, .tmpl-row, .secret-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-3) 0; border-bottom: 1px solid var(--rule); font-size: var(--t-2);
}
.key-row code, .tmpl-meta, .secret-row code { font: 400 var(--t-1)/1.4 var(--mono); color: var(--ink-3); }
.key-row code { margin-left: var(--s-2); }
.tmpl-name { font-weight: 620; }
.tmpl-meta { display: block; }
.tmpl-actions { display: flex; gap: var(--s-2); flex-shrink: 0; }
.tmpl-actions .btn, .key-row .btn, .secret-row .btn { padding: 0 12px; }
/* The secret is 64 characters, so it takes its own line above the buttons
   instead of pushing them off the right edge. */
.secret-row { flex-wrap: wrap; justify-content: flex-start; gap: var(--s-2); }
.secret-row > code { flex: 1 1 100%; min-width: 0; overflow-wrap: anywhere; margin-bottom: var(--s-1); }
/* Both are pre elements, so white-space has to allow the break before
   overflow-wrap can take one: a signed URL wraps instead of clipping. */
#new-key-value, #sign-output {
  font: 400 13.5px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: visible;
}
#new-key-box > strong { display: block; margin-bottom: var(--s-2); }
/* The signed URL and its caption appear together, and JS only toggles the pre. */
#sign-output[hidden] + .sign-caption { display: none; }
.cta-box { border-top: 1px solid var(--rule); padding-top: var(--s-5); margin-top: var(--s-5); }
.dash-meta { font: 400 var(--t-1)/1.6 var(--mono); color: var(--ink-3); }

/* 10 docs margin -------------------------------------------------------- */

body.doc main { padding-top: var(--s-6); }
.doc-layout {
  max-width: var(--col); margin: 0 auto; padding: var(--s-6) var(--gutter) 0;
  display: grid; grid-template-columns: minmax(0, var(--measure));
}
.doc-body > h1 { margin-bottom: var(--s-5); }
.doc-body > h2 { margin: var(--s-8) 0 var(--s-4); }
.doc-body > h3 { margin: var(--s-6) 0 var(--s-3); }
.doc-body > p, .doc-body > ul, .doc-body > ol { color: var(--ink-2); }
.doc-body > figure.code, .doc-body > .table-wrap, .doc-body > table { margin: var(--s-5) 0; }
figure.code { margin: var(--s-5) 0; }
figure.code .caption { margin: 0 0 8px; }
.doc-index { display: none; }
/* A 64-zero test secret in prose has no natural break point, so it would push
   the page wider than the viewport. Tables keep their own scroll. */
.doc-body p code, .doc-body li code { overflow-wrap: anywhere; }
@media (min-width: 1024px) {
  .doc-layout { grid-template-columns: 200px minmax(0, var(--measure)) 1fr; gap: 0 var(--s-7); }
  /* No index: prose keeps the measure, but a comparison table is the page and
     gets the whole column. */
  .doc-layout.no-index { grid-template-columns: minmax(0, 1fr); }
  .no-index .doc-body > * { max-width: var(--measure); }
  .no-index .doc-body > .table-wrap, .no-index .doc-body > table { max-width: none; }
  .doc-index { display: block; position: sticky; top: var(--s-5); align-self: start; }
  .doc-index ul { list-style: none; padding: 0; margin: 0; }
  .doc-index li { margin-bottom: var(--s-2); }
  .doc-index a { font-size: var(--t-2); color: var(--ink-2); text-decoration: none; }
  .doc-index a:hover { color: var(--ink); }
}
.demo-grid, .feature-grid { display: grid; gap: var(--s-5); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.demo-grid > *, .feature-grid > * { min-width: 0; }
@media (max-width: 640px) { .demo-grid, .feature-grid { grid-template-columns: 1fr; } }
.dim-card { position: relative; display: block; background: var(--plate); aspect-ratio: 1200 / 630; margin: 0; }
.dim-card::after {
  content: ""; position: absolute; inset: -10px; pointer-events: none;
  background-image:
    linear-gradient(var(--tick), var(--tick)), linear-gradient(var(--tick), var(--tick)),
    linear-gradient(var(--tick), var(--tick)), linear-gradient(var(--tick), var(--tick)),
    linear-gradient(var(--tick), var(--tick)), linear-gradient(var(--tick), var(--tick)),
    linear-gradient(var(--tick), var(--tick)), linear-gradient(var(--tick), var(--tick));
  background-repeat: no-repeat;
  background-position: left top, left top, right top, right top,
                       left bottom, left bottom, right bottom, right bottom;
  background-size: 16px 2px, 2px 16px, 16px 2px, 2px 16px,
                   16px 2px, 2px 16px, 16px 2px, 2px 16px;
}
.dim-preview { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.dim-preview > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.safe { position: absolute; inset: 2.38% 0; border: 1px solid var(--tick); }

/* 11 motion, the complete list ------------------------------------------ */
/* (1) the hero render arrives left to right, the way a render arrives.    */
/* (2) a button presses 1px on :active (see .btn above).                   */

@keyframes frame-arrive { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
.hero .frame { animation: frame-arrive var(--d-arrive) var(--ease-out) 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
